### RAW ASSEMBLY INSTRUCTIONS:

glabel func_802B62A4
/* E25174 802B62A4 27BDFF88 */  addiu     $sp, $sp, -0x78
.L802B62A8:
/* E25178 802B62A8 AFBF0048 */  sw        $ra, 0x48($sp)
/* E2517C 802B62AC AFB30044 */  sw        $s3, 0x44($sp)
jtbl_802B62B0:
/* E25180 802B62B0 AFB20040 */  sw        $s2, 0x40($sp)
.L802B62B4:
/* E25184 802B62B4 AFB1003C */  sw        $s1, 0x3C($sp)
glabel .L802B62B8
/* E25188 802B62B8 AFB00038 */  sw        $s0, 0x38($sp)
/* E2518C 802B62BC F7BC0070 */  sdc1      $f28, 0x70($sp)
/* E25190 802B62C0 F7BA0068 */  sdc1      $f26, 0x68($sp)
/* E25194 802B62C4 F7B80060 */  sdc1      $f24, 0x60($sp)
.L802B62C8:
/* E25198 802B62C8 F7B60058 */  sdc1      $f22, 0x58($sp)
glabel action_update_peach_land
/* E2519C 802B62CC 0C0394D2 */  jal       func_800E5348
Munchlesia_LaunchVelocity:
/* E251A0 802B62D0 F7B40050 */   sdc1     $f20, 0x50($sp)
Munchlesia_LateralVelocity:
/* E251A4 802B62D4 3C128011 */  lui       $s2, %hi(gPlayerStatus)
Munchlesia_LaunchAccel:
/* E251A8 802B62D8 2652EFC8 */  addiu     $s2, $s2, %lo(gPlayerStatus)
Munchlesia_LaunchYaw:
/* E251AC 802B62DC 8E4400A4 */  lw        $a0, 0xA4($s2)
D_802B62E0:
/* E251B0 802B62E0 0C0AD800 */  jal       parasol_get_npc
.L802B62E4:
/* E251B4 802B62E4 46000586 */   mov.s    $f22, $f0
/* E251B8 802B62E8 10400030 */  beqz      $v0, .L802B63AC
/* E251BC 802B62EC 27A50020 */   addiu    $a1, $sp, 0x20
/* E251C0 802B62F0 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* E251C4 802B62F4 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
glabel func_802B62F8
/* E251C8 802B62F8 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
.L802B62FC:
/* E251CC 802B62FC 4481A000 */  mtc1      $at, $f20
D_802B6300:
/* E251D0 802B6300 00031080 */  sll       $v0, $v1, 2
/* E251D4 802B6304 00431021 */  addu      $v0, $v0, $v1
.L802B6308:
/* E251D8 802B6308 00021080 */  sll       $v0, $v0, 2
.L802B630C:
/* E251DC 802B630C 00431023 */  subu      $v0, $v0, $v1
.L802B6310:
/* E251E0 802B6310 000218C0 */  sll       $v1, $v0, 3
/* E251E4 802B6314 00431021 */  addu      $v0, $v0, $v1
/* E251E8 802B6318 000210C0 */  sll       $v0, $v0, 3
glabel .L802B631C
/* E251EC 802B631C 4614B000 */  add.s     $f0, $f22, $f20
.L802B6320:
/* E251F0 802B6320 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
glabel .L802B6324
/* E251F4 802B6324 00220821 */  addu      $at, $at, $v0
.L802B6328:
/* E251F8 802B6328 C42C1DEC */  lwc1      $f12, %lo(gCameras + 0x6C)($at)
glabel .L802B632C
/* E251FC 802B632C 0C00A6C9 */  jal       clamp_angle
.L802B6330:
/* E25200 802B6330 460C0301 */   sub.s    $f12, $f0, $f12
/* E25204 802B6334 46000086 */  mov.s     $f2, $f0
.L802B6338:
/* E25208 802B6338 4602A03E */  c.le.s    $f20, $f2
/* E2520C 802B633C 00000000 */  nop
.L802B6340:
/* E25210 802B6340 45000015 */  bc1f      .L802B6398
/* E25214 802B6344 00000000 */   nop
glabel func_802B6348
/* E25218 802B6348 3C014387 */  lui       $at, (0x43870000 >> 16)
/* E2521C 802B634C 44810000 */  mtc1      $at, $f0
PlayerTweesterPhysicsPtr:
/* E25220 802B6350 00000000 */  nop
glabel .L802B6354
/* E25224 802B6354 4600103C */  c.lt.s    $f2, $f0
/* E25228 802B6358 00000000 */  nop
.L802B635C:
/* E2522C 802B635C 4500000E */  bc1f      .L802B6398
D_802B6360:
/* E25230 802B6360 00000000 */   nop
.L802B6364:
/* E25234 802B6364 3C01C1F0 */  lui       $at, (0xC1F00000 >> 16)
/* E25238 802B6368 44810000 */  mtc1      $at, $f0
.L802B636C:
/* E2523C 802B636C 080AD8EA */  j         .L802B63A8
glabel .L802B6370
/* E25240 802B6370 4600B580 */   add.s    $f22, $f22, $f0
.L802B6374:
/* E25244 802B6374 3C02802B */  lui       $v0, %hi(HammerHit)
/* E25248 802B6378 8C426DB0 */  lw        $v0, %lo(HammerHit)($v0)
glabel .L802B637C
/* E2524C 802B637C C7A00028 */  lwc1      $f0, 0x28($sp)
/* E25250 802B6380 C7A2002C */  lwc1      $f2, 0x2C($sp)
/* E25254 802B6384 C7A40030 */  lwc1      $f4, 0x30($sp)
/* E25258 802B6388 E4400000 */  swc1      $f0, 0x0($v0)
/* E2525C 802B638C E4420004 */  swc1      $f2, 0x4($v0)
/* E25260 802B6390 080AD919 */  j         .L802B6464
glabel .L802B6394
/* E25264 802B6394 E4440008 */   swc1     $f4, 0x8($v0)
.L802B6398:
/* E25268 802B6398 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
.L802B639C:
/* E2526C 802B639C 44810000 */  mtc1      $at, $f0
/* E25270 802B63A0 00000000 */  nop
/* E25274 802B63A4 4600B580 */  add.s     $f22, $f22, $f0
.L802B63A8:
/* E25278 802B63A8 27A50020 */  addiu     $a1, $sp, 0x20
.L802B63AC:
/* E2527C 802B63AC 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
glabel .L802B63B0
/* E25280 802B63B0 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* E25284 802B63B4 44816000 */  mtc1      $at, $f12
/* E25288 802B63B8 27A60024 */  addiu     $a2, $sp, 0x24
/* E2528C 802B63BC 460CB302 */  mul.s     $f12, $f22, $f12
.L802B63C0:
/* E25290 802B63C0 00000000 */  nop
.L802B63C4:
/* E25294 802B63C4 24100001 */  addiu     $s0, $zero, 0x1
.L802B63C8:
/* E25298 802B63C8 27B30030 */  addiu     $s3, $sp, 0x30
.L802B63CC:
/* E2529C 802B63CC 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
.L802B63D0:
/* E252A0 802B63D0 44810000 */  mtc1      $at, $f0
glabel action_update_first_strike
/* E252A4 802B63D4 3C014080 */  lui       $at, (0x40800000 >> 16)
.L802B63D8:
/* E252A8 802B63D8 4481A000 */  mtc1      $at, $f20
glabel .L802B63DC
/* E252AC 802B63DC 0C00A82D */  jal       sin_cos_rad
.L802B63E0:
/* E252B0 802B63E0 46006303 */   div.s    $f12, $f12, $f0
.L802B63E4:
/* E252B4 802B63E4 C65C0028 */  lwc1      $f28, 0x28($s2)
/* E252B8 802B63E8 C65A002C */  lwc1      $f26, 0x2C($s2)
/* E252BC 802B63EC C6580030 */  lwc1      $f24, 0x30($s2)
.L802B63F0:
/* E252C0 802B63F0 C7A00020 */  lwc1      $f0, 0x20($sp)
.L802B63F4:
/* E252C4 802B63F4 44901000 */  mtc1      $s0, $f2
/* E252C8 802B63F8 00000000 */  nop
/* E252CC 802B63FC 468010A0 */  cvt.s.w   $f2, $f2
.L802B6400:
/* E252D0 802B6400 46020002 */  mul.s     $f0, $f0, $f2
/* E252D4 802B6404 00000000 */  nop
/* E252D8 802B6408 C7A40024 */  lwc1      $f4, 0x24($sp)
.L802B640C:
/* E252DC 802B640C 46022102 */  mul.s     $f4, $f4, $f2
/* E252E0 802B6410 00000000 */  nop
.L802B6414:
/* E252E4 802B6414 24040003 */  addiu     $a0, $zero, 0x3
.L802B6418:
/* E252E8 802B6418 0240282D */  daddu     $a1, $s2, $zero
/* E252EC 802B641C 4600E000 */  add.s     $f0, $f28, $f0
.L802B6420:
/* E252F0 802B6420 27A60028 */  addiu     $a2, $sp, 0x28
.L802B6424:
/* E252F4 802B6424 27A7002C */  addiu     $a3, $sp, 0x2C
.L802B6428:
/* E252F8 802B6428 4604C101 */  sub.s     $f4, $f24, $f4
.L802B642C:
/* E252FC 802B642C E7BA002C */  swc1      $f26, 0x2C($sp)
D_802B6430:
/* E25300 802B6430 E7A00028 */  swc1      $f0, 0x28($sp)
/* E25304 802B6434 E7A40030 */  swc1      $f4, 0x30($sp)
/* E25308 802B6438 AFB30010 */  sw        $s3, 0x10($sp)
/* E2530C 802B643C E7B40014 */  swc1      $f20, 0x14($sp)
/* E25310 802B6440 0C037B01 */  jal       player_test_lateral_overlap
/* E25314 802B6444 E7B60018 */   swc1     $f22, 0x18($sp)
.L802B6448:
/* E25318 802B6448 0040882D */  daddu     $s1, $v0, $zero
glabel action_update_peach_step_down_land
/* E2531C 802B644C 0621FFC9 */  bgez      $s1, .L802B6374
.L802B6450:
/* E25320 802B6450 00000000 */   nop
.L802B6454:
/* E25324 802B6454 26100001 */  addiu     $s0, $s0, 0x1
/* E25328 802B6458 2A020010 */  slti      $v0, $s0, 0x10
/* E2532C 802B645C 1440FFE4 */  bnez      $v0, .L802B63F0
.L802B6460:
/* E25330 802B6460 00000000 */   nop
.L802B6464:
/* E25334 802B6464 2A020010 */  slti      $v0, $s0, 0x10
/* E25338 802B6468 14400061 */  bnez      $v0, .L802B65F0
glabel .L802B646C
/* E2533C 802B646C 00000000 */   nop
/* E25340 802B6470 0C0394D2 */  jal       func_800E5348
/* E25344 802B6474 00000000 */   nop
glabel action_update_raise_arms
/* E25348 802B6478 8E4400A4 */  lw        $a0, 0xA4($s2)
glabel action_update_peach_falling
/* E2534C 802B647C 0C0AD800 */  jal       parasol_get_npc
/* E25350 802B6480 46000586 */   mov.s    $f22, $f0
/* E25354 802B6484 14400030 */  bnez      $v0, .L802B6548
/* E25358 802B6488 27A50020 */   addiu    $a1, $sp, 0x20
.L802B648C:
/* E2535C 802B648C 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
.L802B6490:
/* E25360 802B6490 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
.L802B6494:
/* E25364 802B6494 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* E25368 802B6498 4481A000 */  mtc1      $at, $f20
/* E2536C 802B649C 00031080 */  sll       $v0, $v1, 2
.L802B64A0:
/* E25370 802B64A0 00431021 */  addu      $v0, $v0, $v1
/* E25374 802B64A4 00021080 */  sll       $v0, $v0, 2
glabel .L802B64A8
/* E25378 802B64A8 00431023 */  subu      $v0, $v0, $v1
.L802B64AC:
/* E2537C 802B64AC 000218C0 */  sll       $v1, $v0, 3
/* E25380 802B64B0 00431021 */  addu      $v0, $v0, $v1
.L802B64B4:
/* E25384 802B64B4 000210C0 */  sll       $v0, $v0, 3
/* E25388 802B64B8 4614B000 */  add.s     $f0, $f22, $f20
/* E2538C 802B64BC 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* E25390 802B64C0 00220821 */  addu      $at, $at, $v0
.L802B64C4:
/* E25394 802B64C4 C42C1DEC */  lwc1      $f12, %lo(gCameras + 0x6C)($at)
/* E25398 802B64C8 0C00A6C9 */  jal       clamp_angle
.L802B64CC:
/* E2539C 802B64CC 460C0301 */   sub.s    $f12, $f0, $f12
.L802B64D0:
/* E253A0 802B64D0 46000086 */  mov.s     $f2, $f0
.L802B64D4:
/* E253A4 802B64D4 4602A03E */  c.le.s    $f20, $f2
.L802B64D8:
/* E253A8 802B64D8 00000000 */  nop
glabel .L802B64DC
/* E253AC 802B64DC 45000015 */  bc1f      .L802B6534
glabel .L802B64E0
/* E253B0 802B64E0 00000000 */   nop
/* E253B4 802B64E4 3C014387 */  lui       $at, (0x43870000 >> 16)
/* E253B8 802B64E8 44810000 */  mtc1      $at, $f0
.L802B64EC:
/* E253BC 802B64EC 00000000 */  nop
glabel .L802B64F0
/* E253C0 802B64F0 4600103C */  c.lt.s    $f2, $f0
/* E253C4 802B64F4 00000000 */  nop
.L802B64F8:
/* E253C8 802B64F8 4500000E */  bc1f      .L802B6534
/* E253CC 802B64FC 00000000 */   nop
/* E253D0 802B6500 3C014170 */  lui       $at, (0x41700000 >> 16)
/* E253D4 802B6504 44810000 */  mtc1      $at, $f0
glabel action_update_pushing_block
/* E253D8 802B6508 080AD951 */  j         .L802B6544
.L802B650C:
/* E253DC 802B650C 4600B580 */   add.s    $f22, $f22, $f0
glabel .L802B6510
/* E253E0 802B6510 3C02802B */  lui       $v0, %hi(HammerHit)
/* E253E4 802B6514 8C426DB0 */  lw        $v0, %lo(HammerHit)($v0)
/* E253E8 802B6518 C7A00028 */  lwc1      $f0, 0x28($sp)
.L802B651C:
/* E253EC 802B651C C7A2002C */  lwc1      $f2, 0x2C($sp)
.L802B6520:
/* E253F0 802B6520 C7A40030 */  lwc1      $f4, 0x30($sp)
.L802B6524:
/* E253F4 802B6524 E4400000 */  swc1      $f0, 0x0($v0)
/* E253F8 802B6528 E4420004 */  swc1      $f2, 0x4($v0)
/* E253FC 802B652C 080AD97C */  j         .L802B65F0
.L802B6530:
/* E25400 802B6530 E4440008 */   swc1     $f4, 0x8($v0)
.L802B6534:
/* E25404 802B6534 3C01C170 */  lui       $at, (0xC1700000 >> 16)
/* E25408 802B6538 44810000 */  mtc1      $at, $f0
/* E2540C 802B653C 00000000 */  nop
/* E25410 802B6540 4600B580 */  add.s     $f22, $f22, $f0
glabel .L802B6544
/* E25414 802B6544 27A50020 */  addiu     $a1, $sp, 0x20
glabel .L802B6548
/* E25418 802B6548 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* E2541C 802B654C 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
glabel func_802B6550
/* E25420 802B6550 44816000 */  mtc1      $at, $f12
.L802B6554:
/* E25424 802B6554 27A60024 */  addiu     $a2, $sp, 0x24
/* E25428 802B6558 460CB302 */  mul.s     $f12, $f22, $f12
/* E2542C 802B655C 00000000 */  nop
/* E25430 802B6560 24100001 */  addiu     $s0, $zero, 0x1
/* E25434 802B6564 27B30030 */  addiu     $s3, $sp, 0x30
glabel .L802B6568
/* E25438 802B6568 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
.L802B656C:
/* E2543C 802B656C 44810000 */  mtc1      $at, $f0
.L802B6570:
/* E25440 802B6570 3C014080 */  lui       $at, (0x40800000 >> 16)
.L802B6574:
/* E25444 802B6574 4481A000 */  mtc1      $at, $f20
/* E25448 802B6578 0C00A82D */  jal       sin_cos_rad
/* E2544C 802B657C 46006303 */   div.s    $f12, $f12, $f0
.L802B6580:
/* E25450 802B6580 C7A00020 */  lwc1      $f0, 0x20($sp)
/* E25454 802B6584 44901000 */  mtc1      $s0, $f2
/* E25458 802B6588 00000000 */  nop
glabel .L802B658C
/* E2545C 802B658C 468010A0 */  cvt.s.w   $f2, $f2
.L802B6590:
/* E25460 802B6590 46020002 */  mul.s     $f0, $f0, $f2
glabel .L802B6594
/* E25464 802B6594 00000000 */  nop
.L802B6598:
/* E25468 802B6598 C7A40024 */  lwc1      $f4, 0x24($sp)
.L802B659C:
/* E2546C 802B659C 46022102 */  mul.s     $f4, $f4, $f2
/* E25470 802B65A0 00000000 */  nop
glabel .L802B65A4
/* E25474 802B65A4 24040003 */  addiu     $a0, $zero, 0x3
.L802B65A8:
/* E25478 802B65A8 0240282D */  daddu     $a1, $s2, $zero
/* E2547C 802B65AC 4600E000 */  add.s     $f0, $f28, $f0
/* E25480 802B65B0 27A60028 */  addiu     $a2, $sp, 0x28
glabel .L802B65B4
/* E25484 802B65B4 27A7002C */  addiu     $a3, $sp, 0x2C
.L802B65B8:
/* E25488 802B65B8 4604C101 */  sub.s     $f4, $f24, $f4
/* E2548C 802B65BC E7BA002C */  swc1      $f26, 0x2C($sp)
glabel .L802B65C0
/* E25490 802B65C0 E7A00028 */  swc1      $f0, 0x28($sp)
/* E25494 802B65C4 E7A40030 */  swc1      $f4, 0x30($sp)
/* E25498 802B65C8 AFB30010 */  sw        $s3, 0x10($sp)
glabel .L802B65CC
/* E2549C 802B65CC E7B40014 */  swc1      $f20, 0x14($sp)
.L802B65D0:
/* E254A0 802B65D0 0C037B01 */  jal       player_test_lateral_overlap
/* E254A4 802B65D4 E7B60018 */   swc1     $f22, 0x18($sp)
/* E254A8 802B65D8 0040882D */  daddu     $s1, $v0, $zero
.L802B65DC:
/* E254AC 802B65DC 0621FFCC */  bgez      $s1, .L802B6510
.L802B65E0:
/* E254B0 802B65E0 26100001 */   addiu    $s0, $s0, 0x1
.L802B65E4:
/* E254B4 802B65E4 2A020010 */  slti      $v0, $s0, 0x10
glabel action_update_walk_peach
/* E254B8 802B65E8 1440FFE5 */  bnez      $v0, .L802B6580
.L802B65EC:
/* E254BC 802B65EC 00000000 */   nop
.L802B65F0:
/* E254C0 802B65F0 06200020 */  bltz      $s1, .L802B6674
/* E254C4 802B65F4 32224000 */   andi     $v0, $s1, 0x4000
glabel func_802B65F8_E26D08
/* E254C8 802B65F8 1040001F */  beqz      $v0, .L802B6678
/* E254CC 802B65FC 0220102D */   daddu    $v0, $s1, $zero
/* E254D0 802B6600 3C108011 */  lui       $s0, %hi(gPlayerData + 0x1)
.L802B6604:
/* E254D4 802B6604 8210F291 */  lb        $s0, %lo(gPlayerData + 0x1)($s0)
/* E254D8 802B6608 0C0441A9 */  jal       get_entity_type
glabel .L802B660C
/* E254DC 802B660C 0220202D */   daddu    $a0, $s1, $zero
/* E254E0 802B6610 2443FFF9 */  addiu     $v1, $v0, -0x7
/* E254E4 802B6614 2C620020 */  sltiu     $v0, $v1, 0x20
/* E254E8 802B6618 10400016 */  beqz      $v0, .L802B6674
glabel .L802B661C
/* E254EC 802B661C 00031080 */   sll      $v0, $v1, 2
.L802B6620:
/* E254F0 802B6620 3C01802B */  lui       $at, %hi(.L802B6E08)
/* E254F4 802B6624 00220821 */  addu      $at, $at, $v0
.L802B6628:
/* E254F8 802B6628 8C226E08 */  lw        $v0, %lo(.L802B6E08)($at)
/* E254FC 802B662C 00400008 */  jr        $v0
.L802B6630:
/* E25500 802B6630 00000000 */   nop
glabel .L802B6634
/* E25504 802B6634 0603000F */  bgezl     $s0, .L802B6674
glabel action_update_talk
/* E25508 802B6638 2411FFFF */   addiu    $s1, $zero, -0x1
/* E2550C 802B663C 080AD998 */  j         .L802B6660
/* E25510 802B6640 00000000 */   nop
glabel .L802B6644
/* E25514 802B6644 5E00000B */  bgtzl     $s0, .L802B6674
glabel func_802B6648_E27428
/* E25518 802B6648 2411FFFF */   addiu    $s1, $zero, -0x1
.L802B664C:
/* E2551C 802B664C 080AD998 */  j         .L802B6660
.L802B6650:
/* E25520 802B6650 00000000 */   nop
glabel .L802B6654
/* E25524 802B6654 2A020002 */  slti      $v0, $s0, 0x2
/* E25528 802B6658 50400006 */  beql      $v0, $zero, .L802B6674
/* E2552C 802B665C 2411FFFF */   addiu    $s1, $zero, -0x1
glabel .L802B6660
/* E25530 802B6660 8E420004 */  lw        $v0, 0x4($s2)
/* E25534 802B6664 34420400 */  ori       $v0, $v0, 0x400
/* E25538 802B6668 080AD99D */  j         .L802B6674
glabel .L802B666C
/* E2553C 802B666C AE420004 */   sw       $v0, 0x4($s2)
glabel .L802B6670
/* E25540 802B6670 2411FFFF */  addiu     $s1, $zero, -0x1
glabel .L802B6674
/* E25544 802B6674 0220102D */  daddu     $v0, $s1, $zero
.L802B6678:
/* E25548 802B6678 8FBF0048 */  lw        $ra, 0x48($sp)
/* E2554C 802B667C 8FB30044 */  lw        $s3, 0x44($sp)
glabel .L802B6680
/* E25550 802B6680 8FB20040 */  lw        $s2, 0x40($sp)
/* E25554 802B6684 8FB1003C */  lw        $s1, 0x3C($sp)
/* E25558 802B6688 8FB00038 */  lw        $s0, 0x38($sp)
glabel func_802B668C
/* E2555C 802B668C D7BC0070 */  ldc1      $f28, 0x70($sp)
jtbl_802B6690:
/* E25560 802B6690 D7BA0068 */  ldc1      $f26, 0x68($sp)
/* E25564 802B6694 D7B80060 */  ldc1      $f24, 0x60($sp)
.L802B6698:
/* E25568 802B6698 D7B60058 */  ldc1      $f22, 0x58($sp)
/* E2556C 802B669C D7B40050 */  ldc1      $f20, 0x50($sp)
/* E25570 802B66A0 03E00008 */  jr        $ra
.L802B66A4:
/* E25574 802B66A4 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

s32 func_802B62A4_E25174(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 yaw;
    f32 angle;
    f32 outSinTheta;
    f32 outCosTheta;
    f32 playerX, playerY, playerZ;
    f32 x, y, z;
    s32 ret;
    s32 i;

    // first attempt
    yaw = func_800E5348();
    if (action_hammer_is_swinging_away(playerStatus->trueAnimation)) {
        angle = clamp_angle(yaw + 90.0f - gCameras[gCurrentCameraID].currentYaw);
        if (angle >= 90.0f && angle < 270.0f) {
            yaw += -30.0f;
        } else {
            yaw += 30.0f;
        }
    }

    sin_cos_rad(DEG_TO_RAD(yaw), &outSinTheta, &outCosTheta);
    playerX = playerStatus->position.x;
    playerY = playerStatus->position.y;
    playerZ = playerStatus->position.z;

    for (i = 1; i < 16; i++) {
        x = playerX + (outSinTheta * i);
        y = playerY;
        z = playerZ - (outCosTheta * i);
        ret = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw);
        if (ret >= 0) {
            HammerHit->hitPos.x = x;
            HammerHit->hitPos.y = y;
            HammerHit->hitPos.z = z;
            break;
        }
    }

    // second attempt
    if (i >= 16) {
        yaw = func_800E5348();
        if (!action_hammer_is_swinging_away(playerStatus->trueAnimation)) {
            angle = clamp_angle(yaw + 90.0f - gCameras[gCurrentCameraID].currentYaw);
            if (angle >= 90.0f && angle < 270.0f) {
                yaw += 15.0f;
            } else {
                yaw += -15.0f;
            }
        }

        sin_cos_rad(DEG_TO_RAD(yaw), &outSinTheta, &outCosTheta);
        for (i = 1; i < 16; i++) {
            x = playerX + (outSinTheta * i);
            y = playerY;
            z = playerZ - (outCosTheta * i);

            ret = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw);
            if (ret >= 0) {
                HammerHit->hitPos.x = x;
                HammerHit->hitPos.y = y;
                HammerHit->hitPos.z = z;
                break;
            }
        }
    }

    if (ret >= 0 && (ret & COLLISION_WITH_ENTITY_BIT)) {
        s32 hammerLevel = gPlayerData.hammerLevel;

        switch (get_entity_type(ret)) {
            case ENTITY_TYPE_HAMMER1_BLOCK:
            case ENTITY_TYPE_HAMMER1_BLOCK_TINY:
                if (hammerLevel >= 0) {
                    ret = -1;
                } else {
                    playerStatus->animFlags |= PA_FLAG_SHIVERING;
                }
                break;
            case ENTITY_TYPE_HAMMER2_BLOCK:
            case ENTITY_TYPE_HAMMER2_BLOCK_TINY:
                if (hammerLevel >= 1) {
                    ret = -1;
                } else {
                    playerStatus->animFlags |= PA_FLAG_SHIVERING;
                }
                break;
            case ENTITY_TYPE_HAMMER3_BLOCK:
            case ENTITY_TYPE_HAMMER3_BLOCK_TINY:
                if (hammerLevel >= 2) {
                    ret = -1;
                } else {
                    playerStatus->animFlags |= PA_FLAG_SHIVERING;
                }
                break;
            case ENTITY_TYPE_WOODEN_CRATE:
            case ENTITY_TYPE_BOMBABLE_ROCK:
                playerStatus->animFlags |= PA_FLAG_SHIVERING;
                break;
            case ENTITY_TYPE_BLUE_SWITCH:
            case ENTITY_TYPE_RED_SWITCH:
            case ENTITY_TYPE_BRICK_BLOCK:
                ret = -1;
                break;
        }
    }

    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel flashing_box_shockwave_appendGfx
/* 392BCC E00942FC 27BDFF08 */  addiu     $sp, $sp, -0xF8
/* 392BD0 E0094300 AFB000D8 */  sw        $s0, 0xD8($sp)
/* 392BD4 E0094304 0080802D */  daddu     $s0, $a0, $zero
/* 392BD8 E0094308 AFB100DC */  sw        $s1, 0xDC($sp)
/* 392BDC E009430C 27B10098 */  addiu     $s1, $sp, 0x98
/* 392BE0 E0094310 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 392BE4 E0094314 44800000 */  mtc1      $zero, $f0
/* 392BE8 E0094318 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 392BEC E009431C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 392BF0 E0094320 0220202D */  daddu     $a0, $s1, $zero
/* 392BF4 E0094324 AFB400E8 */  sw        $s4, 0xE8($sp)
/* 392BF8 E0094328 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 392BFC E009432C AFBF00F4 */  sw        $ra, 0xF4($sp)
/* 392C00 E0094330 AFB600F0 */  sw        $s6, 0xF0($sp)
/* 392C04 E0094334 AFB500EC */  sw        $s5, 0xEC($sp)
/* 392C08 E0094338 AFB300E4 */  sw        $s3, 0xE4($sp)
/* 392C0C E009433C AFB200E0 */  sw        $s2, 0xE0($sp)
/* 392C10 E0094340 8E12000C */  lw        $s2, 0xC($s0)
/* 392C14 E0094344 00031080 */  sll       $v0, $v1, 2
/* 392C18 E0094348 00431021 */  addu      $v0, $v0, $v1
/* 392C1C E009434C 00021080 */  sll       $v0, $v0, 2
/* 392C20 E0094350 00431023 */  subu      $v0, $v0, $v1
/* 392C24 E0094354 000218C0 */  sll       $v1, $v0, 3
/* 392C28 E0094358 00431021 */  addu      $v0, $v0, $v1
/* 392C2C E009435C 000210C0 */  sll       $v0, $v0, 3
/* 392C30 E0094360 44060000 */  mfc1      $a2, $f0
/* 392C34 E0094364 8E550000 */  lw        $s5, 0x0($s2)
/* 392C38 E0094368 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 392C3C E009436C 00220821 */  addu      $at, $at, $v0
/* 392C40 E0094370 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 392C44 E0094374 8E560020 */  lw        $s6, 0x20($s2)
/* 392C48 E0094378 46000007 */  neg.s     $f0, $f0
/* 392C4C E009437C 44050000 */  mfc1      $a1, $f0
/* 392C50 E0094380 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 392C54 E0094384 0C080104 */  jal       shim_guRotateF
/* 392C58 E0094388 AFA60010 */   sw       $a2, 0x10($sp)
/* 392C5C E009438C 3C04DB06 */  lui       $a0, (0xDB060024 >> 16)
/* 392C60 E0094390 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* 392C64 E0094394 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* 392C68 E0094398 34840024 */  ori       $a0, $a0, (0xDB060024 & 0xFFFF)
/* 392C6C E009439C 8E680000 */  lw        $t0, 0x0($s3)
/* 392C70 E00943A0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 392C74 E00943A4 0100182D */  daddu     $v1, $t0, $zero
/* 392C78 E00943A8 25080008 */  addiu     $t0, $t0, 0x8
/* 392C7C E00943AC AC620000 */  sw        $v0, 0x0($v1)
/* 392C80 E00943B0 AC600004 */  sw        $zero, 0x4($v1)
/* 392C84 E00943B4 AD040000 */  sw        $a0, 0x0($t0)
/* 392C88 E00943B8 8E020010 */  lw        $v0, 0x10($s0)
/* 392C8C E00943BC 27A40018 */  addiu     $a0, $sp, 0x18
/* 392C90 E00943C0 AE680000 */  sw        $t0, 0x0($s3)
/* 392C94 E00943C4 8C42001C */  lw        $v0, 0x1C($v0)
/* 392C98 E00943C8 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 392C9C E00943CC 00431021 */  addu      $v0, $v0, $v1
/* 392CA0 E00943D0 AD020004 */  sw        $v0, 0x4($t0)
/* 392CA4 E00943D4 8E450004 */  lw        $a1, 0x4($s2)
/* 392CA8 E00943D8 8E460008 */  lw        $a2, 0x8($s2)
/* 392CAC E00943DC 8E47000C */  lw        $a3, 0xC($s2)
/* 392CB0 E00943E0 25080008 */  addiu     $t0, $t0, 0x8
/* 392CB4 E00943E4 0C080108 */  jal       shim_guTranslateF
/* 392CB8 E00943E8 AE680000 */   sw       $t0, 0x0($s3)
/* 392CBC E00943EC 0220202D */  daddu     $a0, $s1, $zero
/* 392CC0 E00943F0 27A50018 */  addiu     $a1, $sp, 0x18
/* 392CC4 E00943F4 0C080114 */  jal       shim_guMtxCatF
/* 392CC8 E00943F8 00A0302D */   daddu    $a2, $a1, $zero
/* 392CCC E00943FC 27A40018 */  addiu     $a0, $sp, 0x18
/* 392CD0 E0094400 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 392CD4 E0094404 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 392CD8 E0094408 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 392CDC E009440C 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 392CE0 E0094410 96050000 */  lhu       $a1, 0x0($s0)
/* 392CE4 E0094414 8E220000 */  lw        $v0, 0x0($s1)
/* 392CE8 E0094418 00052980 */  sll       $a1, $a1, 6
/* 392CEC E009441C 00B42821 */  addu      $a1, $a1, $s4
/* 392CF0 E0094420 0C080118 */  jal       shim_guMtxF2L
/* 392CF4 E0094424 00452821 */   addu     $a1, $v0, $a1
/* 392CF8 E0094428 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 392CFC E009442C 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 392D00 E0094430 8E660000 */  lw        $a2, 0x0($s3)
/* 392D04 E0094434 96020000 */  lhu       $v0, 0x0($s0)
/* 392D08 E0094438 00C0202D */  daddu     $a0, $a2, $zero
/* 392D0C E009443C 24C60008 */  addiu     $a2, $a2, 0x8
/* 392D10 E0094440 AE660000 */  sw        $a2, 0x0($s3)
/* 392D14 E0094444 AC830000 */  sw        $v1, 0x0($a0)
/* 392D18 E0094448 24430001 */  addiu     $v1, $v0, 0x1
/* 392D1C E009444C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 392D20 E0094450 00021180 */  sll       $v0, $v0, 6
/* 392D24 E0094454 A6030000 */  sh        $v1, 0x0($s0)
/* 392D28 E0094458 8E230000 */  lw        $v1, 0x0($s1)
/* 392D2C E009445C 00541021 */  addu      $v0, $v0, $s4
/* 392D30 E0094460 00621821 */  addu      $v1, $v1, $v0
/* 392D34 E0094464 24C20008 */  addiu     $v0, $a2, 0x8
/* 392D38 E0094468 AC830004 */  sw        $v1, 0x4($a0)
/* 392D3C E009446C AE620000 */  sw        $v0, 0x0($s3)
/* 392D40 E0094470 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 392D44 E0094474 ACC20000 */  sw        $v0, 0x0($a2)
/* 392D48 E0094478 92420033 */  lbu       $v0, 0x33($s2)
/* 392D4C E009447C 92440037 */  lbu       $a0, 0x37($s2)
/* 392D50 E0094480 9245003B */  lbu       $a1, 0x3B($s2)
/* 392D54 E0094484 9247001B */  lbu       $a3, 0x1B($s2)
/* 392D58 E0094488 24C30010 */  addiu     $v1, $a2, 0x10
/* 392D5C E009448C AE630000 */  sw        $v1, 0x0($s3)
/* 392D60 E0094490 3C03FB00 */  lui       $v1, (0xFB000000 >> 16)
/* 392D64 E0094494 ACC30008 */  sw        $v1, 0x8($a2)
/* 392D68 E0094498 00021600 */  sll       $v0, $v0, 24
/* 392D6C E009449C 00042400 */  sll       $a0, $a0, 16
/* 392D70 E00944A0 00441025 */  or        $v0, $v0, $a0
/* 392D74 E00944A4 00052A00 */  sll       $a1, $a1, 8
/* 392D78 E00944A8 00451025 */  or        $v0, $v0, $a1
/* 392D7C E00944AC 00471025 */  or        $v0, $v0, $a3
/* 392D80 E00944B0 ACC20004 */  sw        $v0, 0x4($a2)
/* 392D84 E00944B4 9242003F */  lbu       $v0, 0x3F($s2)
/* 392D88 E00944B8 92440043 */  lbu       $a0, 0x43($s2)
/* 392D8C E00944BC 92430047 */  lbu       $v1, 0x47($s2)
/* 392D90 E00944C0 00021600 */  sll       $v0, $v0, 24
/* 392D94 E00944C4 00042400 */  sll       $a0, $a0, 16
/* 392D98 E00944C8 00441025 */  or        $v0, $v0, $a0
/* 392D9C E00944CC 00031A00 */  sll       $v1, $v1, 8
/* 392DA0 E00944D0 00431025 */  or        $v0, $v0, $v1
/* 392DA4 E00944D4 ACC2000C */  sw        $v0, 0xC($a2)
/* 392DA8 E00944D8 2EA20002 */  sltiu     $v0, $s5, 0x2
/* 392DAC E00944DC 10400041 */  beqz      $v0, .LE00945E4
/* 392DB0 E00944E0 32C20001 */   andi     $v0, $s6, 0x1
/* 392DB4 E00944E4 10400040 */  beqz      $v0, .LE00945E8
/* 392DB8 E00944E8 26A2FFFF */   addiu    $v0, $s5, -0x1
/* 392DBC E00944EC 8E450028 */  lw        $a1, 0x28($s2)
/* 392DC0 E00944F0 8E46002C */  lw        $a2, 0x2C($s2)
/* 392DC4 E00944F4 3C073F89 */  lui       $a3, (0x3F892492 >> 16)
/* 392DC8 E00944F8 34E72492 */  ori       $a3, $a3, (0x3F892492 & 0xFFFF)
/* 392DCC E00944FC 0C080110 */  jal       shim_guScaleF
/* 392DD0 E0094500 27A40018 */   addiu    $a0, $sp, 0x18
/* 392DD4 E0094504 27A40018 */  addiu     $a0, $sp, 0x18
/* 392DD8 E0094508 96050000 */  lhu       $a1, 0x0($s0)
/* 392DDC E009450C 8E220000 */  lw        $v0, 0x0($s1)
/* 392DE0 E0094510 00052980 */  sll       $a1, $a1, 6
/* 392DE4 E0094514 00B42821 */  addu      $a1, $a1, $s4
/* 392DE8 E0094518 0C080118 */  jal       shim_guMtxF2L
/* 392DEC E009451C 00452821 */   addu     $a1, $v0, $a1
/* 392DF0 E0094520 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 392DF4 E0094524 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 392DF8 E0094528 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 392DFC E009452C 8E660000 */  lw        $a2, 0x0($s3)
/* 392E00 E0094530 3C07DE00 */  lui       $a3, (0xDE000000 >> 16)
/* 392E04 E0094534 00C0202D */  daddu     $a0, $a2, $zero
/* 392E08 E0094538 24C60008 */  addiu     $a2, $a2, 0x8
/* 392E0C E009453C AE660000 */  sw        $a2, 0x0($s3)
/* 392E10 E0094540 96020000 */  lhu       $v0, 0x0($s0)
/* 392E14 E0094544 3C05F200 */  lui       $a1, (0xF2000000 >> 16)
/* 392E18 E0094548 AC830000 */  sw        $v1, 0x0($a0)
/* 392E1C E009454C 24430001 */  addiu     $v1, $v0, 0x1
/* 392E20 E0094550 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 392E24 E0094554 00021180 */  sll       $v0, $v0, 6
/* 392E28 E0094558 A6030000 */  sh        $v1, 0x0($s0)
/* 392E2C E009455C 8E230000 */  lw        $v1, 0x0($s1)
/* 392E30 E0094560 00541021 */  addu      $v0, $v0, $s4
/* 392E34 E0094564 00621821 */  addu      $v1, $v1, $v0
/* 392E38 E0094568 24C20008 */  addiu     $v0, $a2, 0x8
/* 392E3C E009456C AC830004 */  sw        $v1, 0x4($a0)
/* 392E40 E0094570 AE620000 */  sw        $v0, 0x0($s3)
/* 392E44 E0094574 3C020900 */  lui       $v0, %hi(D_09000600_415660)
/* 392E48 E0094578 24420600 */  addiu     $v0, $v0, %lo(D_09000600_415660)
/* 392E4C E009457C ACC20004 */  sw        $v0, 0x4($a2)
/* 392E50 E0094580 24C20010 */  addiu     $v0, $a2, 0x10
/* 392E54 E0094584 001618C0 */  sll       $v1, $s6, 3
/* 392E58 E0094588 ACC70000 */  sw        $a3, 0x0($a2)
/* 392E5C E009458C AE620000 */  sw        $v0, 0x0($s3)
/* 392E60 E0094590 30620FFF */  andi      $v0, $v1, 0xFFF
/* 392E64 E0094594 00022300 */  sll       $a0, $v0, 12
/* 392E68 E0094598 00451025 */  or        $v0, $v0, $a1
/* 392E6C E009459C 00822025 */  or        $a0, $a0, $v0
/* 392E70 E00945A0 24630080 */  addiu     $v1, $v1, 0x80
/* 392E74 E00945A4 30630FFF */  andi      $v1, $v1, 0xFFF
/* 392E78 E00945A8 00031300 */  sll       $v0, $v1, 12
/* 392E7C E00945AC 00431025 */  or        $v0, $v0, $v1
/* 392E80 E00945B0 ACC2000C */  sw        $v0, 0xC($a2)
/* 392E84 E00945B4 24C20018 */  addiu     $v0, $a2, 0x18
/* 392E88 E00945B8 ACC40008 */  sw        $a0, 0x8($a2)
/* 392E8C E00945BC AE620000 */  sw        $v0, 0x0($s3)
/* 392E90 E00945C0 3C020900 */  lui       $v0, %hi(D_090008E8_415948)
/* 392E94 E00945C4 244208E8 */  addiu     $v0, $v0, %lo(D_090008E8_415948)
/* 392E98 E00945C8 ACC20014 */  sw        $v0, 0x14($a2)
/* 392E9C E00945CC 24C20020 */  addiu     $v0, $a2, 0x20
/* 392EA0 E00945D0 ACC70010 */  sw        $a3, 0x10($a2)
/* 392EA4 E00945D4 AE620000 */  sw        $v0, 0x0($s3)
/* 392EA8 E00945D8 24020040 */  addiu     $v0, $zero, 0x40
/* 392EAC E00945DC ACC80018 */  sw        $t0, 0x18($a2)
/* 392EB0 E00945E0 ACC2001C */  sw        $v0, 0x1C($a2)
.LE00945E4:
/* 392EB4 E00945E4 26A2FFFF */  addiu     $v0, $s5, -0x1
.LE00945E8:
/* 392EB8 E00945E8 2C420003 */  sltiu     $v0, $v0, 0x3
/* 392EBC E00945EC 10400059 */  beqz      $v0, .LE0094754
/* 392EC0 E00945F0 24020001 */   addiu    $v0, $zero, 0x1
/* 392EC4 E00945F4 16A2000D */  bne       $s5, $v0, .LE009462C
/* 392EC8 E00945F8 00000000 */   nop
/* 392ECC E00945FC 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 392ED0 E0094600 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 392ED4 E0094604 8C620000 */  lw        $v0, 0x0($v1)
/* 392ED8 E0094608 0040202D */  daddu     $a0, $v0, $zero
/* 392EDC E009460C 24420008 */  addiu     $v0, $v0, 0x8
/* 392EE0 E0094610 AC620000 */  sw        $v0, 0x0($v1)
/* 392EE4 E0094614 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 392EE8 E0094618 AC820000 */  sw        $v0, 0x0($a0)
/* 392EEC E009461C 92420017 */  lbu       $v0, 0x17($s2)
/* 392EF0 E0094620 3C03FFFF */  lui       $v1, (0xFFFF0000 >> 16)
/* 392EF4 E0094624 00431025 */  or        $v0, $v0, $v1
/* 392EF8 E0094628 AC820004 */  sw        $v0, 0x4($a0)
.LE009462C:
/* 392EFC E009462C 44800000 */  mtc1      $zero, $f0
/* 392F00 E0094630 27A40018 */  addiu     $a0, $sp, 0x18
/* 392F04 E0094634 44050000 */  mfc1      $a1, $f0
/* 392F08 E0094638 8E46002C */  lw        $a2, 0x2C($s2)
/* 392F0C E009463C 0C080108 */  jal       shim_guTranslateF
/* 392F10 E0094640 00A0382D */   daddu    $a3, $a1, $zero
/* 392F14 E0094644 C6400024 */  lwc1      $f0, 0x24($s2)
/* 392F18 E0094648 3C013FD0 */  lui       $at, (0x3FD00000 >> 16)
/* 392F1C E009464C 44811800 */  mtc1      $at, $f3
/* 392F20 E0094650 44801000 */  mtc1      $zero, $f2
/* 392F24 E0094654 46000021 */  cvt.d.s   $f0, $f0
/* 392F28 E0094658 46220002 */  mul.d     $f0, $f0, $f2
/* 392F2C E009465C 00000000 */  nop
/* 392F30 E0094660 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 392F34 E0094664 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 392F38 E0094668 27B00058 */  addiu     $s0, $sp, 0x58
/* 392F3C E009466C 0200202D */  daddu     $a0, $s0, $zero
/* 392F40 E0094670 46200020 */  cvt.s.d   $f0, $f0
/* 392F44 E0094674 44050000 */  mfc1      $a1, $f0
/* 392F48 E0094678 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 392F4C E009467C 0C080110 */  jal       shim_guScaleF
/* 392F50 E0094680 00A0302D */   daddu    $a2, $a1, $zero
/* 392F54 E0094684 0200202D */  daddu     $a0, $s0, $zero
/* 392F58 E0094688 27A50018 */  addiu     $a1, $sp, 0x18
/* 392F5C E009468C 0C080114 */  jal       shim_guMtxCatF
/* 392F60 E0094690 00A0302D */   daddu    $a2, $a1, $zero
/* 392F64 E0094694 27A40018 */  addiu     $a0, $sp, 0x18
/* 392F68 E0094698 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 392F6C E009469C 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 392F70 E00946A0 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 392F74 E00946A4 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 392F78 E00946A8 96050000 */  lhu       $a1, 0x0($s0)
/* 392F7C E00946AC 8E220000 */  lw        $v0, 0x0($s1)
/* 392F80 E00946B0 00052980 */  sll       $a1, $a1, 6
/* 392F84 E00946B4 00B22821 */  addu      $a1, $a1, $s2
/* 392F88 E00946B8 0C080118 */  jal       shim_guMtxF2L
/* 392F8C E00946BC 00452821 */   addu     $a1, $v0, $a1
/* 392F90 E00946C0 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
/* 392F94 E00946C4 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 392F98 E00946C8 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 392F9C E00946CC 8CA40000 */  lw        $a0, 0x0($a1)
/* 392FA0 E00946D0 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* 392FA4 E00946D4 0080302D */  daddu     $a2, $a0, $zero
/* 392FA8 E00946D8 24840008 */  addiu     $a0, $a0, 0x8
/* 392FAC E00946DC ACA40000 */  sw        $a0, 0x0($a1)
/* 392FB0 E00946E0 96020000 */  lhu       $v0, 0x0($s0)
/* 392FB4 E00946E4 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 392FB8 E00946E8 ACC30000 */  sw        $v1, 0x0($a2)
/* 392FBC E00946EC 24430001 */  addiu     $v1, $v0, 0x1
/* 392FC0 E00946F0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 392FC4 E00946F4 00021180 */  sll       $v0, $v0, 6
/* 392FC8 E00946F8 A6030000 */  sh        $v1, 0x0($s0)
/* 392FCC E00946FC 8E230000 */  lw        $v1, 0x0($s1)
/* 392FD0 E0094700 00521021 */  addu      $v0, $v0, $s2
/* 392FD4 E0094704 00621821 */  addu      $v1, $v1, $v0
/* 392FD8 E0094708 24820008 */  addiu     $v0, $a0, 0x8
/* 392FDC E009470C ACC30004 */  sw        $v1, 0x4($a2)
/* 392FE0 E0094710 3C03DE00 */  lui       $v1, (0xDE000000 >> 16)
/* 392FE4 E0094714 ACA20000 */  sw        $v0, 0x0($a1)
/* 392FE8 E0094718 3C020900 */  lui       $v0, %hi(D_09000950_4159B0)
/* 392FEC E009471C 24420950 */  addiu     $v0, $v0, %lo(D_09000950_4159B0)
/* 392FF0 E0094720 AC820004 */  sw        $v0, 0x4($a0)
/* 392FF4 E0094724 24820010 */  addiu     $v0, $a0, 0x10
/* 392FF8 E0094728 AC830000 */  sw        $v1, 0x0($a0)
/* 392FFC E009472C ACA20000 */  sw        $v0, 0x0($a1)
/* 393000 E0094730 3C020900 */  lui       $v0, %hi(D_09000FF8_40E288)
/* 393004 E0094734 24420FF8 */  addiu     $v0, $v0, %lo(D_09000FF8_40E288)
/* 393008 E0094738 AC82000C */  sw        $v0, 0xC($a0)
/* 39300C E009473C 24820018 */  addiu     $v0, $a0, 0x18
/* 393010 E0094740 AC830008 */  sw        $v1, 0x8($a0)
/* 393014 E0094744 ACA20000 */  sw        $v0, 0x0($a1)
/* 393018 E0094748 24020040 */  addiu     $v0, $zero, 0x40
/* 39301C E009474C AC870010 */  sw        $a3, 0x10($a0)
/* 393020 E0094750 AC820014 */  sw        $v0, 0x14($a0)
.LE0094754:
/* 393024 E0094754 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 393028 E0094758 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 39302C E009475C 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 393030 E0094760 8C620000 */  lw        $v0, 0x0($v1)
/* 393034 E0094764 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 393038 E0094768 0040202D */  daddu     $a0, $v0, $zero
/* 39303C E009476C 24420008 */  addiu     $v0, $v0, 0x8
/* 393040 E0094770 AC620000 */  sw        $v0, 0x0($v1)
/* 393044 E0094774 24020040 */  addiu     $v0, $zero, 0x40
/* 393048 E0094778 AC850000 */  sw        $a1, 0x0($a0)
/* 39304C E009477C AC820004 */  sw        $v0, 0x4($a0)
/* 393050 E0094780 8FBF00F4 */  lw        $ra, 0xF4($sp)
/* 393054 E0094784 8FB600F0 */  lw        $s6, 0xF0($sp)
/* 393058 E0094788 8FB500EC */  lw        $s5, 0xEC($sp)
/* 39305C E009478C 8FB400E8 */  lw        $s4, 0xE8($sp)
/* 393060 E0094790 8FB300E4 */  lw        $s3, 0xE4($sp)
/* 393064 E0094794 8FB200E0 */  lw        $s2, 0xE0($sp)
/* 393068 E0094798 8FB100DC */  lw        $s1, 0xDC($sp)
/* 39306C E009479C 8FB000D8 */  lw        $s0, 0xD8($sp)
/* 393070 E00947A0 03E00008 */  jr        $ra
/* 393074 E00947A4 27BD00F8 */   addiu    $sp, $sp, 0xF8
/* 393078 E00947A8 00000000 */  nop
/* 39307C E00947AC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void flashing_box_shockwave_appendGfx(void* effect) {
    FlashingBoxShockwaveFXData* data = ((EffectInstance*)effect)->data.flashingBoxShockwave;
    s32 unk_00 = data->unk_00;
    s32 unk_20 = data->unk_20;
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f sp98;

    shim_guRotateF(sp98, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);

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

    shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
    shim_guMtxCatF(sp98, sp18, sp18);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_30, data->unk_34, data->unk_38, data->unk_18);
    gDPSetEnvColor(gMainGfxPos++, data->unk_3C, data->unk_40, data->unk_44, 0);

    if ((unk_00 == 0 || unk_00 == 1) && unk_20 % 2) {
        shim_guScaleF(sp18, data->unk_28, data->unk_2C, 15.0f / 14);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09000600_3936A0);
        gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, unk_20 * 8, unk_20 * 8, unk_20 * 8 + 128, unk_20 * 8 + 128);
        gSPDisplayList(gMainGfxPos++, D_090008E8_393988);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }

    if (unk_00 >= 1 && unk_00 <= 3) {
        if (unk_00 == 1) {
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 0, data->unk_14);
        }

        shim_guTranslateF(sp18, 0.0f, data->unk_2C, 0.0f);
        shim_guScaleF(sp58, data->unk_24 * 0.25, data->unk_24 * 0.25, 1.0f);
        shim_guMtxCatF(sp58, sp18, sp18);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

        gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
        gSPDisplayList(gMainGfxPos++, D_09000950_3939F0);
        gSPDisplayList(gMainGfxPos++, D_09000FF8_394098);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel update_lerp_battle
/* 1A99BC 8027B0DC 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* 1A99C0 8027B0E0 F7B80030 */  sdc1      $f24, 0x30($sp)
/* 1A99C4 8027B0E4 4485C000 */  mtc1      $a1, $f24
/* 1A99C8 8027B0E8 F7BA0038 */  sdc1      $f26, 0x38($sp)
/* 1A99CC 8027B0EC 4486D000 */  mtc1      $a2, $f26
/* 1A99D0 8027B0F0 AFB10014 */  sw        $s1, 0x14($sp)
/* 1A99D4 8027B0F4 AFB00010 */  sw        $s0, 0x10($sp)
/* 1A99D8 8027B0F8 8FB00050 */  lw        $s0, 0x50($sp)
/* 1A99DC 8027B0FC 2C82000D */  sltiu     $v0, $a0, 0xD
/* 1A99E0 8027B100 AFBF0018 */  sw        $ra, 0x18($sp)
/* 1A99E4 8027B104 F7B60028 */  sdc1      $f22, 0x28($sp)
/* 1A99E8 8027B108 F7B40020 */  sdc1      $f20, 0x20($sp)
/* 1A99EC 8027B10C 1040013B */  beqz      $v0, .L8027B5FC
/* 1A99F0 8027B110 00E0882D */   daddu    $s1, $a3, $zero
/* 1A99F4 8027B114 00041080 */  sll       $v0, $a0, 2
/* 1A99F8 8027B118 3C01802A */  lui       $at, %hi(jtbl_8029D9A8)
/* 1A99FC 8027B11C 00220821 */  addu      $at, $at, $v0
/* 1A9A00 8027B120 8C22D9A8 */  lw        $v0, %lo(jtbl_8029D9A8)($at)
/* 1A9A04 8027B124 00400008 */  jr        $v0
/* 1A9A08 8027B128 00000000 */   nop
glabel .L8027B12C
/* 1A9A0C 8027B12C 4618D001 */  sub.s     $f0, $f26, $f24
/* 1A9A10 8027B130 44911000 */  mtc1      $s1, $f2
/* 1A9A14 8027B134 00000000 */  nop
/* 1A9A18 8027B138 468010A0 */  cvt.s.w   $f2, $f2
/* 1A9A1C 8027B13C 46020002 */  mul.s     $f0, $f0, $f2
/* 1A9A20 8027B140 00000000 */  nop
/* 1A9A24 8027B144 44901000 */  mtc1      $s0, $f2
/* 1A9A28 8027B148 00000000 */  nop
/* 1A9A2C 8027B14C 468010A0 */  cvt.s.w   $f2, $f2
/* 1A9A30 8027B150 0809EC80 */  j         .L8027B200
/* 1A9A34 8027B154 46020003 */   div.s    $f0, $f0, $f2
glabel .L8027B158
/* 1A9A38 8027B158 02310018 */  mult      $s1, $s1
/* 1A9A3C 8027B15C 00004012 */  mflo      $t0
/* 1A9A40 8027B160 00000000 */  nop
/* 1A9A44 8027B164 0809EC75 */  j         .L8027B1D4
/* 1A9A48 8027B168 02100018 */   mult     $s0, $s0
glabel .L8027B16C
/* 1A9A4C 8027B16C 02310018 */  mult      $s1, $s1
/* 1A9A50 8027B170 00004012 */  mflo      $t0
/* 1A9A54 8027B174 00000000 */  nop
/* 1A9A58 8027B178 0809EC6D */  j         .L8027B1B4
/* 1A9A5C 8027B17C 02100018 */   mult     $s0, $s0
glabel .L8027B180
/* 1A9A60 8027B180 02310018 */  mult      $s1, $s1
/* 1A9A64 8027B184 00004012 */  mflo      $t0
/* 1A9A68 8027B188 00000000 */  nop
/* 1A9A6C 8027B18C 00000000 */  nop
/* 1A9A70 8027B190 02100018 */  mult      $s0, $s0
/* 1A9A74 8027B194 00001012 */  mflo      $v0
/* 1A9A78 8027B198 00000000 */  nop
/* 1A9A7C 8027B19C 00000000 */  nop
/* 1A9A80 8027B1A0 01110018 */  mult      $t0, $s1
/* 1A9A84 8027B1A4 00004012 */  mflo      $t0
/* 1A9A88 8027B1A8 00000000 */  nop
/* 1A9A8C 8027B1AC 00000000 */  nop
/* 1A9A90 8027B1B0 00500018 */  mult      $v0, $s0
.L8027B1B4:
/* 1A9A94 8027B1B4 00001012 */  mflo      $v0
/* 1A9A98 8027B1B8 00000000 */  nop
/* 1A9A9C 8027B1BC 00000000 */  nop
/* 1A9AA0 8027B1C0 01110018 */  mult      $t0, $s1
/* 1A9AA4 8027B1C4 00004012 */  mflo      $t0
/* 1A9AA8 8027B1C8 00000000 */  nop
/* 1A9AAC 8027B1CC 00000000 */  nop
/* 1A9AB0 8027B1D0 00500018 */  mult      $v0, $s0
.L8027B1D4:
/* 1A9AB4 8027B1D4 4618D081 */  sub.s     $f2, $f26, $f24
/* 1A9AB8 8027B1D8 44880000 */  mtc1      $t0, $f0
/* 1A9ABC 8027B1DC 00000000 */  nop
/* 1A9AC0 8027B1E0 46800020 */  cvt.s.w   $f0, $f0
/* 1A9AC4 8027B1E4 46020002 */  mul.s     $f0, $f0, $f2
/* 1A9AC8 8027B1E8 00000000 */  nop
/* 1A9ACC 8027B1EC 00001012 */  mflo      $v0
/* 1A9AD0 8027B1F0 44821000 */  mtc1      $v0, $f2
/* 1A9AD4 8027B1F4 00000000 */  nop
/* 1A9AD8 8027B1F8 468010A0 */  cvt.s.w   $f2, $f2
/* 1A9ADC 8027B1FC 46020003 */  div.s     $f0, $f0, $f2
.L8027B200:
/* 1A9AE0 8027B200 0809ED80 */  j         .L8027B600
/* 1A9AE4 8027B204 4600C000 */   add.s    $f0, $f24, $f0
glabel .L8027B208
/* 1A9AE8 8027B208 44916000 */  mtc1      $s1, $f12
/* 1A9AEC 8027B20C 00000000 */  nop
/* 1A9AF0 8027B210 46806320 */  cvt.s.w   $f12, $f12
/* 1A9AF4 8027B214 4490B000 */  mtc1      $s0, $f22
/* 1A9AF8 8027B218 00000000 */  nop
/* 1A9AFC 8027B21C 4680B5A0 */  cvt.s.w   $f22, $f22
/* 1A9B00 8027B220 46166303 */  div.s     $f12, $f12, $f22
/* 1A9B04 8027B224 3C01802A */  lui       $at, %hi(D_8029D9E0)
/* 1A9B08 8027B228 D420D9E0 */  ldc1      $f0, %lo(D_8029D9E0)($at)
/* 1A9B0C 8027B22C 46006321 */  cvt.d.s   $f12, $f12
/* 1A9B10 8027B230 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9B14 8027B234 00000000 */  nop
/* 1A9B18 8027B238 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 1A9B1C 8027B23C 44810800 */  mtc1      $at, $f1
/* 1A9B20 8027B240 44800000 */  mtc1      $zero, $f0
/* 1A9B24 8027B244 00000000 */  nop
/* 1A9B28 8027B248 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9B2C 8027B24C 00000000 */  nop
/* 1A9B30 8027B250 0809ECAF */  j         .L8027B2BC
/* 1A9B34 8027B254 4618D501 */   sub.s    $f20, $f26, $f24
glabel .L8027B258
/* 1A9B38 8027B258 02310018 */  mult      $s1, $s1
/* 1A9B3C 8027B25C 4490B000 */  mtc1      $s0, $f22
/* 1A9B40 8027B260 00000000 */  nop
/* 1A9B44 8027B264 4680B5A0 */  cvt.s.w   $f22, $f22
/* 1A9B48 8027B268 3C01802A */  lui       $at, %hi(D_8029D9E8)
/* 1A9B4C 8027B26C D420D9E8 */  ldc1      $f0, %lo(D_8029D9E8)($at)
/* 1A9B50 8027B270 00001812 */  mflo      $v1
/* 1A9B54 8027B274 44836000 */  mtc1      $v1, $f12
/* 1A9B58 8027B278 00000000 */  nop
/* 1A9B5C 8027B27C 46806320 */  cvt.s.w   $f12, $f12
/* 1A9B60 8027B280 46166303 */  div.s     $f12, $f12, $f22
/* 1A9B64 8027B284 46006321 */  cvt.d.s   $f12, $f12
/* 1A9B68 8027B288 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9B6C 8027B28C 00000000 */  nop
/* 1A9B70 8027B290 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 1A9B74 8027B294 44810800 */  mtc1      $at, $f1
/* 1A9B78 8027B298 44800000 */  mtc1      $zero, $f0
/* 1A9B7C 8027B29C 00000000 */  nop
/* 1A9B80 8027B2A0 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9B84 8027B2A4 00000000 */  nop
/* 1A9B88 8027B2A8 3C01402E */  lui       $at, (0x402E0000 >> 16)
/* 1A9B8C 8027B2AC 44810800 */  mtc1      $at, $f1
/* 1A9B90 8027B2B0 44800000 */  mtc1      $zero, $f0
/* 1A9B94 8027B2B4 4618D501 */  sub.s     $f20, $f26, $f24
/* 1A9B98 8027B2B8 46206303 */  div.d     $f12, $f12, $f0
.L8027B2BC:
/* 1A9B9C 8027B2BC 0C00A874 */  jal       cos_rad
/* 1A9BA0 8027B2C0 46206320 */   cvt.s.d  $f12, $f12
/* 1A9BA4 8027B2C4 4600A502 */  mul.s     $f20, $f20, $f0
/* 1A9BA8 8027B2C8 00000000 */  nop
/* 1A9BAC 8027B2CC 4616B582 */  mul.s     $f22, $f22, $f22
/* 1A9BB0 8027B2D0 00000000 */  nop
/* 1A9BB4 8027B2D4 02111023 */  subu      $v0, $s0, $s1
/* 1A9BB8 8027B2D8 44820000 */  mtc1      $v0, $f0
/* 1A9BBC 8027B2DC 00000000 */  nop
/* 1A9BC0 8027B2E0 46800020 */  cvt.s.w   $f0, $f0
/* 1A9BC4 8027B2E4 4600A502 */  mul.s     $f20, $f20, $f0
/* 1A9BC8 8027B2E8 00000000 */  nop
/* 1A9BCC 8027B2EC 4600A502 */  mul.s     $f20, $f20, $f0
/* 1A9BD0 8027B2F0 00000000 */  nop
/* 1A9BD4 8027B2F4 4616A503 */  div.s     $f20, $f20, $f22
/* 1A9BD8 8027B2F8 0809ED80 */  j         .L8027B600
/* 1A9BDC 8027B2FC 4614D001 */   sub.s    $f0, $f26, $f20
glabel .L8027B300
/* 1A9BE0 8027B300 02113823 */  subu      $a3, $s0, $s1
/* 1A9BE4 8027B304 00E70018 */  mult      $a3, $a3
/* 1A9BE8 8027B308 4618D101 */  sub.s     $f4, $f26, $f24
/* 1A9BEC 8027B30C 00001812 */  mflo      $v1
/* 1A9BF0 8027B310 44830000 */  mtc1      $v1, $f0
/* 1A9BF4 8027B314 00000000 */  nop
/* 1A9BF8 8027B318 46800020 */  cvt.s.w   $f0, $f0
/* 1A9BFC 8027B31C 46040002 */  mul.s     $f0, $f0, $f4
/* 1A9C00 8027B320 00000000 */  nop
/* 1A9C04 8027B324 02100018 */  mult      $s0, $s0
/* 1A9C08 8027B328 00001812 */  mflo      $v1
/* 1A9C0C 8027B32C 44831000 */  mtc1      $v1, $f2
/* 1A9C10 8027B330 00000000 */  nop
/* 1A9C14 8027B334 468010A0 */  cvt.s.w   $f2, $f2
/* 1A9C18 8027B338 0809ECFB */  j         .L8027B3EC
/* 1A9C1C 8027B33C 4604C100 */   add.s    $f4, $f24, $f4
glabel .L8027B340
/* 1A9C20 8027B340 02113823 */  subu      $a3, $s0, $s1
/* 1A9C24 8027B344 00E70018 */  mult      $a3, $a3
/* 1A9C28 8027B348 00001012 */  mflo      $v0
/* 1A9C2C 8027B34C 00000000 */  nop
/* 1A9C30 8027B350 00000000 */  nop
/* 1A9C34 8027B354 00470018 */  mult      $v0, $a3
/* 1A9C38 8027B358 00004012 */  mflo      $t0
/* 1A9C3C 8027B35C 00000000 */  nop
/* 1A9C40 8027B360 0809ECEC */  j         .L8027B3B0
/* 1A9C44 8027B364 02100018 */   mult     $s0, $s0
glabel .L8027B368
/* 1A9C48 8027B368 02113823 */  subu      $a3, $s0, $s1
/* 1A9C4C 8027B36C 00E70018 */  mult      $a3, $a3
/* 1A9C50 8027B370 00001012 */  mflo      $v0
/* 1A9C54 8027B374 00000000 */  nop
/* 1A9C58 8027B378 00000000 */  nop
/* 1A9C5C 8027B37C 00470018 */  mult      $v0, $a3
/* 1A9C60 8027B380 00004012 */  mflo      $t0
/* 1A9C64 8027B384 00000000 */  nop
/* 1A9C68 8027B388 00000000 */  nop
/* 1A9C6C 8027B38C 02100018 */  mult      $s0, $s0
/* 1A9C70 8027B390 00001012 */  mflo      $v0
/* 1A9C74 8027B394 00000000 */  nop
/* 1A9C78 8027B398 00000000 */  nop
/* 1A9C7C 8027B39C 01070018 */  mult      $t0, $a3
/* 1A9C80 8027B3A0 00004012 */  mflo      $t0
/* 1A9C84 8027B3A4 00000000 */  nop
/* 1A9C88 8027B3A8 00000000 */  nop
/* 1A9C8C 8027B3AC 00500018 */  mult      $v0, $s0
.L8027B3B0:
/* 1A9C90 8027B3B0 4618D101 */  sub.s     $f4, $f26, $f24
/* 1A9C94 8027B3B4 44880000 */  mtc1      $t0, $f0
/* 1A9C98 8027B3B8 00000000 */  nop
/* 1A9C9C 8027B3BC 46800020 */  cvt.s.w   $f0, $f0
/* 1A9CA0 8027B3C0 46040002 */  mul.s     $f0, $f0, $f4
/* 1A9CA4 8027B3C4 00000000 */  nop
/* 1A9CA8 8027B3C8 00001012 */  mflo      $v0
/* 1A9CAC 8027B3CC 00000000 */  nop
/* 1A9CB0 8027B3D0 00000000 */  nop
/* 1A9CB4 8027B3D4 00500018 */  mult      $v0, $s0
/* 1A9CB8 8027B3D8 4604C100 */  add.s     $f4, $f24, $f4
/* 1A9CBC 8027B3DC 00001012 */  mflo      $v0
/* 1A9CC0 8027B3E0 44821000 */  mtc1      $v0, $f2
/* 1A9CC4 8027B3E4 00000000 */  nop
/* 1A9CC8 8027B3E8 468010A0 */  cvt.s.w   $f2, $f2
.L8027B3EC:
/* 1A9CCC 8027B3EC 46020003 */  div.s     $f0, $f0, $f2
/* 1A9CD0 8027B3F0 0809ED80 */  j         .L8027B600
/* 1A9CD4 8027B3F4 46002001 */   sub.s    $f0, $f4, $f0
glabel .L8027B3F8
/* 1A9CD8 8027B3F8 02310018 */  mult      $s1, $s1
/* 1A9CDC 8027B3FC 4490A000 */  mtc1      $s0, $f20
/* 1A9CE0 8027B400 00000000 */  nop
/* 1A9CE4 8027B404 4680A520 */  cvt.s.w   $f20, $f20
/* 1A9CE8 8027B408 3C01802A */  lui       $at, %hi(D_8029D9F0)
/* 1A9CEC 8027B40C D420D9F0 */  ldc1      $f0, %lo(D_8029D9F0)($at)
/* 1A9CF0 8027B410 00001812 */  mflo      $v1
/* 1A9CF4 8027B414 44836000 */  mtc1      $v1, $f12
/* 1A9CF8 8027B418 00000000 */  nop
/* 1A9CFC 8027B41C 46806320 */  cvt.s.w   $f12, $f12
/* 1A9D00 8027B420 46146303 */  div.s     $f12, $f12, $f20
/* 1A9D04 8027B424 46006321 */  cvt.d.s   $f12, $f12
/* 1A9D08 8027B428 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9D0C 8027B42C 00000000 */  nop
/* 1A9D10 8027B430 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 1A9D14 8027B434 44810800 */  mtc1      $at, $f1
/* 1A9D18 8027B438 44800000 */  mtc1      $zero, $f0
/* 1A9D1C 8027B43C 00000000 */  nop
/* 1A9D20 8027B440 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9D24 8027B444 00000000 */  nop
/* 1A9D28 8027B448 3C014044 */  lui       $at, (0x40440000 >> 16)
/* 1A9D2C 8027B44C 44810800 */  mtc1      $at, $f1
/* 1A9D30 8027B450 44800000 */  mtc1      $zero, $f0
/* 1A9D34 8027B454 00000000 */  nop
/* 1A9D38 8027B458 46206303 */  div.d     $f12, $f12, $f0
/* 1A9D3C 8027B45C 0C00A874 */  jal       cos_rad
/* 1A9D40 8027B460 46206320 */   cvt.s.d  $f12, $f12
/* 1A9D44 8027B464 02111023 */  subu      $v0, $s0, $s1
/* 1A9D48 8027B468 44821000 */  mtc1      $v0, $f2
/* 1A9D4C 8027B46C 00000000 */  nop
/* 1A9D50 8027B470 468010A0 */  cvt.s.w   $f2, $f2
/* 1A9D54 8027B474 46020002 */  mul.s     $f0, $f0, $f2
/* 1A9D58 8027B478 00000000 */  nop
/* 1A9D5C 8027B47C 4614A502 */  mul.s     $f20, $f20, $f20
/* 1A9D60 8027B480 00000000 */  nop
/* 1A9D64 8027B484 46020002 */  mul.s     $f0, $f0, $f2
/* 1A9D68 8027B488 00000000 */  nop
/* 1A9D6C 8027B48C 44801000 */  mtc1      $zero, $f2
/* 1A9D70 8027B490 46140103 */  div.s     $f4, $f0, $f20
/* 1A9D74 8027B494 4602203C */  c.lt.s    $f4, $f2
/* 1A9D78 8027B498 00000000 */  nop
/* 1A9D7C 8027B49C 45030001 */  bc1tl     .L8027B4A4
/* 1A9D80 8027B4A0 46002107 */   neg.s    $f4, $f4
.L8027B4A4:
/* 1A9D84 8027B4A4 4618D001 */  sub.s     $f0, $f26, $f24
/* 1A9D88 8027B4A8 46040002 */  mul.s     $f0, $f0, $f4
/* 1A9D8C 8027B4AC 00000000 */  nop
/* 1A9D90 8027B4B0 0809ED80 */  j         .L8027B600
/* 1A9D94 8027B4B4 4600D001 */   sub.s    $f0, $f26, $f0
glabel .L8027B4B8
/* 1A9D98 8027B4B8 44916000 */  mtc1      $s1, $f12
/* 1A9D9C 8027B4BC 00000000 */  nop
/* 1A9DA0 8027B4C0 46806320 */  cvt.s.w   $f12, $f12
/* 1A9DA4 8027B4C4 3C01802A */  lui       $at, %hi(D_8029D9F8)
/* 1A9DA8 8027B4C8 D420D9F8 */  ldc1      $f0, %lo(D_8029D9F8)($at)
/* 1A9DAC 8027B4CC 46006321 */  cvt.d.s   $f12, $f12
/* 1A9DB0 8027B4D0 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9DB4 8027B4D4 00000000 */  nop
/* 1A9DB8 8027B4D8 4600C5A1 */  cvt.d.s   $f22, $f24
/* 1A9DBC 8027B4DC 4618D501 */  sub.s     $f20, $f26, $f24
/* 1A9DC0 8027B4E0 44900000 */  mtc1      $s0, $f0
/* 1A9DC4 8027B4E4 00000000 */  nop
/* 1A9DC8 8027B4E8 46800020 */  cvt.s.w   $f0, $f0
/* 1A9DCC 8027B4EC 46000021 */  cvt.d.s   $f0, $f0
/* 1A9DD0 8027B4F0 4600A521 */  cvt.d.s   $f20, $f20
/* 1A9DD4 8027B4F4 46206303 */  div.d     $f12, $f12, $f0
/* 1A9DD8 8027B4F8 0C00A874 */  jal       cos_rad
/* 1A9DDC 8027B4FC 46206320 */   cvt.s.d  $f12, $f12
/* 1A9DE0 8027B500 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 1A9DE4 8027B504 44811800 */  mtc1      $at, $f3
/* 1A9DE8 8027B508 44801000 */  mtc1      $zero, $f2
/* 1A9DEC 8027B50C 46000021 */  cvt.d.s   $f0, $f0
/* 1A9DF0 8027B510 46201081 */  sub.d     $f2, $f2, $f0
/* 1A9DF4 8027B514 4622A502 */  mul.d     $f20, $f20, $f2
/* 1A9DF8 8027B518 00000000 */  nop
/* 1A9DFC 8027B51C 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 1A9E00 8027B520 44810800 */  mtc1      $at, $f1
/* 1A9E04 8027B524 44800000 */  mtc1      $zero, $f0
/* 1A9E08 8027B528 00000000 */  nop
/* 1A9E0C 8027B52C 4620A502 */  mul.d     $f20, $f20, $f0
/* 1A9E10 8027B530 00000000 */  nop
/* 1A9E14 8027B534 0809ED7D */  j         .L8027B5F4
/* 1A9E18 8027B538 4634B580 */   add.d    $f22, $f22, $f20
glabel .L8027B53C
/* 1A9E1C 8027B53C 44916000 */  mtc1      $s1, $f12
/* 1A9E20 8027B540 00000000 */  nop
/* 1A9E24 8027B544 46806320 */  cvt.s.w   $f12, $f12
/* 1A9E28 8027B548 3C01802A */  lui       $at, %hi(D_8029DA00)
/* 1A9E2C 8027B54C D420DA00 */  ldc1      $f0, %lo(D_8029DA00)($at)
/* 1A9E30 8027B550 46006321 */  cvt.d.s   $f12, $f12
/* 1A9E34 8027B554 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9E38 8027B558 00000000 */  nop
/* 1A9E3C 8027B55C 4618D501 */  sub.s     $f20, $f26, $f24
/* 1A9E40 8027B560 44900000 */  mtc1      $s0, $f0
/* 1A9E44 8027B564 00000000 */  nop
/* 1A9E48 8027B568 46800020 */  cvt.s.w   $f0, $f0
/* 1A9E4C 8027B56C 46000021 */  cvt.d.s   $f0, $f0
/* 1A9E50 8027B570 46206303 */  div.d     $f12, $f12, $f0
/* 1A9E54 8027B574 0C00A85B */  jal       sin_rad
/* 1A9E58 8027B578 46206320 */   cvt.s.d  $f12, $f12
/* 1A9E5C 8027B57C 4600A502 */  mul.s     $f20, $f20, $f0
/* 1A9E60 8027B580 00000000 */  nop
/* 1A9E64 8027B584 0809ED80 */  j         .L8027B600
/* 1A9E68 8027B588 4614C000 */   add.s    $f0, $f24, $f20
glabel .L8027B58C
/* 1A9E6C 8027B58C 44916000 */  mtc1      $s1, $f12
/* 1A9E70 8027B590 00000000 */  nop
/* 1A9E74 8027B594 46806320 */  cvt.s.w   $f12, $f12
/* 1A9E78 8027B598 3C01802A */  lui       $at, %hi(D_8029DA08)
/* 1A9E7C 8027B59C D420DA08 */  ldc1      $f0, %lo(D_8029DA08)($at)
/* 1A9E80 8027B5A0 46006321 */  cvt.d.s   $f12, $f12
/* 1A9E84 8027B5A4 46206302 */  mul.d     $f12, $f12, $f0
/* 1A9E88 8027B5A8 00000000 */  nop
/* 1A9E8C 8027B5AC 4600C5A1 */  cvt.d.s   $f22, $f24
/* 1A9E90 8027B5B0 4618D501 */  sub.s     $f20, $f26, $f24
/* 1A9E94 8027B5B4 44900000 */  mtc1      $s0, $f0
/* 1A9E98 8027B5B8 00000000 */  nop
/* 1A9E9C 8027B5BC 46800020 */  cvt.s.w   $f0, $f0
/* 1A9EA0 8027B5C0 46000021 */  cvt.d.s   $f0, $f0
/* 1A9EA4 8027B5C4 4600A521 */  cvt.d.s   $f20, $f20
/* 1A9EA8 8027B5C8 46206303 */  div.d     $f12, $f12, $f0
/* 1A9EAC 8027B5CC 0C00A874 */  jal       cos_rad
/* 1A9EB0 8027B5D0 46206320 */   cvt.s.d  $f12, $f12
/* 1A9EB4 8027B5D4 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 1A9EB8 8027B5D8 44811800 */  mtc1      $at, $f3
/* 1A9EBC 8027B5DC 44801000 */  mtc1      $zero, $f2
/* 1A9EC0 8027B5E0 46000021 */  cvt.d.s   $f0, $f0
/* 1A9EC4 8027B5E4 46201081 */  sub.d     $f2, $f2, $f0
/* 1A9EC8 8027B5E8 4622A502 */  mul.d     $f20, $f20, $f2
/* 1A9ECC 8027B5EC 00000000 */  nop
/* 1A9ED0 8027B5F0 4634B580 */  add.d     $f22, $f22, $f20
.L8027B5F4:
/* 1A9ED4 8027B5F4 0809ED80 */  j         .L8027B600
/* 1A9ED8 8027B5F8 4620B020 */   cvt.s.d  $f0, $f22
.L8027B5FC:
/* 1A9EDC 8027B5FC 44800000 */  mtc1      $zero, $f0
.L8027B600:
/* 1A9EE0 8027B600 8FBF0018 */  lw        $ra, 0x18($sp)
/* 1A9EE4 8027B604 8FB10014 */  lw        $s1, 0x14($sp)
/* 1A9EE8 8027B608 8FB00010 */  lw        $s0, 0x10($sp)
/* 1A9EEC 8027B60C D7BA0038 */  ldc1      $f26, 0x38($sp)
/* 1A9EF0 8027B610 D7B80030 */  ldc1      $f24, 0x30($sp)
/* 1A9EF4 8027B614 D7B60028 */  ldc1      $f22, 0x28($sp)
/* 1A9EF8 8027B618 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 1A9EFC 8027B61C 03E00008 */  jr        $ra
/* 1A9F00 8027B620 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

f32 update_lerp_battle(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration) {
    s32 timeLeft;
    f32 absMag;
    f64 start1;
    f64 start2;
    f32 len1;
    f32 len2;
    f32 len3;
    f32 len4;
    f64 len5;
    f32 len6;
    f64 len7;

    switch (easing) {
        case EASING_LINEAR:
            return start + (end - start) * elapsed / duration;
        case EASING_QUADRATIC_IN:
            return start + SQ(elapsed) * (end - start) / SQ(duration);
        case EASING_CUBIC_IN:
            return start + CUBE(elapsed) * (end - start) / CUBE(duration);
        case EASING_QUARTIC_IN:
            return start + QUART(elapsed) * (end - start) / QUART(duration);
        case EASING_COS_SLOW_OVERSHOOT:
            len1 = end - start;
            return end - (len1 * cos_rad(((f32)elapsed / duration) * PI_D * 4.0) * (duration - elapsed) *
                    (duration - elapsed)) / SQ((f32)duration);
        case EASING_COS_FAST_OVERSHOOT:
            len2 = end - start;
            return end - (len2 * cos_rad((((f32)SQ(elapsed) / duration) * PI_D * 4.0) / 15.0) * (duration - elapsed) *
                    (duration - elapsed)) / SQ((f32)duration);
        case EASING_QUADRATIC_OUT:
            timeLeft = duration - elapsed;
            return start + (end - start) - ((SQ(timeLeft) * (end - start))) / SQ(duration);
        case EASING_CUBIC_OUT:
            len3 = end - start;
            timeLeft = duration - elapsed;
            return start + len3 - ((CUBE(timeLeft) * len3)) / CUBE(duration);
        case EASING_QUARTIC_OUT:
            len4 = end - start;
            timeLeft = duration - elapsed;
            return start + len4 - ((QUART(timeLeft) * len4)) / QUART(duration);
        case EASING_COS_BOUNCE:
            absMag = cos_rad((((f32)SQ(elapsed) / duration) * PI_D * 4.0) / 40.0) * (duration - elapsed) *
                    (duration - elapsed) / SQ((f32)duration);
            if (absMag < 0.0f) {
                absMag = -absMag;
            }
            return end - (end - start) * absMag;
        case EASING_COS_IN_OUT:
            len5 = end - start;
            start1 = start;
            return start1 + (len5 * (1.0 - cos_rad(((f32)elapsed * PI_D) / (f32)duration)) / 2);
        case EASING_SIN_OUT:
            len6 = end - start;
            return start + (len6 * sin_rad((((f32) elapsed) * (PI_D / 2)) / ((f32) duration)));
        case EASING_COS_IN:
            len7 = end - start;
            start2 = start;
            return start2 + (len7 * (1.0 - cos_rad(((f32)elapsed * (PI_D / 2)) / (f32)duration)));
    }

    return 0.0f;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel render_windows
/* DDD98 80147698 27BDFF10 */  addiu     $sp, $sp, -0xF0
/* DDD9C 8014769C AFB700DC */  sw        $s7, 0xDC($sp)
/* DDDA0 801476A0 00A0B82D */  daddu     $s7, $a1, $zero
/* DDDA4 801476A4 AFB600D8 */  sw        $s6, 0xD8($sp)
/* DDDA8 801476A8 0000B02D */  daddu     $s6, $zero, $zero
/* DDDAC 801476AC AFB300CC */  sw        $s3, 0xCC($sp)
/* DDDB0 801476B0 AFA400F0 */  sw        $a0, 0xF0($sp)
/* DDDB4 801476B4 0080982D */  daddu     $s3, $a0, $zero
/* DDDB8 801476B8 00171140 */  sll       $v0, $s7, 5
/* DDDBC 801476BC F7B400E8 */  sdc1      $f20, 0xE8($sp)
/* DDDC0 801476C0 4480A000 */  mtc1      $zero, $f20
/* DDDC4 801476C4 3C0B8016 */  lui       $t3, %hi(gWindows)
/* DDDC8 801476C8 256B9D50 */  addiu     $t3, $t3, %lo(gWindows)
/* DDDCC 801476CC AFBE00E0 */  sw        $fp, 0xE0($sp)
/* DDDD0 801476D0 004BF021 */  addu      $fp, $v0, $t3
/* DDDD4 801476D4 AFBF00E4 */  sw        $ra, 0xE4($sp)
/* DDDD8 801476D8 AFB500D4 */  sw        $s5, 0xD4($sp)
/* DDDDC 801476DC AFB400D0 */  sw        $s4, 0xD0($sp)
/* DDDE0 801476E0 AFB200C8 */  sw        $s2, 0xC8($sp)
/* DDDE4 801476E4 AFB100C4 */  sw        $s1, 0xC4($sp)
/* DDDE8 801476E8 AFB000C0 */  sw        $s0, 0xC0($sp)
/* DDDEC 801476EC AFA600F8 */  sw        $a2, 0xF8($sp)
/* DDDF0 801476F0 AFA700FC */  sw        $a3, 0xFC($sp)
.L801476F4:
/* DDDF4 801476F4 8E720000 */  lw        $s2, 0x0($s3)
/* DDDF8 801476F8 064200E2 */  bltzl     $s2, .L80147A84
/* DDDFC 801476FC 26D60001 */   addiu    $s6, $s6, 0x1
/* DDE00 80147700 00121140 */  sll       $v0, $s2, 5
/* DDE04 80147704 3C0B8016 */  lui       $t3, %hi(gWindows)
/* DDE08 80147708 256B9D50 */  addiu     $t3, $t3, %lo(gWindows)
/* DDE0C 8014770C 004B8821 */  addu      $s1, $v0, $t3
/* DDE10 80147710 92220000 */  lbu       $v0, 0x0($s1)
/* DDE14 80147714 504000DB */  beql      $v0, $zero, .L80147A84
/* DDE18 80147718 26D60001 */   addiu    $s6, $s6, 0x1
/* DDE1C 8014771C 30420020 */  andi      $v0, $v0, 0x20
/* DDE20 80147720 544000D8 */  bnel      $v0, $zero, .L80147A84
/* DDE24 80147724 26D60001 */   addiu    $s6, $s6, 0x1
/* DDE28 80147728 8E250004 */  lw        $a1, 0x4($s1)
/* DDE2C 8014772C 50A000D5 */  beql      $a1, $zero, .L80147A84
/* DDE30 80147730 26D60001 */   addiu    $s6, $s6, 0x1
/* DDE34 80147734 82220003 */  lb        $v0, 0x3($s1)
/* DDE38 80147738 545700D2 */  bnel      $v0, $s7, .L80147A84
/* DDE3C 8014773C 26D60001 */   addiu    $s6, $s6, 0x1
/* DDE40 80147740 9226001C */  lbu       $a2, 0x1C($s1)
/* DDE44 80147744 AFA0009C */  sw        $zero, 0x9C($sp)
/* DDE48 80147748 AFA00090 */  sw        $zero, 0x90($sp)
/* DDE4C 8014774C E7B400B0 */  swc1      $f20, 0xB0($sp)
/* DDE50 80147750 E7B400AC */  swc1      $f20, 0xAC($sp)
/* DDE54 80147754 E7B400A8 */  swc1      $f20, 0xA8($sp)
/* DDE58 80147758 AFA000B4 */  sw        $zero, 0xB4($sp)
/* DDE5C 8014775C 8623000C */  lh        $v1, 0xC($s1)
/* DDE60 80147760 8624000E */  lh        $a0, 0xE($s1)
/* DDE64 80147764 240200FF */  addiu     $v0, $zero, 0xFF
/* DDE68 80147768 AFA200B8 */  sw        $v0, 0xB8($sp)
/* DDE6C 8014776C 24A2FFFF */  addiu     $v0, $a1, -0x1
/* DDE70 80147770 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* DDE74 80147774 44810000 */  mtc1      $at, $f0
/* DDE78 80147778 2C42000D */  sltiu     $v0, $v0, 0xD
/* DDE7C 8014777C AFA30094 */  sw        $v1, 0x94($sp)
/* DDE80 80147780 AFA40098 */  sw        $a0, 0x98($sp)
/* DDE84 80147784 E7A000A0 */  swc1      $f0, 0xA0($sp)
/* DDE88 80147788 E7A000A4 */  swc1      $f0, 0xA4($sp)
/* DDE8C 8014778C 86340010 */  lh        $s4, 0x10($s1)
/* DDE90 80147790 86350012 */  lh        $s5, 0x12($s1)
/* DDE94 80147794 10400022 */  beqz      $v0, .L80147820
/* DDE98 80147798 00051080 */   sll      $v0, $a1, 2
/* DDE9C 8014779C 3C038015 */  lui       $v1, %hi(gSimpleWindowUpdates)
/* DDEA0 801477A0 2463F250 */  addiu     $v1, $v1, %lo(gSimpleWindowUpdates)
/* DDEA4 801477A4 00451021 */  addu      $v0, $v0, $a1
/* DDEA8 801477A8 00438021 */  addu      $s0, $v0, $v1
/* DDEAC 801477AC 92230000 */  lbu       $v1, 0x0($s1)
/* DDEB0 801477B0 92020001 */  lbu       $v0, 0x1($s0)
/* DDEB4 801477B4 00621825 */  or        $v1, $v1, $v0
/* DDEB8 801477B8 A2230000 */  sb        $v1, 0x0($s1)
/* DDEBC 801477BC 92020002 */  lbu       $v0, 0x2($s0)
/* DDEC0 801477C0 00021027 */  nor       $v0, $zero, $v0
/* DDEC4 801477C4 00621824 */  and       $v1, $v1, $v0
/* DDEC8 801477C8 14C00008 */  bnez      $a2, .L801477EC
/* DDECC 801477CC A2230000 */   sb       $v1, 0x0($s1)
/* DDED0 801477D0 92020000 */  lbu       $v0, 0x0($s0)
/* DDED4 801477D4 30420001 */  andi      $v0, $v0, 0x1
/* DDED8 801477D8 10400004 */  beqz      $v0, .L801477EC
/* DDEDC 801477DC 00000000 */   nop
/* DDEE0 801477E0 92250002 */  lbu       $a1, 0x2($s1)
/* DDEE4 801477E4 0C051F5C */  jal       update_window_hierarchy
/* DDEE8 801477E8 0240202D */   daddu    $a0, $s2, $zero
.L801477EC:
/* DDEEC 801477EC 92020000 */  lbu       $v0, 0x0($s0)
/* DDEF0 801477F0 30420004 */  andi      $v0, $v0, 0x4
/* DDEF4 801477F4 10400003 */  beqz      $v0, .L80147804
/* DDEF8 801477F8 00000000 */   nop
/* DDEFC 801477FC 92020003 */  lbu       $v0, 0x3($s0)
/* DDF00 80147800 AFA200B4 */  sw        $v0, 0xB4($sp)
.L80147804:
/* DDF04 80147804 92020000 */  lbu       $v0, 0x0($s0)
/* DDF08 80147808 30420002 */  andi      $v0, $v0, 0x2
/* DDF0C 8014780C 1040001A */  beqz      $v0, .L80147878
/* DDF10 80147810 00000000 */   nop
/* DDF14 80147814 92020004 */  lbu       $v0, 0x4($s0)
/* DDF18 80147818 08051E1E */  j         .L80147878
/* DDF1C 8014781C AFA200B8 */   sw       $v0, 0xB8($sp)
.L80147820:
/* DDF20 80147820 0240202D */  daddu     $a0, $s2, $zero
/* DDF24 80147824 27A50090 */  addiu     $a1, $sp, 0x90
/* DDF28 80147828 27A60094 */  addiu     $a2, $sp, 0x94
/* DDF2C 8014782C 27A70098 */  addiu     $a3, $sp, 0x98
/* DDF30 80147830 8E220004 */  lw        $v0, 0x4($s1)
/* DDF34 80147834 27A3009C */  addiu     $v1, $sp, 0x9C
/* DDF38 80147838 AFA30010 */  sw        $v1, 0x10($sp)
/* DDF3C 8014783C 27A300A0 */  addiu     $v1, $sp, 0xA0
/* DDF40 80147840 AFA30014 */  sw        $v1, 0x14($sp)
/* DDF44 80147844 27A300A4 */  addiu     $v1, $sp, 0xA4
/* DDF48 80147848 AFA30018 */  sw        $v1, 0x18($sp)
/* DDF4C 8014784C 27A300A8 */  addiu     $v1, $sp, 0xA8
/* DDF50 80147850 AFA3001C */  sw        $v1, 0x1C($sp)
/* DDF54 80147854 27A300AC */  addiu     $v1, $sp, 0xAC
/* DDF58 80147858 AFA30020 */  sw        $v1, 0x20($sp)
/* DDF5C 8014785C 27A300B0 */  addiu     $v1, $sp, 0xB0
/* DDF60 80147860 AFA30024 */  sw        $v1, 0x24($sp)
/* DDF64 80147864 27A300B4 */  addiu     $v1, $sp, 0xB4
/* DDF68 80147868 AFA30028 */  sw        $v1, 0x28($sp)
/* DDF6C 8014786C 27A300B8 */  addiu     $v1, $sp, 0xB8
/* DDF70 80147870 0040F809 */  jalr      $v0
/* DDF74 80147874 AFA3002C */   sw       $v1, 0x2C($sp)
.L80147878:
/* DDF78 80147878 8E220004 */  lw        $v0, 0x4($s1)
/* DDF7C 8014787C 10400006 */  beqz      $v0, .L80147898
/* DDF80 80147880 00000000 */   nop
/* DDF84 80147884 9223001C */  lbu       $v1, 0x1C($s1)
/* DDF88 80147888 2C6200FF */  sltiu     $v0, $v1, 0xFF
/* DDF8C 8014788C 10400002 */  beqz      $v0, .L80147898
/* DDF90 80147890 24620001 */   addiu    $v0, $v1, 0x1
/* DDF94 80147894 A222001C */  sb        $v0, 0x1C($s1)
.L80147898:
/* DDF98 80147898 C7A000A0 */  lwc1      $f0, 0xA0($sp)
/* DDF9C 8014789C 46140032 */  c.eq.s    $f0, $f20
/* DDFA0 801478A0 00000000 */  nop
/* DDFA4 801478A4 45030077 */  bc1tl     .L80147A84
/* DDFA8 801478A8 26D60001 */   addiu    $s6, $s6, 0x1
/* DDFAC 801478AC C7A000A4 */  lwc1      $f0, 0xA4($sp)
/* DDFB0 801478B0 46140032 */  c.eq.s    $f0, $f20
/* DDFB4 801478B4 00000000 */  nop
/* DDFB8 801478B8 45030072 */  bc1tl     .L80147A84
/* DDFBC 801478BC 26D60001 */   addiu    $s6, $s6, 0x1
/* DDFC0 801478C0 92220000 */  lbu       $v0, 0x0($s1)
/* DDFC4 801478C4 30420004 */  andi      $v0, $v0, 0x4
/* DDFC8 801478C8 5440006E */  bnel      $v0, $zero, .L80147A84
/* DDFCC 801478CC 26D60001 */   addiu    $s6, $s6, 0x1
/* DDFD0 801478D0 8FA300B8 */  lw        $v1, 0xB8($sp)
/* DDFD4 801478D4 8FAB0104 */  lw        $t3, 0x104($sp)
/* DDFD8 801478D8 006B0018 */  mult      $v1, $t3
/* DDFDC 801478DC 3C028080 */  lui       $v0, (0x80808081 >> 16)
/* DDFE0 801478E0 34428081 */  ori       $v0, $v0, (0x80808081 & 0xFFFF)
/* DDFE4 801478E4 00001812 */  mflo      $v1
/* DDFE8 801478E8 8FA400B4 */  lw        $a0, 0xB4($sp)
/* DDFEC 801478EC 8FAB0108 */  lw        $t3, 0x108($sp)
/* DDFF0 801478F0 00620018 */  mult      $v1, $v0
/* DDFF4 801478F4 008B2021 */  addu      $a0, $a0, $t3
/* DDFF8 801478F8 AFA400B4 */  sw        $a0, 0xB4($sp)
/* DDFFC 801478FC 28840100 */  slti      $a0, $a0, 0x100
/* DE000 80147900 00004010 */  mfhi      $t0
/* DE004 80147904 01031021 */  addu      $v0, $t0, $v1
/* DE008 80147908 000211C3 */  sra       $v0, $v0, 7
/* DE00C 8014790C 00031FC3 */  sra       $v1, $v1, 31
/* DE010 80147910 00431023 */  subu      $v0, $v0, $v1
/* DE014 80147914 AFA200B8 */  sw        $v0, 0xB8($sp)
/* DE018 80147918 00121080 */  sll       $v0, $s2, 2
/* DE01C 8014791C 8E290014 */  lw        $t1, 0x14($s1)
/* DE020 80147920 8E2A0018 */  lw        $t2, 0x18($s1)
/* DE024 80147924 3C058015 */  lui       $a1, %hi(gWindowStyles)
/* DE028 80147928 00A22821 */  addu      $a1, $a1, $v0
/* DE02C 8014792C 8CA5F150 */  lw        $a1, %lo(gWindowStyles)($a1)
/* DE030 80147930 14800003 */  bnez      $a0, .L80147940
/* DE034 80147934 27B00050 */   addiu    $s0, $sp, 0x50
/* DE038 80147938 240200FF */  addiu     $v0, $zero, 0xFF
/* DE03C 8014793C AFA200B4 */  sw        $v0, 0xB4($sp)
.L80147940:
/* DE040 80147940 8FA20090 */  lw        $v0, 0x90($sp)
/* DE044 80147944 8FAB00F8 */  lw        $t3, 0xF8($sp)
/* DE048 80147948 004B1025 */  or        $v0, $v0, $t3
/* DE04C 8014794C AFA20090 */  sw        $v0, 0x90($sp)
/* DE050 80147950 31620001 */  andi      $v0, $t3, 0x1
/* DE054 80147954 1440000A */  bnez      $v0, .L80147980
/* DE058 80147958 2402FFFF */   addiu    $v0, $zero, -0x1
/* DE05C 8014795C 8FA20094 */  lw        $v0, 0x94($sp)
/* DE060 80147960 8FAB00FC */  lw        $t3, 0xFC($sp)
/* DE064 80147964 8FA30098 */  lw        $v1, 0x98($sp)
/* DE068 80147968 004B1021 */  addu      $v0, $v0, $t3
/* DE06C 8014796C 8FAB0100 */  lw        $t3, 0x100($sp)
/* DE070 80147970 AFA20094 */  sw        $v0, 0x94($sp)
/* DE074 80147974 006B1821 */  addu      $v1, $v1, $t3
/* DE078 80147978 AFA30098 */  sw        $v1, 0x98($sp)
/* DE07C 8014797C 2402FFFF */  addiu     $v0, $zero, -0x1
.L80147980:
/* DE080 80147980 12E20002 */  beq       $s7, $v0, .L8014798C
/* DE084 80147984 24080140 */   addiu    $t0, $zero, 0x140
/* DE088 80147988 87C80010 */  lh        $t0, 0x10($fp)
.L8014798C:
/* DE08C 8014798C 2402FFFF */  addiu     $v0, $zero, -0x1
/* DE090 80147990 12E20002 */  beq       $s7, $v0, .L8014799C
/* DE094 80147994 240300F0 */   addiu    $v1, $zero, 0xF0
/* DE098 80147998 87C30012 */  lh        $v1, 0x12($fp)
.L8014799C:
/* DE09C 8014799C 92220000 */  lbu       $v0, 0x0($s1)
/* DE0A0 801479A0 8FA40090 */  lw        $a0, 0x90($sp)
/* DE0A4 801479A4 30420040 */  andi      $v0, $v0, 0x40
/* DE0A8 801479A8 54400001 */  bnel      $v0, $zero, .L801479B0
/* DE0AC 801479AC 34840002 */   ori      $a0, $a0, 0x2
.L801479B0:
/* DE0B0 801479B0 8FA60094 */  lw        $a2, 0x94($sp)
/* DE0B4 801479B4 8FA70098 */  lw        $a3, 0x98($sp)
/* DE0B8 801479B8 8FA2009C */  lw        $v0, 0x9C($sp)
/* DE0BC 801479BC 8FAB010C */  lw        $t3, 0x10C($sp)
/* DE0C0 801479C0 AFB40014 */  sw        $s4, 0x14($sp)
/* DE0C4 801479C4 AFB50018 */  sw        $s5, 0x18($sp)
/* DE0C8 801479C8 AFA20010 */  sw        $v0, 0x10($sp)
/* DE0CC 801479CC 93A200BB */  lbu       $v0, 0xBB($sp)
/* DE0D0 801479D0 AFA2001C */  sw        $v0, 0x1C($sp)
/* DE0D4 801479D4 93A200B7 */  lbu       $v0, 0xB7($sp)
/* DE0D8 801479D8 AFA20020 */  sw        $v0, 0x20($sp)
/* DE0DC 801479DC C7A000A0 */  lwc1      $f0, 0xA0($sp)
/* DE0E0 801479E0 E7A00024 */  swc1      $f0, 0x24($sp)
/* DE0E4 801479E4 C7A000A4 */  lwc1      $f0, 0xA4($sp)
/* DE0E8 801479E8 E7A00028 */  swc1      $f0, 0x28($sp)
/* DE0EC 801479EC C7A000A8 */  lwc1      $f0, 0xA8($sp)
/* DE0F0 801479F0 E7A0002C */  swc1      $f0, 0x2C($sp)
/* DE0F4 801479F4 C7A000AC */  lwc1      $f0, 0xAC($sp)
/* DE0F8 801479F8 E7A00030 */  swc1      $f0, 0x30($sp)
/* DE0FC 801479FC C7A000B0 */  lwc1      $f0, 0xB0($sp)
/* DE100 80147A00 AFA90038 */  sw        $t1, 0x38($sp)
/* DE104 80147A04 AFAA003C */  sw        $t2, 0x3C($sp)
/* DE108 80147A08 AFAB0040 */  sw        $t3, 0x40($sp)
/* DE10C 80147A0C AFA80044 */  sw        $t0, 0x44($sp)
/* DE110 80147A10 AFA30048 */  sw        $v1, 0x48($sp)
/* DE114 80147A14 AFB0004C */  sw        $s0, 0x4C($sp)
/* DE118 80147A18 0C03D4B8 */  jal       draw_box
/* DE11C 80147A1C E7A00034 */   swc1     $f0, 0x34($sp)
/* DE120 80147A20 54400018 */  bnel      $v0, $zero, .L80147A84
/* DE124 80147A24 26D60001 */   addiu    $s6, $s6, 0x1
/* DE128 80147A28 8FA20090 */  lw        $v0, 0x90($sp)
/* DE12C 80147A2C 14400004 */  bnez      $v0, .L80147A40
/* DE130 80147A30 00000000 */   nop
/* DE134 80147A34 8FAB010C */  lw        $t3, 0x10C($sp)
/* DE138 80147A38 51600001 */  beql      $t3, $zero, .L80147A40
/* DE13C 80147A3C 0000802D */   daddu    $s0, $zero, $zero
.L80147A40:
/* DE140 80147A40 92220000 */  lbu       $v0, 0x0($s1)
/* DE144 80147A44 30420010 */  andi      $v0, $v0, 0x10
/* DE148 80147A48 5040000E */  beql      $v0, $zero, .L80147A84
/* DE14C 80147A4C 26D60001 */   addiu    $s6, $s6, 0x1
/* DE150 80147A50 8FA20098 */  lw        $v0, 0x98($sp)
/* DE154 80147A54 8FA400F0 */  lw        $a0, 0xF0($sp)
/* DE158 80147A58 8FA60090 */  lw        $a2, 0x90($sp)
/* DE15C 80147A5C 8FA70094 */  lw        $a3, 0x94($sp)
/* DE160 80147A60 AFA20010 */  sw        $v0, 0x10($sp)
/* DE164 80147A64 8FA200B8 */  lw        $v0, 0xB8($sp)
/* DE168 80147A68 AFA20014 */  sw        $v0, 0x14($sp)
/* DE16C 80147A6C 8FA200B4 */  lw        $v0, 0xB4($sp)
/* DE170 80147A70 0240282D */  daddu     $a1, $s2, $zero
/* DE174 80147A74 AFB0001C */  sw        $s0, 0x1C($sp)
/* DE178 80147A78 0C051DA6 */  jal       render_windows
/* DE17C 80147A7C AFA20018 */   sw       $v0, 0x18($sp)
/* DE180 80147A80 26D60001 */  addiu     $s6, $s6, 0x1
.L80147A84:
/* DE184 80147A84 2AC20040 */  slti      $v0, $s6, 0x40
/* DE188 80147A88 1440FF1A */  bnez      $v0, .L801476F4
/* DE18C 80147A8C 26730004 */   addiu    $s3, $s3, 0x4
/* DE190 80147A90 8FBF00E4 */  lw        $ra, 0xE4($sp)
/* DE194 80147A94 8FBE00E0 */  lw        $fp, 0xE0($sp)
/* DE198 80147A98 8FB700DC */  lw        $s7, 0xDC($sp)
/* DE19C 80147A9C 8FB600D8 */  lw        $s6, 0xD8($sp)
/* DE1A0 80147AA0 8FB500D4 */  lw        $s5, 0xD4($sp)
/* DE1A4 80147AA4 8FB400D0 */  lw        $s4, 0xD0($sp)
/* DE1A8 80147AA8 8FB300CC */  lw        $s3, 0xCC($sp)
/* DE1AC 80147AAC 8FB200C8 */  lw        $s2, 0xC8($sp)
/* DE1B0 80147AB0 8FB100C4 */  lw        $s1, 0xC4($sp)
/* DE1B4 80147AB4 8FB000C0 */  lw        $s0, 0xC0($sp)
/* DE1B8 80147AB8 D7B400E8 */  ldc1      $f20, 0xE8($sp)
/* DE1BC 80147ABC 03E00008 */  jr        $ra
/* DE1C0 80147AC0 27BD00F0 */   addiu    $sp, $sp, 0xF0

