// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heather.cpp
// Function: find_sound_files()
void find_sound_files()
{
   // See if user sound files exist for the cuckoo clock and alarm clock
   // If so, we play them.  Otherwise we use the default sounds.

   chime_file   = tune_exists(CHIME_FILE, 1);
   alarm_file   = tune_exists(ALARM_FILE, 1);    // see if alarm sound file exists
   leap_file    = tune_exists(LEAP_FILE, 1);     // see if leapsecond sound file exists
   sun_file     = tune_exists(SUNRISE_FILE, 1);  // see if sunrise tune sound file exists
   noon_file    = tune_exists(NOON_FILE, 1);     // see if solar noon tune sound file exists
   bell_file    = tune_exists(BELL_FILE, 1);     // see if ships bell sound file exists
   click_file   = tune_exists(CLICK_FILE, 1);    // see if touchscreen click sound file exists
   minute_file  = tune_exists(MINUTE_FILE, 1);   // ticking clock minute sound
   seconds_file = tune_exists(SECONDS_FILE, 1);  // ticking clock seconds sound

   if(tune_exists(USER_CHORD_FILE, 1)) chord_file = 2;
   else if(tune_exists(CHORD_FILE, 0)) chord_file = 1;

   if(tune_exists(USER_NOTIFY_FILE, 1)) notify_file = 2;
   else if(tune_exists(NOTIFY_FILE, 0)) notify_file = 1;

printf("chime_file:%d\n", chime_file);  // zork - show_debug_info
printf("alarm_file:%d\n", alarm_file);
printf("leap_file:%d\n", leap_file);
printf("sunrise_file:%d\n", sun_file);
printf("noon_file:%d\n", noon_file);
printf("chord_file:%d\n", chord_file);
printf("noiify_file:%d\n", notify_file);
printf("bell_file:%d\n", bell_file);
printf("click_file:%d\n", click_file);
printf("minute_file:%d\n", minute_file);
printf("second_files:%d\n", seconds_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xffb76(%rip), %rdi     # 0x109637
movl $0x1, %esi
callq 0x99dc
movb %al, 0x3047ef(%rip)     # 0x30e2c0
leaq 0xffb71(%rip), %rdi     # 0x109649
movl $0x1, %esi
callq 0x99dc
movb %al, 0x3047db(%rip)     # 0x30e2c3
leaq 0xffb6c(%rip), %rdi     # 0x10965b
movl $0x1, %esi
callq 0x99dc
movb %al, 0x3047c5(%rip)     # 0x30e2c4
leaq 0xffb69(%rip), %rdi     # 0x10966f
movl $0x1, %esi
callq 0x99dc
movb %al, 0x3047af(%rip)     # 0x30e2c5
leaq 0xffb66(%rip), %rdi     # 0x109683
movl $0x1, %esi
callq 0x99dc
movb %al, 0x304799(%rip)     # 0x30e2c6
leaq 0xffb60(%rip), %rdi     # 0x109694
movl $0x1, %esi
callq 0x99dc
movb %al, 0x304783(%rip)     # 0x30e2c7
leaq 0xffb5a(%rip), %rdi     # 0x1096a5
movl $0x1, %esi
callq 0x99dc
movb %al, 0x30476d(%rip)     # 0x30e2c8
leaq 0xffb55(%rip), %rdi     # 0x1096b7
movl $0x1, %esi
callq 0x99dc
movb %al, 0x30474f(%rip)     # 0x30e2c1
leaq 0xffb51(%rip), %rdi     # 0x1096ca
movl $0x1, %esi
callq 0x99dc
movb %al, 0x304739(%rip)     # 0x30e2c2
leaq 0xffb4d(%rip), %rdi     # 0x1096dd
movl $0x1, %esi
callq 0x99dc
movb $0x2, %cl
testl %eax, %eax
jne 0x9bb4
leaq 0xffb48(%rip), %rdi     # 0x1096ef
xorl %esi, %esi
callq 0x99dc
movb $0x1, %cl
testl %eax, %eax
je 0x9bba
movb %cl, 0x304503(%rip)     # 0x30e0bd
leaq 0xffb49(%rip), %rdi     # 0x10970a
movl $0x1, %esi
callq 0x99dc
movb $0x2, %cl
testl %eax, %eax
jne 0x9be5
leaq 0xffb45(%rip), %rdi     # 0x10971d
xorl %esi, %esi
callq 0x99dc
movb $0x1, %cl
testl %eax, %eax
je 0x9beb
movb %cl, 0x3044d3(%rip)     # 0x30e0be
movzbl 0x3046ce(%rip), %esi    # 0x30e2c0
leaq 0xffb40(%rip), %rdi     # 0x109739
xorl %eax, %eax
callq 0x9030
movzbl 0x3046bc(%rip), %esi    # 0x30e2c3
leaq 0xffb3a(%rip), %rdi     # 0x109748
xorl %eax, %eax
callq 0x9030
movzbl 0x3046a8(%rip), %esi    # 0x30e2c4
leaq 0xffb34(%rip), %rdi     # 0x109757
xorl %eax, %eax
callq 0x9030
movzbl 0x304694(%rip), %esi    # 0x30e2c5
leaq 0xffb2d(%rip), %rdi     # 0x109765
xorl %eax, %eax
callq 0x9030
movzbl 0x304680(%rip), %esi    # 0x30e2c6
leaq 0xffb29(%rip), %rdi     # 0x109776
xorl %eax, %eax
callq 0x9030
movzbl 0x304462(%rip), %esi    # 0x30e0bd
leaq 0xffb22(%rip), %rdi     # 0x109784
xorl %eax, %eax
callq 0x9030
movzbl 0x30444e(%rip), %esi    # 0x30e0be
leaq 0xffb1c(%rip), %rdi     # 0x109793
xorl %eax, %eax
callq 0x9030
movzbl 0x304642(%rip), %esi    # 0x30e2c7
leaq 0xffb17(%rip), %rdi     # 0x1097a3
xorl %eax, %eax
callq 0x9030
movzbl 0x30462e(%rip), %esi    # 0x30e2c8
leaq 0xffb10(%rip), %rdi     # 0x1097b1
xorl %eax, %eax
callq 0x9030
movzbl 0x304612(%rip), %esi    # 0x30e2c1
leaq 0xffb0a(%rip), %rdi     # 0x1097c0
xorl %eax, %eax
callq 0x9030
movzbl 0x3045fe(%rip), %esi    # 0x30e2c2
leaq 0xffb05(%rip), %rdi     # 0x1097d0
xorl %eax, %eax
popq %rbp
jmp 0x9030