### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802552EC
/* 183BCC 802552EC 27BDFC68 */  addiu     $sp, $sp, -0x398
/* 183BD0 802552F0 F7B60370 */  sdc1      $f22, 0x370($sp)
/* 183BD4 802552F4 4480B000 */  mtc1      $zero, $f22
/* 183BD8 802552F8 F7B80378 */  sdc1      $f24, 0x378($sp)
/* 183BDC 802552FC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 183BE0 80255300 4481C000 */  mtc1      $at, $f24
/* 183BE4 80255304 00A0402D */  daddu     $t0, $a1, $zero
/* 183BE8 80255308 AFBF0364 */  sw        $ra, 0x364($sp)
/* 183BEC 8025530C AFBE0360 */  sw        $fp, 0x360($sp)
/* 183BF0 80255310 AFB7035C */  sw        $s7, 0x35C($sp)
/* 183BF4 80255314 AFB60358 */  sw        $s6, 0x358($sp)
/* 183BF8 80255318 AFB50354 */  sw        $s5, 0x354($sp)
/* 183BFC 8025531C AFB40350 */  sw        $s4, 0x350($sp)
/* 183C00 80255320 AFB3034C */  sw        $s3, 0x34C($sp)
/* 183C04 80255324 AFB20348 */  sw        $s2, 0x348($sp)
/* 183C08 80255328 AFB10344 */  sw        $s1, 0x344($sp)
/* 183C0C 8025532C AFB00340 */  sw        $s0, 0x340($sp)
/* 183C10 80255330 F7BE0390 */  sdc1      $f30, 0x390($sp)
/* 183C14 80255334 F7BC0388 */  sdc1      $f28, 0x388($sp)
/* 183C18 80255338 F7BA0380 */  sdc1      $f26, 0x380($sp)
/* 183C1C 8025533C F7B40368 */  sdc1      $f20, 0x368($sp)
/* 183C20 80255340 AFA40398 */  sw        $a0, 0x398($sp)
/* 183C24 80255344 AFA5039C */  sw        $a1, 0x39C($sp)
/* 183C28 80255348 E7B60010 */  swc1      $f22, 0x10($sp)
/* 183C2C 8025534C 8D05015C */  lw        $a1, 0x15C($t0)
/* 183C30 80255350 4406C000 */  mfc1      $a2, $f24
/* 183C34 80255354 4407B000 */  mfc1      $a3, $f22
/* 183C38 80255358 0C019EC8 */  jal       guRotateF
/* 183C3C 8025535C 27A40018 */   addiu    $a0, $sp, 0x18
/* 183C40 80255360 8FA9039C */  lw        $t1, 0x39C($sp)
/* 183C44 80255364 4406B000 */  mfc1      $a2, $f22
/* 183C48 80255368 4407C000 */  mfc1      $a3, $f24
/* 183C4C 8025536C 27B50058 */  addiu     $s5, $sp, 0x58
/* 183C50 80255370 E7B60010 */  swc1      $f22, 0x10($sp)
/* 183C54 80255374 8D250160 */  lw        $a1, 0x160($t1)
/* 183C58 80255378 0C019EC8 */  jal       guRotateF
/* 183C5C 8025537C 02A0202D */   daddu    $a0, $s5, $zero
/* 183C60 80255380 8FA8039C */  lw        $t0, 0x39C($sp)
/* 183C64 80255384 4406B000 */  mfc1      $a2, $f22
/* 183C68 80255388 4407B000 */  mfc1      $a3, $f22
/* 183C6C 8025538C 27B40098 */  addiu     $s4, $sp, 0x98
/* 183C70 80255390 E7B80010 */  swc1      $f24, 0x10($sp)
/* 183C74 80255394 8D050164 */  lw        $a1, 0x164($t0)
/* 183C78 80255398 0C019EC8 */  jal       guRotateF
/* 183C7C 8025539C 0280202D */   daddu    $a0, $s4, $zero
/* 183C80 802553A0 27A40018 */  addiu     $a0, $sp, 0x18
/* 183C84 802553A4 02A0282D */  daddu     $a1, $s5, $zero
/* 183C88 802553A8 27B30198 */  addiu     $s3, $sp, 0x198
/* 183C8C 802553AC 0C019D80 */  jal       guMtxCatF
/* 183C90 802553B0 0260302D */   daddu    $a2, $s3, $zero
/* 183C94 802553B4 0260202D */  daddu     $a0, $s3, $zero
/* 183C98 802553B8 0280282D */  daddu     $a1, $s4, $zero
/* 183C9C 802553BC 27B100D8 */  addiu     $s1, $sp, 0xD8
/* 183CA0 802553C0 0C019D80 */  jal       guMtxCatF
/* 183CA4 802553C4 0220302D */   daddu    $a2, $s1, $zero
/* 183CA8 802553C8 8FA9039C */  lw        $t1, 0x39C($sp)
/* 183CAC 802553CC C5240170 */  lwc1      $f4, 0x170($t1)
/* 183CB0 802553D0 3C01802A */  lui       $at, %hi(D_8029D358)
/* 183CB4 802553D4 D434D358 */  ldc1      $f20, %lo(D_8029D358)($at)
/* 183CB8 802553D8 46002121 */  cvt.d.s   $f4, $f4
/* 183CBC 802553DC 46342102 */  mul.d     $f4, $f4, $f20
/* 183CC0 802553E0 00000000 */  nop
/* 183CC4 802553E4 C5200174 */  lwc1      $f0, 0x174($t1)
/* 183CC8 802553E8 46000021 */  cvt.d.s   $f0, $f0
/* 183CCC 802553EC 46340002 */  mul.d     $f0, $f0, $f20
/* 183CD0 802553F0 00000000 */  nop
/* 183CD4 802553F4 C5220178 */  lwc1      $f2, 0x178($t1)
/* 183CD8 802553F8 460010A1 */  cvt.d.s   $f2, $f2
/* 183CDC 802553FC 46341082 */  mul.d     $f2, $f2, $f20
/* 183CE0 80255400 00000000 */  nop
/* 183CE4 80255404 C5260188 */  lwc1      $f6, 0x188($t1)
/* 183CE8 80255408 460031A1 */  cvt.d.s   $f6, $f6
/* 183CEC 8025540C 46262102 */  mul.d     $f4, $f4, $f6
/* 183CF0 80255410 00000000 */  nop
/* 183CF4 80255414 46260002 */  mul.d     $f0, $f0, $f6
/* 183CF8 80255418 00000000 */  nop
/* 183CFC 8025541C 27B00118 */  addiu     $s0, $sp, 0x118
/* 183D00 80255420 462010A0 */  cvt.s.d   $f2, $f2
/* 183D04 80255424 44071000 */  mfc1      $a3, $f2
/* 183D08 80255428 46202120 */  cvt.s.d   $f4, $f4
/* 183D0C 8025542C 46200020 */  cvt.s.d   $f0, $f0
/* 183D10 80255430 44052000 */  mfc1      $a1, $f4
/* 183D14 80255434 44060000 */  mfc1      $a2, $f0
/* 183D18 80255438 0200202D */  daddu     $a0, $s0, $zero
/* 183D1C 8025543C 0C019DF0 */  jal       guScaleF
/* 183D20 80255440 AFA0031C */   sw       $zero, 0x31C($sp)
/* 183D24 80255444 0200202D */  daddu     $a0, $s0, $zero
/* 183D28 80255448 0220282D */  daddu     $a1, $s1, $zero
/* 183D2C 8025544C 0C019D80 */  jal       guMtxCatF
/* 183D30 80255450 27A60298 */   addiu    $a2, $sp, 0x298
/* 183D34 80255454 8FA8039C */  lw        $t0, 0x39C($sp)
/* 183D38 80255458 8FA9039C */  lw        $t1, 0x39C($sp)
/* 183D3C 8025545C 810801F3 */  lb        $t0, 0x1F3($t0)
/* 183D40 80255460 AFA80318 */  sw        $t0, 0x318($sp)
/* 183D44 80255464 8D3201F4 */  lw        $s2, 0x1F4($t1)
/* 183D48 80255468 19000122 */  blez      $t0, .L802558F4
/* 183D4C 8025546C 4600B506 */   mov.s    $f20, $f22
/* 183D50 80255470 0260B82D */  daddu     $s7, $s3, $zero
/* 183D54 80255474 AFB50330 */  sw        $s5, 0x330($sp)
/* 183D58 80255478 AFB40334 */  sw        $s4, 0x334($sp)
.L8025547C:
/* 183D5C 8025547C 8E420094 */  lw        $v0, 0x94($s2)
/* 183D60 80255480 10400013 */  beqz      $v0, .L802554D0
/* 183D64 80255484 00000000 */   nop
/* 183D68 80255488 8E420000 */  lw        $v0, 0x0($s2)
/* 183D6C 8025548C 30420002 */  andi      $v0, $v0, 0x2
/* 183D70 80255490 1440000F */  bnez      $v0, .L802554D0
/* 183D74 80255494 00000000 */   nop
/* 183D78 80255498 8E5500C0 */  lw        $s5, 0xC0($s2)
/* 183D7C 8025549C 82A208AC */  lb        $v0, 0x8AC($s5)
/* 183D80 802554A0 92A308AC */  lbu       $v1, 0x8AC($s5)
/* 183D84 802554A4 1040000C */  beqz      $v0, .L802554D8
/* 183D88 802554A8 2462FFFF */   addiu    $v0, $v1, -0x1
/* 183D8C 802554AC A2A208AC */  sb        $v0, 0x8AC($s5)
/* 183D90 802554B0 00021600 */  sll       $v0, $v0, 24
/* 183D94 802554B4 14400008 */  bnez      $v0, .L802554D8
/* 183D98 802554B8 3C03EFFF */   lui      $v1, (0xEFFFFFFF >> 16)
/* 183D9C 802554BC 8FA8039C */  lw        $t0, 0x39C($sp)
/* 183DA0 802554C0 8D020000 */  lw        $v0, 0x0($t0)
/* 183DA4 802554C4 3463FFFF */  ori       $v1, $v1, (0xEFFFFFFF & 0xFFFF)
/* 183DA8 802554C8 00431024 */  and       $v0, $v0, $v1
/* 183DAC 802554CC AD020000 */  sw        $v0, 0x0($t0)
.L802554D0:
/* 183DB0 802554D0 08095637 */  j         .L802558DC
/* 183DB4 802554D4 8E52000C */   lw       $s2, 0xC($s2)
.L802554D8:
/* 183DB8 802554D8 8E430000 */  lw        $v1, 0x0($s2)
/* 183DBC 802554DC 30620001 */  andi      $v0, $v1, 0x1
/* 183DC0 802554E0 1440FFFB */  bnez      $v0, .L802554D0
/* 183DC4 802554E4 3C020010 */   lui      $v0, (0x100000 >> 16)
/* 183DC8 802554E8 00621024 */  and       $v0, $v1, $v0
/* 183DCC 802554EC 10400019 */  beqz      $v0, .L80255554
/* 183DD0 802554F0 27A800D8 */   addiu    $t0, $sp, 0xD8
/* 183DD4 802554F4 8FA9039C */  lw        $t1, 0x39C($sp)
/* 183DD8 802554F8 C5240170 */  lwc1      $f4, 0x170($t1)
/* 183DDC 802554FC 3C01802A */  lui       $at, %hi(D_8029D360)
D_80255500:
/* 183DE0 80255500 D428D360 */  ldc1      $f8, %lo(D_8029D360)($at)
/* 183DE4 80255504 46002121 */  cvt.d.s   $f4, $f4
/* 183DE8 80255508 46282102 */  mul.d     $f4, $f4, $f8
/* 183DEC 8025550C 00000000 */  nop
/* 183DF0 80255510 C5220174 */  lwc1      $f2, 0x174($t1)
/* 183DF4 80255514 460010A1 */  cvt.d.s   $f2, $f2
/* 183DF8 80255518 46281082 */  mul.d     $f2, $f2, $f8
/* 183DFC 8025551C 00000000 */  nop
/* 183E00 80255520 C5200178 */  lwc1      $f0, 0x178($t1)
/* 183E04 80255524 46000021 */  cvt.d.s   $f0, $f0
/* 183E08 80255528 46280002 */  mul.d     $f0, $f0, $f8
/* 183E0C 8025552C 00000000 */  nop
/* 183E10 80255530 46202120 */  cvt.s.d   $f4, $f4
/* 183E14 80255534 462010A0 */  cvt.s.d   $f2, $f2
/* 183E18 80255538 46200020 */  cvt.s.d   $f0, $f0
/* 183E1C 8025553C 44052000 */  mfc1      $a1, $f4
/* 183E20 80255540 44061000 */  mfc1      $a2, $f2
/* 183E24 80255544 44070000 */  mfc1      $a3, $f0
/* 183E28 80255548 0C019DF0 */  jal       guScaleF
/* 183E2C 8025554C 27A402D8 */   addiu    $a0, $sp, 0x2D8
/* 183E30 80255550 27A800D8 */  addiu     $t0, $sp, 0xD8
.L80255554:
/* 183E34 80255554 27A90118 */  addiu     $t1, $sp, 0x118
/* 183E38 80255558 82B407D9 */  lb        $s4, 0x7D9($s5)
/* 183E3C 8025555C 27B301D8 */  addiu     $s3, $sp, 0x1D8
/* 183E40 80255560 AFA00320 */  sw        $zero, 0x320($sp)
/* 183E44 80255564 AFA00324 */  sw        $zero, 0x324($sp)
/* 183E48 80255568 AFA80338 */  sw        $t0, 0x338($sp)
/* 183E4C 8025556C AFA9033C */  sw        $t1, 0x33C($sp)
.L80255570:
/* 183E50 80255570 8FA80320 */  lw        $t0, 0x320($sp)
/* 183E54 80255574 2694FFFF */  addiu     $s4, $s4, -0x1
/* 183E58 80255578 25080001 */  addiu     $t0, $t0, 0x1
/* 183E5C 8025557C 06810002 */  bgez      $s4, .L80255588
D_80255580:
/* 183E60 80255580 AFA80320 */   sw       $t0, 0x320($sp)
/* 183E64 80255584 2414000F */  addiu     $s4, $zero, 0xF
.L80255588:
/* 183E68 80255588 82A207D9 */  lb        $v0, 0x7D9($s5)
/* 183E6C 8025558C 128200D3 */  beq       $s4, $v0, .L802558DC
/* 183E70 80255590 00000000 */   nop
/* 183E74 80255594 8FA90320 */  lw        $t1, 0x320($sp)
/* 183E78 80255598 29220003 */  slti      $v0, $t1, 0x3
/* 183E7C 8025559C 1440FFF4 */  bnez      $v0, .L80255570
/* 183E80 802555A0 00000000 */   nop
/* 183E84 802555A4 8FA80324 */  lw        $t0, 0x324($sp)
/* 183E88 802555A8 AFA00320 */  sw        $zero, 0x320($sp)
D_802555AC:
/* 183E8C 802555AC 82A207DA */  lb        $v0, 0x7DA($s5)
/* 183E90 802555B0 25080001 */  addiu     $t0, $t0, 0x1
/* 183E94 802555B4 0048102A */  slt       $v0, $v0, $t0
/* 183E98 802555B8 144000C8 */  bnez      $v0, .L802558DC
/* 183E9C 802555BC AFA80324 */   sw       $t0, 0x324($sp)
/* 183EA0 802555C0 241E0078 */  addiu     $fp, $zero, 0x78
/* 183EA4 802555C4 00142840 */  sll       $a1, $s4, 1
/* 183EA8 802555C8 02A52821 */  addu      $a1, $s5, $a1
/* 183EAC 802555CC 02B42021 */  addu      $a0, $s5, $s4
/* 183EB0 802555D0 84A207FC */  lh        $v0, 0x7FC($a1)
/* 183EB4 802555D4 84A3081C */  lh        $v1, 0x81C($a1)
/* 183EB8 802555D8 4482D000 */  mtc1      $v0, $f26
/* 183EBC 802555DC 00000000 */  nop
/* 183EC0 802555E0 4680D6A0 */  cvt.s.w   $f26, $f26
/* 183EC4 802555E4 4483E000 */  mtc1      $v1, $f28
/* 183EC8 802555E8 00000000 */  nop
/* 183ECC 802555EC 4680E720 */  cvt.s.w   $f28, $f28
/* 183ED0 802555F0 84A3083C */  lh        $v1, 0x83C($a1)
/* 183ED4 802555F4 9082087C */  lbu       $v0, 0x87C($a0)
/* 183ED8 802555F8 4483B000 */  mtc1      $v1, $f22
/* 183EDC 802555FC 00000000 */  nop
/* 183EE0 80255600 4680B5A0 */  cvt.s.w   $f22, $f22
/* 183EE4 80255604 00021040 */  sll       $v0, $v0, 1
/* 183EE8 80255608 4482C000 */  mtc1      $v0, $f24
/* 183EEC 8025560C 00000000 */  nop
/* 183EF0 80255610 4680C620 */  cvt.s.w   $f24, $f24
/* 183EF4 80255614 9083088C */  lbu       $v1, 0x88C($a0)
/* 183EF8 80255618 9082089C */  lbu       $v0, 0x89C($a0)
/* 183EFC 8025561C 00031840 */  sll       $v1, $v1, 1
/* 183F00 80255620 4483F000 */  mtc1      $v1, $f30
/* 183F04 80255624 00000000 */  nop
/* 183F08 80255628 4680F7A0 */  cvt.s.w   $f30, $f30
/* 183F0C 8025562C 00021040 */  sll       $v0, $v0, 1
D_80255630:
/* 183F10 80255630 86430098 */  lh        $v1, 0x98($s2)
/* 183F14 80255634 44824000 */  mtc1      $v0, $f8
/* 183F18 80255638 00000000 */  nop
/* 183F1C 8025563C 46804220 */  cvt.s.w   $f8, $f8
/* 183F20 80255640 E7A80328 */  swc1      $f8, 0x328($sp)
/* 183F24 80255644 84A507DC */  lh        $a1, 0x7DC($a1)
/* 183F28 80255648 28620032 */  slti      $v0, $v1, 0x32
/* 183F2C 8025564C AFA5032C */  sw        $a1, 0x32C($sp)
/* 183F30 80255650 8090085C */  lb        $s0, 0x85C($a0)
/* 183F34 80255654 8091086C */  lb        $s1, 0x86C($a0)
/* 183F38 80255658 10400004 */  beqz      $v0, .L8025566C
/* 183F3C 8025565C 24160014 */   addiu    $s6, $zero, 0x14
D_80255660:
/* 183F40 80255660 241E0032 */  addiu     $fp, $zero, 0x32
/* 183F44 80255664 080955A5 */  j         .L80255694
/* 183F48 80255668 24160008 */   addiu    $s6, $zero, 0x8
.L8025566C:
/* 183F4C 8025566C 28620064 */  slti      $v0, $v1, 0x64
/* 183F50 80255670 10400004 */  beqz      $v0, .L80255684
/* 183F54 80255674 28620096 */   slti     $v0, $v1, 0x96
/* 183F58 80255678 241E0046 */  addiu     $fp, $zero, 0x46
/* 183F5C 8025567C 080955A5 */  j         .L80255694
/* 183F60 80255680 2416000A */   addiu    $s6, $zero, 0xA
.L80255684:
/* 183F64 80255684 10400003 */  beqz      $v0, .L80255694
/* 183F68 80255688 00000000 */   nop
/* 183F6C 8025568C 241E0064 */  addiu     $fp, $zero, 0x64
/* 183F70 80255690 2416000F */  addiu     $s6, $zero, 0xF
.L80255694:
/* 183F74 80255694 8FA8039C */  lw        $t0, 0x39C($sp)
/* 183F78 80255698 8D020000 */  lw        $v0, 0x0($t0)
/* 183F7C 8025569C 30420800 */  andi      $v0, $v0, 0x800
/* 183F80 802556A0 14400015 */  bnez      $v0, .L802556F8
/* 183F84 802556A4 00101023 */   negu     $v0, $s0
/* 183F88 802556A8 44824000 */  mtc1      $v0, $f8
D_802556AC:
/* 183F8C 802556AC 00000000 */  nop
/* 183F90 802556B0 46804220 */  cvt.s.w   $f8, $f8
/* 183F94 802556B4 00111023 */  negu      $v0, $s1
/* 183F98 802556B8 44054000 */  mfc1      $a1, $f8
/* 183F9C 802556BC 44824000 */  mtc1      $v0, $f8
/* 183FA0 802556C0 00000000 */  nop
/* 183FA4 802556C4 46804220 */  cvt.s.w   $f8, $f8
/* 183FA8 802556C8 4407A000 */  mfc1      $a3, $f20
/* 183FAC 802556CC 44064000 */  mfc1      $a2, $f8
/* 183FB0 802556D0 0C019E40 */  jal       guTranslateF
/* 183FB4 802556D4 27A40218 */   addiu    $a0, $sp, 0x218
/* 183FB8 802556D8 44904000 */  mtc1      $s0, $f8
/* 183FBC 802556DC 00000000 */  nop
/* 183FC0 802556E0 46804220 */  cvt.s.w   $f8, $f8
D_802556E4:
/* 183FC4 802556E4 44054000 */  mfc1      $a1, $f8
/* 183FC8 802556E8 44914000 */  mtc1      $s1, $f8
/* 183FCC 802556EC 00000000 */  nop
/* 183FD0 802556F0 080955D1 */  j         .L80255744
/* 183FD4 802556F4 46804220 */   cvt.s.w  $f8, $f8
.L802556F8:
/* 183FD8 802556F8 44824000 */  mtc1      $v0, $f8
/* 183FDC 802556FC 00000000 */  nop
/* 183FE0 80255700 46804220 */  cvt.s.w   $f8, $f8
/* 183FE4 80255704 44054000 */  mfc1      $a1, $f8
/* 183FE8 80255708 44914000 */  mtc1      $s1, $f8
/* 183FEC 8025570C 00000000 */  nop
/* 183FF0 80255710 46804220 */  cvt.s.w   $f8, $f8
/* 183FF4 80255714 4407A000 */  mfc1      $a3, $f20
/* 183FF8 80255718 44064000 */  mfc1      $a2, $f8
D_8025571C:
/* 183FFC 8025571C 0C019E40 */  jal       guTranslateF
/* 184000 80255720 27A40218 */   addiu    $a0, $sp, 0x218
/* 184004 80255724 44904000 */  mtc1      $s0, $f8
/* 184008 80255728 00000000 */  nop
/* 18400C 8025572C 46804220 */  cvt.s.w   $f8, $f8
/* 184010 80255730 00111023 */  negu      $v0, $s1
/* 184014 80255734 44054000 */  mfc1      $a1, $f8
/* 184018 80255738 44824000 */  mtc1      $v0, $f8
D_8025573C:
/* 18401C 8025573C 00000000 */  nop
/* 184020 80255740 46804220 */  cvt.s.w   $f8, $f8
.L80255744:
/* 184024 80255744 4407A000 */  mfc1      $a3, $f20
/* 184028 80255748 44064000 */  mfc1      $a2, $f8
/* 18402C 8025574C 0C019E40 */  jal       guTranslateF
/* 184030 80255750 27A40258 */   addiu    $a0, $sp, 0x258
D_80255754:
/* 184034 80255754 4405D000 */  mfc1      $a1, $f26
/* 184038 80255758 4406E000 */  mfc1      $a2, $f28
/* 18403C 8025575C 4407B000 */  mfc1      $a3, $f22
/* 184040 80255760 0C019E40 */  jal       guTranslateF
/* 184044 80255764 27A40158 */   addiu    $a0, $sp, 0x158
/* 184048 80255768 4405C000 */  mfc1      $a1, $f24
/* 18404C 8025576C 3C063F80 */  lui       $a2, (0x3F800000 >> 16)
/* 184050 80255770 4407A000 */  mfc1      $a3, $f20
/* 184054 80255774 27A40018 */  addiu     $a0, $sp, 0x18
/* 184058 80255778 0C019EC8 */  jal       guRotateF
/* 18405C 8025577C E7B40010 */   swc1     $f20, 0x10($sp)
/* 184060 80255780 4405F000 */  mfc1      $a1, $f30
/* 184064 80255784 4406A000 */  mfc1      $a2, $f20
/* 184068 80255788 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
D_8025578C:
/* 18406C 8025578C 8FA40330 */  lw        $a0, 0x330($sp)
/* 184070 80255790 0C019EC8 */  jal       guRotateF
/* 184074 80255794 E7B40010 */   swc1     $f20, 0x10($sp)
/* 184078 80255798 3C013F80 */  lui       $at, (0x3F800000 >> 16)
D_8025579C:
/* 18407C 8025579C 44814000 */  mtc1      $at, $f8
/* 184080 802557A0 8FA50328 */  lw        $a1, 0x328($sp)
/* 184084 802557A4 4406A000 */  mfc1      $a2, $f20
/* 184088 802557A8 4407A000 */  mfc1      $a3, $f20
/* 18408C 802557AC 8FA40334 */  lw        $a0, 0x334($sp)
/* 184090 802557B0 0C019EC8 */  jal       guRotateF
/* 184094 802557B4 E7A80010 */   swc1     $f8, 0x10($sp)
/* 184098 802557B8 27A50018 */  addiu     $a1, $sp, 0x18
/* 18409C 802557BC 8FA40330 */  lw        $a0, 0x330($sp)
/* 1840A0 802557C0 0C019D80 */  jal       guMtxCatF
/* 1840A4 802557C4 02E0302D */   daddu    $a2, $s7, $zero
/* 1840A8 802557C8 8FA50334 */  lw        $a1, 0x334($sp)
D_802557CC:
/* 1840AC 802557CC 8FA60338 */  lw        $a2, 0x338($sp)
/* 1840B0 802557D0 0C019D80 */  jal       guMtxCatF
/* 1840B4 802557D4 02E0202D */   daddu    $a0, $s7, $zero
/* 1840B8 802557D8 82420074 */  lb        $v0, 0x74($s2)
/* 1840BC 802557DC C6420050 */  lwc1      $f2, 0x50($s2)
/* 1840C0 802557E0 44820000 */  mtc1      $v0, $f0
/* 1840C4 802557E4 00000000 */  nop
/* 1840C8 802557E8 46800020 */  cvt.s.w   $f0, $f0
D_802557EC:
/* 1840CC 802557EC 46001082 */  mul.s     $f2, $f2, $f0
/* 1840D0 802557F0 00000000 */  nop
/* 1840D4 802557F4 8E45004C */  lw        $a1, 0x4C($s2)
/* 1840D8 802557F8 8E470054 */  lw        $a3, 0x54($s2)
/* 1840DC 802557FC 8FA4033C */  lw        $a0, 0x33C($sp)
/* 1840E0 80255800 44061000 */  mfc1      $a2, $f2
/* 1840E4 80255804 0C019DF0 */  jal       guScaleF
/* 1840E8 80255808 00000000 */   nop
/* 1840EC 8025580C 27A50218 */  addiu     $a1, $sp, 0x218
D_80255810:
/* 1840F0 80255810 8FA4033C */  lw        $a0, 0x33C($sp)
/* 1840F4 80255814 0C019D80 */  jal       guMtxCatF
/* 1840F8 80255818 0260302D */   daddu    $a2, $s3, $zero
/* 1840FC 8025581C 0260202D */  daddu     $a0, $s3, $zero
/* 184100 80255820 8FA50338 */  lw        $a1, 0x338($sp)
/* 184104 80255824 0C019D80 */  jal       guMtxCatF
/* 184108 80255828 02E0302D */   daddu    $a2, $s7, $zero
/* 18410C 8025582C 02E0202D */  daddu     $a0, $s7, $zero
/* 184110 80255830 27A50258 */  addiu     $a1, $sp, 0x258
/* 184114 80255834 0C019D80 */  jal       guMtxCatF
/* 184118 80255838 0260302D */   daddu    $a2, $s3, $zero
/* 18411C 8025583C 8E420000 */  lw        $v0, 0x0($s2)
/* 184120 80255840 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 184124 80255844 00431024 */  and       $v0, $v0, $v1
/* 184128 80255848 14400003 */  bnez      $v0, .L80255858
D_8025584C:
/* 18412C 8025584C 0260202D */   daddu    $a0, $s3, $zero
/* 184130 80255850 08095617 */  j         .L8025585C
/* 184134 80255854 27A50298 */   addiu    $a1, $sp, 0x298
.L80255858:
/* 184138 80255858 27A502D8 */  addiu     $a1, $sp, 0x2D8
.L8025585C:
/* 18413C 8025585C 0C019D80 */  jal       guMtxCatF
/* 184140 80255860 02E0302D */   daddu    $a2, $s7, $zero
/* 184144 80255864 27A40198 */  addiu     $a0, $sp, 0x198
/* 184148 80255868 27A50158 */  addiu     $a1, $sp, 0x158
/* 18414C 8025586C 0C019D80 */  jal       guMtxCatF
D_80255870:
/* 184150 80255870 0260302D */   daddu    $a2, $s3, $zero
/* 184154 80255874 8FA80324 */  lw        $t0, 0x324($sp)
/* 184158 80255878 01160018 */  mult      $t0, $s6
/* 18415C 8025587C 3C118000 */  lui       $s1, (0x80000000 >> 16)
/* 184160 80255880 8FA80398 */  lw        $t0, 0x398($sp)
/* 184164 80255884 00004812 */  mflo      $t1
/* 184168 80255888 15000004 */  bnez      $t0, .L8025589C
/* 18416C 8025588C 03C98023 */   subu     $s0, $fp, $t1
/* 184170 80255890 8FA5032C */  lw        $a1, 0x32C($sp)
D_80255894:
/* 184174 80255894 08095630 */  j         .L802558C0
/* 184178 80255898 0200302D */   daddu    $a2, $s0, $zero
.L8025589C:
/* 18417C 8025589C 8FA9032C */  lw        $t1, 0x32C($sp)
/* 184180 802558A0 252200B4 */  addiu     $v0, $t1, 0xB4
/* 184184 802558A4 44826000 */  mtc1      $v0, $f12
/* 184188 802558A8 00000000 */  nop
/* 18418C 802558AC 0C00A6C9 */  jal       clamp_angle
/* 184190 802558B0 46806320 */   cvt.s.w  $f12, $f12
/* 184194 802558B4 4600020D */  trunc.w.s $f8, $f0
/* 184198 802558B8 44054000 */  mfc1      $a1, $f8
/* 18419C 802558BC 0200302D */  daddu     $a2, $s0, $zero
.L802558C0:
/* 1841A0 802558C0 8E440084 */  lw        $a0, 0x84($s2)
D_802558C4:
/* 1841A4 802558C4 0000382D */  daddu     $a3, $zero, $zero
/* 1841A8 802558C8 AFB30010 */  sw        $s3, 0x10($sp)
/* 1841AC 802558CC 0C0B78F6 */  jal       spr_draw_npc_sprite
/* 1841B0 802558D0 00912025 */   or       $a0, $a0, $s1
/* 1841B4 802558D4 0809555C */  j         .L80255570
/* 1841B8 802558D8 00000000 */   nop
.L802558DC:
/* 1841BC 802558DC 8FA9031C */  lw        $t1, 0x31C($sp)
/* 1841C0 802558E0 8FA80318 */  lw        $t0, 0x318($sp)
/* 1841C4 802558E4 25290001 */  addiu     $t1, $t1, 0x1
/* 1841C8 802558E8 0128102A */  slt       $v0, $t1, $t0
/* 1841CC 802558EC 1440FEE3 */  bnez      $v0, .L8025547C
/* 1841D0 802558F0 AFA9031C */   sw       $t1, 0x31C($sp)
.L802558F4:
/* 1841D4 802558F4 8FBF0364 */  lw        $ra, 0x364($sp)
/* 1841D8 802558F8 8FBE0360 */  lw        $fp, 0x360($sp)
/* 1841DC 802558FC 8FB7035C */  lw        $s7, 0x35C($sp)
/* 1841E0 80255900 8FB60358 */  lw        $s6, 0x358($sp)
/* 1841E4 80255904 8FB50354 */  lw        $s5, 0x354($sp)
/* 1841E8 80255908 8FB40350 */  lw        $s4, 0x350($sp)
D_8025590C:
/* 1841EC 8025590C 8FB3034C */  lw        $s3, 0x34C($sp)
/* 1841F0 80255910 8FB20348 */  lw        $s2, 0x348($sp)
/* 1841F4 80255914 8FB10344 */  lw        $s1, 0x344($sp)
/* 1841F8 80255918 8FB00340 */  lw        $s0, 0x340($sp)
/* 1841FC 8025591C D7BE0390 */  ldc1      $f30, 0x390($sp)
/* 184200 80255920 D7BC0388 */  ldc1      $f28, 0x388($sp)
/* 184204 80255924 D7BA0380 */  ldc1      $f26, 0x380($sp)
/* 184208 80255928 D7B80378 */  ldc1      $f24, 0x378($sp)
/* 18420C 8025592C D7B60370 */  ldc1      $f22, 0x370($sp)
/* 184210 80255930 D7B40368 */  ldc1      $f20, 0x368($sp)
/* 184214 80255934 03E00008 */  jr        $ra
/* 184218 80255938 27BD0398 */   addiu    $sp, $sp, 0x398

