### RAW ASSEMBLY INSTRUCTIONS:

glabel big_smoke_puff_appendGfx
/* 327BF0 E0002300 27BDFF68 */  addiu     $sp, $sp, -0x98
/* 327BF4 E0002304 3C08DB06 */  lui       $t0, (0xDB060024 >> 16)
/* 327BF8 E0002308 35080024 */  ori       $t0, $t0, (0xDB060024 & 0xFFFF)
/* 327BFC E000230C AFB50074 */  sw        $s5, 0x74($sp)
/* 327C00 E0002310 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 327C04 E0002314 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 327C08 E0002318 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 327C0C E000231C AFBF0084 */  sw        $ra, 0x84($sp)
/* 327C10 E0002320 AFBE0080 */  sw        $fp, 0x80($sp)
/* 327C14 E0002324 AFB7007C */  sw        $s7, 0x7C($sp)
/* 327C18 E0002328 AFB60078 */  sw        $s6, 0x78($sp)
/* 327C1C E000232C AFB40070 */  sw        $s4, 0x70($sp)
/* 327C20 E0002330 AFB3006C */  sw        $s3, 0x6C($sp)
/* 327C24 E0002334 AFB20068 */  sw        $s2, 0x68($sp)
/* 327C28 E0002338 AFB10064 */  sw        $s1, 0x64($sp)
/* 327C2C E000233C AFB00060 */  sw        $s0, 0x60($sp)
/* 327C30 E0002340 F7B60090 */  sdc1      $f22, 0x90($sp)
/* 327C34 E0002344 F7B40088 */  sdc1      $f20, 0x88($sp)
/* 327C38 E0002348 AFA40098 */  sw        $a0, 0x98($sp)
/* 327C3C E000234C 8EA60000 */  lw        $a2, 0x0($s5)
/* 327C40 E0002350 8FA90098 */  lw        $t1, 0x98($sp)
/* 327C44 E0002354 4480A000 */  mtc1      $zero, $f20
/* 327C48 E0002358 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 327C4C E000235C 44810000 */  mtc1      $at, $f0
/* 327C50 E0002360 00C0182D */  daddu     $v1, $a2, $zero
/* 327C54 E0002364 8D34000C */  lw        $s4, 0xC($t1)
/* 327C58 E0002368 24C60008 */  addiu     $a2, $a2, 0x8
/* 327C5C E000236C AC620000 */  sw        $v0, 0x0($v1)
/* 327C60 E0002370 AC600004 */  sw        $zero, 0x4($v1)
/* 327C64 E0002374 ACC80000 */  sw        $t0, 0x0($a2)
/* 327C68 E0002378 3C088000 */  lui       $t0, (0x80000000 >> 16)
/* 327C6C E000237C 4405A000 */  mfc1      $a1, $f20
/* 327C70 E0002380 8D220010 */  lw        $v0, 0x10($t1)
/* 327C74 E0002384 4407A000 */  mfc1      $a3, $f20
/* 327C78 E0002388 8C42001C */  lw        $v0, 0x1C($v0)
/* 327C7C E000238C 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 327C80 E0002390 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 327C84 E0002394 00481021 */  addu      $v0, $v0, $t0
/* 327C88 E0002398 ACC20004 */  sw        $v0, 0x4($a2)
/* 327C8C E000239C 00031080 */  sll       $v0, $v1, 2
/* 327C90 E00023A0 00431021 */  addu      $v0, $v0, $v1
/* 327C94 E00023A4 00021080 */  sll       $v0, $v0, 2
/* 327C98 E00023A8 00431023 */  subu      $v0, $v0, $v1
/* 327C9C E00023AC 000218C0 */  sll       $v1, $v0, 3
/* 327CA0 E00023B0 00431021 */  addu      $v0, $v0, $v1
/* 327CA4 E00023B4 000210C0 */  sll       $v0, $v0, 3
/* 327CA8 E00023B8 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 327CAC E00023BC 00220821 */  addu      $at, $at, $v0
/* 327CB0 E00023C0 C4221DEC */  lwc1      $f2, %lo(gCameras + 0x6C)($at)
/* 327CB4 E00023C4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 327CB8 E00023C8 C680000C */  lwc1      $f0, 0xC($s4)
/* 327CBC E00023CC 27A40020 */  addiu     $a0, $sp, 0x20
/* 327CC0 E00023D0 AEA60000 */  sw        $a2, 0x0($s5)
/* 327CC4 E00023D4 24C60008 */  addiu     $a2, $a2, 0x8
/* 327CC8 E00023D8 E7A00014 */  swc1      $f0, 0x14($sp)
/* 327CCC E00023DC C6800010 */  lwc1      $f0, 0x10($s4)
/* 327CD0 E00023E0 46001087 */  neg.s     $f2, $f2
/* 327CD4 E00023E4 AEA60000 */  sw        $a2, 0x0($s5)
/* 327CD8 E00023E8 44061000 */  mfc1      $a2, $f2
/* 327CDC E00023EC 3C100001 */  lui       $s0, (0x11630 >> 16)
/* 327CE0 E00023F0 E7A00018 */  swc1      $f0, 0x18($sp)
/* 327CE4 E00023F4 C6800014 */  lwc1      $f0, 0x14($s4)
/* 327CE8 E00023F8 36101630 */  ori       $s0, $s0, (0x11630 & 0xFFFF)
/* 327CEC E00023FC 0C080180 */  jal       shim_guPositionF
/* 327CF0 E0002400 E7A0001C */   swc1     $f0, 0x1C($sp)
/* 327CF4 E0002404 27A40020 */  addiu     $a0, $sp, 0x20
/* 327CF8 E0002408 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 327CFC E000240C 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 327D00 E0002410 3C13800A */  lui       $s3, %hi(gDisplayContext)
/* 327D04 E0002414 2673A674 */  addiu     $s3, $s3, %lo(gDisplayContext)
/* 327D08 E0002418 96250000 */  lhu       $a1, 0x0($s1)
/* 327D0C E000241C 8E620000 */  lw        $v0, 0x0($s3)
/* 327D10 E0002420 00052980 */  sll       $a1, $a1, 6
/* 327D14 E0002424 00B02821 */  addu      $a1, $a1, $s0
/* 327D18 E0002428 0C080118 */  jal       shim_guMtxF2L
/* 327D1C E000242C 00452821 */   addu     $a1, $v0, $a1
/* 327D20 E0002430 8EA20000 */  lw        $v0, 0x0($s5)
/* 327D24 E0002434 0040282D */  daddu     $a1, $v0, $zero
/* 327D28 E0002438 24420008 */  addiu     $v0, $v0, 0x8
/* 327D2C E000243C AEA20000 */  sw        $v0, 0x0($s5)
/* 327D30 E0002440 96240000 */  lhu       $a0, 0x0($s1)
/* 327D34 E0002444 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 327D38 E0002448 ACA20000 */  sw        $v0, 0x0($a1)
/* 327D3C E000244C 8E630000 */  lw        $v1, 0x0($s3)
/* 327D40 E0002450 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* 327D44 E0002454 00021180 */  sll       $v0, $v0, 6
/* 327D48 E0002458 00501021 */  addu      $v0, $v0, $s0
/* 327D4C E000245C 00621821 */  addu      $v1, $v1, $v0
/* 327D50 E0002460 ACA30004 */  sw        $v1, 0x4($a1)
/* 327D54 E0002464 8FA90098 */  lw        $t1, 0x98($sp)
/* 327D58 E0002468 0000902D */  daddu     $s2, $zero, $zero
/* 327D5C E000246C 8D220008 */  lw        $v0, 0x8($t1)
/* 327D60 E0002470 24840001 */  addiu     $a0, $a0, 0x1
/* 327D64 E0002474 18400092 */  blez      $v0, .LE00026C0
/* 327D68 E0002478 A6240000 */   sh       $a0, 0x0($s1)
/* 327D6C E000247C 4600A586 */  mov.s     $f22, $f20
/* 327D70 E0002480 0260F02D */  daddu     $fp, $s3, $zero
/* 327D74 E0002484 0220B82D */  daddu     $s7, $s1, $zero
/* 327D78 E0002488 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 327D7C E000248C 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 327D80 E0002490 02A0982D */  daddu     $s3, $s5, $zero
/* 327D84 E0002494 3C15E000 */  lui       $s5, %hi(D_E0002800)
/* 327D88 E0002498 26B52800 */  addiu     $s5, $s5, %lo(D_E0002800)
/* 327D8C E000249C 3C0140E0 */  lui       $at, (0x40E00000 >> 16)
/* 327D90 E00024A0 4481A000 */  mtc1      $at, $f20
/* 327D94 E00024A4 26900004 */  addiu     $s0, $s4, 0x4
.LE00024A8:
/* 327D98 E00024A8 8603FFFE */  lh        $v1, -0x2($s0)
/* 327D9C E00024AC 0462007E */  bltzl     $v1, .LE00026A8
/* 327DA0 E00024B0 26520001 */   addiu    $s2, $s2, 0x1
/* 327DA4 E00024B4 8E020004 */  lw        $v0, 0x4($s0)
/* 327DA8 E00024B8 0443007B */  bgezl     $v0, .LE00026A8
/* 327DAC E00024BC 26520001 */   addiu    $s2, $s2, 0x1
/* 327DB0 E00024C0 0060882D */  daddu     $s1, $v1, $zero
/* 327DB4 E00024C4 2A220011 */  slti      $v0, $s1, 0x11
/* 327DB8 E00024C8 50400001 */  beql      $v0, $zero, .LE00024D0
/* 327DBC E00024CC 24110010 */   addiu    $s1, $zero, 0x10
.LE00024D0:
/* 327DC0 E00024D0 00121080 */  sll       $v0, $s2, 2
/* 327DC4 E00024D4 3C01E000 */  lui       $at, (0xE00027B0 >> 16)
/* 327DC8 E00024D8 00220821 */  addu      $at, $at, $v0
/* 327DCC E00024DC C42027B0 */  lwc1      $f0, (0xE00027B0 & 0xFFFF)($at)
/* 327DD0 E00024E0 4405B000 */  mfc1      $a1, $f22
/* 327DD4 E00024E4 4406B000 */  mfc1      $a2, $f22
/* 327DD8 E00024E8 E7A00010 */  swc1      $f0, 0x10($sp)
/* 327DDC E00024EC C6000014 */  lwc1      $f0, 0x14($s0)
/* 327DE0 E00024F0 E7A00014 */  swc1      $f0, 0x14($sp)
/* 327DE4 E00024F4 C6000018 */  lwc1      $f0, 0x18($s0)
/* 327DE8 E00024F8 E7B6001C */  swc1      $f22, 0x1C($sp)
/* 327DEC E00024FC E7A00018 */  swc1      $f0, 0x18($sp)
/* 327DF0 E0002500 3C07E000 */  lui       $a3, (0xE00027D8 >> 16)
/* 327DF4 E0002504 00E23821 */  addu      $a3, $a3, $v0
/* 327DF8 E0002508 8CE727D8 */  lw        $a3, (0xE00027D8 & 0xFFFF)($a3)
/* 327DFC E000250C 0C080180 */  jal       shim_guPositionF
/* 327E00 E0002510 27A40020 */   addiu    $a0, $sp, 0x20
/* 327E04 E0002514 27A40020 */  addiu     $a0, $sp, 0x20
/* 327E08 E0002518 96E50000 */  lhu       $a1, 0x0($s7)
/* 327E0C E000251C 8FC20000 */  lw        $v0, 0x0($fp)
/* 327E10 E0002520 00052980 */  sll       $a1, $a1, 6
/* 327E14 E0002524 00B62821 */  addu      $a1, $a1, $s6
/* 327E18 E0002528 0C080118 */  jal       shim_guMtxF2L
/* 327E1C E000252C 00452821 */   addu     $a1, $v0, $a1
/* 327E20 E0002530 8E620000 */  lw        $v0, 0x0($s3)
/* 327E24 E0002534 0040282D */  daddu     $a1, $v0, $zero
/* 327E28 E0002538 24420008 */  addiu     $v0, $v0, 0x8
/* 327E2C E000253C AE620000 */  sw        $v0, 0x0($s3)
/* 327E30 E0002540 96E40000 */  lhu       $a0, 0x0($s7)
/* 327E34 E0002544 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 327E38 E0002548 ACA20000 */  sw        $v0, 0x0($a1)
/* 327E3C E000254C 8FC30000 */  lw        $v1, 0x0($fp)
/* 327E40 E0002550 3082FFFF */  andi      $v0, $a0, 0xFFFF
/* 327E44 E0002554 00021180 */  sll       $v0, $v0, 6
/* 327E48 E0002558 00561021 */  addu      $v0, $v0, $s6
/* 327E4C E000255C 00621821 */  addu      $v1, $v1, $v0
/* 327E50 E0002560 ACA30004 */  sw        $v1, 0x4($a1)
/* 327E54 E0002564 86820000 */  lh        $v0, 0x0($s4)
/* 327E58 E0002568 24840001 */  addiu     $a0, $a0, 0x1
/* 327E5C E000256C A6E40000 */  sh        $a0, 0x0($s7)
/* 327E60 E0002570 86030000 */  lh        $v1, 0x0($s0)
/* 327E64 E0002574 2442FFFF */  addiu     $v0, $v0, -0x1
/* 327E68 E0002578 44826000 */  mtc1      $v0, $f12
/* 327E6C E000257C 00000000 */  nop
/* 327E70 E0002580 46806320 */  cvt.s.w   $f12, $f12
/* 327E74 E0002584 44831000 */  mtc1      $v1, $f2
/* 327E78 E0002588 00000000 */  nop
/* 327E7C E000258C 468010A0 */  cvt.s.w   $f2, $f2
/* 327E80 E0002590 460C103E */  c.le.s    $f2, $f12
/* 327E84 E0002594 00000000 */  nop
/* 327E88 E0002598 45000004 */  bc1f      .LE00025AC
/* 327E8C E000259C 240700FF */   addiu    $a3, $zero, 0xFF
/* 327E90 E00025A0 8EA80018 */  lw        $t0, 0x18($s5)
/* 327E94 E00025A4 0800098B */  j         .LE000262C
/* 327E98 E00025A8 3C06D838 */   lui      $a2, (0xD8380002 >> 16)
.LE00025AC:
/* 327E9C E00025AC 46146302 */  mul.s     $f12, $f12, $f20
/* 327EA0 E00025B0 00000000 */  nop
/* 327EA4 E00025B4 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 327EA8 E00025B8 44810000 */  mtc1      $at, $f0
/* 327EAC E00025BC 46026303 */  div.s     $f12, $f12, $f2
/* 327EB0 E00025C0 46006302 */  mul.s     $f12, $f12, $f0
/* 327EB4 E00025C4 00000000 */  nop
/* 327EB8 E00025C8 0C080140 */  jal       shim_sin_deg
/* 327EBC E00025CC 46146303 */   div.s    $f12, $f12, $f20
/* 327EC0 E00025D0 46140082 */  mul.s     $f2, $f0, $f20
/* 327EC4 E00025D4 00000000 */  nop
/* 327EC8 E00025D8 3C01437F */  lui       $at, (0x437F0000 >> 16)
/* 327ECC E00025DC 44810000 */  mtc1      $at, $f0
/* 327ED0 E00025E0 00000000 */  nop
/* 327ED4 E00025E4 46001002 */  mul.s     $f0, $f2, $f0
/* 327ED8 E00025E8 00000000 */  nop
/* 327EDC E00025EC 4600010D */  trunc.w.s $f4, $f0
/* 327EE0 E00025F0 44032000 */  mfc1      $v1, $f4
/* 327EE4 E00025F4 00000000 */  nop
/* 327EE8 E00025F8 04610002 */  bgez      $v1, .LE0002604
/* 327EEC E00025FC 0060102D */   daddu    $v0, $v1, $zero
/* 327EF0 E0002600 246200FF */  addiu     $v0, $v1, 0xFF
.LE0002604:
/* 327EF4 E0002604 00023A03 */  sra       $a3, $v0, 8
/* 327EF8 E0002608 00071200 */  sll       $v0, $a3, 8
/* 327EFC E000260C 00623823 */  subu      $a3, $v1, $v0
/* 327F00 E0002610 4600110D */  trunc.w.s $f4, $f2
/* 327F04 E0002614 44022000 */  mfc1      $v0, $f4
/* 327F08 E0002618 00000000 */  nop
/* 327F0C E000261C 00021080 */  sll       $v0, $v0, 2
/* 327F10 E0002620 00551021 */  addu      $v0, $v0, $s5
/* 327F14 E0002624 8C480000 */  lw        $t0, 0x0($v0)
/* 327F18 E0002628 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
.LE000262C:
/* 327F1C E000262C 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 327F20 E0002630 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 327F24 E0002634 001118C0 */  sll       $v1, $s1, 3
/* 327F28 E0002638 8E640000 */  lw        $a0, 0x0($s3)
/* 327F2C E000263C 00711823 */  subu      $v1, $v1, $s1
/* 327F30 E0002640 0080282D */  daddu     $a1, $a0, $zero
/* 327F34 E0002644 24840008 */  addiu     $a0, $a0, 0x8
/* 327F38 E0002648 AE640000 */  sw        $a0, 0x0($s3)
/* 327F3C E000264C ACA20000 */  sw        $v0, 0x0($a1)
/* 327F40 E0002650 00031100 */  sll       $v0, $v1, 4
/* 327F44 E0002654 00431023 */  subu      $v0, $v0, $v1
/* 327F48 E0002658 000210C2 */  srl       $v0, $v0, 3
/* 327F4C E000265C 304200FF */  andi      $v0, $v0, 0xFF
/* 327F50 E0002660 ACA20004 */  sw        $v0, 0x4($a1)
/* 327F54 E0002664 24820008 */  addiu     $v0, $a0, 0x8
/* 327F58 E0002668 AE620000 */  sw        $v0, 0x0($s3)
/* 327F5C E000266C 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 327F60 E0002670 AC820000 */  sw        $v0, 0x0($a0)
/* 327F64 E0002674 30E200FF */  andi      $v0, $a3, 0xFF
/* 327F68 E0002678 AC820004 */  sw        $v0, 0x4($a0)
/* 327F6C E000267C 24820010 */  addiu     $v0, $a0, 0x10
/* 327F70 E0002680 AE620000 */  sw        $v0, 0x0($s3)
/* 327F74 E0002684 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 327F78 E0002688 AC820008 */  sw        $v0, 0x8($a0)
/* 327F7C E000268C 24820018 */  addiu     $v0, $a0, 0x18
/* 327F80 E0002690 AC88000C */  sw        $t0, 0xC($a0)
/* 327F84 E0002694 AE620000 */  sw        $v0, 0x0($s3)
/* 327F88 E0002698 24020040 */  addiu     $v0, $zero, 0x40
/* 327F8C E000269C AC860010 */  sw        $a2, 0x10($a0)
/* 327F90 E00026A0 AC820014 */  sw        $v0, 0x14($a0)
/* 327F94 E00026A4 26520001 */  addiu     $s2, $s2, 0x1
.LE00026A8:
/* 327F98 E00026A8 8FA90098 */  lw        $t1, 0x98($sp)
/* 327F9C E00026AC 2610002C */  addiu     $s0, $s0, 0x2C
/* 327FA0 E00026B0 8D220008 */  lw        $v0, 0x8($t1)
/* 327FA4 E00026B4 0242102A */  slt       $v0, $s2, $v0
/* 327FA8 E00026B8 1440FF7B */  bnez      $v0, .LE00024A8
/* 327FAC E00026BC 2694002C */   addiu    $s4, $s4, 0x2C
.LE00026C0:
/* 327FB0 E00026C0 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 327FB4 E00026C4 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 327FB8 E00026C8 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 327FBC E00026CC 8C820000 */  lw        $v0, 0x0($a0)
/* 327FC0 E00026D0 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 327FC4 E00026D4 0040282D */  daddu     $a1, $v0, $zero
/* 327FC8 E00026D8 24420008 */  addiu     $v0, $v0, 0x8
/* 327FCC E00026DC AC820000 */  sw        $v0, 0x0($a0)
/* 327FD0 E00026E0 ACA30000 */  sw        $v1, 0x0($a1)
/* 327FD4 E00026E4 24030040 */  addiu     $v1, $zero, 0x40
/* 327FD8 E00026E8 ACA30004 */  sw        $v1, 0x4($a1)
/* 327FDC E00026EC 24430008 */  addiu     $v1, $v0, 0x8
/* 327FE0 E00026F0 AC830000 */  sw        $v1, 0x0($a0)
/* 327FE4 E00026F4 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 327FE8 E00026F8 AC430000 */  sw        $v1, 0x0($v0)
/* 327FEC E00026FC AC400004 */  sw        $zero, 0x4($v0)
/* 327FF0 E0002700 8FBF0084 */  lw        $ra, 0x84($sp)
/* 327FF4 E0002704 8FBE0080 */  lw        $fp, 0x80($sp)
/* 327FF8 E0002708 8FB7007C */  lw        $s7, 0x7C($sp)
/* 327FFC E000270C 8FB60078 */  lw        $s6, 0x78($sp)
/* 328000 E0002710 8FB50074 */  lw        $s5, 0x74($sp)
/* 328004 E0002714 8FB40070 */  lw        $s4, 0x70($sp)
/* 328008 E0002718 8FB3006C */  lw        $s3, 0x6C($sp)
/* 32800C E000271C 8FB20068 */  lw        $s2, 0x68($sp)
/* 328010 E0002720 8FB10064 */  lw        $s1, 0x64($sp)
/* 328014 E0002724 8FB00060 */  lw        $s0, 0x60($sp)
/* 328018 E0002728 D7B60090 */  ldc1      $f22, 0x90($sp)
/* 32801C E000272C D7B40088 */  ldc1      $f20, 0x88($sp)
/* 328020 E0002730 03E00008 */  jr        $ra
/* 328024 E0002734 27BD0098 */   addiu    $sp, $sp, 0x98

