### RAW ASSEMBLY INSTRUCTIONS:

glabel partner_move_to_goal
/* 88CDC 800EF82C 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 88CE0 800EF830 AFB20038 */  sw        $s2, 0x38($sp)
/* 88CE4 800EF834 0080902D */  daddu     $s2, $a0, $zero
/* 88CE8 800EF838 AFB40040 */  sw        $s4, 0x40($sp)
/* 88CEC 800EF83C 00A0A02D */  daddu     $s4, $a1, $zero
/* 88CF0 800EF840 AFB3003C */  sw        $s3, 0x3C($sp)
/* 88CF4 800EF844 3C138011 */  lui       $s3, %hi(gPlayerStatus)
/* 88CF8 800EF848 2673EFC8 */  addiu     $s3, $s3, %lo(gPlayerStatus)
/* 88CFC 800EF84C 3C058011 */  lui       $a1, %hi(D_8010CFCE)
/* 88D00 800EF850 24A5CFCE */  addiu     $a1, $a1, %lo(D_8010CFCE)
/* 88D04 800EF854 24020001 */  addiu     $v0, $zero, 0x1
/* 88D08 800EF858 AFBF0044 */  sw        $ra, 0x44($sp)
/* 88D0C 800EF85C AFB10034 */  sw        $s1, 0x34($sp)
/* 88D10 800EF860 AFB00030 */  sw        $s0, 0x30($sp)
/* 88D14 800EF864 84A30000 */  lh        $v1, 0x0($a1)
/* 88D18 800EF868 94A40000 */  lhu       $a0, 0x0($a1)
/* 88D1C 800EF86C 10620044 */  beq       $v1, $v0, .L800EF980
/* 88D20 800EF870 28620002 */   slti     $v0, $v1, 0x2
/* 88D24 800EF874 10400118 */  beqz      $v0, .L800EFCD8
/* 88D28 800EF878 00000000 */   nop
/* 88D2C 800EF87C 14600116 */  bnez      $v1, .L800EFCD8
/* 88D30 800EF880 24820001 */   addiu    $v0, $a0, 0x1
/* 88D34 800EF884 C662002C */  lwc1      $f2, 0x2C($s3)
/* 88D38 800EF888 3C018010 */  lui       $at, %hi(wPartnerMoveGoalX)
/* 88D3C 800EF88C C4208024 */  lwc1      $f0, %lo(wPartnerMoveGoalX)($at)
/* 88D40 800EF890 46800020 */  cvt.s.w   $f0, $f0
/* 88D44 800EF894 E6400060 */  swc1      $f0, 0x60($s2)
/* 88D48 800EF898 44060000 */  mfc1      $a2, $f0
/* 88D4C 800EF89C 3C018010 */  lui       $at, %hi(wPartnerMoveGoalZ)
/* 88D50 800EF8A0 C4208028 */  lwc1      $f0, %lo(wPartnerMoveGoalZ)($at)
/* 88D54 800EF8A4 46800020 */  cvt.s.w   $f0, $f0
/* 88D58 800EF8A8 26500060 */  addiu     $s0, $s2, 0x60
/* 88D5C 800EF8AC C64C0038 */  lwc1      $f12, 0x38($s2)
/* 88D60 800EF8B0 C64E0040 */  lwc1      $f14, 0x40($s2)
/* 88D64 800EF8B4 44070000 */  mfc1      $a3, $f0
/* 88D68 800EF8B8 26510068 */  addiu     $s1, $s2, 0x68
/* 88D6C 800EF8BC A4A20000 */  sh        $v0, 0x0($a1)
/* 88D70 800EF8C0 AE470068 */  sw        $a3, 0x68($s2)
/* 88D74 800EF8C4 0C00A720 */  jal       atan2
/* 88D78 800EF8C8 E6420064 */   swc1     $f2, 0x64($s2)
/* 88D7C 800EF8CC 0200202D */  daddu     $a0, $s0, $zero
/* 88D80 800EF8D0 3C0640A0 */  lui       $a2, (0x40A00000 >> 16)
/* 88D84 800EF8D4 44070000 */  mfc1      $a3, $f0
/* 88D88 800EF8D8 0220282D */  daddu     $a1, $s1, $zero
/* 88D8C 800EF8DC 3C018010 */  lui       $at, %hi(D_800F8034)
/* 88D90 800EF8E0 AC278034 */  sw        $a3, %lo(D_800F8034)($at)
/* 88D94 800EF8E4 0C00A7E7 */  jal       add_vec2D_polar
/* 88D98 800EF8E8 AE47000C */   sw       $a3, 0xC($s2)
/* 88D9C 800EF8EC 3C108010 */  lui       $s0, %hi(wPartnerMoveTime)
/* 88DA0 800EF8F0 2610802C */  addiu     $s0, $s0, %lo(wPartnerMoveTime)
/* 88DA4 800EF8F4 C64C0038 */  lwc1      $f12, 0x38($s2)
/* 88DA8 800EF8F8 C64E0040 */  lwc1      $f14, 0x40($s2)
/* 88DAC 800EF8FC 8E460060 */  lw        $a2, 0x60($s2)
/* 88DB0 800EF900 8E470068 */  lw        $a3, 0x68($s2)
/* 88DB4 800EF904 24020012 */  addiu     $v0, $zero, 0x12
/* 88DB8 800EF908 0C00A7B5 */  jal       dist2D
/* 88DBC 800EF90C AE020000 */   sw       $v0, 0x0($s0)
/* 88DC0 800EF910 E7A0002C */  swc1      $f0, 0x2C($sp)
/* 88DC4 800EF914 C6020000 */  lwc1      $f2, 0x0($s0)
/* 88DC8 800EF918 468010A0 */  cvt.s.w   $f2, $f2
/* 88DCC 800EF91C 46020003 */  div.s     $f0, $f0, $f2
/* 88DD0 800EF920 3C018010 */  lui       $at, %hi(wPartnerMoveSpeed)
/* 88DD4 800EF924 E4208030 */  swc1      $f0, %lo(wPartnerMoveSpeed)($at)
/* 88DD8 800EF928 E6400018 */  swc1      $f0, 0x18($s2)
/* 88DDC 800EF92C 46000021 */  cvt.d.s   $f0, $f0
/* 88DE0 800EF930 26440028 */  addiu     $a0, $s2, 0x28
/* 88DE4 800EF934 3C038011 */  lui       $v1, %hi(wCurrentPartnerId)
/* 88DE8 800EF938 8C63CFD8 */  lw        $v1, %lo(wCurrentPartnerId)($v1)
/* 88DEC 800EF93C 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 88DF0 800EF940 44811800 */  mtc1      $at, $f3
/* 88DF4 800EF944 44801000 */  mtc1      $zero, $f2
/* 88DF8 800EF948 000310C0 */  sll       $v0, $v1, 3
/* 88DFC 800EF94C 00431021 */  addu      $v0, $v0, $v1
/* 88E00 800EF950 4620103E */  c.le.d    $f2, $f0
/* 88E04 800EF954 00000000 */  nop
/* 88E08 800EF958 45000003 */  bc1f      .L800EF968
/* 88E0C 800EF95C 00021080 */   sll      $v0, $v0, 2
/* 88E10 800EF960 0803BE5B */  j         .L800EF96C
/* 88E14 800EF964 24430018 */   addiu    $v1, $v0, 0x18
.L800EF968:
/* 88E18 800EF968 24430004 */  addiu     $v1, $v0, 0x4
.L800EF96C:
/* 88E1C 800EF96C 3C028010 */  lui       $v0, %hi(gPartnerAnimations)
/* 88E20 800EF970 24428348 */  addiu     $v0, $v0, %lo(gPartnerAnimations)
/* 88E24 800EF974 00431021 */  addu      $v0, $v0, $v1
/* 88E28 800EF978 8C420000 */  lw        $v0, 0x0($v0)
/* 88E2C 800EF97C AC820000 */  sw        $v0, 0x0($a0)
.L800EF980:
/* 88E30 800EF980 3C038010 */  lui       $v1, %hi(wPartnerMoveTime)
/* 88E34 800EF984 2463802C */  addiu     $v1, $v1, %lo(wPartnerMoveTime)
/* 88E38 800EF988 8C620000 */  lw        $v0, 0x0($v1)
/* 88E3C 800EF98C 104000C0 */  beqz      $v0, .L800EFC90
/* 88E40 800EF990 2442FFFF */   addiu    $v0, $v0, -0x1
/* 88E44 800EF994 16800092 */  bnez      $s4, .L800EFBE0
/* 88E48 800EF998 AC620000 */   sw       $v0, 0x0($v1)
/* 88E4C 800EF99C 8E420000 */  lw        $v0, 0x0($s2)
/* 88E50 800EF9A0 30421000 */  andi      $v0, $v0, 0x1000
/* 88E54 800EF9A4 14400003 */  bnez      $v0, .L800EF9B4
/* 88E58 800EF9A8 00000000 */   nop
/* 88E5C 800EF9AC C660002C */  lwc1      $f0, 0x2C($s3)
/* 88E60 800EF9B0 E640003C */  swc1      $f0, 0x3C($s2)
.L800EF9B4:
/* 88E64 800EF9B4 C642001C */  lwc1      $f2, 0x1C($s2)
/* 88E68 800EF9B8 44802000 */  mtc1      $zero, $f4
/* 88E6C 800EF9BC 00000000 */  nop
/* 88E70 800EF9C0 46041032 */  c.eq.s    $f2, $f4
/* 88E74 800EF9C4 00000000 */  nop
/* 88E78 800EF9C8 45010060 */  bc1t      .L800EFB4C
/* 88E7C 800EF9CC 00000000 */   nop
/* 88E80 800EF9D0 C6400014 */  lwc1      $f0, 0x14($s2)
/* 88E84 800EF9D4 46001001 */  sub.s     $f0, $f2, $f0
/* 88E88 800EF9D8 C642003C */  lwc1      $f2, 0x3C($s2)
/* 88E8C 800EF9DC 46001080 */  add.s     $f2, $f2, $f0
/* 88E90 800EF9E0 E640001C */  swc1      $f0, 0x1C($s2)
/* 88E94 800EF9E4 4604003E */  c.le.s    $f0, $f4
/* 88E98 800EF9E8 00000000 */  nop
/* 88E9C 800EF9EC 4500000A */  bc1f      .L800EFA18
/* 88EA0 800EF9F0 E642003C */   swc1     $f2, 0x3C($s2)
/* 88EA4 800EF9F4 3C028011 */  lui       $v0, %hi(wCurrentPartnerId)
/* 88EA8 800EF9F8 8C42CFD8 */  lw        $v0, %lo(wCurrentPartnerId)($v0)
/* 88EAC 800EF9FC 000218C0 */  sll       $v1, $v0, 3
/* 88EB0 800EFA00 00621821 */  addu      $v1, $v1, $v0
/* 88EB4 800EFA04 00031880 */  sll       $v1, $v1, 2
/* 88EB8 800EFA08 3C028010 */  lui       $v0, %hi(gPartnerAnimations + 0xC)
/* 88EBC 800EFA0C 00431021 */  addu      $v0, $v0, $v1
/* 88EC0 800EFA10 8C428354 */  lw        $v0, %lo(gPartnerAnimations + 0xC)($v0)
/* 88EC4 800EFA14 AE420028 */  sw        $v0, 0x28($s2)
.L800EFA18:
/* 88EC8 800EFA18 C642001C */  lwc1      $f2, 0x1C($s2)
/* 88ECC 800EFA1C 4604103E */  c.le.s    $f2, $f4
/* 88ED0 800EFA20 00000000 */  nop
/* 88ED4 800EFA24 45000049 */  bc1f      .L800EFB4C
/* 88ED8 800EFA28 27A50020 */   addiu    $a1, $sp, 0x20
/* 88EDC 800EFA2C C6400038 */  lwc1      $f0, 0x38($s2)
/* 88EE0 800EFA30 46001085 */  abs.s     $f2, $f2
/* 88EE4 800EFA34 E7A00020 */  swc1      $f0, 0x20($sp)
/* 88EE8 800EFA38 864200A8 */  lh        $v0, 0xA8($s2)
/* 88EEC 800EFA3C C6440040 */  lwc1      $f4, 0x40($s2)
/* 88EF0 800EFA40 0040182D */  daddu     $v1, $v0, $zero
/* 88EF4 800EFA44 44820000 */  mtc1      $v0, $f0
/* 88EF8 800EFA48 00000000 */  nop
/* 88EFC 800EFA4C 46800020 */  cvt.s.w   $f0, $f0
/* 88F00 800EFA50 44833000 */  mtc1      $v1, $f6
/* 88F04 800EFA54 00000000 */  nop
/* 88F08 800EFA58 468031A0 */  cvt.s.w   $f6, $f6
/* 88F0C 800EFA5C 46001080 */  add.s     $f2, $f2, $f0
/* 88F10 800EFA60 C640003C */  lwc1      $f0, 0x3C($s2)
/* 88F14 800EFA64 27A2002C */  addiu     $v0, $sp, 0x2C
/* 88F18 800EFA68 46060000 */  add.s     $f0, $f0, $f6
/* 88F1C 800EFA6C E7A40028 */  swc1      $f4, 0x28($sp)
/* 88F20 800EFA70 E7A2002C */  swc1      $f2, 0x2C($sp)
/* 88F24 800EFA74 E7A00024 */  swc1      $f0, 0x24($sp)
/* 88F28 800EFA78 AFA20010 */  sw        $v0, 0x10($sp)
/* 88F2C 800EFA7C C640000C */  lwc1      $f0, 0xC($s2)
/* 88F30 800EFA80 E7A00014 */  swc1      $f0, 0x14($sp)
/* 88F34 800EFA84 864200A6 */  lh        $v0, 0xA6($s2)
/* 88F38 800EFA88 27A60024 */  addiu     $a2, $sp, 0x24
/* 88F3C 800EFA8C 44820000 */  mtc1      $v0, $f0
/* 88F40 800EFA90 00000000 */  nop
/* 88F44 800EFA94 46800020 */  cvt.s.w   $f0, $f0
/* 88F48 800EFA98 E7A00018 */  swc1      $f0, 0x18($sp)
/* 88F4C 800EFA9C 8E440080 */  lw        $a0, 0x80($s2)
/* 88F50 800EFAA0 0C0371DE */  jal       npc_raycast_down_around
/* 88F54 800EFAA4 27A70028 */   addiu    $a3, $sp, 0x28
/* 88F58 800EFAA8 10400028 */  beqz      $v0, .L800EFB4C
/* 88F5C 800EFAAC 00000000 */   nop
/* 88F60 800EFAB0 C640001C */  lwc1      $f0, 0x1C($s2)
/* 88F64 800EFAB4 3C0141B0 */  lui       $at, (0x41B00000 >> 16)
/* 88F68 800EFAB8 44811000 */  mtc1      $at, $f2
/* 88F6C 800EFABC 46000005 */  abs.s     $f0, $f0
/* 88F70 800EFAC0 46020000 */  add.s     $f0, $f0, $f2
/* 88F74 800EFAC4 C7A2002C */  lwc1      $f2, 0x2C($sp)
/* 88F78 800EFAC8 4600103E */  c.le.s    $f2, $f0
/* 88F7C 800EFACC 00000000 */  nop
/* 88F80 800EFAD0 4500001E */  bc1f      .L800EFB4C
/* 88F84 800EFAD4 26440028 */   addiu    $a0, $s2, 0x28
/* 88F88 800EFAD8 C6400018 */  lwc1      $f0, 0x18($s2)
/* 88F8C 800EFADC 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 88F90 800EFAE0 44811800 */  mtc1      $at, $f3
/* 88F94 800EFAE4 44801000 */  mtc1      $zero, $f2
/* 88F98 800EFAE8 3C038011 */  lui       $v1, %hi(wCurrentPartnerId)
/* 88F9C 800EFAEC 8C63CFD8 */  lw        $v1, %lo(wCurrentPartnerId)($v1)
/* 88FA0 800EFAF0 46000021 */  cvt.d.s   $f0, $f0
/* 88FA4 800EFAF4 000310C0 */  sll       $v0, $v1, 3
/* 88FA8 800EFAF8 00431021 */  addu      $v0, $v0, $v1
/* 88FAC 800EFAFC 4620103E */  c.le.d    $f2, $f0
/* 88FB0 800EFB00 00000000 */  nop
/* 88FB4 800EFB04 45000003 */  bc1f      .L800EFB14
/* 88FB8 800EFB08 00021080 */   sll      $v0, $v0, 2
/* 88FBC 800EFB0C 0803BEC6 */  j         .L800EFB18
/* 88FC0 800EFB10 24430018 */   addiu    $v1, $v0, 0x18
.L800EFB14:
/* 88FC4 800EFB14 24430004 */  addiu     $v1, $v0, 0x4
.L800EFB18:
/* 88FC8 800EFB18 3C028010 */  lui       $v0, %hi(gPartnerAnimations)
/* 88FCC 800EFB1C 24428348 */  addiu     $v0, $v0, %lo(gPartnerAnimations)
/* 88FD0 800EFB20 00431021 */  addu      $v0, $v0, $v1
/* 88FD4 800EFB24 8C420000 */  lw        $v0, 0x0($v0)
/* 88FD8 800EFB28 C7A00024 */  lwc1      $f0, 0x24($sp)
/* 88FDC 800EFB2C AC820000 */  sw        $v0, 0x0($a0)
/* 88FE0 800EFB30 8E420000 */  lw        $v0, 0x0($s2)
/* 88FE4 800EFB34 2403F7FF */  addiu     $v1, $zero, -0x801
/* 88FE8 800EFB38 AE400014 */  sw        $zero, 0x14($s2)
/* 88FEC 800EFB3C AE40001C */  sw        $zero, 0x1C($s2)
/* 88FF0 800EFB40 E640003C */  swc1      $f0, 0x3C($s2)
/* 88FF4 800EFB44 00431024 */  and       $v0, $v0, $v1
/* 88FF8 800EFB48 AE420000 */  sw        $v0, 0x0($s2)
.L800EFB4C:
/* 88FFC 800EFB4C 3C018010 */  lui       $at, %hi(wPartnerMoveSpeed)
/* 89000 800EFB50 C4208030 */  lwc1      $f0, %lo(wPartnerMoveSpeed)($at)
/* 89004 800EFB54 E6400018 */  swc1      $f0, 0x18($s2)
/* 89008 800EFB58 3C018010 */  lui       $at, %hi(D_800F8034)
/* 8900C 800EFB5C C4208034 */  lwc1      $f0, %lo(D_800F8034)($at)
/* 89010 800EFB60 8E450018 */  lw        $a1, 0x18($s2)
/* 89014 800EFB64 44060000 */  mfc1      $a2, $f0
/* 89018 800EFB68 0240202D */  daddu     $a0, $s2, $zero
/* 8901C 800EFB6C 0C00EA95 */  jal       npc_move_heading
/* 89020 800EFB70 AE46000C */   sw       $a2, 0xC($s2)
/* 89024 800EFB74 26450028 */  addiu     $a1, $s2, 0x28
/* 89028 800EFB78 C6400018 */  lwc1      $f0, 0x18($s2)
/* 8902C 800EFB7C 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 89030 800EFB80 44811800 */  mtc1      $at, $f3
/* 89034 800EFB84 44801000 */  mtc1      $zero, $f2
/* 89038 800EFB88 3C038011 */  lui       $v1, %hi(wCurrentPartnerId)
/* 8903C 800EFB8C 8C63CFD8 */  lw        $v1, %lo(wCurrentPartnerId)($v1)
/* 89040 800EFB90 46000021 */  cvt.d.s   $f0, $f0
/* 89044 800EFB94 000310C0 */  sll       $v0, $v1, 3
/* 89048 800EFB98 00431021 */  addu      $v0, $v0, $v1
/* 8904C 800EFB9C 00021080 */  sll       $v0, $v0, 2
/* 89050 800EFBA0 4620103E */  c.le.d    $f2, $f0
/* 89054 800EFBA4 00000000 */  nop
/* 89058 800EFBA8 45000003 */  bc1f      .L800EFBB8
/* 8905C 800EFBAC 0040182D */   daddu    $v1, $v0, $zero
/* 89060 800EFBB0 0803BEEF */  j         .L800EFBBC
/* 89064 800EFBB4 24430018 */   addiu    $v1, $v0, 0x18
.L800EFBB8:
/* 89068 800EFBB8 24630004 */  addiu     $v1, $v1, 0x4
.L800EFBBC:
/* 8906C 800EFBBC 3C028010 */  lui       $v0, %hi(gPartnerAnimations)
/* 89070 800EFBC0 24428348 */  addiu     $v0, $v0, %lo(gPartnerAnimations)
/* 89074 800EFBC4 00431021 */  addu      $v0, $v0, $v1
/* 89078 800EFBC8 8C420000 */  lw        $v0, 0x0($v0)
/* 8907C 800EFBCC 0240202D */  daddu     $a0, $s2, $zero
/* 89080 800EFBD0 0C00E2BF */  jal       npc_do_world_collision
/* 89084 800EFBD4 ACA20000 */   sw       $v0, 0x0($a1)
/* 89088 800EFBD8 0803BF17 */  j         .L800EFC5C
/* 8908C 800EFBDC 24050001 */   addiu    $a1, $zero, 0x1
.L800EFBE0:
/* 89090 800EFBE0 C644003C */  lwc1      $f4, 0x3C($s2)
/* 89094 800EFBE4 C666002C */  lwc1      $f6, 0x2C($s3)
/* 89098 800EFBE8 46062001 */  sub.s     $f0, $f4, $f6
/* 8909C 800EFBEC 3C014014 */  lui       $at, (0x40140000 >> 16)
/* 890A0 800EFBF0 44811800 */  mtc1      $at, $f3
/* 890A4 800EFBF4 44801000 */  mtc1      $zero, $f2
/* 890A8 800EFBF8 46000021 */  cvt.d.s   $f0, $f0
/* 890AC 800EFBFC 46200005 */  abs.d     $f0, $f0
/* 890B0 800EFC00 4620103C */  c.lt.d    $f2, $f0
/* 890B4 800EFC04 00000000 */  nop
/* 890B8 800EFC08 45000009 */  bc1f      .L800EFC30
/* 890BC 800EFC0C 00000000 */   nop
/* 890C0 800EFC10 46043001 */  sub.s     $f0, $f6, $f4
/* 890C4 800EFC14 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 890C8 800EFC18 44811000 */  mtc1      $at, $f2
/* 890CC 800EFC1C 00000000 */  nop
/* 890D0 800EFC20 46020002 */  mul.s     $f0, $f0, $f2
/* 890D4 800EFC24 00000000 */  nop
/* 890D8 800EFC28 46002000 */  add.s     $f0, $f4, $f0
/* 890DC 800EFC2C E640003C */  swc1      $f0, 0x3C($s2)
.L800EFC30:
/* 890E0 800EFC30 3C018010 */  lui       $at, %hi(wPartnerMoveSpeed)
/* 890E4 800EFC34 C4208030 */  lwc1      $f0, %lo(wPartnerMoveSpeed)($at)
/* 890E8 800EFC38 E6400018 */  swc1      $f0, 0x18($s2)
/* 890EC 800EFC3C 3C018010 */  lui       $at, %hi(D_800F8034)
/* 890F0 800EFC40 C4208034 */  lwc1      $f0, %lo(D_800F8034)($at)
/* 890F4 800EFC44 8E450018 */  lw        $a1, 0x18($s2)
/* 890F8 800EFC48 44060000 */  mfc1      $a2, $f0
/* 890FC 800EFC4C 0240202D */  daddu     $a0, $s2, $zero
/* 89100 800EFC50 0C00EA95 */  jal       npc_move_heading
/* 89104 800EFC54 AE46000C */   sw       $a2, 0xC($s2)
/* 89108 800EFC58 24050001 */  addiu     $a1, $zero, 0x1
.L800EFC5C:
/* 8910C 800EFC5C C6400018 */  lwc1      $f0, 0x18($s2)
/* 89110 800EFC60 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 89114 800EFC64 44811800 */  mtc1      $at, $f3
/* 89118 800EFC68 44801000 */  mtc1      $zero, $f2
/* 8911C 800EFC6C 46000021 */  cvt.d.s   $f0, $f0
/* 89120 800EFC70 4622003C */  c.lt.d    $f0, $f2
/* 89124 800EFC74 00000000 */  nop
/* 89128 800EFC78 45030001 */  bc1tl     .L800EFC80
/* 8912C 800EFC7C 0000282D */   daddu    $a1, $zero, $zero
.L800EFC80:
/* 89130 800EFC80 0C00F598 */  jal       spawn_surface_effects
/* 89134 800EFC84 0240202D */   daddu    $a0, $s2, $zero
/* 89138 800EFC88 0803BF36 */  j         .L800EFCD8
/* 8913C 800EFC8C 00000000 */   nop
.L800EFC90:
/* 89140 800EFC90 2403FFBF */  addiu     $v1, $zero, -0x41
/* 89144 800EFC94 8E420000 */  lw        $v0, 0x0($s2)
/* 89148 800EFC98 3C048011 */  lui       $a0, %hi(wCurrentPartnerId)
/* 8914C 800EFC9C 8C84CFD8 */  lw        $a0, %lo(wCurrentPartnerId)($a0)
/* 89150 800EFCA0 00431024 */  and       $v0, $v0, $v1
/* 89154 800EFCA4 000418C0 */  sll       $v1, $a0, 3
/* 89158 800EFCA8 00641821 */  addu      $v1, $v1, $a0
/* 8915C 800EFCAC 00031880 */  sll       $v1, $v1, 2
/* 89160 800EFCB0 3C048011 */  lui       $a0, %hi(D_8010CFCE)
/* 89164 800EFCB4 2484CFCE */  addiu     $a0, $a0, %lo(D_8010CFCE)
/* 89168 800EFCB8 AE420000 */  sw        $v0, 0x0($s2)
/* 8916C 800EFCBC 94820000 */  lhu       $v0, 0x0($a0)
/* 89170 800EFCC0 3C018010 */  lui       $at, %hi(gPartnerAnimations + 0x14)
/* 89174 800EFCC4 00230821 */  addu      $at, $at, $v1
/* 89178 800EFCC8 8C23835C */  lw        $v1, %lo(gPartnerAnimations + 0x14)($at)
/* 8917C 800EFCCC 24420001 */  addiu     $v0, $v0, 0x1
/* 89180 800EFCD0 A4820000 */  sh        $v0, 0x0($a0)
/* 89184 800EFCD4 AE430028 */  sw        $v1, 0x28($s2)
.L800EFCD8:
/* 89188 800EFCD8 8FBF0044 */  lw        $ra, 0x44($sp)
/* 8918C 800EFCDC 8FB40040 */  lw        $s4, 0x40($sp)
/* 89190 800EFCE0 8FB3003C */  lw        $s3, 0x3C($sp)
/* 89194 800EFCE4 8FB20038 */  lw        $s2, 0x38($sp)
/* 89198 800EFCE8 8FB10034 */  lw        $s1, 0x34($sp)
/* 8919C 800EFCEC 8FB00030 */  lw        $s0, 0x30($sp)
/* 891A0 800EFCF0 03E00008 */  jr        $ra
/* 891A4 800EFCF4 27BD0048 */   addiu    $sp, $sp, 0x48
/* 891A8 800EFCF8 00000000 */  nop
/* 891AC 800EFCFC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void partner_move_to_goal(Npc* partner, s32 isFlying) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 x, y, z, temp;
    s32 var_a1;

    switch (D_8010CFCE) {
        case 0:
            D_8010CFCE++;
            partner->moveToPos.y = playerStatus->position.y;
            partner->moveToPos.x = wPartnerMoveGoalX;
            partner->moveToPos.z = wPartnerMoveGoalZ;
            D_800F8034 = atan2(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
            partner->yaw = D_800F8034;
            add_vec2D_polar(&partner->moveToPos.x, &partner->moveToPos.z, 5.0f, D_800F8034);
            wPartnerMoveTime = 18;
            temp = dist2D(partner->pos.x, partner->pos.z, partner->moveToPos.x, partner->moveToPos.z);
            partner->moveSpeed = wPartnerMoveSpeed = temp / wPartnerMoveTime;
            partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[
                (partner->moveSpeed >= 4.0) ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK];
        case 1:
            if (wPartnerMoveTime != 0) {
                wPartnerMoveTime--;
                if (!isFlying) {
                    if (!(partner->flags & NPC_FLAG_GROUNDED)) {
                        partner->pos.y = playerStatus->position.y;
                    }
                    if (partner->jumpVelocity != 0.0f) {
                        partner->jumpVelocity -= partner->jumpScale;
                        partner->pos.y += partner->jumpVelocity;
                        if (partner->jumpVelocity <= 0.0f) {
                            partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].fall;
                        }

                        if (partner->jumpVelocity <= 0.0f) {
                            temp = fabsf(partner->jumpVelocity) + partner->collisionHeight;
                            y = partner->pos.y + partner->collisionHeight;
                            x = partner->pos.x;
                            z = partner->pos.z;

                            if (npc_raycast_down_around(partner->collisionChannel, &x, &y, &z, &temp,
                                                       partner->yaw, partner->collisionDiameter) &&
                                (temp <= fabsf(partner->jumpVelocity) + 22.0f))
                            {
                                partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[
                                    (partner->moveSpeed >= 4.0) ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK];
                                partner->jumpScale = 0.0f;
                                partner->jumpVelocity = 0.0f;
                                partner->pos.y = y;
                                partner->flags &= ~NPC_FLAG_JUMPING;
                            }
                        }
                    }
                    partner->moveSpeed = wPartnerMoveSpeed;
                    partner->yaw = D_800F8034;
                    npc_move_heading(partner, partner->moveSpeed, partner->yaw);
                    partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].anims[
                        (partner->moveSpeed >= 4.0) ? PARTNER_ANIM_INDEX_RUN : PARTNER_ANIM_INDEX_WALK];
                    npc_do_world_collision(partner);
                } else {
                    if (fabs(partner->pos.y - playerStatus->position.y) > 5.0) {
                        partner->pos.y += (playerStatus->position.y - partner->pos.y) * 0.5f;
                    }
                    partner->moveSpeed = wPartnerMoveSpeed;
                    partner->yaw = D_800F8034;
                    npc_move_heading(partner, partner->moveSpeed, partner->yaw);
                }

                spawn_surface_effects(partner, (partner->moveSpeed < 4.0) ? SURFACE_INTERACT_WALK : SURFACE_INTERACT_RUN);
            } else {
                partner->flags &= ~NPC_FLAG_IGNORE_WORLD_COLLISION;
                partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
                D_8010CFCE++;
            }
            break;
        case 2:
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_802456F8
/* 173FD8 802456F8 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 173FDC 802456FC AFB20018 */  sw        $s2, 0x18($sp)
/* 173FE0 80245700 3C12800E */  lui       $s2, %hi(gBattleStatus)
/* 173FE4 80245704 2652C070 */  addiu     $s2, $s2, %lo(gBattleStatus)
/* 173FE8 80245708 AFBF0020 */  sw        $ra, 0x20($sp)
/* 173FEC 8024570C AFB3001C */  sw        $s3, 0x1C($sp)
/* 173FF0 80245710 AFB10014 */  sw        $s1, 0x14($sp)
.L80245714:
/* 173FF4 80245714 AFB00010 */  sw        $s0, 0x10($sp)
D_80245718:
/* 173FF8 80245718 8E5000D8 */  lw        $s0, 0xD8($s2)
/* 173FFC 8024571C 8E5100DC */  lw        $s1, 0xDC($s2)
D_80245720:
/* 174000 80245720 3C03800E */  lui       $v1, %hi(gBattleSubState)
/* 174004 80245724 8C63C4DC */  lw        $v1, %lo(gBattleSubState)($v1)
jtbl_80245728:
/* 174008 80245728 2C620008 */  sltiu     $v0, $v1, 0x8
.L8024572C:
/* 17400C 8024572C 104000DF */  beqz      $v0, .L80245AAC
/* 174010 80245730 2613000C */   addiu    $s3, $s0, 0xC
.L80245734:
/* 174014 80245734 00031080 */  sll       $v0, $v1, 2
D_80245738:
/* 174018 80245738 3C01802A */  lui       $at, %hi(jtbl_8029CAD0)
/* 17401C 8024573C 00220821 */  addu      $at, $at, $v0
/* 174020 80245740 8C22CAD0 */  lw        $v0, %lo(jtbl_8029CAD0)($at)
glabel func_80245744
/* 174024 80245744 00400008 */  jr        $v0
.L80245748:
/* 174028 80245748 00000000 */   nop
glabel .L8024574C
/* 17402C 8024574C 3C03F7FF */  lui       $v1, (0xF7FFFFFF >> 16)
D_80245750:
/* 174030 80245750 8E020000 */  lw        $v0, 0x0($s0)
/* 174034 80245754 3463FFFF */  ori       $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 174038 80245758 00431024 */  and       $v0, $v0, $v1
D_8024575C:
/* 17403C 8024575C AE020000 */  sw        $v0, 0x0($s0)
/* 174040 80245760 8E220000 */  lw        $v0, 0x0($s1)
/* 174044 80245764 3C10800E */  lui       $s0, %hi(gBattleStatus)
glabel func_80245768
/* 174048 80245768 2610C070 */  addiu     $s0, $s0, %lo(gBattleStatus)
/* 17404C 8024576C 00431024 */  and       $v0, $v0, $v1
.L80245770:
/* 174050 80245770 AE220000 */  sw        $v0, 0x0($s1)
D_80245774:
/* 174054 80245774 8E020004 */  lw        $v0, 0x4($s0)
/* 174058 80245778 24040013 */  addiu     $a0, $zero, 0x13
/* 17405C 8024577C A240008C */  sb        $zero, 0x8C($s2)
/* 174060 80245780 34420010 */  ori       $v0, $v0, 0x10
D_80245784:
/* 174064 80245784 0C093903 */  jal       func_8024E40C
/* 174068 80245788 AE020004 */   sw       $v0, 0x4($s0)
/* 17406C 8024578C 3C06C2C6 */  lui       $a2, (0xC2C60000 >> 16)
/* 174070 80245790 3C01C2B2 */  lui       $at, (0xC2B20000 >> 16)
glabel func_80245794
/* 174074 80245794 44816000 */  mtc1      $at, $f12
/* 174078 80245798 3C014220 */  lui       $at, (0x42200000 >> 16)
/* 17407C 8024579C 44817000 */  mtc1      $at, $f14
.L802457A0:
/* 174080 802457A0 0C093948 */  jal       func_8024E520
/* 174084 802457A4 00000000 */   nop
D_802457A8:
/* 174088 802457A8 0C093965 */  jal       func_8024E594
.L802457AC:
/* 17408C 802457AC 24040174 */   addiu    $a0, $zero, 0x174
D_802457B0:
/* 174090 802457B0 0C093978 */  jal       func_8024E5E0
/* 174094 802457B4 0000202D */   daddu    $a0, $zero, $zero
glabel func_802457B8
/* 174098 802457B8 0000282D */  daddu     $a1, $zero, $zero
/* 17409C 802457BC 3C07FFF7 */  lui       $a3, (0xFFF7FFFF >> 16)
glabel func_802457C0
/* 1740A0 802457C0 34E7FFFF */  ori       $a3, $a3, (0xFFF7FFFF & 0xFFFF)
/* 1740A4 802457C4 3C06F7FF */  lui       $a2, (0xF7FFFFFF >> 16)
D_802457C8:
/* 1740A8 802457C8 34C6FFFF */  ori       $a2, $a2, (0xF7FFFFFF & 0xFFFF)
/* 1740AC 802457CC 0240202D */  daddu     $a0, $s2, $zero
/* 1740B0 802457D0 8E020000 */  lw        $v0, 0x0($s0)
D_802457D4:
/* 1740B4 802457D4 2403FFFD */  addiu     $v1, $zero, -0x3
D_802457D8:
/* 1740B8 802457D8 00431024 */  and       $v0, $v0, $v1
/* 1740BC 802457DC AE020000 */  sw        $v0, 0x0($s0)
D_802457E0:
/* 1740C0 802457E0 8C8300E0 */  lw        $v1, 0xE0($a0)
.L802457E4:
/* 1740C4 802457E4 10600005 */  beqz      $v1, .L802457FC
.L802457E8:
/* 1740C8 802457E8 24A50001 */   addiu    $a1, $a1, 0x1
/* 1740CC 802457EC 8C620000 */  lw        $v0, 0x0($v1)
/* 1740D0 802457F0 00471024 */  and       $v0, $v0, $a3
D_802457F4:
/* 1740D4 802457F4 00461024 */  and       $v0, $v0, $a2
/* 1740D8 802457F8 AC620000 */  sw        $v0, 0x0($v1)
.L802457FC:
/* 1740DC 802457FC 28A20018 */  slti      $v0, $a1, 0x18
D_80245800:
/* 1740E0 80245800 1440FFF7 */  bnez      $v0, D_802457E0
/* 1740E4 80245804 24840004 */   addiu    $a0, $a0, 0x4
glabel func_80245808
/* 1740E8 80245808 2402FFFF */  addiu     $v0, $zero, -0x1
/* 1740EC 8024580C A242005C */  sb        $v0, 0x5C($s2)
/* 1740F0 80245810 2402000A */  addiu     $v0, $zero, 0xA
D_80245814:
/* 1740F4 80245814 3C01802A */  lui       $at, %hi(D_8029F248)
/* 1740F8 80245818 AC22F248 */  sw        $v0, %lo(D_8029F248)($at)
/* 1740FC 8024581C 24020002 */  addiu     $v0, $zero, 0x2
/* 174100 80245820 3C01800E */  lui       $at, %hi(gBattleSubState)
/* 174104 80245824 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
glabel .L80245828
/* 174108 80245828 3C03802A */  lui       $v1, %hi(D_8029F248)
/* 17410C 8024582C 2463F248 */  addiu     $v1, $v1, %lo(D_8029F248)
D_80245830:
/* 174110 80245830 8C620000 */  lw        $v0, 0x0($v1)
/* 174114 80245834 10400003 */  beqz      $v0, .L80245844
D_80245838:
/* 174118 80245838 2442FFFF */   addiu    $v0, $v0, -0x1
/* 17411C 8024583C 080916AB */  j         .L80245AAC
D_80245840:
/* 174120 80245840 AC620000 */   sw       $v0, 0x0($v1)
.L80245844:
/* 174124 80245844 0C098EF2 */  jal       deduct_current_move_fp
D_80245848:
/* 174128 80245848 00000000 */   nop
/* 17412C 8024584C 3C048028 */  lui       $a0, %hi(BtlPutPartnerAway)
D_80245850:
/* 174130 80245850 24840A34 */  addiu     $a0, $a0, %lo(BtlPutPartnerAway)
/* 174134 80245854 2405000A */  addiu     $a1, $zero, 0xA
D_80245858:
/* 174138 80245858 0C0B0CF8 */  jal       start_script
/* 17413C 8024585C 0000302D */   daddu    $a2, $zero, $zero
D_80245860:
/* 174140 80245860 0040202D */  daddu     $a0, $v0, $zero
/* 174144 80245864 AE4400BC */  sw        $a0, 0xBC($s2)
D_80245868:
/* 174148 80245868 8C820144 */  lw        $v0, 0x144($a0)
.L8024586C:
/* 17414C 8024586C AE4200C0 */  sw        $v0, 0xC0($s2)
.L80245870:
/* 174150 80245870 24020100 */  addiu     $v0, $zero, 0x100
/* 174154 80245874 AC820148 */  sw        $v0, 0x148($a0)
/* 174158 80245878 C6200144 */  lwc1      $f0, 0x144($s1)
/* 17415C 8024587C AE60001C */  sw        $zero, 0x1C($s3)
/* 174160 80245880 E6600018 */  swc1      $f0, 0x18($s3)
/* 174164 80245884 C620014C */  lwc1      $f0, 0x14C($s1)
/* 174168 80245888 24020003 */  addiu     $v0, $zero, 0x3
/* 17416C 8024588C 3C01800E */  lui       $at, %hi(gBattleSubState)
/* 174170 80245890 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
/* 174174 80245894 080916AB */  j         .L80245AAC
/* 174178 80245898 E6600020 */   swc1     $f0, 0x20($s3)
glabel .L8024589C
/* 17417C 8024589C 8E4400C0 */  lw        $a0, 0xC0($s2)
/* 174180 802458A0 0C0B1059 */  jal       does_script_exist
D_802458A4:
/* 174184 802458A4 00000000 */   nop
D_802458A8:
/* 174188 802458A8 14400080 */  bnez      $v0, .L80245AAC
D_802458AC:
/* 17418C 802458AC 00000000 */   nop
jtbl_802458B0:
/* 174190 802458B0 0C0902EF */  jal       func_80240BBC
D_802458B4:
/* 174194 802458B4 0220202D */   daddu    $a0, $s1, $zero
/* 174198 802458B8 924301AC */  lbu       $v1, 0x1AC($s2)
/* 17419C 802458BC 3C028011 */  lui       $v0, %hi(gPlayerData)
jtbl_802458C0:
/* 1741A0 802458C0 2442F290 */  addiu     $v0, $v0, %lo(gPlayerData)
/* 1741A4 802458C4 0C0992DD */  jal       load_partner_actor
D_802458C8:
/* 1741A8 802458C8 A0430012 */   sb       $v1, 0x12($v0)
/* 1741AC 802458CC 8E5100DC */  lw        $s1, 0xDC($s2)
/* 1741B0 802458D0 3C013DCC */  lui       $at, (0x3DCCCCCD >> 16)
.L802458D4:
/* 1741B4 802458D4 3421CCCD */  ori       $at, $at, (0x3DCCCCCD & 0xFFFF)
.L802458D8:
/* 1741B8 802458D8 44810000 */  mtc1      $at, $f0
/* 1741BC 802458DC 00000000 */  nop
/* 1741C0 802458E0 E6200170 */  swc1      $f0, 0x170($s1)
/* 1741C4 802458E4 E6200174 */  swc1      $f0, 0x174($s1)
.L802458E8:
/* 1741C8 802458E8 E6200178 */  swc1      $f0, 0x178($s1)
/* 1741CC 802458EC C6600018 */  lwc1      $f0, 0x18($s3)
D_802458F0:
/* 1741D0 802458F0 C6220148 */  lwc1      $f2, 0x148($s1)
/* 1741D4 802458F4 E6200018 */  swc1      $f0, 0x18($s1)
/* 1741D8 802458F8 E622001C */  swc1      $f2, 0x1C($s1)
/* 1741DC 802458FC C6600020 */  lwc1      $f0, 0x20($s3)
.L80245900:
/* 1741E0 80245900 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
D_80245904:
/* 1741E4 80245904 44811000 */  mtc1      $at, $f2
/* 1741E8 80245908 E6200020 */  swc1      $f0, 0x20($s1)
/* 1741EC 8024590C C6000144 */  lwc1      $f0, 0x144($s0)
.L80245910:
/* 1741F0 80245910 E6200144 */  swc1      $f0, 0x144($s1)
D_80245914:
/* 1741F4 80245914 C6000148 */  lwc1      $f0, 0x148($s0)
D_80245918:
/* 1741F8 80245918 46020000 */  add.s     $f0, $f0, $f2
/* 1741FC 8024591C E6200148 */  swc1      $f0, 0x148($s1)
/* 174200 80245920 C600014C */  lwc1      $f0, 0x14C($s0)
.L80245924:
/* 174204 80245924 24020004 */  addiu     $v0, $zero, 0x4
D_80245928:
/* 174208 80245928 3C01800E */  lui       $at, %hi(gBattleSubState)
D_8024592C:
/* 17420C 8024592C AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
D_80245930:
/* 174210 80245930 080916AB */  j         .L80245AAC
/* 174214 80245934 E620014C */   swc1     $f0, 0x14C($s1)
glabel .L80245938
/* 174218 80245938 8E5100DC */  lw        $s1, 0xDC($s2)
/* 17421C 8024593C 12200006 */  beqz      $s1, D_80245958
/* 174220 80245940 00000000 */   nop
/* 174224 80245944 0C0B1059 */  jal       does_script_exist
D_80245948:
/* 174228 80245948 8E2401E4 */   lw       $a0, 0x1E4($s1)
.L8024594C:
/* 17422C 8024594C 14400057 */  bnez      $v0, .L80245AAC
D_80245950:
/* 174230 80245950 00000000 */   nop
D_80245954:
/* 174234 80245954 AE2001D4 */  sw        $zero, 0x1D4($s1)
D_80245958:
/* 174238 80245958 3C048028 */  lui       $a0, %hi(BtlBringPartnerOut)
/* 17423C 8024595C 24840B6C */  addiu     $a0, $a0, %lo(BtlBringPartnerOut)
D_80245960:
/* 174240 80245960 2405000A */  addiu     $a1, $zero, 0xA
/* 174244 80245964 0C0B0CF8 */  jal       start_script
D_80245968:
/* 174248 80245968 0000302D */   daddu    $a2, $zero, $zero
/* 17424C 8024596C 0040202D */  daddu     $a0, $v0, $zero
D_80245970:
/* 174250 80245970 AE4400BC */  sw        $a0, 0xBC($s2)
.L80245974:
/* 174254 80245974 8C820144 */  lw        $v0, 0x144($a0)
D_80245978:
/* 174258 80245978 24030005 */  addiu     $v1, $zero, 0x5
/* 17425C 8024597C 3C01800E */  lui       $at, %hi(gBattleSubState)
D_80245980:
/* 174260 80245980 AC23C4DC */  sw        $v1, %lo(gBattleSubState)($at)
.L80245984:
/* 174264 80245984 AE4200C0 */  sw        $v0, 0xC0($s2)
/* 174268 80245988 24020100 */  addiu     $v0, $zero, 0x100
flo_08_pad_598C:
/* 17426C 8024598C 080916AB */  j         .L80245AAC
D_80245990:
/* 174270 80245990 AC820148 */   sw       $v0, 0x148($a0)
glabel .L80245994
/* 174274 80245994 8E4400C0 */  lw        $a0, 0xC0($s2)
/* 174278 80245998 0C0B1059 */  jal       does_script_exist
/* 17427C 8024599C 00000000 */   nop
D_802459A0:
/* 174280 802459A0 14400042 */  bnez      $v0, .L80245AAC
/* 174284 802459A4 00000000 */   nop
/* 174288 802459A8 8E5100DC */  lw        $s1, 0xDC($s2)
/* 17428C 802459AC 12200010 */  beqz      $s1, .L802459F0
/* 174290 802459B0 24020006 */   addiu    $v0, $zero, 0x6
D_802459B4:
/* 174294 802459B4 8E2201CC */  lw        $v0, 0x1CC($s1)
/* 174298 802459B8 1040000C */  beqz      $v0, .L802459EC
/* 17429C 802459BC 2405000A */   addiu    $a1, $zero, 0xA
D_802459C0:
/* 1742A0 802459C0 00A0102D */  daddu     $v0, $a1, $zero
/* 1742A4 802459C4 A24201A7 */  sb        $v0, 0x1A7($s2)
/* 1742A8 802459C8 8E2401CC */  lw        $a0, 0x1CC($s1)
D_802459CC:
/* 1742AC 802459CC 0C0B0CF8 */  jal       start_script
/* 1742B0 802459D0 0000302D */   daddu    $a2, $zero, $zero
/* 1742B4 802459D4 0040202D */  daddu     $a0, $v0, $zero
.L802459D8:
/* 1742B8 802459D8 AE2401DC */  sw        $a0, 0x1DC($s1)
/* 1742BC 802459DC 8C820144 */  lw        $v0, 0x144($a0)
.L802459E0:
/* 1742C0 802459E0 AE2201EC */  sw        $v0, 0x1EC($s1)
/* 1742C4 802459E4 24020100 */  addiu     $v0, $zero, 0x100
/* 1742C8 802459E8 AC820148 */  sw        $v0, 0x148($a0)
.L802459EC:
/* 1742CC 802459EC 24020006 */  addiu     $v0, $zero, 0x6
.L802459F0:
/* 1742D0 802459F0 3C01800E */  lui       $at, %hi(gBattleSubState)
/* 1742D4 802459F4 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
/* 1742D8 802459F8 080916AB */  j         .L80245AAC
/* 1742DC 802459FC 00000000 */   nop
D_80245A00:
/* 1742E0 80245A00 8E5100DC */  lw        $s1, 0xDC($s2)
D_80245A04:
/* 1742E4 80245A04 12200008 */  beqz      $s1, .L80245A28
D_80245A08:
/* 1742E8 80245A08 00000000 */   nop
D_80245A0C:
/* 1742EC 80245A0C 8E2201CC */  lw        $v0, 0x1CC($s1)
glabel func_80245A10
/* 1742F0 80245A10 10400005 */  beqz      $v0, .L80245A28
D_80245A14:
/* 1742F4 80245A14 00000000 */   nop
/* 1742F8 80245A18 0C0B1059 */  jal       does_script_exist
.L80245A1C:
/* 1742FC 80245A1C 8E2401EC */   lw       $a0, 0x1EC($s1)
/* 174300 80245A20 14400022 */  bnez      $v0, .L80245AAC
/* 174304 80245A24 00000000 */   nop
.L80245A28:
/* 174308 80245A28 0C093903 */  jal       func_8024E40C
/* 17430C 80245A2C 24040002 */   addiu    $a0, $zero, 0x2
D_80245A30:
/* 174310 80245A30 24020007 */  addiu     $v0, $zero, 0x7
/* 174314 80245A34 3C01800E */  lui       $at, %hi(gBattleSubState)
D_80245A38:
/* 174318 80245A38 AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
/* 17431C 80245A3C 080916AB */  j         .L80245AAC
glabel func_80245A40
/* 174320 80245A40 00000000 */   nop
glabel .L80245A44
/* 174324 80245A44 8242008C */  lb        $v0, 0x8C($s2)
D_80245A48:
/* 174328 80245A48 14400018 */  bnez      $v0, .L80245AAC
/* 17432C 80245A4C 2403FFEF */   addiu    $v1, $zero, -0x11
D_80245A50:
/* 174330 80245A50 3C04800E */  lui       $a0, %hi(gBattleStatus)
/* 174334 80245A54 2484C070 */  addiu     $a0, $a0, %lo(gBattleStatus)
D_80245A58:
/* 174338 80245A58 8C820004 */  lw        $v0, 0x4($a0)
/* 17433C 80245A5C 00431024 */  and       $v0, $v0, $v1
D_80245A60:
/* 174340 80245A60 AC820004 */  sw        $v0, 0x4($a0)
/* 174344 80245A64 8C820000 */  lw        $v0, 0x0($a0)
D_80245A68:
/* 174348 80245A68 3C030008 */  lui       $v1, (0x80000 >> 16)
/* 17434C 80245A6C 00431024 */  and       $v0, $v0, $v1
D_80245A70:
/* 174350 80245A70 14400007 */  bnez      $v0, .L80245A90
/* 174354 80245A74 0200202D */   daddu    $a0, $s0, $zero
D_80245A78:
/* 174358 80245A78 0C099CAB */  jal       player_team_is_ability_active
/* 17435C 80245A7C 2405001A */   addiu    $a1, $zero, 0x1A
/* 174360 80245A80 14400008 */  bnez      $v0, .L80245AA4
D_80245A84:
/* 174364 80245A84 2404000C */   addiu    $a0, $zero, 0xC
/* 174368 80245A88 080916A9 */  j         .L80245AA4
/* 17436C 80245A8C 24040016 */   addiu    $a0, $zero, 0x16
.L80245A90:
/* 174370 80245A90 0C099CAB */  jal       player_team_is_ability_active
/* 174374 80245A94 2405001A */   addiu    $a1, $zero, 0x1A
/* 174378 80245A98 10400002 */  beqz      $v0, .L80245AA4
/* 17437C 80245A9C 24040017 */   addiu    $a0, $zero, 0x17
/* 174380 80245AA0 2404000C */  addiu     $a0, $zero, 0xC
.L80245AA4:
/* 174384 80245AA4 0C090464 */  jal       func_80241190
D_80245AA8:
/* 174388 80245AA8 00000000 */   nop
glabel .L80245AAC
/* 17438C 80245AAC 8FBF0020 */  lw        $ra, 0x20($sp)
/* 174390 80245AB0 8FB3001C */  lw        $s3, 0x1C($sp)
D_80245AB4:
/* 174394 80245AB4 8FB20018 */  lw        $s2, 0x18($sp)
D_80245AB8:
/* 174398 80245AB8 8FB10014 */  lw        $s1, 0x14($sp)
D_80245ABC:
/* 17439C 80245ABC 8FB00010 */  lw        $s0, 0x10($sp)
/* 1743A0 80245AC0 03E00008 */  jr        $ra
/* 1743A4 80245AC4 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void btl_state_update_change_partner(void) {
    BattleStatus* battleStatus = &gBattleStatus;
    Actor* player = battleStatus->playerActor;
    Actor* partner = battleStatus->partnerActor;
    ActorState* state = &player->state;
    PlayerData* playerData = &gPlayerData;
    Actor* enemyActor;
    Evt* script;
    s32 i;

    switch (gBattleSubState) {
        case BTL_SUBSTATE_CHANGE_PARTNER_INIT:
            player->flags &= ~ACTOR_FLAG_8000000;
            partner->flags &= ~ACTOR_FLAG_8000000;
            battleStatus->stateFreezeCount = 0;
            gBattleStatus.flags2 |= BS_FLAGS2_10;
            btl_cam_use_preset(BTL_CAM_PRESET_19);
            btl_cam_set_target_pos(-89.0, 40.0, -99.0);
            btl_cam_set_zoom(372);
            btl_cam_set_zoffset(0);
            gBattleStatus.flags1 &= ~BS_FLAGS1_MENU_OPEN;

            for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
                enemyActor = battleStatus->enemyActors[i];
                if (enemyActor != NULL) {
                    enemyActor->flags &= ~ACTOR_FLAG_HEALTH_BAR_HIDDEN;
                    enemyActor->flags &= ~ACTOR_FLAG_8000000;
                }
            }

            battleStatus->lastPartnerMenuSelection[BTL_MENU_IDX_MAIN] = -1;
            D_8029F248 = 10;
            gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PUT_AWAY;

        case BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PUT_AWAY:
            if (D_8029F248 != 0) {
                D_8029F248--;
                break;
            }
            deduct_current_move_fp();
            script = start_script(&BtlPutPartnerAway, EVT_PRIORITY_A, 0);
            battleStatus->controlScript = script;
            battleStatus->controlScriptID = script->id;
            script->owner1.actorID = ACTOR_PARTNER;
            state->unk_18.x = partner->currentPos.x;
            state->unk_18.y = 0.0f;
            state->unk_18.z = partner->currentPos.z;
            gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_LOAD_NEW_PARTNER;
            break;
        case BTL_SUBSTATE_CHANGE_PARTNER_LOAD_NEW_PARTNER:
            if (does_script_exist(battleStatus->controlScriptID)) {
                break;
            }
            btl_delete_actor(partner);
            playerData->currentPartner = battleStatus->unk_1AC;
            load_partner_actor();
            partner = battleStatus->partnerActor;
            partner->scale.x = 0.1f;
            partner->scale.y = 0.1f;
            partner->scale.z = 0.1f;
            partner->state.goalPos.x = state->unk_18.x;
            partner->state.goalPos.y = partner->currentPos.y;
            partner->state.goalPos.z = state->unk_18.z;
            partner->currentPos.x = player->currentPos.x;
            partner->currentPos.y = player->currentPos.y + 25.0f;
            partner->currentPos.z = player->currentPos.z;
            gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_EXEC_BRING_OUT;
            break;
        case BTL_SUBSTATE_CHANGE_PARTNER_EXEC_BRING_OUT:
            partner = battleStatus->partnerActor;
            if (partner != NULL) {
                if (does_script_exist(partner->takeTurnScriptID)) {
                    break;
                }
                partner->takeTurnScript = NULL;
            }

            script = start_script(&BtlBringPartnerOut, EVT_PRIORITY_A, 0);
            battleStatus->controlScript = script;
            battleStatus->controlScriptID = script->id;
            script->owner1.actorID = ACTOR_PARTNER;
            gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PHASE;
            break;
        case BTL_SUBSTATE_CHANGE_PARTNER_EXEC_PHASE:
            if (does_script_exist(battleStatus->controlScriptID)) {
                break;
            }
            partner = battleStatus->partnerActor;
            if (partner != NULL) {
                if (partner->handlePhaseSource != NULL) {
                    battleStatus->battlePhase = PHASE_PLAYER_BEGIN;
                    script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0);
                    partner->handlePhaseScript = script;
                    partner->handleBatttlePhaseScriptID = script->id;
                    script->owner1.actorID = ACTOR_PARTNER;
                }
            }
            gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_AWAIT_PHASE;
            break;
        case BTL_SUBSTATE_CHANGE_PARTNER_AWAIT_PHASE:
            partner = battleStatus->partnerActor;
            if (partner != NULL) {
                if (partner->handlePhaseSource != NULL && does_script_exist(partner->handleBatttlePhaseScriptID)) {
                    break;
                }
            }
            btl_cam_use_preset(BTL_CAM_DEFAULT);
            gBattleSubState = BTL_SUBSTATE_CHANGE_PARTNER_DONE;
            break;
        case BTL_SUBSTATE_CHANGE_PARTNER_DONE:
            if (battleStatus->stateFreezeCount != 0) {
                break;
            }
            gBattleStatus.flags2 &= ~BS_FLAGS2_10;
            if (!(gBattleStatus.flags1 & BS_FLAGS1_PARTNER_ACTING)) {
                if (player_team_is_ability_active(player, ABILITY_QUICK_CHANGE) != FALSE) {
                    btl_set_state(BATTLE_STATE_PREPARE_MENU);
                } else {
                    btl_set_state(BATTLE_STATE_END_PLAYER_TURN);
                }
            } else {
                if (player_team_is_ability_active(player, ABILITY_QUICK_CHANGE) == FALSE) {
                    btl_set_state(BATTLE_STATE_END_PARTNER_TURN);
                } else {
                    btl_set_state(BATTLE_STATE_PREPARE_MENU);
                }
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel confetti_appendGfx
/* 38B5D0 E00887E0 27BDFF30 */  addiu     $sp, $sp, -0xD0
/* 38B5D4 E00887E4 0080382D */  daddu     $a3, $a0, $zero
/* 38B5D8 E00887E8 3C08DB06 */  lui       $t0, (0xDB060024 >> 16)
/* 38B5DC E00887EC 35080024 */  ori       $t0, $t0, (0xDB060024 & 0xFFFF)
/* 38B5E0 E00887F0 27A40018 */  addiu     $a0, $sp, 0x18
/* 38B5E4 E00887F4 AFB200B0 */  sw        $s2, 0xB0($sp)
/* 38B5E8 E00887F8 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 38B5EC E00887FC AFB500BC */  sw        $s5, 0xBC($sp)
/* 38B5F0 E0088800 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 38B5F4 E0088804 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 38B5F8 E0088808 AFBF00CC */  sw        $ra, 0xCC($sp)
/* 38B5FC E008880C AFBE00C8 */  sw        $fp, 0xC8($sp)
/* 38B600 E0088810 AFB700C4 */  sw        $s7, 0xC4($sp)
/* 38B604 E0088814 AFB600C0 */  sw        $s6, 0xC0($sp)
/* 38B608 E0088818 AFB400B8 */  sw        $s4, 0xB8($sp)
/* 38B60C E008881C AFB300B4 */  sw        $s3, 0xB4($sp)
/* 38B610 E0088820 AFB100AC */  sw        $s1, 0xAC($sp)
/* 38B614 E0088824 AFB000A8 */  sw        $s0, 0xA8($sp)
/* 38B618 E0088828 8EA30000 */  lw        $v1, 0x0($s5)
/* 38B61C E008882C 8CF3000C */  lw        $s3, 0xC($a3)
/* 38B620 E0088830 0060302D */  daddu     $a2, $v1, $zero
/* 38B624 E0088834 24630008 */  addiu     $v1, $v1, 0x8
/* 38B628 E0088838 AEA30000 */  sw        $v1, 0x0($s5)
/* 38B62C E008883C 8E650000 */  lw        $a1, 0x0($s3)
/* 38B630 E0088840 24620008 */  addiu     $v0, $v1, 0x8
/* 38B634 E0088844 AEA20000 */  sw        $v0, 0x0($s5)
/* 38B638 E0088848 8E7E0024 */  lw        $fp, 0x24($s3)
/* 38B63C E008884C 8E69002C */  lw        $t1, 0x2C($s3)
/* 38B640 E0088850 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 38B644 E0088854 AFA9009C */  sw        $t1, 0x9C($sp)
/* 38B648 E0088858 8E690028 */  lw        $t1, 0x28($s3)
/* 38B64C E008885C 00052880 */  sll       $a1, $a1, 2
/* 38B650 E0088860 AFA90098 */  sw        $t1, 0x98($sp)
/* 38B654 E0088864 3C01E009 */  lui       $at, (0xE0090000 >> 16)
/* 38B658 E0088868 00250821 */  addu      $at, $at, $a1
/* 38B65C E008886C 8C258CC0 */  lw        $a1, -0x7340($at)
/* 38B660 E0088870 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 38B664 E0088874 AFA500A0 */  sw        $a1, 0xA0($sp)
/* 38B668 E0088878 ACC20000 */  sw        $v0, 0x0($a2)
/* 38B66C E008887C ACC00004 */  sw        $zero, 0x4($a2)
/* 38B670 E0088880 AC680000 */  sw        $t0, 0x0($v1)
/* 38B674 E0088884 8CE50010 */  lw        $a1, 0x10($a3)
/* 38B678 E0088888 24620010 */  addiu     $v0, $v1, 0x10
/* 38B67C E008888C AEA20000 */  sw        $v0, 0x0($s5)
/* 38B680 E0088890 8CA5001C */  lw        $a1, 0x1C($a1)
/* 38B684 E0088894 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 38B688 E0088898 AC620008 */  sw        $v0, 0x8($v1)
/* 38B68C E008889C 3C020900 */  lui       $v0, %hi(D_09000940_4159A0)
/* 38B690 E00888A0 24420940 */  addiu     $v0, $v0, %lo(D_09000940_4159A0)
/* 38B694 E00888A4 AC62000C */  sw        $v0, 0xC($v1)
/* 38B698 E00888A8 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 38B69C E00888AC 00A22821 */  addu      $a1, $a1, $v0
/* 38B6A0 E00888B0 AC650004 */  sw        $a1, 0x4($v1)
/* 38B6A4 E00888B4 8E650004 */  lw        $a1, 0x4($s3)
/* 38B6A8 E00888B8 8E660008 */  lw        $a2, 0x8($s3)
/* 38B6AC E00888BC 8E67000C */  lw        $a3, 0xC($s3)
/* 38B6B0 E00888C0 0C080108 */  jal       shim_guTranslateF
/* 38B6B4 E00888C4 0000A02D */   daddu    $s4, $zero, $zero
/* 38B6B8 E00888C8 27B00058 */  addiu     $s0, $sp, 0x58
/* 38B6BC E00888CC 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 38B6C0 E00888D0 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 38B6C4 E00888D4 44800000 */  mtc1      $zero, $f0
/* 38B6C8 E00888D8 00031080 */  sll       $v0, $v1, 2
/* 38B6CC E00888DC 00431021 */  addu      $v0, $v0, $v1
/* 38B6D0 E00888E0 00021080 */  sll       $v0, $v0, 2
/* 38B6D4 E00888E4 00431023 */  subu      $v0, $v0, $v1
/* 38B6D8 E00888E8 000218C0 */  sll       $v1, $v0, 3
/* 38B6DC E00888EC 00431021 */  addu      $v0, $v0, $v1
/* 38B6E0 E00888F0 000210C0 */  sll       $v0, $v0, 3
/* 38B6E4 E00888F4 44060000 */  mfc1      $a2, $f0
/* 38B6E8 E00888F8 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 38B6EC E00888FC 00220821 */  addu      $at, $at, $v0
/* 38B6F0 E0088900 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 38B6F4 E0088904 3C073F80 */  lui       $a3, (0x3F800000 >> 16)
/* 38B6F8 E0088908 46000007 */  neg.s     $f0, $f0
/* 38B6FC E008890C 44050000 */  mfc1      $a1, $f0
/* 38B700 E0088910 0200202D */  daddu     $a0, $s0, $zero
/* 38B704 E0088914 0C080104 */  jal       shim_guRotateF
/* 38B708 E0088918 AFA60010 */   sw       $a2, 0x10($sp)
/* 38B70C E008891C 0200202D */  daddu     $a0, $s0, $zero
/* 38B710 E0088920 27A50018 */  addiu     $a1, $sp, 0x18
/* 38B714 E0088924 0C080114 */  jal       shim_guMtxCatF
/* 38B718 E0088928 00A0302D */   daddu    $a2, $a1, $zero
/* 38B71C E008892C 27A40018 */  addiu     $a0, $sp, 0x18
/* 38B720 E0088930 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 38B724 E0088934 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 38B728 E0088938 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 38B72C E008893C 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 38B730 E0088940 96050000 */  lhu       $a1, 0x0($s0)
/* 38B734 E0088944 8E220000 */  lw        $v0, 0x0($s1)
/* 38B738 E0088948 00052980 */  sll       $a1, $a1, 6
/* 38B73C E008894C 00B22821 */  addu      $a1, $a1, $s2
/* 38B740 E0088950 0C080118 */  jal       shim_guMtxF2L
/* 38B744 E0088954 00452821 */   addu     $a1, $v0, $a1
/* 38B748 E0088958 3C04DA38 */  lui       $a0, (0xDA380002 >> 16)
/* 38B74C E008895C 34840002 */  ori       $a0, $a0, (0xDA380002 & 0xFFFF)
/* 38B750 E0088960 8EA30000 */  lw        $v1, 0x0($s5)
/* 38B754 E0088964 96020000 */  lhu       $v0, 0x0($s0)
/* 38B758 E0088968 0060282D */  daddu     $a1, $v1, $zero
/* 38B75C E008896C 24630008 */  addiu     $v1, $v1, 0x8
/* 38B760 E0088970 0060B02D */  daddu     $s6, $v1, $zero
/* 38B764 E0088974 24430001 */  addiu     $v1, $v0, 0x1
/* 38B768 E0088978 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 38B76C E008897C 00021180 */  sll       $v0, $v0, 6
/* 38B770 E0088980 AEB60000 */  sw        $s6, 0x0($s5)
/* 38B774 E0088984 ACA40000 */  sw        $a0, 0x0($a1)
/* 38B778 E0088988 A6030000 */  sh        $v1, 0x0($s0)
/* 38B77C E008898C 8E230000 */  lw        $v1, 0x0($s1)
/* 38B780 E0088990 00521021 */  addu      $v0, $v0, $s2
/* 38B784 E0088994 00621821 */  addu      $v1, $v1, $v0
/* 38B788 E0088998 26C20008 */  addiu     $v0, $s6, 0x8
/* 38B78C E008899C ACA30004 */  sw        $v1, 0x4($a1)
/* 38B790 E00889A0 AEA20000 */  sw        $v0, 0x0($s5)
/* 38B794 E00889A4 8FA9009C */  lw        $t1, 0x9C($sp)
/* 38B798 E00889A8 1920009B */  blez      $t1, .LE0088C18
/* 38B79C E00889AC 26730034 */   addiu    $s3, $s3, 0x34
/* 38B7A0 E00889B0 3C092AAA */  lui       $t1, (0x2AAAAAAB >> 16)
/* 38B7A4 E00889B4 3529AAAB */  ori       $t1, $t1, (0x2AAAAAAB & 0xFFFF)
/* 38B7A8 E00889B8 AFA900A4 */  sw        $t1, 0xA4($sp)
/* 38B7AC E00889BC 3C170001 */  lui       $s7, (0x11630 >> 16)
/* 38B7B0 E00889C0 36F71630 */  ori       $s7, $s7, (0x11630 & 0xFFFF)
/* 38B7B4 E00889C4 02A0882D */  daddu     $s1, $s5, $zero
/* 38B7B8 E00889C8 03C90018 */  mult      $fp, $t1
/* 38B7BC E00889CC 3C15FC11 */  lui       $s5, (0xFC11B223 >> 16)
/* 38B7C0 E00889D0 36B5B223 */  ori       $s5, $s5, (0xFC11B223 & 0xFFFF)
/* 38B7C4 E00889D4 2672000C */  addiu     $s2, $s3, 0xC
/* 38B7C8 E00889D8 001E17C3 */  sra       $v0, $fp, 31
/* 38B7CC E00889DC 00004810 */  mfhi      $t1
/* 38B7D0 E00889E0 01229823 */  subu      $s3, $t1, $v0
.LE00889E4:
/* 38B7D4 E00889E4 8FA900A4 */  lw        $t1, 0xA4($sp)
/* 38B7D8 E00889E8 02890018 */  mult      $s4, $t1
/* 38B7DC E00889EC 001417C3 */  sra       $v0, $s4, 31
/* 38B7E0 E00889F0 00004810 */  mfhi      $t1
/* 38B7E4 E00889F4 00091843 */  sra       $v1, $t1, 1
/* 38B7E8 E00889F8 00621823 */  subu      $v1, $v1, $v0
/* 38B7EC E00889FC 00031040 */  sll       $v0, $v1, 1
/* 38B7F0 E0088A00 00431021 */  addu      $v0, $v0, $v1
/* 38B7F4 E0088A04 00021080 */  sll       $v0, $v0, 2
/* 38B7F8 E0088A08 02821023 */  subu      $v0, $s4, $v0
/* 38B7FC E0088A0C 00021840 */  sll       $v1, $v0, 1
/* 38B800 E0088A10 00621821 */  addu      $v1, $v1, $v0
/* 38B804 E0088A14 3C09E009 */  lui       $t1, %hi(D_E0088CDC)
/* 38B808 E0088A18 25298CDC */  addiu     $t1, $t1, %lo(D_E0088CDC)
/* 38B80C E0088A1C 8E420024 */  lw        $v0, 0x24($s2)
/* 38B810 E0088A20 1C400078 */  bgtz      $v0, .LE0088C04
/* 38B814 E0088A24 00698021 */   addu     $s0, $v1, $t1
/* 38B818 E0088A28 8E45FFF8 */  lw        $a1, -0x8($s2)
/* 38B81C E0088A2C 8E46FFFC */  lw        $a2, -0x4($s2)
/* 38B820 E0088A30 8E470000 */  lw        $a3, 0x0($s2)
/* 38B824 E0088A34 0C080108 */  jal       shim_guTranslateF
/* 38B828 E0088A38 27A40018 */   addiu    $a0, $sp, 0x18
/* 38B82C E0088A3C 27A40018 */  addiu     $a0, $sp, 0x18
/* 38B830 E0088A40 3C058007 */  lui       $a1, %hi(gMatrixListPos)
/* 38B834 E0088A44 94A541F0 */  lhu       $a1, %lo(gMatrixListPos)($a1)
/* 38B838 E0088A48 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 38B83C E0088A4C 8C42A674 */  lw        $v0, %lo(gDisplayContext)($v0)
/* 38B840 E0088A50 00052980 */  sll       $a1, $a1, 6
/* 38B844 E0088A54 00B72821 */  addu      $a1, $a1, $s7
/* 38B848 E0088A58 0C080118 */  jal       shim_guMtxF2L
/* 38B84C E0088A5C 00452821 */   addu     $a1, $v0, $a1
/* 38B850 E0088A60 3C065555 */  lui       $a2, (0x55555556 >> 16)
/* 38B854 E0088A64 34C65556 */  ori       $a2, $a2, (0x55555556 & 0xFFFF)
/* 38B858 E0088A68 8E270000 */  lw        $a3, 0x0($s1)
/* 38B85C E0088A6C 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 38B860 E0088A70 00E0282D */  daddu     $a1, $a3, $zero
/* 38B864 E0088A74 24E70008 */  addiu     $a3, $a3, 0x8
/* 38B868 E0088A78 AE270000 */  sw        $a3, 0x0($s1)
/* 38B86C E0088A7C ACA20000 */  sw        $v0, 0x0($a1)
/* 38B870 E0088A80 92030000 */  lbu       $v1, 0x0($s0)
/* 38B874 E0088A84 92040001 */  lbu       $a0, 0x1($s0)
/* 38B878 E0088A88 92020002 */  lbu       $v0, 0x2($s0)
/* 38B87C E0088A8C 8FA90098 */  lw        $t1, 0x98($sp)
/* 38B880 E0088A90 00031E00 */  sll       $v1, $v1, 24
/* 38B884 E0088A94 00042400 */  sll       $a0, $a0, 16
/* 38B888 E0088A98 00641825 */  or        $v1, $v1, $a0
/* 38B88C E0088A9C 00021200 */  sll       $v0, $v0, 8
/* 38B890 E0088AA0 00621825 */  or        $v1, $v1, $v0
/* 38B894 E0088AA4 03D42021 */  addu      $a0, $fp, $s4
/* 38B898 E0088AA8 00860018 */  mult      $a0, $a2
/* 38B89C E0088AAC 312200FF */  andi      $v0, $t1, 0xFF
/* 38B8A0 E0088AB0 00621825 */  or        $v1, $v1, $v0
/* 38B8A4 E0088AB4 ACA30004 */  sw        $v1, 0x4($a1)
/* 38B8A8 E0088AB8 00041FC3 */  sra       $v1, $a0, 31
/* 38B8AC E0088ABC 00004810 */  mfhi      $t1
/* 38B8B0 E0088AC0 01231823 */  subu      $v1, $t1, $v1
/* 38B8B4 E0088AC4 00031040 */  sll       $v0, $v1, 1
/* 38B8B8 E0088AC8 00431021 */  addu      $v0, $v0, $v1
/* 38B8BC E0088ACC 00822023 */  subu      $a0, $a0, $v0
/* 38B8C0 E0088AD0 24020001 */  addiu     $v0, $zero, 0x1
/* 38B8C4 E0088AD4 1082000D */  beq       $a0, $v0, .LE0088B0C
/* 38B8C8 E0088AD8 28820002 */   slti     $v0, $a0, 0x2
/* 38B8CC E0088ADC 10400005 */  beqz      $v0, .LE0088AF4
/* 38B8D0 E0088AE0 24020002 */   addiu    $v0, $zero, 0x2
/* 38B8D4 E0088AE4 10800007 */  beqz      $a0, .LE0088B04
/* 38B8D8 E0088AE8 3C06D838 */   lui      $a2, (0xD8380002 >> 16)
/* 38B8DC E0088AEC 080222CE */  j         .LE0088B38
/* 38B8E0 E0088AF0 34C60002 */   ori      $a2, $a2, (0xD8380002 & 0xFFFF)
.LE0088AF4:
/* 38B8E4 E0088AF4 10820008 */  beq       $a0, $v0, .LE0088B18
/* 38B8E8 E0088AF8 3C06D838 */   lui      $a2, (0xD8380002 >> 16)
/* 38B8EC E0088AFC 080222CE */  j         .LE0088B38
/* 38B8F0 E0088B00 34C60002 */   ori      $a2, $a2, (0xD8380002 & 0xFFFF)
.LE0088B04:
/* 38B8F4 E0088B04 080222C7 */  j         .LE0088B1C
/* 38B8F8 E0088B08 3C03F566 */   lui      $v1, (0xF566FFFF >> 16)
.LE0088B0C:
/* 38B8FC E0088B0C 3C03FF66 */  lui       $v1, (0xFF66FF7F >> 16)
/* 38B900 E0088B10 080222C8 */  j         .LE0088B20
/* 38B904 E0088B14 3463FF7F */   ori      $v1, $v1, (0xFF66FF7F & 0xFFFF)
.LE0088B18:
/* 38B908 E0088B18 3C03FF66 */  lui       $v1, (0xFF66FFFF >> 16)
.LE0088B1C:
/* 38B90C E0088B1C 3463FFFF */  ori       $v1, $v1, (0xFF66FFFF & 0xFFFF)
.LE0088B20:
/* 38B910 E0088B20 24E20008 */  addiu     $v0, $a3, 0x8
/* 38B914 E0088B24 AE220000 */  sw        $v0, 0x0($s1)
/* 38B918 E0088B28 ACF50000 */  sw        $s5, 0x0($a3)
/* 38B91C E0088B2C ACE30004 */  sw        $v1, 0x4($a3)
/* 38B920 E0088B30 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 38B924 E0088B34 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
.LE0088B38:
/* 38B928 E0088B38 00131040 */  sll       $v0, $s3, 1
/* 38B92C E0088B3C 00531021 */  addu      $v0, $v0, $s3
/* 38B930 E0088B40 00021040 */  sll       $v0, $v0, 1
/* 38B934 E0088B44 03C21023 */  subu      $v0, $fp, $v0
/* 38B938 E0088B48 3C09E009 */  lui       $t1, %hi(D_E0088D00)
/* 38B93C E0088B4C 25298D00 */  addiu     $t1, $t1, %lo(D_E0088D00)
/* 38B940 E0088B50 00491021 */  addu      $v0, $v0, $t1
/* 38B944 E0088B54 90430000 */  lbu       $v1, 0x0($v0)
/* 38B948 E0088B58 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* 38B94C E0088B5C 8E240000 */  lw        $a0, 0x0($s1)
/* 38B950 E0088B60 2409003C */  addiu     $t1, $zero, 0x3C
/* 38B954 E0088B64 0080282D */  daddu     $a1, $a0, $zero
/* 38B958 E0088B68 24840008 */  addiu     $a0, $a0, 0x8
/* 38B95C E0088B6C 02831821 */  addu      $v1, $s4, $v1
/* 38B960 E0088B70 3063000F */  andi      $v1, $v1, 0xF
/* 38B964 E0088B74 00031980 */  sll       $v1, $v1, 6
/* 38B968 E0088B78 00621025 */  or        $v0, $v1, $v0
/* 38B96C E0088B7C 34420000 */  ori       $v0, $v0, (0xF2000000 & 0xFFFF)
/* 38B970 E0088B80 AE240000 */  sw        $a0, 0x0($s1)
/* 38B974 E0088B84 ACA20000 */  sw        $v0, 0x0($a1)
/* 38B978 E0088B88 00091300 */  sll       $v0, $t1, 12
/* 38B97C E0088B8C 00691825 */  or        $v1, $v1, $t1
/* 38B980 E0088B90 00431025 */  or        $v0, $v0, $v1
/* 38B984 E0088B94 ACA20004 */  sw        $v0, 0x4($a1)
/* 38B988 E0088B98 24820008 */  addiu     $v0, $a0, 0x8
/* 38B98C E0088B9C 3C058007 */  lui       $a1, %hi(gMatrixListPos)
/* 38B990 E0088BA0 24A541F0 */  addiu     $a1, $a1, %lo(gMatrixListPos)
/* 38B994 E0088BA4 AE220000 */  sw        $v0, 0x0($s1)
/* 38B998 E0088BA8 94A20000 */  lhu       $v0, 0x0($a1)
/* 38B99C E0088BAC 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 38B9A0 E0088BB0 AC830000 */  sw        $v1, 0x0($a0)
/* 38B9A4 E0088BB4 24430001 */  addiu     $v1, $v0, 0x1
/* 38B9A8 E0088BB8 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 38B9AC E0088BBC 00021180 */  sll       $v0, $v0, 6
/* 38B9B0 E0088BC0 A4A30000 */  sh        $v1, 0x0($a1)
/* 38B9B4 E0088BC4 3C03800A */  lui       $v1, %hi(gDisplayContext)
/* 38B9B8 E0088BC8 8C63A674 */  lw        $v1, %lo(gDisplayContext)($v1)
/* 38B9BC E0088BCC 00571021 */  addu      $v0, $v0, $s7
/* 38B9C0 E0088BD0 00621821 */  addu      $v1, $v1, $v0
/* 38B9C4 E0088BD4 24820010 */  addiu     $v0, $a0, 0x10
/* 38B9C8 E0088BD8 AC830004 */  sw        $v1, 0x4($a0)
/* 38B9CC E0088BDC AE220000 */  sw        $v0, 0x0($s1)
/* 38B9D0 E0088BE0 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 38B9D4 E0088BE4 AC820008 */  sw        $v0, 0x8($a0)
/* 38B9D8 E0088BE8 8FA900A0 */  lw        $t1, 0xA0($sp)
/* 38B9DC E0088BEC 24820018 */  addiu     $v0, $a0, 0x18
/* 38B9E0 E0088BF0 AC89000C */  sw        $t1, 0xC($a0)
/* 38B9E4 E0088BF4 AE220000 */  sw        $v0, 0x0($s1)
/* 38B9E8 E0088BF8 24020040 */  addiu     $v0, $zero, 0x40
/* 38B9EC E0088BFC AC860010 */  sw        $a2, 0x10($a0)
/* 38B9F0 E0088C00 AC820014 */  sw        $v0, 0x14($a0)
.LE0088C04:
/* 38B9F4 E0088C04 26940001 */  addiu     $s4, $s4, 0x1
/* 38B9F8 E0088C08 8FA9009C */  lw        $t1, 0x9C($sp)
/* 38B9FC E0088C0C 0289102A */  slt       $v0, $s4, $t1
/* 38BA00 E0088C10 1440FF74 */  bnez      $v0, .LE00889E4
/* 38BA04 E0088C14 26520034 */   addiu    $s2, $s2, 0x34
.LE0088C18:
/* 38BA08 E0088C18 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 38BA0C E0088C1C 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 38BA10 E0088C20 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 38BA14 E0088C24 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 38BA18 E0088C28 8CA30000 */  lw        $v1, 0x0($a1)
/* 38BA1C E0088C2C 3C02DF00 */  lui       $v0, (0xDF000000 >> 16)
/* 38BA20 E0088C30 0060202D */  daddu     $a0, $v1, $zero
/* 38BA24 E0088C34 24630008 */  addiu     $v1, $v1, 0x8
/* 38BA28 E0088C38 AC820000 */  sw        $v0, 0x0($a0)
/* 38BA2C E0088C3C 3C02DE01 */  lui       $v0, (0xDE010000 >> 16)
/* 38BA30 E0088C40 AC800004 */  sw        $zero, 0x4($a0)
/* 38BA34 E0088C44 AEC20000 */  sw        $v0, 0x0($s6)
/* 38BA38 E0088C48 AEC30004 */  sw        $v1, 0x4($s6)
/* 38BA3C E0088C4C 26D60008 */  addiu     $s6, $s6, 0x8
/* 38BA40 E0088C50 24620008 */  addiu     $v0, $v1, 0x8
/* 38BA44 E0088C54 ACA30000 */  sw        $v1, 0x0($a1)
/* 38BA48 E0088C58 ACA20000 */  sw        $v0, 0x0($a1)
/* 38BA4C E0088C5C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 38BA50 E0088C60 AC620000 */  sw        $v0, 0x0($v1)
/* 38BA54 E0088C64 24620010 */  addiu     $v0, $v1, 0x10
/* 38BA58 E0088C68 AC760004 */  sw        $s6, 0x4($v1)
/* 38BA5C E0088C6C ACA20000 */  sw        $v0, 0x0($a1)
/* 38BA60 E0088C70 24020040 */  addiu     $v0, $zero, 0x40
/* 38BA64 E0088C74 AC62000C */  sw        $v0, 0xC($v1)
/* 38BA68 E0088C78 24620018 */  addiu     $v0, $v1, 0x18
/* 38BA6C E0088C7C AC660008 */  sw        $a2, 0x8($v1)
/* 38BA70 E0088C80 ACA20000 */  sw        $v0, 0x0($a1)
/* 38BA74 E0088C84 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 38BA78 E0088C88 AC620010 */  sw        $v0, 0x10($v1)
/* 38BA7C E0088C8C AC600014 */  sw        $zero, 0x14($v1)
/* 38BA80 E0088C90 8FBF00CC */  lw        $ra, 0xCC($sp)
/* 38BA84 E0088C94 8FBE00C8 */  lw        $fp, 0xC8($sp)
/* 38BA88 E0088C98 8FB700C4 */  lw        $s7, 0xC4($sp)
/* 38BA8C E0088C9C 8FB600C0 */  lw        $s6, 0xC0($sp)
/* 38BA90 E0088CA0 8FB500BC */  lw        $s5, 0xBC($sp)
/* 38BA94 E0088CA4 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 38BA98 E0088CA8 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 38BA9C E0088CAC 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 38BAA0 E0088CB0 8FB100AC */  lw        $s1, 0xAC($sp)
/* 38BAA4 E0088CB4 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 38BAA8 E0088CB8 03E00008 */  jr        $ra
/* 38BAAC E0088CBC 27BD00D0 */   addiu    $sp, $sp, 0xD0

