// File: /workspace/github_cpp_makefile_star2_O3/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 0xffb8e(%rip), %rdi     # 0x109647
movl $0x1, %esi
callq 0x99d6
movb %al, 0x3047f7(%rip)     # 0x30e2c0
leaq 0xffb89(%rip), %rdi     # 0x109659
movl $0x1, %esi
callq 0x99d6
movb %al, 0x3047e3(%rip)     # 0x30e2c3
leaq 0xffb84(%rip), %rdi     # 0x10966b
movl $0x1, %esi
callq 0x99d6
movb %al, 0x3047cd(%rip)     # 0x30e2c4
leaq 0xffb81(%rip), %rdi     # 0x10967f
movl $0x1, %esi
callq 0x99d6
movb %al, 0x3047b7(%rip)     # 0x30e2c5
leaq 0xffb7e(%rip), %rdi     # 0x109693
movl $0x1, %esi
callq 0x99d6
movb %al, 0x3047a1(%rip)     # 0x30e2c6
leaq 0xffb78(%rip), %rdi     # 0x1096a4
movl $0x1, %esi
callq 0x99d6
movb %al, 0x30478b(%rip)     # 0x30e2c7
leaq 0xffb72(%rip), %rdi     # 0x1096b5
movl $0x1, %esi
callq 0x99d6
movb %al, 0x304775(%rip)     # 0x30e2c8
leaq 0xffb6d(%rip), %rdi     # 0x1096c7
movl $0x1, %esi
callq 0x99d6
movb %al, 0x304757(%rip)     # 0x30e2c1
leaq 0xffb69(%rip), %rdi     # 0x1096da
movl $0x1, %esi
callq 0x99d6
movb %al, 0x304741(%rip)     # 0x30e2c2
leaq 0xffb65(%rip), %rdi     # 0x1096ed
movl $0x1, %esi
callq 0x99d6
movb $0x2, %cl
testl %eax, %eax
jne 0x9bac
leaq 0xffb60(%rip), %rdi     # 0x1096ff
xorl %esi, %esi
callq 0x99d6
movb $0x1, %cl
testl %eax, %eax
je 0x9bb2
movb %cl, 0x30450b(%rip)     # 0x30e0bd
leaq 0xffb61(%rip), %rdi     # 0x10971a
movl $0x1, %esi
callq 0x99d6
movb $0x2, %cl
testl %eax, %eax
jne 0x9bdd
leaq 0xffb5d(%rip), %rdi     # 0x10972d
xorl %esi, %esi
callq 0x99d6
movb $0x1, %cl
testl %eax, %eax
je 0x9be3
movb %cl, 0x3044db(%rip)     # 0x30e0be
movzbl 0x3046d6(%rip), %esi    # 0x30e2c0
leaq 0xffb58(%rip), %rdi     # 0x109749
xorl %eax, %eax
callq 0x9030
movzbl 0x3046c4(%rip), %esi    # 0x30e2c3
leaq 0xffb52(%rip), %rdi     # 0x109758
xorl %eax, %eax
callq 0x9030
movzbl 0x3046b0(%rip), %esi    # 0x30e2c4
leaq 0xffb4c(%rip), %rdi     # 0x109767
xorl %eax, %eax
callq 0x9030
movzbl 0x30469c(%rip), %esi    # 0x30e2c5
leaq 0xffb45(%rip), %rdi     # 0x109775
xorl %eax, %eax
callq 0x9030
movzbl 0x304688(%rip), %esi    # 0x30e2c6
leaq 0xffb41(%rip), %rdi     # 0x109786
xorl %eax, %eax
callq 0x9030
movzbl 0x30446a(%rip), %esi    # 0x30e0bd
leaq 0xffb3a(%rip), %rdi     # 0x109794
xorl %eax, %eax
callq 0x9030
movzbl 0x304456(%rip), %esi    # 0x30e0be
leaq 0xffb34(%rip), %rdi     # 0x1097a3
xorl %eax, %eax
callq 0x9030
movzbl 0x30464a(%rip), %esi    # 0x30e2c7
leaq 0xffb2f(%rip), %rdi     # 0x1097b3
xorl %eax, %eax
callq 0x9030
movzbl 0x304636(%rip), %esi    # 0x30e2c8
leaq 0xffb28(%rip), %rdi     # 0x1097c1
xorl %eax, %eax
callq 0x9030
movzbl 0x30461a(%rip), %esi    # 0x30e2c1
leaq 0xffb22(%rip), %rdi     # 0x1097d0
xorl %eax, %eax
callq 0x9030
movzbl 0x304606(%rip), %esi    # 0x30e2c2
leaq 0xffb1d(%rip), %rdi     # 0x1097e0
xorl %eax, %eax
popq %rbp
jmp 0x9030