### DECOMPILED C INSTRUCTIONS:

void big_smoke_puff_appendGfx(void* effect) {
    EffectInstance* eff = (EffectInstance*)effect;
    BigSmokePuffFXData* data = ((EffectInstance*)effect)->data.bigSmokePuff;
    Matrix4f mtx;
    s32 i;

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

    shim_guPositionF(mtx, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, data->x, data->y, data->z);
    shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, data++) {
        if (data->unk_02 >= 0 && data->unk_08 < 0) {
            s32 primAlpha = data->unk_02;
            f32 temp_f12;
            s32 envAlpha;
            Gfx* dlist;

            if (primAlpha > 16) {
                primAlpha = 16;
            }

            shim_guPositionF(mtx, 0.0f, 0.0f, sPartYaws[i], sPartScales[i], data->partX,
                             data->partY, 0.0f);
            shim_guMtxF2L(mtx, &gDisplayContext->matrixStack[gMatrixListPos]);

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

            temp_f12 = data->unk_00 - 1;

            if (data->unk_04 <= temp_f12) {
                envAlpha = 255;
                dlist = sDlists[ARRAY_COUNT(sDlists) - 1];
            } else {
                f32 temp = shim_sin_deg((((temp_f12 * 7.0f) / data->unk_04) * 90.0f) / 7.0f) * 7.0f;

                envAlpha = (s32)(temp * 255.0f) % 256;
                dlist = sDlists[(s32)temp];
            }

            gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, (u32)(primAlpha * 105) / 8);
            gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, envAlpha);
            gSPDisplayList(gMainGfxPos++, dlist);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel state_step_unpause
