### RAW ASSEMBLY INSTRUCTIONS:

glabel check_input_open_menus
/* 80194 800E6CE4 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 80198 800E6CE8 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 8019C 800E6CEC 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 801A0 800E6CF0 AFB3001C */  sw        $s3, 0x1C($sp)
/* 801A4 800E6CF4 3C138011 */  lui       $s3, %hi(gPartnerStatus)
/* 801A8 800E6CF8 2673EBB0 */  addiu     $s3, $s3, %lo(gPartnerStatus)
/* 801AC 800E6CFC AFB40020 */  sw        $s4, 0x20($sp)
/* 801B0 800E6D00 3C148011 */  lui       $s4, %hi(gPlayerStatus)
/* 801B4 800E6D04 2694EFC8 */  addiu     $s4, $s4, %lo(gPlayerStatus)
/* 801B8 800E6D08 AFBF0024 */  sw        $ra, 0x24($sp)
/* 801BC 800E6D0C AFB20018 */  sw        $s2, 0x18($sp)
/* 801C0 800E6D10 AFB10014 */  sw        $s1, 0x14($sp)
/* 801C4 800E6D14 AFB00010 */  sw        $s0, 0x10($sp)
/* 801C8 800E6D18 80620078 */  lb        $v0, 0x78($v1)
/* 801CC 800E6D1C 3C128011 */  lui       $s2, %hi(D_8010C9C8)
/* 801D0 800E6D20 2652C9C8 */  addiu     $s2, $s2, %lo(D_8010C9C8)
/* 801D4 800E6D24 14400151 */  bnez      $v0, .L800E726C
/* 801D8 800E6D28 00000000 */   nop
/* 801DC 800E6D2C 9062007E */  lbu       $v0, 0x7E($v1)
/* 801E0 800E6D30 30420001 */  andi      $v0, $v0, 0x1
/* 801E4 800E6D34 1440014D */  bnez      $v0, .L800E726C
/* 801E8 800E6D38 0000202D */   daddu    $a0, $zero, $zero
/* 801EC 800E6D3C 3C05F5DE */  lui       $a1, (0xF5DE0180 >> 16)
/* 801F0 800E6D40 0C0B1EAF */  jal       evt_get_variable
/* 801F4 800E6D44 34A50180 */   ori      $a1, $a1, (0xF5DE0180 & 0xFFFF)
/* 801F8 800E6D48 2403FF80 */  addiu     $v1, $zero, -0x80
/* 801FC 800E6D4C 10430147 */  beq       $v0, $v1, .L800E726C
/* 80200 800E6D50 00000000 */   nop
/* 80204 800E6D54 82620000 */  lb        $v0, 0x0($s3)
/* 80208 800E6D58 1040000A */  beqz      $v0, .L800E6D84
/* 8020C 800E6D5C 00000000 */   nop
/* 80210 800E6D60 92620003 */  lbu       $v0, 0x3($s3)
/* 80214 800E6D64 2442FFF9 */  addiu     $v0, $v0, -0x7
/* 80218 800E6D68 2C420003 */  sltiu     $v0, $v0, 0x3
/* 8021C 800E6D6C 10400005 */  beqz      $v0, .L800E6D84
/* 80220 800E6D70 0000202D */   daddu    $a0, $zero, $zero
/* 80224 800E6D74 8E710008 */  lw        $s1, 0x8($s3)
/* 80228 800E6D78 8E70000C */  lw        $s0, 0xC($s3)
/* 8022C 800E6D7C 08039B65 */  j         .L800E6D94
/* 80230 800E6D80 3C05F5DE */   lui      $a1, (0xF5DE0180 >> 16)
.L800E6D84:
/* 80234 800E6D84 8E9100DC */  lw        $s1, 0xDC($s4)
/* 80238 800E6D88 8E9000E0 */  lw        $s0, 0xE0($s4)
/* 8023C 800E6D8C 0000202D */  daddu     $a0, $zero, $zero
/* 80240 800E6D90 3C05F5DE */  lui       $a1, (0xF5DE0180 >> 16)
.L800E6D94:
/* 80244 800E6D94 0C0B1EAF */  jal       evt_get_variable
/* 80248 800E6D98 34A50180 */   ori      $a1, $a1, (0xF5DE0180 & 0xFFFF)
/* 8024C 800E6D9C 28420060 */  slti      $v0, $v0, 0x60
/* 80250 800E6DA0 14400003 */  bnez      $v0, .L800E6DB0
/* 80254 800E6DA4 2402FFFC */   addiu    $v0, $zero, -0x4
/* 80258 800E6DA8 02228824 */  and       $s1, $s1, $v0
/* 8025C 800E6DAC 02028024 */  and       $s0, $s0, $v0
.L800E6DB0:
/* 80260 800E6DB0 3C038011 */  lui       $v1, %hi(D_8010CD00)
/* 80264 800E6DB4 8463CD00 */  lh        $v1, %lo(D_8010CD00)($v1)
/* 80268 800E6DB8 2C62000B */  sltiu     $v0, $v1, 0xB
/* 8026C 800E6DBC 1040012B */  beqz      $v0, .L800E726C
/* 80270 800E6DC0 00031080 */   sll      $v0, $v1, 2
/* 80274 800E6DC4 3C018011 */  lui       $at, %hi(jtbl_8010BF30)
/* 80278 800E6DC8 00220821 */  addu      $at, $at, $v0
/* 8027C 800E6DCC 8C22BF30 */  lw        $v0, %lo(jtbl_8010BF30)($at)
/* 80280 800E6DD0 00400008 */  jr        $v0
/* 80284 800E6DD4 00000000 */   nop
glabel .L800E6DD8
/* 80288 800E6DD8 0220202D */  daddu     $a0, $s1, $zero
/* 8028C 800E6DDC 0C039A77 */  jal       can_pause
/* 80290 800E6DE0 0200282D */   daddu    $a1, $s0, $zero
/* 80294 800E6DE4 10400121 */  beqz      $v0, .L800E726C
/* 80298 800E6DE8 24020001 */   addiu    $v0, $zero, 0x1
/* 8029C 800E6DEC 3C038011 */  lui       $v1, %hi(D_8010CCF8)
/* 802A0 800E6DF0 2463CCF8 */  addiu     $v1, $v1, %lo(D_8010CCF8)
/* 802A4 800E6DF4 A4620000 */  sh        $v0, 0x0($v1)
/* 802A8 800E6DF8 32020001 */  andi      $v0, $s0, 0x1
/* 802AC 800E6DFC 54400001 */  bnel      $v0, $zero, .L800E6E04
/* 802B0 800E6E00 A4600000 */   sh       $zero, 0x0($v1)
.L800E6E04:
/* 802B4 800E6E04 32021000 */  andi      $v0, $s0, 0x1000
/* 802B8 800E6E08 10400002 */  beqz      $v0, .L800E6E14
/* 802BC 800E6E0C 24020002 */   addiu    $v0, $zero, 0x2
/* 802C0 800E6E10 A4620000 */  sh        $v0, 0x0($v1)
.L800E6E14:
/* 802C4 800E6E14 3C018011 */  lui       $at, %hi(D_8010C9C0)
/* 802C8 800E6E18 A420C9C0 */  sh        $zero, %lo(D_8010C9C0)($at)
.L800E6E1C:
/* 802CC 800E6E1C 3C038011 */  lui       $v1, %hi(D_8010CCF8)
/* 802D0 800E6E20 8463CCF8 */  lh        $v1, %lo(D_8010CCF8)($v1)
/* 802D4 800E6E24 10600005 */  beqz      $v1, .L800E6E3C
/* 802D8 800E6E28 24020001 */   addiu    $v0, $zero, 0x1
/* 802DC 800E6E2C 1062001F */  beq       $v1, $v0, .L800E6EAC
/* 802E0 800E6E30 00000000 */   nop
/* 802E4 800E6E34 08039BB2 */  j         .L800E6EC8
/* 802E8 800E6E38 00000000 */   nop
.L800E6E3C:
/* 802EC 800E6E3C 8E820000 */  lw        $v0, 0x0($s4)
/* 802F0 800E6E40 30420040 */  andi      $v0, $v0, 0x40
/* 802F4 800E6E44 10400009 */  beqz      $v0, .L800E6E6C
/* 802F8 800E6E48 00000000 */   nop
/* 802FC 800E6E4C 0C05272D */  jal       sfx_play_sound
/* 80300 800E6E50 2404021D */   addiu    $a0, $zero, 0x21D
/* 80304 800E6E54 3C028011 */  lui       $v0, %hi(D_8010C9C0)
/* 80308 800E6E58 8442C9C0 */  lh        $v0, %lo(D_8010C9C0)($v0)
/* 8030C 800E6E5C 10400103 */  beqz      $v0, .L800E726C
/* 80310 800E6E60 00000000 */   nop
/* 80314 800E6E64 08039C72 */  j         .L800E71C8
/* 80318 800E6E68 00000000 */   nop
.L800E6E6C:
/* 8031C 800E6E6C 0C039ADE */  jal       setup_partner_popup
/* 80320 800E6E70 0240202D */   daddu    $a0, $s2, $zero
/* 80324 800E6E74 104000FD */  beqz      $v0, .L800E726C
/* 80328 800E6E78 24030001 */   addiu    $v1, $zero, 0x1
/* 8032C 800E6E7C AE420324 */  sw        $v0, 0x324($s2)
/* 80330 800E6E80 3C028011 */  lui       $v0, %hi(gPlayerData)
/* 80334 800E6E84 2442F290 */  addiu     $v0, $v0, %lo(gPlayerData)
/* 80338 800E6E88 80420012 */  lb        $v0, 0x12($v0)
/* 8033C 800E6E8C AE430318 */  sw        $v1, 0x318($s2)
/* 80340 800E6E90 00021080 */  sll       $v0, $v0, 2
/* 80344 800E6E94 3C018009 */  lui       $at, %hi(D_8008EEF0)
/* 80348 800E6E98 00220821 */  addu      $at, $at, $v0
/* 8034C 800E6E9C 8C22EEF0 */  lw        $v0, %lo(D_8008EEF0)($at)
/* 80350 800E6EA0 2442FFFF */  addiu     $v0, $v0, -0x1
/* 80354 800E6EA4 08039BB2 */  j         .L800E6EC8
/* 80358 800E6EA8 AE420328 */   sw       $v0, 0x328($s2)
.L800E6EAC:
/* 8035C 800E6EAC 0C039B11 */  jal       setup_item_popup
/* 80360 800E6EB0 0240202D */   daddu    $a0, $s2, $zero
/* 80364 800E6EB4 104000ED */  beqz      $v0, .L800E726C
/* 80368 800E6EB8 00000000 */   nop
/* 8036C 800E6EBC AE400318 */  sw        $zero, 0x318($s2)
/* 80370 800E6EC0 AE420324 */  sw        $v0, 0x324($s2)
/* 80374 800E6EC4 AE400328 */  sw        $zero, 0x328($s2)
.L800E6EC8:
/* 80378 800E6EC8 8E820000 */  lw        $v0, 0x0($s4)
/* 8037C 800E6ECC 34420020 */  ori       $v0, $v0, 0x20
/* 80380 800E6ED0 0C03805E */  jal       disable_player_input
/* 80384 800E6ED4 AE820000 */   sw       $v0, 0x0($s4)
/* 80388 800E6ED8 0C03BD8A */  jal       partner_disable_input
/* 8038C 800E6EDC 00000000 */   nop
/* 80390 800E6EE0 24020003 */  addiu     $v0, $zero, 0x3
/* 80394 800E6EE4 3C018011 */  lui       $at, %hi(D_8010CCFA)
/* 80398 800E6EE8 A422CCFA */  sh        $v0, %lo(D_8010CCFA)($at)
/* 8039C 800E6EEC 92820015 */  lbu       $v0, 0x15($s4)
/* 803A0 800E6EF0 24030001 */  addiu     $v1, $zero, 0x1
/* 803A4 800E6EF4 3C018011 */  lui       $at, %hi(D_8010CD00)
/* 803A8 800E6EF8 A423CD00 */  sh        $v1, %lo(D_8010CD00)($at)
/* 803AC 800E6EFC 00021600 */  sll       $v0, $v0, 24
/* 803B0 800E6F00 00021603 */  sra       $v0, $v0, 24
/* 803B4 800E6F04 3C018011 */  lui       $at, %hi(D_8010CCFE)
/* 803B8 800E6F08 A422CCFE */  sh        $v0, %lo(D_8010CCFE)($at)
/* 803BC 800E6F0C 08039C9B */  j         .L800E726C
/* 803C0 800E6F10 00000000 */   nop
glabel .L800E6F14
/* 803C4 800E6F14 0C039A41 */  jal       func_800E6904
/* 803C8 800E6F18 00000000 */   nop
/* 803CC 800E6F1C 1040000B */  beqz      $v0, .L800E6F4C
/* 803D0 800E6F20 00000000 */   nop
/* 803D4 800E6F24 0C04D07A */  jal       is_picking_up_item
/* 803D8 800E6F28 00000000 */   nop
/* 803DC 800E6F2C 14400007 */  bnez      $v0, .L800E6F4C
/* 803E0 800E6F30 00000000 */   nop
/* 803E4 800E6F34 3C028011 */  lui       $v0, %hi(D_8010CCFE)
/* 803E8 800E6F38 8442CCFE */  lh        $v0, %lo(D_8010CCFE)($v0)
/* 803EC 800E6F3C 82830015 */  lb        $v1, 0x15($s4)
/* 803F0 800E6F40 0043102A */  slt       $v0, $v0, $v1
/* 803F4 800E6F44 10400010 */  beqz      $v0, .L800E6F88
/* 803F8 800E6F48 00000000 */   nop
.L800E6F4C:
/* 803FC 800E6F4C 8E820000 */  lw        $v0, 0x0($s4)
/* 80400 800E6F50 2403FFDF */  addiu     $v1, $zero, -0x21
/* 80404 800E6F54 00431024 */  and       $v0, $v0, $v1
/* 80408 800E6F58 0C038069 */  jal       enable_player_input
/* 8040C 800E6F5C AE820000 */   sw       $v0, 0x0($s4)
/* 80410 800E6F60 0C03BD80 */  jal       partner_enable_input
/* 80414 800E6F64 00000000 */   nop
/* 80418 800E6F68 3C028011 */  lui       $v0, %hi(D_8010C9C0)
/* 8041C 800E6F6C 8442C9C0 */  lh        $v0, %lo(D_8010C9C0)($v0)
/* 80420 800E6F70 3C018011 */  lui       $at, %hi(D_8010CD00)
/* 80424 800E6F74 A420CD00 */  sh        $zero, %lo(D_8010CD00)($at)
/* 80428 800E6F78 104000BC */  beqz      $v0, .L800E726C
/* 8042C 800E6F7C 00000000 */   nop
/* 80430 800E6F80 08039C72 */  j         .L800E71C8
/* 80434 800E6F84 00000000 */   nop
.L800E6F88:
/* 80438 800E6F88 3C038011 */  lui       $v1, %hi(D_8010CCFA)
/* 8043C 800E6F8C 2463CCFA */  addiu     $v1, $v1, %lo(D_8010CCFA)
/* 80440 800E6F90 94620000 */  lhu       $v0, 0x0($v1)
/* 80444 800E6F94 2442FFFF */  addiu     $v0, $v0, -0x1
/* 80448 800E6F98 A4620000 */  sh        $v0, 0x0($v1)
/* 8044C 800E6F9C 00021400 */  sll       $v0, $v0, 16
/* 80450 800E6FA0 144000B2 */  bnez      $v0, .L800E726C
/* 80454 800E6FA4 24040002 */   addiu    $a0, $zero, 0x2
/* 80458 800E6FA8 3C02800A */  lui       $v0, %hi(gOverrideFlags)
/* 8045C 800E6FAC 2442A650 */  addiu     $v0, $v0, %lo(gOverrideFlags)
/* 80460 800E6FB0 8C430000 */  lw        $v1, 0x0($v0)
/* 80464 800E6FB4 3C018011 */  lui       $at, %hi(D_8010CD00)
/* 80468 800E6FB8 A424CD00 */  sh        $a0, %lo(D_8010CD00)($at)
/* 8046C 800E6FBC 34630040 */  ori       $v1, $v1, 0x40
/* 80470 800E6FC0 08039C9B */  j         .L800E726C
/* 80474 800E6FC4 AC430000 */   sw       $v1, 0x0($v0)
glabel .L800E6FC8
/* 80478 800E6FC8 3C038011 */  lui       $v1, %hi(D_8010CCF8)
/* 8047C 800E6FCC 8463CCF8 */  lh        $v1, %lo(D_8010CCF8)($v1)
/* 80480 800E6FD0 24020002 */  addiu     $v0, $zero, 0x2
/* 80484 800E6FD4 1462000C */  bne       $v1, $v0, .L800E7008
/* 80488 800E6FD8 00000000 */   nop
/* 8048C 800E6FDC 0C00CD3C */  jal       set_game_mode
/* 80490 800E6FE0 2404000A */   addiu    $a0, $zero, 0xA
/* 80494 800E6FE4 0C05272D */  jal       sfx_play_sound
/* 80498 800E6FE8 240400C5 */   addiu    $a0, $zero, 0xC5
/* 8049C 800E6FEC 2402000A */  addiu     $v0, $zero, 0xA
/* 804A0 800E6FF0 3C018011 */  lui       $at, %hi(D_8010CCFA)
/* 804A4 800E6FF4 A422CCFA */  sh        $v0, %lo(D_8010CCFA)($at)
/* 804A8 800E6FF8 3C018011 */  lui       $at, %hi(D_8010CD00)
/* 804AC 800E6FFC A422CD00 */  sh        $v0, %lo(D_8010CD00)($at)
/* 804B0 800E7000 08039C9B */  j         .L800E726C
/* 804B4 800E7004 00000000 */   nop
.L800E7008:
/* 804B8 800E7008 0C03D390 */  jal       create_standard_popup_menu
/* 804BC 800E700C 0240202D */   daddu    $a0, $s2, $zero
/* 804C0 800E7010 0C009C22 */  jal       set_time_freeze_mode
/* 804C4 800E7014 24040003 */   addiu    $a0, $zero, 0x3
/* 804C8 800E7018 82620000 */  lb        $v0, 0x0($s3)
/* 804CC 800E701C 14400003 */  bnez      $v0, .L800E702C
/* 804D0 800E7020 00000000 */   nop
/* 804D4 800E7024 0C039769 */  jal       set_action_state
/* 804D8 800E7028 0000202D */   daddu    $a0, $zero, $zero
.L800E702C:
/* 804DC 800E702C 3C038011 */  lui       $v1, %hi(D_8010CD00)
/* 804E0 800E7030 2463CD00 */  addiu     $v1, $v1, %lo(D_8010CD00)
/* 804E4 800E7034 94620000 */  lhu       $v0, 0x0($v1)
/* 804E8 800E7038 24420001 */  addiu     $v0, $v0, 0x1
/* 804EC 800E703C 08039C9B */  j         .L800E726C
/* 804F0 800E7040 A4620000 */   sh       $v0, 0x0($v1)
glabel .L800E7044
/* 804F4 800E7044 2402FFFF */  addiu     $v0, $zero, -0x1
/* 804F8 800E7048 8643032C */  lh        $v1, 0x32C($s2)
/* 804FC 800E704C 10620087 */  beq       $v1, $v0, .L800E726C
/* 80500 800E7050 9644032C */   lhu      $a0, 0x32C($s2)
/* 80504 800E7054 3C018011 */  lui       $at, %hi(D_8010CCFC)
/* 80508 800E7058 A424CCFC */  sh        $a0, %lo(D_8010CCFC)($at)
/* 8050C 800E705C 10600083 */  beqz      $v1, .L800E726C
/* 80510 800E7060 00000000 */   nop
/* 80514 800E7064 0C03C4EC */  jal       hide_popup_menu
/* 80518 800E7068 00000000 */   nop
/* 8051C 800E706C 3C028011 */  lui       $v0, %hi(D_8010CD00)
/* 80520 800E7070 2442CD00 */  addiu     $v0, $v0, %lo(D_8010CD00)
/* 80524 800E7074 94430000 */  lhu       $v1, 0x0($v0)
/* 80528 800E7078 2404000F */  addiu     $a0, $zero, 0xF
/* 8052C 800E707C 3C018011 */  lui       $at, %hi(D_8010CCFA)
/* 80530 800E7080 A424CCFA */  sh        $a0, %lo(D_8010CCFA)($at)
/* 80534 800E7084 24630001 */  addiu     $v1, $v1, 0x1
/* 80538 800E7088 08039C9B */  j         .L800E726C
/* 8053C 800E708C A4430000 */   sh       $v1, 0x0($v0)
glabel .L800E7090
/* 80540 800E7090 3C038011 */  lui       $v1, %hi(D_8010CCFA)
/* 80544 800E7094 2463CCFA */  addiu     $v1, $v1, %lo(D_8010CCFA)
/* 80548 800E7098 94620000 */  lhu       $v0, 0x0($v1)
/* 8054C 800E709C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 80550 800E70A0 A4620000 */  sh        $v0, 0x0($v1)
/* 80554 800E70A4 00021400 */  sll       $v0, $v0, 16
/* 80558 800E70A8 14400070 */  bnez      $v0, .L800E726C
/* 8055C 800E70AC 00000000 */   nop
/* 80560 800E70B0 0C03C54E */  jal       destroy_popup_menu
/* 80564 800E70B4 00000000 */   nop
/* 80568 800E70B8 3C018011 */  lui       $at, %hi(D_8010CD00)
/* 8056C 800E70BC A420CD00 */  sh        $zero, %lo(D_8010CD00)($at)
/* 80570 800E70C0 0C038069 */  jal       enable_player_input
/* 80574 800E70C4 00000000 */   nop
/* 80578 800E70C8 0C03BD80 */  jal       partner_enable_input
/* 8057C 800E70CC 00000000 */   nop
/* 80580 800E70D0 3C108011 */  lui       $s0, %hi(D_8010CCFC)
/* 80584 800E70D4 2610CCFC */  addiu     $s0, $s0, %lo(D_8010CCFC)
/* 80588 800E70D8 86030000 */  lh        $v1, 0x0($s0)
/* 8058C 800E70DC 2402FFFE */  addiu     $v0, $zero, -0x2
/* 80590 800E70E0 1462001B */  bne       $v1, $v0, .L800E7150
/* 80594 800E70E4 00000000 */   nop
/* 80598 800E70E8 0C039ADE */  jal       setup_partner_popup
/* 8059C 800E70EC 0240202D */   daddu    $a0, $s2, $zero
/* 805A0 800E70F0 10400005 */  beqz      $v0, .L800E7108
/* 805A4 800E70F4 240200FF */   addiu    $v0, $zero, 0xFF
/* 805A8 800E70F8 0C039B11 */  jal       setup_item_popup
/* 805AC 800E70FC 0240202D */   daddu    $a0, $s2, $zero
/* 805B0 800E7100 14400003 */  bnez      $v0, .L800E7110
/* 805B4 800E7104 240200FF */   addiu    $v0, $zero, 0xFF
.L800E7108:
/* 805B8 800E7108 08039C54 */  j         .L800E7150
/* 805BC 800E710C A6020000 */   sh       $v0, 0x0($s0)
.L800E7110:
/* 805C0 800E7110 3C048011 */  lui       $a0, %hi(D_8010CCF8)
/* 805C4 800E7114 2484CCF8 */  addiu     $a0, $a0, %lo(D_8010CCF8)
/* 805C8 800E7118 84830000 */  lh        $v1, 0x0($a0)
/* 805CC 800E711C 10600005 */  beqz      $v1, .L800E7134
/* 805D0 800E7120 24020001 */   addiu    $v0, $zero, 0x1
/* 805D4 800E7124 10620006 */  beq       $v1, $v0, .L800E7140
/* 805D8 800E7128 24020001 */   addiu    $v0, $zero, 0x1
/* 805DC 800E712C 08039C51 */  j         .L800E7144
/* 805E0 800E7130 00000000 */   nop
.L800E7134:
/* 805E4 800E7134 24020001 */  addiu     $v0, $zero, 0x1
/* 805E8 800E7138 08039C51 */  j         .L800E7144
/* 805EC 800E713C A4820000 */   sh       $v0, 0x0($a0)
.L800E7140:
/* 805F0 800E7140 A4800000 */  sh        $zero, 0x0($a0)
.L800E7144:
/* 805F4 800E7144 3C018011 */  lui       $at, %hi(D_8010C9C0)
/* 805F8 800E7148 08039B87 */  j         .L800E6E1C
/* 805FC 800E714C A422C9C0 */   sh       $v0, %lo(D_8010C9C0)($at)
.L800E7150:
/* 80600 800E7150 3C038011 */  lui       $v1, %hi(D_8010CCFC)
/* 80604 800E7154 8463CCFC */  lh        $v1, %lo(D_8010CCFC)($v1)
/* 80608 800E7158 240200FF */  addiu     $v0, $zero, 0xFF
/* 8060C 800E715C 1062001A */  beq       $v1, $v0, .L800E71C8
/* 80610 800E7160 00000000 */   nop
/* 80614 800E7164 3C048011 */  lui       $a0, %hi(D_8010CCF8)
/* 80618 800E7168 8484CCF8 */  lh        $a0, %lo(D_8010CCF8)($a0)
/* 8061C 800E716C 10800005 */  beqz      $a0, .L800E7184
/* 80620 800E7170 24020001 */   addiu    $v0, $zero, 0x1
/* 80624 800E7174 1082000A */  beq       $a0, $v0, .L800E71A0
/* 80628 800E7178 2462FFFF */   addiu    $v0, $v1, -0x1
/* 8062C 800E717C 08039C72 */  j         .L800E71C8
/* 80630 800E7180 00000000 */   nop
.L800E7184:
/* 80634 800E7184 2462FFFF */  addiu     $v0, $v1, -0x1
/* 80638 800E7188 00021080 */  sll       $v0, $v0, 2
/* 8063C 800E718C 02421021 */  addu      $v0, $s2, $v0
/* 80640 800E7190 0C03AC5A */  jal       switch_to_partner
/* 80644 800E7194 8C440108 */   lw       $a0, 0x108($v0)
/* 80648 800E7198 08039C72 */  j         .L800E71C8
/* 8064C 800E719C 00000000 */   nop
.L800E71A0:
/* 80650 800E71A0 00021080 */  sll       $v0, $v0, 2
/* 80654 800E71A4 02421021 */  addu      $v0, $s2, $v0
/* 80658 800E71A8 0C03A900 */  jal       use_consumable
/* 8065C 800E71AC 8C440108 */   lw       $a0, 0x108($v0)
/* 80660 800E71B0 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 80664 800E71B4 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 80668 800E71B8 8C820000 */  lw        $v0, 0x0($a0)
/* 8066C 800E71BC 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 80670 800E71C0 00431025 */  or        $v0, $v0, $v1
/* 80674 800E71C4 AC820000 */  sw        $v0, 0x0($a0)
.L800E71C8:
/* 80678 800E71C8 0C039A18 */  jal       func_800E6860
/* 8067C 800E71CC 00000000 */   nop
/* 80680 800E71D0 0000202D */  daddu     $a0, $zero, $zero
/* 80684 800E71D4 2403FFDF */  addiu     $v1, $zero, -0x21
/* 80688 800E71D8 8E820000 */  lw        $v0, 0x0($s4)
/* 8068C 800E71DC 3C05800A */  lui       $a1, %hi(gOverrideFlags)
/* 80690 800E71E0 24A5A650 */  addiu     $a1, $a1, %lo(gOverrideFlags)
/* 80694 800E71E4 00431024 */  and       $v0, $v0, $v1
/* 80698 800E71E8 AE820000 */  sw        $v0, 0x0($s4)
/* 8069C 800E71EC 8CA20000 */  lw        $v0, 0x0($a1)
/* 806A0 800E71F0 2403FFBF */  addiu     $v1, $zero, -0x41
/* 806A4 800E71F4 00431024 */  and       $v0, $v0, $v1
/* 806A8 800E71F8 0C009C22 */  jal       set_time_freeze_mode
/* 806AC 800E71FC ACA20000 */   sw       $v0, 0x0($a1)
/* 806B0 800E7200 08039C9B */  j         .L800E726C
/* 806B4 800E7204 00000000 */   nop
glabel .L800E7208
/* 806B8 800E7208 3C038011 */  lui       $v1, %hi(D_8010CCFA)
/* 806BC 800E720C 2463CCFA */  addiu     $v1, $v1, %lo(D_8010CCFA)
/* 806C0 800E7210 94620000 */  lhu       $v0, 0x0($v1)
/* 806C4 800E7214 2442FFFF */  addiu     $v0, $v0, -0x1
/* 806C8 800E7218 A4620000 */  sh        $v0, 0x0($v1)
/* 806CC 800E721C 00021400 */  sll       $v0, $v0, 16
/* 806D0 800E7220 14400012 */  bnez      $v0, .L800E726C
/* 806D4 800E7224 00000000 */   nop
/* 806D8 800E7228 0C039A18 */  jal       func_800E6860
/* 806DC 800E722C 00000000 */   nop
/* 806E0 800E7230 2403FFDF */  addiu     $v1, $zero, -0x21
/* 806E4 800E7234 8E820000 */  lw        $v0, 0x0($s4)
/* 806E8 800E7238 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 806EC 800E723C 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 806F0 800E7240 3C018011 */  lui       $at, %hi(D_8010CD00)
/* 806F4 800E7244 A420CD00 */  sh        $zero, %lo(D_8010CD00)($at)
/* 806F8 800E7248 00431024 */  and       $v0, $v0, $v1
/* 806FC 800E724C AE820000 */  sw        $v0, 0x0($s4)
/* 80700 800E7250 8C820000 */  lw        $v0, 0x0($a0)
/* 80704 800E7254 2403FFBF */  addiu     $v1, $zero, -0x41
/* 80708 800E7258 00431024 */  and       $v0, $v0, $v1
/* 8070C 800E725C 0C038069 */  jal       enable_player_input
/* 80710 800E7260 AC820000 */   sw       $v0, 0x0($a0)
/* 80714 800E7264 0C03BD80 */  jal       partner_enable_input
/* 80718 800E7268 00000000 */   nop
glabel .L800E726C
/* 8071C 800E726C 8FBF0024 */  lw        $ra, 0x24($sp)
/* 80720 800E7270 8FB40020 */  lw        $s4, 0x20($sp)
/* 80724 800E7274 8FB3001C */  lw        $s3, 0x1C($sp)
/* 80728 800E7278 8FB20018 */  lw        $s2, 0x18($sp)
/* 8072C 800E727C 8FB10014 */  lw        $s1, 0x14($sp)
/* 80730 800E7280 8FB00010 */  lw        $s0, 0x10($sp)
/* 80734 800E7284 03E00008 */  jr        $ra
/* 80738 800E7288 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void check_input_open_menus(void) {
    static s16 D_8010C9C0;

    PartnerStatus* partnerStatus;
    PlayerStatus* playerStatus;
    PlayerData* playerData;
    PopupMenu* popup;
    s32 flags;
    s32 numEntries;
    s32 pressedButtons;
    s32 currentButtons;
    s8* partnerActionState;

    partnerStatus = &gPartnerStatus;
    playerStatus = &gPlayerStatus;
    playerData = &gPlayerData;
    popup = &D_8010C9C8;

    if (gGameStatusPtr->disableScripts ||
        (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) ||
        evt_get_variable(NULL, GB_StoryProgress) == STORY_INTRO)
    {
        return;
    }

    if (partnerStatus->partnerActionState != 0 &&
        (partnerStatus->actingPartner == PARTNER_SUSHIE ||
         partnerStatus->actingPartner == PARTNER_LAKILESTER ||
         partnerStatus->actingPartner == PARTNER_BOW))
    {
        currentButtons = partnerStatus->currentButtons;
        pressedButtons = partnerStatus->pressedButtons;
    } else {
        currentButtons = playerStatus->currentButtons;
        pressedButtons = playerStatus->pressedButtons;
    }
    partnerActionState = &partnerStatus->partnerActionState;

    if (evt_get_variable(NULL, GB_StoryProgress) >= STORY_EPILOGUE) {
        currentButtons &= ~(BUTTON_C_LEFT | BUTTON_C_RIGHT);
        pressedButtons &= ~(BUTTON_C_LEFT | BUTTON_C_RIGHT);
    }

    switch (D_8010CD00) {
        case 0:
            if (can_pause(currentButtons, pressedButtons)) {
                D_8010CCF8 = 1;
                if (pressedButtons & 1) {
                    D_8010CCF8 = 0;
                }
                if (pressedButtons & BUTTON_START) {
                    D_8010CCF8 = 2;
                }
                D_8010C9C0 = FALSE;
block_17:
                switch (D_8010CCF8) {
                    case 0:
                        if (playerStatus->flags & PS_FLAG_NO_CHANGE_PARTNER) {
                            sfx_play_sound(SOUND_MENU_ERROR);
                            if (D_8010C9C0) {
                                func_800E6860();
                                playerStatus->flags &= ~PS_FLAG_PAUSED;
                                gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
                                set_time_freeze_mode(TIME_FREEZE_NORMAL);
                            }
                        } else {
                            numEntries = setup_partner_popup(popup);
                            if (numEntries == 0) {
                                return;
                            }
                            popup->numEntries = numEntries;
                            popup->popupType = POPUP_MENU_SWITCH_PARTNER;
                            popup->initialPos = D_8008EEF0[playerData->currentPartner] - 1;
                            break;
                        }
                        return;
                    case 1:
                        numEntries = setup_item_popup(popup);
                        if (numEntries == 0) {
                            return;
                        }
                        popup->popupType = POPUP_MENU_USE_ITEM;
                        popup->numEntries = numEntries;
                        popup->initialPos = 0;
                        break;
                }
                playerStatus->flags |= PS_FLAG_PAUSED;
                disable_player_input();
                partner_disable_input();
                D_8010CCFA = 3;
                D_8010CD00 = 1;
                D_8010CCFE = playerStatus->inputDisabledCount;
            }
            break;
        case 1:
            flags = ~PS_FLAG_PAUSED;
            if ((func_800E6904() == 0) || is_picking_up_item() || D_8010CCFE < playerStatus->inputDisabledCount != 0) {
                playerStatus->flags &= flags;
                enable_player_input();
                partner_enable_input();
                D_8010CD00 = 0;
                if (D_8010C9C0) {
                    func_800E6860();
                    playerStatus->flags &= ~PS_FLAG_PAUSED;
                    gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
                    set_time_freeze_mode(TIME_FREEZE_NORMAL);
                }
            } else {
                D_8010CCFA--;
                if (D_8010CCFA == 0) {
                    D_8010CD00 = 2;
                    gOverrideFlags |= GLOBAL_OVERRIDES_40;
                }
            }
            break;
        case 2:
            if (D_8010CCF8 == 2) {
                set_game_mode(GAME_MODE_PAUSE);
                sfx_play_sound(SOUND_MENU_OPEN);
                D_8010CCFA = 10;
                D_8010CD00 = 10;
                return;
            }
            create_standard_popup_menu(popup);
            set_time_freeze_mode(TIME_FREEZE_POPUP_MENU);
            if (*partnerActionState == PARTNER_ACTION_NONE) {
                set_action_state(ACTION_STATE_IDLE);
            }
            D_8010CD00++;
            break;
        case 3:
            if (popup->result != POPUP_RESULT_MINUS_1) {
                D_8010CCFC = popup->result;
                if (D_8010CCFC != POPUP_RESULT_CHOOSING) {
                    hide_popup_menu();
                    D_8010CCFA = 15;
                    D_8010CD00++;
                }
            }
            break;
        case 4:
            D_8010CCFA--;
            if (D_8010CCFA == 0) {
                destroy_popup_menu();
                D_8010CD00 = 0;
                enable_player_input();
                partner_enable_input();
                if (D_8010CCFC == POPUP_RESULT_MINUS_2) {
                    if ((setup_partner_popup(popup) == 0) || (setup_item_popup(popup) == 0)) {
                        D_8010CCFC = POPUP_RESULT_CANCEL;
                    } else {
                        switch (D_8010CCF8) {
                            case 0:
                                D_8010CCF8 = 1;
                                break;
                            case 1:
                                D_8010CCF8 = 0;
                                break;
                        }
                        D_8010C9C0 = TRUE;
                        goto block_17; // TODO required to match
                    }
                }

                if (D_8010CCFC != POPUP_RESULT_CANCEL) {
                    switch (D_8010CCF8) {
                        case 0:
                            switch_to_partner(popup->userIndex[D_8010CCFC - 1]);
                            break;
                        case 1:
                            do {
                                use_consumable(popup->userIndex[D_8010CCFC - 1]);
                            } while (0); // todo required to match
                            gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS;
                            break;
                    }
                }
                func_800E6860();
                playerStatus->flags &= ~PS_FLAG_PAUSED;
                gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
                set_time_freeze_mode(TIME_FREEZE_NORMAL);
            }
            break;
        case 10:
            D_8010CCFA--;
            if (D_8010CCFA == 0) {
                func_800E6860();
                D_8010CD00 = 0;
                playerStatus->flags &= ~PS_FLAG_PAUSED;
                gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
                enable_player_input();
                partner_enable_input();
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_8024A990
/* 179270 8024A990 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 179274 8024A994 AFB00020 */  sw        $s0, 0x20($sp)
/* 179278 8024A998 3C10800B */  lui       $s0, %hi(gCameras + 0x558)
/* 17927C 8024A99C 261022D8 */  addiu     $s0, $s0, %lo(gCameras + 0x558)
/* 179280 8024A9A0 3C02802A */  lui       $v0, %hi(BattleCam_TargetActor)
/* 179284 8024A9A4 9442F27C */  lhu       $v0, %lo(BattleCam_TargetActor)($v0)
.L8024A9A8:
/* 179288 8024A9A8 3C04800E */  lui       $a0, %hi(gBattleStatus)
/* 17928C 8024A9AC 2484C070 */  addiu     $a0, $a0, %lo(gBattleStatus)
/* 179290 8024A9B0 AFBF0024 */  sw        $ra, 0x24($sp)
D_8024A9B4:
/* 179294 8024A9B4 F7BE0050 */  sdc1      $f30, 0x50($sp)
/* 179298 8024A9B8 F7BC0048 */  sdc1      $f28, 0x48($sp)
/* 17929C 8024A9BC F7BA0040 */  sdc1      $f26, 0x40($sp)
/* 1792A0 8024A9C0 F7B80038 */  sdc1      $f24, 0x38($sp)
/* 1792A4 8024A9C4 F7B60030 */  sdc1      $f22, 0x30($sp)
D_8024A9C8:
/* 1792A8 8024A9C8 F7B40028 */  sdc1      $f20, 0x28($sp)
D_8024A9CC:
/* 1792AC 8024A9CC 30430700 */  andi      $v1, $v0, 0x700
/* 1792B0 8024A9D0 304600FF */  andi      $a2, $v0, 0xFF
/* 1792B4 8024A9D4 24020100 */  addiu     $v0, $zero, 0x100
/* 1792B8 8024A9D8 1062002B */  beq       $v1, $v0, .L8024AA88
/* 1792BC 8024A9DC 28620101 */   slti     $v0, $v1, 0x101
/* 1792C0 8024A9E0 10400005 */  beqz      $v0, .L8024A9F8
/* 1792C4 8024A9E4 24020200 */   addiu    $v0, $zero, 0x200
/* 1792C8 8024A9E8 10600007 */  beqz      $v1, .L8024AA08
/* 1792CC 8024A9EC 24020002 */   addiu    $v0, $zero, 0x2
/* 1792D0 8024A9F0 08092BEF */  j         .L8024AFBC
/* 1792D4 8024A9F4 00000000 */   nop
.L8024A9F8:
/* 1792D8 8024A9F8 10620026 */  beq       $v1, $v0, .L8024AA94
/* 1792DC 8024A9FC 24020002 */   addiu    $v0, $zero, 0x2
/* 1792E0 8024AA00 08092BEF */  j         .L8024AFBC
/* 1792E4 8024AA04 00000000 */   nop
.L8024AA08:
/* 1792E8 8024AA08 8C8400D8 */  lw        $a0, 0xD8($a0)
/* 1792EC 8024AA0C 14800005 */  bnez      $a0, .L8024AA24
/* 1792F0 8024AA10 00000000 */   nop
.L8024AA14:
/* 1792F4 8024AA14 0C093903 */  jal       func_8024E40C
/* 1792F8 8024AA18 24040002 */   addiu    $a0, $zero, 0x2
/* 1792FC 8024AA1C 08092BEF */  j         .L8024AFBC
D_8024AA20:
/* 179300 8024AA20 0000102D */   daddu    $v0, $zero, $zero
.L8024AA24:
/* 179304 8024AA24 3C028011 */  lui       $v0, %hi(gPlayerStatus)
D_8024AA28:
/* 179308 8024AA28 2442EFC8 */  addiu     $v0, $v0, %lo(gPlayerStatus)
/* 17930C 8024AA2C 944200B0 */  lhu       $v0, 0xB0($v0)
/* 179310 8024AA30 C4820148 */  lwc1      $f2, 0x148($a0)
/* 179314 8024AA34 00021400 */  sll       $v0, $v0, 16
/* 179318 8024AA38 00021C03 */  sra       $v1, $v0, 16
.L8024AA3C:
/* 17931C 8024AA3C 000217C2 */  srl       $v0, $v0, 31
/* 179320 8024AA40 00621821 */  addu      $v1, $v1, $v0
/* 179324 8024AA44 00031843 */  sra       $v1, $v1, 1
/* 179328 8024AA48 44830000 */  mtc1      $v1, $f0
/* 17932C 8024AA4C 00000000 */  nop
/* 179330 8024AA50 46800020 */  cvt.s.w   $f0, $f0
/* 179334 8024AA54 46001080 */  add.s     $f2, $f2, $f0
/* 179338 8024AA58 C49A0144 */  lwc1      $f26, 0x144($a0)
/* 17933C 8024AA5C E7A20010 */  swc1      $f2, 0x10($sp)
/* 179340 8024AA60 90820191 */  lbu       $v0, 0x191($a0)
/* 179344 8024AA64 90830190 */  lbu       $v1, 0x190($a0)
/* 179348 8024AA68 44824000 */  mtc1      $v0, $f8
/* 17934C 8024AA6C 00000000 */  nop
/* 179350 8024AA70 46804220 */  cvt.s.w   $f8, $f8
/* 179354 8024AA74 44833000 */  mtc1      $v1, $f6
/* 179358 8024AA78 00000000 */  nop
.L8024AA7C:
/* 17935C 8024AA7C 468031A0 */  cvt.s.w   $f6, $f6
.L8024AA80:
/* 179360 8024AA80 08092ABB */  j         .L8024AAEC
/* 179364 8024AA84 46064080 */   add.s    $f2, $f8, $f6
.L8024AA88:
/* 179368 8024AA88 8C8400DC */  lw        $a0, 0xDC($a0)
/* 17936C 8024AA8C 08092AA8 */  j         .L8024AAA0
/* 179370 8024AA90 00000000 */   nop
.L8024AA94:
/* 179374 8024AA94 00061080 */  sll       $v0, $a2, 2
/* 179378 8024AA98 00441021 */  addu      $v0, $v0, $a0
/* 17937C 8024AA9C 8C4400E0 */  lw        $a0, 0xE0($v0)
.L8024AAA0:
/* 179380 8024AAA0 1080FFDC */  beqz      $a0, .L8024AA14
/* 179384 8024AAA4 00000000 */   nop
/* 179388 8024AAA8 90830191 */  lbu       $v1, 0x191($a0)
/* 17938C 8024AAAC C4820148 */  lwc1      $f2, 0x148($a0)
D_8024AAB0:
/* 179390 8024AAB0 00031042 */  srl       $v0, $v1, 1
D_8024AAB4:
/* 179394 8024AAB4 44820000 */  mtc1      $v0, $f0
D_8024AAB8:
/* 179398 8024AAB8 00000000 */  nop
D_8024AABC:
/* 17939C 8024AABC 46800020 */  cvt.s.w   $f0, $f0
D_8024AAC0:
/* 1793A0 8024AAC0 46001080 */  add.s     $f2, $f2, $f0
/* 1793A4 8024AAC4 C49A0144 */  lwc1      $f26, 0x144($a0)
/* 1793A8 8024AAC8 E7A20010 */  swc1      $f2, 0x10($sp)
/* 1793AC 8024AACC 90820190 */  lbu       $v0, 0x190($a0)
/* 1793B0 8024AAD0 44834000 */  mtc1      $v1, $f8
/* 1793B4 8024AAD4 00000000 */  nop
/* 1793B8 8024AAD8 46804220 */  cvt.s.w   $f8, $f8
/* 1793BC 8024AADC 44823000 */  mtc1      $v0, $f6
/* 1793C0 8024AAE0 00000000 */  nop
/* 1793C4 8024AAE4 468031A0 */  cvt.s.w   $f6, $f6
/* 1793C8 8024AAE8 46064080 */  add.s     $f2, $f8, $f6
.L8024AAEC:
/* 1793CC 8024AAEC 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 1793D0 8024AAF0 44810000 */  mtc1      $at, $f0
/* 1793D4 8024AAF4 C49C014C */  lwc1      $f28, 0x14C($a0)
/* 1793D8 8024AAF8 46001782 */  mul.s     $f30, $f2, $f0
/* 1793DC 8024AAFC 00000000 */  nop
/* 1793E0 8024AB00 3C02802A */  lui       $v0, %hi(D_8029F2A6)
/* 1793E4 8024AB04 8042F2A6 */  lb        $v0, %lo(D_8029F2A6)($v0)
.L8024AB08:
/* 1793E8 8024AB08 10400029 */  beqz      $v0, .L8024ABB0
.L8024AB0C:
/* 1793EC 8024AB0C 00000000 */   nop
D_8024AB10_DD77E0:
/* 1793F0 8024AB10 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 1793F4 8024AB14 C422F28C */  lwc1      $f2, %lo(BattleCam_InitialBoomLength)($at)
D_8024AB18_DD77E8:
/* 1793F8 8024AB18 3C0143FA */  lui       $at, (0x43FA0000 >> 16)
/* 1793FC 8024AB1C 44810000 */  mtc1      $at, $f0
D_8024AB20_DD77F0:
/* 179400 8024AB20 00000000 */  nop
/* 179404 8024AB24 46020001 */  sub.s     $f0, $f0, $f2
D_8024AB28_DD77F8:
/* 179408 8024AB28 3C01802A */  lui       $at, %hi(D_8029CC18)
/* 17940C 8024AB2C D422CC18 */  ldc1      $f2, %lo(D_8029CC18)($at)
D_8024AB30_DD7800:
/* 179410 8024AB30 46000021 */  cvt.d.s   $f0, $f0
/* 179414 8024AB34 46220002 */  mul.d     $f0, $f0, $f2
jtbl_8024AB38:
/* 179418 8024AB38 00000000 */  nop
D_8024AB3C:
/* 17941C 8024AB3C 3C01403E */  lui       $at, (0x403E0000 >> 16)
/* 179420 8024AB40 44811800 */  mtc1      $at, $f3
/* 179424 8024AB44 44801000 */  mtc1      $zero, $f2
/* 179428 8024AB48 00000000 */  nop
/* 17942C 8024AB4C 46220000 */  add.d     $f0, $f0, $f2
.L8024AB50:
/* 179430 8024AB50 46200120 */  cvt.s.d   $f4, $f0
/* 179434 8024AB54 46002007 */  neg.s     $f0, $f4
/* 179438 8024AB58 4600D03C */  c.lt.s    $f26, $f0
/* 17943C 8024AB5C 00000000 */  nop
/* 179440 8024AB60 45000008 */  bc1f      .L8024AB84
/* 179444 8024AB64 00000000 */   nop
/* 179448 8024AB68 461A0001 */  sub.s     $f0, $f0, $f26
.L8024AB6C:
/* 17944C 8024AB6C 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 179450 8024AB70 44811000 */  mtc1      $at, $f2
/* 179454 8024AB74 00000000 */  nop
/* 179458 8024AB78 46020002 */  mul.s     $f0, $f0, $f2
/* 17945C 8024AB7C 00000000 */  nop
/* 179460 8024AB80 4600D680 */  add.s     $f26, $f26, $f0
.L8024AB84:
/* 179464 8024AB84 461A203C */  c.lt.s    $f4, $f26
/* 179468 8024AB88 00000000 */  nop
/* 17946C 8024AB8C 45000008 */  bc1f      .L8024ABB0
/* 179470 8024AB90 00000000 */   nop
/* 179474 8024AB94 461A2001 */  sub.s     $f0, $f4, $f26
/* 179478 8024AB98 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17947C 8024AB9C 44811000 */  mtc1      $at, $f2
/* 179480 8024ABA0 00000000 */  nop
/* 179484 8024ABA4 46020002 */  mul.s     $f0, $f0, $f2
/* 179488 8024ABA8 00000000 */  nop
/* 17948C 8024ABAC 4600D680 */  add.s     $f26, $f26, $f0
.L8024ABB0:
/* 179490 8024ABB0 10A00043 */  beqz      $a1, .L8024ACC0
/* 179494 8024ABB4 00000000 */   nop
/* 179498 8024ABB8 3C0141C0 */  lui       $at, (0x41C00000 >> 16)
.L8024ABBC:
/* 17949C 8024ABBC 44810000 */  mtc1      $at, $f0
/* 1794A0 8024ABC0 00000000 */  nop
/* 1794A4 8024ABC4 46003181 */  sub.s     $f6, $f6, $f0
/* 1794A8 8024ABC8 46004201 */  sub.s     $f8, $f8, $f0
.L8024ABCC:
/* 1794AC 8024ABCC 44800000 */  mtc1      $zero, $f0
/* 1794B0 8024ABD0 00000000 */  nop
/* 1794B4 8024ABD4 4600303C */  c.lt.s    $f6, $f0
/* 1794B8 8024ABD8 00000000 */  nop
/* 1794BC 8024ABDC 45030001 */  bc1tl     .L8024ABE4
.L8024ABE0:
/* 1794C0 8024ABE0 46000186 */   mov.s    $f6, $f0
.L8024ABE4:
/* 1794C4 8024ABE4 4600403C */  c.lt.s    $f8, $f0
/* 1794C8 8024ABE8 00000000 */  nop
/* 1794CC 8024ABEC 45030001 */  bc1tl     .L8024ABF4
.L8024ABF0:
/* 1794D0 8024ABF0 46000206 */   mov.s    $f8, $f0
.L8024ABF4:
/* 1794D4 8024ABF4 86040026 */  lh        $a0, 0x26($s0)
.L8024ABF8:
/* 1794D8 8024ABF8 8602001E */  lh        $v0, 0x1E($s0)
/* 1794DC 8024ABFC 86030022 */  lh        $v1, 0x22($s0)
/* 1794E0 8024AC00 44820000 */  mtc1      $v0, $f0
/* 1794E4 8024AC04 00000000 */  nop
/* 1794E8 8024AC08 46800020 */  cvt.s.w   $f0, $f0
/* 1794EC 8024AC0C 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 1794F0 8024AC10 E420F28C */  swc1      $f0, %lo(BattleCam_InitialBoomLength)($at)
D_8024AC14:
/* 1794F4 8024AC14 44830000 */  mtc1      $v1, $f0
/* 1794F8 8024AC18 00000000 */  nop
/* 1794FC 8024AC1C 46800020 */  cvt.s.w   $f0, $f0
/* 179500 8024AC20 3C03802A */  lui       $v1, %hi(BattleCam_BoomLength)
/* 179504 8024AC24 2463F280 */  addiu     $v1, $v1, %lo(BattleCam_BoomLength)
/* 179508 8024AC28 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17950C 8024AC2C E420F294 */  swc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 179510 8024AC30 84620000 */  lh        $v0, 0x0($v1)
D_8024AC34:
/* 179514 8024AC34 46083000 */  add.s     $f0, $f6, $f8
.L8024AC38:
/* 179518 8024AC38 44821000 */  mtc1      $v0, $f2
/* 17951C 8024AC3C 00000000 */  nop
/* 179520 8024AC40 468010A0 */  cvt.s.w   $f2, $f2
.L8024AC44:
/* 179524 8024AC44 86020024 */  lh        $v0, 0x24($s0)
/* 179528 8024AC48 46001080 */  add.s     $f2, $f2, $f0
/* 17952C 8024AC4C 44820000 */  mtc1      $v0, $f0
/* 179530 8024AC50 00000000 */  nop
glabel func_8024AC54
/* 179534 8024AC54 46800020 */  cvt.s.w   $f0, $f0
/* 179538 8024AC58 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17953C 8024AC5C E420F290 */  swc1      $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 179540 8024AC60 4600148D */  trunc.w.s $f18, $f2
/* 179544 8024AC64 44029000 */  mfc1      $v0, $f18
/* 179548 8024AC68 04810002 */  bgez      $a0, .L8024AC74
/* 17954C 8024AC6C A4620000 */   sh       $v0, 0x0($v1)
/* 179550 8024AC70 248400FF */  addiu     $a0, $a0, 0xFF
.L8024AC74:
/* 179554 8024AC74 00041203 */  sra       $v0, $a0, 8
/* 179558 8024AC78 C6020054 */  lwc1      $f2, 0x54($s0)
D_8024AC7C:
/* 17955C 8024AC7C C6040058 */  lwc1      $f4, 0x58($s0)
/* 179560 8024AC80 C606005C */  lwc1      $f6, 0x5C($s0)
/* 179564 8024AC84 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeLeft)
/* 179568 8024AC88 9463F29E */  lhu       $v1, %lo(BattleCam_MoveTimeLeft)($v1)
D_8024AC8C:
/* 17956C 8024AC8C 44820000 */  mtc1      $v0, $f0
/* 179570 8024AC90 00000000 */  nop
/* 179574 8024AC94 46800020 */  cvt.s.w   $f0, $f0
.L8024AC98:
/* 179578 8024AC98 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
D_8024AC9C:
/* 17957C 8024AC9C E420F298 */  swc1      $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 179580 8024ACA0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 179584 8024ACA4 E422F2A8 */  swc1      $f2, %lo(BattleCam_InitialPosX)($at)
/* 179588 8024ACA8 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 17958C 8024ACAC E424F2AC */  swc1      $f4, %lo(BattleCam_InitialPosY)($at)
.L8024ACB0:
/* 179590 8024ACB0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 179594 8024ACB4 E426F2B0 */  swc1      $f6, %lo(BattleCam_InitialPosZ)($at)
D_8024ACB8:
/* 179598 8024ACB8 3C01802A */  lui       $at, %hi(BattleCam_MoveTimeTotal)
/* 17959C 8024ACBC A423F2A0 */  sh        $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L8024ACC0:
/* 1795A0 8024ACC0 3C02802A */  lui       $v0, %hi(BattleCam_UseLinearInterp)
/* 1795A4 8024ACC4 8042F2A5 */  lb        $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 1795A8 8024ACC8 14400027 */  bnez      $v0, .L8024AD68
/* 1795AC 8024ACCC 00000000 */   nop
/* 1795B0 8024ACD0 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 1795B4 8024ACD4 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
.L8024ACD8:
/* 1795B8 8024ACD8 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 1795BC 8024ACDC 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 1795C0 8024ACE0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1795C4 8024ACE4 4481C000 */  mtc1      $at, $f24
.L8024ACE8:
/* 1795C8 8024ACE8 4482A000 */  mtc1      $v0, $f20
/* 1795CC 8024ACEC 00000000 */  nop
/* 1795D0 8024ACF0 4680A520 */  cvt.s.w   $f20, $f20
/* 1795D4 8024ACF4 44830000 */  mtc1      $v1, $f0
/* 1795D8 8024ACF8 00000000 */  nop
/* 1795DC 8024ACFC 46800020 */  cvt.s.w   $f0, $f0
/* 1795E0 8024AD00 4600A503 */  div.s     $f20, $f20, $f0
/* 1795E4 8024AD04 4614C301 */  sub.s     $f12, $f24, $f20
/* 1795E8 8024AD08 3C014049 */  lui       $at, (0x40490FD0 >> 16)
.L8024AD0C:
/* 1795EC 8024AD0C 34210FD0 */  ori       $at, $at, (0x40490FD0 & 0xFFFF)
/* 1795F0 8024AD10 4481B000 */  mtc1      $at, $f22
/* 1795F4 8024AD14 00000000 */  nop
/* 1795F8 8024AD18 46166302 */  mul.s     $f12, $f12, $f22
/* 1795FC 8024AD1C 00000000 */  nop
/* 179600 8024AD20 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 179604 8024AD24 4481A000 */  mtc1      $at, $f20
/* 179608 8024AD28 00000000 */  nop
/* 17960C 8024AD2C 46146302 */  mul.s     $f12, $f12, $f20
.L8024AD30:
/* 179610 8024AD30 0C00A85B */  jal       sin_rad
.L8024AD34:
/* 179614 8024AD34 00000000 */   nop
/* 179618 8024AD38 46160002 */  mul.s     $f0, $f0, $f22
/* 17961C 8024AD3C 00000000 */  nop
/* 179620 8024AD40 46140302 */  mul.s     $f12, $f0, $f20
/* 179624 8024AD44 0C00A85B */  jal       sin_rad
/* 179628 8024AD48 00000000 */   nop
/* 17962C 8024AD4C 46160002 */  mul.s     $f0, $f0, $f22
/* 179630 8024AD50 00000000 */  nop
/* 179634 8024AD54 46140302 */  mul.s     $f12, $f0, $f20
/* 179638 8024AD58 0C00A85B */  jal       sin_rad
/* 17963C 8024AD5C 00000000 */   nop
/* 179640 8024AD60 08092B65 */  j         .L8024AD94
/* 179644 8024AD64 4600C501 */   sub.s    $f20, $f24, $f0
.L8024AD68:
/* 179648 8024AD68 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17964C 8024AD6C 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 179650 8024AD70 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 179654 8024AD74 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 179658 8024AD78 4482A000 */  mtc1      $v0, $f20
/* 17965C 8024AD7C 00000000 */  nop
/* 179660 8024AD80 4680A520 */  cvt.s.w   $f20, $f20
/* 179664 8024AD84 44830000 */  mtc1      $v1, $f0
/* 179668 8024AD88 00000000 */  nop
/* 17966C 8024AD8C 46800020 */  cvt.s.w   $f0, $f0
glabel func_8024AD90
/* 179670 8024AD90 4600A503 */  div.s     $f20, $f20, $f0
.L8024AD94:
/* 179674 8024AD94 3C02802A */  lui       $v0, %hi(BattleCam_ModeX)
/* 179678 8024AD98 8042F2A3 */  lb        $v0, %lo(BattleCam_ModeX)($v0)
/* 17967C 8024AD9C 10400013 */  beqz      $v0, .L8024ADEC
/* 179680 8024ADA0 00000000 */   nop
/* 179684 8024ADA4 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 179688 8024ADA8 C424F2A8 */  lwc1      $f4, %lo(BattleCam_InitialPosX)($at)
.L8024ADAC:
/* 17968C 8024ADAC 46142102 */  mul.s     $f4, $f4, $f20
/* 179690 8024ADB0 00000000 */  nop
/* 179694 8024ADB4 3C02802A */  lui       $v0, %hi(D_8029F2A7)
/* 179698 8024ADB8 8042F2A7 */  lb        $v0, %lo(D_8029F2A7)($v0)
/* 17969C 8024ADBC 44821000 */  mtc1      $v0, $f2
/* 1796A0 8024ADC0 00000000 */  nop
/* 1796A4 8024ADC4 468010A0 */  cvt.s.w   $f2, $f2
/* 1796A8 8024ADC8 4602D080 */  add.s     $f2, $f26, $f2
/* 1796AC 8024ADCC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1796B0 8024ADD0 44810000 */  mtc1      $at, $f0
/* 1796B4 8024ADD4 00000000 */  nop
/* 1796B8 8024ADD8 46140001 */  sub.s     $f0, $f0, $f20
/* 1796BC 8024ADDC 46001082 */  mul.s     $f2, $f2, $f0
glabel func_8024ADE0
/* 1796C0 8024ADE0 00000000 */  nop
D_8024ADE4:
/* 1796C4 8024ADE4 46022100 */  add.s     $f4, $f4, $f2
/* 1796C8 8024ADE8 E6040054 */  swc1      $f4, 0x54($s0)
.L8024ADEC:
/* 1796CC 8024ADEC 3C02802A */  lui       $v0, %hi(BattleCam_ModeY)
/* 1796D0 8024ADF0 8042F2A2 */  lb        $v0, %lo(BattleCam_ModeY)($v0)
/* 1796D4 8024ADF4 1040000E */  beqz      $v0, .L8024AE30
/* 1796D8 8024ADF8 00000000 */   nop
/* 1796DC 8024ADFC 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 1796E0 8024AE00 C422F2AC */  lwc1      $f2, %lo(BattleCam_InitialPosY)($at)
/* 1796E4 8024AE04 46141082 */  mul.s     $f2, $f2, $f20
/* 1796E8 8024AE08 00000000 */  nop
/* 1796EC 8024AE0C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 1796F0 8024AE10 44810000 */  mtc1      $at, $f0
/* 1796F4 8024AE14 00000000 */  nop
/* 1796F8 8024AE18 46140001 */  sub.s     $f0, $f0, $f20
/* 1796FC 8024AE1C C7B20010 */  lwc1      $f18, 0x10($sp)
/* 179700 8024AE20 46009002 */  mul.s     $f0, $f18, $f0
/* 179704 8024AE24 00000000 */  nop
/* 179708 8024AE28 46001080 */  add.s     $f2, $f2, $f0
/* 17970C 8024AE2C E6020058 */  swc1      $f2, 0x58($s0)
.L8024AE30:
/* 179710 8024AE30 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 179714 8024AE34 C430F2B0 */  lwc1      $f16, %lo(BattleCam_InitialPosZ)($at)
/* 179718 8024AE38 46148402 */  mul.s     $f16, $f16, $f20
/* 17971C 8024AE3C 00000000 */  nop
/* 179720 8024AE40 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 179724 8024AE44 C42CF298 */  lwc1      $f12, %lo(BattleCam_InitialBoomZOffset)($at)
/* 179728 8024AE48 46146302 */  mul.s     $f12, $f12, $f20
/* 17972C 8024AE4C 00000000 */  nop
/* 179730 8024AE50 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 179734 8024AE54 C42EF28C */  lwc1      $f14, %lo(BattleCam_InitialBoomLength)($at)
.L8024AE58:
/* 179738 8024AE58 46147382 */  mul.s     $f14, $f14, $f20
/* 17973C 8024AE5C 00000000 */  nop
/* 179740 8024AE60 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 179744 8024AE64 C428F290 */  lwc1      $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 179748 8024AE68 46144202 */  mul.s     $f8, $f8, $f20
/* 17974C 8024AE6C 00000000 */  nop
dgb_01_img6_gfx:
/* 179750 8024AE70 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 179754 8024AE74 C426F294 */  lwc1      $f6, %lo(BattleCam_InitialBoomPitch)($at)
/* 179758 8024AE78 46143182 */  mul.s     $f6, $f6, $f20
/* 17975C 8024AE7C 00000000 */  nop
/* 179760 8024AE80 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 179764 8024AE84 44812000 */  mtc1      $at, $f4
.L8024AE88:
/* 179768 8024AE88 3C02802A */  lui       $v0, %hi(BattleCam_BoomZOffset)
/* 17976C 8024AE8C 8442F286 */  lh        $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 179770 8024AE90 46142101 */  sub.s     $f4, $f4, $f20
D_8024AE94:
/* 179774 8024AE94 44820000 */  mtc1      $v0, $f0
/* 179778 8024AE98 00000000 */  nop
/* 17977C 8024AE9C 46800020 */  cvt.s.w   $f0, $f0
/* 179780 8024AEA0 46040002 */  mul.s     $f0, $f0, $f4
/* 179784 8024AEA4 00000000 */  nop
/* 179788 8024AEA8 3C02802A */  lui       $v0, %hi(BattleCam_BoomLength)
/* 17978C 8024AEAC 8442F280 */  lh        $v0, %lo(BattleCam_BoomLength)($v0)
/* 179790 8024AEB0 4604E702 */  mul.s     $f28, $f28, $f4
/* 179794 8024AEB4 00000000 */  nop
/* 179798 8024AEB8 44825000 */  mtc1      $v0, $f10
/* 17979C 8024AEBC 00000000 */  nop
/* 1797A0 8024AEC0 468052A0 */  cvt.s.w   $f10, $f10
D_8024AEC4:
/* 1797A4 8024AEC4 3C02802A */  lui       $v0, %hi(BattleCam_BoomYaw)
D_8024AEC8:
/* 1797A8 8024AEC8 8442F282 */  lh        $v0, %lo(BattleCam_BoomYaw)($v0)
/* 1797AC 8024AECC 44821000 */  mtc1      $v0, $f2
/* 1797B0 8024AED0 00000000 */  nop
/* 1797B4 8024AED4 468010A0 */  cvt.s.w   $f2, $f2
/* 1797B8 8024AED8 46041082 */  mul.s     $f2, $f2, $f4
/* 1797BC 8024AEDC 00000000 */  nop
.L8024AEE0:
/* 1797C0 8024AEE0 46006300 */  add.s     $f12, $f12, $f0
/* 1797C4 8024AEE4 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 1797C8 8024AEE8 44810000 */  mtc1      $at, $f0
/* 1797CC 8024AEEC 00000000 */  nop
dgb_01_img7_png:
/* 1797D0 8024AEF0 46006302 */  mul.s     $f12, $f12, $f0
/* 1797D4 8024AEF4 00000000 */  nop
glabel func_8024AEF8
/* 1797D8 8024AEF8 3C014200 */  lui       $at, (0x42000000 >> 16)
/* 1797DC 8024AEFC 44810000 */  mtc1      $at, $f0
/* 1797E0 8024AF00 00000000 */  nop
/* 1797E4 8024AF04 4600F001 */  sub.s     $f0, $f30, $f0
/* 1797E8 8024AF08 3C02802A */  lui       $v0, %hi(BattleCam_BoomPitch)
/* 1797EC 8024AF0C 8442F284 */  lh        $v0, %lo(BattleCam_BoomPitch)($v0)
/* 1797F0 8024AF10 46005280 */  add.s     $f10, $f10, $f0
/* 1797F4 8024AF14 44820000 */  mtc1      $v0, $f0
/* 1797F8 8024AF18 00000000 */  nop
/* 1797FC 8024AF1C 46800020 */  cvt.s.w   $f0, $f0
/* 179800 8024AF20 46040002 */  mul.s     $f0, $f0, $f4
/* 179804 8024AF24 00000000 */  nop
/* 179808 8024AF28 46045282 */  mul.s     $f10, $f10, $f4
/* 17980C 8024AF2C 00000000 */  nop
/* 179810 8024AF30 E7BC0018 */  swc1      $f28, 0x18($sp)
/* 179814 8024AF34 461C8400 */  add.s     $f16, $f16, $f28
/* 179818 8024AF38 46024200 */  add.s     $f8, $f8, $f2
/* 17981C 8024AF3C 3C04802A */  lui       $a0, %hi(BattleCam_MoveTimeLeft)
/* 179820 8024AF40 2484F29E */  addiu     $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 179824 8024AF44 E610005C */  swc1      $f16, 0x5C($s0)
/* 179828 8024AF48 46003180 */  add.s     $f6, $f6, $f0
/* 17982C 8024AF4C 4600448D */  trunc.w.s $f18, $f8
/* 179830 8024AF50 44029000 */  mfc1      $v0, $f18
/* 179834 8024AF54 00000000 */  nop
/* 179838 8024AF58 A6020024 */  sh        $v0, 0x24($s0)
/* 17983C 8024AF5C 460A7380 */  add.s     $f14, $f14, $f10
/* 179840 8024AF60 4600348D */  trunc.w.s $f18, $f6
/* 179844 8024AF64 44029000 */  mfc1      $v0, $f18
/* 179848 8024AF68 00000000 */  nop
/* 17984C 8024AF6C A6020022 */  sh        $v0, 0x22($s0)
/* 179850 8024AF70 4600748D */  trunc.w.s $f18, $f14
/* 179854 8024AF74 44029000 */  mfc1      $v0, $f18
/* 179858 8024AF78 00000000 */  nop
/* 17985C 8024AF7C A602001E */  sh        $v0, 0x1E($s0)
/* 179860 8024AF80 4600648D */  trunc.w.s $f18, $f12
/* 179864 8024AF84 44029000 */  mfc1      $v0, $f18
/* 179868 8024AF88 00000000 */  nop
/* 17986C 8024AF8C A6020026 */  sh        $v0, 0x26($s0)
/* 179870 8024AF90 84820000 */  lh        $v0, 0x0($a0)
/* 179874 8024AF94 94830000 */  lhu       $v1, 0x0($a0)
/* 179878 8024AF98 14400006 */  bnez      $v0, .L8024AFB4
/* 17987C 8024AF9C 2462FFFF */   addiu    $v0, $v1, -0x1
/* 179880 8024AFA0 24020001 */  addiu     $v0, $zero, 0x1
/* 179884 8024AFA4 3C01802A */  lui       $at, %hi(BattleCam_DoneMoving)
/* 179888 8024AFA8 A022F29C */  sb        $v0, %lo(BattleCam_DoneMoving)($at)
/* 17988C 8024AFAC 08092BEF */  j         .L8024AFBC
/* 179890 8024AFB0 0000102D */   daddu    $v0, $zero, $zero
.L8024AFB4:
/* 179894 8024AFB4 A4820000 */  sh        $v0, 0x0($a0)
/* 179898 8024AFB8 0000102D */  daddu     $v0, $zero, $zero
.L8024AFBC:
/* 17989C 8024AFBC 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1798A0 8024AFC0 8FB00020 */  lw        $s0, 0x20($sp)
/* 1798A4 8024AFC4 D7BE0050 */  ldc1      $f30, 0x50($sp)
/* 1798A8 8024AFC8 D7BC0048 */  ldc1      $f28, 0x48($sp)
/* 1798AC 8024AFCC D7BA0040 */  ldc1      $f26, 0x40($sp)
/* 1798B0 8024AFD0 D7B80038 */  ldc1      $f24, 0x38($sp)
/* 1798B4 8024AFD4 D7B60030 */  ldc1      $f22, 0x30($sp)
/* 1798B8 8024AFD8 D7B40028 */  ldc1      $f20, 0x28($sp)
/* 1798BC 8024AFDC 03E00008 */  jr        $ra
/* 1798C0 8024AFE0 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

s32 CamPresetUpdate_I(Evt* script, s32 isInitialCall) {
    Actor* actor;
    Camera* camera = &gCameras[CAM_BATTLE];
    BattleStatus* battleStatus = &gBattleStatus;
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 x, y, z;
    f32 sizeX, sizeY;
    f32 averageSize, targetAverageSize;
    f32 alpha;
    f32 extraLength;
    s32 actorClass = BattleCam_TargetActor & ACTOR_CLASS_MASK;
    s32 actorID = BattleCam_TargetActor & 0xFF;

    switch (actorClass) {
        case ACTOR_CLASS_PLAYER:
            actor = battleStatus->playerActor;
            if (actor == NULL) {
                btl_cam_use_preset(BTL_CAM_DEFAULT);
                return ApiStatus_BLOCK;
            }
            x = actor->currentPos.x;
            y = actor->currentPos.y + playerStatus->colliderHeight / 2;
            z = actor->currentPos.z;

            sizeY = actor->size.y;
            sizeX = actor->size.x;
            averageSize = (sizeY + sizeX) / 2;
            break;
        case ACTOR_CLASS_PARTNER:
            actor = battleStatus->partnerActor;
            if (actor == NULL) {
                btl_cam_use_preset(BTL_CAM_DEFAULT);
                return ApiStatus_BLOCK;
            }
            x = actor->currentPos.x;
            y = actor->currentPos.y + actor->size.y / 2;
            z = actor->currentPos.z;

            sizeY = actor->size.y;
            sizeX = actor->size.x;
            averageSize = (sizeY + sizeX) / 2;
            break;
        case ACTOR_CLASS_ENEMY:
            actor = battleStatus->enemyActors[actorID];
            if (actor == NULL) {
                btl_cam_use_preset(BTL_CAM_DEFAULT);
                return ApiStatus_BLOCK;
            }
            x = actor->currentPos.x;
            y = actor->currentPos.y + actor->size.y / 2;
            z = actor->currentPos.z;

            sizeY = actor->size.y;
            sizeX = actor->size.x;
            averageSize = (sizeY + sizeX) / 2;
            break;
        default:
            return ApiStatus_DONE2;
    }

    if (D_8029F2A6) {
        f32 upperBound = (500.0f - BattleCam_InitialBoomLength) * 0.4 + 30.0;
        f32 lowerBound = -upperBound;

        if (x < lowerBound) {
            x += (lowerBound - x) / 2;
        }
        if (x > upperBound) {
            x += (upperBound - x) / 2;
        }
    }
    if (isInitialCall) {
        sizeX -= 24.0f;
        sizeY -= 24.0f;
        if (sizeX < 0.0f) {
            sizeX = 0.0f;
        }
        if (sizeY < 0.0f) {
            sizeY = 0.0f;
        }
        BattleCam_BoomLength += sizeX + sizeY;
        BattleCam_InitialBoomLength = camera->auxBoomLength;
        BattleCam_InitialBoomPitch = camera->auxBoomPitch;
        BattleCam_InitialBoomYaw = camera->auxBoomYaw;
        BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
        BattleCam_InitialPosX = camera->lookAt_obj_target.x;
        BattleCam_InitialPosY = camera->lookAt_obj_target.y;
        BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
        BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
    }

    if (!BattleCam_UseLinearInterp) {
        alpha = BattleCam_MoveTimeLeft;
        alpha /= BattleCam_MoveTimeTotal;
        alpha = 1.0f - sin_rad(sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2) * PI_S / 2);
    } else {
        alpha = BattleCam_MoveTimeLeft;
        alpha /= BattleCam_MoveTimeTotal;
    }

    if (BattleCam_ModeX != BTL_CAM_MODEX_0) {
        camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x + D_8029F2A7, alpha);
    }
    if (BattleCam_ModeY != BTL_CAM_MODEY_0) {
        camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
    }
    camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);

    camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
    extraLength = averageSize - 32.0f;
    camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength + extraLength, alpha);
    camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
    camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);

    if (BattleCam_MoveTimeLeft == 0) {
        BattleCam_DoneMoving = TRUE;
    } else {
        BattleCam_MoveTimeLeft--;
    }

    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel peach_star_beam_appendGfx
/* 3E585C E010C39C 27BDFF28 */  addiu     $sp, $sp, -0xD8
/* 3E5860 E010C3A0 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3E5864 E010C3A4 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3E5868 E010C3A8 AFB300B4 */  sw        $s3, 0xB4($sp)
/* 3E586C E010C3AC 0000982D */  daddu     $s3, $zero, $zero
/* 3E5870 E010C3B0 AFB700C4 */  sw        $s7, 0xC4($sp)
/* 3E5874 E010C3B4 3C17800A */  lui       $s7, %hi(gDisplayContext)
/* 3E5878 E010C3B8 26F7A674 */  addiu     $s7, $s7, %lo(gDisplayContext)
/* 3E587C E010C3BC AFB500BC */  sw        $s5, 0xBC($sp)
/* 3E5880 E010C3C0 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 3E5884 E010C3C4 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 3E5888 E010C3C8 AFB400B8 */  sw        $s4, 0xB8($sp)
/* 3E588C E010C3CC 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 3E5890 E010C3D0 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 3E5894 E010C3D4 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 3E5898 E010C3D8 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 3E589C E010C3DC AFB000A8 */  sw        $s0, 0xA8($sp)
/* 3E58A0 E010C3E0 0040802D */  daddu     $s0, $v0, $zero
/* 3E58A4 E010C3E4 AFB600C0 */  sw        $s6, 0xC0($sp)
/* 3E58A8 E010C3E8 3C16DE00 */  lui       $s6, (0xDE000000 >> 16)
/* 3E58AC E010C3EC AFB100AC */  sw        $s1, 0xAC($sp)
/* 3E58B0 E010C3F0 2411005C */  addiu     $s1, $zero, 0x5C
/* 3E58B4 E010C3F4 3C06800B */  lui       $a2, %hi(gCameras)
/* 3E58B8 E010C3F8 24C61D80 */  addiu     $a2, $a2, %lo(gCameras)
/* 3E58BC E010C3FC AFBF00CC */  sw        $ra, 0xCC($sp)
/* 3E58C0 E010C400 AFBE00C8 */  sw        $fp, 0xC8($sp)
/* 3E58C4 E010C404 AFB200B0 */  sw        $s2, 0xB0($sp)
/* 3E58C8 E010C408 F7B400D0 */  sdc1      $f20, 0xD0($sp)
/* 3E58CC E010C40C 8E050000 */  lw        $a1, 0x0($s0)
/* 3E58D0 E010C410 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 3E58D4 E010C414 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 3E58D8 E010C418 4480A000 */  mtc1      $zero, $f20
/* 3E58DC E010C41C 00031080 */  sll       $v0, $v1, 2
/* 3E58E0 E010C420 00431021 */  addu      $v0, $v0, $v1
/* 3E58E4 E010C424 00021080 */  sll       $v0, $v0, 2
/* 3E58E8 E010C428 00431023 */  subu      $v0, $v0, $v1
/* 3E58EC E010C42C 000218C0 */  sll       $v1, $v0, 3
/* 3E58F0 E010C430 00431021 */  addu      $v0, $v0, $v1
/* 3E58F4 E010C434 000210C0 */  sll       $v0, $v0, 3
/* 3E58F8 E010C438 00461021 */  addu      $v0, $v0, $a2
/* 3E58FC E010C43C 00A0182D */  daddu     $v1, $a1, $zero
/* 3E5900 E010C440 AFA200A0 */  sw        $v0, 0xA0($sp)
/* 3E5904 E010C444 8C92000C */  lw        $s2, 0xC($a0)
/* 3E5908 E010C448 24A50008 */  addiu     $a1, $a1, 0x8
/* 3E590C E010C44C AE050000 */  sw        $a1, 0x0($s0)
/* 3E5910 E010C450 8E4A0024 */  lw        $t2, 0x24($s2)
/* 3E5914 E010C454 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3E5918 E010C458 AFAA00A4 */  sw        $t2, 0xA4($sp)
/* 3E591C E010C45C AC620000 */  sw        $v0, 0x0($v1)
/* 3E5920 E010C460 24A20008 */  addiu     $v0, $a1, 0x8
/* 3E5924 E010C464 AC600004 */  sw        $zero, 0x4($v1)
/* 3E5928 E010C468 AE020000 */  sw        $v0, 0x0($s0)
/* 3E592C E010C46C ACA70000 */  sw        $a3, 0x0($a1)
/* 3E5930 E010C470 8C830010 */  lw        $v1, 0x10($a0)
/* 3E5934 E010C474 24A20010 */  addiu     $v0, $a1, 0x10
/* 3E5938 E010C478 AE020000 */  sw        $v0, 0x0($s0)
/* 3E593C E010C47C 8C63001C */  lw        $v1, 0x1C($v1)
/* 3E5940 E010C480 02C0102D */  daddu     $v0, $s6, $zero
/* 3E5944 E010C484 ACA20008 */  sw        $v0, 0x8($a1)
/* 3E5948 E010C488 3C020900 */  lui       $v0, %hi(D_09005090_412320)
/* 3E594C E010C48C 24425090 */  addiu     $v0, $v0, %lo(D_09005090_412320)
/* 3E5950 E010C490 ACA2000C */  sw        $v0, 0xC($a1)
/* 3E5954 E010C494 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 3E5958 E010C498 00621821 */  addu      $v1, $v1, $v0
/* 3E595C E010C49C ACA30004 */  sw        $v1, 0x4($a1)
.LE010C4A0:
/* 3E5960 E010C4A0 02511821 */  addu      $v1, $s2, $s1
/* 3E5964 E010C4A4 8C640000 */  lw        $a0, 0x0($v1)
/* 3E5968 E010C4A8 30820001 */  andi      $v0, $a0, 0x1
/* 3E596C E010C4AC 10400056 */  beqz      $v0, .LE010C608
/* 3E5970 E010C4B0 30820002 */   andi     $v0, $a0, 0x2
/* 3E5974 E010C4B4 10400005 */  beqz      $v0, .LE010C4CC
/* 3E5978 E010C4B8 00000000 */   nop
/* 3E597C E010C4BC C4660010 */  lwc1      $f6, 0x10($v1)
/* 3E5980 E010C4C0 C4640014 */  lwc1      $f4, 0x14($v1)
/* 3E5984 E010C4C4 08043136 */  j         .LE010C4D8
/* 3E5988 E010C4C8 C4620018 */   lwc1     $f2, 0x18($v1)
.LE010C4CC:
/* 3E598C E010C4CC C4660004 */  lwc1      $f6, 0x4($v1)
/* 3E5990 E010C4D0 C4640008 */  lwc1      $f4, 0x8($v1)
/* 3E5994 E010C4D4 C462000C */  lwc1      $f2, 0xC($v1)
.LE010C4D8:
/* 3E5998 E010C4D8 C640000C */  lwc1      $f0, 0xC($s2)
/* 3E599C E010C4DC 4602003C */  c.lt.s    $f0, $f2
/* 3E59A0 E010C4E0 00000000 */  nop
/* 3E59A4 E010C4E4 45030049 */  bc1tl     .LE010C60C
/* 3E59A8 E010C4E8 26730001 */   addiu    $s3, $s3, 0x1
/* 3E59AC E010C4EC 4405A000 */  mfc1      $a1, $f20
/* 3E59B0 E010C4F0 4406A000 */  mfc1      $a2, $f20
/* 3E59B4 E010C4F4 4407A000 */  mfc1      $a3, $f20
/* 3E59B8 E010C4F8 3C013F36 */  lui       $at, (0x3F36DB6E >> 16)
/* 3E59BC E010C4FC 3421DB6E */  ori       $at, $at, (0x3F36DB6E & 0xFFFF)
/* 3E59C0 E010C500 44810000 */  mtc1      $at, $f0
/* 3E59C4 E010C504 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E59C8 E010C508 E7A60014 */  swc1      $f6, 0x14($sp)
/* 3E59CC E010C50C E7A40018 */  swc1      $f4, 0x18($sp)
/* 3E59D0 E010C510 E7A2001C */  swc1      $f2, 0x1C($sp)
/* 3E59D4 E010C514 0C080180 */  jal       shim_guPositionF
/* 3E59D8 E010C518 E7A00010 */   swc1     $f0, 0x10($sp)
/* 3E59DC E010C51C 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E59E0 E010C520 96A50000 */  lhu       $a1, 0x0($s5)
/* 3E59E4 E010C524 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E59E8 E010C528 00052980 */  sll       $a1, $a1, 6
/* 3E59EC E010C52C 00B42821 */  addu      $a1, $a1, $s4
/* 3E59F0 E010C530 0C080118 */  jal       shim_guMtxF2L
/* 3E59F4 E010C534 00452821 */   addu     $a1, $v0, $a1
/* 3E59F8 E010C538 3C02DA38 */  lui       $v0, (0xDA380002 >> 16)
/* 3E59FC E010C53C 34420002 */  ori       $v0, $v0, (0xDA380002 & 0xFFFF)
/* 3E5A00 E010C540 3C068080 */  lui       $a2, (0x808080FF >> 16)
/* 3E5A04 E010C544 34C680FF */  ori       $a2, $a2, (0x808080FF & 0xFFFF)
/* 3E5A08 E010C548 3C078080 */  lui       $a3, (0x8080807F >> 16)
/* 3E5A0C E010C54C 34E7807F */  ori       $a3, $a3, (0x8080807F & 0xFFFF)
/* 3E5A10 E010C550 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 3E5A14 E010C554 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 3E5A18 E010C558 8E040000 */  lw        $a0, 0x0($s0)
/* 3E5A1C E010C55C 96A30000 */  lhu       $v1, 0x0($s5)
/* 3E5A20 E010C560 0080282D */  daddu     $a1, $a0, $zero
/* 3E5A24 E010C564 24840008 */  addiu     $a0, $a0, 0x8
/* 3E5A28 E010C568 AE040000 */  sw        $a0, 0x0($s0)
/* 3E5A2C E010C56C ACA20000 */  sw        $v0, 0x0($a1)
/* 3E5A30 E010C570 24620001 */  addiu     $v0, $v1, 0x1
/* 3E5A34 E010C574 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 3E5A38 E010C578 00031980 */  sll       $v1, $v1, 6
/* 3E5A3C E010C57C A6A20000 */  sh        $v0, 0x0($s5)
/* 3E5A40 E010C580 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E5A44 E010C584 00741821 */  addu      $v1, $v1, $s4
/* 3E5A48 E010C588 00431021 */  addu      $v0, $v0, $v1
/* 3E5A4C E010C58C ACA20004 */  sw        $v0, 0x4($a1)
/* 3E5A50 E010C590 24820008 */  addiu     $v0, $a0, 0x8
/* 3E5A54 E010C594 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5A58 E010C598 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3E5A5C E010C59C AC820000 */  sw        $v0, 0x0($a0)
/* 3E5A60 E010C5A0 24820010 */  addiu     $v0, $a0, 0x10
/* 3E5A64 E010C5A4 AC860004 */  sw        $a2, 0x4($a0)
/* 3E5A68 E010C5A8 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5A6C E010C5AC 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3E5A70 E010C5B0 AC820008 */  sw        $v0, 0x8($a0)
/* 3E5A74 E010C5B4 24820018 */  addiu     $v0, $a0, 0x18
/* 3E5A78 E010C5B8 00131880 */  sll       $v1, $s3, 2
/* 3E5A7C E010C5BC AC87000C */  sw        $a3, 0xC($a0)
/* 3E5A80 E010C5C0 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5A84 E010C5C4 AC960010 */  sw        $s6, 0x10($a0)
/* 3E5A88 E010C5C8 3C05E011 */  lui       $a1, (0xE0110000 >> 16)
/* 3E5A8C E010C5CC 00A32821 */  addu      $a1, $a1, $v1
/* 3E5A90 E010C5D0 8CA5CA38 */  lw        $a1, -0x35C8($a1)
/* 3E5A94 E010C5D4 24820020 */  addiu     $v0, $a0, 0x20
/* 3E5A98 E010C5D8 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5A9C E010C5DC AC960018 */  sw        $s6, 0x18($a0)
/* 3E5AA0 E010C5E0 AC850014 */  sw        $a1, 0x14($a0)
/* 3E5AA4 E010C5E4 3C01E011 */  lui       $at, (0xE0110000 >> 16)
/* 3E5AA8 E010C5E8 00230821 */  addu      $at, $at, $v1
/* 3E5AAC E010C5EC 8C23CA18 */  lw        $v1, -0x35E8($at)
/* 3E5AB0 E010C5F0 24820028 */  addiu     $v0, $a0, 0x28
/* 3E5AB4 E010C5F4 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5AB8 E010C5F8 24020040 */  addiu     $v0, $zero, 0x40
/* 3E5ABC E010C5FC AC880020 */  sw        $t0, 0x20($a0)
/* 3E5AC0 E010C600 AC820024 */  sw        $v0, 0x24($a0)
/* 3E5AC4 E010C604 AC83001C */  sw        $v1, 0x1C($a0)
.LE010C608:
/* 3E5AC8 E010C608 26730001 */  addiu     $s3, $s3, 0x1
.LE010C60C:
/* 3E5ACC E010C60C 2A620008 */  slti      $v0, $s3, 0x8
/* 3E5AD0 E010C610 1440FFA3 */  bnez      $v0, .LE010C4A0
/* 3E5AD4 E010C614 2631001C */   addiu    $s1, $s1, 0x1C
/* 3E5AD8 E010C618 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E5ADC E010C61C 240200FF */  addiu     $v0, $zero, 0xFF
/* 3E5AE0 E010C620 8E43003C */  lw        $v1, 0x3C($s2)
/* 3E5AE4 E010C624 3C014079 */  lui       $at, (0x40790000 >> 16)
/* 3E5AE8 E010C628 44811800 */  mtc1      $at, $f3
/* 3E5AEC E010C62C 44801000 */  mtc1      $zero, $f2
/* 3E5AF0 E010C630 00431023 */  subu      $v0, $v0, $v1
/* 3E5AF4 E010C634 44820000 */  mtc1      $v0, $f0
/* 3E5AF8 E010C638 00000000 */  nop
/* 3E5AFC E010C63C 46800020 */  cvt.s.w   $f0, $f0
/* 3E5B00 E010C640 46000021 */  cvt.d.s   $f0, $f0
/* 3E5B04 E010C644 46220002 */  mul.d     $f0, $f0, $f2
/* 3E5B08 E010C648 00000000 */  nop
/* 3E5B0C E010C64C 3C110001 */  lui       $s1, (0x11630 >> 16)
/* 3E5B10 E010C650 36311630 */  ori       $s1, $s1, (0x11630 & 0xFFFF)
/* 3E5B14 E010C654 0000982D */  daddu     $s3, $zero, $zero
/* 3E5B18 E010C658 3C01E011 */  lui       $at, (0xE0110000 >> 16)
/* 3E5B1C E010C65C D424CA60 */  ldc1      $f4, -0x35A0($at)
/* 3E5B20 E010C660 C6420008 */  lwc1      $f2, 0x8($s2)
/* 3E5B24 E010C664 8E450004 */  lw        $a1, 0x4($s2)
/* 3E5B28 E010C668 460010A1 */  cvt.d.s   $f2, $f2
/* 3E5B2C E010C66C 46240003 */  div.d     $f0, $f0, $f4
/* 3E5B30 E010C670 46201081 */  sub.d     $f2, $f2, $f0
/* 3E5B34 E010C674 8E47000C */  lw        $a3, 0xC($s2)
/* 3E5B38 E010C678 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 3E5B3C E010C67C 2442A674 */  addiu     $v0, $v0, %lo(gDisplayContext)
/* 3E5B40 E010C680 462010A0 */  cvt.s.d   $f2, $f2
/* 3E5B44 E010C684 44061000 */  mfc1      $a2, $f2
/* 3E5B48 E010C688 0C080108 */  jal       shim_guTranslateF
/* 3E5B4C E010C68C 0040B82D */   daddu    $s7, $v0, $zero
/* 3E5B50 E010C690 3C028007 */  lui       $v0, %hi(gMatrixListPos)
/* 3E5B54 E010C694 244241F0 */  addiu     $v0, $v0, %lo(gMatrixListPos)
/* 3E5B58 E010C698 C6400038 */  lwc1      $f0, 0x38($s2)
/* 3E5B5C E010C69C 3C01E011 */  lui       $at, (0xE0110000 >> 16)
/* 3E5B60 E010C6A0 D422CA68 */  ldc1      $f2, -0x3598($at)
/* 3E5B64 E010C6A4 46000021 */  cvt.d.s   $f0, $f0
/* 3E5B68 E010C6A8 46220002 */  mul.d     $f0, $f0, $f2
/* 3E5B6C E010C6AC 00000000 */  nop
/* 3E5B70 E010C6B0 0040A02D */  daddu     $s4, $v0, $zero
/* 3E5B74 E010C6B4 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 3E5B78 E010C6B8 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 3E5B7C E010C6BC 3C1EDE00 */  lui       $fp, (0xDE000000 >> 16)
/* 3E5B80 E010C6C0 2415005C */  addiu     $s5, $zero, 0x5C
/* 3E5B84 E010C6C4 27B00060 */  addiu     $s0, $sp, 0x60
/* 3E5B88 E010C6C8 0200202D */  daddu     $a0, $s0, $zero
/* 3E5B8C E010C6CC 46200020 */  cvt.s.d   $f0, $f0
/* 3E5B90 E010C6D0 44050000 */  mfc1      $a1, $f0
/* 3E5B94 E010C6D4 4480A000 */  mtc1      $zero, $f20
/* 3E5B98 E010C6D8 00A0302D */  daddu     $a2, $a1, $zero
/* 3E5B9C E010C6DC 0C080110 */  jal       shim_guScaleF
/* 3E5BA0 E010C6E0 00A0382D */   daddu    $a3, $a1, $zero
/* 3E5BA4 E010C6E4 0200202D */  daddu     $a0, $s0, $zero
/* 3E5BA8 E010C6E8 27A50020 */  addiu     $a1, $sp, 0x20
/* 3E5BAC E010C6EC 0C080114 */  jal       shim_guMtxCatF
/* 3E5BB0 E010C6F0 00A0302D */   daddu    $a2, $a1, $zero
/* 3E5BB4 E010C6F4 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E5BB8 E010C6F8 96850000 */  lhu       $a1, 0x0($s4)
/* 3E5BBC E010C6FC 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E5BC0 E010C700 00052980 */  sll       $a1, $a1, 6
/* 3E5BC4 E010C704 00B12821 */  addu      $a1, $a1, $s1
/* 3E5BC8 E010C708 0C080118 */  jal       shim_guMtxF2L
/* 3E5BCC E010C70C 00452821 */   addu     $a1, $v0, $a1
/* 3E5BD0 E010C710 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3E5BD4 E010C714 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3E5BD8 E010C718 3C06DA38 */  lui       $a2, (0xDA380001 >> 16)
/* 3E5BDC E010C71C 34C60001 */  ori       $a2, $a2, (0xDA380001 & 0xFFFF)
/* 3E5BE0 E010C720 3C09D838 */  lui       $t1, (0xD8380002 >> 16)
/* 3E5BE4 E010C724 35290002 */  ori       $t1, $t1, (0xD8380002 & 0xFFFF)
/* 3E5BE8 E010C728 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 3E5BEC E010C72C 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 3E5BF0 E010C730 0040802D */  daddu     $s0, $v0, $zero
/* 3E5BF4 E010C734 8C440000 */  lw        $a0, 0x0($v0)
/* 3E5BF8 E010C738 96820000 */  lhu       $v0, 0x0($s4)
/* 3E5BFC E010C73C 0080282D */  daddu     $a1, $a0, $zero
/* 3E5C00 E010C740 24840008 */  addiu     $a0, $a0, 0x8
/* 3E5C04 E010C744 AE040000 */  sw        $a0, 0x0($s0)
/* 3E5C08 E010C748 ACA30000 */  sw        $v1, 0x0($a1)
/* 3E5C0C E010C74C 24430001 */  addiu     $v1, $v0, 0x1
/* 3E5C10 E010C750 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3E5C14 E010C754 00021180 */  sll       $v0, $v0, 6
/* 3E5C18 E010C758 A6830000 */  sh        $v1, 0x0($s4)
/* 3E5C1C E010C75C 8EE30000 */  lw        $v1, 0x0($s7)
/* 3E5C20 E010C760 00511021 */  addu      $v0, $v0, $s1
/* 3E5C24 E010C764 00621821 */  addu      $v1, $v1, $v0
/* 3E5C28 E010C768 24820008 */  addiu     $v0, $a0, 0x8
/* 3E5C2C E010C76C ACA30004 */  sw        $v1, 0x4($a1)
/* 3E5C30 E010C770 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5C34 E010C774 24820010 */  addiu     $v0, $a0, 0x10
/* 3E5C38 E010C778 AC860000 */  sw        $a2, 0x0($a0)
/* 3E5C3C E010C77C AE020000 */  sw        $v0, 0x0($s0)
/* 3E5C40 E010C780 8FAA00A0 */  lw        $t2, 0xA0($sp)
/* 3E5C44 E010C784 03C0382D */  daddu     $a3, $fp, $zero
/* 3E5C48 E010C788 8D430204 */  lw        $v1, 0x204($t2)
/* 3E5C4C E010C78C 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3E5C50 E010C790 AC820008 */  sw        $v0, 0x8($a0)
/* 3E5C54 E010C794 AC830004 */  sw        $v1, 0x4($a0)
/* 3E5C58 E010C798 9242001B */  lbu       $v0, 0x1B($s2)
/* 3E5C5C E010C79C 9245001F */  lbu       $a1, 0x1F($s2)
/* 3E5C60 E010C7A0 92460023 */  lbu       $a2, 0x23($s2)
/* 3E5C64 E010C7A4 24830018 */  addiu     $v1, $a0, 0x18
/* 3E5C68 E010C7A8 AE030000 */  sw        $v1, 0x0($s0)
/* 3E5C6C E010C7AC 3C03FB00 */  lui       $v1, (0xFB000000 >> 16)
/* 3E5C70 E010C7B0 AC830010 */  sw        $v1, 0x10($a0)
/* 3E5C74 E010C7B4 8FAA00A4 */  lw        $t2, 0xA4($sp)
/* 3E5C78 E010C7B8 00021600 */  sll       $v0, $v0, 24
/* 3E5C7C E010C7BC 00052C00 */  sll       $a1, $a1, 16
/* 3E5C80 E010C7C0 00451025 */  or        $v0, $v0, $a1
/* 3E5C84 E010C7C4 00063200 */  sll       $a2, $a2, 8
/* 3E5C88 E010C7C8 00461025 */  or        $v0, $v0, $a2
/* 3E5C8C E010C7CC 314300FF */  andi      $v1, $t2, 0xFF
/* 3E5C90 E010C7D0 00431025 */  or        $v0, $v0, $v1
/* 3E5C94 E010C7D4 AC82000C */  sw        $v0, 0xC($a0)
/* 3E5C98 E010C7D8 9242002B */  lbu       $v0, 0x2B($s2)
/* 3E5C9C E010C7DC 9245002F */  lbu       $a1, 0x2F($s2)
/* 3E5CA0 E010C7E0 92460033 */  lbu       $a2, 0x33($s2)
/* 3E5CA4 E010C7E4 92480037 */  lbu       $t0, 0x37($s2)
/* 3E5CA8 E010C7E8 24830020 */  addiu     $v1, $a0, 0x20
/* 3E5CAC E010C7EC AE030000 */  sw        $v1, 0x0($s0)
/* 3E5CB0 E010C7F0 AC870018 */  sw        $a3, 0x18($a0)
/* 3E5CB4 E010C7F4 00021600 */  sll       $v0, $v0, 24
/* 3E5CB8 E010C7F8 00052C00 */  sll       $a1, $a1, 16
/* 3E5CBC E010C7FC 00451025 */  or        $v0, $v0, $a1
/* 3E5CC0 E010C800 00063200 */  sll       $a2, $a2, 8
/* 3E5CC4 E010C804 00461025 */  or        $v0, $v0, $a2
/* 3E5CC8 E010C808 00481025 */  or        $v0, $v0, $t0
/* 3E5CCC E010C80C AC820014 */  sw        $v0, 0x14($a0)
/* 3E5CD0 E010C810 3C03E011 */  lui       $v1, (0xE0110000 >> 16)
/* 3E5CD4 E010C814 8C63CA14 */  lw        $v1, -0x35EC($v1)
/* 3E5CD8 E010C818 24820028 */  addiu     $v0, $a0, 0x28
/* 3E5CDC E010C81C AE020000 */  sw        $v0, 0x0($s0)
/* 3E5CE0 E010C820 AC870020 */  sw        $a3, 0x20($a0)
/* 3E5CE4 E010C824 AC83001C */  sw        $v1, 0x1C($a0)
/* 3E5CE8 E010C828 3C03E011 */  lui       $v1, (0xE0110000 >> 16)
/* 3E5CEC E010C82C 8C63CA10 */  lw        $v1, -0x35F0($v1)
/* 3E5CF0 E010C830 24820030 */  addiu     $v0, $a0, 0x30
/* 3E5CF4 E010C834 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5CF8 E010C838 24020040 */  addiu     $v0, $zero, 0x40
/* 3E5CFC E010C83C AC830024 */  sw        $v1, 0x24($a0)
/* 3E5D00 E010C840 AC890028 */  sw        $t1, 0x28($a0)
/* 3E5D04 E010C844 AC82002C */  sw        $v0, 0x2C($a0)
/* 3E5D08 E010C848 24820038 */  addiu     $v0, $a0, 0x38
/* 3E5D0C E010C84C AE020000 */  sw        $v0, 0x0($s0)
/* 3E5D10 E010C850 3C020900 */  lui       $v0, %hi(D_09005090_412320)
/* 3E5D14 E010C854 24425090 */  addiu     $v0, $v0, %lo(D_09005090_412320)
/* 3E5D18 E010C858 AC870030 */  sw        $a3, 0x30($a0)
/* 3E5D1C E010C85C AC820034 */  sw        $v0, 0x34($a0)
.LE010C860:
/* 3E5D20 E010C860 02551821 */  addu      $v1, $s2, $s5
/* 3E5D24 E010C864 8C640000 */  lw        $a0, 0x0($v1)
/* 3E5D28 E010C868 30820001 */  andi      $v0, $a0, 0x1
/* 3E5D2C E010C86C 10400056 */  beqz      $v0, .LE010C9C8
/* 3E5D30 E010C870 30820002 */   andi     $v0, $a0, 0x2
/* 3E5D34 E010C874 10400005 */  beqz      $v0, .LE010C88C
/* 3E5D38 E010C878 00000000 */   nop
/* 3E5D3C E010C87C C4660010 */  lwc1      $f6, 0x10($v1)
/* 3E5D40 E010C880 C4640014 */  lwc1      $f4, 0x14($v1)
/* 3E5D44 E010C884 08043226 */  j         .LE010C898
/* 3E5D48 E010C888 C4620018 */   lwc1     $f2, 0x18($v1)
.LE010C88C:
/* 3E5D4C E010C88C C4660004 */  lwc1      $f6, 0x4($v1)
/* 3E5D50 E010C890 C4640008 */  lwc1      $f4, 0x8($v1)
/* 3E5D54 E010C894 C462000C */  lwc1      $f2, 0xC($v1)
.LE010C898:
/* 3E5D58 E010C898 C640000C */  lwc1      $f0, 0xC($s2)
/* 3E5D5C E010C89C 4600103E */  c.le.s    $f2, $f0
/* 3E5D60 E010C8A0 00000000 */  nop
/* 3E5D64 E010C8A4 45030049 */  bc1tl     .LE010C9CC
/* 3E5D68 E010C8A8 26730001 */   addiu    $s3, $s3, 0x1
/* 3E5D6C E010C8AC 4405A000 */  mfc1      $a1, $f20
/* 3E5D70 E010C8B0 4406A000 */  mfc1      $a2, $f20
/* 3E5D74 E010C8B4 4407A000 */  mfc1      $a3, $f20
/* 3E5D78 E010C8B8 3C013F2B */  lui       $at, (0x3F2B851F >> 16)
/* 3E5D7C E010C8BC 3421851F */  ori       $at, $at, (0x3F2B851F & 0xFFFF)
/* 3E5D80 E010C8C0 44810000 */  mtc1      $at, $f0
/* 3E5D84 E010C8C4 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E5D88 E010C8C8 E7A60014 */  swc1      $f6, 0x14($sp)
/* 3E5D8C E010C8CC E7A40018 */  swc1      $f4, 0x18($sp)
/* 3E5D90 E010C8D0 E7A2001C */  swc1      $f2, 0x1C($sp)
/* 3E5D94 E010C8D4 0C080180 */  jal       shim_guPositionF
/* 3E5D98 E010C8D8 E7A00010 */   swc1     $f0, 0x10($sp)
/* 3E5D9C E010C8DC 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E5DA0 E010C8E0 96850000 */  lhu       $a1, 0x0($s4)
/* 3E5DA4 E010C8E4 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E5DA8 E010C8E8 00052980 */  sll       $a1, $a1, 6
/* 3E5DAC E010C8EC 00B62821 */  addu      $a1, $a1, $s6
/* 3E5DB0 E010C8F0 0C080118 */  jal       shim_guMtxF2L
/* 3E5DB4 E010C8F4 00452821 */   addu     $a1, $v0, $a1
/* 3E5DB8 E010C8F8 3C02DA38 */  lui       $v0, (0xDA380002 >> 16)
/* 3E5DBC E010C8FC 34420002 */  ori       $v0, $v0, (0xDA380002 & 0xFFFF)
/* 3E5DC0 E010C900 3C068080 */  lui       $a2, (0x808080FF >> 16)
/* 3E5DC4 E010C904 34C680FF */  ori       $a2, $a2, (0x808080FF & 0xFFFF)
/* 3E5DC8 E010C908 3C078080 */  lui       $a3, (0x8080807F >> 16)
/* 3E5DCC E010C90C 34E7807F */  ori       $a3, $a3, (0x8080807F & 0xFFFF)
/* 3E5DD0 E010C910 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 3E5DD4 E010C914 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 3E5DD8 E010C918 8E040000 */  lw        $a0, 0x0($s0)
/* 3E5DDC E010C91C 96830000 */  lhu       $v1, 0x0($s4)
/* 3E5DE0 E010C920 0080282D */  daddu     $a1, $a0, $zero
/* 3E5DE4 E010C924 24840008 */  addiu     $a0, $a0, 0x8
/* 3E5DE8 E010C928 AE040000 */  sw        $a0, 0x0($s0)
/* 3E5DEC E010C92C ACA20000 */  sw        $v0, 0x0($a1)
/* 3E5DF0 E010C930 24620001 */  addiu     $v0, $v1, 0x1
/* 3E5DF4 E010C934 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 3E5DF8 E010C938 00031980 */  sll       $v1, $v1, 6
/* 3E5DFC E010C93C A6820000 */  sh        $v0, 0x0($s4)
/* 3E5E00 E010C940 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E5E04 E010C944 00761821 */  addu      $v1, $v1, $s6
/* 3E5E08 E010C948 00431021 */  addu      $v0, $v0, $v1
/* 3E5E0C E010C94C ACA20004 */  sw        $v0, 0x4($a1)
/* 3E5E10 E010C950 24820008 */  addiu     $v0, $a0, 0x8
/* 3E5E14 E010C954 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5E18 E010C958 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3E5E1C E010C95C AC820000 */  sw        $v0, 0x0($a0)
/* 3E5E20 E010C960 24820010 */  addiu     $v0, $a0, 0x10
/* 3E5E24 E010C964 AC860004 */  sw        $a2, 0x4($a0)
/* 3E5E28 E010C968 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5E2C E010C96C 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3E5E30 E010C970 AC820008 */  sw        $v0, 0x8($a0)
/* 3E5E34 E010C974 24820018 */  addiu     $v0, $a0, 0x18
/* 3E5E38 E010C978 00131880 */  sll       $v1, $s3, 2
/* 3E5E3C E010C97C AC87000C */  sw        $a3, 0xC($a0)
/* 3E5E40 E010C980 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5E44 E010C984 AC9E0010 */  sw        $fp, 0x10($a0)
/* 3E5E48 E010C988 3C05E011 */  lui       $a1, (0xE0110000 >> 16)
/* 3E5E4C E010C98C 00A32821 */  addu      $a1, $a1, $v1
/* 3E5E50 E010C990 8CA5CA38 */  lw        $a1, -0x35C8($a1)
/* 3E5E54 E010C994 24820020 */  addiu     $v0, $a0, 0x20
/* 3E5E58 E010C998 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5E5C E010C99C AC9E0018 */  sw        $fp, 0x18($a0)
/* 3E5E60 E010C9A0 AC850014 */  sw        $a1, 0x14($a0)
/* 3E5E64 E010C9A4 3C01E011 */  lui       $at, (0xE0110000 >> 16)
/* 3E5E68 E010C9A8 00230821 */  addu      $at, $at, $v1
/* 3E5E6C E010C9AC 8C23CA18 */  lw        $v1, -0x35E8($at)
/* 3E5E70 E010C9B0 24820028 */  addiu     $v0, $a0, 0x28
/* 3E5E74 E010C9B4 AE020000 */  sw        $v0, 0x0($s0)
/* 3E5E78 E010C9B8 24020040 */  addiu     $v0, $zero, 0x40
/* 3E5E7C E010C9BC AC880020 */  sw        $t0, 0x20($a0)
/* 3E5E80 E010C9C0 AC820024 */  sw        $v0, 0x24($a0)
/* 3E5E84 E010C9C4 AC83001C */  sw        $v1, 0x1C($a0)
.LE010C9C8:
/* 3E5E88 E010C9C8 26730001 */  addiu     $s3, $s3, 0x1
.LE010C9CC:
/* 3E5E8C E010C9CC 2A620008 */  slti      $v0, $s3, 0x8
/* 3E5E90 E010C9D0 1440FFA3 */  bnez      $v0, .LE010C860
/* 3E5E94 E010C9D4 26B5001C */   addiu    $s5, $s5, 0x1C
/* 3E5E98 E010C9D8 8FBF00CC */  lw        $ra, 0xCC($sp)
/* 3E5E9C E010C9DC 8FBE00C8 */  lw        $fp, 0xC8($sp)
/* 3E5EA0 E010C9E0 8FB700C4 */  lw        $s7, 0xC4($sp)
/* 3E5EA4 E010C9E4 8FB600C0 */  lw        $s6, 0xC0($sp)
/* 3E5EA8 E010C9E8 8FB500BC */  lw        $s5, 0xBC($sp)
/* 3E5EAC E010C9EC 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 3E5EB0 E010C9F0 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 3E5EB4 E010C9F4 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 3E5EB8 E010C9F8 8FB100AC */  lw        $s1, 0xAC($sp)
/* 3E5EBC E010C9FC 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 3E5EC0 E010CA00 D7B400D0 */  ldc1      $f20, 0xD0($sp)
/* 3E5EC4 E010CA04 03E00008 */  jr        $ra
/* 3E5EC8 E010CA08 27BD00D8 */   addiu    $sp, $sp, 0xD8
/* 3E5ECC E010CA0C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void peach_star_beam_appendGfx(void* effect) {
    Matrix4f sp20, sp60;
    Camera* camera = &gCameras[gCurrentCameraID];
    PeachStarBeamFXData* data = ((EffectInstance*)effect)->data.peachStarBeam;
    PeachStarBeamSpirit* part;
    s32 alpha = data->beamAlpha;
    f32 partX, partY, partZ;
    s32 i;

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_09005090_3EAFC0);

    for (i = 0; i < ARRAY_COUNT(data->spirits); i++) {
        part = &data->spirits[i];
        if (part->flags & 1) {
            if (part->flags & 2) {
                partX = part->lockedPos.x;
                partY = part->lockedPos.y;
                partZ = part->lockedPos.z;
            } else {
                partX = part->pos.x;
                partY = part->pos.y;
                partZ = part->pos.z;
            }

            if (!(data->pos.z < partZ)) {
                shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, SPRITE_WORLD_SCALE_F, partX, partY, partZ);
                shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

                gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
                          G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
                gDPSetPrimColor(gMainGfxPos++, 0, 0, 128, 128, 128, 255);
                gDPSetEnvColor(gMainGfxPos++, 128, 128, 128, 127);
                gSPDisplayList(gMainGfxPos++, D_E010CA38[i]);
                gSPDisplayList(gMainGfxPos++, D_E010CA18[i]);
                gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
            }
        }
    }

    shim_guTranslateF(sp20, data->pos.x, data->pos.y - (((f32) (255 - data->unk_3C) * 400.0) / 255.0), data->pos.z);
    shim_guScaleF(sp60, data->beamScale * 0.4, data->beamScale * 0.4, data->beamScale * 0.4);
    shim_guMtxCatF(sp60, sp20, sp20);
    shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
              G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->primR, data->primG, data->primB, alpha);
    gDPSetEnvColor(gMainGfxPos++, data->envR, data->envG, data->envB, data->envA);
    gSPDisplayList(gMainGfxPos++, D_E010CA14[0]);
    gSPDisplayList(gMainGfxPos++, D_E010CA10[0]);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_09005090_3EAFC0);

    for (i = 0; i < ARRAY_COUNT(data->spirits); i++) {
        part = &data->spirits[i];

        if (part->flags & 1) {
            if (part->flags & 2) {
                partX = part->lockedPos.x;
                partY = part->lockedPos.y;
                partZ = part->lockedPos.z;
            } else {
                partX = part->pos.x;
                partY = part->pos.y;
                partZ = part->pos.z;
            }

            if (!(partZ <= data->pos.z)) {
                shim_guPositionF(sp20, 0.0f, 0.0f, 0.0f, 0.67f, partX, partY, partZ);
                shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

                gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
                          G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
                gDPSetPrimColor(gMainGfxPos++, 0, 0, 128, 128, 128, 255);
                gDPSetEnvColor(gMainGfxPos++, 128, 128, 128, 127);
                gSPDisplayList(gMainGfxPos++, D_E010CA38[i]);
                gSPDisplayList(gMainGfxPos++, D_E010CA18[i]);
                gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
            }
        }
    }
}