### RAW ASSEMBLY INSTRUCTIONS:

glabel func_802471EC
/* 167A4C 802471EC 27BDFFE0 */  addiu     $sp, $sp, -0x20
.L802471F0:
/* 167A50 802471F0 AFB20018 */  sw        $s2, 0x18($sp)
D_802471F4:
/* 167A54 802471F4 0080902D */  daddu     $s2, $a0, $zero
/* 167A58 802471F8 3C028025 */  lui       $v0, %hi(D_8024C08C)
.L802471FC:
/* 167A5C 802471FC 8C42C08C */  lw        $v0, %lo(D_8024C08C)($v0)
/* 167A60 80247200 3C030001 */  lui       $v1, (0x10000 >> 16)
/* 167A64 80247204 AFBF001C */  sw        $ra, 0x1C($sp)
/* 167A68 80247208 AFB10014 */  sw        $s1, 0x14($sp)
D_8024720C:
/* 167A6C 8024720C AFB00010 */  sw        $s0, 0x10($sp)
/* 167A70 80247210 92450003 */  lbu       $a1, 0x3($s2)
glabel func_80247214
/* 167A74 80247214 00431024 */  and       $v0, $v0, $v1
/* 167A78 80247218 10400007 */  beqz      $v0, .L80247238
glabel func_8024721C
/* 167A7C 8024721C 00000000 */   nop
glabel func_80247220
/* 167A80 80247220 92420002 */  lbu       $v0, 0x2($s2)
/* 167A84 80247224 2442FFFF */  addiu     $v0, $v0, -0x1
/* 167A88 80247228 A2420002 */  sb        $v0, 0x2($s2)
/* 167A8C 8024722C 00021600 */  sll       $v0, $v0, 24
/* 167A90 80247230 04420001 */  bltzl     $v0, .L80247238
/* 167A94 80247234 A2400002 */   sb       $zero, 0x2($s2)
.L80247238:
/* 167A98 80247238 3C028025 */  lui       $v0, %hi(D_8024C08C)
/* 167A9C 8024723C 8C42C08C */  lw        $v0, %lo(D_8024C08C)($v0)
D_80247240:
/* 167AA0 80247240 3C030002 */  lui       $v1, (0x20000 >> 16)
/* 167AA4 80247244 00431024 */  and       $v0, $v0, $v1
jtbl_80247248:
/* 167AA8 80247248 1040000C */  beqz      $v0, .L8024727C
/* 167AAC 8024724C 00000000 */   nop
D_80247250:
/* 167AB0 80247250 92420002 */  lbu       $v0, 0x2($s2)
/* 167AB4 80247254 82430006 */  lb        $v1, 0x6($s2)
/* 167AB8 80247258 24420001 */  addiu     $v0, $v0, 0x1
/* 167ABC 8024725C A2420002 */  sb        $v0, 0x2($s2)
.L80247260:
/* 167AC0 80247260 00021600 */  sll       $v0, $v0, 24
/* 167AC4 80247264 00021603 */  sra       $v0, $v0, 24
/* 167AC8 80247268 0043102A */  slt       $v0, $v0, $v1
/* 167ACC 8024726C 92430006 */  lbu       $v1, 0x6($s2)
D_80247270:
/* 167AD0 80247270 14400002 */  bnez      $v0, .L8024727C
/* 167AD4 80247274 2462FFFF */   addiu    $v0, $v1, -0x1
jtbl_80247278:
/* 167AD8 80247278 A2420002 */  sb        $v0, 0x2($s2)
.L8024727C:
/* 167ADC 8024727C 82420004 */  lb        $v0, 0x4($s2)
/* 167AE0 80247280 82430005 */  lb        $v1, 0x5($s2)
/* 167AE4 80247284 00430018 */  mult      $v0, $v1
.L80247288:
/* 167AE8 80247288 00003812 */  mflo      $a3
.L8024728C:
/* 167AEC 8024728C 82420006 */  lb        $v0, 0x6($s2)
.L80247290:
/* 167AF0 80247290 00000000 */  nop
.L80247294:
/* 167AF4 80247294 00E20018 */  mult      $a3, $v0
glabel func_80247298
/* 167AF8 80247298 00002012 */  mflo      $a0
/* 167AFC 8024729C 82420002 */  lb        $v0, 0x2($s2)
/* 167B00 802472A0 00000000 */  nop
glabel func_802472A4
/* 167B04 802472A4 00620018 */  mult      $v1, $v0
glabel func_802472A8
/* 167B08 802472A8 00001812 */  mflo      $v1
D_802472AC:
/* 167B0C 802472AC 00831821 */  addu      $v1, $a0, $v1
glabel func_802472B0
/* 167B10 802472B0 82440001 */  lb        $a0, 0x1($s2)
/* 167B14 802472B4 8E420008 */  lw        $v0, 0x8($s2)
/* 167B18 802472B8 00641821 */  addu      $v1, $v1, $a0
/* 167B1C 802472BC 00431021 */  addu      $v0, $v0, $v1
/* 167B20 802472C0 90420000 */  lbu       $v0, 0x0($v0)
D_802472C4:
/* 167B24 802472C4 A2420003 */  sb        $v0, 0x3($s2)
/* 167B28 802472C8 304200FF */  andi      $v0, $v0, 0xFF
/* 167B2C 802472CC 10A20003 */  beq       $a1, $v0, .L802472DC
/* 167B30 802472D0 00000000 */   nop
/* 167B34 802472D4 0C05272D */  jal       sfx_play_sound
.L802472D8:
/* 167B38 802472D8 240400C7 */   addiu    $a0, $zero, 0xC7
.L802472DC:
/* 167B3C 802472DC 3C108025 */  lui       $s0, %hi(D_8024C084)
.L802472E0:
/* 167B40 802472E0 2610C084 */  addiu     $s0, $s0, %lo(D_8024C084)
.L802472E4:
/* 167B44 802472E4 8E020000 */  lw        $v0, 0x0($s0)
/* 167B48 802472E8 30421000 */  andi      $v0, $v0, 0x1000
/* 167B4C 802472EC 10400009 */  beqz      $v0, .L80247314
/* 167B50 802472F0 24020004 */   addiu    $v0, $zero, 0x4
.L802472F4:
/* 167B54 802472F4 82430004 */  lb        $v1, 0x4($s2)
/* 167B58 802472F8 14620006 */  bne       $v1, $v0, .L80247314
/* 167B5C 802472FC 0240202D */   daddu    $a0, $s2, $zero
/* 167B60 80247300 0000282D */  daddu     $a1, $zero, $zero
/* 167B64 80247304 0C090B65 */  jal       func_80242D94
.L80247308:
/* 167B68 80247308 00A0302D */   daddu    $a2, $a1, $zero
/* 167B6C 8024730C 34028000 */  ori       $v0, $zero, 0x8000
D_80247310:
/* 167B70 80247310 AE020000 */  sw        $v0, 0x0($s0)
.L80247314:
/* 167B74 80247314 3C028025 */  lui       $v0, %hi(D_8024C084)
.L80247318:
/* 167B78 80247318 8C42C084 */  lw        $v0, %lo(D_8024C084)($v0)
.L8024731C:
/* 167B7C 8024731C 30428000 */  andi      $v0, $v0, 0x8000
/* 167B80 80247320 10400225 */  beqz      $v0, D_80247BB8
/* 167B84 80247324 00000000 */   nop
/* 167B88 80247328 0C05272D */  jal       sfx_play_sound
/* 167B8C 8024732C 240400C9 */   addiu    $a0, $zero, 0xC9
.L80247330:
/* 167B90 80247330 92430003 */  lbu       $v1, 0x3($s2)
/* 167B94 80247334 10600005 */  beqz      $v1, .L8024734C
glabel func_80247338
/* 167B98 80247338 24020001 */   addiu    $v0, $zero, 0x1
D_8024733C:
/* 167B9C 8024733C 106201D8 */  beq       $v1, $v0, D_80247AA0
/* 167BA0 80247340 00000000 */   nop
D_80247344:
/* 167BA4 80247344 08091EEE */  j         D_80247BB8
/* 167BA8 80247348 00000000 */   nop
.L8024734C:
/* 167BAC 8024734C 82430004 */  lb        $v1, 0x4($s2)
/* 167BB0 80247350 2C620005 */  sltiu     $v0, $v1, 0x5
.L80247354:
/* 167BB4 80247354 10400218 */  beqz      $v0, D_80247BB8
/* 167BB8 80247358 00031080 */   sll      $v0, $v1, 2
/* 167BBC 8024735C 3C018025 */  lui       $at, %hi(jtbl_8024C018)
D_80247360:
/* 167BC0 80247360 00220821 */  addu      $at, $at, $v0
/* 167BC4 80247364 8C22C018 */  lw        $v0, %lo(jtbl_8024C018)($at)
.L80247368:
/* 167BC8 80247368 00400008 */  jr        $v0
.L8024736C:
/* 167BCC 8024736C 00000000 */   nop
glabel .L80247370
/* 167BD0 80247370 24020002 */  addiu     $v0, $zero, 0x2
/* 167BD4 80247374 3C038025 */  lui       $v1, %hi(D_80249B8C)
/* 167BD8 80247378 8C639B8C */  lw        $v1, %lo(D_80249B8C)($v1)
.L8024737C:
/* 167BDC 8024737C 3C048016 */  lui       $a0, %hi(gWindows)
.L80247380:
/* 167BE0 80247380 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
/* 167BE4 80247384 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 167BE8 80247388 A022C098 */  sb        $v0, %lo(D_8024C098_C09918)($at)
/* 167BEC 8024738C 240200B6 */  addiu     $v0, $zero, 0xB6
D_80247390:
/* 167BF0 80247390 A0600004 */  sb        $zero, 0x4($v1)
.L80247394:
/* 167BF4 80247394 808305E3 */  lb        $v1, 0x5E3($a0)
/* 167BF8 80247398 A48205F0 */  sh        $v0, 0x5F0($a0)
/* 167BFC 8024739C 24020019 */  addiu     $v0, $zero, 0x19
/* 167C00 802473A0 A48205F2 */  sh        $v0, 0x5F2($a0)
/* 167C04 802473A4 2402FFFF */  addiu     $v0, $zero, -0x1
/* 167C08 802473A8 1062000B */  beq       $v1, $v0, D_802473D8
.L802473AC:
/* 167C0C 802473AC 248505EC */   addiu    $a1, $a0, 0x5EC
D_802473B0:
/* 167C10 802473B0 00031140 */  sll       $v0, $v1, 5
D_802473B4:
/* 167C14 802473B4 00441021 */  addu      $v0, $v0, $a0
.L802473B8:
/* 167C18 802473B8 94420010 */  lhu       $v0, 0x10($v0)
/* 167C1C 802473BC 00021400 */  sll       $v0, $v0, 16
D_802473C0:
/* 167C20 802473C0 00021C03 */  sra       $v1, $v0, 16
.L802473C4:
/* 167C24 802473C4 000217C2 */  srl       $v0, $v0, 31
D_802473C8:
/* 167C28 802473C8 00621821 */  addu      $v1, $v1, $v0
/* 167C2C 802473CC 00031843 */  sra       $v1, $v1, 1
.L802473D0:
/* 167C30 802473D0 08091CF9 */  j         .L802473E4
/* 167C34 802473D4 2463FFA5 */   addiu    $v1, $v1, -0x5B
D_802473D8:
/* 167C38 802473D8 24030045 */  addiu     $v1, $zero, 0x45
D_802473DC:
/* 167C3C 802473DC 3C048016 */  lui       $a0, %hi(gWindows)
D_802473E0:
/* 167C40 802473E0 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
.L802473E4:
/* 167C44 802473E4 A4A30000 */  sh        $v1, 0x0($a1)
D_802473E8:
/* 167C48 802473E8 948205F2 */  lhu       $v0, 0x5F2($a0)
.L802473EC:
/* 167C4C 802473EC 00021400 */  sll       $v0, $v0, 16
D_802473F0:
/* 167C50 802473F0 00021C03 */  sra       $v1, $v0, 16
/* 167C54 802473F4 000217C2 */  srl       $v0, $v0, 31
D_802473F8:
/* 167C58 802473F8 00621821 */  addu      $v1, $v1, $v0
/* 167C5C 802473FC 00032843 */  sra       $a1, $v1, 1
D_80247400:
/* 167C60 80247400 808305E3 */  lb        $v1, 0x5E3($a0)
/* 167C64 80247404 2402FFFF */  addiu     $v0, $zero, -0x1
D_80247408:
/* 167C68 80247408 1062000B */  beq       $v1, $v0, D_80247438
/* 167C6C 8024740C 248605EE */   addiu    $a2, $a0, 0x5EE
D_80247410:
/* 167C70 80247410 00031140 */  sll       $v0, $v1, 5
.L80247414:
/* 167C74 80247414 00441021 */  addu      $v0, $v0, $a0
D_80247418:
/* 167C78 80247418 94420012 */  lhu       $v0, 0x12($v0)
/* 167C7C 8024741C 00021400 */  sll       $v0, $v0, 16
D_80247420:
/* 167C80 80247420 00021C03 */  sra       $v1, $v0, 16
/* 167C84 80247424 000217C2 */  srl       $v0, $v0, 31
D_80247428:
/* 167C88 80247428 00621821 */  addu      $v1, $v1, $v0
/* 167C8C 8024742C 00031843 */  sra       $v1, $v1, 1
D_80247430:
/* 167C90 80247430 08091D10 */  j         jtbl_80247440
.L80247434:
/* 167C94 80247434 00651023 */   subu     $v0, $v1, $a1
D_80247438:
/* 167C98 80247438 24020078 */  addiu     $v0, $zero, 0x78
/* 167C9C 8024743C 00451023 */  subu      $v0, $v0, $a1
jtbl_80247440:
/* 167CA0 80247440 2404002F */  addiu     $a0, $zero, 0x2F
D_80247444:
/* 167CA4 80247444 24050001 */  addiu     $a1, $zero, 0x1
D_80247448:
/* 167CA8 80247448 0C051F9F */  jal       set_window_update
/* 167CAC 8024744C A4C20000 */   sh       $v0, 0x0($a2)
/* 167CB0 80247450 3C058024 */  lui       $a1, %hi(func_80243EEC)
/* 167CB4 80247454 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
D_80247458:
/* 167CB8 80247458 0C051F9F */  jal       set_window_update
/* 167CBC 8024745C 24040032 */   addiu    $a0, $zero, 0x32
/* 167CC0 80247460 0000202D */  daddu     $a0, $zero, $zero
/* 167CC4 80247464 3C028025 */  lui       $v0, %hi(D_80249B84)
/* 167CC8 80247468 8C429B84 */  lw        $v0, %lo(D_80249B84)($v0)
/* 167CCC 8024746C 3C068007 */  lui       $a2, %hi(gSaveSlotMetadata)
D_80247470:
/* 167CD0 80247470 24C679C4 */  addiu     $a2, $a2, %lo(gSaveSlotMetadata)
/* 167CD4 80247474 90500003 */  lbu       $s0, 0x3($v0)
/* 167CD8 80247478 240500F7 */  addiu     $a1, $zero, 0xF7
/* 167CDC 8024747C 00101040 */  sll       $v0, $s0, 1
.L80247480:
/* 167CE0 80247480 00501021 */  addu      $v0, $v0, $s0
D_80247484:
/* 167CE4 80247484 000218C0 */  sll       $v1, $v0, 3
D_80247488:
/* 167CE8 80247488 00831021 */  addu      $v0, $a0, $v1
.L8024748C:
/* 167CEC 8024748C 00461021 */  addu      $v0, $v0, $a2
/* 167CF0 80247490 A0450007 */  sb        $a1, 0x7($v0)
/* 167CF4 80247494 24840001 */  addiu     $a0, $a0, 0x1
/* 167CF8 80247498 28820008 */  slti      $v0, $a0, 0x8
D_8024749C:
/* 167CFC 8024749C 1440FFFB */  bnez      $v0, .L8024748C
D_802474A0:
/* 167D00 802474A0 00831021 */   addu     $v0, $a0, $v1
.L802474A4:
/* 167D04 802474A4 0200202D */  daddu     $a0, $s0, $zero
/* 167D08 802474A8 3C038007 */  lui       $v1, %hi(gSaveSlotMetadata)
/* 167D0C 802474AC 246379C4 */  addiu     $v1, $v1, %lo(gSaveSlotMetadata)
D_802474B0:
/* 167D10 802474B0 00101040 */  sll       $v0, $s0, 1
/* 167D14 802474B4 00501021 */  addu      $v0, $v0, $s0
/* 167D18 802474B8 000210C0 */  sll       $v0, $v0, 3
/* 167D1C 802474BC 00431021 */  addu      $v0, $v0, $v1
jtbl_802474C0:
/* 167D20 802474C0 A0400006 */  sb        $zero, 0x6($v0)
/* 167D24 802474C4 AC400000 */  sw        $zero, 0x0($v0)
D_802474C8:
/* 167D28 802474C8 0C00AD0B */  jal       fio_erase_game
.L802474CC:
/* 167D2C 802474CC A0400004 */   sb       $zero, 0x4($v0)
glabel func_802474D0
/* 167D30 802474D0 3C018007 */  lui       $at, %hi(gSaveSlotHasData)
.L802474D4:
/* 167D34 802474D4 00300821 */  addu      $at, $at, $s0
D_802474D8:
/* 167D38 802474D8 A0207A24 */  sb        $zero, %lo(gSaveSlotHasData)($at)
D_802474DC:
/* 167D3C 802474DC 08091EEE */  j         D_80247BB8
D_802474E0:
/* 167D40 802474E0 00000000 */   nop
glabel .L802474E4
/* 167D44 802474E4 24020002 */  addiu     $v0, $zero, 0x2
jtbl_802474E8:
/* 167D48 802474E8 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 167D4C 802474EC A022C098 */  sb        $v0, %lo(D_8024C098_C09918)($at)
.L802474F0:
/* 167D50 802474F0 24020002 */  addiu     $v0, $zero, 0x2
D_802474F4:
/* 167D54 802474F4 3C048016 */  lui       $a0, %hi(gWindows)
/* 167D58 802474F8 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
/* 167D5C 802474FC 3C038025 */  lui       $v1, %hi(D_80249B8C)
D_80247500:
/* 167D60 80247500 8C639B8C */  lw        $v1, %lo(D_80249B8C)($v1)
/* 167D64 80247504 A0620004 */  sb        $v0, 0x4($v1)
glabel func_80247508
/* 167D68 80247508 808305E3 */  lb        $v1, 0x5E3($a0)
/* 167D6C 8024750C 2402009A */  addiu     $v0, $zero, 0x9A
/* 167D70 80247510 A48205F0 */  sh        $v0, 0x5F0($a0)
/* 167D74 80247514 24020027 */  addiu     $v0, $zero, 0x27
/* 167D78 80247518 A48205F2 */  sh        $v0, 0x5F2($a0)
/* 167D7C 8024751C 2402FFFF */  addiu     $v0, $zero, -0x1
/* 167D80 80247520 1062000B */  beq       $v1, $v0, .L80247550
/* 167D84 80247524 248505EC */   addiu    $a1, $a0, 0x5EC
/* 167D88 80247528 00031140 */  sll       $v0, $v1, 5
D_8024752C:
/* 167D8C 8024752C 00441021 */  addu      $v0, $v0, $a0
/* 167D90 80247530 94420010 */  lhu       $v0, 0x10($v0)
/* 167D94 80247534 00021400 */  sll       $v0, $v0, 16
.L80247538:
/* 167D98 80247538 00021C03 */  sra       $v1, $v0, 16
/* 167D9C 8024753C 000217C2 */  srl       $v0, $v0, 31
/* 167DA0 80247540 00621821 */  addu      $v1, $v1, $v0
/* 167DA4 80247544 00031843 */  sra       $v1, $v1, 1
D_80247548:
/* 167DA8 80247548 08091D57 */  j         .L8024755C
.L8024754C:
/* 167DAC 8024754C 2463FFB3 */   addiu    $v1, $v1, -0x4D
.L80247550:
/* 167DB0 80247550 24030053 */  addiu     $v1, $zero, 0x53
.L80247554:
/* 167DB4 80247554 3C048016 */  lui       $a0, %hi(gWindows)
D_80247558:
/* 167DB8 80247558 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
.L8024755C:
/* 167DBC 8024755C A4A30000 */  sh        $v1, 0x0($a1)
/* 167DC0 80247560 948205F2 */  lhu       $v0, 0x5F2($a0)
/* 167DC4 80247564 00021400 */  sll       $v0, $v0, 16
glabel func_80247568
/* 167DC8 80247568 00021C03 */  sra       $v1, $v0, 16
/* 167DCC 8024756C 000217C2 */  srl       $v0, $v0, 31
glabel func_80247570
/* 167DD0 80247570 00621821 */  addu      $v1, $v1, $v0
/* 167DD4 80247574 00032843 */  sra       $a1, $v1, 1
/* 167DD8 80247578 808305E3 */  lb        $v1, 0x5E3($a0)
/* 167DDC 8024757C 2402FFFF */  addiu     $v0, $zero, -0x1
/* 167DE0 80247580 1062000B */  beq       $v1, $v0, D_802475B0
D_80247584:
/* 167DE4 80247584 248605EE */   addiu    $a2, $a0, 0x5EE
D_80247588:
/* 167DE8 80247588 00031140 */  sll       $v0, $v1, 5
/* 167DEC 8024758C 00441021 */  addu      $v0, $v0, $a0
/* 167DF0 80247590 94420012 */  lhu       $v0, 0x12($v0)
/* 167DF4 80247594 00021400 */  sll       $v0, $v0, 16
/* 167DF8 80247598 00021C03 */  sra       $v1, $v0, 16
/* 167DFC 8024759C 000217C2 */  srl       $v0, $v0, 31
/* 167E00 802475A0 00621821 */  addu      $v1, $v1, $v0
D_802475A4:
/* 167E04 802475A4 00031843 */  sra       $v1, $v1, 1
/* 167E08 802475A8 08091D6E */  j         .L802475B8
/* 167E0C 802475AC 00651023 */   subu     $v0, $v1, $a1
D_802475B0:
/* 167E10 802475B0 24020078 */  addiu     $v0, $zero, 0x78
/* 167E14 802475B4 00451023 */  subu      $v0, $v0, $a1
.L802475B8:
/* 167E18 802475B8 2404002F */  addiu     $a0, $zero, 0x2F
/* 167E1C 802475BC 24050001 */  addiu     $a1, $zero, 0x1
.L802475C0:
/* 167E20 802475C0 0C051F9F */  jal       set_window_update
/* 167E24 802475C4 A4C20000 */   sh       $v0, 0x0($a2)
/* 167E28 802475C8 3C058024 */  lui       $a1, %hi(func_80243EEC)
glabel .L802475CC
/* 167E2C 802475CC 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
D_802475D0:
/* 167E30 802475D0 0C051F9F */  jal       set_window_update
/* 167E34 802475D4 24040032 */   addiu    $a0, $zero, 0x32
.L802475D8:
/* 167E38 802475D8 3C118025 */  lui       $s1, %hi(D_8024C094)
D_802475DC:
/* 167E3C 802475DC 2631C094 */  addiu     $s1, $s1, %lo(D_8024C094)
D_802475E0:
/* 167E40 802475E0 0C00ACB4 */  jal       fio_load_game
D_802475E4:
/* 167E44 802475E4 8E240000 */   lw       $a0, 0x0($s1)
D_802475E8:
/* 167E48 802475E8 3C108025 */  lui       $s0, %hi(filemenu_iterFileIdx)
/* 167E4C 802475EC 2610C080 */  addiu     $s0, $s0, %lo(filemenu_iterFileIdx)
/* 167E50 802475F0 3C068007 */  lui       $a2, %hi(gSaveSlotMetadata)
/* 167E54 802475F4 24C679C4 */  addiu     $a2, $a2, %lo(gSaveSlotMetadata)
/* 167E58 802475F8 8E040000 */  lw        $a0, 0x0($s0)
/* 167E5C 802475FC 8E250000 */  lw        $a1, 0x0($s1)
/* 167E60 80247600 0080102D */  daddu     $v0, $a0, $zero
/* 167E64 80247604 00021840 */  sll       $v1, $v0, 1
/* 167E68 80247608 00621821 */  addu      $v1, $v1, $v0
/* 167E6C 8024760C 000318C0 */  sll       $v1, $v1, 3
D_80247610:
/* 167E70 80247610 00661821 */  addu      $v1, $v1, $a2
.L80247614:
/* 167E74 80247614 00051040 */  sll       $v0, $a1, 1
D_80247618:
/* 167E78 80247618 00451021 */  addu      $v0, $v0, $a1
/* 167E7C 8024761C 000210C0 */  sll       $v0, $v0, 3
jtbl_80247620:
/* 167E80 80247620 00461021 */  addu      $v0, $v0, $a2
/* 167E84 80247624 8C480000 */  lw        $t0, 0x0($v0)
D_80247628:
/* 167E88 80247628 8C490004 */  lw        $t1, 0x4($v0)
/* 167E8C 8024762C 8C4A0008 */  lw        $t2, 0x8($v0)
/* 167E90 80247630 8C4B000C */  lw        $t3, 0xC($v0)
/* 167E94 80247634 AC680000 */  sw        $t0, 0x0($v1)
/* 167E98 80247638 AC690004 */  sw        $t1, 0x4($v1)
/* 167E9C 8024763C AC6A0008 */  sw        $t2, 0x8($v1)
/* 167EA0 80247640 AC6B000C */  sw        $t3, 0xC($v1)
/* 167EA4 80247644 8C480010 */  lw        $t0, 0x10($v0)
D_80247648:
/* 167EA8 80247648 8C490014 */  lw        $t1, 0x14($v0)
.L8024764C:
/* 167EAC 8024764C AC680010 */  sw        $t0, 0x10($v1)
/* 167EB0 80247650 0C00ACDD */  jal       fio_save_game
/* 167EB4 80247654 AC690014 */   sw       $t1, 0x14($v1)
/* 167EB8 80247658 8E030000 */  lw        $v1, 0x0($s0)
/* 167EBC 8024765C 08091DF9 */  j         D_802477E4
/* 167EC0 80247660 24020001 */   addiu    $v0, $zero, 0x1
glabel D_80247664
/* 167EC4 80247664 24020002 */  addiu     $v0, $zero, 0x2
.L80247668:
/* 167EC8 80247668 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 167ECC 8024766C A022C098 */  sb        $v0, %lo(D_8024C098_C09918)($at)
jtbl_80247670:
/* 167ED0 80247670 24020001 */  addiu     $v0, $zero, 0x1
/* 167ED4 80247674 3C048016 */  lui       $a0, %hi(gWindows)
D_80247678:
/* 167ED8 80247678 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
/* 167EDC 8024767C 3C038025 */  lui       $v1, %hi(D_80249B8C)
D_80247680:
/* 167EE0 80247680 8C639B8C */  lw        $v1, %lo(D_80249B8C)($v1)
/* 167EE4 80247684 A0620004 */  sb        $v0, 0x4($v1)
D_80247688:
/* 167EE8 80247688 808305E3 */  lb        $v1, 0x5E3($a0)
D_8024768C:
/* 167EEC 8024768C 24020099 */  addiu     $v0, $zero, 0x99
D_80247690:
/* 167EF0 80247690 A48205F0 */  sh        $v0, 0x5F0($a0)
/* 167EF4 80247694 24020019 */  addiu     $v0, $zero, 0x19
D_80247698:
/* 167EF8 80247698 A48205F2 */  sh        $v0, 0x5F2($a0)
D_8024769C:
/* 167EFC 8024769C 2402FFFF */  addiu     $v0, $zero, -0x1
D_802476A0:
/* 167F00 802476A0 1062000B */  beq       $v1, $v0, .L802476D0
.L802476A4:
/* 167F04 802476A4 248505EC */   addiu    $a1, $a0, 0x5EC
/* 167F08 802476A8 00031140 */  sll       $v0, $v1, 5
/* 167F0C 802476AC 00441021 */  addu      $v0, $v0, $a0
/* 167F10 802476B0 94420010 */  lhu       $v0, 0x10($v0)
/* 167F14 802476B4 00021400 */  sll       $v0, $v0, 16
/* 167F18 802476B8 00021C03 */  sra       $v1, $v0, 16
/* 167F1C 802476BC 000217C2 */  srl       $v0, $v0, 31
/* 167F20 802476C0 00621821 */  addu      $v1, $v1, $v0
.L802476C4:
/* 167F24 802476C4 00031843 */  sra       $v1, $v1, 1
/* 167F28 802476C8 08091DB7 */  j         D_802476DC
.L802476CC:
/* 167F2C 802476CC 2463FFB4 */   addiu    $v1, $v1, -0x4C
.L802476D0:
/* 167F30 802476D0 24030054 */  addiu     $v1, $zero, 0x54
/* 167F34 802476D4 3C048016 */  lui       $a0, %hi(gWindows)
D_802476D8:
/* 167F38 802476D8 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
D_802476DC:
/* 167F3C 802476DC A4A30000 */  sh        $v1, 0x0($a1)
/* 167F40 802476E0 948205F2 */  lhu       $v0, 0x5F2($a0)
/* 167F44 802476E4 00021400 */  sll       $v0, $v0, 16
/* 167F48 802476E8 00021C03 */  sra       $v1, $v0, 16
/* 167F4C 802476EC 000217C2 */  srl       $v0, $v0, 31
/* 167F50 802476F0 00621821 */  addu      $v1, $v1, $v0
D_802476F4:
/* 167F54 802476F4 00032843 */  sra       $a1, $v1, 1
/* 167F58 802476F8 808305E3 */  lb        $v1, 0x5E3($a0)
D_802476FC:
/* 167F5C 802476FC 2402FFFF */  addiu     $v0, $zero, -0x1
/* 167F60 80247700 1062000B */  beq       $v1, $v0, .L80247730
/* 167F64 80247704 248605EE */   addiu    $a2, $a0, 0x5EE
/* 167F68 80247708 00031140 */  sll       $v0, $v1, 5
/* 167F6C 8024770C 00441021 */  addu      $v0, $v0, $a0
/* 167F70 80247710 94420012 */  lhu       $v0, 0x12($v0)
/* 167F74 80247714 00021400 */  sll       $v0, $v0, 16
/* 167F78 80247718 00021C03 */  sra       $v1, $v0, 16
D_8024771C:
/* 167F7C 8024771C 000217C2 */  srl       $v0, $v0, 31
D_80247720:
/* 167F80 80247720 00621821 */  addu      $v1, $v1, $v0
/* 167F84 80247724 00031843 */  sra       $v1, $v1, 1
D_80247728:
/* 167F88 80247728 08091DCE */  j         D_80247738
D_8024772C:
/* 167F8C 8024772C 00651023 */   subu     $v0, $v1, $a1
.L80247730:
/* 167F90 80247730 24020078 */  addiu     $v0, $zero, 0x78
/* 167F94 80247734 00451023 */  subu      $v0, $v0, $a1
D_80247738:
/* 167F98 80247738 2404002F */  addiu     $a0, $zero, 0x2F
.L8024773C:
/* 167F9C 8024773C 24050001 */  addiu     $a1, $zero, 0x1
D_80247740:
/* 167FA0 80247740 0C051F9F */  jal       set_window_update
/* 167FA4 80247744 A4C20000 */   sh       $v0, 0x0($a2)
/* 167FA8 80247748 3C058024 */  lui       $a1, %hi(func_80243EEC)
/* 167FAC 8024774C 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
D_80247750:
/* 167FB0 80247750 0C051F9F */  jal       set_window_update
/* 167FB4 80247754 24040032 */   addiu    $a0, $zero, 0x32
/* 167FB8 80247758 3C108025 */  lui       $s0, %hi(D_80249B84)
.L8024775C:
/* 167FBC 8024775C 26109B84 */  addiu     $s0, $s0, %lo(D_80249B84)
/* 167FC0 80247760 8E020000 */  lw        $v0, 0x0($s0)
D_80247764:
/* 167FC4 80247764 90420003 */  lbu       $v0, 0x3($v0)
D_80247768:
/* 167FC8 80247768 3C058007 */  lui       $a1, %hi(gSaveSlotMetadata)
/* 167FCC 8024776C 24A579C4 */  addiu     $a1, $a1, %lo(gSaveSlotMetadata)
D_80247770:
/* 167FD0 80247770 00021840 */  sll       $v1, $v0, 1
/* 167FD4 80247774 00621821 */  addu      $v1, $v1, $v0
/* 167FD8 80247778 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 167FDC 8024777C 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
D_80247780:
/* 167FE0 80247780 000318C0 */  sll       $v1, $v1, 3
/* 167FE4 80247784 90440166 */  lbu       $a0, 0x166($v0)
D_80247788:
/* 167FE8 80247788 00651821 */  addu      $v1, $v1, $a1
/* 167FEC 8024778C 00041040 */  sll       $v0, $a0, 1
/* 167FF0 80247790 00441021 */  addu      $v0, $v0, $a0
D_80247794:
/* 167FF4 80247794 000210C0 */  sll       $v0, $v0, 3
/* 167FF8 80247798 00451021 */  addu      $v0, $v0, $a1
/* 167FFC 8024779C 8C480000 */  lw        $t0, 0x0($v0)
/* 168000 802477A0 8C490004 */  lw        $t1, 0x4($v0)
/* 168004 802477A4 8C4A0008 */  lw        $t2, 0x8($v0)
/* 168008 802477A8 8C4B000C */  lw        $t3, 0xC($v0)
/* 16800C 802477AC AC680000 */  sw        $t0, 0x0($v1)
D_802477B0:
/* 168010 802477B0 AC690004 */  sw        $t1, 0x4($v1)
D_802477B4:
/* 168014 802477B4 AC6A0008 */  sw        $t2, 0x8($v1)
D_802477B8:
/* 168018 802477B8 AC6B000C */  sw        $t3, 0xC($v1)
/* 16801C 802477BC 8C480010 */  lw        $t0, 0x10($v0)
D_802477C0:
/* 168020 802477C0 8C490014 */  lw        $t1, 0x14($v0)
.L802477C4:
/* 168024 802477C4 AC680010 */  sw        $t0, 0x10($v1)
D_802477C8:
/* 168028 802477C8 AC690014 */  sw        $t1, 0x14($v1)
D_802477CC:
/* 16802C 802477CC 8E020000 */  lw        $v0, 0x0($s0)
/* 168030 802477D0 0C00ACDD */  jal       fio_save_game
D_802477D4:
/* 168034 802477D4 90440003 */   lbu      $a0, 0x3($v0)
/* 168038 802477D8 8E020000 */  lw        $v0, 0x0($s0)
/* 16803C 802477DC 90430003 */  lbu       $v1, 0x3($v0)
D_802477E0:
/* 168040 802477E0 24020001 */  addiu     $v0, $zero, 0x1
D_802477E4:
/* 168044 802477E4 3C018007 */  lui       $at, %hi(gSaveSlotHasData)
D_802477E8:
/* 168048 802477E8 00230821 */  addu      $at, $at, $v1
D_802477EC:
/* 16804C 802477EC A0227A24 */  sb        $v0, %lo(gSaveSlotHasData)($at)
.L802477F0:
/* 168050 802477F0 08091EEE */  j         D_80247BB8
/* 168054 802477F4 00000000 */   nop
glabel .L802477F8
/* 168058 802477F8 0C039CE8 */  jal       clear_player_data
/* 16805C 802477FC 00000000 */   nop
D_80247800:
/* 168060 80247800 0C0514C8 */  jal       clear_saved_variables
/* 168064 80247804 00000000 */   nop
D_80247808:
/* 168068 80247808 0000202D */  daddu     $a0, $zero, $zero
/* 16806C 8024780C 3C05F5DE */  lui       $a1, (0xF5DE0180 >> 16)
/* 168070 80247810 34A50180 */  ori       $a1, $a1, (0xF5DE0180 & 0xFFFF)
/* 168074 80247814 2406FF80 */  addiu     $a2, $zero, -0x80
/* 168078 80247818 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 16807C 8024781C 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
.L80247820:
/* 168080 80247820 2402000B */  addiu     $v0, $zero, 0xB
.L80247824:
/* 168084 80247824 A4600086 */  sh        $zero, 0x86($v1)
/* 168088 80247828 A462008C */  sh        $v0, 0x8C($v1)
/* 16808C 8024782C 0C0B2026 */  jal       evt_set_variable
/* 168090 80247830 A460008E */   sh       $zero, 0x8E($v1)
/* 168094 80247834 0000202D */  daddu     $a0, $zero, $zero
/* 168098 80247838 3C028025 */  lui       $v0, %hi(D_80249B84)
/* 16809C 8024783C 8C429B84 */  lw        $v0, %lo(D_80249B84)($v0)
D_80247840:
/* 1680A0 80247840 3C078007 */  lui       $a3, %hi(gSaveSlotMetadata)
/* 1680A4 80247844 24E779C4 */  addiu     $a3, $a3, %lo(gSaveSlotMetadata)
/* 1680A8 80247848 90510003 */  lbu       $s1, 0x3($v0)
.L8024784C:
/* 1680AC 8024784C 3C068025 */  lui       $a2, %hi(D_8024C110)
/* 1680B0 80247850 24C6C110 */  addiu     $a2, $a2, %lo(D_8024C110)
/* 1680B4 80247854 00111040 */  sll       $v0, $s1, 1
/* 1680B8 80247858 00511021 */  addu      $v0, $v0, $s1
/* 1680BC 8024785C 000228C0 */  sll       $a1, $v0, 3
/* 1680C0 80247860 00851021 */  addu      $v0, $a0, $a1
.L80247864:
/* 1680C4 80247864 00861821 */  addu      $v1, $a0, $a2
/* 1680C8 80247868 24840001 */  addiu     $a0, $a0, 0x1
/* 1680CC 8024786C 90630000 */  lbu       $v1, 0x0($v1)
D_80247870:
/* 1680D0 80247870 00471021 */  addu      $v0, $v0, $a3
/* 1680D4 80247874 A0430007 */  sb        $v1, 0x7($v0)
D_80247878:
/* 1680D8 80247878 28820008 */  slti      $v0, $a0, 0x8
D_8024787C:
/* 1680DC 8024787C 1440FFF9 */  bnez      $v0, .L80247864
D_80247880:
/* 1680E0 80247880 00851021 */   addu     $v0, $a0, $a1
/* 1680E4 80247884 0C00ACDD */  jal       fio_save_game
D_80247888:
/* 1680E8 80247888 0220202D */   daddu    $a0, $s1, $zero
/* 1680EC 8024788C 24040030 */  addiu     $a0, $zero, 0x30
/* 1680F0 80247890 3C108024 */  lui       $s0, %hi(D_80243628)
/* 1680F4 80247894 26103628 */  addiu     $s0, $s0, %lo(D_80243628)
/* 1680F8 80247898 24020001 */  addiu     $v0, $zero, 0x1
.L8024789C:
/* 1680FC 8024789C 3C018007 */  lui       $at, %hi(gSaveSlotHasData)
/* 168100 802478A0 00310821 */  addu      $at, $at, $s1
/* 168104 802478A4 A0227A24 */  sb        $v0, %lo(gSaveSlotHasData)($at)
/* 168108 802478A8 0C051F9F */  jal       set_window_update
/* 16810C 802478AC 0200282D */   daddu    $a1, $s0, $zero
/* 168110 802478B0 24040031 */  addiu     $a0, $zero, 0x31
.L802478B4:
/* 168114 802478B4 0C051F9F */  jal       set_window_update
D_802478B8:
/* 168118 802478B8 0200282D */   daddu    $a1, $s0, $zero
/* 16811C 802478BC 2404002D */  addiu     $a0, $zero, 0x2D
D_802478C0:
/* 168120 802478C0 3C108024 */  lui       $s0, %hi(func_8024381C)
/* 168124 802478C4 2610381C */  addiu     $s0, $s0, %lo(func_8024381C)
D_802478C8:
/* 168128 802478C8 0C051F9F */  jal       set_window_update
/* 16812C 802478CC 0200282D */   daddu    $a1, $s0, $zero
/* 168130 802478D0 24040033 */  addiu     $a0, $zero, 0x33
/* 168134 802478D4 0C051F9F */  jal       set_window_update
/* 168138 802478D8 0200282D */   daddu    $a1, $s0, $zero
/* 16813C 802478DC 24040034 */  addiu     $a0, $zero, 0x34
/* 168140 802478E0 0C051F9F */  jal       set_window_update
.L802478E4:
/* 168144 802478E4 0200282D */   daddu    $a1, $s0, $zero
D_802478E8:
/* 168148 802478E8 24040035 */  addiu     $a0, $zero, 0x35
/* 16814C 802478EC 0C051F9F */  jal       set_window_update
/* 168150 802478F0 0200282D */   daddu    $a1, $s0, $zero
/* 168154 802478F4 24040036 */  addiu     $a0, $zero, 0x36
/* 168158 802478F8 0C051F9F */  jal       set_window_update
/* 16815C 802478FC 0200282D */   daddu    $a1, $s0, $zero
D_80247900:
/* 168160 80247900 24040037 */  addiu     $a0, $zero, 0x37
/* 168164 80247904 0C051F9F */  jal       set_window_update
/* 168168 80247908 0200282D */   daddu    $a1, $s0, $zero
/* 16816C 8024790C 24040035 */  addiu     $a0, $zero, 0x35
/* 168170 80247910 0C051F9F */  jal       set_window_update
/* 168174 80247914 0200282D */   daddu    $a1, $s0, $zero
/* 168178 80247918 24040038 */  addiu     $a0, $zero, 0x38
glabel .L8024791C
/* 16817C 8024791C 0C051F9F */  jal       set_window_update
/* 168180 80247920 0200282D */   daddu    $a1, $s0, $zero
glabel .L80247924
/* 168184 80247924 24040039 */  addiu     $a0, $zero, 0x39
/* 168188 80247928 0C051F9F */  jal       set_window_update
D_8024792C:
/* 16818C 8024792C 0200282D */   daddu    $a1, $s0, $zero
/* 168190 80247930 2404003A */  addiu     $a0, $zero, 0x3A
glabel .L80247934
/* 168194 80247934 0C051F9F */  jal       set_window_update
rodata_alignment:
/* 168198 80247938 0200282D */   daddu    $a1, $s0, $zero
glabel .L8024793C
/* 16819C 8024793C 2404003B */  addiu     $a0, $zero, 0x3B
D_80247940:
/* 1681A0 80247940 0C051F9F */  jal       set_window_update
glabel .L80247944
/* 1681A4 80247944 0200282D */   daddu    $a1, $s0, $zero
/* 1681A8 80247948 3C058024 */  lui       $a1, %hi(func_80243EEC)
glabel .L8024794C
/* 1681AC 8024794C 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
D_80247950:
/* 1681B0 80247950 0C051F9F */  jal       set_window_update
/* 1681B4 80247954 24040032 */   addiu    $a0, $zero, 0x32
D_80247958:
/* 1681B8 80247958 24020002 */  addiu     $v0, $zero, 0x2
.L8024795C:
/* 1681BC 8024795C 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
D_80247960:
/* 1681C0 80247960 A022C098 */  sb        $v0, %lo(D_8024C098_C09918)($at)
/* 1681C4 80247964 24020003 */  addiu     $v0, $zero, 0x3
jtbl_80247968:
/* 1681C8 80247968 3C048016 */  lui       $a0, %hi(gWindows)
D_8024796C:
/* 1681CC 8024796C 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
glabel .L80247970
/* 1681D0 80247970 3C038025 */  lui       $v1, %hi(D_80249B8C)
/* 1681D4 80247974 8C639B8C */  lw        $v1, %lo(D_80249B8C)($v1)
/* 1681D8 80247978 A0620004 */  sb        $v0, 0x4($v1)
D_8024797C:
/* 1681DC 8024797C 808305E3 */  lb        $v1, 0x5E3($a0)
D_80247980:
/* 1681E0 80247980 240200B8 */  addiu     $v0, $zero, 0xB8
D_80247984:
/* 1681E4 80247984 A48205F0 */  sh        $v0, 0x5F0($a0)
/* 1681E8 80247988 24020019 */  addiu     $v0, $zero, 0x19
/* 1681EC 8024798C A48205F2 */  sh        $v0, 0x5F2($a0)
/* 1681F0 80247990 2402FFFF */  addiu     $v0, $zero, -0x1
/* 1681F4 80247994 1062000B */  beq       $v1, $v0, .L802479C4
/* 1681F8 80247998 248505EC */   addiu    $a1, $a0, 0x5EC
/* 1681FC 8024799C 00031140 */  sll       $v0, $v1, 5
/* 168200 802479A0 00441021 */  addu      $v0, $v0, $a0
glabel .L802479A4
/* 168204 802479A4 94420010 */  lhu       $v0, 0x10($v0)
D_802479A8:
/* 168208 802479A8 00021400 */  sll       $v0, $v0, 16
/* 16820C 802479AC 00021C03 */  sra       $v1, $v0, 16
D_802479B0:
/* 168210 802479B0 000217C2 */  srl       $v0, $v0, 31
/* 168214 802479B4 00621821 */  addu      $v1, $v1, $v0
D_802479B8:
/* 168218 802479B8 00031843 */  sra       $v1, $v1, 1
.L802479BC:
/* 16821C 802479BC 08091E74 */  j         jtbl_802479D0
D_802479C0:
/* 168220 802479C0 2463FFA4 */   addiu    $v1, $v1, -0x5C
.L802479C4:
/* 168224 802479C4 24030044 */  addiu     $v1, $zero, 0x44
D_802479C8:
/* 168228 802479C8 3C048016 */  lui       $a0, %hi(gWindows)
glabel .L802479CC
/* 16822C 802479CC 24849D50 */  addiu     $a0, $a0, %lo(gWindows)
jtbl_802479D0:
/* 168230 802479D0 A4A30000 */  sh        $v1, 0x0($a1)
/* 168234 802479D4 948205F2 */  lhu       $v0, 0x5F2($a0)
/* 168238 802479D8 00021400 */  sll       $v0, $v0, 16
/* 16823C 802479DC 00021C03 */  sra       $v1, $v0, 16
/* 168240 802479E0 000217C2 */  srl       $v0, $v0, 31
/* 168244 802479E4 00621821 */  addu      $v1, $v1, $v0
/* 168248 802479E8 00032843 */  sra       $a1, $v1, 1
/* 16824C 802479EC 808305E3 */  lb        $v1, 0x5E3($a0)
D_802479F0:
/* 168250 802479F0 2402FFFF */  addiu     $v0, $zero, -0x1
.L802479F4:
/* 168254 802479F4 1062000B */  beq       $v1, $v0, .L80247A24
/* 168258 802479F8 248605EE */   addiu    $a2, $a0, 0x5EE
D_802479FC:
/* 16825C 802479FC 00031140 */  sll       $v0, $v1, 5
D_80247A00:
/* 168260 80247A00 00441021 */  addu      $v0, $v0, $a0
/* 168264 80247A04 94420012 */  lhu       $v0, 0x12($v0)
/* 168268 80247A08 00021400 */  sll       $v0, $v0, 16
/* 16826C 80247A0C 00021C03 */  sra       $v1, $v0, 16
D_80247A10:
/* 168270 80247A10 000217C2 */  srl       $v0, $v0, 31
/* 168274 80247A14 00621821 */  addu      $v1, $v1, $v0
D_80247A18:
/* 168278 80247A18 00031843 */  sra       $v1, $v1, 1
/* 16827C 80247A1C 08091E8B */  j         .L80247A2C
D_80247A20:
/* 168280 80247A20 00651023 */   subu     $v0, $v1, $a1
.L80247A24:
/* 168284 80247A24 24020078 */  addiu     $v0, $zero, 0x78
jtbl_80247A28:
/* 168288 80247A28 00451023 */  subu      $v0, $v0, $a1
.L80247A2C:
/* 16828C 80247A2C A4C20000 */  sh        $v0, 0x0($a2)
D_80247A30:
/* 168290 80247A30 2404002F */  addiu     $a0, $zero, 0x2F
/* 168294 80247A34 08091EEC */  j         D_80247BB0_EE6570
D_80247A38:
/* 168298 80247A38 24050001 */   addiu    $a1, $zero, 0x1
glabel .L80247A3C
/* 16829C 80247A3C 3C05800E */  lui       $a1, %hi(D_800D95E8)
D_80247A40:
/* 1682A0 80247A40 24A595E8 */  addiu     $a1, $a1, %lo(D_800D95E8)
/* 1682A4 80247A44 24060001 */  addiu     $a2, $zero, 0x1
jtbl_80247A48:
/* 1682A8 80247A48 8CA20038 */  lw        $v0, 0x38($a1)
/* 1682AC 80247A4C 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 1682B0 80247A50 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 1682B4 80247A54 3C048025 */  lui       $a0, %hi(D_80249B84)
/* 1682B8 80247A58 8C849B84 */  lw        $a0, %lo(D_80249B84)($a0)
/* 1682BC 80247A5C 00C21023 */  subu      $v0, $a2, $v0
.L80247A60:
/* 1682C0 80247A60 906300AB */  lbu       $v1, 0xAB($v1)
/* 1682C4 80247A64 90900003 */  lbu       $s0, 0x3($a0)
/* 1682C8 80247A68 14620004 */  bne       $v1, $v0, .L80247A7C
/* 1682CC 80247A6C 00C31023 */   subu     $v0, $a2, $v1
D_80247A70:
/* 1682D0 80247A70 90A2003F */  lbu       $v0, 0x3F($a1)
/* 1682D4 80247A74 12020004 */  beq       $s0, $v0, .L80247A88
jtbl_80247A78:
/* 1682D8 80247A78 00C31023 */   subu     $v0, $a2, $v1
.L80247A7C:
/* 1682DC 80247A7C ACA20038 */  sw        $v0, 0x38($a1)
D_80247A80:
/* 1682E0 80247A80 0C00AC13 */  jal       fio_flush_backups
/* 1682E4 80247A84 ACB0003C */   sw       $s0, 0x3C($a1)
.L80247A88:
/* 1682E8 80247A88 0C00ACB4 */  jal       fio_load_game
/* 1682EC 80247A8C 0200202D */   daddu    $a0, $s0, $zero
D_80247A90:
/* 1682F0 80247A90 0C00CD3C */  jal       set_game_mode
.L80247A94:
/* 1682F4 80247A94 2404000F */   addiu    $a0, $zero, 0xF
jtbl_80247A98:
/* 1682F8 80247A98 08091EEE */  j         D_80247BB8
/* 1682FC 80247A9C 00000000 */   nop
D_80247AA0:
/* 168300 80247AA0 82430004 */  lb        $v1, 0x4($s2)
.L80247AA4:
/* 168304 80247AA4 2C620005 */  sltiu     $v0, $v1, 0x5
/* 168308 80247AA8 10400043 */  beqz      $v0, D_80247BB8
/* 16830C 80247AAC 00031080 */   sll      $v0, $v1, 2
.L80247AB0:
/* 168310 80247AB0 3C018025 */  lui       $at, %hi(D_8024C030_C098B0)
.L80247AB4:
/* 168314 80247AB4 00220821 */  addu      $at, $at, $v0
jtbl_80247AB8:
/* 168318 80247AB8 8C22C030 */  lw        $v0, %lo(D_8024C030_C098B0)($at)
/* 16831C 80247ABC 00400008 */  jr        $v0
D_80247AC0:
/* 168320 80247AC0 00000000 */   nop
/* 168324 80247AC4 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 168328 80247AC8 A020C098 */  sb        $zero, %lo(D_8024C098_C09918)($at)
/* 16832C 80247ACC 3C058024 */  lui       $a1, %hi(func_80243EEC)
/* 168330 80247AD0 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
.L80247AD4:
/* 168334 80247AD4 08091EEC */  j         D_80247BB0_EE6570
/* 168338 80247AD8 24040032 */   addiu    $a0, $zero, 0x32
/* 16833C 80247ADC 24020003 */  addiu     $v0, $zero, 0x3
/* 168340 80247AE0 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 168344 80247AE4 A022C098 */  sb        $v0, %lo(D_8024C098_C09918)($at)
D_80247AE8:
/* 168348 80247AE8 3C058024 */  lui       $a1, %hi(func_80243EEC)
/* 16834C 80247AEC 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
D_80247AF0_EE64B0:
/* 168350 80247AF0 08091EEC */  j         D_80247BB0_EE6570
/* 168354 80247AF4 24040032 */   addiu    $a0, $zero, 0x32
D_80247AF8_EE64B8:
/* 168358 80247AF8 2404002D */  addiu     $a0, $zero, 0x2D
glabel func_80247AFC
/* 16835C 80247AFC 3C108024 */  lui       $s0, %hi(func_8024381C)
D_80247B00_EE64C0:
/* 168360 80247B00 2610381C */  addiu     $s0, $s0, %lo(func_8024381C)
glabel func_80247B04
/* 168364 80247B04 3C028025 */  lui       $v0, %hi(D_80249B84)
jtbl_80247B08:
/* 168368 80247B08 8C429B84 */  lw        $v0, %lo(D_80249B84)($v0)
/* 16836C 80247B0C 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 168370 80247B10 A020C098 */  sb        $zero, %lo(D_8024C098_C09918)($at)
/* 168374 80247B14 90510003 */  lbu       $s1, 0x3($v0)
/* 168378 80247B18 0C051F9F */  jal       set_window_update
/* 16837C 80247B1C 0200282D */   daddu    $a1, $s0, $zero
/* 168380 80247B20 24040033 */  addiu     $a0, $zero, 0x33
/* 168384 80247B24 0C051F9F */  jal       set_window_update
/* 168388 80247B28 0200282D */   daddu    $a1, $s0, $zero
/* 16838C 80247B2C 24040034 */  addiu     $a0, $zero, 0x34
/* 168390 80247B30 0C051F9F */  jal       set_window_update
/* 168394 80247B34 0200282D */   daddu    $a1, $s0, $zero
.L80247B38:
/* 168398 80247B38 24040035 */  addiu     $a0, $zero, 0x35
/* 16839C 80247B3C 0C051F9F */  jal       set_window_update
/* 1683A0 80247B40 0200282D */   daddu    $a1, $s0, $zero
D_80247B44:
/* 1683A4 80247B44 24040036 */  addiu     $a0, $zero, 0x36
/* 1683A8 80247B48 0C051F9F */  jal       set_window_update
/* 1683AC 80247B4C 0200282D */   daddu    $a1, $s0, $zero
D_80247B50_EE6510:
/* 1683B0 80247B50 24040037 */  addiu     $a0, $zero, 0x37
/* 1683B4 80247B54 0C051F9F */  jal       set_window_update
jtbl_80247B58:
/* 1683B8 80247B58 0200282D */   daddu    $a1, $s0, $zero
/* 1683BC 80247B5C 24040035 */  addiu     $a0, $zero, 0x35
D_80247B60:
/* 1683C0 80247B60 0C051F9F */  jal       set_window_update
/* 1683C4 80247B64 0200282D */   daddu    $a1, $s0, $zero
/* 1683C8 80247B68 24040038 */  addiu     $a0, $zero, 0x38
/* 1683CC 80247B6C 0C051F9F */  jal       set_window_update
/* 1683D0 80247B70 0200282D */   daddu    $a1, $s0, $zero
/* 1683D4 80247B74 24040039 */  addiu     $a0, $zero, 0x39
.L80247B78:
/* 1683D8 80247B78 0C051F9F */  jal       set_window_update
/* 1683DC 80247B7C 0200282D */   daddu    $a1, $s0, $zero
D_80247B80:
/* 1683E0 80247B80 2404003A */  addiu     $a0, $zero, 0x3A
/* 1683E4 80247B84 0C051F9F */  jal       set_window_update
/* 1683E8 80247B88 0200282D */   daddu    $a1, $s0, $zero
/* 1683EC 80247B8C 2404003B */  addiu     $a0, $zero, 0x3B
.L80247B90:
/* 1683F0 80247B90 0C051F9F */  jal       set_window_update
/* 1683F4 80247B94 0200282D */   daddu    $a1, $s0, $zero
/* 1683F8 80247B98 3C058024 */  lui       $a1, %hi(func_80243B10)
/* 1683FC 80247B9C 24A53B10 */  addiu     $a1, $a1, %lo(func_80243B10)
D_80247BA0:
/* 168400 80247BA0 0C051F9F */  jal       set_window_update
.L80247BA4:
/* 168404 80247BA4 26240038 */   addiu    $a0, $s1, 0x38
/* 168408 80247BA8 24040032 */  addiu     $a0, $zero, 0x32
/* 16840C 80247BAC 24050002 */  addiu     $a1, $zero, 0x2
D_80247BB0_EE6570:
/* 168410 80247BB0 0C051F9F */  jal       set_window_update
.L80247BB4:
/* 168414 80247BB4 00000000 */   nop
D_80247BB8:
/* 168418 80247BB8 3C028025 */  lui       $v0, %hi(D_8024C084)
/* 16841C 80247BBC 8C42C084 */  lw        $v0, %lo(D_8024C084)($v0)
D_80247BC0:
/* 168420 80247BC0 30424000 */  andi      $v0, $v0, 0x4000
/* 168424 80247BC4 1040004D */  beqz      $v0, .L80247CFC
D_80247BC8:
/* 168428 80247BC8 00000000 */   nop
D_80247BCC:
/* 16842C 80247BCC 0C05272D */  jal       sfx_play_sound
D_80247BD0:
/* 168430 80247BD0 240400CA */   addiu    $a0, $zero, 0xCA
/* 168434 80247BD4 0240202D */  daddu     $a0, $s2, $zero
D_80247BD8:
/* 168438 80247BD8 0000282D */  daddu     $a1, $zero, $zero
/* 16843C 80247BDC 0C090B65 */  jal       func_80242D94
D_80247BE0_EE65A0:
/* 168440 80247BE0 24060001 */   addiu    $a2, $zero, 0x1
/* 168444 80247BE4 82440004 */  lb        $a0, 0x4($s2)
/* 168448 80247BE8 2C820005 */  sltiu     $v0, $a0, 0x5
/* 16844C 80247BEC 10400043 */  beqz      $v0, .L80247CFC
D_80247BF0:
/* 168450 80247BF0 00041080 */   sll      $v0, $a0, 2
/* 168454 80247BF4 3C018025 */  lui       $at, %hi(func_8024C048)
D_80247BF8:
/* 168458 80247BF8 00220821 */  addu      $at, $at, $v0
/* 16845C 80247BFC 8C22C048 */  lw        $v0, %lo(func_8024C048)($at)
/* 168460 80247C00 00400008 */  jr        $v0
/* 168464 80247C04 00000000 */   nop
/* 168468 80247C08 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
.L80247C0C:
/* 16846C 80247C0C A020C098 */  sb        $zero, %lo(D_8024C098_C09918)($at)
/* 168470 80247C10 3C058024 */  lui       $a1, %hi(func_80243EEC)
/* 168474 80247C14 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
/* 168478 80247C18 08091F3D */  j         .L80247CF4
D_80247C1C:
/* 16847C 80247C1C 24040032 */   addiu    $a0, $zero, 0x32
D_80247C20:
/* 168480 80247C20 24020003 */  addiu     $v0, $zero, 0x3
.L80247C24:
/* 168484 80247C24 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
jtbl_80247C28:
/* 168488 80247C28 A022C098 */  sb        $v0, %lo(D_8024C098_C09918)($at)
.L80247C2C:
/* 16848C 80247C2C 3C058024 */  lui       $a1, %hi(func_80243EEC)
/* 168490 80247C30 24A53EEC */  addiu     $a1, $a1, %lo(func_80243EEC)
/* 168494 80247C34 08091F3D */  j         .L80247CF4
/* 168498 80247C38 24040032 */   addiu    $a0, $zero, 0x32
D_80247C3C:
/* 16849C 80247C3C 2404002D */  addiu     $a0, $zero, 0x2D
D_80247C40:
/* 1684A0 80247C40 3C108024 */  lui       $s0, %hi(func_8024381C)
/* 1684A4 80247C44 2610381C */  addiu     $s0, $s0, %lo(func_8024381C)
/* 1684A8 80247C48 3C028025 */  lui       $v0, %hi(D_80249B84)
/* 1684AC 80247C4C 8C429B84 */  lw        $v0, %lo(D_80249B84)($v0)
/* 1684B0 80247C50 3C018025 */  lui       $at, %hi(D_8024C098_C09918)
/* 1684B4 80247C54 A020C098 */  sb        $zero, %lo(D_8024C098_C09918)($at)
/* 1684B8 80247C58 90510003 */  lbu       $s1, 0x3($v0)
.L80247C5C:
/* 1684BC 80247C5C 0C051F9F */  jal       set_window_update
/* 1684C0 80247C60 0200282D */   daddu    $a1, $s0, $zero
/* 1684C4 80247C64 24040033 */  addiu     $a0, $zero, 0x33
/* 1684C8 80247C68 0C051F9F */  jal       set_window_update
/* 1684CC 80247C6C 0200282D */   daddu    $a1, $s0, $zero
/* 1684D0 80247C70 24040034 */  addiu     $a0, $zero, 0x34
/* 1684D4 80247C74 0C051F9F */  jal       set_window_update
/* 1684D8 80247C78 0200282D */   daddu    $a1, $s0, $zero
.L80247C7C:
/* 1684DC 80247C7C 24040035 */  addiu     $a0, $zero, 0x35
D_80247C80:
/* 1684E0 80247C80 0C051F9F */  jal       set_window_update
.L80247C84:
/* 1684E4 80247C84 0200282D */   daddu    $a1, $s0, $zero
D_80247C88:
/* 1684E8 80247C88 24040036 */  addiu     $a0, $zero, 0x36
/* 1684EC 80247C8C 0C051F9F */  jal       set_window_update
D_80247C90:
/* 1684F0 80247C90 0200282D */   daddu    $a1, $s0, $zero
D_80247C94:
/* 1684F4 80247C94 24040037 */  addiu     $a0, $zero, 0x37
.L80247C98:
/* 1684F8 80247C98 0C051F9F */  jal       set_window_update
/* 1684FC 80247C9C 0200282D */   daddu    $a1, $s0, $zero
D_80247CA0:
/* 168500 80247CA0 24040035 */  addiu     $a0, $zero, 0x35
/* 168504 80247CA4 0C051F9F */  jal       set_window_update
/* 168508 80247CA8 0200282D */   daddu    $a1, $s0, $zero
/* 16850C 80247CAC 24040038 */  addiu     $a0, $zero, 0x38
/* 168510 80247CB0 0C051F9F */  jal       set_window_update
D_80247CB4:
/* 168514 80247CB4 0200282D */   daddu    $a1, $s0, $zero
/* 168518 80247CB8 24040039 */  addiu     $a0, $zero, 0x39
/* 16851C 80247CBC 0C051F9F */  jal       set_window_update
.L80247CC0:
/* 168520 80247CC0 0200282D */   daddu    $a1, $s0, $zero
D_80247CC4:
/* 168524 80247CC4 2404003A */  addiu     $a0, $zero, 0x3A
/* 168528 80247CC8 0C051F9F */  jal       set_window_update
/* 16852C 80247CCC 0200282D */   daddu    $a1, $s0, $zero
/* 168530 80247CD0 2404003B */  addiu     $a0, $zero, 0x3B
.L80247CD4:
/* 168534 80247CD4 0C051F9F */  jal       set_window_update
/* 168538 80247CD8 0200282D */   daddu    $a1, $s0, $zero
/* 16853C 80247CDC 3C058024 */  lui       $a1, %hi(func_80243B10)
.L80247CE0:
/* 168540 80247CE0 24A53B10 */  addiu     $a1, $a1, %lo(func_80243B10)
D_80247CE4:
/* 168544 80247CE4 0C051F9F */  jal       set_window_update
/* 168548 80247CE8 26240038 */   addiu    $a0, $s1, 0x38
/* 16854C 80247CEC 24040032 */  addiu     $a0, $zero, 0x32
D_80247CF0:
/* 168550 80247CF0 24050002 */  addiu     $a1, $zero, 0x2
.L80247CF4:
/* 168554 80247CF4 0C051F9F */  jal       set_window_update
/* 168558 80247CF8 00000000 */   nop
.L80247CFC:
/* 16855C 80247CFC 8FBF001C */  lw        $ra, 0x1C($sp)
D_80247D00:
/* 168560 80247D00 8FB20018 */  lw        $s2, 0x18($sp)
.L80247D04:
/* 168564 80247D04 8FB10014 */  lw        $s1, 0x14($sp)
/* 168568 80247D08 8FB00010 */  lw        $s0, 0x10($sp)
D_80247D0C:
/* 16856C 80247D0C 03E00008 */  jr        $ra
D_80247D10:
/* 168570 80247D10 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void filemenu_yesno_handle_input(MenuPanel* menu) {
    s32 oldSelected = menu->selected;

    if (filemenu_heldButtons & BUTTON_STICK_UP) {
        menu->row--;
        if (menu->row < 0) {
            menu->row = 0;
        }
    }

    if (filemenu_heldButtons & BUTTON_STICK_DOWN) {
        menu->row++;
        if (menu->row >= menu->numRows) {
            menu->row = menu->numRows - 1;
        }
    }

    menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu);

    if (oldSelected != menu->selected) {
        sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
    }

    if ((filemenu_pressedButtons & BUTTON_START) && menu->page == 4) {
        filemenu_set_selected(menu, 0, 0);
        filemenu_pressedButtons = BUTTON_A;
    }

    if (filemenu_pressedButtons & BUTTON_A) {
        u32 slot;
        u32 slot2;
        u32 slot3;
        u32 slot4;
        s32 i;

        sfx_play_sound(SOUND_MENU_NEXT);

        switch (menu->selected) {
            case 0:
                switch (menu->page) {
                    case 0:
                        filemenu_currentMenu = 2;
                        filemenu_menus[filemenu_currentMenu]->page = 0;
                        gWindows[WINDOW_ID_FILEMENU_INFO].width = 182;
                        gWindows[WINDOW_ID_FILEMENU_INFO].height = 25;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                            ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
                                            : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                            ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
                                            : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
                        set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);

                        slot = filemenu_menus[0]->selected;
                        for (i = 0; i < ARRAY_COUNT(gSaveSlotMetadata->filename); i++) {
                            gSaveSlotMetadata[slot].filename[i] = 0xF7;
                        }
                        gSaveSlotMetadata[slot].level = 0;
                        gSaveSlotMetadata[slot].timePlayed = 0;
                        gSaveSlotMetadata[slot].spiritsRescued = 0;
                        fio_erase_game(slot);
                        gSaveSlotHasData[slot] = FALSE;
                        break;
                    case 3:
                        filemenu_currentMenu = 2;
                        filemenu_menus[filemenu_currentMenu]->page = 2;
                        gWindows[WINDOW_ID_FILEMENU_INFO].width = 154;
                        gWindows[WINDOW_ID_FILEMENU_INFO].height = 39;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                             ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
                                             : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                             ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
                                             : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
                        set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                        fio_load_game(filemenu_loadedFileIdx);
                        gSaveSlotMetadata[filemenu_iterFileIdx] = gSaveSlotMetadata[filemenu_loadedFileIdx];
                        fio_save_game(filemenu_iterFileIdx);
                        gSaveSlotHasData[filemenu_iterFileIdx] = TRUE;
                        break;
                    case 1:
                        filemenu_currentMenu = 2;
                        filemenu_menus[filemenu_currentMenu]->page = 1;
                        gWindows[WINDOW_ID_FILEMENU_INFO].width = 153;
                        gWindows[WINDOW_ID_FILEMENU_INFO].height = 25;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                             ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
                                             : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                             ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
                                             : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
                        set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                        gSaveSlotMetadata[filemenu_menus[0]->selected] = gSaveSlotMetadata[gGameStatusPtr->saveSlot];
                        fio_save_game(filemenu_menus[0]->selected);
                        gSaveSlotHasData[filemenu_menus[0]->selected] = TRUE;
                        break;
                    case 2:
                        clear_player_data();
                        clear_saved_variables();
                        //TODO hardcoded area/map IDs
                        gGameStatusPtr->areaID = 0;
                        gGameStatusPtr->mapID = 11;
                        gGameStatusPtr->entryID = 0;
                        evt_set_variable(NULL, GB_StoryProgress, STORY_INTRO);

                        slot2 = filemenu_menus[0]->selected;
                        for (i = 0; i < ARRAY_COUNT(gSaveSlotMetadata->filename); i++) {
                            gSaveSlotMetadata[slot2].filename[i] = filemenu_filename[i];
                        }
                        fio_save_game(slot2);
                        gSaveSlotHasData[slot2] = TRUE;
                        set_window_update(WINDOW_ID_FILEMENU_CREATEFILE_HEADER, (s32)filemenu_update_hidden_name_input);
                        set_window_update(WINDOW_ID_FILEMENU_KEYBOARD, (s32)filemenu_update_hidden_name_input);
                        set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                        filemenu_currentMenu = 2;
                        filemenu_menus[2]->page = 3;
                        gWindows[WINDOW_ID_FILEMENU_INFO].width = 184;
                        gWindows[WINDOW_ID_FILEMENU_INFO].height = 25;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.x = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                             ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].width / 2)
                                             : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].width / 2;
                        gWindows[WINDOW_ID_FILEMENU_INFO].pos.y = ((gWindows[WINDOW_ID_FILEMENU_INFO].parent != -1)
                                             ? (gWindows[gWindows[WINDOW_ID_FILEMENU_INFO].parent].height / 2)
                                             : SCREEN_HEIGHT / 2) - gWindows[WINDOW_ID_FILEMENU_INFO].height / 2;
                        set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_SHOW);
                        break;
                    case 4:
                        slot3 = filemenu_menus[0]->selected;
                        if (gGameStatusPtr->soundOutputMode != 1 - D_800D95E8.saveSlot ||
                            slot3 != (u8)D_800D95E8.saveCount)
                        {
                            D_800D95E8.saveSlot = 1 - gGameStatusPtr->soundOutputMode;
                            D_800D95E8.saveCount = slot3;
                            fio_flush_backups();
                        }
                        fio_load_game(slot3);
                        set_game_mode(GAME_MODE_END_FILE_SELECT);
                        break;
                }
                break;
            case 1:
                switch (menu->page) {
                    case 0:
                    case 1:
                    case 3:
                        filemenu_currentMenu = 0;
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                        break;
                    case 2:
                        filemenu_currentMenu = 3;
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                        break;
                    case 4:
                        filemenu_currentMenu = 0;
                        slot4 = filemenu_menus[0]->selected;
                        set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation);
                        set_window_update(slot4 + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_deselect_file);
                        set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE);
                        break;
                }
                break;
        }
    }

    if (filemenu_pressedButtons & BUTTON_B) {
        u32 slot;

        sfx_play_sound(SOUND_MENU_BACK);
        filemenu_set_selected(menu, 0, 1);

        switch (menu->page) {
            case 0:
            case 1:
            case 3:
                filemenu_currentMenu = 0;
                set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                break;
            case 2:
                filemenu_currentMenu = 3;
                set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, (s32)filemenu_update_hidden_name_confirm);
                break;
            case 4:
                filemenu_currentMenu = 0;
                slot = filemenu_menus[0]->selected;
                set_window_update(WINDOW_ID_FILEMENU_TITLE, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_OPTION_CENTER, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_FILE1_INFO, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_FILE2_INFO, (s32)filemenu_update_show_with_rotation);
                set_window_update(WINDOW_ID_FILEMENU_FILE3_INFO, (s32)filemenu_update_show_with_rotation);
                set_window_update(slot + WINDOW_ID_FILEMENU_FILE0_INFO, (s32)filemenu_update_deselect_file);
                set_window_update(WINDOW_ID_FILEMENU_YESNO_OPTIONS, WINDOW_UPDATE_HIDE);
                break;
        }
    }
}