/* 1003C 80034C3C 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 10040 80034C40 AFB00018 */  sw        $s0, 0x18($sp)
/* 10044 80034C44 3C10800A */  lui       $s0, %hi(D_800A0921)
/* 10048 80034C48 26100921 */  addiu     $s0, $s0, %lo(D_800A0921)
/* 1004C 80034C4C AFBF0024 */  sw        $ra, 0x24($sp)
/* 10050 80034C50 AFB20020 */  sw        $s2, 0x20($sp)
/* 10054 80034C54 AFB1001C */  sw        $s1, 0x1C($sp)
/* 10058 80034C58 82030000 */  lb        $v1, 0x0($s0)
/* 1005C 80034C5C 24020003 */  addiu     $v0, $zero, 0x3
/* 10060 80034C60 106200B8 */  beq       $v1, $v0, .L80034F44
/* 10064 80034C64 28620004 */   slti     $v0, $v1, 0x4
/* 10068 80034C68 14400006 */  bnez      $v0, .L80034C84
/* 1006C 80034C6C 28620002 */   slti     $v0, $v1, 0x2
/* 10070 80034C70 24020004 */  addiu     $v0, $zero, 0x4
/* 10074 80034C74 106200CA */  beq       $v1, $v0, .L80034FA0
/* 10078 80034C78 00000000 */   nop
/* 1007C 80034C7C 0800D3F6 */  j         .L80034FD8
/* 10080 80034C80 00000000 */   nop
.L80034C84:
/* 10084 80034C84 104000D4 */  beqz      $v0, .L80034FD8
/* 10088 80034C88 00000000 */   nop
/* 1008C 80034C8C 046000D2 */  bltz      $v1, .L80034FD8
/* 10090 80034C90 24020004 */   addiu    $v0, $zero, 0x4
/* 10094 80034C94 3C06800A */  lui       $a2, %hi(D_800A0920)
/* 10098 80034C98 24C60920 */  addiu     $a2, $a2, %lo(D_800A0920)
/* 1009C 80034C9C 80C30000 */  lb        $v1, 0x0($a2)
/* 100A0 80034CA0 14620007 */  bne       $v1, $v0, .L80034CC0
/* 100A4 80034CA4 00000000 */   nop
/* 100A8 80034CA8 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 100AC 80034CAC 2463A650 */  addiu     $v1, $v1, %lo(gOverrideFlags)
/* 100B0 80034CB0 8C620000 */  lw        $v0, 0x0($v1)
/* 100B4 80034CB4 34420008 */  ori       $v0, $v0, 0x8
/* 100B8 80034CB8 AC620000 */  sw        $v0, 0x0($v1)
/* 100BC 80034CBC 80C30000 */  lb        $v1, 0x0($a2)
.L80034CC0:
/* 100C0 80034CC0 046000C5 */  bltz      $v1, .L80034FD8
/* 100C4 80034CC4 90C20000 */   lbu      $v0, 0x0($a2)
/* 100C8 80034CC8 10600005 */  beqz      $v1, .L80034CE0
/* 100CC 80034CCC 2442FFFF */   addiu    $v0, $v0, -0x1
/* 100D0 80034CD0 A0C20000 */  sb        $v0, 0x0($a2)
/* 100D4 80034CD4 00021600 */  sll       $v0, $v0, 24
/* 100D8 80034CD8 144000BF */  bnez      $v0, .L80034FD8
/* 100DC 80034CDC 00000000 */   nop
.L80034CE0:
/* 100E0 80034CE0 3C048007 */  lui       $a0, %hi(pause_frameBuffers)
/* 100E4 80034CE4 24847950 */  addiu     $a0, $a0, %lo(pause_frameBuffers)
/* 100E8 80034CE8 24050003 */  addiu     $a1, $zero, 0x3
/* 100EC 80034CEC 2402FFFF */  addiu     $v0, $zero, -0x1
/* 100F0 80034CF0 0C017CBC */  jal       nuGfxSetCfb
/* 100F4 80034CF4 A0C20000 */   sb       $v0, 0x0($a2)
/* 100F8 80034CF8 0C0911C2 */  jal       func_80244708
/* 100FC 80034CFC 00000000 */   nop
/* 10100 80034D00 3C04800A */  lui       $a0, %hi(gOverrideFlags)
/* 10104 80034D04 2484A650 */  addiu     $a0, $a0, %lo(gOverrideFlags)
/* 10108 80034D08 8C820000 */  lw        $v0, 0x0($a0)
/* 1010C 80034D0C 2403FFF7 */  addiu     $v1, $zero, -0x9
/* 10110 80034D10 00431024 */  and       $v0, $v0, $v1
/* 10114 80034D14 0C016AFA */  jal       get_current_map_settings
/* 10118 80034D18 AC820000 */   sw       $v0, 0x0($a0)
/* 1011C 80034D1C 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* 10120 80034D20 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* 10124 80034D24 8E040000 */  lw        $a0, 0x0($s0)
/* 10128 80034D28 84830086 */  lh        $v1, 0x86($a0)
/* 1012C 80034D2C 00031900 */  sll       $v1, $v1, 4
/* 10130 80034D30 3C068009 */  lui       $a2, %hi(gAreas + 0x4)
/* 10134 80034D34 00C33021 */  addu      $a2, $a2, $v1
/* 10138 80034D38 8CC634F4 */  lw        $a2, %lo(gAreas + 0x4)($a2)
/* 1013C 80034D3C 0040902D */  daddu     $s2, $v0, $zero
/* 10140 80034D40 A0800070 */  sb        $zero, 0x70($a0)
/* 10144 80034D44 8484008C */  lh        $a0, 0x8C($a0)
/* 10148 80034D48 8E050000 */  lw        $a1, 0x0($s0)
/* 1014C 80034D4C 00042140 */  sll       $a0, $a0, 5
/* 10150 80034D50 94A30148 */  lhu       $v1, 0x148($a1)
/* 10154 80034D54 00C48821 */  addu      $s1, $a2, $a0
/* 10158 80034D58 3063FF0F */  andi      $v1, $v1, 0xFF0F
/* 1015C 80034D5C 0C016BE1 */  jal       func_8005AF84
/* 10160 80034D60 A4A30148 */   sh       $v1, 0x148($a1)
/* 10164 80034D64 0C00AB37 */  jal       func_8002ACDC
/* 10168 80034D68 00000000 */   nop
/* 1016C 80034D6C 0C018030 */  jal       nuContRmbForceStopEnd
/* 10170 80034D70 00000000 */   nop
/* 10174 80034D74 0C05259C */  jal       sfx_clear_env_sounds
/* 10178 80034D78 24040001 */   addiu    $a0, $zero, 0x1
/* 1017C 80034D7C 8E020000 */  lw        $v0, 0x0($s0)
/* 10180 80034D80 0C0B763E */  jal       spr_init_sprites
/* 10184 80034D84 80440084 */   lb       $a0, 0x84($v0)
/* 10188 80034D88 0C0457FA */  jal       init_model_data
/* 1018C 80034D8C 00000000 */   nop
/* 10190 80034D90 0C05203C */  jal       init_sprite_shading_data
/* 10194 80034D94 00000000 */   nop
/* 10198 80034D98 0C048316 */  jal       init_entity_models
/* 1019C 80034D9C 00000000 */   nop
/* 101A0 80034DA0 0C0478C4 */  jal       reset_animator_list
/* 101A4 80034DA4 00000000 */   nop
/* 101A8 80034DA8 0C048C45 */  jal       init_worker_list
/* 101AC 80034DAC 00000000 */   nop
/* 101B0 80034DB0 0000202D */  daddu     $a0, $zero, $zero
/* 101B4 80034DB4 0C0514BA */  jal       hud_element_set_aux_cache
/* 101B8 80034DB8 0080282D */   daddu    $a1, $a0, $zero
/* 101BC 80034DBC 0C0504C0 */  jal       init_hud_element_list
/* 101C0 80034DC0 00000000 */   nop
/* 101C4 80034DC4 0C04C433 */  jal       init_item_entity_list
/* 101C8 80034DC8 00000000 */   nop
/* 101CC 80034DCC 0C0B0CBB */  jal       init_script_list
/* 101D0 80034DD0 00000000 */   nop
/* 101D4 80034DD4 0C00E14B */  jal       init_npc_list
/* 101D8 80034DD8 00000000 */   nop
/* 101DC 80034DDC 0C044396 */  jal       init_entity_data
/* 101E0 80034DE0 00000000 */   nop
/* 101E4 80034DE4 0C0515CA */  jal       init_trigger_list
/* 101E8 80034DE8 00000000 */   nop
/* 101EC 80034DEC 3C04800A */  lui       $a0, %hi(SavedReverbMode)
/* 101F0 80034DF0 8C840924 */  lw        $a0, %lo(SavedReverbMode)($a0)
/* 101F4 80034DF4 0C0525FF */  jal       sfx_set_reverb_mode
/* 101F8 80034DF8 00000000 */   nop
/* 101FC 80034DFC 0C052B1C */  jal       bgm_reset_max_volume
/* 10200 80034E00 00000000 */   nop
/* 10204 80034E04 0C0169B0 */  jal       load_map_script_lib
/* 10208 80034E08 00000000 */   nop
/* 1020C 80034E0C 3C04800E */  lui       $a0, %hi(wMapShapeName)
/* 10210 80034E10 24849230 */  addiu     $a0, $a0, %lo(wMapShapeName)
/* 10214 80034E14 0C016B3A */  jal       load_asset_by_name
/* 10218 80034E18 27A50010 */   addiu    $a1, $sp, 0x10
/* 1021C 80034E1C 0040802D */  daddu     $s0, $v0, $zero
/* 10220 80034E20 3C058021 */  lui       $a1, %hi(gMapShapeData)
/* 10224 80034E24 24A50000 */  addiu     $a1, $a1, %lo(gMapShapeData)
/* 10228 80034E28 0C01BB7C */  jal       decode_yay0
/* 1022C 80034E2C 0200202D */   daddu    $a0, $s0, $zero
/* 10230 80034E30 0C00AB1E */  jal       general_heap_free
/* 10234 80034E34 0200202D */   daddu    $a0, $s0, $zero
/* 10238 80034E38 0C016BE5 */  jal       initialize_collision
/* 1023C 80034E3C 00000000 */   nop
/* 10240 80034E40 0C016C16 */  jal       restore_map_collision_data
/* 10244 80034E44 00000000 */   nop
/* 10248 80034E48 8E240008 */  lw        $a0, 0x8($s1)
/* 1024C 80034E4C 10800004 */  beqz      $a0, .L80034E60
/* 10250 80034E50 00000000 */   nop
/* 10254 80034E54 8E25000C */  lw        $a1, 0xC($s1)
/* 10258 80034E58 0C00A5CF */  jal       dma_copy
/* 1025C 80034E5C 8E260010 */   lw       $a2, 0x10($s1)
.L80034E60:
/* 10260 80034E60 0C05175C */  jal       load_map_bg
/* 10264 80034E64 8E240014 */   lw       $a0, 0x14($s1)
/* 10268 80034E68 8E440038 */  lw        $a0, 0x38($s2)
/* 1026C 80034E6C 50800005 */  beql      $a0, $zero, .L80034E84
/* 10270 80034E70 24040128 */   addiu    $a0, $zero, 0x128
/* 10274 80034E74 0C05178A */  jal       read_background_size
/* 10278 80034E78 00000000 */   nop
/* 1027C 80034E7C 0800D3A5 */  j         .L80034E94
/* 10280 80034E80 00000000 */   nop
.L80034E84:
/* 10284 80034E84 240500C8 */  addiu     $a1, $zero, 0xC8
/* 10288 80034E88 2406000C */  addiu     $a2, $zero, 0xC
/* 1028C 80034E8C 0C05179C */  jal       set_background_size
/* 10290 80034E90 24070014 */   addiu    $a3, $zero, 0x14
.L80034E94:
/* 10294 80034E94 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 10298 80034E98 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 1029C 80034E9C 9462015E */  lhu       $v0, 0x15E($v1)
/* 102A0 80034EA0 0C04584B */  jal       calculate_model_sizes
/* 102A4 80034EA4 A462015C */   sh       $v0, 0x15C($v1)
/* 102A8 80034EA8 0C00EC6C */  jal       npc_reload_all
/* 102AC 80034EAC 00000000 */   nop
/* 102B0 80034EB0 0C051FB1 */  jal       set_windows_visible
/* 102B4 80034EB4 0000202D */   daddu    $a0, $zero, $zero
/* 102B8 80034EB8 0C03A631 */  jal       status_bar_respond_to_changes
/* 102BC 80034EBC 00000000 */   nop
/* 102C0 80034EC0 0C009C22 */  jal       set_time_freeze_mode
/* 102C4 80034EC4 24040001 */   addiu    $a0, $zero, 0x1
/* 102C8 80034EC8 24020003 */  addiu     $v0, $zero, 0x3
/* 102CC 80034ECC 3C048011 */  lui       $a0, %hi(gPlayerStatus)
/* 102D0 80034ED0 2484EFC8 */  addiu     $a0, $a0, %lo(gPlayerStatus)
/* 102D4 80034ED4 3C01800A */  lui       $at, %hi(D_800A0921)
/* 102D8 80034ED8 A0220921 */  sb        $v0, %lo(D_800A0921)($at)
/* 102DC 80034EDC 9082000E */  lbu       $v0, 0xE($a0)
/* 102E0 80034EE0 3C03802E */  lui       $v1, %hi(D_802D9D70)
/* 102E4 80034EE4 90639D70 */  lbu       $v1, %lo(D_802D9D70)($v1)
/* 102E8 80034EE8 2442FFFF */  addiu     $v0, $v0, -0x1
/* 102EC 80034EEC 24630001 */  addiu     $v1, $v1, 0x1
/* 102F0 80034EF0 A082000F */  sb        $v0, 0xF($a0)
/* 102F4 80034EF4 3C01802E */  lui       $at, %hi(D_802D9D71)
/* 102F8 80034EF8 A0239D71 */  sb        $v1, %lo(D_802D9D71)($at)
/* 102FC 80034EFC 0C00F949 */  jal       update_encounters
/* 10300 80034F00 00000000 */   nop
/* 10304 80034F04 0C00E64C */  jal       update_npcs
/* 10308 80034F08 00000000 */   nop
/* 1030C 80034F0C 0C037DD0 */  jal       update_player
/* 10310 80034F10 00000000 */   nop
/* 10314 80034F14 0C016754 */  jal       update_effects
/* 10318 80034F18 00000000 */   nop
/* 1031C 80034F1C 3C03800A */  lui       $v1, %hi(D_800A0922)
/* 10320 80034F20 24630922 */  addiu     $v1, $v1, %lo(D_800A0922)
/* 10324 80034F24 94620000 */  lhu       $v0, 0x0($v1)
/* 10328 80034F28 2442FFEC */  addiu     $v0, $v0, -0x14
/* 1032C 80034F2C A4620000 */  sh        $v0, 0x0($v1)
/* 10330 80034F30 00021400 */  sll       $v0, $v0, 16
/* 10334 80034F34 04420028 */  bltzl     $v0, .L80034FD8
/* 10338 80034F38 A4600000 */   sh       $zero, 0x0($v1)
/* 1033C 80034F3C 0800D3F6 */  j         .L80034FD8
/* 10340 80034F40 00000000 */   nop
.L80034F44:
/* 10344 80034F44 0C00F949 */  jal       update_encounters
/* 10348 80034F48 00000000 */   nop
/* 1034C 80034F4C 0C00E64C */  jal       update_npcs
/* 10350 80034F50 00000000 */   nop
/* 10354 80034F54 0C037DD0 */  jal       update_player
/* 10358 80034F58 00000000 */   nop
/* 1035C 80034F5C 0C016754 */  jal       update_effects
/* 10360 80034F60 00000000 */   nop
/* 10364 80034F64 3C04800A */  lui       $a0, %hi(D_800A0922)
/* 10368 80034F68 24840922 */  addiu     $a0, $a0, %lo(D_800A0922)
/* 1036C 80034F6C 84820000 */  lh        $v0, 0x0($a0)
/* 10370 80034F70 94830000 */  lhu       $v1, 0x0($a0)
/* 10374 80034F74 14400004 */  bnez      $v0, .L80034F88
/* 10378 80034F78 2462FFEC */   addiu    $v0, $v1, -0x14
/* 1037C 80034F7C 24020004 */  addiu     $v0, $zero, 0x4
/* 10380 80034F80 0800D3F6 */  j         .L80034FD8
/* 10384 80034F84 A2020000 */   sb       $v0, 0x0($s0)
.L80034F88:
/* 10388 80034F88 A4820000 */  sh        $v0, 0x0($a0)
/* 1038C 80034F8C 00021400 */  sll       $v0, $v0, 16
/* 10390 80034F90 04420011 */  bltzl     $v0, .L80034FD8
/* 10394 80034F94 A4800000 */   sh       $zero, 0x0($a0)
/* 10398 80034F98 0800D3F6 */  j         .L80034FD8
/* 1039C 80034F9C 00000000 */   nop
.L80034FA0:
/* 103A0 80034FA0 0C009C22 */  jal       set_time_freeze_mode
/* 103A4 80034FA4 0000202D */   daddu    $a0, $zero, $zero
/* 103A8 80034FA8 0C00F949 */  jal       update_encounters
/* 103AC 80034FAC 00000000 */   nop
/* 103B0 80034FB0 0C00E64C */  jal       update_npcs
/* 103B4 80034FB4 00000000 */   nop
/* 103B8 80034FB8 0C037DD0 */  jal       update_player
/* 103BC 80034FBC 00000000 */   nop
/* 103C0 80034FC0 0C016754 */  jal       update_effects
/* 103C4 80034FC4 00000000 */   nop
/* 103C8 80034FC8 0C038069 */  jal       enable_player_input
/* 103CC 80034FCC 00000000 */   nop
/* 103D0 80034FD0 0C00CD3C */  jal       set_game_mode
/* 103D4 80034FD4 24040004 */   addiu    $a0, $zero, 0x4
.L80034FD8:
/* 103D8 80034FD8 8FBF0024 */  lw        $ra, 0x24($sp)
/* 103DC 80034FDC 8FB20020 */  lw        $s2, 0x20($sp)
/* 103E0 80034FE0 8FB1001C */  lw        $s1, 0x1C($sp)
/* 103E4 80034FE4 8FB00018 */  lw        $s0, 0x18($sp)
/* 103E8 80034FE8 03E00008 */  jr        $ra
/* 103EC 80034FEC 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void state_step_unpause(void) {
    switch (D_800A0921) {
        case 0:
        case 1:
            if (D_800A0920 == 4) {
                gOverrideFlags |= GLOBAL_OVERRIDES_8;
            }

            if (D_800A0920 >= 0) {
                if (D_800A0920 != 0) {
                    D_800A0920--;
                }

                if (D_800A0920 == 0) {
                    if (D_800A0920 == 0) {
                        MapSettings* mapSettings;
                        MapConfig* mapConfig;
                        void* mapShape;
                        s32 assetSize;

                        D_800A0920 = -1;
                        nuGfxSetCfb(pause_frameBuffers, ARRAY_COUNT(pause_frameBuffers));
                        pause_cleanup();
                        gOverrideFlags &= ~GLOBAL_OVERRIDES_8;
                        mapSettings = get_current_map_settings();
                        mapConfig = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID];
                        gGameStatusPtr->isBattle = FALSE;
                        gGameStatusPtr->backgroundFlags &= ~BACKGROUND_RENDER_STATE_MASK;
                        func_8005AF84();
                        func_8002ACDC();
                        nuContRmbForceStopEnd();
                        sfx_clear_env_sounds(1);
                        spr_init_sprites(gGameStatusPtr->playerSpriteSet);
                        init_model_data();
                        init_sprite_shading_data();
                        init_entity_models();
                        reset_animator_list();
                        init_worker_list();
                        hud_element_set_aux_cache(0, 0);
                        init_hud_element_list();
                        init_item_entity_list();
                        init_script_list();
                        init_npc_list();
                        init_entity_data();
                        init_trigger_list();
                        sfx_set_reverb_mode(SavedReverbMode);
                        bgm_reset_max_volume();
                        load_map_script_lib();
                        mapShape = load_asset_by_name(wMapShapeName, &assetSize);
                        decode_yay0(mapShape, &gMapShapeData);
                        general_heap_free(mapShape);
                        initialize_collision();
                        restore_map_collision_data();

                        if (mapConfig->dmaStart != NULL) {
                            dma_copy(mapConfig->dmaStart, mapConfig->dmaEnd, mapConfig->dmaDest);
                        }

                        load_map_bg(mapConfig->bgName);
                        if (mapSettings->background != NULL) {
                            read_background_size(mapSettings->background);
                        } else {
                            set_background_size(296, 200, 12, 20);
                        }

                        gGameStatusPtr->backgroundDarkness = gGameStatusPtr->savedBackgroundDarkness;
                        calculate_model_sizes();
                        npc_reload_all();
                        set_windows_visible(WINDOW_GROUP_ALL);
                        status_bar_respond_to_changes();
                        set_time_freeze_mode(TIME_FREEZE_PARTIAL);
                        D_800A0921 = 3;
                        gPlayerStatus.alpha2 = gPlayerStatus.alpha1 - 1;
                        D_802D9D71 = D_802D9D70 + 1;

                        update_encounters();
                        update_npcs();
                        update_player();
                        update_effects();

                        D_800A0922 -= 20;
                        if (D_800A0922 < 0) {
                            D_800A0922 = 0;
                        }
                    }
                }
            }
            break;
        case 3:
            update_encounters();
            update_npcs();
            update_player();
            update_effects();

            if (D_800A0922 == 0) {
                D_800A0921 = 4;
            } else {
                D_800A0922 -= 20;
                if (D_800A0922 < 0) {
                    D_800A0922 = 0;
                }
            }
            break;
        case 4:
            set_time_freeze_mode(TIME_FREEZE_NORMAL);
            update_encounters();
            update_npcs();
            update_player();
            update_effects();
            enable_player_input();
            set_game_mode(GAME_MODE_CHANGE_MAP);
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel spiky_white_aura_main
/* 34DD20 E0038000 27BDFF38 */  addiu     $sp, $sp, -0xC8
/* 34DD24 E0038004 F7BE00C0 */  sdc1      $f30, 0xC0($sp)
/* 34DD28 E0038008 4485F000 */  mtc1      $a1, $f30
/* 34DD2C E003800C F7B600A0 */  sdc1      $f22, 0xA0($sp)
/* 34DD30 E0038010 4480B000 */  mtc1      $zero, $f22
/* 34DD34 E0038014 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 34DD38 E0038018 44816000 */  mtc1      $at, $f12
/* 34DD3C E003801C F7B800A8 */  sdc1      $f24, 0xA8($sp)
/* 34DD40 E0038020 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* 34DD44 E0038024 4481C000 */  mtc1      $at, $f24
/* 34DD48 E0038028 AFBF0094 */  sw        $ra, 0x94($sp)
/* 34DD4C E003802C AFBE0090 */  sw        $fp, 0x90($sp)
/* 34DD50 E0038030 AFB7008C */  sw        $s7, 0x8C($sp)
/* 34DD54 E0038034 AFB60088 */  sw        $s6, 0x88($sp)
/* 34DD58 E0038038 AFB50084 */  sw        $s5, 0x84($sp)
/* 34DD5C E003803C AFB40080 */  sw        $s4, 0x80($sp)
/* 34DD60 E0038040 AFB3007C */  sw        $s3, 0x7C($sp)
/* 34DD64 E0038044 AFB20078 */  sw        $s2, 0x78($sp)
/* 34DD68 E0038048 AFB10074 */  sw        $s1, 0x74($sp)
/* 34DD6C E003804C AFB00070 */  sw        $s0, 0x70($sp)
/* 34DD70 E0038050 F7BC00B8 */  sdc1      $f28, 0xB8($sp)
/* 34DD74 E0038054 F7BA00B0 */  sdc1      $f26, 0xB0($sp)
/* 34DD78 E0038058 F7B40098 */  sdc1      $f20, 0x98($sp)
/* 34DD7C E003805C AFA400C8 */  sw        $a0, 0xC8($sp)
/* 34DD80 E0038060 AFA600D0 */  sw        $a2, 0xD0($sp)
/* 34DD84 E0038064 AFA700D4 */  sw        $a3, 0xD4($sp)
/* 34DD88 E0038068 0C080154 */  jal       shim_sqrtf
/* 34DD8C E003806C 46006706 */   mov.s    $f28, $f12
/* 34DD90 E0038070 4600C303 */  div.s     $f12, $f24, $f0
/* 34DD94 E0038074 46166682 */  mul.s     $f26, $f12, $f22
/* 34DD98 E0038078 00000000 */  nop
/* 34DD9C E003807C 4600B506 */  mov.s     $f20, $f22
/* 34DDA0 E0038080 27B00018 */  addiu     $s0, $sp, 0x18
/* 34DDA4 E0038084 24150005 */  addiu     $s5, $zero, 0x5
/* 34DDA8 E0038088 4600D586 */  mov.s     $f22, $f26
/* 34DDAC E003808C 4614B032 */  c.eq.s    $f22, $f20
/* 34DDB0 E0038090 00000000 */  nop
/* 34DDB4 E0038094 45010005 */  bc1t      .LE00380AC
/* 34DDB8 E0038098 46006607 */   neg.s    $f24, $f12
/* 34DDBC E003809C 46166003 */  div.s     $f0, $f12, $f22
/* 34DDC0 E00380A0 4600E086 */  mov.s     $f2, $f28
/* 34DDC4 E00380A4 0800E036 */  j         .LE00380D8
/* 34DDC8 E00380A8 4600A106 */   mov.s    $f4, $f20
.LE00380AC:
/* 34DDCC E00380AC 4614C032 */  c.eq.s    $f24, $f20
/* 34DDD0 E00380B0 00000000 */  nop
/* 34DDD4 E00380B4 45010005 */  bc1t      .LE00380CC
/* 34DDD8 E00380B8 4600B007 */   neg.s    $f0, $f22
/* 34DDDC E00380BC 46180083 */  div.s     $f2, $f0, $f24
/* 34DDE0 E00380C0 4600E006 */  mov.s     $f0, $f28
/* 34DDE4 E00380C4 0800E036 */  j         .LE00380D8
/* 34DDE8 E00380C8 4600A106 */   mov.s    $f4, $f20
.LE00380CC:
/* 34DDEC E00380CC 46160103 */  div.s     $f4, $f0, $f22
/* 34DDF0 E00380D0 4600A086 */  mov.s     $f2, $f20
/* 34DDF4 E00380D4 4600E006 */  mov.s     $f0, $f28
.LE00380D8:
/* 34DDF8 E00380D8 46000002 */  mul.s     $f0, $f0, $f0
/* 34DDFC E00380DC 00000000 */  nop
/* 34DE00 E00380E0 46021082 */  mul.s     $f2, $f2, $f2
/* 34DE04 E00380E4 00000000 */  nop
/* 34DE08 E00380E8 46042102 */  mul.s     $f4, $f4, $f4
/* 34DE0C E00380EC 00000000 */  nop
/* 34DE10 E00380F0 46020000 */  add.s     $f0, $f0, $f2
/* 34DE14 E00380F4 46040300 */  add.s     $f12, $f0, $f4
/* 34DE18 E00380F8 44800000 */  mtc1      $zero, $f0
/* 34DE1C E00380FC 00000000 */  nop
/* 34DE20 E0038100 46006032 */  c.eq.s    $f12, $f0
/* 34DE24 E0038104 00000000 */  nop
/* 34DE28 E0038108 450100B2 */  bc1t      .LE00383D4
/* 34DE2C E003810C 00000000 */   nop
/* 34DE30 E0038110 0C080154 */  jal       shim_sqrtf
/* 34DE34 E0038114 00000000 */   nop
/* 34DE38 E0038118 0200202D */  daddu     $a0, $s0, $zero
/* 34DE3C E003811C 3C014190 */  lui       $at, (0x41900000 >> 16)
/* 34DE40 E0038120 44810000 */  mtc1      $at, $f0
/* 34DE44 E0038124 3C02E004 */  lui       $v0, %hi(spiky_white_aura_init)
/* 34DE48 E0038128 2442841C */  addiu     $v0, $v0, %lo(spiky_white_aura_init)
/* 34DE4C E003812C AC820008 */  sw        $v0, 0x8($a0)
/* 34DE50 E0038130 4600D682 */  mul.s     $f26, $f26, $f0
/* 34DE54 E0038134 00000000 */  nop
/* 34DE58 E0038138 3C02E004 */  lui       $v0, %hi(spiky_white_aura_update)
/* 34DE5C E003813C 24428424 */  addiu     $v0, $v0, %lo(spiky_white_aura_update)
/* 34DE60 E0038140 AC82000C */  sw        $v0, 0xC($a0)
/* 34DE64 E0038144 3C02E004 */  lui       $v0, %hi(spiky_white_aura_render)
/* 34DE68 E0038148 24428704 */  addiu     $v0, $v0, %lo(spiky_white_aura_render)
/* 34DE6C E003814C AC820010 */  sw        $v0, 0x10($a0)
/* 34DE70 E0038150 4600C602 */  mul.s     $f24, $f24, $f0
/* 34DE74 E0038154 00000000 */  nop
/* 34DE78 E0038158 2402001C */  addiu     $v0, $zero, 0x1C
/* 34DE7C E003815C AC800000 */  sw        $zero, 0x0($a0)
/* 34DE80 E0038160 AC800014 */  sw        $zero, 0x14($a0)
/* 34DE84 E0038164 4600B582 */  mul.s     $f22, $f22, $f0
/* 34DE88 E0038168 00000000 */  nop
/* 34DE8C E003816C 0C080124 */  jal       shim_create_effect_instance
/* 34DE90 E0038170 AC820004 */   sw       $v0, 0x4($a0)
/* 34DE94 E0038174 00152040 */  sll       $a0, $s5, 1
/* 34DE98 E0038178 00952021 */  addu      $a0, $a0, $s5
/* 34DE9C E003817C 00042100 */  sll       $a0, $a0, 4
/* 34DEA0 E0038180 0040802D */  daddu     $s0, $v0, $zero
/* 34DEA4 E0038184 0C08012C */  jal       shim_general_heap_malloc
/* 34DEA8 E0038188 AE150008 */   sw       $s5, 0x8($s0)
/* 34DEAC E003818C 0040902D */  daddu     $s2, $v0, $zero
/* 34DEB0 E0038190 16400003 */  bnez      $s2, .LE00381A0
/* 34DEB4 E0038194 AE12000C */   sw       $s2, 0xC($s0)
.LE0038198:
/* 34DEB8 E0038198 0800E066 */  j         .LE0038198
/* 34DEBC E003819C 00000000 */   nop
.LE00381A0:
/* 34DEC0 E00381A0 12A0008C */  beqz      $s5, .LE00383D4
/* 34DEC4 E00381A4 0000A02D */   daddu    $s4, $zero, $zero
/* 34DEC8 E00381A8 3C17800B */  lui       $s7, %hi(gCameras)
/* 34DECC E00381AC 26F71D80 */  addiu     $s7, $s7, %lo(gCameras)
/* 34DED0 E00381B0 3C168007 */  lui       $s6, %hi(gCurrentCameraID)
/* 34DED4 E00381B4 26D67410 */  addiu     $s6, $s6, %lo(gCurrentCameraID)
/* 34DED8 E00381B8 27BE0030 */  addiu     $fp, $sp, 0x30
/* 34DEDC E00381BC 26B3FFFF */  addiu     $s3, $s5, -0x1
/* 34DEE0 E00381C0 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34DEE4 E00381C4 D43C8A20 */  ldc1      $f28, -0x75E0($at)
/* 34DEE8 E00381C8 26500024 */  addiu     $s0, $s2, 0x24
/* 34DEEC E00381CC 0280882D */  daddu     $s1, $s4, $zero
.LE00381D0:
/* 34DEF0 E00381D0 8EC30000 */  lw        $v1, 0x0($s6)
/* 34DEF4 E00381D4 8FA800C8 */  lw        $t0, 0xC8($sp)
/* 34DEF8 E00381D8 00031080 */  sll       $v0, $v1, 2
/* 34DEFC E00381DC 00431021 */  addu      $v0, $v0, $v1
/* 34DF00 E00381E0 00021080 */  sll       $v0, $v0, 2
/* 34DF04 E00381E4 00431023 */  subu      $v0, $v0, $v1
/* 34DF08 E00381E8 000218C0 */  sll       $v1, $v0, 3
/* 34DF0C E00381EC 00431021 */  addu      $v0, $v0, $v1
/* 34DF10 E00381F0 AE480000 */  sw        $t0, 0x0($s2)
/* 34DF14 E00381F4 E61EFFE0 */  swc1      $f30, -0x20($s0)
/* 34DF18 E00381F8 C7A600D0 */  lwc1      $f6, 0xD0($sp)
/* 34DF1C E00381FC 000210C0 */  sll       $v0, $v0, 3
/* 34DF20 E0038200 E606FFE4 */  swc1      $f6, -0x1C($s0)
/* 34DF24 E0038204 C7A600D4 */  lwc1      $f6, 0xD4($sp)
/* 34DF28 E0038208 00571021 */  addu      $v0, $v0, $s7
/* 34DF2C E003820C E606FFE8 */  swc1      $f6, -0x18($s0)
/* 34DF30 E0038210 0C080140 */  jal       shim_sin_deg
/* 34DF34 E0038214 C44C006C */   lwc1     $f12, 0x6C($v0)
/* 34DF38 E0038218 8EC30000 */  lw        $v1, 0x0($s6)
/* 34DF3C E003821C 00031080 */  sll       $v0, $v1, 2
/* 34DF40 E0038220 00431021 */  addu      $v0, $v0, $v1
/* 34DF44 E0038224 00021080 */  sll       $v0, $v0, 2
/* 34DF48 E0038228 00431023 */  subu      $v0, $v0, $v1
/* 34DF4C E003822C 000218C0 */  sll       $v1, $v0, 3
/* 34DF50 E0038230 00431021 */  addu      $v0, $v0, $v1
/* 34DF54 E0038234 000210C0 */  sll       $v0, $v0, 3
/* 34DF58 E0038238 00571021 */  addu      $v0, $v0, $s7
/* 34DF5C E003823C C44C006C */  lwc1      $f12, 0x6C($v0)
/* 34DF60 E0038240 0C080144 */  jal       shim_cos_deg
/* 34DF64 E0038244 46000506 */   mov.s    $f20, $f0
/* 34DF68 E0038248 24020001 */  addiu     $v0, $zero, 0x1
/* 34DF6C E003824C 12A20011 */  beq       $s5, $v0, .LE0038294
/* 34DF70 E0038250 46000007 */   neg.s    $f0, $f0
/* 34DF74 E0038254 16600002 */  bnez      $s3, .LE0038260
/* 34DF78 E0038258 0233001A */   div      $zero, $s1, $s3
/* 34DF7C E003825C 0007000D */  break     7
.LE0038260:
/* 34DF80 E0038260 2401FFFF */  addiu     $at, $zero, -0x1
/* 34DF84 E0038264 16610004 */  bne       $s3, $at, .LE0038278
/* 34DF88 E0038268 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 34DF8C E003826C 16210002 */  bne       $s1, $at, .LE0038278
/* 34DF90 E0038270 00000000 */   nop
/* 34DF94 E0038274 0006000D */  break     6
.LE0038278:
/* 34DF98 E0038278 00001012 */  mflo      $v0
/* 34DF9C E003827C 2442FFCE */  addiu     $v0, $v0, -0x32
/* 34DFA0 E0038280 44821000 */  mtc1      $v0, $f2
/* 34DFA4 E0038284 00000000 */  nop
/* 34DFA8 E0038288 468010A0 */  cvt.s.w   $f2, $f2
/* 34DFAC E003828C 0800E0A7 */  j         .LE003829C
/* 34DFB0 E0038290 03C0202D */   daddu    $a0, $fp, $zero
.LE0038294:
/* 34DFB4 E0038294 44801000 */  mtc1      $zero, $f2
/* 34DFB8 E0038298 03C0202D */  daddu     $a0, $fp, $zero
.LE003829C:
/* 34DFBC E003829C 44051000 */  mfc1      $a1, $f2
/* 34DFC0 E00382A0 4406A000 */  mfc1      $a2, $f20
/* 34DFC4 E00382A4 0000382D */  daddu     $a3, $zero, $zero
/* 34DFC8 E00382A8 0C080104 */  jal       shim_guRotateF
/* 34DFCC E00382AC E7A00010 */   swc1     $f0, 0x10($sp)
/* 34DFD0 E00382B0 16600002 */  bnez      $s3, .LE00382BC
/* 34DFD4 E00382B4 0233001A */   div      $zero, $s1, $s3
/* 34DFD8 E00382B8 0007000D */  break     7
.LE00382BC:
/* 34DFDC E00382BC 2401FFFF */  addiu     $at, $zero, -0x1
/* 34DFE0 E00382C0 16610004 */  bne       $s3, $at, .LE00382D4
/* 34DFE4 E00382C4 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 34DFE8 E00382C8 16210002 */  bne       $s1, $at, .LE00382D4
/* 34DFEC E00382CC 00000000 */   nop
/* 34DFF0 E00382D0 0006000D */  break     6
.LE00382D4:
/* 34DFF4 E00382D4 00001812 */  mflo      $v1
/* 34DFF8 E00382D8 C7A00030 */  lwc1      $f0, 0x30($sp)
/* 34DFFC E00382DC 461A0002 */  mul.s     $f0, $f0, $f26
/* 34E000 E00382E0 00000000 */  nop
/* 34E004 E00382E4 C7A40040 */  lwc1      $f4, 0x40($sp)
/* 34E008 E00382E8 46182102 */  mul.s     $f4, $f4, $f24
/* 34E00C E00382EC 00000000 */  nop
/* 34E010 E00382F0 C7A20050 */  lwc1      $f2, 0x50($sp)
/* 34E014 E00382F4 46161082 */  mul.s     $f2, $f2, $f22
/* 34E018 E00382F8 00000000 */  nop
/* 34E01C E00382FC 46040000 */  add.s     $f0, $f0, $f4
/* 34E020 E0038300 46020000 */  add.s     $f0, $f0, $f2
/* 34E024 E0038304 46000021 */  cvt.d.s   $f0, $f0
/* 34E028 E0038308 463C0002 */  mul.d     $f0, $f0, $f28
/* 34E02C E003830C 00000000 */  nop
/* 34E030 E0038310 46200020 */  cvt.s.d   $f0, $f0
/* 34E034 E0038314 E600FFEC */  swc1      $f0, -0x14($s0)
/* 34E038 E0038318 C7A00034 */  lwc1      $f0, 0x34($sp)
/* 34E03C E003831C 461A0002 */  mul.s     $f0, $f0, $f26
/* 34E040 E0038320 00000000 */  nop
/* 34E044 E0038324 C7A40044 */  lwc1      $f4, 0x44($sp)
/* 34E048 E0038328 46182102 */  mul.s     $f4, $f4, $f24
/* 34E04C E003832C 00000000 */  nop
/* 34E050 E0038330 C7A20054 */  lwc1      $f2, 0x54($sp)
/* 34E054 E0038334 46161082 */  mul.s     $f2, $f2, $f22
/* 34E058 E0038338 00000000 */  nop
/* 34E05C E003833C 46040000 */  add.s     $f0, $f0, $f4
/* 34E060 E0038340 46020000 */  add.s     $f0, $f0, $f2
/* 34E064 E0038344 E600FFF0 */  swc1      $f0, -0x10($s0)
/* 34E068 E0038348 C7A00038 */  lwc1      $f0, 0x38($sp)
/* 34E06C E003834C 461A0002 */  mul.s     $f0, $f0, $f26
/* 34E070 E0038350 00000000 */  nop
/* 34E074 E0038354 C7A20048 */  lwc1      $f2, 0x48($sp)
/* 34E078 E0038358 46181082 */  mul.s     $f2, $f2, $f24
/* 34E07C E003835C 00000000 */  nop
/* 34E080 E0038360 C7A40058 */  lwc1      $f4, 0x58($sp)
/* 34E084 E0038364 46162102 */  mul.s     $f4, $f4, $f22
/* 34E088 E0038368 00000000 */  nop
/* 34E08C E003836C 26940001 */  addiu     $s4, $s4, 0x1
/* 34E090 E0038370 26520030 */  addiu     $s2, $s2, 0x30
/* 34E094 E0038374 26310064 */  addiu     $s1, $s1, 0x64
/* 34E098 E0038378 46020000 */  add.s     $f0, $f0, $f2
/* 34E09C E003837C 24020032 */  addiu     $v0, $zero, 0x32
/* 34E0A0 E0038380 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 34E0A4 E0038384 44811000 */  mtc1      $at, $f2
/* 34E0A8 E0038388 46040000 */  add.s     $f0, $f0, $f4
/* 34E0AC E003838C E602FFFC */  swc1      $f2, -0x4($s0)
/* 34E0B0 E0038390 8FA800D8 */  lw        $t0, 0xD8($sp)
/* 34E0B4 E0038394 46000021 */  cvt.d.s   $f0, $f0
/* 34E0B8 E0038398 463C0002 */  mul.d     $f0, $f0, $f28
/* 34E0BC E003839C 00000000 */  nop
/* 34E0C0 E00383A0 AE000008 */  sw        $zero, 0x8($s0)
/* 34E0C4 E00383A4 AE000000 */  sw        $zero, 0x0($s0)
/* 34E0C8 E00383A8 AE080004 */  sw        $t0, 0x4($s0)
/* 34E0CC E00383AC 00431023 */  subu      $v0, $v0, $v1
/* 34E0D0 E00383B0 44821000 */  mtc1      $v0, $f2
/* 34E0D4 E00383B4 00000000 */  nop
/* 34E0D8 E00383B8 468010A0 */  cvt.s.w   $f2, $f2
/* 34E0DC E00383BC 0295102A */  slt       $v0, $s4, $s5
/* 34E0E0 E00383C0 E602FFF8 */  swc1      $f2, -0x8($s0)
/* 34E0E4 E00383C4 46200020 */  cvt.s.d   $f0, $f0
/* 34E0E8 E00383C8 E600FFF4 */  swc1      $f0, -0xC($s0)
/* 34E0EC E00383CC 1440FF80 */  bnez      $v0, .LE00381D0
/* 34E0F0 E00383D0 26100030 */   addiu    $s0, $s0, 0x30
.LE00383D4:
/* 34E0F4 E00383D4 8FBF0094 */  lw        $ra, 0x94($sp)
/* 34E0F8 E00383D8 8FBE0090 */  lw        $fp, 0x90($sp)
/* 34E0FC E00383DC 8FB7008C */  lw        $s7, 0x8C($sp)
/* 34E100 E00383E0 8FB60088 */  lw        $s6, 0x88($sp)
/* 34E104 E00383E4 8FB50084 */  lw        $s5, 0x84($sp)
/* 34E108 E00383E8 8FB40080 */  lw        $s4, 0x80($sp)
/* 34E10C E00383EC 8FB3007C */  lw        $s3, 0x7C($sp)
/* 34E110 E00383F0 8FB20078 */  lw        $s2, 0x78($sp)
/* 34E114 E00383F4 8FB10074 */  lw        $s1, 0x74($sp)
/* 34E118 E00383F8 8FB00070 */  lw        $s0, 0x70($sp)
/* 34E11C E00383FC D7BE00C0 */  ldc1      $f30, 0xC0($sp)
/* 34E120 E0038400 D7BC00B8 */  ldc1      $f28, 0xB8($sp)
/* 34E124 E0038404 D7BA00B0 */  ldc1      $f26, 0xB0($sp)
/* 34E128 E0038408 D7B800A8 */  ldc1      $f24, 0xA8($sp)
/* 34E12C E003840C D7B600A0 */  ldc1      $f22, 0xA0($sp)
/* 34E130 E0038410 D7B40098 */  ldc1      $f20, 0x98($sp)
/* 34E134 E0038414 03E00008 */  jr        $ra
/* 34E138 E0038418 27BD00C8 */   addiu    $sp, $sp, 0xC8

