// File: 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 0x1657e8(%rip), %rdi    # 0x16f393
movl $0x1, %esi
callq 0x9a80
movb %al, 0x3638e5(%rip)     # 0x36d4a0
leaq 0x1657e3(%rip), %rdi    # 0x16f3a5
movl $0x1, %esi
callq 0x9a80
movb %al, 0x3638d1(%rip)     # 0x36d4a3
leaq 0x1657de(%rip), %rdi    # 0x16f3b7
movl $0x1, %esi
callq 0x9a80
movb %al, 0x3638bb(%rip)     # 0x36d4a4
leaq 0x1657db(%rip), %rdi    # 0x16f3cb
movl $0x1, %esi
callq 0x9a80
movb %al, 0x3638a5(%rip)     # 0x36d4a5
leaq 0x1657d8(%rip), %rdi    # 0x16f3df
movl $0x1, %esi
callq 0x9a80
movb %al, 0x36388f(%rip)     # 0x36d4a6
leaq 0x1657d2(%rip), %rdi    # 0x16f3f0
movl $0x1, %esi
callq 0x9a80
movb %al, 0x363879(%rip)     # 0x36d4a7
leaq 0x1657cc(%rip), %rdi    # 0x16f401
movl $0x1, %esi
callq 0x9a80
movb %al, 0x363863(%rip)     # 0x36d4a8
leaq 0x1657c7(%rip), %rdi    # 0x16f413
movl $0x1, %esi
callq 0x9a80
movb %al, 0x363845(%rip)     # 0x36d4a1
leaq 0x1657c3(%rip), %rdi    # 0x16f426
movl $0x1, %esi
callq 0x9a80
movb %al, 0x36382f(%rip)     # 0x36d4a2
leaq 0x1657bf(%rip), %rdi    # 0x16f439
movl $0x1, %esi
callq 0x9a80
cmpl $0x0, %eax
je 0x9c92
movb $0x2, 0x36360d(%rip)    # 0x36d29d
jmp 0x9cae
leaq 0x1657b2(%rip), %rdi    # 0x16f44b
xorl %esi, %esi
callq 0x9a80
cmpl $0x0, %eax
je 0x9cac
movb $0x1, 0x3635f1(%rip)    # 0x36d29d
jmp 0x9cae
leaq 0x1657b1(%rip), %rdi    # 0x16f466
movl $0x1, %esi
callq 0x9a80
cmpl $0x0, %eax
je 0x9ccd
movb $0x2, 0x3635d3(%rip)    # 0x36d29e
jmp 0x9ce9
leaq 0x1657a5(%rip), %rdi    # 0x16f479
xorl %esi, %esi
callq 0x9a80
cmpl $0x0, %eax
je 0x9ce7
movb $0x1, 0x3635b7(%rip)    # 0x36d29e
jmp 0x9ce9
movzbl 0x3637b0(%rip), %esi    # 0x36d4a0
leaq 0x16579e(%rip), %rdi    # 0x16f495
movb $0x0, %al
callq 0x9030
movzbl 0x36379e(%rip), %esi    # 0x36d4a3
leaq 0x165798(%rip), %rdi    # 0x16f4a4
movb $0x0, %al
callq 0x9030
movzbl 0x36378a(%rip), %esi    # 0x36d4a4
leaq 0x165792(%rip), %rdi    # 0x16f4b3
movb $0x0, %al
callq 0x9030
movzbl 0x363776(%rip), %esi    # 0x36d4a5
leaq 0x16578b(%rip), %rdi    # 0x16f4c1
movb $0x0, %al
callq 0x9030
movzbl 0x363762(%rip), %esi    # 0x36d4a6
leaq 0x165787(%rip), %rdi    # 0x16f4d2
movb $0x0, %al
callq 0x9030
movzbl 0x363544(%rip), %esi    # 0x36d29d
leaq 0x165780(%rip), %rdi    # 0x16f4e0
movb $0x0, %al
callq 0x9030
movzbl 0x363530(%rip), %esi    # 0x36d29e
leaq 0x16577a(%rip), %rdi    # 0x16f4ef
movb $0x0, %al
callq 0x9030
movzbl 0x363724(%rip), %esi    # 0x36d4a7
leaq 0x165775(%rip), %rdi    # 0x16f4ff
movb $0x0, %al
callq 0x9030
movzbl 0x363710(%rip), %esi    # 0x36d4a8
leaq 0x16576e(%rip), %rdi    # 0x16f50d
movb $0x0, %al
callq 0x9030
movzbl 0x3636f4(%rip), %esi    # 0x36d4a1
leaq 0x165768(%rip), %rdi    # 0x16f51c
movb $0x0, %al
callq 0x9030
movzbl 0x3636e0(%rip), %esi    # 0x36d4a2
leaq 0x165763(%rip), %rdi    # 0x16f52c
movb $0x0, %al
callq 0x9030
popq %rbp
retq
nopw %cs:(%rax,%rax)