<s>[INST] returns number of days from today until next alarmclock concode_field_sep int column_alert concode_elem_sep int column_id concode_elem_sep ContentObserver mContentObserver concode_elem_sep int column_vibrate concode_elem_sep boolean vibrate concode_elem_sep String message concode_elem_sep int daysOfWeek concode_elem_sep Uri ALARM_URI concode_elem_sep int column_message concode_elem_sep int minute concode_elem_sep int column_hour concode_elem_sep int hour concode_elem_sep int column_minutes concode_elem_sep int column_daysofweek concode_elem_sep ContentResolver mContentResolver concode_elem_sep int id concode_elem_sep String audio concode_elem_sep Calendar nearestAlarmDate concode_field_sep Calendar getNearestAlarmDate concode_elem_sep Uri getRecordUri concode_elem_sep Record getAlarmById concode_elem_sep Intent startNightClock concode_elem_sep int hashCode concode_elem_sep Calendar calculateNextAlarm concode_elem_sep boolean equals concode_elem_sep Intent changeAlarmSettings concode_elem_sep Intent changeAlarmSettings concode_elem_sep void finalize concode_elem_sep Record getNearestEnabledAlarm concode_elem_sep Record getNearestEnabledAlarm [/INST] int function ( Calendar arg0 , int arg1 ) { if ( arg1 == 0 ) return - 1 ; int loc0 = ( arg0 . get ( Calendar . DAY_OF_WEEK ) + 5 ) % 7 ; int loc1 , loc2 ; for ( loc2 = 0 ; loc2 < 7 ; loc2 ++ ) { loc1 = ( loc0 + loc2 ) % 7 ; if ( ( arg1 & ( 1 << loc1 ) ) > 0 ) { break ; } } return loc2 ; </s>