### DECOMPILED C INSTRUCTIONS:

void func_802552EC(s32 arg0, Actor* actor) {
    DecorationTable* decorationTable;
    ActorPart* partTable;
    Matrix4f mtxRotX, mtxRotY, mtxRotZ, mtxRotation;
    Matrix4f mtxScale, mtxTranslate;
    Matrix4f mtxTemp, mtxTransform;
    Matrix4f mtxPivotOn, mtxPivotOff;
    Matrix4f mtxActor, mtxPartScale;
    s32 numParts;
    s32 i, j, k, l;
    f32 x, y, z;
    f32 rotX, rotY, rotZ;
    s32 yaw;
    s32 opacity;
    s32 pivotX;
    s32 pivotY;
    s32 phi_fp;
    s32 phi_s6;
    s32 temp;
    s32 flags;

    guRotateF(mtxRotX, actor->rotation.x, 1.0f, 0.0f, 0.0f);
    guRotateF(mtxRotY, actor->rotation.y, 0.0f, 1.0f, 0.0f);
    guRotateF(mtxRotZ, actor->rotation.z, 0.0f, 0.0f, 1.0f);
    guMtxCatF(mtxRotX, mtxRotY, mtxTemp);
    guMtxCatF(mtxTemp, mtxRotZ, mtxRotation);
    guScaleF(mtxScale, actor->scale.x * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
                    actor->scale.y * SPRITE_WORLD_SCALE_D * actor->scalingFactor,
                    actor->scale.z * SPRITE_WORLD_SCALE_D);
    guMtxCatF(mtxScale, mtxRotation, mtxActor);

    numParts = actor->numParts;
    partTable = actor->partsTable;
    for (i = 0; i < numParts; i++) {
        if ((partTable->idleAnimations == NULL) || (partTable->flags & ACTOR_PART_FLAG_2)) {
            partTable = partTable->nextPart;
            continue;
        }

        decorationTable = partTable->decorationTable;
        if (decorationTable->effectType != 0) {
            decorationTable->effectType--;
            if (decorationTable->effectType == 0) {
                actor->flags &= ~ACTOR_FLAG_BLUR_ENABLED;
                partTable = partTable->nextPart;
                continue;
            }
        }

        if (partTable->flags & ACTOR_PART_FLAG_INVISIBLE) {
            partTable = partTable->nextPart;
            continue;
        }

        if (partTable->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION) {
            guScaleF(mtxPartScale, actor->scale.x * SPRITE_WORLD_SCALE_D, actor->scale.y * SPRITE_WORLD_SCALE_D, actor->scale.z * SPRITE_WORLD_SCALE_D);
        }

        j = decorationTable->unk_7D9;
        k = 0;
        l = 0;

        while (1) {
            j--;
            k++;

            if (j < 0) {
                j = 15;
            }

            if (j == decorationTable->unk_7D9) {
                break;
            }

            if (k < 3) {
                continue;
            }

            k = 0;
            l++;

            if (decorationTable->unk_7DA < l) {
                break;
            }

            opacity = partTable->opacity;

            x = decorationTable->posX[j];
            y = decorationTable->posY[j];
            z = decorationTable->posZ[j];

            yaw = decorationTable->yaw[j];

            pivotX = decorationTable->rotationPivotOffsetX[j];
            pivotY = decorationTable->rotationPivotOffsetY[j];

            rotX = decorationTable->rotX[j] * 2;
            rotY = decorationTable->rotY[j] * 2;
            rotZ = decorationTable->rotZ[j] * 2;

            phi_fp = 120;
            phi_s6 = 20;
            if (opacity < 50) {
                phi_fp = 50;
                phi_s6 = 8;
            } else if (opacity < 100) {
                phi_fp = 70;
                phi_s6 = 10;
            } else if (opacity < 150) {
                phi_fp = 100;
                phi_s6 = 15;
            }

            if (!(actor->flags & ACTOR_FLAG_UPSIDE_DOWN)) {
                guTranslateF(mtxPivotOn, -pivotX, -pivotY, 0.0f);
                guTranslateF(mtxPivotOff, pivotX, pivotY, 0.0f);
            } else {
                guTranslateF(mtxPivotOn, -pivotX, pivotY, 0.0f);
                guTranslateF(mtxPivotOff, pivotX, -pivotY, 0.0f);
            }

            guTranslateF(mtxTranslate, x, y, z);
            guRotateF(mtxRotX, rotX, 1.0f, 0.0f, 0.0f);
            guRotateF(mtxRotY, rotY, 0.0f, 1.0f, 0.0f);
            guRotateF(mtxRotZ, rotZ, 0.0f, 0.0f, 1.0f);
            guMtxCatF(mtxRotY, mtxRotX, mtxTemp);
            guMtxCatF(mtxTemp, mtxRotZ, mtxRotation);
            guScaleF(mtxScale, partTable->scale.x, partTable->scale.y * partTable->verticalStretch, partTable->scale.z);
            guMtxCatF(mtxScale, mtxPivotOn, mtxTransform);
            guMtxCatF(mtxTransform, mtxRotation, mtxTemp);
            guMtxCatF(mtxTemp, mtxPivotOff, mtxTransform);

            if (!(partTable->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
                guMtxCatF(mtxTransform, mtxActor, mtxTemp);
            } else {
                guMtxCatF(mtxTransform, mtxPartScale, mtxTemp);
            }
            guMtxCatF(mtxTemp, mtxTranslate, mtxTransform);

            flags = ACTOR_PART_FLAG_80000000;
            temp = phi_fp - l * phi_s6;
            if (arg0 == 0) {
                spr_draw_npc_sprite(partTable->spriteInstanceID | flags, yaw, temp, 0, mtxTransform);
            } else {
                spr_draw_npc_sprite(partTable->spriteInstanceID | flags, clamp_angle(yaw + 180), temp, 0, mtxTransform);
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_802A9B44_7B14E4
/* 41E8D4 802A9B44 3C03800E */  lui       $v1, %hi(gBattleSubState)
/* 41E8D8 802A9B48 8C63C4DC */  lw        $v1, %lo(gBattleSubState)($v1)
/* 41E8DC 802A9B4C 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 41E8E0 802A9B50 AFB20018 */  sw        $s2, 0x18($sp)
/* 41E8E4 802A9B54 3C12800E */  lui       $s2, %hi(gBattleStatus)
/* 41E8E8 802A9B58 2652C070 */  addiu     $s2, $s2, %lo(gBattleStatus)
/* 41E8EC 802A9B5C AFBF001C */  sw        $ra, 0x1C($sp)
D_802A9B60_7B1500:
/* 41E8F0 802A9B60 AFB10014 */  sw        $s1, 0x14($sp)
/* 41E8F4 802A9B64 AFB00010 */  sw        $s0, 0x10($sp)
/* 41E8F8 802A9B68 F7B80030 */  sdc1      $f24, 0x30($sp)
/* 41E8FC 802A9B6C F7B60028 */  sdc1      $f22, 0x28($sp)
.L802A9B70_7B1510:
/* 41E900 802A9B70 F7B40020 */  sdc1      $f20, 0x20($sp)
/* 41E904 802A9B74 8E5000D8 */  lw        $s0, 0xD8($s2)
.L802A9B78_7B1518:
/* 41E908 802A9B78 8E5100DC */  lw        $s1, 0xDC($s2)
/* 41E90C 802A9B7C 2C62000C */  sltiu     $v0, $v1, 0xC
/* 41E910 802A9B80 1040012D */  beqz      $v0, .L802AA038_7B19D8
/* 41E914 802A9B84 00031080 */   sll      $v0, $v1, 2
/* 41E918 802A9B88 3C01802B */  lui       $at, %hi(jtbl_802ACBB0_7B4550)
.L802A9B8C_7B152C:
/* 41E91C 802A9B8C 00220821 */  addu      $at, $at, $v0
/* 41E920 802A9B90 8C22CBB0 */  lw        $v0, %lo(jtbl_802ACBB0_7B4550)($at)
/* 41E924 802A9B94 00400008 */  jr        $v0
/* 41E928 802A9B98 00000000 */   nop
glabel .L802A9B9C_7B153C
/* 41E92C 802A9B9C 0C093903 */  jal       func_8024E40C
.L802A9BA0_7B1540:
/* 41E930 802A9BA0 24040002 */   addiu    $a0, $zero, 0x2
/* 41E934 802A9BA4 0C093936 */  jal       D_8024E4D8_C0BD58
/* 41E938 802A9BA8 2404000A */   addiu    $a0, $zero, 0xA
/* 41E93C 802A9BAC 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 41E940 802A9BB0 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 41E944 802A9BB4 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 41E948 802A9BB8 00431024 */  and       $v0, $v0, $v1
.L802A9BBC_7B155C:
/* 41E94C 802A9BBC 14400003 */  bnez      $v0, .L802A9BCC_7B156C
/* 41E950 802A9BC0 2402000A */   addiu    $v0, $zero, 0xA
/* 41E954 802A9BC4 080AA80C */  j         .L802AA030_7B19D0
/* 41E958 802A9BC8 2402000B */   addiu    $v0, $zero, 0xB
.L802A9BCC_7B156C:
/* 41E95C 802A9BCC C6000138 */  lwc1      $f0, 0x138($s0)
/* 41E960 802A9BD0 C6020140 */  lwc1      $f2, 0x140($s0)
/* 41E964 802A9BD4 E600000C */  swc1      $f0, 0xC($s0)
.L802A9BD8_7B1578:
/* 41E968 802A9BD8 E6020014 */  swc1      $f2, 0x14($s0)
/* 41E96C 802A9BDC C6200138 */  lwc1      $f0, 0x138($s1)
/* 41E970 802A9BE0 3C01800E */  lui       $at, %hi(gBattleSubState)
.L802A9BE4_7B1584:
/* 41E974 802A9BE4 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
/* 41E978 802A9BE8 E6000018 */  swc1      $f0, 0x18($s0)
/* 41E97C 802A9BEC C6200140 */  lwc1      $f0, 0x140($s1)
/* 41E980 802A9BF0 24020004 */  addiu     $v0, $zero, 0x4
/* 41E984 802A9BF4 A6020070 */  sh        $v0, 0x70($s0)
.L802A9BF8_7B1598:
/* 41E988 802A9BF8 AE000054 */  sw        $zero, 0x54($s0)
/* 41E98C 802A9BFC 080AA80E */  j         .L802AA038_7B19D8
/* 41E990 802A9C00 E6000020 */   swc1     $f0, 0x20($s0)
glabel .L802A9C04_7B15A4
/* 41E994 802A9C04 86020070 */  lh        $v0, 0x70($s0)
.L802A9C08_7B15A8:
/* 41E998 802A9C08 10400022 */  beqz      $v0, .L802A9C94_7B1634
/* 41E99C 802A9C0C 00000000 */   nop
/* 41E9A0 802A9C10 C6000018 */  lwc1      $f0, 0x18($s0)
/* 41E9A4 802A9C14 C6080144 */  lwc1      $f8, 0x144($s0)
/* 41E9A8 802A9C18 C6020020 */  lwc1      $f2, 0x20($s0)
/* 41E9AC 802A9C1C 46080001 */  sub.s     $f0, $f0, $f8
/* 41E9B0 802A9C20 C604014C */  lwc1      $f4, 0x14C($s0)
/* 41E9B4 802A9C24 46041081 */  sub.s     $f2, $f2, $f4
/* 41E9B8 802A9C28 44823000 */  mtc1      $v0, $f6
/* 41E9BC 802A9C2C 00000000 */  nop
.L802A9C30_7B15D0:
/* 41E9C0 802A9C30 468031A0 */  cvt.s.w   $f6, $f6
/* 41E9C4 802A9C34 46060003 */  div.s     $f0, $f0, $f6
/* 41E9C8 802A9C38 46004200 */  add.s     $f8, $f8, $f0
/* 41E9CC 802A9C3C 46003006 */  mov.s     $f0, $f6
/* 41E9D0 802A9C40 46061083 */  div.s     $f2, $f2, $f6
/* 41E9D4 802A9C44 C600000C */  lwc1      $f0, 0xC($s0)
/* 41E9D8 802A9C48 46022100 */  add.s     $f4, $f4, $f2
/* 41E9DC 802A9C4C E6080144 */  swc1      $f8, 0x144($s0)
.L802A9C50_7B15F0:
/* 41E9E0 802A9C50 E604014C */  swc1      $f4, 0x14C($s0)
/* 41E9E4 802A9C54 C6240144 */  lwc1      $f4, 0x144($s1)
.L802A9C58_7B15F8:
/* 41E9E8 802A9C58 46040001 */  sub.s     $f0, $f0, $f4
/* 41E9EC 802A9C5C 46003086 */  mov.s     $f2, $f6
/* 41E9F0 802A9C60 46060003 */  div.s     $f0, $f0, $f6
/* 41E9F4 802A9C64 46002100 */  add.s     $f4, $f4, $f0
/* 41E9F8 802A9C68 E6240144 */  swc1      $f4, 0x144($s1)
/* 41E9FC 802A9C6C C6000014 */  lwc1      $f0, 0x14($s0)
/* 41EA00 802A9C70 C624014C */  lwc1      $f4, 0x14C($s1)
/* 41EA04 802A9C74 86020070 */  lh        $v0, 0x70($s0)
/* 41EA08 802A9C78 46040001 */  sub.s     $f0, $f0, $f4
/* 41EA0C 802A9C7C 44821000 */  mtc1      $v0, $f2
D_802A9C80_7B1620:
/* 41EA10 802A9C80 00000000 */  nop
.L802A9C84_7B1624:
/* 41EA14 802A9C84 468010A0 */  cvt.s.w   $f2, $f2
/* 41EA18 802A9C88 46020003 */  div.s     $f0, $f0, $f2
/* 41EA1C 802A9C8C 46002100 */  add.s     $f4, $f4, $f0
/* 41EA20 802A9C90 E624014C */  swc1      $f4, 0x14C($s1)
.L802A9C94_7B1634:
/* 41EA24 802A9C94 C60C0054 */  lwc1      $f12, 0x54($s0)
/* 41EA28 802A9C98 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 41EA2C 802A9C9C 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
D_802A9CA0_7B1640:
/* 41EA30 802A9CA0 4481B000 */  mtc1      $at, $f22
/* 41EA34 802A9CA4 00000000 */  nop
/* 41EA38 802A9CA8 46166302 */  mul.s     $f12, $f12, $f22
/* 41EA3C 802A9CAC 00000000 */  nop
/* 41EA40 802A9CB0 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
.L802A9CB4_7B1654:
/* 41EA44 802A9CB4 4481C000 */  mtc1      $at, $f24
/* 41EA48 802A9CB8 3C014180 */  lui       $at, (0x41800000 >> 16)
.L802A9CBC_7B165C:
/* 41EA4C 802A9CBC 4481A000 */  mtc1      $at, $f20
/* 41EA50 802A9CC0 0C00A85B */  jal       sin_rad
/* 41EA54 802A9CC4 46186303 */   div.s    $f12, $f12, $f24
/* 41EA58 802A9CC8 46140002 */  mul.s     $f0, $f0, $f20
/* 41EA5C 802A9CCC 00000000 */  nop
/* 41EA60 802A9CD0 C602014C */  lwc1      $f2, 0x14C($s0)
/* 41EA64 802A9CD4 46001081 */  sub.s     $f2, $f2, $f0
/* 41EA68 802A9CD8 C60C0054 */  lwc1      $f12, 0x54($s0)
/* 41EA6C 802A9CDC 46006307 */  neg.s     $f12, $f12
/* 41EA70 802A9CE0 0C00A6C9 */  jal       clamp_angle
/* 41EA74 802A9CE4 E602014C */   swc1     $f2, 0x14C($s0)
/* 41EA78 802A9CE8 C60C0054 */  lwc1      $f12, 0x54($s0)
/* 41EA7C 802A9CEC 46166302 */  mul.s     $f12, $f12, $f22
/* 41EA80 802A9CF0 00000000 */  nop
/* 41EA84 802A9CF4 E600018C */  swc1      $f0, 0x18C($s0)
/* 41EA88 802A9CF8 0C00A85B */  jal       sin_rad
.L802A9CFC_7B169C:
/* 41EA8C 802A9CFC 46186303 */   div.s    $f12, $f12, $f24
/* 41EA90 802A9D00 46140002 */  mul.s     $f0, $f0, $f20
/* 41EA94 802A9D04 00000000 */  nop
/* 41EA98 802A9D08 C622014C */  lwc1      $f2, 0x14C($s1)
/* 41EA9C 802A9D0C 46001080 */  add.s     $f2, $f2, $f0
/* 41EAA0 802A9D10 E622014C */  swc1      $f2, 0x14C($s1)
/* 41EAA4 802A9D14 C60C0054 */  lwc1      $f12, 0x54($s0)
/* 41EAA8 802A9D18 0C00A6C9 */  jal       clamp_angle
/* 41EAAC 802A9D1C 46006307 */   neg.s    $f12, $f12
/* 41EAB0 802A9D20 E620018C */  swc1      $f0, 0x18C($s1)
/* 41EAB4 802A9D24 C6000054 */  lwc1      $f0, 0x54($s0)
/* 41EAB8 802A9D28 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 41EABC 802A9D2C 44811000 */  mtc1      $at, $f2
/* 41EAC0 802A9D30 86020070 */  lh        $v0, 0x70($s0)
/* 41EAC4 802A9D34 46020000 */  add.s     $f0, $f0, $f2
/* 41EAC8 802A9D38 96030070 */  lhu       $v1, 0x70($s0)
/* 41EACC 802A9D3C 10400004 */  beqz      $v0, .L802A9D50_7B16F0
/* 41EAD0 802A9D40 E6000054 */   swc1     $f0, 0x54($s0)
/* 41EAD4 802A9D44 2462FFFF */  addiu     $v0, $v1, -0x1
.L802A9D48_7B16E8:
/* 41EAD8 802A9D48 080AA80E */  j         .L802AA038_7B19D8
/* 41EADC 802A9D4C A6020070 */   sh       $v0, 0x70($s0)
.L802A9D50_7B16F0:
/* 41EAE0 802A9D50 C6000018 */  lwc1      $f0, 0x18($s0)
/* 41EAE4 802A9D54 C6020020 */  lwc1      $f2, 0x20($s0)
/* 41EAE8 802A9D58 C604000C */  lwc1      $f4, 0xC($s0)
/* 41EAEC 802A9D5C E6000144 */  swc1      $f0, 0x144($s0)
/* 41EAF0 802A9D60 E602014C */  swc1      $f2, 0x14C($s0)
/* 41EAF4 802A9D64 E6240144 */  swc1      $f4, 0x144($s1)
.L802A9D68_7B1708:
/* 41EAF8 802A9D68 C6000014 */  lwc1      $f0, 0x14($s0)
/* 41EAFC 802A9D6C E620014C */  swc1      $f0, 0x14C($s1)
/* 41EB00 802A9D70 C6000144 */  lwc1      $f0, 0x144($s0)
/* 41EB04 802A9D74 C602014C */  lwc1      $f2, 0x14C($s0)
/* 41EB08 802A9D78 3C04FFEF */  lui       $a0, (0xFFEFFFFF >> 16)
glabel .L802A9D7C_7B171C
/* 41EB0C 802A9D7C E6000138 */  swc1      $f0, 0x138($s0)
/* 41EB10 802A9D80 E6020140 */  swc1      $f2, 0x140($s0)
/* 41EB14 802A9D84 C6200144 */  lwc1      $f0, 0x144($s1)
/* 41EB18 802A9D88 C622014C */  lwc1      $f2, 0x14C($s1)
/* 41EB1C 802A9D8C 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 41EB20 802A9D90 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 41EB24 802A9D94 E6200138 */  swc1      $f0, 0x138($s1)
/* 41EB28 802A9D98 E6220140 */  swc1      $f2, 0x140($s1)
/* 41EB2C 802A9D9C 8C620000 */  lw        $v0, 0x0($v1)
/* 41EB30 802A9DA0 3484FFFF */  ori       $a0, $a0, (0xFFEFFFFF & 0xFFFF)
/* 41EB34 802A9DA4 00441024 */  and       $v0, $v0, $a0
/* 41EB38 802A9DA8 AC620000 */  sw        $v0, 0x0($v1)
glabel .L802A9DAC_7B174C
/* 41EB3C 802A9DAC 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 41EB40 802A9DB0 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 41EB44 802A9DB4 8C620000 */  lw        $v0, 0x0($v1)
/* 41EB48 802A9DB8 3C04FBFF */  lui       $a0, (0xFBFFFFFF >> 16)
/* 41EB4C 802A9DBC 34420002 */  ori       $v0, $v0, 0x2
D_802A9DC0_7B1760:
/* 41EB50 802A9DC0 AC620000 */  sw        $v0, 0x0($v1)
/* 41EB54 802A9DC4 8E020000 */  lw        $v0, 0x0($s0)
/* 41EB58 802A9DC8 3484FFFF */  ori       $a0, $a0, (0xFBFFFFFF & 0xFFFF)
/* 41EB5C 802A9DCC 00441024 */  and       $v0, $v0, $a0
/* 41EB60 802A9DD0 3C040800 */  lui       $a0, (0x8000000 >> 16)
/* 41EB64 802A9DD4 00441025 */  or        $v0, $v0, $a0
.L802A9DD8_7B1778:
/* 41EB68 802A9DD8 12200006 */  beqz      $s1, .L802A9DF4_7B1794
/* 41EB6C 802A9DDC AE020000 */   sw       $v0, 0x0($s0)
D_802A9DE0_7B1780:
/* 41EB70 802A9DE0 8E220000 */  lw        $v0, 0x0($s1)
/* 41EB74 802A9DE4 3C030400 */  lui       $v1, (0x4000000 >> 16)
.L802A9DE8_7B1788:
/* 41EB78 802A9DE8 00431025 */  or        $v0, $v0, $v1
/* 41EB7C 802A9DEC 00441025 */  or        $v0, $v0, $a0
.L802A9DF0_7B1790:
/* 41EB80 802A9DF0 AE220000 */  sw        $v0, 0x0($s1)
.L802A9DF4_7B1794:
/* 41EB84 802A9DF4 24020008 */  addiu     $v0, $zero, 0x8
/* 41EB88 802A9DF8 3C07802B */  lui       $a3, %hi(BattleMenu_OptionEnabled)
/* 41EB8C 802A9DFC 24E7D0D0 */  addiu     $a3, $a3, %lo(BattleMenu_OptionEnabled)
/* 41EB90 802A9E00 A640017C */  sh        $zero, 0x17C($s2)
.L802A9E04_7B17A4:
/* 41EB94 802A9E04 3C01802B */  lui       $at, %hi(battle_menu_submenuIDs)
/* 41EB98 802A9E08 AC22D0B8 */  sw        $v0, %lo(battle_menu_submenuIDs)($at)
/* 41EB9C 802A9E0C 24020001 */  addiu     $v0, $zero, 0x1
/* 41EBA0 802A9E10 3C08802B */  lui       $t0, %hi(battle_menu_isMessageDisabled)
/* 41EBA4 802A9E14 2508D0E8 */  addiu     $t0, $t0, %lo(battle_menu_isMessageDisabled)
.L802A9E18_7B17B8:
/* 41EBA8 802A9E18 3C06802B */  lui       $a2, %hi(D_802AB720_7B30C0)
/* 41EBAC 802A9E1C 24C6B720 */  addiu     $a2, $a2, %lo(D_802AB720_7B30C0)
/* 41EBB0 802A9E20 3C05802B */  lui       $a1, %hi(BattleMenu_HudScripts)
/* 41EBB4 802A9E24 24A5D078 */  addiu     $a1, $a1, %lo(BattleMenu_HudScripts)
/* 41EBB8 802A9E28 ACE20000 */  sw        $v0, 0x0($a3)
/* 41EBBC 802A9E2C AD000000 */  sw        $zero, 0x0($t0)
/* 41EBC0 802A9E30 8CC30000 */  lw        $v1, 0x0($a2)
.L802A9E34_7B17D4:
/* 41EBC4 802A9E34 96420070 */  lhu       $v0, 0x70($s2)
/* 41EBC8 802A9E38 3C04802B */  lui       $a0, %hi(D_802AB728_7B30C8)
/* 41EBCC 802A9E3C 8C84B728 */  lw        $a0, %lo(D_802AB728_7B30C8)($a0)
/* 41EBD0 802A9E40 30420100 */  andi      $v0, $v0, 0x100
/* 41EBD4 802A9E44 ACA30000 */  sw        $v1, 0x0($a1)
/* 41EBD8 802A9E48 3C01802B */  lui       $at, %hi(BattleMenu_TitleMessages)
/* 41EBDC 802A9E4C AC24D090 */  sw        $a0, %lo(BattleMenu_TitleMessages)($at)
.L802A9E50_7B17F0:
/* 41EBE0 802A9E50 14400006 */  bnez      $v0, .L802A9E6C_7B180C
/* 41EBE4 802A9E54 0000882D */   daddu    $s1, $zero, $zero
/* 41EBE8 802A9E58 ACE00000 */  sw        $zero, 0x0($a3)
.L802A9E5C_7B17FC:
/* 41EBEC 802A9E5C 8CC30004 */  lw        $v1, 0x4($a2)
/* 41EBF0 802A9E60 24020048 */  addiu     $v0, $zero, 0x48
/* 41EBF4 802A9E64 AD020000 */  sw        $v0, 0x0($t0)
/* 41EBF8 802A9E68 ACA30000 */  sw        $v1, 0x0($a1)
.L802A9E6C_7B180C:
/* 41EBFC 802A9E6C 0C0AA6CC */  jal       func_802A9B30_7B14D0
.L802A9E70_7B1810:
/* 41EC00 802A9E70 24100001 */   addiu    $s0, $zero, 0x1
/* 41EC04 802A9E74 10400005 */  beqz      $v0, .L802A9E8C_7B182C
/* 41EC08 802A9E78 24020002 */   addiu    $v0, $zero, 0x2
/* 41EC0C 802A9E7C 3C01802B */  lui       $at, %hi(BattleMenu_ShowSwapIcons)
.L802A9E80_7B1820:
/* 41EC10 802A9E80 AC30D104 */  sw        $s0, %lo(BattleMenu_ShowSwapIcons)($at)
/* 41EC14 802A9E84 080AA7A6 */  j         .L802A9E98_7B1838
/* 41EC18 802A9E88 00511023 */   subu     $v0, $v0, $s1
.L802A9E8C_7B182C:
/* 41EC1C 802A9E8C 3C01802B */  lui       $at, %hi(BattleMenu_ShowSwapIcons)
/* 41EC20 802A9E90 AC20D104 */  sw        $zero, %lo(BattleMenu_ShowSwapIcons)($at)
/* 41EC24 802A9E94 00511023 */  subu      $v0, $v0, $s1
.L802A9E98_7B1838:
/* 41EC28 802A9E98 3C01802B */  lui       $at, %hi(BattleMenu_NumOptions)
/* 41EC2C 802A9E9C AC30D0AC */  sw        $s0, %lo(BattleMenu_NumOptions)($at)
/* 41EC30 802A9EA0 3C01802B */  lui       $at, %hi(D_802AD0A8)
/* 41EC34 802A9EA4 AC20D0A8 */  sw        $zero, %lo(D_802AD0A8)($at)
.L802A9EA8_7B1848:
/* 41EC38 802A9EA8 3C01802B */  lui       $at, %hi(D_802AD0B0)
/* 41EC3C 802A9EAC AC20D0B0 */  sw        $zero, %lo(D_802AD0B0)($at)
/* 41EC40 802A9EB0 3C01802B */  lui       $at, %hi(D_802AD100)
/* 41EC44 802A9EB4 AC22D100 */  sw        $v0, %lo(D_802AD100)($at)
/* 41EC48 802A9EB8 0C0A8400 */  jal       func_802A1000_7A89A0
/* 41EC4C 802A9EBC 00000000 */   nop
/* 41EC50 802A9EC0 24020008 */  addiu     $v0, $zero, 0x8
/* 41EC54 802A9EC4 3C01802B */  lui       $at, %hi(D_802ACC60)
.L802A9EC8_7B1868:
/* 41EC58 802A9EC8 AC22CC60 */  sw        $v0, %lo(D_802ACC60)($at)
/* 41EC5C 802A9ECC 080AA80C */  j         .L802AA030_7B19D0
D_802A9ED0_7B1870:
/* 41EC60 802A9ED0 24020001 */   addiu    $v0, $zero, 0x1
glabel .L802A9ED4_7B1874
/* 41EC64 802A9ED4 0000202D */  daddu     $a0, $zero, $zero
/* 41EC68 802A9ED8 0080282D */  daddu     $a1, $a0, $zero
/* 41EC6C 802A9EDC 3C06000C */  lui       $a2, (0xC0009 >> 16)
/* 41EC70 802A9EE0 0C098F3F */  jal       set_animation
/* 41EC74 802A9EE4 34C60009 */   ori      $a2, $a2, (0xC0009 & 0xFFFF)
/* 41EC78 802A9EE8 0C0A846C */  jal       func_802A11B0_7A8B50
/* 41EC7C 802A9EEC 00000000 */   nop
D_802A9EF0_7B1890:
/* 41EC80 802A9EF0 3C11802B */  lui       $s1, %hi(D_802ACC60)
/* 41EC84 802A9EF4 2631CC60 */  addiu     $s1, $s1, %lo(D_802ACC60)
/* 41EC88 802A9EF8 8E230000 */  lw        $v1, 0x0($s1)
/* 41EC8C 802A9EFC 10600004 */  beqz      $v1, .L802A9F10_7B18B0
D_802A9F00_7B18A0:
/* 41EC90 802A9F00 0040802D */   daddu    $s0, $v0, $zero
/* 41EC94 802A9F04 2462FFFF */  addiu     $v0, $v1, -0x1
/* 41EC98 802A9F08 080AA80E */  j         .L802AA038_7B19D8
D_802A9F0C_7B18AC:
/* 41EC9C 802A9F0C AE220000 */   sw       $v0, 0x0($s1)
.L802A9F10_7B18B0:
/* 41ECA0 802A9F10 12000049 */  beqz      $s0, .L802AA038_7B19D8
/* 41ECA4 802A9F14 0000202D */   daddu    $a0, $zero, $zero
/* 41ECA8 802A9F18 0080282D */  daddu     $a1, $a0, $zero
/* 41ECAC 802A9F1C 3C06000A */  lui       $a2, (0xA0002 >> 16)
D_802A9F20_7B18C0:
/* 41ECB0 802A9F20 0C098F3F */  jal       set_animation
/* 41ECB4 802A9F24 34C60002 */   ori      $a2, $a2, (0xA0002 & 0xFFFF)
/* 41ECB8 802A9F28 2602FFFF */  addiu     $v0, $s0, -0x1
/* 41ECBC 802A9F2C 00021080 */  sll       $v0, $v0, 2
.L802A9F30_7B18D0:
/* 41ECC0 802A9F30 3C01802B */  lui       $at, %hi(D_802AD0BB)
D_802A9F34_7B18D4:
/* 41ECC4 802A9F34 00220821 */  addu      $at, $at, $v0
.L802A9F38_7B18D8:
/* 41ECC8 802A9F38 9022D0BB */  lbu       $v0, %lo(D_802AD0BB)($at)
/* 41ECCC 802A9F3C 0C0A840C */  jal       func_802A1030_7A89D0
/* 41ECD0 802A9F40 A2420048 */   sb       $v0, 0x48($s2)
/* 41ECD4 802A9F44 24020008 */  addiu     $v0, $zero, 0x8
/* 41ECD8 802A9F48 AE220000 */  sw        $v0, 0x0($s1)
/* 41ECDC 802A9F4C 24020004 */  addiu     $v0, $zero, 0x4
/* 41ECE0 802A9F50 3C01802B */  lui       $at, %hi(D_802ACC6C)
/* 41ECE4 802A9F54 AC22CC6C */  sw        $v0, %lo(D_802ACC6C)($at)
/* 41ECE8 802A9F58 080AA80C */  j         .L802AA030_7B19D0
D_802A9F5C_7B18FC:
/* 41ECEC 802A9F5C 24020002 */   addiu    $v0, $zero, 0x2
glabel .L802A9F60_7B1900
/* 41ECF0 802A9F60 0C0A846C */  jal       func_802A11B0_7A8B50
/* 41ECF4 802A9F64 00000000 */   nop
/* 41ECF8 802A9F68 10400033 */  beqz      $v0, .L802AA038_7B19D8
/* 41ECFC 802A9F6C 24040011 */   addiu    $a0, $zero, 0x11
/* 41ED00 802A9F70 24020004 */  addiu     $v0, $zero, 0x4
/* 41ED04 802A9F74 A642006C */  sh        $v0, 0x6C($s2)
/* 41ED08 802A9F78 24020005 */  addiu     $v0, $zero, 0x5
/* 41ED0C 802A9F7C A642006E */  sh        $v0, 0x6E($s2)
/* 41ED10 802A9F80 24020008 */  addiu     $v0, $zero, 0x8
.L802A9F84_7B1924:
/* 41ED14 802A9F84 A2420178 */  sb        $v0, 0x178($s2)
/* 41ED18 802A9F88 24020081 */  addiu     $v0, $zero, 0x81
glabel .L802A9F8C_7B192C
/* 41ED1C 802A9F8C A642017C */  sh        $v0, 0x17C($s2)
/* 41ED20 802A9F90 3C038009 */  lui       $v1, %hi(D_8008FA78)
/* 41ED24 802A9F94 8C63FA78 */  lw        $v1, %lo(D_8008FA78)($v1)
/* 41ED28 802A9F98 2402000A */  addiu     $v0, $zero, 0xA
/* 41ED2C 802A9F9C A642017A */  sh        $v0, 0x17A($s2)
/* 41ED30 802A9FA0 0C090464 */  jal       func_80241190
.L802A9FA4_7B1944:
/* 41ED34 802A9FA4 AE430184 */   sw       $v1, 0x184($s2)
/* 41ED38 802A9FA8 080AA80E */  j         .L802AA038_7B19D8
D_802A9FAC_7B194C:
/* 41ED3C 802A9FAC 00000000 */   nop
glabel .L802A9FB0_7B1950
/* 41ED40 802A9FB0 0C0A8414 */  jal       func_802A1050_7A89F0
/* 41ED44 802A9FB4 00000000 */   nop
/* 41ED48 802A9FB8 24020001 */  addiu     $v0, $zero, 0x1
/* 41ED4C 802A9FBC 3C01800E */  lui       $at, %hi(gBattleSubState)
/* 41ED50 802A9FC0 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
.L802A9FC4_7B1964:
/* 41ED54 802A9FC4 0C0AA6D1 */  jal       func_802A9B44_7B14E4
/* 41ED58 802A9FC8 00000000 */   nop
/* 41ED5C 802A9FCC 0C0AA6D1 */  jal       func_802A9B44_7B14E4
/* 41ED60 802A9FD0 00000000 */   nop
D_802A9FD4_7B1974:
/* 41ED64 802A9FD4 080AA80E */  j         .L802AA038_7B19D8
/* 41ED68 802A9FD8 00000000 */   nop
glabel .L802A9FDC_7B197C
/* 41ED6C 802A9FDC 0C0A842E */  jal       func_802A10B8_7A8A58
glabel .L802A9FE0_7B1980
/* 41ED70 802A9FE0 00000000 */   nop
/* 41ED74 802A9FE4 080AA80E */  j         .L802AA038_7B19D8
/* 41ED78 802A9FE8 00000000 */   nop
glabel .L802A9FEC_7B198C
/* 41ED7C 802A9FEC 24040050 */  addiu     $a0, $zero, 0x50
/* 41ED80 802A9FF0 2405003C */  addiu     $a1, $zero, 0x3C
/* 41ED84 802A9FF4 0C093E81 */  jal       func_8024FA04
.L802A9FF8_7B1998:
/* 41ED88 802A9FF8 0000302D */   daddu    $a2, $zero, $zero
/* 41ED8C 802A9FFC 24020001 */  addiu     $v0, $zero, 0x1
glabel .L802AA000_7B19A0
/* 41ED90 802AA000 3C01802B */  lui       $at, %hi(D_802AD607)
/* 41ED94 802AA004 A022D607 */  sb        $v0, %lo(D_802AD607)($at)
/* 41ED98 802AA008 080AA80C */  j         .L802AA030_7B19D0
/* 41ED9C 802AA00C 24020009 */   addiu    $v0, $zero, 0x9
glabel .L802AA010_7B19B0
/* 41EDA0 802AA010 0C093EAD */  jal       func_8024FAB4
glabel func_802AA014
/* 41EDA4 802AA014 00000000 */   nop
/* 41EDA8 802AA018 14400007 */  bnez      $v0, .L802AA038_7B19D8
/* 41EDAC 802AA01C 24020001 */   addiu    $v0, $zero, 0x1
/* 41EDB0 802AA020 3C01802B */  lui       $at, %hi(D_802AD607)
/* 41EDB4 802AA024 A020D607 */  sb        $zero, %lo(D_802AD607)($at)
D_802AA028_7B19C8:
/* 41EDB8 802AA028 3C01802B */  lui       $at, %hi(D_802ACC60)
/* 41EDBC 802AA02C AC20CC60 */  sw        $zero, %lo(D_802ACC60)($at)
.L802AA030_7B19D0:
/* 41EDC0 802AA030 3C01800E */  lui       $at, %hi(gBattleSubState)
/* 41EDC4 802AA034 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
glabel .L802AA038_7B19D8
/* 41EDC8 802AA038 8FBF001C */  lw        $ra, 0x1C($sp)
/* 41EDCC 802AA03C 8FB20018 */  lw        $s2, 0x18($sp)
D_802AA040_7B19E0:
/* 41EDD0 802AA040 8FB10014 */  lw        $s1, 0x14($sp)
/* 41EDD4 802AA044 8FB00010 */  lw        $s0, 0x10($sp)
/* 41EDD8 802AA048 D7B80030 */  ldc1      $f24, 0x30($sp)
/* 41EDDC 802AA04C D7B60028 */  ldc1      $f22, 0x28($sp)
D_802AA050_7B19F0:
/* 41EDE0 802AA050 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 41EDE4 802AA054 03E00008 */  jr        $ra
/* 41EDE8 802AA058 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void btl_state_update_peach_menu(void) {
    BattleStatus* battleStatus = &gBattleStatus;
    Actor* player = battleStatus->playerActor;
    Actor* partner = battleStatus->partnerActor;
    s32 selectedOption;
    s32 initialPos;
    s32 entryIdx;

    switch (gBattleSubState) {
        case BTL_SUBSTATE_PEACH_MENU_INIT:
            btl_cam_use_preset(BTL_CAM_DEFAULT);
            btl_cam_move(10);
            if (!(gBattleStatus.flags1 & BS_FLAGS1_PLAYER_IN_BACK)) {
                gBattleSubState = BTL_SUBSTATE_PEACH_CREATE_MAIN_MENU;
                break;
            }
            player->state.currentPos.x = player->homePos.x;
            player->state.currentPos.z = player->homePos.z;
            gBattleSubState = BTL_SUBSTATE_PEACH_MENU_PERFORM_SWAP;
            player->state.goalPos.x = partner->homePos.x;
            player->state.goalPos.z = partner->homePos.z;
            player->state.moveTime = 4;
            player->state.angle = 0.0f;
            break;
        case BTL_SUBSTATE_PEACH_MENU_PERFORM_SWAP:
            if (player->state.moveTime != 0) {
                player->currentPos.x += (player->state.goalPos.x - player->currentPos.x) / player->state.moveTime;
                player->currentPos.z += (player->state.goalPos.z - player->currentPos.z) / player->state.moveTime;
                partner->currentPos.x += (player->state.currentPos.x - partner->currentPos.x) / player->state.moveTime;
                partner->currentPos.z += (player->state.currentPos.z - partner->currentPos.z) / player->state.moveTime;
            }

            player->currentPos.z -= sin_rad(DEG_TO_RAD(player->state.angle)) * 16.0f;
            player->yaw = clamp_angle(-player->state.angle);
            partner->currentPos.z += sin_rad(DEG_TO_RAD(player->state.angle)) * 16.0f;
            partner->yaw = clamp_angle(-player->state.angle);
            player->state.angle += 90.0f;

            if (player->state.moveTime != 0) {
                player->state.moveTime--;
                break;
            }

            player->currentPos.x = player->state.goalPos.x;
            player->currentPos.z = player->state.goalPos.z;
            partner->currentPos.x = player->state.currentPos.x;
            partner->currentPos.z = player->state.currentPos.z;
            player->homePos.x = player->currentPos.x;
            player->homePos.z = player->currentPos.z;
            partner->homePos.x = partner->currentPos.x;
            partner->homePos.z = partner->currentPos.z;
            gBattleStatus.flags1 &= ~BS_FLAGS1_PLAYER_IN_BACK;
        case BTL_SUBSTATE_PEACH_CREATE_MAIN_MENU:
            gBattleStatus.flags1 |= BS_FLAGS1_MENU_OPEN;
            player->flags &= ~ACTOR_FLAG_4000000;
            player->flags |= ACTOR_FLAG_8000000;
            if (partner != NULL) {
                partner->flags |= ACTOR_FLAG_4000000;
                partner->flags |= ACTOR_FLAG_8000000;
            }

            entryIdx = 0;
            battleStatus->selectedMoveID = MOVE_NONE;
            battle_menu_submenuIDs[entryIdx] = BTL_MENU_TYPE_STAR_POWERS;
            BattleMenu_OptionEnabled[entryIdx] = TRUE;
            battle_menu_isMessageDisabled[entryIdx] = 0;
            BattleMenu_HudScripts[entryIdx] = battle_menu_PeachStarPowerHudScripts.enabled;
            BattleMenu_TitleMessages[entryIdx] = D_802AB728[entryIdx];
            if (!(battleStatus->enabledMenusFlags & BTL_MENU_ENABLED_STAR_POWERS)) {
                BattleMenu_OptionEnabled[entryIdx] = FALSE;
                battle_menu_isMessageDisabled[entryIdx] = BTL_MSG_CANT_SELECT_NOW;
                BattleMenu_HudScripts[entryIdx] = battle_menu_PeachStarPowerHudScripts.disabled;
            }

            initialPos = 0;
            entryIdx++;

            if (btl_menu_show_switch_to_twink()) {
                BattleMenu_ShowSwapIcons = TRUE;
            } else {
                BattleMenu_ShowSwapIcons = FALSE;
            }
            BattleMenu_NumOptions = entryIdx;
            D_802AD0A8 = 0;
            D_802AD0B0 = initialPos;
            D_802AD100 = 2 - initialPos;

            btl_main_menu_init();
            D_802ACC60 = 8;
            gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY;
            break;
        case BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY:
            set_animation(ACTOR_PLAYER, 0, ANIM_Peach2_Delighted);
            selectedOption = btl_main_menu_update();
            if (D_802ACC60 != 0) {
                D_802ACC60--;
                break;
            }
            if (selectedOption != 0) {
                set_animation(ACTOR_PLAYER, 0, ANIM_Peach1_Walk);
                battleStatus->currentSubmenu = battle_menu_submenuIDs[selectedOption - 1];
                func_802A1030();
                D_802ACC60 = 8;
                D_802ACC6C = 4;
                gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_TARGET;
            }
            break;
        case BTL_SUBSTATE_PEACH_MENU_CHOOSE_TARGET:
            if (btl_main_menu_update() != 0) {
                battleStatus->cancelTargetMenuSubstate = BTL_SUBSTATE_PEACH_MENU_TARGET_CANCEL;
                battleStatus->acceptTargetMenuSubstate = BTL_SUBSTATE_PEACH_MENU_TARGET_CHOSEN;
                battleStatus->currentTargetListFlags = gMoveTable[MOVE_PEACH_FOCUS].flags;
                battleStatus->moveCategory = BTL_MENU_TYPE_STAR_POWERS;
                battleStatus->selectedMoveID = MOVE_PEACH_FOCUS;
                battleStatus->moveArgument = STAR_POWER_INDEX(MOVE_PEACH_FOCUS);
                btl_set_state(BATTLE_STATE_SELECT_TARGET);
            }
            break;
        case BTL_SUBSTATE_PEACH_MENU_TARGET_CANCEL:
            func_802A1050();
            gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY;
            btl_state_update_peach_menu();
            btl_state_update_peach_menu();
            break;
        case BTL_SUBSTATE_PEACH_MENU_TARGET_CHOSEN:
            btl_main_menu_destroy();
            break;
        case BTL_SUBSTATE_PEACH_MENU_SHOW_CANT_SWITCH:
            btl_show_variable_battle_message(BTL_MSG_CANT_SWITCH, 60, 0);
            D_802AD607 = 1;
            gBattleSubState = BTL_SUBSTATE_PEACH_MENU_AWAIT_CANT_SWITCH_POPUP;
            break;
        case BTL_SUBSTATE_PEACH_MENU_AWAIT_CANT_SWITCH_POPUP:
            if (!btl_is_popup_displayed()) {
                D_802AD607 = 0;
                D_802ACC60 = 0;
                gBattleSubState = BTL_SUBSTATE_PEACH_MENU_CHOOSE_CATEGORY;
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel partner_get_out
/* 88198 800EECE8 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 8819C 800EECEC AFB00030 */  sw        $s0, 0x30($sp)
/* 881A0 800EECF0 0080802D */  daddu     $s0, $a0, $zero
/* 881A4 800EECF4 AFB10034 */  sw        $s1, 0x34($sp)
/* 881A8 800EECF8 3C118011 */  lui       $s1, %hi(gPlayerStatus)
/* 881AC 800EECFC 2631EFC8 */  addiu     $s1, $s1, %lo(gPlayerStatus)
/* 881B0 800EED00 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 881B4 800EED04 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 881B8 800EED08 3C04800B */  lui       $a0, %hi(gCameras)
/* 881BC 800EED0C 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 881C0 800EED10 AFB3003C */  sw        $s3, 0x3C($sp)
/* 881C4 800EED14 3C138011 */  lui       $s3, %hi(wPartnerFollowState)
/* 881C8 800EED18 2673CFC8 */  addiu     $s3, $s3, %lo(wPartnerFollowState)
/* 881CC 800EED1C AFBF0048 */  sw        $ra, 0x48($sp)
/* 881D0 800EED20 AFB50044 */  sw        $s5, 0x44($sp)
/* 881D4 800EED24 AFB40040 */  sw        $s4, 0x40($sp)
/* 881D8 800EED28 AFB20038 */  sw        $s2, 0x38($sp)
/* 881DC 800EED2C F7BA0068 */  sdc1      $f26, 0x68($sp)
/* 881E0 800EED30 F7B80060 */  sdc1      $f24, 0x60($sp)
/* 881E4 800EED34 F7B60058 */  sdc1      $f22, 0x58($sp)
/* 881E8 800EED38 F7B40050 */  sdc1      $f20, 0x50($sp)
/* 881EC 800EED3C 00031080 */  sll       $v0, $v1, 2
/* 881F0 800EED40 00431021 */  addu      $v0, $v0, $v1
/* 881F4 800EED44 00021080 */  sll       $v0, $v0, 2
/* 881F8 800EED48 00431023 */  subu      $v0, $v0, $v1
/* 881FC 800EED4C 000218C0 */  sll       $v1, $v0, 3
/* 88200 800EED50 00431021 */  addu      $v0, $v0, $v1
/* 88204 800EED54 000210C0 */  sll       $v0, $v0, 3
/* 88208 800EED58 00449021 */  addu      $s2, $v0, $a0
/* 8820C 800EED5C 86630000 */  lh        $v1, 0x0($s3)
/* 88210 800EED60 24020001 */  addiu     $v0, $zero, 0x1
/* 88214 800EED64 106200E6 */  beq       $v1, $v0, .L800EF100
/* 88218 800EED68 28620002 */   slti     $v0, $v1, 0x2
/* 8821C 800EED6C 10400005 */  beqz      $v0, .L800EED84
/* 88220 800EED70 24020002 */   addiu    $v0, $zero, 0x2
/* 88224 800EED74 10600007 */  beqz      $v1, .L800EED94
/* 88228 800EED78 0000102D */   daddu    $v0, $zero, $zero
/* 8822C 800EED7C 0803BCB3 */  j         .L800EF2CC
/* 88230 800EED80 00000000 */   nop
.L800EED84:
/* 88234 800EED84 10620123 */  beq       $v1, $v0, .L800EF214
/* 88238 800EED88 0000102D */   daddu    $v0, $zero, $zero
/* 8823C 800EED8C 0803BCB3 */  j         .L800EF2CC
/* 88240 800EED90 00000000 */   nop
.L800EED94:
/* 88244 800EED94 0C00A6C9 */  jal       clamp_angle
/* 88248 800EED98 C62C00A8 */   lwc1     $f12, 0xA8($s1)
/* 8824C 800EED9C 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 88250 800EEDA0 44811000 */  mtc1      $at, $f2
/* 88254 800EEDA4 00000000 */  nop
/* 88258 800EEDA8 4602003C */  c.lt.s    $f0, $f2
/* 8825C 800EEDAC 00000000 */  nop
/* 88260 800EEDB0 45000006 */  bc1f      .L800EEDCC
/* 88264 800EEDB4 00000000 */   nop
/* 88268 800EEDB8 C640006C */  lwc1      $f0, 0x6C($s2)
/* 8826C 800EEDBC 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 88270 800EEDC0 44816000 */  mtc1      $at, $f12
/* 88274 800EEDC4 0803BB78 */  j         .L800EEDE0
/* 88278 800EEDC8 460C0300 */   add.s    $f12, $f0, $f12
.L800EEDCC:
/* 8827C 800EEDCC C640006C */  lwc1      $f0, 0x6C($s2)
/* 88280 800EEDD0 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 88284 800EEDD4 44816000 */  mtc1      $at, $f12
/* 88288 800EEDD8 00000000 */  nop
/* 8828C 800EEDDC 460C0301 */  sub.s     $f12, $f0, $f12
.L800EEDE0:
/* 88290 800EEDE0 0C00A6C9 */  jal       clamp_angle
/* 88294 800EEDE4 00000000 */   nop
/* 88298 800EEDE8 E600000C */  swc1      $f0, 0xC($s0)
/* 8829C 800EEDEC C6200028 */  lwc1      $f0, 0x28($s1)
/* 882A0 800EEDF0 3C128011 */  lui       $s2, %hi(wPartner)
/* 882A4 800EEDF4 2652CFEC */  addiu     $s2, $s2, %lo(wPartner)
/* 882A8 800EEDF8 E6000060 */  swc1      $f0, 0x60($s0)
/* 882AC 800EEDFC C620002C */  lwc1      $f0, 0x2C($s1)
/* 882B0 800EEE00 8E420000 */  lw        $v0, 0x0($s2)
/* 882B4 800EEE04 E6000064 */  swc1      $f0, 0x64($s0)
/* 882B8 800EEE08 8C42000C */  lw        $v0, 0xC($v0)
/* 882BC 800EEE0C 10400003 */  beqz      $v0, .L800EEE1C
/* 882C0 800EEE10 26040060 */   addiu    $a0, $s0, 0x60
/* 882C4 800EEE14 C620002C */  lwc1      $f0, 0x2C($s1)
/* 882C8 800EEE18 E6000064 */  swc1      $f0, 0x64($s0)
.L800EEE1C:
/* 882CC 800EEE1C C6200030 */  lwc1      $f0, 0x30($s1)
/* 882D0 800EEE20 E6000068 */  swc1      $f0, 0x68($s0)
/* 882D4 800EEE24 862200B2 */  lh        $v0, 0xB2($s1)
/* 882D8 800EEE28 8E07000C */  lw        $a3, 0xC($s0)
/* 882DC 800EEE2C 44825000 */  mtc1      $v0, $f10
/* 882E0 800EEE30 00000000 */  nop
/* 882E4 800EEE34 468052A0 */  cvt.s.w   $f10, $f10
/* 882E8 800EEE38 44065000 */  mfc1      $a2, $f10
/* 882EC 800EEE3C 0C00A7E7 */  jal       add_vec2D_polar
/* 882F0 800EEE40 26050068 */   addiu    $a1, $s0, 0x68
/* 882F4 800EEE44 C6160060 */  lwc1      $f22, 0x60($s0)
/* 882F8 800EEE48 8E420000 */  lw        $v0, 0x0($s2)
/* 882FC 800EEE4C C61A0064 */  lwc1      $f26, 0x64($s0)
/* 88300 800EEE50 8C42000C */  lw        $v0, 0xC($v0)
/* 88304 800EEE54 C6140068 */  lwc1      $f20, 0x68($s0)
/* 88308 800EEE58 14400052 */  bnez      $v0, .L800EEFA4
/* 8830C 800EEE5C 27B20020 */   addiu    $s2, $sp, 0x20
/* 88310 800EEE60 0240202D */  daddu     $a0, $s2, $zero
/* 88314 800EEE64 27B30024 */  addiu     $s3, $sp, 0x24
/* 88318 800EEE68 0260282D */  daddu     $a1, $s3, $zero
/* 8831C 800EEE6C 3C158007 */  lui       $s5, %hi(gCurrentCameraID)
/* 88320 800EEE70 26B57410 */  addiu     $s5, $s5, %lo(gCurrentCameraID)
/* 88324 800EEE74 8EA30000 */  lw        $v1, 0x0($s5)
/* 88328 800EEE78 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 8832C 800EEE7C 4481C000 */  mtc1      $at, $f24
/* 88330 800EEE80 00031080 */  sll       $v0, $v1, 2
/* 88334 800EEE84 00431021 */  addu      $v0, $v0, $v1
/* 88338 800EEE88 00021080 */  sll       $v0, $v0, 2
/* 8833C 800EEE8C 00431023 */  subu      $v0, $v0, $v1
/* 88340 800EEE90 000218C0 */  sll       $v1, $v0, 3
/* 88344 800EEE94 00431021 */  addu      $v0, $v0, $v1
/* 88348 800EEE98 000210C0 */  sll       $v0, $v0, 3
/* 8834C 800EEE9C 4406C000 */  mfc1      $a2, $f24
/* 88350 800EEEA0 860300A8 */  lh        $v1, 0xA8($s0)
/* 88354 800EEEA4 3C07800B */  lui       $a3, %hi(gCameras + 0x6C)
/* 88358 800EEEA8 00E23821 */  addu      $a3, $a3, $v0
/* 8835C 800EEEAC 8CE71DEC */  lw        $a3, %lo(gCameras + 0x6C)($a3)
/* 88360 800EEEB0 44830000 */  mtc1      $v1, $f0
/* 88364 800EEEB4 00000000 */  nop
/* 88368 800EEEB8 46800020 */  cvt.s.w   $f0, $f0
/* 8836C 800EEEBC 4600D000 */  add.s     $f0, $f26, $f0
/* 88370 800EEEC0 E7B60020 */  swc1      $f22, 0x20($sp)
/* 88374 800EEEC4 E7B40024 */  swc1      $f20, 0x24($sp)
/* 88378 800EEEC8 0C00A7E7 */  jal       add_vec2D_polar
/* 8837C 800EEECC E7A00028 */   swc1     $f0, 0x28($sp)
/* 88380 800EEED0 3C040001 */  lui       $a0, (0x10000 >> 16)
/* 88384 800EEED4 0240282D */  daddu     $a1, $s2, $zero
/* 88388 800EEED8 27A2002C */  addiu     $v0, $sp, 0x2C
/* 8838C 800EEEDC 3C01447A */  lui       $at, (0x447A0000 >> 16)
/* 88390 800EEEE0 44810000 */  mtc1      $at, $f0
/* 88394 800EEEE4 27A60028 */  addiu     $a2, $sp, 0x28
/* 88398 800EEEE8 E7A0002C */  swc1      $f0, 0x2C($sp)
/* 8839C 800EEEEC AFA20010 */  sw        $v0, 0x10($sp)
/* 883A0 800EEEF0 C600000C */  lwc1      $f0, 0xC($s0)
/* 883A4 800EEEF4 0260382D */  daddu     $a3, $s3, $zero
/* 883A8 800EEEF8 E7A00014 */  swc1      $f0, 0x14($sp)
/* 883AC 800EEEFC 860200A6 */  lh        $v0, 0xA6($s0)
/* 883B0 800EEF00 3C14800B */  lui       $s4, %hi(gCameras)
/* 883B4 800EEF04 26941D80 */  addiu     $s4, $s4, %lo(gCameras)
/* 883B8 800EEF08 44820000 */  mtc1      $v0, $f0
/* 883BC 800EEF0C 00000000 */  nop
/* 883C0 800EEF10 46800020 */  cvt.s.w   $f0, $f0
/* 883C4 800EEF14 0C0371DE */  jal       npc_raycast_down_around
/* 883C8 800EEF18 E7A00018 */   swc1     $f0, 0x18($sp)
/* 883CC 800EEF1C 10400011 */  beqz      $v0, .L800EEF64
/* 883D0 800EEF20 0240202D */   daddu    $a0, $s2, $zero
/* 883D4 800EEF24 3C048011 */  lui       $a0, %hi(NpcHitQueryColliderID)
/* 883D8 800EEF28 8C84C978 */  lw        $a0, %lo(NpcHitQueryColliderID)($a0)
/* 883DC 800EEF2C 0C016F6A */  jal       get_collider_flags
/* 883E0 800EEF30 00000000 */   nop
/* 883E4 800EEF34 2442FFFE */  addiu     $v0, $v0, -0x2
/* 883E8 800EEF38 2C420002 */  sltiu     $v0, $v0, 0x2
/* 883EC 800EEF3C 14400009 */  bnez      $v0, .L800EEF64
/* 883F0 800EEF40 0240202D */   daddu    $a0, $s2, $zero
/* 883F4 800EEF44 C7A2002C */  lwc1      $f2, 0x2C($sp)
/* 883F8 800EEF48 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
/* 883FC 800EEF4C 44810000 */  mtc1      $at, $f0
/* 88400 800EEF50 00000000 */  nop
/* 88404 800EEF54 4602003C */  c.lt.s    $f0, $f2
/* 88408 800EEF58 00000000 */  nop
/* 8840C 800EEF5C 45000011 */  bc1f      .L800EEFA4
/* 88410 800EEF60 00000000 */   nop
.L800EEF64:
/* 88414 800EEF64 C6360028 */  lwc1      $f22, 0x28($s1)
/* 88418 800EEF68 C63A002C */  lwc1      $f26, 0x2C($s1)
/* 8841C 800EEF6C 8EA20000 */  lw        $v0, 0x0($s5)
/* 88420 800EEF70 4406C000 */  mfc1      $a2, $f24
/* 88424 800EEF74 00021880 */  sll       $v1, $v0, 2
/* 88428 800EEF78 00621821 */  addu      $v1, $v1, $v0
/* 8842C 800EEF7C 00031880 */  sll       $v1, $v1, 2
/* 88430 800EEF80 00621823 */  subu      $v1, $v1, $v0
/* 88434 800EEF84 000310C0 */  sll       $v0, $v1, 3
/* 88438 800EEF88 00621821 */  addu      $v1, $v1, $v0
/* 8843C 800EEF8C 000318C0 */  sll       $v1, $v1, 3
/* 88440 800EEF90 00741821 */  addu      $v1, $v1, $s4
/* 88444 800EEF94 8C67006C */  lw        $a3, 0x6C($v1)
/* 88448 800EEF98 C6340030 */  lwc1      $f20, 0x30($s1)
/* 8844C 800EEF9C 0C00A7E7 */  jal       add_vec2D_polar
/* 88450 800EEFA0 0260282D */   daddu    $a1, $s3, $zero
.L800EEFA4:
/* 88454 800EEFA4 C62C0028 */  lwc1      $f12, 0x28($s1)
/* 88458 800EEFA8 4406B000 */  mfc1      $a2, $f22
/* 8845C 800EEFAC 4407A000 */  mfc1      $a3, $f20
/* 88460 800EEFB0 3C013F99 */  lui       $at, (0x3F99999A >> 16)
/* 88464 800EEFB4 3421999A */  ori       $at, $at, (0x3F99999A & 0xFFFF)
/* 88468 800EEFB8 44812000 */  mtc1      $at, $f4
/* 8846C 800EEFBC E60C0038 */  swc1      $f12, 0x38($s0)
/* 88470 800EEFC0 962200B0 */  lhu       $v0, 0xB0($s1)
/* 88474 800EEFC4 C622002C */  lwc1      $f2, 0x2C($s1)
/* 88478 800EEFC8 00021400 */  sll       $v0, $v0, 16
/* 8847C 800EEFCC 00021C03 */  sra       $v1, $v0, 16
/* 88480 800EEFD0 000217C2 */  srl       $v0, $v0, 31
/* 88484 800EEFD4 00621821 */  addu      $v1, $v1, $v0
/* 88488 800EEFD8 00031843 */  sra       $v1, $v1, 1
/* 8848C 800EEFDC 44830000 */  mtc1      $v1, $f0
/* 88490 800EEFE0 00000000 */  nop
/* 88494 800EEFE4 46800020 */  cvt.s.w   $f0, $f0
/* 88498 800EEFE8 46001080 */  add.s     $f2, $f2, $f0
/* 8849C 800EEFEC 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 884A0 800EEFF0 44810000 */  mtc1      $at, $f0
/* 884A4 800EEFF4 E602003C */  swc1      $f2, 0x3C($s0)
/* 884A8 800EEFF8 C62E0030 */  lwc1      $f14, 0x30($s1)
/* 884AC 800EEFFC E7AC0020 */  swc1      $f12, 0x20($sp)
/* 884B0 800EF000 E7A20028 */  swc1      $f2, 0x28($sp)
/* 884B4 800EF004 E6000018 */  swc1      $f0, 0x18($s0)
/* 884B8 800EF008 E6040014 */  swc1      $f4, 0x14($s0)
/* 884BC 800EF00C E60E0040 */  swc1      $f14, 0x40($s0)
/* 884C0 800EF010 0C00A7B5 */  jal       dist2D
/* 884C4 800EF014 E7AE0024 */   swc1     $f14, 0x24($sp)
/* 884C8 800EF018 C7AC0020 */  lwc1      $f12, 0x20($sp)
/* 884CC 800EF01C C7AE0024 */  lwc1      $f14, 0x24($sp)
/* 884D0 800EF020 4406B000 */  mfc1      $a2, $f22
/* 884D4 800EF024 4407A000 */  mfc1      $a3, $f20
/* 884D8 800EF028 0C00A720 */  jal       atan2
/* 884DC 800EF02C E6000010 */   swc1     $f0, 0x10($s0)
/* 884E0 800EF030 C6020010 */  lwc1      $f2, 0x10($s0)
/* 884E4 800EF034 C6040018 */  lwc1      $f4, 0x18($s0)
/* 884E8 800EF038 E600000C */  swc1      $f0, 0xC($s0)
/* 884EC 800EF03C 46041083 */  div.s     $f2, $f2, $f4
/* 884F0 800EF040 4600128D */  trunc.w.s $f10, $f2
/* 884F4 800EF044 44025000 */  mfc1      $v0, $f10
/* 884F8 800EF048 00000000 */  nop
/* 884FC 800EF04C A602008E */  sh        $v0, 0x8E($s0)
/* 88500 800EF050 00021400 */  sll       $v0, $v0, 16
/* 88504 800EF054 00021403 */  sra       $v0, $v0, 16
/* 88508 800EF058 2842000A */  slti      $v0, $v0, 0xA
/* 8850C 800EF05C 10400007 */  beqz      $v0, .L800EF07C
/* 88510 800EF060 2402000A */   addiu    $v0, $zero, 0xA
/* 88514 800EF064 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 88518 800EF068 44810000 */  mtc1      $at, $f0
/* 8851C 800EF06C C6020010 */  lwc1      $f2, 0x10($s0)
/* 88520 800EF070 A602008E */  sh        $v0, 0x8E($s0)
/* 88524 800EF074 46001083 */  div.s     $f2, $f2, $f0
/* 88528 800EF078 E6020018 */  swc1      $f2, 0x18($s0)
.L800EF07C:
/* 8852C 800EF07C 8602008E */  lh        $v0, 0x8E($s0)
/* 88530 800EF080 C6000014 */  lwc1      $f0, 0x14($s0)
/* 88534 800EF084 44822000 */  mtc1      $v0, $f4
/* 88538 800EF088 00000000 */  nop
/* 8853C 800EF08C 46802120 */  cvt.s.w   $f4, $f4
/* 88540 800EF090 46040002 */  mul.s     $f0, $f0, $f4
/* 88544 800EF094 00000000 */  nop
/* 88548 800EF098 46040002 */  mul.s     $f0, $f0, $f4
/* 8854C 800EF09C 00000000 */  nop
/* 88550 800EF0A0 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 88554 800EF0A4 44811000 */  mtc1      $at, $f2
/* 88558 800EF0A8 00000000 */  nop
/* 8855C 800EF0AC 46020002 */  mul.s     $f0, $f0, $f2
/* 88560 800EF0B0 00000000 */  nop
/* 88564 800EF0B4 C7A20028 */  lwc1      $f2, 0x28($sp)
/* 88568 800EF0B8 3C038011 */  lui       $v1, %hi(wCurrentPartnerId)
/* 8856C 800EF0BC 8C63CFD8 */  lw        $v1, %lo(wCurrentPartnerId)($v1)
/* 88570 800EF0C0 4602D081 */  sub.s     $f2, $f26, $f2
/* 88574 800EF0C4 000310C0 */  sll       $v0, $v1, 3
/* 88578 800EF0C8 46001000 */  add.s     $f0, $f2, $f0
/* 8857C 800EF0CC 00431021 */  addu      $v0, $v0, $v1
/* 88580 800EF0D0 00021080 */  sll       $v0, $v0, 2
/* 88584 800EF0D4 46040003 */  div.s     $f0, $f0, $f4
/* 88588 800EF0D8 E600001C */  swc1      $f0, 0x1C($s0)
/* 8858C 800EF0DC 3C038010 */  lui       $v1, %hi(gPartnerAnimations + 0x8)
/* 88590 800EF0E0 00621821 */  addu      $v1, $v1, $v0
/* 88594 800EF0E4 8C638350 */  lw        $v1, %lo(gPartnerAnimations + 0x8)($v1)
/* 88598 800EF0E8 24020001 */  addiu     $v0, $zero, 0x1
/* 8859C 800EF0EC 3C018011 */  lui       $at, %hi(wPartnerFollowState)
/* 885A0 800EF0F0 A422CFC8 */  sh        $v0, %lo(wPartnerFollowState)($at)
/* 885A4 800EF0F4 E7A20028 */  swc1      $f2, 0x28($sp)
/* 885A8 800EF0F8 0803BCB2 */  j         .L800EF2C8
/* 885AC 800EF0FC AE030028 */   sw       $v1, 0x28($s0)
.L800EF100:
/* 885B0 800EF100 C602001C */  lwc1      $f2, 0x1C($s0)
/* 885B4 800EF104 44800000 */  mtc1      $zero, $f0
/* 885B8 800EF108 00000000 */  nop
/* 885BC 800EF10C 4600103C */  c.lt.s    $f2, $f0
/* 885C0 800EF110 00000000 */  nop
/* 885C4 800EF114 45000009 */  bc1f      .L800EF13C
/* 885C8 800EF118 00000000 */   nop
/* 885CC 800EF11C 46001085 */  abs.s     $f2, $f2
/* 885D0 800EF120 44051000 */  mfc1      $a1, $f2
/* 885D4 800EF124 0C00E5FA */  jal       npc_try_snap_to_ground
/* 885D8 800EF128 0200202D */   daddu    $a0, $s0, $zero
/* 885DC 800EF12C 10400003 */  beqz      $v0, .L800EF13C
/* 885E0 800EF130 24020002 */   addiu    $v0, $zero, 0x2
/* 885E4 800EF134 0803BCB2 */  j         .L800EF2C8
/* 885E8 800EF138 A6620000 */   sh       $v0, 0x0($s3)
.L800EF13C:
/* 885EC 800EF13C C600001C */  lwc1      $f0, 0x1C($s0)
/* 885F0 800EF140 C6020014 */  lwc1      $f2, 0x14($s0)
/* 885F4 800EF144 46020001 */  sub.s     $f0, $f0, $f2
/* 885F8 800EF148 C602003C */  lwc1      $f2, 0x3C($s0)
/* 885FC 800EF14C E600001C */  swc1      $f0, 0x1C($s0)
/* 88600 800EF150 46000106 */  mov.s     $f4, $f0
/* 88604 800EF154 46001080 */  add.s     $f2, $f2, $f0
/* 88608 800EF158 44800000 */  mtc1      $zero, $f0
/* 8860C 800EF15C 00000000 */  nop
/* 88610 800EF160 4600203E */  c.le.s    $f4, $f0
/* 88614 800EF164 00000000 */  nop
/* 88618 800EF168 4500000A */  bc1f      .L800EF194
/* 8861C 800EF16C E602003C */   swc1     $f2, 0x3C($s0)
/* 88620 800EF170 3C028011 */  lui       $v0, %hi(wCurrentPartnerId)
/* 88624 800EF174 8C42CFD8 */  lw        $v0, %lo(wCurrentPartnerId)($v0)
/* 88628 800EF178 000218C0 */  sll       $v1, $v0, 3
/* 8862C 800EF17C 00621821 */  addu      $v1, $v1, $v0
/* 88630 800EF180 00031880 */  sll       $v1, $v1, 2
/* 88634 800EF184 3C028010 */  lui       $v0, %hi(gPartnerAnimations + 0xC)
/* 88638 800EF188 00431021 */  addu      $v0, $v0, $v1
/* 8863C 800EF18C 8C428354 */  lw        $v0, %lo(gPartnerAnimations + 0xC)($v0)
/* 88640 800EF190 AE020028 */  sw        $v0, 0x28($s0)
.L800EF194:
/* 88644 800EF194 8E050018 */  lw        $a1, 0x18($s0)
/* 88648 800EF198 8E06000C */  lw        $a2, 0xC($s0)
/* 8864C 800EF19C 0C00EA95 */  jal       npc_move_heading
/* 88650 800EF1A0 0200202D */   daddu    $a0, $s0, $zero
/* 88654 800EF1A4 0C00E2BF */  jal       npc_do_world_collision
/* 88658 800EF1A8 0200202D */   daddu    $a0, $s0, $zero
/* 8865C 800EF1AC 8602008E */  lh        $v0, 0x8E($s0)
/* 88660 800EF1B0 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 88664 800EF1B4 44811000 */  mtc1      $at, $f2
/* 88668 800EF1B8 44820000 */  mtc1      $v0, $f0
/* 8866C 800EF1BC 00000000 */  nop
/* 88670 800EF1C0 46800020 */  cvt.s.w   $f0, $f0
/* 88674 800EF1C4 4600103C */  c.lt.s    $f2, $f0
/* 88678 800EF1C8 00000000 */  nop
/* 8867C 800EF1CC 45030001 */  bc1tl     .L800EF1D4
/* 88680 800EF1D0 46001006 */   mov.s    $f0, $f2
.L800EF1D4:
/* 88684 800EF1D4 9602008E */  lhu       $v0, 0x8E($s0)
/* 88688 800EF1D8 46001001 */  sub.s     $f0, $f2, $f0
/* 8868C 800EF1DC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 88690 800EF1E0 A602008E */  sh        $v0, 0x8E($s0)
/* 88694 800EF1E4 00021400 */  sll       $v0, $v0, 16
/* 88698 800EF1E8 46020003 */  div.s     $f0, $f0, $f2
/* 8869C 800EF1EC E6000054 */  swc1      $f0, 0x54($s0)
/* 886A0 800EF1F0 46000086 */  mov.s     $f2, $f0
/* 886A4 800EF1F4 E6000058 */  swc1      $f0, 0x58($s0)
/* 886A8 800EF1F8 04410033 */  bgez      $v0, .L800EF2C8
/* 886AC 800EF1FC E602005C */   swc1     $f2, 0x5C($s0)
/* 886B0 800EF200 24020002 */  addiu     $v0, $zero, 0x2
/* 886B4 800EF204 3C018011 */  lui       $at, %hi(wPartnerFollowState)
/* 886B8 800EF208 A422CFC8 */  sh        $v0, %lo(wPartnerFollowState)($at)
/* 886BC 800EF20C 0803BCB3 */  j         .L800EF2CC
/* 886C0 800EF210 0000102D */   daddu    $v0, $zero, $zero
.L800EF214:
/* 886C4 800EF214 C6000064 */  lwc1      $f0, 0x64($s0)
/* 886C8 800EF218 C6060038 */  lwc1      $f6, 0x38($s0)
/* 886CC 800EF21C C6020040 */  lwc1      $f2, 0x40($s0)
/* 886D0 800EF220 E600003C */  swc1      $f0, 0x3C($s0)
/* 886D4 800EF224 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 886D8 800EF228 44810000 */  mtc1      $at, $f0
/* 886DC 800EF22C C608003C */  lwc1      $f8, 0x3C($s0)
/* 886E0 800EF230 3C128011 */  lui       $s2, %hi(wPartner)
/* 886E4 800EF234 2652CFEC */  addiu     $s2, $s2, %lo(wPartner)
/* 886E8 800EF238 AE00001C */  sw        $zero, 0x1C($s0)
/* 886EC 800EF23C E6060060 */  swc1      $f6, 0x60($s0)
/* 886F0 800EF240 E6020068 */  swc1      $f2, 0x68($s0)
/* 886F4 800EF244 E6000054 */  swc1      $f0, 0x54($s0)
/* 886F8 800EF248 E6000058 */  swc1      $f0, 0x58($s0)
/* 886FC 800EF24C E600005C */  swc1      $f0, 0x5C($s0)
/* 88700 800EF250 E6080064 */  swc1      $f8, 0x64($s0)
/* 88704 800EF254 C620002C */  lwc1      $f0, 0x2C($s1)
/* 88708 800EF258 8E420000 */  lw        $v0, 0x0($s2)
/* 8870C 800EF25C E600003C */  swc1      $f0, 0x3C($s0)
/* 88710 800EF260 8C42000C */  lw        $v0, 0xC($v0)
/* 88714 800EF264 10400003 */  beqz      $v0, .L800EF274
/* 88718 800EF268 46003106 */   mov.s    $f4, $f6
/* 8871C 800EF26C C620002C */  lwc1      $f0, 0x2C($s1)
/* 88720 800EF270 E600003C */  swc1      $f0, 0x3C($s0)
.L800EF274:
/* 88724 800EF274 C6000040 */  lwc1      $f0, 0x40($s0)
/* 88728 800EF278 0C03BD17 */  jal       partner_clear_player_tracking
/* 8872C 800EF27C 0200202D */   daddu    $a0, $s0, $zero
/* 88730 800EF280 C6000060 */  lwc1      $f0, 0x60($s0)
/* 88734 800EF284 C6020064 */  lwc1      $f2, 0x64($s0)
/* 88738 800EF288 8E020000 */  lw        $v0, 0x0($s0)
/* 8873C 800EF28C C6040068 */  lwc1      $f4, 0x68($s0)
/* 88740 800EF290 30421000 */  andi      $v0, $v0, 0x1000
/* 88744 800EF294 E6000038 */  swc1      $f0, 0x38($s0)
/* 88748 800EF298 E602003C */  swc1      $f2, 0x3C($s0)
/* 8874C 800EF29C 10400008 */  beqz      $v0, .L800EF2C0
/* 88750 800EF2A0 E6040040 */   swc1     $f4, 0x40($s0)
/* 88754 800EF2A4 8E420000 */  lw        $v0, 0x0($s2)
/* 88758 800EF2A8 8C42000C */  lw        $v0, 0xC($v0)
/* 8875C 800EF2AC 14400007 */  bnez      $v0, .L800EF2CC
/* 88760 800EF2B0 24020001 */   addiu    $v0, $zero, 0x1
/* 88764 800EF2B4 0200202D */  daddu     $a0, $s0, $zero
/* 88768 800EF2B8 0C00F598 */  jal       spawn_surface_effects
/* 8876C 800EF2BC 24050002 */   addiu    $a1, $zero, 0x2
.L800EF2C0:
/* 88770 800EF2C0 0803BCB3 */  j         .L800EF2CC
/* 88774 800EF2C4 24020001 */   addiu    $v0, $zero, 0x1
.L800EF2C8:
/* 88778 800EF2C8 0000102D */  daddu     $v0, $zero, $zero
.L800EF2CC:
/* 8877C 800EF2CC 8FBF0048 */  lw        $ra, 0x48($sp)
/* 88780 800EF2D0 8FB50044 */  lw        $s5, 0x44($sp)
/* 88784 800EF2D4 8FB40040 */  lw        $s4, 0x40($sp)
/* 88788 800EF2D8 8FB3003C */  lw        $s3, 0x3C($sp)
/* 8878C 800EF2DC 8FB20038 */  lw        $s2, 0x38($sp)
/* 88790 800EF2E0 8FB10034 */  lw        $s1, 0x34($sp)
/* 88794 800EF2E4 8FB00030 */  lw        $s0, 0x30($sp)
/* 88798 800EF2E8 D7BA0068 */  ldc1      $f26, 0x68($sp)
/* 8879C 800EF2EC D7B80060 */  ldc1      $f24, 0x60($sp)
/* 887A0 800EF2F0 D7B60058 */  ldc1      $f22, 0x58($sp)
/* 887A4 800EF2F4 D7B40050 */  ldc1      $f20, 0x50($sp)
/* 887A8 800EF2F8 03E00008 */  jr        $ra
/* 887AC 800EF2FC 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

s32 partner_get_out(Npc* partner) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    Camera* camera = &gCameras[gCurrentCameraID];
    f32 x, y, z, hitDepth;
    f32 var_f0;

    f32 moveToX, moveToY, moveToZ;

    switch (wPartnerFollowState) {
        case 0:
            if (clamp_angle(playerStatus->spriteFacingAngle) < 180.0f) {
                partner->yaw = clamp_angle(camera->currentYaw + 90.0f);
            } else {
                partner->yaw = clamp_angle(camera->currentYaw - 90.0f);
            }
            partner->moveToPos.x = playerStatus->position.x;
            partner->moveToPos.y = playerStatus->position.y;
            if (wPartner->isFlying) {
                partner->moveToPos.y = playerStatus->position.y;
            }
            partner->moveToPos.z = playerStatus->position.z;
            add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, playerStatus->colliderDiameter, partner->yaw);
            moveToX = partner->moveToPos.x;
            moveToY = partner->moveToPos.y;
            moveToZ = partner->moveToPos.z;
            if (!wPartner->isFlying) {
                x = moveToX;
                y = moveToY + partner->collisionHeight;
                z = moveToZ;
                add_vec2D_polar(&x, &z, 2.0f, gCameras[gCurrentCameraID].currentYaw);
                hitDepth = 1000.0f;
                if (npc_raycast_down_around(COLLISION_CHANNEL_10000, &x, &y, &z, &hitDepth, partner->yaw, partner->collisionDiameter)) {
                    // @bug? collider flags not properly masked with COLLIDER_FLAG_SURFACE_TYPE
                    s32 surfaceType = get_collider_flags(NpcHitQueryColliderID);

                    if ((surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) || (hitDepth > 100.0f)) {
                        moveToX = playerStatus->position.x;
                        moveToY = playerStatus->position.y;
                        moveToZ = playerStatus->position.z;
                        add_vec2D_polar(&x, &z, 2.0f, gCameras[gCurrentCameraID].currentYaw);
                    }
                } else {
                    moveToX = playerStatus->position.x;
                    moveToY = playerStatus->position.y;
                    moveToZ = playerStatus->position.z;
                    add_vec2D_polar(&x, &z, 2.0f, gCameras[gCurrentCameraID].currentYaw);
                }
            }

            x = partner->pos.x = playerStatus->position.x;
            y = partner->pos.y = playerStatus->position.y + (playerStatus->colliderHeight / 2);
            z = partner->pos.z = playerStatus->position.z;

            partner->moveSpeed = 4.0f;
            partner->jumpScale = 1.2f;
            partner->planarFlyDist = dist2D(x, z, moveToX, moveToZ);
            partner->yaw = atan2(x, z, moveToX, moveToZ);
            partner->duration = partner->planarFlyDist / partner->moveSpeed;
            if (partner->duration < 10) {
                partner->duration = 10;
                partner->moveSpeed = partner->planarFlyDist / partner->duration;
            }
            partner->jumpVelocity = (moveToY - y + (partner->jumpScale * partner->duration * partner->duration * 0.5f)) /
                                    partner->duration;
            wPartnerFollowState = 1;
            y = moveToY - y;
            partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].jump;
            break;
        case 1:
            if (partner->jumpVelocity < 0.0f && npc_try_snap_to_ground(partner, fabsf(partner->jumpVelocity))) {
                wPartnerFollowState = 2;
                break;
            }
            partner->jumpVelocity -= partner->jumpScale;
            partner->pos.y += partner->jumpVelocity;
            if (partner->jumpVelocity <= 0.0f) {
                partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
            }
            npc_move_heading(partner, partner->moveSpeed, partner->yaw);
            npc_do_world_collision(partner);
            var_f0 = partner->duration;
            if (var_f0 > 10.0f) {
                var_f0 = 10.0f;
            }

            partner->scale.x = (10.0f - var_f0) / 10.0f;
            partner->scale.y = partner->scale.x;
            partner->scale.z = partner->scale.x;

            partner->duration--;
            if (partner->duration < 0) {
                wPartnerFollowState = 2;
            }
            break;
        case 2:
            partner->pos.y = partner->moveToPos.y;
            partner->jumpVelocity = 0.0f;
            partner->scale.x = 1.0f;
            partner->scale.y = 1.0f;
            partner->scale.z = 1.0f;
            partner->moveToPos.x = partner->pos.x;
            partner->moveToPos.y = partner->pos.y;
            partner->moveToPos.z = partner->pos.z;
            partner->pos.x = partner->pos.x;
            partner->pos.y = playerStatus->position.y;
            if (wPartner->isFlying) {
                partner->pos.y = playerStatus->position.y;
            }
            partner->pos.z = partner->pos.z;
            partner_clear_player_tracking(partner);
            partner->pos.x = partner->moveToPos.x;
            partner->pos.y = partner->moveToPos.y;
            partner->pos.z = partner->moveToPos.z;
            if (partner->flags & NPC_FLAG_GROUNDED) {
                if (!wPartner->isFlying) {
                    spawn_surface_effects(partner, SURFACE_INTERACT_LAND);
                }
            }
            return TRUE;
    }
    return FALSE;
}