### DECOMPILED C INSTRUCTIONS:

void render_windows(s32* windowsArray, s32 parent, s32 flags, s32 baseX, s32 baseY, s32 opacity, s32 darkening, f32 (*rotScaleMtx)[4]) {
    Window* window;
    Window* childWindow;
    s32 i;
    s32 childWindowID;
    s32 counter;
    Matrix4f matrix;
    f32 (*outMtx)[4];
    s32 childFlags;
    s32 posX, posY, posZ;
    f32 scaleX, scaleY, rotX, rotY, rotZ;
    s32 childDarkening, childOpacity;
    s32 boxFlags;
    s32 boxTranslateX;
    s32 boxTranslateY;
    s32 fpUpdateIdx;
    s32 width, height;
    s32 (*fpUpdateFunc)(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
                                 f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
    s32 childWindowIdCopy;
    WindowStyle windowStyle;
    void* fpDrawContents;
    void* drawContentsArg0;
    s32* windowArrayIt;

    for (i = 0, windowArrayIt = windowsArray; i < ARRAY_COUNT(gWindows); i++, windowArrayIt++) {
        window = &gWindows[parent];
        childWindowID = *windowArrayIt;

        if (childWindowID < 0) {
            continue;
        }

        childWindow = &gWindows[childWindowID];
        if (childWindow->flags == 0 || (childWindow->flags & WINDOW_FLAG_DISABLED)) {
            continue;
        }

        fpUpdateIdx = childWindow->fpUpdate.i;
        if (fpUpdateIdx == 0 || childWindow->parent != parent) {
            continue;
        }

        counter = childWindow->updateCounter;
        posX = childWindow->pos.x;
        posY = childWindow->pos.y;
        posZ = 0;
        childFlags = 0;
        rotX = rotY = rotZ = 0.0f;
        scaleY = scaleX = 1.0f;
        childDarkening = 0;
        childOpacity = 255;
        width = childWindow->width;
        height = childWindow->height;

        if (fpUpdateIdx > 0 && fpUpdateIdx < 14) {
            SimpleWindowUpdateData* updateData = &gSimpleWindowUpdates[fpUpdateIdx];
            childWindow->flags |= updateData->windowFlagsSet;
            childWindow->flags &= ~updateData->windowFlagsUnset;

            if (counter == 0 && (updateData->flags & SIMPLE_WINDOW_UPDATE_1)) {
                update_window_hierarchy(childWindowID, childWindow->originalPriority);
            }
            if (updateData->flags & SIMPLE_WINDOW_UPDATE_DARKENING) {
                childDarkening = updateData->darkening;
            }
            if (updateData->flags & SIMPLE_WINDOW_UPDATE_OPACITY) {
                childOpacity = updateData->opacity;
            }
        } else {
            //type conversion needed for matching
            fpUpdateFunc = (s32 (*)(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
                                 f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity))(childWindow->fpUpdate.func);
            fpUpdateFunc(childWindowID, &childFlags, &posX, &posY, &posZ, &scaleX, &scaleY, &rotX, &rotY, &rotZ, &childDarkening, &childOpacity);
        }

        if (childWindow->fpUpdate.i) {
            if (childWindow->updateCounter < 255) {
                childWindow->updateCounter++;
            }
        }

        if (scaleX == 0 || scaleY == 0 || (childWindow->flags & WINDOW_FLAG_HIDDEN)) {
            continue;
        }

        childDarkening += darkening;
        childOpacity = childOpacity * opacity / 255;
        fpDrawContents = childWindow->fpDrawContents;
        drawContentsArg0 = childWindow->drawContentsArg0;
        windowStyle = gWindowStyles[childWindowID];
        outMtx = matrix;
        //needed to match
        childWindowIdCopy = childWindowID;

        if (childDarkening > 255) {
            childDarkening = 255;
        }
        childFlags |= flags;
        if (!(flags & DRAW_FLAG_ROTSCALE)) {
            posX += baseX;
            posY += baseY;
        }

        if (parent == -1) {
            boxTranslateX = SCREEN_WIDTH;
        } else {
            boxTranslateX = window->width;
        }

        boxTranslateY = SCREEN_HEIGHT;
        if (parent != -1) {
            boxTranslateY = window->height;
        }

        boxFlags = childFlags;
        if (childWindow->flags & WINDOW_FLAG_40) {
            boxFlags |= DRAW_FLAG_ANIMATED_BACKGROUND;
        }

        if (draw_box(boxFlags, windowStyle, posX, posY, posZ, width, height, childOpacity, childDarkening,
                    scaleX, scaleY, rotX, rotY, rotZ, fpDrawContents, drawContentsArg0, rotScaleMtx,
                    boxTranslateX, boxTranslateY, outMtx) == 0) {
            if (childFlags == 0 && rotScaleMtx == 0) {
                outMtx = NULL;
            }

            if (childWindow->flags & WINDOW_FLAG_HAS_CHILDREN) {
                render_windows(windowsArray, childWindowIdCopy, childFlags, posX, posY, childOpacity, childDarkening, outMtx);
            }
        }
    }
}