### DECOMPILED C INSTRUCTIONS:

void confetti_appendGfx(void* effect) {
    ConfettiFXData* part = ((EffectInstance*)effect)->data.confetti; //s3
    Matrix4f sp18;
    Matrix4f sp58;
    s32 i;
    s32 uly;
    s32 width = 0x3C;
    s32 height = 0x3C;
    s32 ulx = 0;
    s32 unk_28;
    s32 unk_2C;
    Gfx* spA0;
    s32 spA4;
    Gfx* savedGfxPos;
    s32 unk_24;
    Color_RGB8* color;

    unk_24 = part->unk_24;
    unk_2C = part->unk_2C;
    unk_28 = part->unk_28;
    spA0 = D_E0088CC0[part->unk_00];

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

    shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
    shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxCatF(sp58, sp18, sp18);
    shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    savedGfxPos = gMainGfxPos++;

    part++;
    for (i = 0; i < unk_2C; i++, part++) {
        color = &D_E0088CDC[i % 12];

        if (part->unk_30 <= 0) {
            shim_guTranslateF(sp18, part->unk_04, part->unk_08, part->unk_0C);
            shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

            gDPSetPrimColor(gMainGfxPos++, 0, 0, color->r, color->g, color->b, unk_28);

            switch ((unk_24 + i) % 3) {
                case 0:
                    gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0);
                    break;
                case 1:
                    gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0);
                    break;
                case 2:
                    gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0);
                    break;
            }
            uly = ((i + D_E0088D00[unk_24 % 6]) & 0xF) * 16;

            gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, ulx << 2, uly << 2,
                           (ulx << 2) + ((width >> 1) << 1), (uly << 2) + height);
            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, spA0);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPEndDisplayList(gMainGfxPos++);
    gSPBranchList(savedGfxPos, gMainGfxPos);
    savedGfxPos++;
    gSPDisplayList(gMainGfxPos++, savedGfxPos);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel something_rotating_update