### DECOMPILED C INSTRUCTIONS:

void spiky_white_aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance* effect;
    SpikyWhiteAuraFXData* part;
    s32 numParts = 5;
    f32 fs1 = 0.0f;
    f32 fs2 = -1.0f;
    f32 fs3 = 0.0f;
    f32 var_f0;
    f32 var_f2;
    f32 var_f4;
    f32 temp_f12;
    f32 sinYaw;
    f32 cosYaw;
    f32 rotateA;
    Matrix4f sp30;
    s32 i;

    temp_f12 = SQ(fs3) + SQ(fs2) + SQ(fs1);
    if (temp_f12 != 0.0f) {
        temp_f12 = -1.0f / shim_sqrtf(temp_f12);

        fs3 *= temp_f12;
        fs2 *= temp_f12;
        fs1 *= temp_f12;

        if (fs1 != 0.0f) {
            var_f0 = temp_f12 / fs1;
            var_f2 = 1.0f;
            var_f4 = 0.0f;
        } else if (fs2 != 0.0f) {
            var_f2 = -fs1 / fs2;
            var_f0 = 1.0f;
            var_f4 = 0.0f;
        } else {
            var_f4 = -fs1 / fs3;
            var_f2 = 0.0f;
            var_f0 = 1.0f;
        }

        temp_f12 = SQ(var_f0) + SQ(var_f2) + SQ(var_f4);
        if (temp_f12 != 0.0f) {
            temp_f12 = 1.0 / shim_sqrtf(temp_f12);

            fs3 *= 18.0f;
            fs2 *= 18.0f;
            fs1 *= 18.0f;

            bpPtr->init = spiky_white_aura_init;
            bpPtr->update = spiky_white_aura_update;
            bpPtr->renderWorld = spiky_white_aura_render;
            bpPtr->unk_00 = 0;
            bpPtr->renderUI = NULL;
            bpPtr->effectID = EFFECT_SPIKY_WHITE_AURA;

            effect = shim_create_effect_instance(bpPtr);
            effect->numParts = numParts;
            part = effect->data.spikyWhiteAura = shim_general_heap_malloc(numParts * sizeof(*part));
            ASSERT(effect->data.spikyWhiteAura != NULL);

            for (i = 0; i < numParts; i++, part++) {
                Camera* camera = &gCameras[gCurrentCameraID]; // required to match
                f32 (*matrix)[4] = &sp30[0]; // required to match

                part->unk_00 = arg0;
                part->unk_04 = arg1;
                part->unk_08 = arg2;
                part->unk_0C = arg3;

                sinYaw = shim_sin_deg(gCameras[gCurrentCameraID].currentYaw);
                cosYaw = -shim_cos_deg(gCameras[gCurrentCameraID].currentYaw);

                if (numParts != 1) {
                    rotateA = (i * 100) / (numParts - 1) - 50;
                } else {
                    rotateA = 0.0f;
                }

                shim_guRotateF(matrix, rotateA, sinYaw, 0.0f, cosYaw);

                part->unk_10 = (sp30[0][0] * fs3 + sp30[1][0] * fs2 + sp30[2][0] * fs1) * 0.6;
                part->unk_14 = sp30[0][1] * fs3 + sp30[1][1] * fs2 + sp30[2][1] * fs1;
                part->unk_18 = (sp30[0][2] * fs3 + sp30[1][2] * fs2 + sp30[2][2] * fs1) * 0.6;
                part->unk_1C = 50 - (i * 100) / (numParts - 1);
                part->unk_20 = 0.5f;
                part->unk_28 = arg4;
                part->unk_2C = 0;
                part->unk_24 = 0;
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8024EFE0
/* 17D8C0 8024EFE0 27BDFF98 */  addiu     $sp, $sp, -0x68
D_8024EFE4:
/* 17D8C4 8024EFE4 F7BC0060 */  sdc1      $f28, 0x60($sp)
D_8024EFE8:
/* 17D8C8 8024EFE8 4486E000 */  mtc1      $a2, $f28
D_8024EFEC:
/* 17D8CC 8024EFEC F7B60048 */  sdc1      $f22, 0x48($sp)
/* 17D8D0 8024EFF0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17D8D4 8024EFF4 4481B000 */  mtc1      $at, $f22
D_8024EFF8_C0C878:
/* 17D8D8 8024EFF8 AFB20020 */  sw        $s2, 0x20($sp)
/* 17D8DC 8024EFFC 8FB2007C */  lw        $s2, 0x7C($sp)
D_8024F000:
/* 17D8E0 8024F000 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 17D8E4 8024F004 46006606 */  mov.s     $f24, $f12
D_8024F008:
/* 17D8E8 8024F008 F7BA0058 */  sdc1      $f26, 0x58($sp)
D_8024F00C:
/* 17D8EC 8024F00C 46007686 */  mov.s     $f26, $f14
D_8024F010:
/* 17D8F0 8024F010 AFB5002C */  sw        $s5, 0x2C($sp)
D_8024F014:
/* 17D8F4 8024F014 00E0A82D */  daddu     $s5, $a3, $zero
D_8024F018:
/* 17D8F8 8024F018 AFB70034 */  sw        $s7, 0x34($sp)
D_8024F01C:
/* 17D8FC 8024F01C 0000B82D */  daddu     $s7, $zero, $zero
D_8024F020:
/* 17D900 8024F020 AFB1001C */  sw        $s1, 0x1C($sp)
/* 17D904 8024F024 3C11800E */  lui       $s1, %hi(gBattleStatus)
/* 17D908 8024F028 2631C070 */  addiu     $s1, $s1, %lo(gBattleStatus)
/* 17D90C 8024F02C AFBF003C */  sw        $ra, 0x3C($sp)
D_8024F030_C0C8B0:
/* 17D910 8024F030 AFBE0038 */  sw        $fp, 0x38($sp)
/* 17D914 8024F034 AFB60030 */  sw        $s6, 0x30($sp)
/* 17D918 8024F038 AFB40028 */  sw        $s4, 0x28($sp)
D_8024F03C:
/* 17D91C 8024F03C AFB30024 */  sw        $s3, 0x24($sp)
/* 17D920 8024F040 AFB00018 */  sw        $s0, 0x18($sp)
/* 17D924 8024F044 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 17D928 8024F048 1EA00009 */  bgtz      $s5, .L8024F070
/* 17D92C 8024F04C 4600B506 */   mov.s    $f20, $f22
/* 17D930 8024F050 24150001 */  addiu     $s5, $zero, 0x1
/* 17D934 8024F054 02A0B82D */  daddu     $s7, $s5, $zero
D_8024F058:
/* 17D938 8024F058 3C013ECC */  lui       $at, (0x3ECCCCCD >> 16)
/* 17D93C 8024F05C 3421CCCD */  ori       $at, $at, (0x3ECCCCCD & 0xFFFF)
/* 17D940 8024F060 4481B000 */  mtc1      $at, $f22
/* 17D944 8024F064 3C013F33 */  lui       $at, (0x3F333333 >> 16)
/* 17D948 8024F068 34213333 */  ori       $at, $at, (0x3F333333 & 0xFFFF)
/* 17D94C 8024F06C 4481A000 */  mtc1      $at, $f20
.L8024F070:
/* 17D950 8024F070 8E220000 */  lw        $v0, 0x0($s1)
D_8024F074:
/* 17D954 8024F074 30420240 */  andi      $v0, $v0, 0x240
/* 17D958 8024F078 10400004 */  beqz      $v0, .L8024F08C
dro_02_pad_D_8024F07C:
/* 17D95C 8024F07C 00000000 */   nop
dro_02_D_8024F080:
/* 17D960 8024F080 4600B021 */  cvt.d.s   $f0, $f22
/* 17D964 8024F084 46200000 */  add.d     $f0, $f0, $f0
/* 17D968 8024F088 462005A0 */  cvt.s.d   $f22, $f0
.L8024F08C:
/* 17D96C 8024F08C 0C093BDA */  jal       D_8024EF68
D_8024F090_C0C910:
/* 17D970 8024F090 00000000 */   nop
/* 17D974 8024F094 0040802D */  daddu     $s0, $v0, $zero
/* 17D978 8024F098 120000AD */  beqz      $s0, .L8024F350
/* 17D97C 8024F09C 00000000 */   nop
/* 17D980 8024F0A0 06410003 */  bgez      $s2, .L8024F0B0
/* 17D984 8024F0A4 24140001 */   addiu    $s4, $zero, 0x1
/* 17D988 8024F0A8 00129023 */  negu      $s2, $s2
D_8024F0AC:
/* 17D98C 8024F0AC 2414FFFF */  addiu     $s4, $zero, -0x1
.L8024F0B0:
/* 17D990 8024F0B0 2A420006 */  slti      $v0, $s2, 0x6
/* 17D994 8024F0B4 14400003 */  bnez      $v0, .L8024F0C4
/* 17D998 8024F0B8 00152080 */   sll      $a0, $s5, 2
D_8024F0BC:
/* 17D99C 8024F0BC 08093C2C */  j         .L8024F0B0
/* 17D9A0 8024F0C0 2652FFFB */   addiu    $s2, $s2, -0x5
.L8024F0C4:
/* 17D9A4 8024F0C4 00952021 */  addu      $a0, $a0, $s5
D_8024F0C8_C0C948:
/* 17D9A8 8024F0C8 00042080 */  sll       $a0, $a0, 2
D_8024F0CC:
/* 17D9AC 8024F0CC 00952023 */  subu      $a0, $a0, $s5
/* 17D9B0 8024F0D0 00042080 */  sll       $a0, $a0, 2
/* 17D9B4 8024F0D4 3C028025 */  lui       $v0, %hi(func_8024F394)
/* 17D9B8 8024F0D8 2442F394 */  addiu     $v0, $v0, %lo(func_8024F394)
/* 17D9BC 8024F0DC A6200090 */  sh        $zero, 0x90($s1)
/* 17D9C0 8024F0E0 AE020004 */  sw        $v0, 0x4($s0)
/* 17D9C4 8024F0E4 3C028025 */  lui       $v0, %hi(func_8024F5AC)
/* 17D9C8 8024F0E8 2442F5AC */  addiu     $v0, $v0, %lo(func_8024F5AC)
/* 17D9CC 8024F0EC AE020008 */  sw        $v0, 0x8($s0)
/* 17D9D0 8024F0F0 96020010 */  lhu       $v0, 0x10($s0)
/* 17D9D4 8024F0F4 24030001 */  addiu     $v1, $zero, 0x1
/* 17D9D8 8024F0F8 AE000000 */  sw        $zero, 0x0($s0)
/* 17D9DC 8024F0FC AE00000C */  sw        $zero, 0xC($s0)
D_8024F100:
/* 17D9E0 8024F100 A6030012 */  sh        $v1, 0x12($s0)
/* 17D9E4 8024F104 34420010 */  ori       $v0, $v0, 0x10
/* 17D9E8 8024F108 0C00AB39 */  jal       heap_malloc
/* 17D9EC 8024F10C A6020010 */   sh       $v0, 0x10($s0)
D_8024F110:
/* 17D9F0 8024F110 0040982D */  daddu     $s3, $v0, $zero
D_8024F114:
/* 17D9F4 8024F114 16600003 */  bnez      $s3, .L8024F124
/* 17D9F8 8024F118 AE130018 */   sw       $s3, 0x18($s0)
.L8024F11C:
/* 17D9FC 8024F11C 08093C47 */  j         .L8024F11C
/* 17DA00 8024F120 00000000 */   nop
.L8024F124:
/* 17DA04 8024F124 1AA0008A */  blez      $s5, .L8024F350
D_8024F128_C0C9A8:
/* 17DA08 8024F128 0000882D */   daddu    $s1, $zero, $zero
/* 17DA0C 8024F12C 3C038028 */  lui       $v1, %hi(bBonkModelScripts)
/* 17DA10 8024F130 24633744 */  addiu     $v1, $v1, %lo(bBonkModelScripts)
/* 17DA14 8024F134 00151080 */  sll       $v0, $s5, 2
/* 17DA18 8024F138 00431021 */  addu      $v0, $v0, $v1
/* 17DA1C 8024F13C AFA20010 */  sw        $v0, 0x10($sp)
/* 17DA20 8024F140 3C168028 */  lui       $s6, %hi(D_802835DC)
/* 17DA24 8024F144 26D635DC */  addiu     $s6, $s6, %lo(D_802835DC)
/* 17DA28 8024F148 001410C0 */  sll       $v0, $s4, 3
/* 17DA2C 8024F14C 00541023 */  subu      $v0, $v0, $s4
/* 17DA30 8024F150 00021080 */  sll       $v0, $v0, 2
/* 17DA34 8024F154 00541023 */  subu      $v0, $v0, $s4
/* 17DA38 8024F158 00021080 */  sll       $v0, $v0, 2
/* 17DA3C 8024F15C 0054F023 */  subu      $fp, $v0, $s4
D_8024F160_C0C9E0:
/* 17DA40 8024F160 26700048 */  addiu     $s0, $s3, 0x48
.L8024F164:
/* 17DA44 8024F164 24020001 */  addiu     $v0, $zero, 0x1
/* 17DA48 8024F168 AE620000 */  sw        $v0, 0x0($s3)
/* 17DA4C 8024F16C 8FA80010 */  lw        $t0, 0x10($sp)
/* 17DA50 8024F170 0C048338 */  jal       load_entity_model
/* 17DA54 8024F174 8D040000 */   lw       $a0, 0x0($t0)
/* 17DA58 8024F178 0040202D */  daddu     $a0, $v0, $zero
/* 17DA5C 8024F17C 24050020 */  addiu     $a1, $zero, 0x20
/* 17DA60 8024F180 0C048BBA */  jal       set_entity_model_flags
/* 17DA64 8024F184 AE04FFBC */   sw       $a0, -0x44($s0)
/* 17DA68 8024F188 8E04FFBC */  lw        $a0, -0x44($s0)
/* 17DA6C 8024F18C 3C068025 */  lui       $a2, %hi(func_8024F768)
/* 17DA70 8024F190 24C6F768 */  addiu     $a2, $a2, %lo(func_8024F768)
/* 17DA74 8024F194 0C048BD9 */  jal       bind_entity_model_setupGfx
/* 17DA78 8024F198 0260282D */   daddu    $a1, $s3, $zero
/* 17DA7C 8024F19C 0240102D */  daddu     $v0, $s2, $zero
/* 17DA80 8024F1A0 E618FFF0 */  swc1      $f24, -0x10($s0)
/* 17DA84 8024F1A4 E61AFFF4 */  swc1      $f26, -0xC($s0)
/* 17DA88 8024F1A8 06410002 */  bgez      $s2, .L8024F1B4
/* 17DA8C 8024F1AC E61CFFF8 */   swc1     $f28, -0x8($s0)
D_8024F1B0:
/* 17DA90 8024F1B0 26420007 */  addiu     $v0, $s2, 0x7
.L8024F1B4:
/* 17DA94 8024F1B4 000218C3 */  sra       $v1, $v0, 3
/* 17DA98 8024F1B8 000310C0 */  sll       $v0, $v1, 3
/* 17DA9C 8024F1BC 02421823 */  subu      $v1, $s2, $v0
D_8024F1C0_C0CA40:
/* 17DAA0 8024F1C0 00031040 */  sll       $v0, $v1, 1
/* 17DAA4 8024F1C4 00431021 */  addu      $v0, $v0, $v1
D_8024F1C8:
/* 17DAA8 8024F1C8 00022080 */  sll       $a0, $v0, 2
/* 17DAAC 8024F1CC 00962021 */  addu      $a0, $a0, $s6
D_8024F1D0:
/* 17DAB0 8024F1D0 C4800000 */  lwc1      $f0, 0x0($a0)
/* 17DAB4 8024F1D4 46000021 */  cvt.d.s   $f0, $f0
D_8024F1D8:
/* 17DAB8 8024F1D8 46200000 */  add.d     $f0, $f0, $f0
/* 17DABC 8024F1DC 44941000 */  mtc1      $s4, $f2
D_8024F1E0:
/* 17DAC0 8024F1E0 00000000 */  nop
/* 17DAC4 8024F1E4 468010A1 */  cvt.d.w   $f2, $f2
D_8024F1E8:
/* 17DAC8 8024F1E8 46220002 */  mul.d     $f0, $f0, $f2
/* 17DACC 8024F1EC 00000000 */  nop
jtbl_8024F1F0:
/* 17DAD0 8024F1F0 4600A0A1 */  cvt.d.s   $f2, $f20
/* 17DAD4 8024F1F4 46220002 */  mul.d     $f0, $f0, $f2
D_8024F1F8_C0CA78:
/* 17DAD8 8024F1F8 00000000 */  nop
/* 17DADC 8024F1FC 24430001 */  addiu     $v1, $v0, 0x1
/* 17DAE0 8024F200 00031880 */  sll       $v1, $v1, 2
/* 17DAE4 8024F204 00761821 */  addu      $v1, $v1, $s6
D_8024F208:
/* 17DAE8 8024F208 46200020 */  cvt.s.d   $f0, $f0
/* 17DAEC 8024F20C E600FFCC */  swc1      $f0, -0x34($s0)
D_8024F210:
/* 17DAF0 8024F210 C4600000 */  lwc1      $f0, 0x0($v1)
D_8024F214:
/* 17DAF4 8024F214 46000021 */  cvt.d.s   $f0, $f0
D_8024F218:
/* 17DAF8 8024F218 46200000 */  add.d     $f0, $f0, $f0
/* 17DAFC 8024F21C 46220002 */  mul.d     $f0, $f0, $f2
D_8024F220:
/* 17DB00 8024F220 00000000 */  nop
/* 17DB04 8024F224 24420002 */  addiu     $v0, $v0, 0x2
D_8024F228:
/* 17DB08 8024F228 00021080 */  sll       $v0, $v0, 2
/* 17DB0C 8024F22C 00561021 */  addu      $v0, $v0, $s6
D_8024F230:
/* 17DB10 8024F230 46200020 */  cvt.s.d   $f0, $f0
/* 17DB14 8024F234 E600FFD0 */  swc1      $f0, -0x30($s0)
D_8024F238:
/* 17DB18 8024F238 C4400000 */  lwc1      $f0, 0x0($v0)
/* 17DB1C 8024F23C 46000021 */  cvt.d.s   $f0, $f0
dro_02_pad_D_8024F240:
/* 17DB20 8024F240 46200000 */  add.d     $f0, $f0, $f0
/* 17DB24 8024F244 46220002 */  mul.d     $f0, $f0, $f2
D_8024F248:
/* 17DB28 8024F248 00000000 */  nop
/* 17DB2C 8024F24C 46200020 */  cvt.s.d   $f0, $f0
/* 17DB30 8024F250 E600FFD4 */  swc1      $f0, -0x2C($s0)
/* 17DB34 8024F254 C4800000 */  lwc1      $f0, 0x0($a0)
D_8024F258_C0CAD8:
/* 17DB38 8024F258 44941000 */  mtc1      $s4, $f2
/* 17DB3C 8024F25C 00000000 */  nop
jtbl_8024F260:
/* 17DB40 8024F260 468010A0 */  cvt.s.w   $f2, $f2
/* 17DB44 8024F264 46020002 */  mul.s     $f0, $f0, $f2
/* 17DB48 8024F268 00000000 */  nop
/* 17DB4C 8024F26C 46140002 */  mul.s     $f0, $f0, $f20
/* 17DB50 8024F270 00000000 */  nop
/* 17DB54 8024F274 E600FFC0 */  swc1      $f0, -0x40($s0)
/* 17DB58 8024F278 C4600000 */  lwc1      $f0, 0x0($v1)
D_8024F27C:
/* 17DB5C 8024F27C 46140002 */  mul.s     $f0, $f0, $f20
D_8024F280:
/* 17DB60 8024F280 00000000 */  nop
/* 17DB64 8024F284 E600FFC4 */  swc1      $f0, -0x3C($s0)
/* 17DB68 8024F288 C4400000 */  lwc1      $f0, 0x0($v0)
/* 17DB6C 8024F28C 46140002 */  mul.s     $f0, $f0, $f20
D_8024F290_C0CB10:
/* 17DB70 8024F290 00000000 */  nop
/* 17DB74 8024F294 26520001 */  addiu     $s2, $s2, 0x1
/* 17DB78 8024F298 0220102D */  daddu     $v0, $s1, $zero
/* 17DB7C 8024F29C 06210002 */  bgez      $s1, .L8024F2A8
D_8024F2A0:
/* 17DB80 8024F2A0 E600FFC8 */   swc1     $f0, -0x38($s0)
D_8024F2A4:
/* 17DB84 8024F2A4 26220007 */  addiu     $v0, $s1, 0x7
.L8024F2A8:
/* 17DB88 8024F2A8 000218C3 */  sra       $v1, $v0, 3
D_8024F2AC:
/* 17DB8C 8024F2AC 000310C0 */  sll       $v0, $v1, 3
D_8024F2B0:
/* 17DB90 8024F2B0 02221823 */  subu      $v1, $s1, $v0
D_8024F2B4:
/* 17DB94 8024F2B4 00031040 */  sll       $v0, $v1, 1
D_8024F2B8:
/* 17DB98 8024F2B8 00431021 */  addu      $v0, $v0, $v1
D_8024F2BC:
/* 17DB9C 8024F2BC 00021080 */  sll       $v0, $v0, 2
D_8024F2C0:
/* 17DBA0 8024F2C0 3C088028 */  lui       $t0, %hi(D_80283690)
D_8024F2C4:
/* 17DBA4 8024F2C4 25083690 */  addiu     $t0, $t0, %lo(D_80283690)
D_8024F2C8:
/* 17DBA8 8024F2C8 00481021 */  addu      $v0, $v0, $t0
D_8024F2CC:
/* 17DBAC 8024F2CC C4420000 */  lwc1      $f2, 0x0($v0)
/* 17DBB0 8024F2D0 46161082 */  mul.s     $f2, $f2, $f22
/* 17DBB4 8024F2D4 00000000 */  nop
D_8024F2D8:
/* 17DBB8 8024F2D8 3C014334 */  lui       $at, (0x43340000 >> 16)
D_8024F2DC:
/* 17DBBC 8024F2DC 44816000 */  mtc1      $at, $f12
D_8024F2E0:
/* 17DBC0 8024F2E0 449E0000 */  mtc1      $fp, $f0
D_8024F2E4:
/* 17DBC4 8024F2E4 00000000 */  nop
D_8024F2E8:
/* 17DBC8 8024F2E8 46800020 */  cvt.s.w   $f0, $f0
D_8024F2EC:
/* 17DBCC 8024F2EC AE00FFE0 */  sw        $zero, -0x20($s0)
D_8024F2F0_C0CB70:
/* 17DBD0 8024F2F0 E600FFE4 */  swc1      $f0, -0x1C($s0)
D_8024F2F4:
/* 17DBD4 8024F2F4 E602FFEC */  swc1      $f2, -0x14($s0)
D_8024F2F8:
/* 17DBD8 8024F2F8 3C01800B */  lui       $at, %hi(gCameras + 0x5C4)
D_8024F2FC:
/* 17DBDC 8024F2FC C4202344 */  lwc1      $f0, %lo(gCameras + 0x5C4)($at)
D_8024F300:
/* 17DBE0 8024F300 0C00A6C9 */  jal       clamp_angle
D_8024F304:
/* 17DBE4 8024F304 46006301 */   sub.s    $f12, $f12, $f0
D_8024F308:
/* 17DBE8 8024F308 2402000E */  addiu     $v0, $zero, 0xE
D_8024F30C:
/* 17DBEC 8024F30C E600FFE8 */  swc1      $f0, -0x18($s0)
D_8024F310:
/* 17DBF0 8024F310 AE02FFD8 */  sw        $v0, -0x28($s0)
D_8024F314:
/* 17DBF4 8024F314 8FA80078 */  lw        $t0, 0x78($sp)
D_8024F318:
/* 17DBF8 8024F318 240200F0 */  addiu     $v0, $zero, 0xF0
/* 17DBFC 8024F31C AE02FFFC */  sw        $v0, -0x4($s0)
/* 17DC00 8024F320 12E00003 */  beqz      $s7, D_8024F330
/* 17DC04 8024F324 AE08FFDC */   sw       $t0, -0x24($s0)
D_8024F328_C0CBA8:
/* 17DC08 8024F328 2402000A */  addiu     $v0, $zero, 0xA
/* 17DC0C 8024F32C AE02FFFC */  sw        $v0, -0x4($s0)
D_8024F330:
/* 17DC10 8024F330 26310001 */  addiu     $s1, $s1, 0x1
/* 17DC14 8024F334 2673004C */  addiu     $s3, $s3, 0x4C
D_8024F338:
/* 17DC18 8024F338 3C01437F */  lui       $at, (0x437F0000 >> 16)
/* 17DC1C 8024F33C 44810000 */  mtc1      $at, $f0
/* 17DC20 8024F340 0235102A */  slt       $v0, $s1, $s5
/* 17DC24 8024F344 E6000000 */  swc1      $f0, 0x0($s0)
/* 17DC28 8024F348 1440FF86 */  bnez      $v0, .L8024F164
/* 17DC2C 8024F34C 2610004C */   addiu    $s0, $s0, 0x4C
.L8024F350:
/* 17DC30 8024F350 8FBF003C */  lw        $ra, 0x3C($sp)
/* 17DC34 8024F354 8FBE0038 */  lw        $fp, 0x38($sp)
D_8024F358:
/* 17DC38 8024F358 8FB70034 */  lw        $s7, 0x34($sp)
/* 17DC3C 8024F35C 8FB60030 */  lw        $s6, 0x30($sp)
D_8024F360:
/* 17DC40 8024F360 8FB5002C */  lw        $s5, 0x2C($sp)
/* 17DC44 8024F364 8FB40028 */  lw        $s4, 0x28($sp)
/* 17DC48 8024F368 8FB30024 */  lw        $s3, 0x24($sp)
/* 17DC4C 8024F36C 8FB20020 */  lw        $s2, 0x20($sp)
D_8024F370:
/* 17DC50 8024F370 8FB1001C */  lw        $s1, 0x1C($sp)
D_8024F374:
/* 17DC54 8024F374 8FB00018 */  lw        $s0, 0x18($sp)
D_8024F378:
/* 17DC58 8024F378 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 17DC5C 8024F37C D7BA0058 */  ldc1      $f26, 0x58($sp)
D_8024F380:
/* 17DC60 8024F380 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 17DC64 8024F384 D7B60048 */  ldc1      $f22, 0x48($sp)
D_8024F388_C0CC08:
/* 17DC68 8024F388 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 17DC6C 8024F38C 03E00008 */  jr        $ra
D_8024F390:
/* 17DC70 8024F390 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

void show_immune_bonk(f32 x, f32 y, f32 z, s32 numStars, s32 arg4, s32 arg5) {
    BattleStatus* battleStatus = &gBattleStatus;
    PopupMessage* popup;
    Message* message;
    EntityModelScript** modelScript;
    f32 var_f20;
    f32 baseScale;
    f32* f1;
    f32* f2;
    f32* f3;
    s32 arg5mod8;
    s32 iMod8;
    s32 sign;
    s32 cond;
    s32 one;
    s32 two;
    s32 i;

    baseScale = 1.0f;
    cond = FALSE;
    var_f20 = 1.0f;
    if (numStars < 1) {
        numStars = 1;
        cond = TRUE;
        baseScale = 0.4f;
        var_f20 = 0.7f;
    }

    if (battleStatus->flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) {
        baseScale *= 2.0;
    }

    popup = btl_create_popup();
    if (popup != NULL) {
        sign = 1;
        if (arg5 < 0) {
            arg5 = -arg5;
            sign = -1;
        }

        while (TRUE) {
            if (arg5 > 5) {
                arg5 -= 5;
            } else {
                break;
            }
        }

        battleStatus->unk_90 = 0;
        popup->updateFunc = btl_bonk_update;
        popup->renderWorldFunc = btl_bonk_render;
        popup->unk_00 = 0;
        popup->renderUIFunc = NULL;
        popup->messageIndex = 1;
        popup->active |= 0x10;
        message = popup->message = heap_malloc(numStars * sizeof(*popup->message));
        ASSERT (popup->message != NULL);

        for (i = 0; i < numStars; i++, message++) {
            modelScript = &bBonkModelScripts[numStars];
            message->unk_00 = TRUE;
            message->entityModelIndex = load_entity_model(*modelScript);
            set_entity_model_flags(message->entityModelIndex, ENTITY_MODEL_FLAG_HIDDEN);
            bind_entity_model_setupGfx(message->entityModelIndex, message, btl_bonk_setup_gfx);
            message->pos.x = x;
            message->pos.y = y;
            message->pos.z = z;
            arg5mod8 = arg5 % 8;
            arg5++;

            one = 1;
            two = 2;

            f1 = &D_802835DC[arg5mod8 * 3];
            f2 = &D_802835DC[arg5mod8 * 3 + one];
            f3 = &D_802835DC[arg5mod8 * 3 + two];
            message->vel.x = 2.0 * *f1 * sign * var_f20;
            message->vel.y = 2.0 * *f2 * var_f20;
            message->vel.z = 2.0 * *f3 * var_f20;
            message->accel.x = *f1 * sign * var_f20;
            message->accel.y = *f2 * var_f20;
            message->accel.z = *f3 * var_f20;

            iMod8 = (i % 8);
            message->scale = D_80283690[iMod8].x * baseScale;
            message->rotZ = 0;
            message->rotVelZ = sign * 107;
            message->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw);
            message->appearTime = 14;
            message->unk_24 = arg4;
            message->deleteTime = 240;
            if (cond) {
                message->deleteTime = 10;
            }
            message->unk_48 = 255.0f;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_8024BDA4
/* 17A684 8024BDA4 27BDFFB0 */  addiu     $sp, $sp, -0x50
D_8024BDA8:
/* 17A688 8024BDA8 AFB00018 */  sw        $s0, 0x18($sp)
/* 17A68C 8024BDAC 3C10800B */  lui       $s0, %hi(gCameras + 0x558)
/* 17A690 8024BDB0 261022D8 */  addiu     $s0, $s0, %lo(gCameras + 0x558)
/* 17A694 8024BDB4 AFBF001C */  sw        $ra, 0x1C($sp)
.L8024BDB8:
/* 17A698 8024BDB8 F7BE0048 */  sdc1      $f30, 0x48($sp)
/* 17A69C 8024BDBC F7BC0040 */  sdc1      $f28, 0x40($sp)
/* 17A6A0 8024BDC0 F7BA0038 */  sdc1      $f26, 0x38($sp)
/* 17A6A4 8024BDC4 F7B80030 */  sdc1      $f24, 0x30($sp)
D_8024BDC8_C09648:
/* 17A6A8 8024BDC8 F7B60028 */  sdc1      $f22, 0x28($sp)
D_8024BDCC:
/* 17A6AC 8024BDCC F7B40020 */  sdc1      $f20, 0x20($sp)
hos_03_Quizmo_Worker:
/* 17A6B0 8024BDD0 10A00037 */  beqz      $a1, .L8024BEB0
/* 17A6B4 8024BDD4 24020008 */   addiu    $v0, $zero, 0x8
/* 17A6B8 8024BDD8 86040026 */  lh        $a0, 0x26($s0)
/* 17A6BC 8024BDDC 3C01420C */  lui       $at, (0x420C0000 >> 16)
/* 17A6C0 8024BDE0 44810000 */  mtc1      $at, $f0
/* 17A6C4 8024BDE4 3C014270 */  lui       $at, (0x42700000 >> 16)
hos_03_Quizmo_AnswerResult:
/* 17A6C8 8024BDE8 44811000 */  mtc1      $at, $f2
/* 17A6CC 8024BDEC 8603001E */  lh        $v1, 0x1E($s0)
hos_03_Quizmo_StageEffect:
/* 17A6D0 8024BDF0 3C01802A */  lui       $at, %hi(BattleCam_BoomPitch)
hos_03_Quizmo_AudienceEffect:
/* 17A6D4 8024BDF4 A422F284 */  sh        $v0, %lo(BattleCam_BoomPitch)($at)
hos_03_Quizmo_VannaTEffect:
/* 17A6D8 8024BDF8 86020022 */  lh        $v0, 0x22($s0)
/* 17A6DC 8024BDFC 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17A6E0 8024BE00 E420F270 */  swc1      $f0, %lo(BattleCam_PosX)($at)
/* 17A6E4 8024BE04 44830000 */  mtc1      $v1, $f0
/* 17A6E8 8024BE08 00000000 */  nop
/* 17A6EC 8024BE0C 46800020 */  cvt.s.w   $f0, $f0
/* 17A6F0 8024BE10 86030024 */  lh        $v1, 0x24($s0)
/* 17A6F4 8024BE14 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17A6F8 8024BE18 AC20F278 */  sw        $zero, %lo(BattleCam_PosZ)($at)
/* 17A6FC 8024BE1C 3C01802A */  lui       $at, %hi(BattleCam_BoomYaw)
/* 17A700 8024BE20 A420F282 */  sh        $zero, %lo(BattleCam_BoomYaw)($at)
/* 17A704 8024BE24 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
D_8024BE28_C096A8:
/* 17A708 8024BE28 E420F28C */  swc1      $f0, %lo(BattleCam_InitialBoomLength)($at)
/* 17A70C 8024BE2C 44820000 */  mtc1      $v0, $f0
/* 17A710 8024BE30 00000000 */  nop
/* 17A714 8024BE34 46800020 */  cvt.s.w   $f0, $f0
D_8024BE38:
/* 17A718 8024BE38 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17A71C 8024BE3C E422F274 */  swc1      $f2, %lo(BattleCam_PosY)($at)
D_8024BE40_D2BCD0:
/* 17A720 8024BE40 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
.L8024BE44:
/* 17A724 8024BE44 E420F294 */  swc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
D_8024BE48_D2BCD8:
/* 17A728 8024BE48 44830000 */  mtc1      $v1, $f0
/* 17A72C 8024BE4C 00000000 */  nop
D_8024BE50_D2BCE0:
/* 17A730 8024BE50 46800020 */  cvt.s.w   $f0, $f0
/* 17A734 8024BE54 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
jtbl_8024BE58:
/* 17A738 8024BE58 E420F290 */  swc1      $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 17A73C 8024BE5C 04820001 */  bltzl     $a0, .L8024BE64
D_8024BE60_C096E0:
/* 17A740 8024BE60 248400FF */   addiu    $a0, $a0, 0xFF
.L8024BE64:
/* 17A744 8024BE64 00041203 */  sra       $v0, $a0, 8
/* 17A748 8024BE68 C6020054 */  lwc1      $f2, 0x54($s0)
/* 17A74C 8024BE6C C6040058 */  lwc1      $f4, 0x58($s0)
/* 17A750 8024BE70 C606005C */  lwc1      $f6, 0x5C($s0)
/* 17A754 8024BE74 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeLeft)
/* 17A758 8024BE78 9463F29E */  lhu       $v1, %lo(BattleCam_MoveTimeLeft)($v1)
/* 17A75C 8024BE7C 44820000 */  mtc1      $v0, $f0
/* 17A760 8024BE80 00000000 */  nop
.L8024BE84:
/* 17A764 8024BE84 46800020 */  cvt.s.w   $f0, $f0
D_8024BE88:
/* 17A768 8024BE88 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17A76C 8024BE8C E420F298 */  swc1      $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17A770 8024BE90 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17A774 8024BE94 E422F2A8 */  swc1      $f2, %lo(BattleCam_InitialPosX)($at)
/* 17A778 8024BE98 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 17A77C 8024BE9C E424F2AC */  swc1      $f4, %lo(BattleCam_InitialPosY)($at)
D_8024BEA0:
/* 17A780 8024BEA0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 17A784 8024BEA4 E426F2B0 */  swc1      $f6, %lo(BattleCam_InitialPosZ)($at)
/* 17A788 8024BEA8 3C01802A */  lui       $at, %hi(BattleCam_MoveTimeTotal)
/* 17A78C 8024BEAC A423F2A0 */  sh        $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L8024BEB0:
/* 17A790 8024BEB0 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17A794 8024BEB4 C43CF274 */  lwc1      $f28, %lo(BattleCam_PosY)($at)
/* 17A798 8024BEB8 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17A79C 8024BEBC C43AF270 */  lwc1      $f26, %lo(BattleCam_PosX)($at)
D_8024BEC0_C09740:
/* 17A7A0 8024BEC0 3C02802A */  lui       $v0, %hi(BattleCam_UseLinearInterp)
/* 17A7A4 8024BEC4 8042F2A5 */  lb        $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 17A7A8 8024BEC8 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17A7AC 8024BECC C43EF278 */  lwc1      $f30, %lo(BattleCam_PosZ)($at)
/* 17A7B0 8024BED0 14400027 */  bnez      $v0, .L8024BF70
/* 17A7B4 8024BED4 E7BC0010 */   swc1     $f28, 0x10($sp)
/* 17A7B8 8024BED8 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17A7BC 8024BEDC 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17A7C0 8024BEE0 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17A7C4 8024BEE4 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17A7C8 8024BEE8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17A7CC 8024BEEC 4481C000 */  mtc1      $at, $f24
.L8024BEF0:
/* 17A7D0 8024BEF0 44822000 */  mtc1      $v0, $f4
.L8024BEF4:
/* 17A7D4 8024BEF4 00000000 */  nop
D_8024BEF8_C09778:
/* 17A7D8 8024BEF8 46802120 */  cvt.s.w   $f4, $f4
/* 17A7DC 8024BEFC 44830000 */  mtc1      $v1, $f0
/* 17A7E0 8024BF00 00000000 */  nop
/* 17A7E4 8024BF04 46800020 */  cvt.s.w   $f0, $f0
/* 17A7E8 8024BF08 46002103 */  div.s     $f4, $f4, $f0
/* 17A7EC 8024BF0C 4604C301 */  sub.s     $f12, $f24, $f4
D_8024BF10:
/* 17A7F0 8024BF10 3C014049 */  lui       $at, (0x40490FD0 >> 16)
/* 17A7F4 8024BF14 34210FD0 */  ori       $at, $at, (0x40490FD0 & 0xFFFF)
/* 17A7F8 8024BF18 4481B000 */  mtc1      $at, $f22
/* 17A7FC 8024BF1C 00000000 */  nop
/* 17A800 8024BF20 46166302 */  mul.s     $f12, $f12, $f22
/* 17A804 8024BF24 00000000 */  nop
/* 17A808 8024BF28 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17A80C 8024BF2C 4481A000 */  mtc1      $at, $f20
D_8024BF30:
/* 17A810 8024BF30 00000000 */  nop
D_8024BF34:
/* 17A814 8024BF34 46146302 */  mul.s     $f12, $f12, $f20
/* 17A818 8024BF38 0C00A85B */  jal       sin_rad
/* 17A81C 8024BF3C 00000000 */   nop
/* 17A820 8024BF40 46160002 */  mul.s     $f0, $f0, $f22
/* 17A824 8024BF44 00000000 */  nop
/* 17A828 8024BF48 46140302 */  mul.s     $f12, $f0, $f20
/* 17A82C 8024BF4C 0C00A85B */  jal       sin_rad
/* 17A830 8024BF50 00000000 */   nop
/* 17A834 8024BF54 46160002 */  mul.s     $f0, $f0, $f22
D_8024BF58_C097D8:
/* 17A838 8024BF58 00000000 */  nop
/* 17A83C 8024BF5C 46140302 */  mul.s     $f12, $f0, $f20
/* 17A840 8024BF60 0C00A85B */  jal       sin_rad
/* 17A844 8024BF64 00000000 */   nop
/* 17A848 8024BF68 08092FE7 */  j         .L8024BF9C
/* 17A84C 8024BF6C 4600C101 */   sub.s    $f4, $f24, $f0
.L8024BF70:
/* 17A850 8024BF70 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17A854 8024BF74 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17A858 8024BF78 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17A85C 8024BF7C 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17A860 8024BF80 44822000 */  mtc1      $v0, $f4
/* 17A864 8024BF84 00000000 */  nop
jtbl_8024BF88:
/* 17A868 8024BF88 46802120 */  cvt.s.w   $f4, $f4
/* 17A86C 8024BF8C 44830000 */  mtc1      $v1, $f0
D_8024BF90_C09810:
/* 17A870 8024BF90 00000000 */  nop
/* 17A874 8024BF94 46800020 */  cvt.s.w   $f0, $f0
/* 17A878 8024BF98 46002103 */  div.s     $f4, $f4, $f0
.L8024BF9C:
/* 17A87C 8024BF9C 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
jtbl_8024BFA0:
/* 17A880 8024BFA0 C434F2A8 */  lwc1      $f20, %lo(BattleCam_InitialPosX)($at)
/* 17A884 8024BFA4 4604A502 */  mul.s     $f20, $f20, $f4
/* 17A888 8024BFA8 00000000 */  nop
.L8024BFAC:
/* 17A88C 8024BFAC 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 17A890 8024BFB0 C432F2AC */  lwc1      $f18, %lo(BattleCam_InitialPosY)($at)
/* 17A894 8024BFB4 46049482 */  mul.s     $f18, $f18, $f4
jtbl_8024BFB8:
/* 17A898 8024BFB8 00000000 */  nop
/* 17A89C 8024BFBC 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 17A8A0 8024BFC0 C430F2B0 */  lwc1      $f16, %lo(BattleCam_InitialPosZ)($at)
/* 17A8A4 8024BFC4 46048402 */  mul.s     $f16, $f16, $f4
D_8024BFC8_C09848:
/* 17A8A8 8024BFC8 00000000 */  nop
/* 17A8AC 8024BFCC 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
jtbl_8024BFD0:
/* 17A8B0 8024BFD0 C426F298 */  lwc1      $f6, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17A8B4 8024BFD4 46043182 */  mul.s     $f6, $f6, $f4
/* 17A8B8 8024BFD8 00000000 */  nop
D_8024BFDC:
/* 17A8BC 8024BFDC 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 17A8C0 8024BFE0 C42CF28C */  lwc1      $f12, %lo(BattleCam_InitialBoomLength)($at)
/* 17A8C4 8024BFE4 46046302 */  mul.s     $f12, $f12, $f4
jtbl_8024BFE8:
/* 17A8C8 8024BFE8 00000000 */  nop
/* 17A8CC 8024BFEC 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17A8D0 8024BFF0 C428F290 */  lwc1      $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 17A8D4 8024BFF4 46044202 */  mul.s     $f8, $f8, $f4
/* 17A8D8 8024BFF8 00000000 */  nop
/* 17A8DC 8024BFFC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
jtbl_8024C000:
/* 17A8E0 8024C000 44811000 */  mtc1      $at, $f2
/* 17A8E4 8024C004 00000000 */  nop
/* 17A8E8 8024C008 46041081 */  sub.s     $f2, $f2, $f4
/* 17A8EC 8024C00C 4602D682 */  mul.s     $f26, $f26, $f2
/* 17A8F0 8024C010 00000000 */  nop
/* 17A8F4 8024C014 C7BC0010 */  lwc1      $f28, 0x10($sp)
jtbl_8024C018:
/* 17A8F8 8024C018 4602E602 */  mul.s     $f24, $f28, $f2
/* 17A8FC 8024C01C 00000000 */  nop
/* 17A900 8024C020 3C02802A */  lui       $v0, %hi(BattleCam_BoomZOffset)
/* 17A904 8024C024 8442F286 */  lh        $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 17A908 8024C028 44820000 */  mtc1      $v0, $f0
/* 17A90C 8024C02C 00000000 */  nop
D_8024C030_C098B0:
/* 17A910 8024C030 46800020 */  cvt.s.w   $f0, $f0
/* 17A914 8024C034 46020002 */  mul.s     $f0, $f0, $f2
D_8024C038:
/* 17A918 8024C038 00000000 */  nop
/* 17A91C 8024C03C 4602F582 */  mul.s     $f22, $f30, $f2
D_8024C040:
/* 17A920 8024C040 00000000 */  nop
/* 17A924 8024C044 3C02802A */  lui       $v0, %hi(BattleCam_BoomLength)
glabel func_8024C048
/* 17A928 8024C048 8442F280 */  lh        $v0, %lo(BattleCam_BoomLength)($v0)
/* 17A92C 8024C04C 44827000 */  mtc1      $v0, $f14
/* 17A930 8024C050 00000000 */  nop
/* 17A934 8024C054 468073A0 */  cvt.s.w   $f14, $f14
/* 17A938 8024C058 46027382 */  mul.s     $f14, $f14, $f2
D_8024C05C:
/* 17A93C 8024C05C 00000000 */  nop
jtbl_8024C060:
/* 17A940 8024C060 3C02802A */  lui       $v0, %hi(BattleCam_BoomYaw)
/* 17A944 8024C064 8442F282 */  lh        $v0, %lo(BattleCam_BoomYaw)($v0)
D_8024C068:
/* 17A948 8024C068 44825000 */  mtc1      $v0, $f10
/* 17A94C 8024C06C 00000000 */  nop
/* 17A950 8024C070 468052A0 */  cvt.s.w   $f10, $f10
/* 17A954 8024C074 46025282 */  mul.s     $f10, $f10, $f2
/* 17A958 8024C078 00000000 */  nop
/* 17A95C 8024C07C 46003180 */  add.s     $f6, $f6, $f0
filemenu_iterFileIdx:
/* 17A960 8024C080 3C014380 */  lui       $at, (0x43800000 >> 16)
D_8024C084:
/* 17A964 8024C084 44810000 */  mtc1      $at, $f0
D_8024C088:
/* 17A968 8024C088 00000000 */  nop
D_8024C08C:
/* 17A96C 8024C08C 46003182 */  mul.s     $f6, $f6, $f0
D_8024C090:
/* 17A970 8024C090 00000000 */  nop
D_8024C094:
/* 17A974 8024C094 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
D_8024C098_C09918:
/* 17A978 8024C098 C420F294 */  lwc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
D_8024C09C:
/* 17A97C 8024C09C 46040002 */  mul.s     $f0, $f0, $f4
D_8024C0A0:
/* 17A980 8024C0A0 00000000 */  nop
D_8024C0A4:
/* 17A984 8024C0A4 461AA500 */  add.s     $f20, $f20, $f26
/* 17A988 8024C0A8 46189480 */  add.s     $f18, $f18, $f24
/* 17A98C 8024C0AC 46168400 */  add.s     $f16, $f16, $f22
D_8024C0B0:
/* 17A990 8024C0B0 460E6300 */  add.s     $f12, $f12, $f14
/* 17A994 8024C0B4 3C04802A */  lui       $a0, %hi(BattleCam_MoveTimeLeft)
D_8024C0B8:
/* 17A998 8024C0B8 2484F29E */  addiu     $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 17A99C 8024C0BC 3C02802A */  lui       $v0, %hi(BattleCam_BoomPitch)
/* 17A9A0 8024C0C0 8442F284 */  lh        $v0, %lo(BattleCam_BoomPitch)($v0)
/* 17A9A4 8024C0C4 460A4200 */  add.s     $f8, $f8, $f10
/* 17A9A8 8024C0C8 E6140054 */  swc1      $f20, 0x54($s0)
/* 17A9AC 8024C0CC 44822000 */  mtc1      $v0, $f4
/* 17A9B0 8024C0D0 00000000 */  nop
/* 17A9B4 8024C0D4 46802120 */  cvt.s.w   $f4, $f4
/* 17A9B8 8024C0D8 46022102 */  mul.s     $f4, $f4, $f2
/* 17A9BC 8024C0DC 00000000 */  nop
glabel func_8024C0E0
/* 17A9C0 8024C0E0 E6120058 */  swc1      $f18, 0x58($s0)
/* 17A9C4 8024C0E4 E610005C */  swc1      $f16, 0x5C($s0)
/* 17A9C8 8024C0E8 4600670D */  trunc.w.s $f28, $f12
/* 17A9CC 8024C0EC 4402E000 */  mfc1      $v0, $f28
/* 17A9D0 8024C0F0 00000000 */  nop
/* 17A9D4 8024C0F4 A602001E */  sh        $v0, 0x1E($s0)
/* 17A9D8 8024C0F8 46040000 */  add.s     $f0, $f0, $f4
/* 17A9DC 8024C0FC 4600470D */  trunc.w.s $f28, $f8
D_8024C100_C09980:
/* 17A9E0 8024C100 4402E000 */  mfc1      $v0, $f28
/* 17A9E4 8024C104 00000000 */  nop
D_8024C108:
/* 17A9E8 8024C108 A6020024 */  sh        $v0, 0x24($s0)
/* 17A9EC 8024C10C 4600070D */  trunc.w.s $f28, $f0
D_8024C110:
/* 17A9F0 8024C110 4402E000 */  mfc1      $v0, $f28
/* 17A9F4 8024C114 00000000 */  nop
/* 17A9F8 8024C118 A6020022 */  sh        $v0, 0x22($s0)
/* 17A9FC 8024C11C 4600370D */  trunc.w.s $f28, $f6
D_8024C120:
/* 17AA00 8024C120 4402E000 */  mfc1      $v0, $f28
/* 17AA04 8024C124 00000000 */  nop
/* 17AA08 8024C128 A6020026 */  sh        $v0, 0x26($s0)
.L8024C12C:
/* 17AA0C 8024C12C 84820000 */  lh        $v0, 0x0($a0)
/* 17AA10 8024C130 94830000 */  lhu       $v1, 0x0($a0)
/* 17AA14 8024C134 14400006 */  bnez      $v0, .L8024C150
/* 17AA18 8024C138 2462FFFF */   addiu    $v0, $v1, -0x1
/* 17AA1C 8024C13C 24020001 */  addiu     $v0, $zero, 0x1
/* 17AA20 8024C140 3C01802A */  lui       $at, %hi(BattleCam_DoneMoving)
/* 17AA24 8024C144 A022F29C */  sb        $v0, %lo(BattleCam_DoneMoving)($at)
/* 17AA28 8024C148 08093055 */  j         .L8024C154
/* 17AA2C 8024C14C 00000000 */   nop
.L8024C150:
/* 17AA30 8024C150 A4820000 */  sh        $v0, 0x0($a0)
.L8024C154:
/* 17AA34 8024C154 8FBF001C */  lw        $ra, 0x1C($sp)
/* 17AA38 8024C158 8FB00018 */  lw        $s0, 0x18($sp)
/* 17AA3C 8024C15C D7BE0048 */  ldc1      $f30, 0x48($sp)
.L8024C160:
/* 17AA40 8024C160 D7BC0040 */  ldc1      $f28, 0x40($sp)
/* 17AA44 8024C164 D7BA0038 */  ldc1      $f26, 0x38($sp)
/* 17AA48 8024C168 D7B80030 */  ldc1      $f24, 0x30($sp)
/* 17AA4C 8024C16C D7B60028 */  ldc1      $f22, 0x28($sp)
/* 17AA50 8024C170 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 17AA54 8024C174 0000102D */  daddu     $v0, $zero, $zero
/* 17AA58 8024C178 03E00008 */  jr        $ra
/* 17AA5C 8024C17C 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

ApiStatus CamPresetUpdate_D(Evt* script, s32 isInitialCall) {
    Camera* camera = &gCameras[CAM_BATTLE];
    f32 alpha;
    f32 x, y, z;

    if (isInitialCall) {
        BattleCam_PosX = 35.0f;
        BattleCam_PosY = 60.0f;
        BattleCam_PosZ = 0.0f;
        BattleCam_BoomPitch = 8;
        BattleCam_BoomYaw = 0;

        BattleCam_InitialBoomLength = camera->auxBoomLength;
        BattleCam_InitialBoomPitch = camera->auxBoomPitch;
        BattleCam_InitialBoomYaw = camera->auxBoomYaw;
        BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
        BattleCam_InitialPosX = camera->lookAt_obj_target.x;
        BattleCam_InitialPosY = camera->lookAt_obj_target.y;
        BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
        BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
    }

    x = BattleCam_PosX;
    y = BattleCam_PosY;
    z = BattleCam_PosZ;

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

    camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
    camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
    camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
    camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
    camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
    camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
    camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);

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

    return ApiStatus_BLOCK;
}