/* 4027CC E011618C 27BDFF88 */  addiu     $sp, $sp, -0x78
/* 4027D0 E0116190 AFB40030 */  sw        $s4, 0x30($sp)
/* 4027D4 E0116194 0080A02D */  daddu     $s4, $a0, $zero
/* 4027D8 E0116198 AFBF0040 */  sw        $ra, 0x40($sp)
/* 4027DC E011619C AFB7003C */  sw        $s7, 0x3C($sp)
/* 4027E0 E01161A0 AFB60038 */  sw        $s6, 0x38($sp)
/* 4027E4 E01161A4 AFB50034 */  sw        $s5, 0x34($sp)
/* 4027E8 E01161A8 AFB3002C */  sw        $s3, 0x2C($sp)
/* 4027EC E01161AC AFB20028 */  sw        $s2, 0x28($sp)
/* 4027F0 E01161B0 AFB10024 */  sw        $s1, 0x24($sp)
/* 4027F4 E01161B4 AFB00020 */  sw        $s0, 0x20($sp)
/* 4027F8 E01161B8 F7BE0070 */  sdc1      $f30, 0x70($sp)
/* 4027FC E01161BC F7BC0068 */  sdc1      $f28, 0x68($sp)
/* 402800 E01161C0 F7BA0060 */  sdc1      $f26, 0x60($sp)
/* 402804 E01161C4 F7B80058 */  sdc1      $f24, 0x58($sp)
/* 402808 E01161C8 F7B60050 */  sdc1      $f22, 0x50($sp)
/* 40280C E01161CC F7B40048 */  sdc1      $f20, 0x48($sp)
/* 402810 E01161D0 8E91000C */  lw        $s1, 0xC($s4)
/* 402814 E01161D4 8E830000 */  lw        $v1, 0x0($s4)
/* 402818 E01161D8 C6260004 */  lwc1      $f6, 0x4($s1)
/* 40281C E01161DC E7A60010 */  swc1      $f6, 0x10($sp)
/* 402820 E01161E0 C6260008 */  lwc1      $f6, 0x8($s1)
/* 402824 E01161E4 E7A60014 */  swc1      $f6, 0x14($sp)
/* 402828 E01161E8 C626000C */  lwc1      $f6, 0xC($s1)
/* 40282C E01161EC 30620010 */  andi      $v0, $v1, 0x10
/* 402830 E01161F0 10400006 */  beqz      $v0, .LE011620C
/* 402834 E01161F4 E7A60018 */   swc1     $f6, 0x18($sp)
/* 402838 E01161F8 2402FFEF */  addiu     $v0, $zero, -0x11
/* 40283C E01161FC 00621024 */  and       $v0, $v1, $v0
/* 402840 E0116200 AE820000 */  sw        $v0, 0x0($s4)
/* 402844 E0116204 24020020 */  addiu     $v0, $zero, 0x20
/* 402848 E0116208 AE220010 */  sw        $v0, 0x10($s1)
.LE011620C:
/* 40284C E011620C 8E230010 */  lw        $v1, 0x10($s1)
/* 402850 E0116210 286203E8 */  slti      $v0, $v1, 0x3E8
/* 402854 E0116214 10400002 */  beqz      $v0, .LE0116220
/* 402858 E0116218 2462FFFF */   addiu    $v0, $v1, -0x1
/* 40285C E011621C AE220010 */  sw        $v0, 0x10($s1)
.LE0116220:
/* 402860 E0116220 8E220014 */  lw        $v0, 0x14($s1)
/* 402864 E0116224 8E230010 */  lw        $v1, 0x10($s1)
/* 402868 E0116228 24440001 */  addiu     $a0, $v0, 0x1
/* 40286C E011622C 04610005 */  bgez      $v1, .LE0116244
/* 402870 E0116230 AE240014 */   sw       $a0, 0x14($s1)
/* 402874 E0116234 0C080128 */  jal       shim_remove_effect
/* 402878 E0116238 0280202D */   daddu    $a0, $s4, $zero
/* 40287C E011623C 08045997 */  j         .LE011665C
/* 402880 E0116240 00000000 */   nop
.LE0116244:
/* 402884 E0116244 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 402888 E0116248 44810000 */  mtc1      $at, $f0
/* 40288C E011624C 24130001 */  addiu     $s3, $zero, 0x1
/* 402890 E0116250 E6200020 */  swc1      $f0, 0x20($s1)
/* 402894 E0116254 26310030 */  addiu     $s1, $s1, 0x30
/* 402898 E0116258 8E820008 */  lw        $v0, 0x8($s4)
/* 40289C E011625C 0262102A */  slt       $v0, $s3, $v0
/* 4028A0 E0116260 104000FE */  beqz      $v0, .LE011665C
/* 4028A4 E0116264 46000786 */   mov.s    $f30, $f0
/* 4028A8 E0116268 3C17E011 */  lui       $s7, %hi(D_E0116CA4)
/* 4028AC E011626C 26F76CA4 */  addiu     $s7, $s7, %lo(D_E0116CA4)
/* 4028B0 E0116270 3C16E011 */  lui       $s6, %hi(D_E0116C8C)
/* 4028B4 E0116274 26D66C8C */  addiu     $s6, $s6, %lo(D_E0116C8C)
/* 4028B8 E0116278 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 4028BC E011627C 44811000 */  mtc1      $at, $f2
/* 4028C0 E0116280 44840000 */  mtc1      $a0, $f0
/* 4028C4 E0116284 00000000 */  nop
/* 4028C8 E0116288 46800020 */  cvt.s.w   $f0, $f0
/* 4028CC E011628C 46020002 */  mul.s     $f0, $f0, $f2
/* 4028D0 E0116290 00000000 */  nop
/* 4028D4 E0116294 3C158000 */  lui       $s5, (0x80000000 >> 16)
/* 4028D8 E0116298 26300014 */  addiu     $s0, $s1, 0x14
/* 4028DC E011629C 0000902D */  daddu     $s2, $zero, $zero
/* 4028E0 E01162A0 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 4028E4 E01162A4 4481D000 */  mtc1      $at, $f26
/* 4028E8 E01162A8 46000721 */  cvt.d.s   $f28, $f0
.LE01162AC:
/* 4028EC E01162AC 4493A000 */  mtc1      $s3, $f20
/* 4028F0 E01162B0 00000000 */  nop
/* 4028F4 E01162B4 4680A520 */  cvt.s.w   $f20, $f20
/* 4028F8 E01162B8 3C01E011 */  lui       $at, (0xE0116D90 >> 16)
/* 4028FC E01162BC D4206D90 */  ldc1      $f0, (0xE0116D90 & 0xFFFF)($at)
/* 402900 E01162C0 4600A521 */  cvt.d.s   $f20, $f20
/* 402904 E01162C4 4620A502 */  mul.d     $f20, $f20, $f0
/* 402908 E01162C8 00000000 */  nop
/* 40290C E01162CC 4634E500 */  add.d     $f20, $f28, $f20
/* 402910 E01162D0 4620A520 */  cvt.s.d   $f20, $f20
/* 402914 E01162D4 0C080140 */  jal       shim_sin_deg
/* 402918 E01162D8 4600A306 */   mov.s    $f12, $f20
/* 40291C E01162DC 4600F306 */  mov.s     $f12, $f30
/* 402920 E01162E0 C6160018 */  lwc1      $f22, 0x18($s0)
/* 402924 E01162E4 0C080140 */  jal       shim_sin_deg
/* 402928 E01162E8 46000606 */   mov.s    $f24, $f0
/* 40292C E01162EC 4600B002 */  mul.s     $f0, $f22, $f0
/* 402930 E01162F0 00000000 */  nop
/* 402934 E01162F4 46180002 */  mul.s     $f0, $f0, $f24
/* 402938 E01162F8 00000000 */  nop
/* 40293C E01162FC C7A60010 */  lwc1      $f6, 0x10($sp)
/* 402940 E0116300 46003000 */  add.s     $f0, $f6, $f0
/* 402944 E0116304 4600A306 */  mov.s     $f12, $f20
/* 402948 E0116308 0C080144 */  jal       shim_cos_deg
/* 40294C E011630C E600FFF0 */   swc1     $f0, -0x10($s0)
/* 402950 E0116310 4600B002 */  mul.s     $f0, $f22, $f0
/* 402954 E0116314 00000000 */  nop
/* 402958 E0116318 C7A60014 */  lwc1      $f6, 0x14($sp)
/* 40295C E011631C 46003000 */  add.s     $f0, $f6, $f0
/* 402960 E0116320 4600F306 */  mov.s     $f12, $f30
/* 402964 E0116324 0C080144 */  jal       shim_cos_deg
/* 402968 E0116328 E600FFF4 */   swc1     $f0, -0xC($s0)
/* 40296C E011632C 4600B582 */  mul.s     $f22, $f22, $f0
/* 402970 E0116330 00000000 */  nop
/* 402974 E0116334 4618B582 */  mul.s     $f22, $f22, $f24
/* 402978 E0116338 00000000 */  nop
/* 40297C E011633C C7A60018 */  lwc1      $f6, 0x18($sp)
/* 402980 E0116340 92020015 */  lbu       $v0, 0x15($s0)
/* 402984 E0116344 46163580 */  add.s     $f22, $f6, $f22
/* 402988 E0116348 2443FFFF */  addiu     $v1, $v0, -0x1
/* 40298C E011634C 2C620005 */  sltiu     $v0, $v1, 0x5
/* 402990 E0116350 104000B8 */  beqz      $v0, .LE0116634
/* 402994 E0116354 E616FFF8 */   swc1     $f22, -0x8($s0)
/* 402998 E0116358 00031080 */  sll       $v0, $v1, 2
/* 40299C E011635C 3C01E011 */  lui       $at, (0xE0116D98 >> 16)
/* 4029A0 E0116360 00220821 */  addu      $at, $at, $v0
/* 4029A4 E0116364 8C226D98 */  lw        $v0, (0xE0116D98 & 0xFFFF)($at)
/* 4029A8 E0116368 00400008 */  jr        $v0
/* 4029AC E011636C 00000000 */   nop
/* 4029B0 E0116370 92020015 */  lbu       $v0, 0x15($s0)
/* 4029B4 E0116374 AE000000 */  sw        $zero, 0x0($s0)
/* 4029B8 E0116378 24420001 */  addiu     $v0, $v0, 0x1
/* 4029BC E011637C A2020015 */  sb        $v0, 0x15($s0)
/* 4029C0 E0116380 8E040000 */  lw        $a0, 0x0($s0)
/* 4029C4 E0116384 28820029 */  slti      $v0, $a0, 0x29
/* 4029C8 E0116388 10400004 */  beqz      $v0, .LE011639C
/* 4029CC E011638C 00041040 */   sll      $v0, $a0, 1
/* 4029D0 E0116390 00571021 */  addu      $v0, $v0, $s7
/* 4029D4 E0116394 080458E8 */  j         .LE01163A0
/* 4029D8 E0116398 84420000 */   lh       $v0, 0x0($v0)
.LE011639C:
/* 4029DC E011639C 86E20050 */  lh        $v0, 0x50($s7)
.LE01163A0:
/* 4029E0 E01163A0 44820000 */  mtc1      $v0, $f0
/* 4029E4 E01163A4 00000000 */  nop
/* 4029E8 E01163A8 46800020 */  cvt.s.w   $f0, $f0
/* 4029EC E01163AC 2882000D */  slti      $v0, $a0, 0xD
/* 4029F0 E01163B0 10400006 */  beqz      $v0, .LE01163CC
/* 4029F4 E01163B4 E600000C */   swc1     $f0, 0xC($s0)
/* 4029F8 E01163B8 3C02E011 */  lui       $v0, (0xE0116CF8 >> 16)
/* 4029FC E01163BC 00441021 */  addu      $v0, $v0, $a0
/* 402A00 E01163C0 90426CF8 */  lbu       $v0, (0xE0116CF8 & 0xFFFF)($v0)
/* 402A04 E01163C4 080458F6 */  j         .LE01163D8
/* 402A08 E01163C8 A2020010 */   sb       $v0, 0x10($s0)
.LE01163CC:
/* 402A0C E01163CC 3C02E011 */  lui       $v0, (0xE0116D04 >> 16)
/* 402A10 E01163D0 90426D04 */  lbu       $v0, (0xE0116D04 & 0xFFFF)($v0)
/* 402A14 E01163D4 A2020010 */  sb        $v0, 0x10($s0)
.LE01163D8:
/* 402A18 E01163D8 28820034 */  slti      $v0, $a0, 0x34
/* 402A1C E01163DC 10400006 */  beqz      $v0, .LE01163F8
/* 402A20 E01163E0 00000000 */   nop
/* 402A24 E01163E4 3C02E011 */  lui       $v0, (0xE0116D08 >> 16)
/* 402A28 E01163E8 00441021 */  addu      $v0, $v0, $a0
/* 402A2C E01163EC 90426D08 */  lbu       $v0, (0xE0116D08 & 0xFFFF)($v0)
/* 402A30 E01163F0 08045901 */  j         .LE0116404
/* 402A34 E01163F4 A2020011 */   sb       $v0, 0x11($s0)
.LE01163F8:
/* 402A38 E01163F8 3C02E011 */  lui       $v0, (0xE0116D3B >> 16)
/* 402A3C E01163FC 90426D3B */  lbu       $v0, (0xE0116D3B & 0xFFFF)($v0)
/* 402A40 E0116400 A2020011 */  sb        $v0, 0x11($s0)
.LE0116404:
/* 402A44 E0116404 28820030 */  slti      $v0, $a0, 0x30
/* 402A48 E0116408 10400005 */  beqz      $v0, .LE0116420
/* 402A4C E011640C 00000000 */   nop
/* 402A50 E0116410 3C02E011 */  lui       $v0, (0xE0116D3C >> 16)
/* 402A54 E0116414 00441021 */  addu      $v0, $v0, $a0
/* 402A58 E0116418 0804590A */  j         .LE0116428
/* 402A5C E011641C 90426D3C */   lbu      $v0, (0xE0116D3C & 0xFFFF)($v0)
.LE0116420:
/* 402A60 E0116420 3C02E011 */  lui       $v0, (0xE0116D6B >> 16)
/* 402A64 E0116424 90426D6B */  lbu       $v0, (0xE0116D6B & 0xFFFF)($v0)
.LE0116428:
/* 402A68 E0116428 44822000 */  mtc1      $v0, $f4
/* 402A6C E011642C 00000000 */  nop
/* 402A70 E0116430 46802120 */  cvt.s.w   $f4, $f4
/* 402A74 E0116434 3C01E011 */  lui       $at, (0xE0116DB0 >> 16)
/* 402A78 E0116438 D4226DB0 */  ldc1      $f2, (0xE0116DB0 & 0xFFFF)($at)
/* 402A7C E011643C 46002021 */  cvt.d.s   $f0, $f4
/* 402A80 E0116440 46220002 */  mul.d     $f0, $f0, $f2
/* 402A84 E0116444 00000000 */  nop
/* 402A88 E0116448 02561021 */  addu      $v0, $s2, $s6
/* 402A8C E011644C 90420000 */  lbu       $v0, 0x0($v0)
/* 402A90 E0116450 46200120 */  cvt.s.d   $f4, $f0
/* 402A94 E0116454 44820000 */  mtc1      $v0, $f0
/* 402A98 E0116458 00000000 */  nop
/* 402A9C E011645C 46800020 */  cvt.s.w   $f0, $f0
/* 402AA0 E0116460 46002002 */  mul.s     $f0, $f4, $f0
/* 402AA4 E0116464 00000000 */  nop
/* 402AA8 E0116468 4600D03E */  c.le.s    $f26, $f0
/* 402AAC E011646C 00000000 */  nop
/* 402AB0 E0116470 45010005 */  bc1t      .LE0116488
/* 402AB4 E0116474 26230026 */   addiu    $v1, $s1, 0x26
/* 402AB8 E0116478 4600018D */  trunc.w.s $f6, $f0
/* 402ABC E011647C 44023000 */  mfc1      $v0, $f6
/* 402AC0 E0116480 08045928 */  j         .LE01164A0
/* 402AC4 E0116484 A0620000 */   sb       $v0, 0x0($v1)
.LE0116488:
/* 402AC8 E0116488 461A0001 */  sub.s     $f0, $f0, $f26
/* 402ACC E011648C 4600018D */  trunc.w.s $f6, $f0
/* 402AD0 E0116490 44023000 */  mfc1      $v0, $f6
/* 402AD4 E0116494 00000000 */  nop
/* 402AD8 E0116498 00551025 */  or        $v0, $v0, $s5
/* 402ADC E011649C A0620000 */  sb        $v0, 0x0($v1)
.LE01164A0:
/* 402AE0 E01164A0 02561021 */  addu      $v0, $s2, $s6
/* 402AE4 E01164A4 90420001 */  lbu       $v0, 0x1($v0)
/* 402AE8 E01164A8 44820000 */  mtc1      $v0, $f0
/* 402AEC E01164AC 00000000 */  nop
/* 402AF0 E01164B0 46800020 */  cvt.s.w   $f0, $f0
/* 402AF4 E01164B4 46002002 */  mul.s     $f0, $f4, $f0
/* 402AF8 E01164B8 00000000 */  nop
/* 402AFC E01164BC 4600D03E */  c.le.s    $f26, $f0
/* 402B00 E01164C0 00000000 */  nop
/* 402B04 E01164C4 45010005 */  bc1t      .LE01164DC
/* 402B08 E01164C8 26230027 */   addiu    $v1, $s1, 0x27
/* 402B0C E01164CC 4600018D */  trunc.w.s $f6, $f0
/* 402B10 E01164D0 44023000 */  mfc1      $v0, $f6
/* 402B14 E01164D4 0804593D */  j         .LE01164F4
/* 402B18 E01164D8 A0620000 */   sb       $v0, 0x0($v1)
.LE01164DC:
/* 402B1C E01164DC 461A0001 */  sub.s     $f0, $f0, $f26
/* 402B20 E01164E0 4600018D */  trunc.w.s $f6, $f0
/* 402B24 E01164E4 44023000 */  mfc1      $v0, $f6
/* 402B28 E01164E8 00000000 */  nop
/* 402B2C E01164EC 00551025 */  or        $v0, $v0, $s5
/* 402B30 E01164F0 A0620000 */  sb        $v0, 0x0($v1)
.LE01164F4:
/* 402B34 E01164F4 02561021 */  addu      $v0, $s2, $s6
/* 402B38 E01164F8 90420002 */  lbu       $v0, 0x2($v0)
/* 402B3C E01164FC 44820000 */  mtc1      $v0, $f0
/* 402B40 E0116500 00000000 */  nop
/* 402B44 E0116504 46800020 */  cvt.s.w   $f0, $f0
/* 402B48 E0116508 46002002 */  mul.s     $f0, $f4, $f0
/* 402B4C E011650C 00000000 */  nop
/* 402B50 E0116510 4600D03E */  c.le.s    $f26, $f0
/* 402B54 E0116514 00000000 */  nop
/* 402B58 E0116518 45010005 */  bc1t      .LE0116530
/* 402B5C E011651C 26230028 */   addiu    $v1, $s1, 0x28
/* 402B60 E0116520 4600018D */  trunc.w.s $f6, $f0
/* 402B64 E0116524 44023000 */  mfc1      $v0, $f6
/* 402B68 E0116528 08045952 */  j         .LE0116548
/* 402B6C E011652C A0620000 */   sb       $v0, 0x0($v1)
.LE0116530:
/* 402B70 E0116530 461A0001 */  sub.s     $f0, $f0, $f26
/* 402B74 E0116534 4600018D */  trunc.w.s $f6, $f0
/* 402B78 E0116538 44023000 */  mfc1      $v0, $f6
/* 402B7C E011653C 00000000 */  nop
/* 402B80 E0116540 00551025 */  or        $v0, $v0, $s5
/* 402B84 E0116544 A0620000 */  sb        $v0, 0x0($v1)
.LE0116548:
/* 402B88 E0116548 28820018 */  slti      $v0, $a0, 0x18
/* 402B8C E011654C 10400005 */  beqz      $v0, .LE0116564
/* 402B90 E0116550 00000000 */   nop
/* 402B94 E0116554 3C02E011 */  lui       $v0, (0xE0116D6C >> 16)
/* 402B98 E0116558 00441021 */  addu      $v0, $v0, $a0
/* 402B9C E011655C 0804595B */  j         .LE011656C
/* 402BA0 E0116560 90426D6C */   lbu      $v0, (0xE0116D6C & 0xFFFF)($v0)
.LE0116564:
/* 402BA4 E0116564 3C02E011 */  lui       $v0, (0xE0116D83 >> 16)
/* 402BA8 E0116568 90426D83 */  lbu       $v0, (0xE0116D83 & 0xFFFF)($v0)
.LE011656C:
/* 402BAC E011656C 3C01E011 */  lui       $at, (0xE0116DB8 >> 16)
/* 402BB0 E0116570 D4226DB8 */  ldc1      $f2, (0xE0116DB8 & 0xFFFF)($at)
/* 402BB4 E0116574 44820000 */  mtc1      $v0, $f0
/* 402BB8 E0116578 00000000 */  nop
/* 402BBC E011657C 46800020 */  cvt.s.w   $f0, $f0
/* 402BC0 E0116580 46000021 */  cvt.d.s   $f0, $f0
/* 402BC4 E0116584 46220002 */  mul.d     $f0, $f0, $f2
/* 402BC8 E0116588 00000000 */  nop
/* 402BCC E011658C 46200020 */  cvt.s.d   $f0, $f0
/* 402BD0 E0116590 0804598D */  j         .LE0116634
/* 402BD4 E0116594 E6000004 */   swc1     $f0, 0x4($s0)
/* 402BD8 E0116598 92020015 */  lbu       $v0, 0x15($s0)
/* 402BDC E011659C AE000000 */  sw        $zero, 0x0($s0)
/* 402BE0 E01165A0 24420001 */  addiu     $v0, $v0, 0x1
/* 402BE4 E01165A4 A2020015 */  sb        $v0, 0x15($s0)
/* 402BE8 E01165A8 8E040000 */  lw        $a0, 0x0($s0)
/* 402BEC E01165AC 28820012 */  slti      $v0, $a0, 0x12
/* 402BF0 E01165B0 1040001C */  beqz      $v0, .LE0116624
/* 402BF4 E01165B4 00041880 */   sll      $v1, $a0, 2
/* 402BF8 E01165B8 00641821 */  addu      $v1, $v1, $a0
/* 402BFC E01165BC 00031840 */  sll       $v1, $v1, 1
/* 402C00 E01165C0 2402005A */  addiu     $v0, $zero, 0x5A
/* 402C04 E01165C4 00431023 */  subu      $v0, $v0, $v1
/* 402C08 E01165C8 44826000 */  mtc1      $v0, $f12
/* 402C0C E01165CC 00000000 */  nop
/* 402C10 E01165D0 46806320 */  cvt.s.w   $f12, $f12
/* 402C14 E01165D4 0C080140 */  jal       shim_sin_deg
/* 402C18 E01165D8 26520003 */   addiu    $s2, $s2, 0x3
/* 402C1C E01165DC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 402C20 E01165E0 44811000 */  mtc1      $at, $f2
/* 402C24 E01165E4 00000000 */  nop
/* 402C28 E01165E8 46020000 */  add.s     $f0, $f0, $f2
/* 402C2C E01165EC 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 402C30 E01165F0 44811000 */  mtc1      $at, $f2
/* 402C34 E01165F4 00000000 */  nop
/* 402C38 E01165F8 46020002 */  mul.s     $f0, $f0, $f2
/* 402C3C E01165FC 00000000 */  nop
/* 402C40 E0116600 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 402C44 E0116604 44811800 */  mtc1      $at, $f3
/* 402C48 E0116608 44801000 */  mtc1      $zero, $f2
/* 402C4C E011660C 46000021 */  cvt.d.s   $f0, $f0
/* 402C50 E0116610 46220002 */  mul.d     $f0, $f0, $f2
/* 402C54 E0116614 00000000 */  nop
/* 402C58 E0116618 46200020 */  cvt.s.d   $f0, $f0
/* 402C5C E011661C 0804598E */  j         .LE0116638
/* 402C60 E0116620 E6000018 */   swc1     $f0, 0x18($s0)
.LE0116624:
/* 402C64 E0116624 92020015 */  lbu       $v0, 0x15($s0)
/* 402C68 E0116628 AE000018 */  sw        $zero, 0x18($s0)
/* 402C6C E011662C 24420001 */  addiu     $v0, $v0, 0x1
/* 402C70 E0116630 A2020015 */  sb        $v0, 0x15($s0)
.LE0116634:
/* 402C74 E0116634 26520003 */  addiu     $s2, $s2, 0x3
.LE0116638:
/* 402C78 E0116638 26730001 */  addiu     $s3, $s3, 0x1
/* 402C7C E011663C 8E020000 */  lw        $v0, 0x0($s0)
/* 402C80 E0116640 26310030 */  addiu     $s1, $s1, 0x30
/* 402C84 E0116644 24420001 */  addiu     $v0, $v0, 0x1
/* 402C88 E0116648 AE020000 */  sw        $v0, 0x0($s0)
/* 402C8C E011664C 8E820008 */  lw        $v0, 0x8($s4)
/* 402C90 E0116650 0262102A */  slt       $v0, $s3, $v0
/* 402C94 E0116654 1440FF15 */  bnez      $v0, .LE01162AC
/* 402C98 E0116658 26100030 */   addiu    $s0, $s0, 0x30
.LE011665C:
/* 402C9C E011665C 8FBF0040 */  lw        $ra, 0x40($sp)
/* 402CA0 E0116660 8FB7003C */  lw        $s7, 0x3C($sp)
/* 402CA4 E0116664 8FB60038 */  lw        $s6, 0x38($sp)
/* 402CA8 E0116668 8FB50034 */  lw        $s5, 0x34($sp)
/* 402CAC E011666C 8FB40030 */  lw        $s4, 0x30($sp)
/* 402CB0 E0116670 8FB3002C */  lw        $s3, 0x2C($sp)
/* 402CB4 E0116674 8FB20028 */  lw        $s2, 0x28($sp)
/* 402CB8 E0116678 8FB10024 */  lw        $s1, 0x24($sp)
/* 402CBC E011667C 8FB00020 */  lw        $s0, 0x20($sp)
/* 402CC0 E0116680 D7BE0070 */  ldc1      $f30, 0x70($sp)
/* 402CC4 E0116684 D7BC0068 */  ldc1      $f28, 0x68($sp)
/* 402CC8 E0116688 D7BA0060 */  ldc1      $f26, 0x60($sp)
/* 402CCC E011668C D7B80058 */  ldc1      $f24, 0x58($sp)
/* 402CD0 E0116690 D7B60050 */  ldc1      $f22, 0x50($sp)
/* 402CD4 E0116694 D7B40048 */  ldc1      $f20, 0x48($sp)
/* 402CD8 E0116698 03E00008 */  jr        $ra
/* 402CDC E011669C 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

void something_rotating_update(EffectInstance* effect) {
    SomethingRotatingFXData* part = effect->data.somethingRotating;
    f32 x = part->pos.x;
    f32 y = part->pos.y;
    f32 z = part->pos.z;
    s32 unk_14;
    s32 unk_14_2;
    f32 factor;
    f32 angle1;
    s32 i;

    if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
        effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
        part->unk_10 = 32;
    }

    if (part->unk_10 < 1000) {
        part->unk_10--;
    }

    part->unk_14++;

    if (part->unk_10 < 0) {
        shim_remove_effect(effect);
        return;
    }

    unk_14 = part->unk_14;
    part->unk_20 = 90.0f;
    angle1 = 90.0f;

    part++;
    for (i = 1; i < effect->numParts; i++, part++) {
        f32 angle2 = unk_14 * 4.0f + (f32) i * 51.43;
        f32 temp_f24 = shim_sin_deg(angle2);
        f32 temp_f22 = part->unk_2C;

        part->pos.x = x + temp_f22 * shim_sin_deg(angle1) * temp_f24;
        part->pos.y = y + temp_f22 * shim_cos_deg(angle2);
        part->pos.z = z + temp_f22 * shim_cos_deg(angle1) * temp_f24;

        switch (part->state) {
            case 1:
                part->unk_14 = 0;
                part->state++;
                // fallthrough
            case 2:
                unk_14_2 = part->unk_14;

                if (unk_14_2 < ARRAY_COUNT(D_E0116CA4)) {
                    part->unk_20 = D_E0116CA4[unk_14_2];
                } else {
                    part->unk_20 = D_E0116CA4[ARRAY_COUNT(D_E0116CA4) - 1];
                }
                if (unk_14_2 < ARRAY_COUNT(D_E0116CF8)) {
                    part->primAlpha = D_E0116CF8[unk_14_2];
                } else {
                    part->primAlpha = D_E0116CF8[ARRAY_COUNT(D_E0116CF8) - 1];
                }
                if (unk_14_2 < ARRAY_COUNT(D_E0116D08)) {
                    part->unk_25 = D_E0116D08[unk_14_2];
                } else {
                    part->unk_25 = D_E0116D08[ARRAY_COUNT(D_E0116D08) - 1];
                }

                if (unk_14_2 < ARRAY_COUNT(D_E0116D3C)) {
                    factor = D_E0116D3C[unk_14_2];
                } else {
                    factor = D_E0116D3C[ARRAY_COUNT(D_E0116D3C) - 1];
                }

                factor *= 0.0039215686; // 1 / 255
                part->env.r = factor * D_E0116C8C[i - 1].r;
                part->env.g = factor * D_E0116C8C[i - 1].g;
                part->env.b = factor * D_E0116C8C[i - 1].b;

                if (unk_14_2 < ARRAY_COUNT(D_E0116D6C)) {
                    part->unk_18 = (f32) D_E0116D6C[unk_14_2] * 0.01;
                } else {
                    part->unk_18 = (f32) D_E0116D6C[ARRAY_COUNT(D_E0116D6C) - 1] * 0.01;
                }

                break;
            case 3:
                part->unk_14 = 0;
                part->state++;
                // fallthrough
            case 4:
                unk_14_2 = part->unk_14;

                if (unk_14_2 < 18) {
                    part->unk_2C = (shim_sin_deg(90 - unk_14_2 * 10) + 1.0f) * 50.0f * 0.5;
                } else {
                    part->unk_2C = 0.0f;
                    part->state++;
                }

                break;
            case 5:
                break;
        }

        part->unk_14++;
    }
}