### RAW ASSEMBLY INSTRUCTIONS:

glabel red_impact_update
/* 3D3FB4 E00D0194 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 3D3FB8 E00D0198 AFB3001C */  sw        $s3, 0x1C($sp)
/* 3D3FBC E00D019C 0080982D */  daddu     $s3, $a0, $zero
/* 3D3FC0 E00D01A0 AFBF0024 */  sw        $ra, 0x24($sp)
/* 3D3FC4 E00D01A4 AFB40020 */  sw        $s4, 0x20($sp)
/* 3D3FC8 E00D01A8 AFB20018 */  sw        $s2, 0x18($sp)
/* 3D3FCC E00D01AC AFB10014 */  sw        $s1, 0x14($sp)
/* 3D3FD0 E00D01B0 AFB00010 */  sw        $s0, 0x10($sp)
/* 3D3FD4 E00D01B4 F7BA0040 */  sdc1      $f26, 0x40($sp)
/* 3D3FD8 E00D01B8 F7B80038 */  sdc1      $f24, 0x38($sp)
/* 3D3FDC E00D01BC F7B60030 */  sdc1      $f22, 0x30($sp)
/* 3D3FE0 E00D01C0 F7B40028 */  sdc1      $f20, 0x28($sp)
/* 3D3FE4 E00D01C4 8E64000C */  lw        $a0, 0xC($s3)
/* 3D3FE8 E00D01C8 8C82002C */  lw        $v0, 0x2C($a0)
/* 3D3FEC E00D01CC 8C830028 */  lw        $v1, 0x28($a0)
/* 3D3FF0 E00D01D0 24420001 */  addiu     $v0, $v0, 0x1
/* 3D3FF4 E00D01D4 2463FFFF */  addiu     $v1, $v1, -0x1
/* 3D3FF8 E00D01D8 AC82002C */  sw        $v0, 0x2C($a0)
/* 3D3FFC E00D01DC 04610005 */  bgez      $v1, .LE00D01F4
/* 3D4000 E00D01E0 AC830028 */   sw       $v1, 0x28($a0)
/* 3D4004 E00D01E4 0C080128 */  jal       shim_remove_effect
/* 3D4008 E00D01E8 0260202D */   daddu    $a0, $s3, $zero
/* 3D400C E00D01EC 08034106 */  j         .LE00D0418
/* 3D4010 E00D01F0 00000000 */   nop
.LE00D01F4:
/* 3D4014 E00D01F4 8C82002C */  lw        $v0, 0x2C($a0)
/* 3D4018 E00D01F8 94940000 */  lhu       $s4, 0x0($a0)
/* 3D401C E00D01FC 28420008 */  slti      $v0, $v0, 0x8
/* 3D4020 E00D0200 14400009 */  bnez      $v0, .LE00D0228
/* 3D4024 E00D0204 00000000 */   nop
/* 3D4028 E00D0208 3C01E00D */  lui       $at, (0xE00D0B20 >> 16)
/* 3D402C E00D020C D4220B20 */  ldc1      $f2, (0xE00D0B20 & 0xFFFF)($at)
/* 3D4030 E00D0210 C4800038 */  lwc1      $f0, 0x38($a0)
/* 3D4034 E00D0214 46800021 */  cvt.d.w   $f0, $f0
/* 3D4038 E00D0218 46220002 */  mul.d     $f0, $f0, $f2
/* 3D403C E00D021C 00000000 */  nop
/* 3D4040 E00D0220 4620028D */  trunc.w.d $f10, $f0
/* 3D4044 E00D0224 E48A0038 */  swc1      $f10, 0x38($a0)
.LE00D0228:
/* 3D4048 E00D0228 8E620008 */  lw        $v0, 0x8($s3)
/* 3D404C E00D022C 24110001 */  addiu     $s1, $zero, 0x1
/* 3D4050 E00D0230 0222102A */  slt       $v0, $s1, $v0
/* 3D4054 E00D0234 10400078 */  beqz      $v0, .LE00D0418
/* 3D4058 E00D0238 24840058 */   addiu    $a0, $a0, 0x58
/* 3D405C E00D023C 2490003C */  addiu     $s0, $a0, 0x3C
/* 3D4060 E00D0240 24120004 */  addiu     $s2, $zero, 0x4
/* 3D4064 E00D0244 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 3D4068 E00D0248 4481A800 */  mtc1      $at, $f21
/* 3D406C E00D024C 4480A000 */  mtc1      $zero, $f20
/* 3D4070 E00D0250 3C014200 */  lui       $at, (0x42000000 >> 16)
/* 3D4074 E00D0254 4481B000 */  mtc1      $at, $f22
/* 3D4078 E00D0258 3C01E00D */  lui       $at, (0xE00D0B28 >> 16)
/* 3D407C E00D025C D4380B28 */  ldc1      $f24, (0xE00D0B28 & 0xFFFF)($at)
/* 3D4080 E00D0260 3C014300 */  lui       $at, (0x43000000 >> 16)
/* 3D4084 E00D0264 4481D000 */  mtc1      $at, $f26
.LE00D0268:
/* 3D4088 E00D0268 8E020010 */  lw        $v0, 0x10($s0)
/* 3D408C E00D026C 24420001 */  addiu     $v0, $v0, 0x1
/* 3D4090 E00D0270 04400063 */  bltz      $v0, .LE00D0400
/* 3D4094 E00D0274 AE020010 */   sw       $v0, 0x10($s0)
/* 3D4098 E00D0278 14400041 */  bnez      $v0, .LE00D0380
/* 3D409C E00D027C 00000000 */   nop
/* 3D40A0 E00D0280 C60CFFF8 */  lwc1      $f12, -0x8($s0)
/* 3D40A4 E00D0284 AE00FFC8 */  sw        $zero, -0x38($s0)
/* 3D40A8 E00D0288 AE00FFCC */  sw        $zero, -0x34($s0)
/* 3D40AC E00D028C 0C080140 */  jal       shim_sin_deg
/* 3D40B0 E00D0290 AE00FFD0 */   sw       $zero, -0x30($s0)
/* 3D40B4 E00D0294 46000007 */  neg.s     $f0, $f0
/* 3D40B8 E00D0298 46000021 */  cvt.d.s   $f0, $f0
/* 3D40BC E00D029C 46340002 */  mul.d     $f0, $f0, $f20
/* 3D40C0 E00D02A0 00000000 */  nop
/* 3D40C4 E00D02A4 C60CFFF8 */  lwc1      $f12, -0x8($s0)
/* 3D40C8 E00D02A8 46200020 */  cvt.s.d   $f0, $f0
/* 3D40CC E00D02AC 0C080144 */  jal       shim_cos_deg
/* 3D40D0 E00D02B0 E600FFD4 */   swc1     $f0, -0x2C($s0)
/* 3D40D4 E00D02B4 46000021 */  cvt.d.s   $f0, $f0
/* 3D40D8 E00D02B8 46340002 */  mul.d     $f0, $f0, $f20
/* 3D40DC E00D02BC 00000000 */  nop
/* 3D40E0 E00D02C0 44911000 */  mtc1      $s1, $f2
/* 3D40E4 E00D02C4 00000000 */  nop
/* 3D40E8 E00D02C8 468010A0 */  cvt.s.w   $f2, $f2
/* 3D40EC E00D02CC 3C014020 */  lui       $at, (0x40200000 >> 16)
/* 3D40F0 E00D02D0 44812800 */  mtc1      $at, $f5
/* 3D40F4 E00D02D4 44802000 */  mtc1      $zero, $f4
/* 3D40F8 E00D02D8 460010A1 */  cvt.d.s   $f2, $f2
/* 3D40FC E00D02DC AE00FFDC */  sw        $zero, -0x24($s0)
/* 3D4100 E00D02E0 E6160000 */  swc1      $f22, 0x0($s0)
/* 3D4104 E00D02E4 46222101 */  sub.d     $f4, $f4, $f2
/* 3D4108 E00D02E8 E6160004 */  swc1      $f22, 0x4($s0)
/* 3D410C E00D02EC E616000C */  swc1      $f22, 0xC($s0)
/* 3D4110 E00D02F0 46202120 */  cvt.s.d   $f4, $f4
/* 3D4114 E00D02F4 E604FFE4 */  swc1      $f4, -0x1C($s0)
/* 3D4118 E00D02F8 46200020 */  cvt.s.d   $f0, $f0
/* 3D411C E00D02FC 1680000D */  bnez      $s4, .LE00D0334
/* 3D4120 E00D0300 E600FFD8 */   swc1     $f0, -0x28($s0)
/* 3D4124 E00D0304 44920000 */  mtc1      $s2, $f0
/* 3D4128 E00D0308 00000000 */  nop
/* 3D412C E00D030C 46800021 */  cvt.d.w   $f0, $f0
/* 3D4130 E00D0310 46340002 */  mul.d     $f0, $f0, $f20
/* 3D4134 E00D0314 00000000 */  nop
/* 3D4138 E00D0318 44921000 */  mtc1      $s2, $f2
/* 3D413C E00D031C 00000000 */  nop
/* 3D4140 E00D0320 468010A0 */  cvt.s.w   $f2, $f2
/* 3D4144 E00D0324 E602FFE0 */  swc1      $f2, -0x20($s0)
/* 3D4148 E00D0328 46200020 */  cvt.s.d   $f0, $f0
/* 3D414C E00D032C 080340DF */  j         .LE00D037C
/* 3D4150 E00D0330 E600FFE8 */   swc1     $f0, -0x18($s0)
.LE00D0334:
/* 3D4154 E00D0334 C602FFE4 */  lwc1      $f2, -0x1C($s0)
/* 3D4158 E00D0338 3C01E00D */  lui       $at, (0xE00D0B30 >> 16)
/* 3D415C E00D033C D4200B30 */  ldc1      $f0, (0xE00D0B30 & 0xFFFF)($at)
/* 3D4160 E00D0340 460010A1 */  cvt.d.s   $f2, $f2
/* 3D4164 E00D0344 46201082 */  mul.d     $f2, $f2, $f0
/* 3D4168 E00D0348 00000000 */  nop
/* 3D416C E00D034C 44910000 */  mtc1      $s1, $f0
/* 3D4170 E00D0350 00000000 */  nop
/* 3D4174 E00D0354 46800021 */  cvt.d.w   $f0, $f0
/* 3D4178 E00D0358 46340000 */  add.d     $f0, $f0, $f20
/* 3D417C E00D035C 46340102 */  mul.d     $f4, $f0, $f20
/* 3D4180 E00D0360 00000000 */  nop
/* 3D4184 E00D0364 46200020 */  cvt.s.d   $f0, $f0
/* 3D4188 E00D0368 E600FFE0 */  swc1      $f0, -0x20($s0)
/* 3D418C E00D036C 462010A0 */  cvt.s.d   $f2, $f2
/* 3D4190 E00D0370 E602FFE4 */  swc1      $f2, -0x1C($s0)
/* 3D4194 E00D0374 46202120 */  cvt.s.d   $f4, $f4
/* 3D4198 E00D0378 E604FFE8 */  swc1      $f4, -0x18($s0)
.LE00D037C:
/* 3D419C E00D037C E6160008 */  swc1      $f22, 0x8($s0)
.LE00D0380:
/* 3D41A0 E00D0380 C6040004 */  lwc1      $f4, 0x4($s0)
/* 3D41A4 E00D0384 3C01E00D */  lui       $at, (0xE00D0B38 >> 16)
/* 3D41A8 E00D0388 D4200B38 */  ldc1      $f0, (0xE00D0B38 & 0xFFFF)($at)
/* 3D41AC E00D038C 46002121 */  cvt.d.s   $f4, $f4
/* 3D41B0 E00D0390 46202102 */  mul.d     $f4, $f4, $f0
/* 3D41B4 E00D0394 00000000 */  nop
/* 3D41B8 E00D0398 C602FFE0 */  lwc1      $f2, -0x20($s0)
/* 3D41BC E00D039C 460010A1 */  cvt.d.s   $f2, $f2
/* 3D41C0 E00D03A0 46381082 */  mul.d     $f2, $f2, $f24
/* 3D41C4 E00D03A4 00000000 */  nop
/* 3D41C8 E00D03A8 C6080000 */  lwc1      $f8, 0x0($s0)
/* 3D41CC E00D03AC C6000004 */  lwc1      $f0, 0x4($s0)
/* 3D41D0 E00D03B0 C6060008 */  lwc1      $f6, 0x8($s0)
/* 3D41D4 E00D03B4 46004200 */  add.s     $f8, $f8, $f0
/* 3D41D8 E00D03B8 C600000C */  lwc1      $f0, 0xC($s0)
/* 3D41DC E00D03BC 46003180 */  add.s     $f6, $f6, $f0
/* 3D41E0 E00D03C0 C600FFE8 */  lwc1      $f0, -0x18($s0)
/* 3D41E4 E00D03C4 46000021 */  cvt.d.s   $f0, $f0
/* 3D41E8 E00D03C8 46380002 */  mul.d     $f0, $f0, $f24
/* 3D41EC E00D03CC 00000000 */  nop
/* 3D41F0 E00D03D0 E6080000 */  swc1      $f8, 0x0($s0)
/* 3D41F4 E00D03D4 E6060008 */  swc1      $f6, 0x8($s0)
/* 3D41F8 E00D03D8 46202120 */  cvt.s.d   $f4, $f4
/* 3D41FC E00D03DC 462010A0 */  cvt.s.d   $f2, $f2
/* 3D4200 E00D03E0 E602FFE0 */  swc1      $f2, -0x20($s0)
/* 3D4204 E00D03E4 46004086 */  mov.s     $f2, $f8
/* 3D4208 E00D03E8 4602D03C */  c.lt.s    $f26, $f2
/* 3D420C E00D03EC E6040004 */  swc1      $f4, 0x4($s0)
/* 3D4210 E00D03F0 46200020 */  cvt.s.d   $f0, $f0
/* 3D4214 E00D03F4 45000002 */  bc1f      .LE00D0400
/* 3D4218 E00D03F8 E600FFE8 */   swc1     $f0, -0x18($s0)
/* 3D421C E00D03FC E61A0000 */  swc1      $f26, 0x0($s0)
.LE00D0400:
/* 3D4220 E00D0400 26520002 */  addiu     $s2, $s2, 0x2
/* 3D4224 E00D0404 26310001 */  addiu     $s1, $s1, 0x1
/* 3D4228 E00D0408 8E620008 */  lw        $v0, 0x8($s3)
/* 3D422C E00D040C 0222102A */  slt       $v0, $s1, $v0
/* 3D4230 E00D0410 1440FF95 */  bnez      $v0, .LE00D0268
/* 3D4234 E00D0414 26100058 */   addiu    $s0, $s0, 0x58
.LE00D0418:
/* 3D4238 E00D0418 8FBF0024 */  lw        $ra, 0x24($sp)
/* 3D423C E00D041C 8FB40020 */  lw        $s4, 0x20($sp)
/* 3D4240 E00D0420 8FB3001C */  lw        $s3, 0x1C($sp)
/* 3D4244 E00D0424 8FB20018 */  lw        $s2, 0x18($sp)
/* 3D4248 E00D0428 8FB10014 */  lw        $s1, 0x14($sp)
/* 3D424C E00D042C 8FB00010 */  lw        $s0, 0x10($sp)
/* 3D4250 E00D0430 D7BA0040 */  ldc1      $f26, 0x40($sp)
/* 3D4254 E00D0434 D7B80038 */  ldc1      $f24, 0x38($sp)
/* 3D4258 E00D0438 D7B60030 */  ldc1      $f22, 0x30($sp)
/* 3D425C E00D043C D7B40028 */  ldc1      $f20, 0x28($sp)
/* 3D4260 E00D0440 03E00008 */  jr        $ra
/* 3D4264 E00D0444 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void red_impact_update(EffectInstance* effect) {
    RedImpactFXData* part = effect->data.redImpact;
    s32 unk_00;
    s32 i;

    part->unk_2C++;
    part->unk_28--;

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

    unk_00 = part->unk_00;

    if (part->unk_2C >= 8) {
        part->unk_38 *= 0.8;
    }

    part++;
    for (i = 1; i < effect->numParts; i++, part++) {
        part->unk_4C++;
        if (part->unk_4C >= 0) {
            if (part->unk_4C == 0) {
                part->unk_04 = 0;
                part->unk_08 = 0;
                part->unk_0C = 0;
                part->unk_10 = -shim_sin_deg(part->unk_34) * 0.5;
                part->unk_14 = shim_cos_deg(part->unk_34) * 0.5;
                part->unk_18 = 0;
                part->unk_3C = 32.0f;
                part->unk_40 = 32.0f;
                part->unk_48 = 32.0f;
                part->unk_20 = 8.0 - (f32) i;
                if (unk_00 == 0) {
                    part->unk_1C = 2 + i * 2;
                    part->unk_24 = (2 + i * 2) * 0.5;
                } else {
                    part->unk_1C = i + 0.5;
                    part->unk_20 *= 0.6;
                    part->unk_24 = (i + 0.5) * 0.5;
                }
                part->unk_44 = 32.0f;
            }
            part->unk_3C += part->unk_40;
            part->unk_44 += part->unk_48;
            part->unk_40 *= 0.9;
            part->unk_1C *= 1.002;
            part->unk_24 *= 1.002;
            if (part->unk_3C > 128.0f) {
                part->unk_3C = 128.0f;
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8024A4DC
/* 13D81C 8024A4DC 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 13D820 8024A4E0 AFB00010 */  sw        $s0, 0x10($sp)
/* 13D824 8024A4E4 3C038011 */  lui       $v1, %hi(gPlayerData)
/* 13D828 8024A4E8 2463F290 */  addiu     $v1, $v1, %lo(gPlayerData)
/* 13D82C 8024A4EC 24020001 */  addiu     $v0, $zero, 0x1
/* 13D830 8024A4F0 AFBF0014 */  sw        $ra, 0x14($sp)
/* 13D834 8024A4F4 3C018027 */  lui       $at, %hi(D_802705D0)
/* 13D838 8024A4F8 AC2005D0 */  sw        $zero, %lo(D_802705D0)($at)
/* 13D83C 8024A4FC 14820011 */  bne       $a0, $v0, .L8024A544
/* 13D840 8024A500 0000802D */   daddu    $s0, $zero, $zero
/* 13D844 8024A504 0200202D */  daddu     $a0, $s0, $zero
/* 13D848 8024A508 0060302D */  daddu     $a2, $v1, $zero
/* 13D84C 8024A50C 3C058027 */  lui       $a1, %hi(gPauseItemsItemIDs)
/* 13D850 8024A510 24A50400 */  addiu     $a1, $a1, %lo(gPauseItemsItemIDs)
.L8024A514:
/* 13D854 8024A514 84C201B4 */  lh        $v0, 0x1B4($a2)
/* 13D858 8024A518 94C301B4 */  lhu       $v1, 0x1B4($a2)
/* 13D85C 8024A51C 10400004 */  beqz      $v0, .L8024A530
D_8024A520:
/* 13D860 8024A520 24840001 */   addiu    $a0, $a0, 0x1
/* 13D864 8024A524 A4A30000 */  sh        $v1, 0x0($a1)
/* 13D868 8024A528 24A50002 */  addiu     $a1, $a1, 0x2
/* 13D86C 8024A52C 26100001 */  addiu     $s0, $s0, 0x1
.L8024A530:
/* 13D870 8024A530 2882000A */  slti      $v0, $a0, 0xA
/* 13D874 8024A534 1440FFF7 */  bnez      $v0, .L8024A514
/* 13D878 8024A538 24C60002 */   addiu    $a2, $a2, 0x2
/* 13D87C 8024A53C 0809295F */  j         .L8024A57C
/* 13D880 8024A540 00000000 */   nop
.L8024A544:
/* 13D884 8024A544 0000202D */  daddu     $a0, $zero, $zero
.L8024A548:
/* 13D888 8024A548 0060302D */  daddu     $a2, $v1, $zero
/* 13D88C 8024A54C 3C058027 */  lui       $a1, %hi(gPauseItemsItemIDs)
/* 13D890 8024A550 24A50400 */  addiu     $a1, $a1, %lo(gPauseItemsItemIDs)
.L8024A554:
/* 13D894 8024A554 84C20074 */  lh        $v0, 0x74($a2)
/* 13D898 8024A558 94C30074 */  lhu       $v1, 0x74($a2)
/* 13D89C 8024A55C 10400004 */  beqz      $v0, .L8024A570
/* 13D8A0 8024A560 24840001 */   addiu    $a0, $a0, 0x1
/* 13D8A4 8024A564 A4A30000 */  sh        $v1, 0x0($a1)
/* 13D8A8 8024A568 24A50002 */  addiu     $a1, $a1, 0x2
/* 13D8AC 8024A56C 26100001 */  addiu     $s0, $s0, 0x1
.L8024A570:
/* 13D8B0 8024A570 28820020 */  slti      $v0, $a0, 0x20
.L8024A574:
/* 13D8B4 8024A574 1440FFF7 */  bnez      $v0, .L8024A554
/* 13D8B8 8024A578 24C60002 */   addiu    $a2, $a2, 0x2
.L8024A57C:
/* 13D8BC 8024A57C 16000005 */  bnez      $s0, .L8024A594
/* 13D8C0 8024A580 24027FFE */   addiu    $v0, $zero, 0x7FFE
/* 13D8C4 8024A584 3C018027 */  lui       $at, %hi(gPauseItemsItemIDs)
/* 13D8C8 8024A588 A4220400 */  sh        $v0, %lo(gPauseItemsItemIDs)($at)
/* 13D8CC 8024A58C 0809296B */  j         D_8024A5AC
/* 13D8D0 8024A590 24100001 */   addiu    $s0, $zero, 0x1
.L8024A594:
/* 13D8D4 8024A594 3C048027 */  lui       $a0, %hi(gPauseItemsItemIDs)
/* 13D8D8 8024A598 24840400 */  addiu     $a0, $a0, %lo(gPauseItemsItemIDs)
/* 13D8DC 8024A59C 3C068025 */  lui       $a2, %hi(func_802497B0)
/* 13D8E0 8024A5A0 24C697B0 */  addiu     $a2, $a2, %lo(func_802497B0)
/* 13D8E4 8024A5A4 0C091293 */  jal       func_80244A4C
.L8024A5A8:
/* 13D8E8 8024A5A8 0200282D */   daddu    $a1, $s0, $zero
D_8024A5AC:
/* 13D8EC 8024A5AC 3C018027 */  lui       $at, %hi(gPauseItemsNumItems)
/* 13D8F0 8024A5B0 A43005CC */  sh        $s0, %lo(gPauseItemsNumItems)($at)
/* 13D8F4 8024A5B4 0200202D */  daddu     $a0, $s0, $zero
.L8024A5B8:
/* 13D8F8 8024A5B8 28820064 */  slti      $v0, $a0, 0x64
/* 13D8FC 8024A5BC 1040000A */  beqz      $v0, .L8024A5E8
/* 13D900 8024A5C0 24057FFF */   addiu    $a1, $zero, 0x7FFF
/* 13D904 8024A5C4 3C038027 */  lui       $v1, %hi(gPauseItemsItemIDs)
/* 13D908 8024A5C8 24630400 */  addiu     $v1, $v1, %lo(gPauseItemsItemIDs)
/* 13D90C 8024A5CC 00041040 */  sll       $v0, $a0, 1
/* 13D910 8024A5D0 00431821 */  addu      $v1, $v0, $v1
.L8024A5D4:
/* 13D914 8024A5D4 A4650000 */  sh        $a1, 0x0($v1)
/* 13D918 8024A5D8 24840001 */  addiu     $a0, $a0, 0x1
/* 13D91C 8024A5DC 28820064 */  slti      $v0, $a0, 0x64
/* 13D920 8024A5E0 1440FFFC */  bnez      $v0, .L8024A5D4
/* 13D924 8024A5E4 24630002 */   addiu    $v1, $v1, 0x2
.L8024A5E8:
/* 13D928 8024A5E8 3C058027 */  lui       $a1, %hi(gPauseItemsPages)
/* 13D92C 8024A5EC 24A504D0 */  addiu     $a1, $a1, %lo(gPauseItemsPages)
dgb_01_img5_gfx:
/* 13D930 8024A5F0 0000202D */  daddu     $a0, $zero, $zero
/* 13D934 8024A5F4 3C078027 */  lui       $a3, %hi(gPauseItemsNumItems)
/* 13D938 8024A5F8 24E705CC */  addiu     $a3, $a3, %lo(gPauseItemsNumItems)
/* 13D93C 8024A5FC 24060001 */  addiu     $a2, $zero, 0x1
/* 13D940 8024A600 24090008 */  addiu     $t1, $zero, 0x8
/* 13D944 8024A604 24080008 */  addiu     $t0, $zero, 0x8
/* 13D948 8024A608 00A81821 */  addu      $v1, $a1, $t0
/* 13D94C 8024A60C 3C018027 */  lui       $at, %hi(gPauseItemsSelectedIndex)
/* 13D950 8024A610 AC2005C0 */  sw        $zero, %lo(gPauseItemsSelectedIndex)($at)
/* 13D954 8024A614 3C018027 */  lui       $at, %hi(gPauseItemsSelectedItem)
/* 13D958 8024A618 AC2005C8 */  sw        $zero, %lo(gPauseItemsSelectedItem)($at)
/* 13D95C 8024A61C 3C018027 */  lui       $at, %hi(D_802705C4)
/* 13D960 8024A620 AC2005C4 */  sw        $zero, %lo(D_802705C4)($at)
/* 13D964 8024A624 3C018027 */  lui       $at, %hi(gPauseItemsTargetScrollIndex)
/* 13D968 8024A628 AC2005DC */  sw        $zero, %lo(gPauseItemsTargetScrollIndex)($at)
.L8024A62C:
/* 13D96C 8024A62C 3C018027 */  lui       $at, %hi(gPauseItemsCurrentPage)
D_8024A630_DD7300:
/* 13D970 8024A630 AC2004C8 */  sw        $zero, %lo(gPauseItemsCurrentPage)($at)
.L8024A634:
/* 13D974 8024A634 84E20000 */  lh        $v0, 0x0($a3)
D_8024A638_DD7308:
/* 13D978 8024A638 04420001 */  bltzl     $v0, jtbl_8024A640
/* 13D97C 8024A63C 24420007 */   addiu    $v0, $v0, 0x7
jtbl_8024A640:
/* 13D980 8024A640 000210C3 */  sra       $v0, $v0, 3
/* 13D984 8024A644 0082102A */  slt       $v0, $a0, $v0
/* 13D988 8024A648 1040000B */  beqz      $v0, .L8024A678
/* 13D98C 8024A64C 000410C0 */   sll      $v0, $a0, 3
/* 13D990 8024A650 24840001 */  addiu     $a0, $a0, 0x1
/* 13D994 8024A654 A062FFF9 */  sb        $v0, -0x7($v1)
/* 13D998 8024A658 A066FFFA */  sb        $a2, -0x6($v1)
/* 13D99C 8024A65C A069FFFB */  sb        $t1, -0x5($v1)
/* 13D9A0 8024A660 A0A60000 */  sb        $a2, 0x0($a1)
/* 13D9A4 8024A664 AC62FFFC */  sw        $v0, -0x4($v1)
/* 13D9A8 8024A668 AC680000 */  sw        $t0, 0x0($v1)
/* 13D9AC 8024A66C 2463000C */  addiu     $v1, $v1, 0xC
dgb_01_img6_png:
/* 13D9B0 8024A670 0809298D */  j         .L8024A634
/* 13D9B4 8024A674 24A5000C */   addiu    $a1, $a1, 0xC
.L8024A678:
/* 13D9B8 8024A678 94E20000 */  lhu       $v0, 0x0($a3)
/* 13D9BC 8024A67C 30420007 */  andi      $v0, $v0, 0x7
.L8024A680:
/* 13D9C0 8024A680 10400016 */  beqz      $v0, .L8024A6DC
/* 13D9C4 8024A684 000418C0 */   sll      $v1, $a0, 3
/* 13D9C8 8024A688 24020001 */  addiu     $v0, $zero, 0x1
/* 13D9CC 8024A68C A0A30001 */  sb        $v1, 0x1($a1)
/* 13D9D0 8024A690 A0A20002 */  sb        $v0, 0x2($a1)
/* 13D9D4 8024A694 A0A20000 */  sb        $v0, 0x0($a1)
/* 13D9D8 8024A698 84E60000 */  lh        $a2, 0x0($a3)
/* 13D9DC 8024A69C ACA30004 */  sw        $v1, 0x4($a1)
/* 13D9E0 8024A6A0 04C10002 */  bgez      $a2, .L8024A6AC
/* 13D9E4 8024A6A4 00C0102D */   daddu    $v0, $a2, $zero
/* 13D9E8 8024A6A8 24C20007 */  addiu     $v0, $a2, 0x7
.L8024A6AC:
/* 13D9EC 8024A6AC 000210C3 */  sra       $v0, $v0, 3
D_8024A6B0:
/* 13D9F0 8024A6B0 000210C0 */  sll       $v0, $v0, 3
/* 13D9F4 8024A6B4 00C21023 */  subu      $v0, $a2, $v0
/* 13D9F8 8024A6B8 00021400 */  sll       $v0, $v0, 16
/* 13D9FC 8024A6BC 00021403 */  sra       $v0, $v0, 16
/* 13DA00 8024A6C0 ACA20008 */  sw        $v0, 0x8($a1)
/* 13DA04 8024A6C4 90A2000B */  lbu       $v0, 0xB($a1)
/* 13DA08 8024A6C8 24840001 */  addiu     $a0, $a0, 0x1
.L8024A6CC:
/* 13DA0C 8024A6CC 080929B6 */  j         .L8024A6D8
/* 13DA10 8024A6D0 A0A20003 */   sb       $v0, 0x3($a1)
.L8024A6D4:
/* 13DA14 8024A6D4 24840001 */  addiu     $a0, $a0, 0x1
.L8024A6D8:
/* 13DA18 8024A6D8 24A5000C */  addiu     $a1, $a1, 0xC
.L8024A6DC:
/* 13DA1C 8024A6DC 28820014 */  slti      $v0, $a0, 0x14
/* 13DA20 8024A6E0 5440FFFC */  bnel      $v0, $zero, .L8024A6D4
/* 13DA24 8024A6E4 A0A00000 */   sb       $zero, 0x0($a1)
/* 13DA28 8024A6E8 0000202D */  daddu     $a0, $zero, $zero
/* 13DA2C 8024A6EC 0C09260A */  jal       func_80249828
/* 13DA30 8024A6F0 0080282D */   daddu    $a1, $a0, $zero
/* 13DA34 8024A6F4 8FBF0014 */  lw        $ra, 0x14($sp)
/* 13DA38 8024A6F8 8FB00010 */  lw        $s0, 0x10($sp)
/* 13DA3C 8024A6FC 3C018027 */  lui       $at, %hi(gPauseItemsCurrentScrollPos)
/* 13DA40 8024A700 AC2205D4 */  sw        $v0, %lo(gPauseItemsCurrentScrollPos)($at)
/* 13DA44 8024A704 3C018027 */  lui       $at, %hi(gPauseItemsTargetScrollPos)
/* 13DA48 8024A708 AC2205D8 */  sw        $v0, %lo(gPauseItemsTargetScrollPos)($at)
/* 13DA4C 8024A70C 03E00008 */  jr        $ra
/* 13DA50 8024A710 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void pause_items_load_items(s32 invItems) {
    PlayerData* playerData = &gPlayerData;
    s32 i;
    s16* itemIDs;
    s32 pageNum;
    s16* itemMenuNumItems;
    s32 totalItems = 0;
    PauseItemPage* page;
    s32 items;
    s16* itemMenuItemIDs;

    D_802705D0 = 0;
    if (invItems == TRUE) {
        for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
            if (playerData->invItems[i] != 0) {
                gPauseItemsItemIDs[totalItems] = playerData->invItems[i];
                totalItems++;
            }
        }
    } else {
        for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) {
            if (playerData->keyItems[i] != 0) {
                gPauseItemsItemIDs[totalItems] = playerData->keyItems[i];
                totalItems++;
            }
        }
    }

    if (totalItems == 0) {
        gPauseItemsItemIDs[0] = ITEM_NONE_STANDIN;
        totalItems = 1;
    } else {
        pause_sort_item_list(gPauseItemsItemIDs, totalItems, pause_items_comparator);
    }

    gPauseItemsNumItems = totalItems;

    for (i = totalItems; i < ARRAY_COUNT(gPauseItemsItemIDs); i++) {
        gPauseItemsItemIDs[i] = ITEM_INVALID;
    }

    page = gPauseItemsPages;
    gPauseItemsSelectedIndex = 0;
    gPauseItemsSelectedItem = 0;
    D_802705C4 = 0;
    gPauseItemsTargetScrollIndex = 0;
    gPauseItemsCurrentPage = 0;

    for (i = 0; i < gPauseItemsNumItems / 8; i++, page++) {
        page->listStart = i * 8;
        page->numCols = 1;
        page->numRows = 8;
        page->enabled = TRUE;
        page->startIndex =  i * 8;
        page->count = 8;
    }

    if ((gPauseItemsNumItems % 8) != 0) {
        page->listStart = i * 8;
        page->numCols = 1;
        page->enabled = TRUE;
        page->startIndex = i * 8;
        page->count = gPauseItemsNumItems % 8;
        page->numRows = page->count;
        i++;
        page++;
    }

    for (; i < ARRAY_COUNT(gPauseItemsPages); i++, page++) {
        page->enabled = FALSE;
    }

    gPauseItemsTargetScrollPos = gPauseItemsCurrentScrollPos = pause_items_get_pos_y(0, 0);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel spiky_white_aura_appendGfx
/* 34E468 E0038748 27BDFF30 */  addiu     $sp, $sp, -0xD0
/* 34E46C E003874C AFB700B4 */  sw        $s7, 0xB4($sp)
/* 34E470 E0038750 0080B82D */  daddu     $s7, $a0, $zero
/* 34E474 E0038754 3C02DB06 */  lui       $v0, (0xDB060024 >> 16)
/* 34E478 E0038758 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 34E47C E003875C 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 34E480 E0038760 34420024 */  ori       $v0, $v0, (0xDB060024 & 0xFFFF)
/* 34E484 E0038764 AFBF00BC */  sw        $ra, 0xBC($sp)
/* 34E488 E0038768 AFBE00B8 */  sw        $fp, 0xB8($sp)
/* 34E48C E003876C AFB600B0 */  sw        $s6, 0xB0($sp)
/* 34E490 E0038770 AFB500AC */  sw        $s5, 0xAC($sp)
/* 34E494 E0038774 AFB400A8 */  sw        $s4, 0xA8($sp)
/* 34E498 E0038778 AFB300A4 */  sw        $s3, 0xA4($sp)
/* 34E49C E003877C AFB200A0 */  sw        $s2, 0xA0($sp)
/* 34E4A0 E0038780 AFB1009C */  sw        $s1, 0x9C($sp)
/* 34E4A4 E0038784 AFB00098 */  sw        $s0, 0x98($sp)
/* 34E4A8 E0038788 F7B600C8 */  sdc1      $f22, 0xC8($sp)
/* 34E4AC E003878C F7B400C0 */  sdc1      $f20, 0xC0($sp)
/* 34E4B0 E0038790 8CC40000 */  lw        $a0, 0x0($a2)
/* 34E4B4 E0038794 8EE7000C */  lw        $a3, 0xC($s7)
/* 34E4B8 E0038798 0080282D */  daddu     $a1, $a0, $zero
/* 34E4BC E003879C 24840008 */  addiu     $a0, $a0, 0x8
/* 34E4C0 E00387A0 ACC40000 */  sw        $a0, 0x0($a2)
/* 34E4C4 E00387A4 ACA20000 */  sw        $v0, 0x0($a1)
/* 34E4C8 E00387A8 24820008 */  addiu     $v0, $a0, 0x8
/* 34E4CC E00387AC ACC20000 */  sw        $v0, 0x0($a2)
/* 34E4D0 E00387B0 8EE30010 */  lw        $v1, 0x10($s7)
/* 34E4D4 E00387B4 24820010 */  addiu     $v0, $a0, 0x10
/* 34E4D8 E00387B8 ACC20000 */  sw        $v0, 0x0($a2)
/* 34E4DC E00387BC 8C62001C */  lw        $v0, 0x1C($v1)
/* 34E4E0 E00387C0 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 34E4E4 E00387C4 00431021 */  addu      $v0, $v0, $v1
/* 34E4E8 E00387C8 ACA20004 */  sw        $v0, 0x4($a1)
/* 34E4EC E00387CC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 34E4F0 E00387D0 AC820000 */  sw        $v0, 0x0($a0)
/* 34E4F4 E00387D4 3C020900 */  lui       $v0, %hi(D_09000440_4154A0)
/* 34E4F8 E00387D8 24420440 */  addiu     $v0, $v0, %lo(D_09000440_4154A0)
/* 34E4FC E00387DC AC820004 */  sw        $v0, 0x4($a0)
/* 34E500 E00387E0 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 34E504 E00387E4 AC820008 */  sw        $v0, 0x8($a0)
/* 34E508 E00387E8 90E20027 */  lbu       $v0, 0x27($a3)
/* 34E50C E00387EC 2403FF00 */  addiu     $v1, $zero, -0x100
/* 34E510 E00387F0 00431025 */  or        $v0, $v0, $v1
/* 34E514 E00387F4 AC82000C */  sw        $v0, 0xC($a0)
/* 34E518 E00387F8 8EE20008 */  lw        $v0, 0x8($s7)
/* 34E51C E00387FC 1840006B */  blez      $v0, .LE00389AC
/* 34E520 E0038800 0000902D */   daddu    $s2, $zero, $zero
/* 34E524 E0038804 27B10058 */  addiu     $s1, $sp, 0x58
/* 34E528 E0038808 3C1E800B */  lui       $fp, %hi(gCameras)
/* 34E52C E003880C 27DE1D80 */  addiu     $fp, $fp, %lo(gCameras)
/* 34E530 E0038810 3C16800A */  lui       $s6, %hi(gDisplayContext)
/* 34E534 E0038814 26D6A674 */  addiu     $s6, $s6, %lo(gDisplayContext)
/* 34E538 E0038818 3C158007 */  lui       $s5, %hi(gMatrixListPos)
/* 34E53C E003881C 26B541F0 */  addiu     $s5, $s5, %lo(gMatrixListPos)
/* 34E540 E0038820 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 34E544 E0038824 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 34E548 E0038828 00C0982D */  daddu     $s3, $a2, $zero
/* 34E54C E003882C 24F00020 */  addiu     $s0, $a3, 0x20
/* 34E550 E0038830 4480A000 */  mtc1      $zero, $f20
/* 34E554 E0038834 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 34E558 E0038838 4481B000 */  mtc1      $at, $f22
.LE003883C:
/* 34E55C E003883C 27A40018 */  addiu     $a0, $sp, 0x18
/* 34E560 E0038840 8E05FFE4 */  lw        $a1, -0x1C($s0)
/* 34E564 E0038844 8E06FFE8 */  lw        $a2, -0x18($s0)
/* 34E568 E0038848 8E07FFEC */  lw        $a3, -0x14($s0)
/* 34E56C E003884C 0C080108 */  jal       shim_guTranslateF
/* 34E570 E0038850 26520001 */   addiu    $s2, $s2, 0x1
/* 34E574 E0038854 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 34E578 E0038858 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 34E57C E003885C 4406A000 */  mfc1      $a2, $f20
/* 34E580 E0038860 00031080 */  sll       $v0, $v1, 2
/* 34E584 E0038864 00431021 */  addu      $v0, $v0, $v1
/* 34E588 E0038868 00021080 */  sll       $v0, $v0, 2
/* 34E58C E003886C 00431023 */  subu      $v0, $v0, $v1
/* 34E590 E0038870 000218C0 */  sll       $v1, $v0, 3
/* 34E594 E0038874 00431021 */  addu      $v0, $v0, $v1
/* 34E598 E0038878 000210C0 */  sll       $v0, $v0, 3
/* 34E59C E003887C 005E1021 */  addu      $v0, $v0, $fp
/* 34E5A0 E0038880 C440006C */  lwc1      $f0, 0x6C($v0)
/* 34E5A4 E0038884 4407B000 */  mfc1      $a3, $f22
/* 34E5A8 E0038888 46000007 */  neg.s     $f0, $f0
/* 34E5AC E003888C 44050000 */  mfc1      $a1, $f0
/* 34E5B0 E0038890 0220202D */  daddu     $a0, $s1, $zero
/* 34E5B4 E0038894 0C080104 */  jal       shim_guRotateF
/* 34E5B8 E0038898 E7B40010 */   swc1     $f20, 0x10($sp)
/* 34E5BC E003889C 0220202D */  daddu     $a0, $s1, $zero
/* 34E5C0 E00388A0 27A50018 */  addiu     $a1, $sp, 0x18
/* 34E5C4 E00388A4 0C080114 */  jal       shim_guMtxCatF
/* 34E5C8 E00388A8 00A0302D */   daddu    $a2, $a1, $zero
/* 34E5CC E00388AC E7B60010 */  swc1      $f22, 0x10($sp)
/* 34E5D0 E00388B0 8E05FFFC */  lw        $a1, -0x4($s0)
/* 34E5D4 E00388B4 4406A000 */  mfc1      $a2, $f20
/* 34E5D8 E00388B8 4407A000 */  mfc1      $a3, $f20
/* 34E5DC E00388BC 0C080104 */  jal       shim_guRotateF
/* 34E5E0 E00388C0 0220202D */   daddu    $a0, $s1, $zero
/* 34E5E4 E00388C4 0220202D */  daddu     $a0, $s1, $zero
/* 34E5E8 E00388C8 27A50018 */  addiu     $a1, $sp, 0x18
/* 34E5EC E00388CC 0C080114 */  jal       shim_guMtxCatF
/* 34E5F0 E00388D0 00A0302D */   daddu    $a2, $a1, $zero
/* 34E5F4 E00388D4 0220202D */  daddu     $a0, $s1, $zero
/* 34E5F8 E00388D8 8E050000 */  lw        $a1, 0x0($s0)
/* 34E5FC E00388DC 26100030 */  addiu     $s0, $s0, 0x30
/* 34E600 E00388E0 4407B000 */  mfc1      $a3, $f22
/* 34E604 E00388E4 0C080110 */  jal       shim_guScaleF
/* 34E608 E00388E8 00A0302D */   daddu    $a2, $a1, $zero
/* 34E60C E00388EC 0220202D */  daddu     $a0, $s1, $zero
/* 34E610 E00388F0 27A50018 */  addiu     $a1, $sp, 0x18
/* 34E614 E00388F4 0C080114 */  jal       shim_guMtxCatF
/* 34E618 E00388F8 00A0302D */   daddu    $a2, $a1, $zero
/* 34E61C E00388FC 27A40018 */  addiu     $a0, $sp, 0x18
/* 34E620 E0038900 96A50000 */  lhu       $a1, 0x0($s5)
/* 34E624 E0038904 8EC20000 */  lw        $v0, 0x0($s6)
/* 34E628 E0038908 00052980 */  sll       $a1, $a1, 6
/* 34E62C E003890C 00B42821 */  addu      $a1, $a1, $s4
/* 34E630 E0038910 0C080118 */  jal       shim_guMtxF2L
/* 34E634 E0038914 00452821 */   addu     $a1, $v0, $a1
/* 34E638 E0038918 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 34E63C E003891C 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 34E640 E0038920 8E640000 */  lw        $a0, 0x0($s3)
/* 34E644 E0038924 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 34E648 E0038928 0080182D */  daddu     $v1, $a0, $zero
/* 34E64C E003892C 24840008 */  addiu     $a0, $a0, 0x8
/* 34E650 E0038930 AE640000 */  sw        $a0, 0x0($s3)
/* 34E654 E0038934 AC620000 */  sw        $v0, 0x0($v1)
/* 34E658 E0038938 24820008 */  addiu     $v0, $a0, 0x8
/* 34E65C E003893C AC600004 */  sw        $zero, 0x4($v1)
/* 34E660 E0038940 AE620000 */  sw        $v0, 0x0($s3)
/* 34E664 E0038944 96A20000 */  lhu       $v0, 0x0($s5)
/* 34E668 E0038948 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 34E66C E003894C AC830000 */  sw        $v1, 0x0($a0)
/* 34E670 E0038950 24430001 */  addiu     $v1, $v0, 0x1
/* 34E674 E0038954 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 34E678 E0038958 00021180 */  sll       $v0, $v0, 6
/* 34E67C E003895C A6A30000 */  sh        $v1, 0x0($s5)
/* 34E680 E0038960 8EC30000 */  lw        $v1, 0x0($s6)
/* 34E684 E0038964 00541021 */  addu      $v0, $v0, $s4
/* 34E688 E0038968 00621821 */  addu      $v1, $v1, $v0
/* 34E68C E003896C 24820010 */  addiu     $v0, $a0, 0x10
/* 34E690 E0038970 AC830004 */  sw        $v1, 0x4($a0)
/* 34E694 E0038974 AE620000 */  sw        $v0, 0x0($s3)
/* 34E698 E0038978 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 34E69C E003897C AC820008 */  sw        $v0, 0x8($a0)
/* 34E6A0 E0038980 3C020900 */  lui       $v0, %hi(D_090004E8_415548)
/* 34E6A4 E0038984 244204E8 */  addiu     $v0, $v0, %lo(D_090004E8_415548)
/* 34E6A8 E0038988 AC82000C */  sw        $v0, 0xC($a0)
/* 34E6AC E003898C 24020040 */  addiu     $v0, $zero, 0x40
/* 34E6B0 E0038990 AC850010 */  sw        $a1, 0x10($a0)
/* 34E6B4 E0038994 AC820014 */  sw        $v0, 0x14($a0)
/* 34E6B8 E0038998 8EE20008 */  lw        $v0, 0x8($s7)
/* 34E6BC E003899C 24840018 */  addiu     $a0, $a0, 0x18
/* 34E6C0 E00389A0 0242102A */  slt       $v0, $s2, $v0
/* 34E6C4 E00389A4 1440FFA5 */  bnez      $v0, .LE003883C
/* 34E6C8 E00389A8 AE640000 */   sw       $a0, 0x0($s3)
.LE00389AC:
/* 34E6CC E00389AC 8FBF00BC */  lw        $ra, 0xBC($sp)
/* 34E6D0 E00389B0 8FBE00B8 */  lw        $fp, 0xB8($sp)
/* 34E6D4 E00389B4 8FB700B4 */  lw        $s7, 0xB4($sp)
/* 34E6D8 E00389B8 8FB600B0 */  lw        $s6, 0xB0($sp)
/* 34E6DC E00389BC 8FB500AC */  lw        $s5, 0xAC($sp)
/* 34E6E0 E00389C0 8FB400A8 */  lw        $s4, 0xA8($sp)
/* 34E6E4 E00389C4 8FB300A4 */  lw        $s3, 0xA4($sp)
/* 34E6E8 E00389C8 8FB200A0 */  lw        $s2, 0xA0($sp)
/* 34E6EC E00389CC 8FB1009C */  lw        $s1, 0x9C($sp)
/* 34E6F0 E00389D0 8FB00098 */  lw        $s0, 0x98($sp)
/* 34E6F4 E00389D4 D7B600C8 */  ldc1      $f22, 0xC8($sp)
/* 34E6F8 E00389D8 D7B400C0 */  ldc1      $f20, 0xC0($sp)
/* 34E6FC E00389DC 03E00008 */  jr        $ra
/* 34E700 E00389E0 27BD00D0 */   addiu    $sp, $sp, 0xD0
/* 34E704 E00389E4 00000000 */  nop
/* 34E708 E00389E8 00000000 */  nop
/* 34E70C E00389EC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void spiky_white_aura_appendGfx(void* effect) {
    SpikyWhiteAuraFXData* part = ((EffectInstance*)effect)->data.spikyWhiteAura;
    Matrix4f sp18;
    Matrix4f sp58;
    s32 i;

    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_09000440_34EBB0);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, part->unk_24);

    for (i = 0; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        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_guRotateF(sp58, part->unk_1C, 0.0f, 0.0f, 1.0f);
        shim_guMtxCatF(sp58, sp18, sp18);
        shim_guScaleF(sp58, part->unk_20, part->unk_20, 1.0f);
        shim_guMtxCatF(sp58, sp18, sp18);
        shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);

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


### RAW ASSEMBLY INSTRUCTIONS:

glabel PlayerDamageEnemy
/* 1A2B40 80274260 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1A2B44 80274264 AFB20018 */  sw        $s2, 0x18($sp)
/* 1A2B48 80274268 0080902D */  daddu     $s2, $a0, $zero
/* 1A2B4C 8027426C AFBF0020 */  sw        $ra, 0x20($sp)
/* 1A2B50 80274270 AFB3001C */  sw        $s3, 0x1C($sp)
/* 1A2B54 80274274 AFB10014 */  sw        $s1, 0x14($sp)
/* 1A2B58 80274278 AFB00010 */  sw        $s0, 0x10($sp)
/* 1A2B5C 8027427C 8E50000C */  lw        $s0, 0xC($s2)
/* 1A2B60 80274280 3C11800E */  lui       $s1, %hi(gBattleStatus)
/* 1A2B64 80274284 2631C070 */  addiu     $s1, $s1, %lo(gBattleStatus)
/* 1A2B68 80274288 8E130000 */  lw        $s3, 0x0($s0)
/* 1A2B6C 8027428C 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2B70 80274290 8E020000 */  lw        $v0, 0x0($s0)
/* 1A2B74 80274294 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2B78 80274298 AE220188 */  sw        $v0, 0x188($s1)
/* 1A2B7C 8027429C 8E020000 */  lw        $v0, 0x0($s0)
/* 1A2B80 802742A0 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2B84 802742A4 AE22018C */  sw        $v0, 0x18C($s1)
/* 1A2B88 802742A8 8E020000 */  lw        $v0, 0x0($s0)
/* 1A2B8C 802742AC 26100004 */  addiu     $s0, $s0, 0x4
/* 1A2B90 802742B0 AE220190 */  sw        $v0, 0x190($s1)
/* 1A2B94 802742B4 8E050000 */  lw        $a1, 0x0($s0)
/* 1A2B98 802742B8 0C0B1EAF */  jal       evt_get_variable
/* 1A2B9C 802742BC 26100004 */   addiu    $s0, $s0, 0x4
/* 1A2BA0 802742C0 A622017E */  sh        $v0, 0x17E($s1)
/* 1A2BA4 802742C4 A2200198 */  sb        $zero, 0x198($s1)
/* 1A2BA8 802742C8 8E100000 */  lw        $s0, 0x0($s0)
/* 1A2BAC 802742CC 24020030 */  addiu     $v0, $zero, 0x30
/* 1A2BB0 802742D0 32030030 */  andi      $v1, $s0, 0x30
/* 1A2BB4 802742D4 54620004 */  bnel      $v1, $v0, .L802742E8
/* 1A2BB8 802742D8 32020010 */   andi     $v0, $s0, 0x10
/* 1A2BBC 802742DC 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2BC0 802742E0 0809D0CA */  j         .L80274328
/* 1A2BC4 802742E4 34420030 */   ori      $v0, $v0, 0x30
.L802742E8:
/* 1A2BC8 802742E8 10400004 */  beqz      $v0, .L802742FC
/* 1A2BCC 802742EC 2403FFDF */   addiu    $v1, $zero, -0x21
/* 1A2BD0 802742F0 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2BD4 802742F4 0809D0C9 */  j         .L80274324
/* 1A2BD8 802742F8 34420010 */   ori      $v0, $v0, 0x10
.L802742FC:
/* 1A2BDC 802742FC 32020020 */  andi      $v0, $s0, 0x20
/* 1A2BE0 80274300 10400005 */  beqz      $v0, .L80274318
/* 1A2BE4 80274304 2403FFEF */   addiu    $v1, $zero, -0x11
/* 1A2BE8 80274308 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2BEC 8027430C 00431024 */  and       $v0, $v0, $v1
/* 1A2BF0 80274310 0809D0CA */  j         .L80274328
/* 1A2BF4 80274314 34420020 */   ori      $v0, $v0, 0x20
.L80274318:
/* 1A2BF8 80274318 8E220000 */  lw        $v0, 0x0($s1)
/* 1A2BFC 8027431C 00431024 */  and       $v0, $v0, $v1
/* 1A2C00 80274320 2403FFDF */  addiu     $v1, $zero, -0x21
.L80274324:
/* 1A2C04 80274324 00431024 */  and       $v0, $v0, $v1
.L80274328:
/* 1A2C08 80274328 AE220000 */  sw        $v0, 0x0($s1)
/* 1A2C0C 8027432C 32020040 */  andi      $v0, $s0, 0x40
/* 1A2C10 80274330 10400007 */  beqz      $v0, .L80274350
/* 1A2C14 80274334 2404FFBF */   addiu    $a0, $zero, -0x41
/* 1A2C18 80274338 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2C1C 8027433C 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2C20 80274340 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2C24 80274344 34420040 */  ori       $v0, $v0, 0x40
/* 1A2C28 80274348 0809D0D9 */  j         .L80274364
/* 1A2C2C 8027434C AC620000 */   sw       $v0, 0x0($v1)
.L80274350:
/* 1A2C30 80274350 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2C34 80274354 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2C38 80274358 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2C3C 8027435C 00641824 */  and       $v1, $v1, $a0
/* 1A2C40 80274360 AC430000 */  sw        $v1, 0x0($v0)
.L80274364:
/* 1A2C44 80274364 32020200 */  andi      $v0, $s0, 0x200
/* 1A2C48 80274368 10400007 */  beqz      $v0, .L80274388
/* 1A2C4C 8027436C 2404FDFF */   addiu    $a0, $zero, -0x201
/* 1A2C50 80274370 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2C54 80274374 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2C58 80274378 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2C5C 8027437C 34420200 */  ori       $v0, $v0, 0x200
/* 1A2C60 80274380 0809D0E7 */  j         .L8027439C
/* 1A2C64 80274384 AC620000 */   sw       $v0, 0x0($v1)
.L80274388:
/* 1A2C68 80274388 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2C6C 8027438C 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2C70 80274390 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2C74 80274394 00641824 */  and       $v1, $v1, $a0
/* 1A2C78 80274398 AC430000 */  sw        $v1, 0x0($v0)
.L8027439C:
/* 1A2C7C 8027439C 32020080 */  andi      $v0, $s0, 0x80
/* 1A2C80 802743A0 10400007 */  beqz      $v0, .L802743C0
/* 1A2C84 802743A4 2404FF7F */   addiu    $a0, $zero, -0x81
/* 1A2C88 802743A8 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2C8C 802743AC 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2C90 802743B0 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2C94 802743B4 34420080 */  ori       $v0, $v0, 0x80
/* 1A2C98 802743B8 0809D0F5 */  j         .L802743D4
/* 1A2C9C 802743BC AC620000 */   sw       $v0, 0x0($v1)
.L802743C0:
/* 1A2CA0 802743C0 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2CA4 802743C4 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2CA8 802743C8 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2CAC 802743CC 00641824 */  and       $v1, $v1, $a0
/* 1A2CB0 802743D0 AC430000 */  sw        $v1, 0x0($v0)
.L802743D4:
/* 1A2CB4 802743D4 32020800 */  andi      $v0, $s0, 0x800
/* 1A2CB8 802743D8 10400007 */  beqz      $v0, .L802743F8
/* 1A2CBC 802743DC 2404F7FF */   addiu    $a0, $zero, -0x801
/* 1A2CC0 802743E0 3C03800E */  lui       $v1, %hi(gBattleStatus)
/* 1A2CC4 802743E4 2463C070 */  addiu     $v1, $v1, %lo(gBattleStatus)
/* 1A2CC8 802743E8 8C620000 */  lw        $v0, 0x0($v1)
/* 1A2CCC 802743EC 34420800 */  ori       $v0, $v0, 0x800
/* 1A2CD0 802743F0 0809D103 */  j         .L8027440C
/* 1A2CD4 802743F4 AC620000 */   sw       $v0, 0x0($v1)
.L802743F8:
/* 1A2CD8 802743F8 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 1A2CDC 802743FC 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* 1A2CE0 80274400 8C430000 */  lw        $v1, 0x0($v0)
/* 1A2CE4 80274404 00641824 */  and       $v1, $v1, $a0
/* 1A2CE8 80274408 AC430000 */  sw        $v1, 0x0($v0)
.L8027440C:
/* 1A2CEC 8027440C 0C09A75B */  jal       get_actor
/* 1A2CF0 80274410 8E440148 */   lw       $a0, 0x148($s2)
/* 1A2CF4 80274414 94430428 */  lhu       $v1, 0x428($v0)
/* 1A2CF8 80274418 A62301A0 */  sh        $v1, 0x1A0($s1)
/* 1A2CFC 8027441C 92230193 */  lbu       $v1, 0x193($s1)
/* 1A2D00 80274420 90420426 */  lbu       $v0, 0x426($v0)
/* 1A2D04 80274424 A2230194 */  sb        $v1, 0x194($s1)
/* 1A2D08 80274428 306300FF */  andi      $v1, $v1, 0xFF
/* 1A2D0C 8027442C A22201A2 */  sb        $v0, 0x1A2($s1)
/* 1A2D10 80274430 240200FF */  addiu     $v0, $zero, 0xFF
/* 1A2D14 80274434 50620001 */  beql      $v1, $v0, .L8027443C
/* 1A2D18 80274438 A2200194 */   sb       $zero, 0x194($s1)
.L8027443C:
/* 1A2D1C 8027443C 8E220190 */  lw        $v0, 0x190($s1)
/* 1A2D20 80274440 30420F00 */  andi      $v0, $v0, 0xF00
/* 1A2D24 80274444 00021203 */  sra       $v0, $v0, 8
/* 1A2D28 80274448 0C09C651 */  jal       calc_player_damage_enemy
/* 1A2D2C 8027444C A2220195 */   sb       $v0, 0x195($s1)
/* 1A2D30 80274450 0440000B */  bltz      $v0, .L80274480
/* 1A2D34 80274454 0240202D */   daddu    $a0, $s2, $zero
/* 1A2D38 80274458 0260282D */  daddu     $a1, $s3, $zero
/* 1A2D3C 8027445C 0C0B2026 */  jal       evt_set_variable
/* 1A2D40 80274460 0040302D */   daddu    $a2, $v0, $zero
/* 1A2D44 80274464 0C0B1069 */  jal       does_script_exist_by_ref
/* 1A2D48 80274468 0240202D */   daddu    $a0, $s2, $zero
/* 1A2D4C 8027446C 0040182D */  daddu     $v1, $v0, $zero
/* 1A2D50 80274470 10600004 */  beqz      $v1, .L80274484
/* 1A2D54 80274474 240200FF */   addiu    $v0, $zero, 0xFF
/* 1A2D58 80274478 0809D121 */  j         .L80274484
/* 1A2D5C 8027447C 24020002 */   addiu    $v0, $zero, 0x2
.L80274480:
/* 1A2D60 80274480 240200FF */  addiu     $v0, $zero, 0xFF
.L80274484:
/* 1A2D64 80274484 8FBF0020 */  lw        $ra, 0x20($sp)
/* 1A2D68 80274488 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1A2D6C 8027448C 8FB20018 */  lw        $s2, 0x18($sp)
/* 1A2D70 80274490 8FB10014 */  lw        $s1, 0x14($sp)
/* 1A2D74 80274494 8FB00010 */  lw        $s0, 0x10($sp)
/* 1A2D78 80274498 03E00008 */  jr        $ra
/* 1A2D7C 8027449C 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

ApiStatus PlayerDamageEnemy(Evt* script, s32 isInitialCall) {
    BattleStatus* battleStatus = &gBattleStatus;
    Bytecode* args = script->ptrReadPos;
    s32 hitResultOutVar = *args++;
    s32 flags;
    Actor* target;
    HitResult hitResult;

    battleStatus->currentAttackElement = *args++;
    battleStatus->currentAttackEventSuppression = *args++;
    battleStatus->currentAttackStatus = *args++;
    battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
    battleStatus->powerBounceCounter = 0;
    flags = *args++;

    if ((flags & (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) == (BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)) {
        gBattleStatus.flags1 |= BS_FLAGS1_10;
        gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
    } else if (flags & BS_FLAGS1_10) {
        gBattleStatus.flags1 |= BS_FLAGS1_10;
        gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
    } else if (flags & BS_FLAGS1_SP_EVT_ACTIVE) {
        gBattleStatus.flags1 &= ~BS_FLAGS1_10;
        gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_10;
        gBattleStatus.flags1 &= ~BS_FLAGS1_SP_EVT_ACTIVE;
    }

    if (flags & BS_FLAGS1_40) {
        gBattleStatus.flags1 |= BS_FLAGS1_40;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_40;
    }
    if (flags & BS_FLAGS1_200) {
        gBattleStatus.flags1 |= BS_FLAGS1_200;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_200;
    }
    if (flags & BS_FLAGS1_80) {
        gBattleStatus.flags1 |= BS_FLAGS1_80;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_80;
    }
    if (flags & BS_FLAGS1_FORCE_HIT_IMMUNE) {
        gBattleStatus.flags1 |= BS_FLAGS1_FORCE_HIT_IMMUNE;
    } else {
        gBattleStatus.flags1 &= ~BS_FLAGS1_FORCE_HIT_IMMUNE;
    }

    target = get_actor(script->owner1.actorID);
    battleStatus->currentTargetID = target->targetActorID;
    battleStatus->currentTargetPart = target->targetPartIndex;
    battleStatus->statusChance = battleStatus->currentAttackStatus;
    if (battleStatus->statusChance == STATUS_KEY_NEVER) {
        battleStatus->statusChance = 0;
    }
    battleStatus->statusDuration = (battleStatus->currentAttackStatus & 0xF00) >> 8;

    hitResult = calc_player_damage_enemy();
    if (hitResult < 0) {
        return ApiStatus_FINISH;
    }
    evt_set_variable(script, hitResultOutVar, hitResult);

    if (!does_script_exist_by_ref(script)) {
        return ApiStatus_FINISH;
    }

    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel PlayerFallToGoal
/* 1A2174 80273894 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 1A2178 80273898 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A217C 8027389C 3C10800E */  lui       $s0, %hi(gBattleStatus + 0xD8)
/* 1A2180 802738A0 8E10C148 */  lw        $s0, %lo(gBattleStatus + 0xD8)($s0)
/* 1A2184 802738A4 AFB20020 */  sw        $s2, 0x20($sp)
/* 1A2188 802738A8 0080902D */  daddu     $s2, $a0, $zero
/* 1A218C 802738AC AFBF0024 */  sw        $ra, 0x24($sp)
/* 1A2190 802738B0 AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A2194 802738B4 F7BE0050 */  sdc1      $f30, 0x50($sp)
/* 1A2198 802738B8 F7BC0048 */  sdc1      $f28, 0x48($sp)
/* 1A219C 802738BC F7BA0040 */  sdc1      $f26, 0x40($sp)
/* 1A21A0 802738C0 F7B80038 */  sdc1      $f24, 0x38($sp)
/* 1A21A4 802738C4 F7B60030 */  sdc1      $f22, 0x30($sp)
/* 1A21A8 802738C8 F7B40028 */  sdc1      $f20, 0x28($sp)
/* 1A21AC 802738CC 8E43000C */  lw        $v1, 0xC($s2)
/* 1A21B0 802738D0 10A00002 */  beqz      $a1, .L802738DC
/* 1A21B4 802738D4 2611000C */   addiu    $s1, $s0, 0xC
/* 1A21B8 802738D8 AE400070 */  sw        $zero, 0x70($s2)
.L802738DC:
/* 1A21BC 802738DC 8E420070 */  lw        $v0, 0x70($s2)
/* 1A21C0 802738E0 14400046 */  bnez      $v0, .L802739FC
/* 1A21C4 802738E4 00000000 */   nop
/* 1A21C8 802738E8 8C650000 */  lw        $a1, 0x0($v1)
/* 1A21CC 802738EC 0C0B1EAF */  jal       evt_get_variable
/* 1A21D0 802738F0 0240202D */   daddu    $a0, $s2, $zero
/* 1A21D4 802738F4 C6000148 */  lwc1      $f0, 0x148($s0)
/* 1A21D8 802738F8 C61A0018 */  lwc1      $f26, 0x18($s0)
/* 1A21DC 802738FC C61C0020 */  lwc1      $f28, 0x20($s0)
/* 1A21E0 80273900 C614014C */  lwc1      $f20, 0x14C($s0)
/* 1A21E4 80273904 C618001C */  lwc1      $f24, 0x1C($s0)
/* 1A21E8 80273908 A6020070 */  sh        $v0, 0x70($s0)
/* 1A21EC 8027390C E6000010 */  swc1      $f0, 0x10($s0)
/* 1A21F0 80273910 46000786 */  mov.s     $f30, $f0
/* 1A21F4 80273914 4406D000 */  mfc1      $a2, $f26
/* 1A21F8 80273918 4407E000 */  mfc1      $a3, $f28
/* 1A21FC 8027391C C6000144 */  lwc1      $f0, 0x144($s0)
/* 1A2200 80273920 4600A386 */  mov.s     $f14, $f20
/* 1A2204 80273924 E6140014 */  swc1      $f20, 0x14($s0)
/* 1A2208 80273928 E600000C */  swc1      $f0, 0xC($s0)
/* 1A220C 8027392C 46000586 */  mov.s     $f22, $f0
/* 1A2210 80273930 0C00A720 */  jal       atan2
/* 1A2214 80273934 4600B306 */   mov.s    $f12, $f22
/* 1A2218 80273938 4600B306 */  mov.s     $f12, $f22
/* 1A221C 8027393C 4600A386 */  mov.s     $f14, $f20
/* 1A2220 80273940 4406D000 */  mfc1      $a2, $f26
/* 1A2224 80273944 4407E000 */  mfc1      $a3, $f28
/* 1A2228 80273948 461EC781 */  sub.s     $f30, $f24, $f30
/* 1A222C 8027394C 0C00A7B5 */  jal       dist2D
/* 1A2230 80273950 E6000054 */   swc1     $f0, 0x54($s0)
/* 1A2234 80273954 86020070 */  lh        $v0, 0x70($s0)
/* 1A2238 80273958 46000086 */  mov.s     $f2, $f0
/* 1A223C 8027395C 14400007 */  bnez      $v0, .L8027397C
/* 1A2240 80273960 E6020058 */   swc1     $f2, 0x58($s0)
/* 1A2244 80273964 C600004C */  lwc1      $f0, 0x4C($s0)
/* 1A2248 80273968 46001003 */  div.s     $f0, $f2, $f0
/* 1A224C 8027396C 4600018D */  trunc.w.s $f6, $f0
/* 1A2250 80273970 44023000 */  mfc1      $v0, $f6
/* 1A2254 80273974 0809CE64 */  j         .L80273990
/* 1A2258 80273978 A6020070 */   sh       $v0, 0x70($s0)
.L8027397C:
/* 1A225C 8027397C 44820000 */  mtc1      $v0, $f0
/* 1A2260 80273980 00000000 */  nop
/* 1A2264 80273984 46800020 */  cvt.s.w   $f0, $f0
/* 1A2268 80273988 46001003 */  div.s     $f0, $f2, $f0
/* 1A226C 8027398C E600004C */  swc1      $f0, 0x4C($s0)
.L80273990:
/* 1A2270 80273990 86230064 */  lh        $v1, 0x64($s1)
/* 1A2274 80273994 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 1A2278 80273998 44810800 */  mtc1      $at, $f1
/* 1A227C 8027399C 44800000 */  mtc1      $zero, $f0
/* 1A2280 802739A0 00031023 */  negu      $v0, $v1
/* 1A2284 802739A4 44821000 */  mtc1      $v0, $f2
/* 1A2288 802739A8 00000000 */  nop
/* 1A228C 802739AC 468010A1 */  cvt.d.w   $f2, $f2
/* 1A2290 802739B0 46201082 */  mul.d     $f2, $f2, $f0
/* 1A2294 802739B4 00000000 */  nop
/* 1A2298 802739B8 0000202D */  daddu     $a0, $zero, $zero
/* 1A229C 802739BC AE200044 */  sw        $zero, 0x44($s1)
/* 1A22A0 802739C0 C6240044 */  lwc1      $f4, 0x44($s1)
/* 1A22A4 802739C4 44830000 */  mtc1      $v1, $f0
/* 1A22A8 802739C8 00000000 */  nop
/* 1A22AC 802739CC 46800020 */  cvt.s.w   $f0, $f0
/* 1A22B0 802739D0 4600F003 */  div.s     $f0, $f30, $f0
/* 1A22B4 802739D4 46040001 */  sub.s     $f0, $f0, $f4
/* 1A22B8 802739D8 0080282D */  daddu     $a1, $a0, $zero
/* 1A22BC 802739DC 8E260058 */  lw        $a2, 0x58($s1)
/* 1A22C0 802739E0 46000021 */  cvt.d.s   $f0, $f0
/* 1A22C4 802739E4 46220003 */  div.d     $f0, $f0, $f2
/* 1A22C8 802739E8 46200020 */  cvt.s.d   $f0, $f0
/* 1A22CC 802739EC 0C098F3F */  jal       set_animation
/* 1A22D0 802739F0 E620003C */   swc1     $f0, 0x3C($s1)
/* 1A22D4 802739F4 24020001 */  addiu     $v0, $zero, 0x1
/* 1A22D8 802739F8 AE420070 */  sw        $v0, 0x70($s2)
.L802739FC:
/* 1A22DC 802739FC C6220044 */  lwc1      $f2, 0x44($s1)
/* 1A22E0 80273A00 44800000 */  mtc1      $zero, $f0
/* 1A22E4 80273A04 00000000 */  nop
/* 1A22E8 80273A08 4600103C */  c.lt.s    $f2, $f0
/* 1A22EC 80273A0C 00000000 */  nop
/* 1A22F0 80273A10 45000004 */  bc1f      .L80273A24
/* 1A22F4 80273A14 0000202D */   daddu    $a0, $zero, $zero
/* 1A22F8 80273A18 8E26005C */  lw        $a2, 0x5C($s1)
/* 1A22FC 80273A1C 0C098F3F */  jal       set_animation
/* 1A2300 80273A20 0080282D */   daddu    $a1, $a0, $zero
.L80273A24:
/* 1A2304 80273A24 C6240004 */  lwc1      $f4, 0x4($s1)
/* 1A2308 80273A28 C6200044 */  lwc1      $f0, 0x44($s1)
/* 1A230C 80273A2C 8E250040 */  lw        $a1, 0x40($s1)
/* 1A2310 80273A30 46002100 */  add.s     $f4, $f4, $f0
/* 1A2314 80273A34 C622003C */  lwc1      $f2, 0x3C($s1)
/* 1A2318 80273A38 8E260048 */  lw        $a2, 0x48($s1)
/* 1A231C 80273A3C 46020001 */  sub.s     $f0, $f0, $f2
/* 1A2320 80273A40 0220202D */  daddu     $a0, $s1, $zero
/* 1A2324 80273A44 E6240004 */  swc1      $f4, 0x4($s1)
/* 1A2328 80273A48 0C09904A */  jal       add_xz_vec3f
/* 1A232C 80273A4C E6200044 */   swc1     $f0, 0x44($s1)
/* 1A2330 80273A50 C6200000 */  lwc1      $f0, 0x0($s1)
/* 1A2334 80273A54 E6000144 */  swc1      $f0, 0x144($s0)
/* 1A2338 80273A58 C6200004 */  lwc1      $f0, 0x4($s1)
/* 1A233C 80273A5C E6000148 */  swc1      $f0, 0x148($s0)
/* 1A2340 80273A60 C6200008 */  lwc1      $f0, 0x8($s1)
/* 1A2344 80273A64 E600014C */  swc1      $f0, 0x14C($s0)
/* 1A2348 80273A68 96220064 */  lhu       $v0, 0x64($s1)
/* 1A234C 80273A6C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 1A2350 80273A70 A6220064 */  sh        $v0, 0x64($s1)
/* 1A2354 80273A74 00021400 */  sll       $v0, $v0, 16
/* 1A2358 80273A78 04410016 */  bgez      $v0, .L80273AD4
/* 1A235C 80273A7C 0000102D */   daddu    $v0, $zero, $zero
/* 1A2360 80273A80 C620000C */  lwc1      $f0, 0xC($s1)
/* 1A2364 80273A84 C602018C */  lwc1      $f2, 0x18C($s0)
/* 1A2368 80273A88 E6000144 */  swc1      $f0, 0x144($s0)
/* 1A236C 80273A8C C6200010 */  lwc1      $f0, 0x10($s1)
/* 1A2370 80273A90 E6000148 */  swc1      $f0, 0x148($s0)
/* 1A2374 80273A94 C6200014 */  lwc1      $f0, 0x14($s1)
/* 1A2378 80273A98 E600014C */  swc1      $f0, 0x14C($s0)
/* 1A237C 80273A9C E7A20010 */  swc1      $f2, 0x10($sp)
/* 1A2380 80273AA0 8E050144 */  lw        $a1, 0x144($s0)
/* 1A2384 80273AA4 8E060148 */  lw        $a2, 0x148($s0)
/* 1A2388 80273AA8 8E07014C */  lw        $a3, 0x14C($s0)
/* 1A238C 80273AAC 0C0990BC */  jal       play_movement_dust_effects
/* 1A2390 80273AB0 24040002 */   addiu    $a0, $zero, 0x2
/* 1A2394 80273AB4 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1A2398 80273AB8 24040148 */  addiu     $a0, $zero, 0x148
/* 1A239C 80273ABC E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A23A0 80273AC0 8E060144 */  lw        $a2, 0x144($s0)
/* 1A23A4 80273AC4 8E070148 */  lw        $a3, 0x148($s0)
/* 1A23A8 80273AC8 0C052757 */  jal       sfx_play_sound_at_position
/* 1A23AC 80273ACC 0000282D */   daddu    $a1, $zero, $zero
/* 1A23B0 80273AD0 24020001 */  addiu     $v0, $zero, 0x1
.L80273AD4:
/* 1A23B4 80273AD4 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1A23B8 80273AD8 8FB20020 */  lw        $s2, 0x20($sp)
/* 1A23BC 80273ADC 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1A23C0 80273AE0 8FB00018 */  lw        $s0, 0x18($sp)
/* 1A23C4 80273AE4 D7BE0050 */  ldc1      $f30, 0x50($sp)
/* 1A23C8 80273AE8 D7BC0048 */  ldc1      $f28, 0x48($sp)
/* 1A23CC 80273AEC D7BA0040 */  ldc1      $f26, 0x40($sp)
/* 1A23D0 80273AF0 D7B80038 */  ldc1      $f24, 0x38($sp)
/* 1A23D4 80273AF4 D7B60030 */  ldc1      $f22, 0x30($sp)
/* 1A23D8 80273AF8 D7B40028 */  ldc1      $f20, 0x28($sp)
/* 1A23DC 80273AFC 03E00008 */  jr        $ra
/* 1A23E0 80273B00 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

ApiStatus PlayerFallToGoal(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    Actor* player = gBattleStatus.playerActor;
    ActorState* state = &player->state;
    f32 x, y, z;
    f32 goalX, goalY, goalZ;

    if (isInitialCall) {
        script->functionTemp[0] = FALSE;
    }

    if (!script->functionTemp[0]) {
        s32 moveTime = evt_get_variable(script, *args++);

        player->state.currentPos.x = player->currentPos.x;
        player->state.currentPos.y = player->currentPos.y;
        player->state.currentPos.z = player->currentPos.z;

        x = player->state.currentPos.x;
        y = player->state.currentPos.y;
        z = player->state.currentPos.z;
        goalX = player->state.goalPos.x;
        goalY = player->state.goalPos.y;
        goalZ = player->state.goalPos.z;

        state->moveTime = moveTime;

        player->state.angle = atan2(x, z, goalX, goalZ);
        player->state.distance = dist2D(x, z, goalX, goalZ);

        y = goalY - y;

        if (state->moveTime == 0) {
            state->moveTime = state->distance / state->speed;
        } else {
            state->speed = state->distance / state->moveTime;
        }

        state->velocity = 0.0f;
        state->acceleration = ((y / state->moveTime) - state->velocity) / (-state->moveTime * 0.5);
        set_animation(ACTOR_PLAYER, 0, state->animJumpRise);
        script->functionTemp[0] = TRUE;
    }

    if (state->velocity < 0.0f) {
        set_animation(ACTOR_PLAYER, 0, state->animJumpFall);
    }

    state->currentPos.y += state->velocity;
    state->velocity -= state->acceleration;
    add_xz_vec3f(&state->currentPos, state->speed, state->angle);

    player->currentPos.x = state->currentPos.x;
    player->currentPos.y = state->currentPos.y;
    player->currentPos.z = state->currentPos.z;
    state->moveTime--;

    if (state->moveTime < 0) {
        player->currentPos.x = state->goalPos.x;
        player->currentPos.y = state->goalPos.y;
        player->currentPos.z = state->goalPos.z;
        play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
        sfx_play_sound_at_position(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
        return ApiStatus_DONE1;
    }
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel _npc_jump_to
/* F2DE4 802CE434 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* F2DE8 802CE438 AFB20018 */  sw        $s2, 0x18($sp)
/* F2DEC 802CE43C 0080902D */  daddu     $s2, $a0, $zero
/* F2DF0 802CE440 AFB40020 */  sw        $s4, 0x20($sp)
/* F2DF4 802CE444 00C0A02D */  daddu     $s4, $a2, $zero
/* F2DF8 802CE448 AFB3001C */  sw        $s3, 0x1C($sp)
/* F2DFC 802CE44C AFBF0024 */  sw        $ra, 0x24($sp)
/* F2E00 802CE450 AFB10014 */  sw        $s1, 0x14($sp)
/* F2E04 802CE454 AFB00010 */  sw        $s0, 0x10($sp)
/* F2E08 802CE458 F7B80038 */  sdc1      $f24, 0x38($sp)
/* F2E0C 802CE45C F7B60030 */  sdc1      $f22, 0x30($sp)
/* F2E10 802CE460 F7B40028 */  sdc1      $f20, 0x28($sp)
/* F2E14 802CE464 8E51000C */  lw        $s1, 0xC($s2)
/* F2E18 802CE468 10A00002 */  beqz      $a1, .L802CE474
/* F2E1C 802CE46C 26530078 */   addiu    $s3, $s2, 0x78
/* F2E20 802CE470 AE400070 */  sw        $zero, 0x70($s2)
.L802CE474:
/* F2E24 802CE474 8E420070 */  lw        $v0, 0x70($s2)
/* F2E28 802CE478 14400065 */  bnez      $v0, .L802CE610
/* F2E2C 802CE47C 00000000 */   nop
/* F2E30 802CE480 8E250000 */  lw        $a1, 0x0($s1)
/* F2E34 802CE484 26310004 */  addiu     $s1, $s1, 0x4
/* F2E38 802CE488 0C0B1EAF */  jal       evt_get_variable
/* F2E3C 802CE48C 0240202D */   daddu    $a0, $s2, $zero
/* F2E40 802CE490 8E250000 */  lw        $a1, 0x0($s1)
/* F2E44 802CE494 26310004 */  addiu     $s1, $s1, 0x4
/* F2E48 802CE498 0240202D */  daddu     $a0, $s2, $zero
/* F2E4C 802CE49C 0C0B1EAF */  jal       evt_get_variable
/* F2E50 802CE4A0 0040802D */   daddu    $s0, $v0, $zero
/* F2E54 802CE4A4 8E250000 */  lw        $a1, 0x0($s1)
/* F2E58 802CE4A8 26310004 */  addiu     $s1, $s1, 0x4
/* F2E5C 802CE4AC 4482C000 */  mtc1      $v0, $f24
/* F2E60 802CE4B0 00000000 */  nop
/* F2E64 802CE4B4 4680C620 */  cvt.s.w   $f24, $f24
/* F2E68 802CE4B8 0C0B1EAF */  jal       evt_get_variable
/* F2E6C 802CE4BC 0240202D */   daddu    $a0, $s2, $zero
/* F2E70 802CE4C0 4482B000 */  mtc1      $v0, $f22
/* F2E74 802CE4C4 00000000 */  nop
/* F2E78 802CE4C8 4680B5A0 */  cvt.s.w   $f22, $f22
/* F2E7C 802CE4CC 8E250000 */  lw        $a1, 0x0($s1)
/* F2E80 802CE4D0 26310004 */  addiu     $s1, $s1, 0x4
/* F2E84 802CE4D4 0C0B1EAF */  jal       evt_get_variable
/* F2E88 802CE4D8 0240202D */   daddu    $a0, $s2, $zero
/* F2E8C 802CE4DC 8E250000 */  lw        $a1, 0x0($s1)
/* F2E90 802CE4E0 4482A000 */  mtc1      $v0, $f20
/* F2E94 802CE4E4 00000000 */  nop
/* F2E98 802CE4E8 4680A520 */  cvt.s.w   $f20, $f20
/* F2E9C 802CE4EC 0C0B1EAF */  jal       evt_get_variable
/* F2EA0 802CE4F0 0240202D */   daddu    $a0, $s2, $zero
/* F2EA4 802CE4F4 0240202D */  daddu     $a0, $s2, $zero
/* F2EA8 802CE4F8 0200282D */  daddu     $a1, $s0, $zero
/* F2EAC 802CE4FC 0C0B36B0 */  jal       resolve_npc
/* F2EB0 802CE500 0040882D */   daddu    $s1, $v0, $zero
/* F2EB4 802CE504 0040802D */  daddu     $s0, $v0, $zero
/* F2EB8 802CE508 56000003 */  bnel      $s0, $zero, .L802CE518
/* F2EBC 802CE50C AE500074 */   sw       $s0, 0x74($s2)
/* F2EC0 802CE510 080B39A6 */  j         .L802CE698
/* F2EC4 802CE514 24020002 */   addiu    $v0, $zero, 0x2
.L802CE518:
/* F2EC8 802CE518 C60C0038 */  lwc1      $f12, 0x38($s0)
/* F2ECC 802CE51C C60E0040 */  lwc1      $f14, 0x40($s0)
/* F2ED0 802CE520 E6180060 */  swc1      $f24, 0x60($s0)
/* F2ED4 802CE524 4406C000 */  mfc1      $a2, $f24
/* F2ED8 802CE528 E6140068 */  swc1      $f20, 0x68($s0)
/* F2EDC 802CE52C 4407A000 */  mfc1      $a3, $f20
/* F2EE0 802CE530 E6160064 */  swc1      $f22, 0x64($s0)
/* F2EE4 802CE534 0C00A7B5 */  jal       dist2D
/* F2EE8 802CE538 A611008E */   sh       $s1, 0x8E($s0)
/* F2EEC 802CE53C 46000506 */  mov.s     $f20, $f0
/* F2EF0 802CE540 3C014000 */  lui       $at, (0x40000000 >> 16)
/* F2EF4 802CE544 44811800 */  mtc1      $at, $f3
/* F2EF8 802CE548 44801000 */  mtc1      $zero, $f2
/* F2EFC 802CE54C 4600A021 */  cvt.d.s   $f0, $f20
/* F2F00 802CE550 4620103C */  c.lt.d    $f2, $f0
/* F2F04 802CE554 00000000 */  nop
/* F2F08 802CE558 45000009 */  bc1f      .L802CE580
/* F2F0C 802CE55C AE400078 */   sw       $zero, 0x78($s2)
/* F2F10 802CE560 C60C0038 */  lwc1      $f12, 0x38($s0)
/* F2F14 802CE564 C60E0040 */  lwc1      $f14, 0x40($s0)
/* F2F18 802CE568 8E060060 */  lw        $a2, 0x60($s0)
/* F2F1C 802CE56C 0C00A720 */  jal       atan2
/* F2F20 802CE570 8E070068 */   lw       $a3, 0x68($s0)
/* F2F24 802CE574 16800002 */  bnez      $s4, .L802CE580
/* F2F28 802CE578 E6400078 */   swc1     $f0, 0x78($s2)
/* F2F2C 802CE57C E600000C */  swc1      $f0, 0xC($s0)
.L802CE580:
/* F2F30 802CE580 C6020064 */  lwc1      $f2, 0x64($s0)
/* F2F34 802CE584 C600003C */  lwc1      $f0, 0x3C($s0)
/* F2F38 802CE588 8602008E */  lh        $v0, 0x8E($s0)
/* F2F3C 802CE58C 14400007 */  bnez      $v0, .L802CE5AC
/* F2F40 802CE590 46001581 */   sub.s    $f22, $f2, $f0
/* F2F44 802CE594 C6000018 */  lwc1      $f0, 0x18($s0)
/* F2F48 802CE598 4600A003 */  div.s     $f0, $f20, $f0
/* F2F4C 802CE59C 4600018D */  trunc.w.s $f6, $f0
/* F2F50 802CE5A0 44023000 */  mfc1      $v0, $f6
/* F2F54 802CE5A4 080B3970 */  j         .L802CE5C0
/* F2F58 802CE5A8 A602008E */   sh       $v0, 0x8E($s0)
.L802CE5AC:
/* F2F5C 802CE5AC 44820000 */  mtc1      $v0, $f0
/* F2F60 802CE5B0 00000000 */  nop
/* F2F64 802CE5B4 46800020 */  cvt.s.w   $f0, $f0
/* F2F68 802CE5B8 4600A003 */  div.s     $f0, $f20, $f0
/* F2F6C 802CE5BC E6000018 */  swc1      $f0, 0x18($s0)
.L802CE5C0:
/* F2F70 802CE5C0 8602008E */  lh        $v0, 0x8E($s0)
/* F2F74 802CE5C4 C6000014 */  lwc1      $f0, 0x14($s0)
/* F2F78 802CE5C8 44822000 */  mtc1      $v0, $f4
/* F2F7C 802CE5CC 00000000 */  nop
/* F2F80 802CE5D0 46802120 */  cvt.s.w   $f4, $f4
/* F2F84 802CE5D4 46040002 */  mul.s     $f0, $f0, $f4
/* F2F88 802CE5D8 00000000 */  nop
/* F2F8C 802CE5DC 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* F2F90 802CE5E0 44811000 */  mtc1      $at, $f2
/* F2F94 802CE5E4 00000000 */  nop
/* F2F98 802CE5E8 46020002 */  mul.s     $f0, $f0, $f2
/* F2F9C 802CE5EC 00000000 */  nop
/* F2FA0 802CE5F0 8E020000 */  lw        $v0, 0x0($s0)
/* F2FA4 802CE5F4 4604B103 */  div.s     $f4, $f22, $f4
/* F2FA8 802CE5F8 34420800 */  ori       $v0, $v0, 0x800
/* F2FAC 802CE5FC 46040000 */  add.s     $f0, $f0, $f4
/* F2FB0 802CE600 AE020000 */  sw        $v0, 0x0($s0)
/* F2FB4 802CE604 24020001 */  addiu     $v0, $zero, 0x1
/* F2FB8 802CE608 E600001C */  swc1      $f0, 0x1C($s0)
/* F2FBC 802CE60C AE420070 */  sw        $v0, 0x70($s2)
.L802CE610:
/* F2FC0 802CE610 8E500074 */  lw        $s0, 0x74($s2)
/* F2FC4 802CE614 8E660000 */  lw        $a2, 0x0($s3)
/* F2FC8 802CE618 8E050018 */  lw        $a1, 0x18($s0)
/* F2FCC 802CE61C 0C00EA95 */  jal       npc_move_heading
/* F2FD0 802CE620 0200202D */   daddu    $a0, $s0, $zero
/* F2FD4 802CE624 C604003C */  lwc1      $f4, 0x3C($s0)
/* F2FD8 802CE628 C600001C */  lwc1      $f0, 0x1C($s0)
/* F2FDC 802CE62C 9602008E */  lhu       $v0, 0x8E($s0)
/* F2FE0 802CE630 46002100 */  add.s     $f4, $f4, $f0
/* F2FE4 802CE634 C6020014 */  lwc1      $f2, 0x14($s0)
/* F2FE8 802CE638 2442FFFF */  addiu     $v0, $v0, -0x1
/* F2FEC 802CE63C 46020001 */  sub.s     $f0, $f0, $f2
/* F2FF0 802CE640 A602008E */  sh        $v0, 0x8E($s0)
/* F2FF4 802CE644 00021400 */  sll       $v0, $v0, 16
/* F2FF8 802CE648 E604003C */  swc1      $f4, 0x3C($s0)
/* F2FFC 802CE64C 04400003 */  bltz      $v0, .L802CE65C
/* F3000 802CE650 E600001C */   swc1     $f0, 0x1C($s0)
/* F3004 802CE654 080B39A6 */  j         .L802CE698
/* F3008 802CE658 0000102D */   daddu    $v0, $zero, $zero
.L802CE65C:
/* F300C 802CE65C 0200202D */  daddu     $a0, $s0, $zero
/* F3010 802CE660 24050002 */  addiu     $a1, $zero, 0x2
/* F3014 802CE664 C4800060 */  lwc1      $f0, 0x60($a0)
/* F3018 802CE668 C4820064 */  lwc1      $f2, 0x64($a0)
/* F301C 802CE66C C4840068 */  lwc1      $f4, 0x68($a0)
/* F3020 802CE670 8C820000 */  lw        $v0, 0x0($a0)
/* F3024 802CE674 2403F7FF */  addiu     $v1, $zero, -0x801
/* F3028 802CE678 AC80001C */  sw        $zero, 0x1C($a0)
/* F302C 802CE67C 00431024 */  and       $v0, $v0, $v1
/* F3030 802CE680 E4800038 */  swc1      $f0, 0x38($a0)
/* F3034 802CE684 E482003C */  swc1      $f2, 0x3C($a0)
/* F3038 802CE688 E4840040 */  swc1      $f4, 0x40($a0)
/* F303C 802CE68C 0C00F598 */  jal       spawn_surface_effects
/* F3040 802CE690 AC820000 */   sw       $v0, 0x0($a0)
/* F3044 802CE694 24020001 */  addiu     $v0, $zero, 0x1
.L802CE698:
/* F3048 802CE698 8FBF0024 */  lw        $ra, 0x24($sp)
/* F304C 802CE69C 8FB40020 */  lw        $s4, 0x20($sp)
/* F3050 802CE6A0 8FB3001C */  lw        $s3, 0x1C($sp)
/* F3054 802CE6A4 8FB20018 */  lw        $s2, 0x18($sp)
/* F3058 802CE6A8 8FB10014 */  lw        $s1, 0x14($sp)
/* F305C 802CE6AC 8FB00010 */  lw        $s0, 0x10($sp)
/* F3060 802CE6B0 D7B80038 */  ldc1      $f24, 0x38($sp)
/* F3064 802CE6B4 D7B60030 */  ldc1      $f22, 0x30($sp)
/* F3068 802CE6B8 D7B40028 */  ldc1      $f20, 0x28($sp)
/* F306C 802CE6BC 03E00008 */  jr        $ra
/* F3070 802CE6C0 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

ApiStatus _npc_jump_to(Evt* script, s32 isInitialCall, s32 snapYaw) {
    Bytecode* args = script->ptrReadPos;
    f32* yaw = &script->functionTempF[2];
    Npc* npc;

    if (isInitialCall) {
        script->functionTemp[0] = 0;
    }

    if (script->functionTemp[0] == 0) {
        s32 npcID = evt_get_variable(script, *args++);
        f32 goalX = evt_get_variable(script, *args++);
        f32 goalY = evt_get_variable(script, *args++);
        f32 goalZ = evt_get_variable(script, *args++);
        s32 duration = evt_get_variable(script, *args++);
        f32 dist;

        npc = resolve_npc(script, npcID);

        if (npc == NULL) {
            return ApiStatus_DONE2;
        }

        script->functionTempPtr[1] = npc;
        npc->moveToPos.x = goalX;
        npc->moveToPos.y = goalY;
        npc->moveToPos.z = goalZ;

        npc->duration = duration;
        dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
        *yaw = 0.0f;
        if (dist > 2.0) {
            *yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z);
            if (snapYaw == 0) {
                npc->yaw = *yaw;
            }
        }

        goalY = npc->moveToPos.y - npc->pos.y;

        if (npc->duration == 0) {
            npc->duration = dist / npc->moveSpeed;
        } else {
            npc->moveSpeed = dist / npc->duration;
        }

        npc->flags |= NPC_FLAG_JUMPING;
        npc->jumpVelocity = (npc->jumpScale * npc->duration * 0.5f) + (goalY / npc->duration);
        script->functionTemp[0] =1;
    }

    npc = script->functionTempPtr[1];
    npc_move_heading(npc, npc->moveSpeed, *yaw);

    npc->pos.y += npc->jumpVelocity;
    npc->jumpVelocity -= npc->jumpScale;

    npc->duration--;
    if (npc->duration < 0) {
        npc->jumpVelocity = 0.0f;
        npc->pos.x = npc->moveToPos.x;
        npc->pos.y = npc->moveToPos.y;
        npc->pos.z = npc->moveToPos.z;
        npc->flags &= ~NPC_FLAG_JUMPING;
        spawn_surface_effects(npc, SURFACE_INTERACT_LAND);
        return ApiStatus_DONE1;
    }
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel cloud_puff_appendGfx
/* 32E970 E00144E0 27BDFF30 */  addiu     $sp, $sp, -0xD0
/* 32E974 E00144E4 AFB600B8 */  sw        $s6, 0xB8($sp)
/* 32E978 E00144E8 0080B02D */  daddu     $s6, $a0, $zero
/* 32E97C E00144EC 3C05DB06 */  lui       $a1, (0xDB060024 >> 16)
/* 32E980 E00144F0 34A50024 */  ori       $a1, $a1, (0xDB060024 & 0xFFFF)
/* 32E984 E00144F4 AFB200A8 */  sw        $s2, 0xA8($sp)
/* 32E988 E00144F8 0000902D */  daddu     $s2, $zero, $zero
/* 32E98C E00144FC 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 32E990 E0014500 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 32E994 E0014504 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 32E998 E0014508 AFBF00C4 */  sw        $ra, 0xC4($sp)
/* 32E99C E001450C AFBE00C0 */  sw        $fp, 0xC0($sp)
/* 32E9A0 E0014510 AFB700BC */  sw        $s7, 0xBC($sp)
/* 32E9A4 E0014514 AFB500B4 */  sw        $s5, 0xB4($sp)
/* 32E9A8 E0014518 AFB400B0 */  sw        $s4, 0xB0($sp)
/* 32E9AC E001451C AFB300AC */  sw        $s3, 0xAC($sp)
/* 32E9B0 E0014520 AFB100A4 */  sw        $s1, 0xA4($sp)
/* 32E9B4 E0014524 AFB000A0 */  sw        $s0, 0xA0($sp)
/* 32E9B8 E0014528 F7B400C8 */  sdc1      $f20, 0xC8($sp)
/* 32E9BC E001452C 8CC30000 */  lw        $v1, 0x0($a2)
/* 32E9C0 E0014530 8ED1000C */  lw        $s1, 0xC($s6)
/* 32E9C4 E0014534 0060202D */  daddu     $a0, $v1, $zero
/* 32E9C8 E0014538 24630008 */  addiu     $v1, $v1, 0x8
/* 32E9CC E001453C ACC30000 */  sw        $v1, 0x0($a2)
/* 32E9D0 E0014540 AC820000 */  sw        $v0, 0x0($a0)
/* 32E9D4 E0014544 AC800004 */  sw        $zero, 0x4($a0)
/* 32E9D8 E0014548 AC650000 */  sw        $a1, 0x0($v1)
/* 32E9DC E001454C 8EC40010 */  lw        $a0, 0x10($s6)
/* 32E9E0 E0014550 24620008 */  addiu     $v0, $v1, 0x8
/* 32E9E4 E0014554 ACC20000 */  sw        $v0, 0x0($a2)
/* 32E9E8 E0014558 8C84001C */  lw        $a0, 0x1C($a0)
/* 32E9EC E001455C 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 32E9F0 E0014560 AC620008 */  sw        $v0, 0x8($v1)
/* 32E9F4 E0014564 3C020900 */  lui       $v0, %hi(D_090000E0_415140)
/* 32E9F8 E0014568 244200E0 */  addiu     $v0, $v0, %lo(D_090000E0_415140)
/* 32E9FC E001456C AC62000C */  sw        $v0, 0xC($v1)
/* 32EA00 E0014570 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 32EA04 E0014574 00822021 */  addu      $a0, $a0, $v0
/* 32EA08 E0014578 AC640004 */  sw        $a0, 0x4($v1)
/* 32EA0C E001457C 8EC20008 */  lw        $v0, 0x8($s6)
/* 32EA10 E0014580 24630010 */  addiu     $v1, $v1, 0x10
/* 32EA14 E0014584 18400066 */  blez      $v0, .LE0014720
/* 32EA18 E0014588 ACC30000 */   sw       $v1, 0x0($a2)
/* 32EA1C E001458C 4480A000 */  mtc1      $zero, $f20
/* 32EA20 E0014590 27B50060 */  addiu     $s5, $sp, 0x60
/* 32EA24 E0014594 3C1E800A */  lui       $fp, %hi(gDisplayContext)
/* 32EA28 E0014598 27DEA674 */  addiu     $fp, $fp, %lo(gDisplayContext)
/* 32EA2C E001459C 3C178007 */  lui       $s7, %hi(gMatrixListPos)
/* 32EA30 E00145A0 26F741F0 */  addiu     $s7, $s7, %lo(gMatrixListPos)
/* 32EA34 E00145A4 3C140001 */  lui       $s4, (0x11630 >> 16)
/* 32EA38 E00145A8 36941630 */  ori       $s4, $s4, (0x11630 & 0xFFFF)
/* 32EA3C E00145AC 00C0982D */  daddu     $s3, $a2, $zero
/* 32EA40 E00145B0 26300008 */  addiu     $s0, $s1, 0x8
.LE00145B4:
/* 32EA44 E00145B4 8E220000 */  lw        $v0, 0x0($s1)
/* 32EA48 E00145B8 50400054 */  beql      $v0, $zero, .LE001470C
/* 32EA4C E00145BC 26520001 */   addiu    $s2, $s2, 0x1
/* 32EA50 E00145C0 3C09800B */  lui       $t1, %hi(gCameras)
/* 32EA54 E00145C4 25291D80 */  addiu     $t1, $t1, %lo(gCameras)
/* 32EA58 E00145C8 4405A000 */  mfc1      $a1, $f20
/* 32EA5C E00145CC 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 32EA60 E00145D0 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 32EA64 E00145D4 4407A000 */  mfc1      $a3, $f20
/* 32EA68 E00145D8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 32EA6C E00145DC 44810000 */  mtc1      $at, $f0
/* 32EA70 E00145E0 00031080 */  sll       $v0, $v1, 2
/* 32EA74 E00145E4 00431021 */  addu      $v0, $v0, $v1
/* 32EA78 E00145E8 00021080 */  sll       $v0, $v0, 2
/* 32EA7C E00145EC 00431023 */  subu      $v0, $v0, $v1
/* 32EA80 E00145F0 000218C0 */  sll       $v1, $v0, 3
/* 32EA84 E00145F4 00431021 */  addu      $v0, $v0, $v1
/* 32EA88 E00145F8 000210C0 */  sll       $v0, $v0, 3
/* 32EA8C E00145FC 00491021 */  addu      $v0, $v0, $t1
/* 32EA90 E0014600 C442006C */  lwc1      $f2, 0x6C($v0)
/* 32EA94 E0014604 E7A00010 */  swc1      $f0, 0x10($sp)
/* 32EA98 E0014608 C6000004 */  lwc1      $f0, 0x4($s0)
/* 32EA9C E001460C 46001087 */  neg.s     $f2, $f2
/* 32EAA0 E0014610 E7A00014 */  swc1      $f0, 0x14($sp)
/* 32EAA4 E0014614 C6000008 */  lwc1      $f0, 0x8($s0)
/* 32EAA8 E0014618 44061000 */  mfc1      $a2, $f2
/* 32EAAC E001461C E7A00018 */  swc1      $f0, 0x18($sp)
/* 32EAB0 E0014620 C600000C */  lwc1      $f0, 0xC($s0)
/* 32EAB4 E0014624 27A40020 */  addiu     $a0, $sp, 0x20
/* 32EAB8 E0014628 0C080180 */  jal       shim_guPositionF
/* 32EABC E001462C E7A0001C */   swc1     $f0, 0x1C($sp)
/* 32EAC0 E0014630 8E050010 */  lw        $a1, 0x10($s0)
/* 32EAC4 E0014634 8E060014 */  lw        $a2, 0x14($s0)
/* 32EAC8 E0014638 8E070018 */  lw        $a3, 0x18($s0)
/* 32EACC E001463C 0C080110 */  jal       shim_guScaleF
/* 32EAD0 E0014640 02A0202D */   daddu    $a0, $s5, $zero
/* 32EAD4 E0014644 02A0202D */  daddu     $a0, $s5, $zero
/* 32EAD8 E0014648 27A50020 */  addiu     $a1, $sp, 0x20
/* 32EADC E001464C 0C080114 */  jal       shim_guMtxCatF
/* 32EAE0 E0014650 00A0302D */   daddu    $a2, $a1, $zero
/* 32EAE4 E0014654 27A40020 */  addiu     $a0, $sp, 0x20
/* 32EAE8 E0014658 96E50000 */  lhu       $a1, 0x0($s7)
/* 32EAEC E001465C 8FC20000 */  lw        $v0, 0x0($fp)
/* 32EAF0 E0014660 00052980 */  sll       $a1, $a1, 6
/* 32EAF4 E0014664 00B42821 */  addu      $a1, $a1, $s4
/* 32EAF8 E0014668 0C080118 */  jal       shim_guMtxF2L
/* 32EAFC E001466C 00452821 */   addu     $a1, $v0, $a1
/* 32EB00 E0014670 3C077060 */  lui       $a3, (0x70601800 >> 16)
/* 32EB04 E0014674 34E71800 */  ori       $a3, $a3, (0x70601800 & 0xFFFF)
/* 32EB08 E0014678 3C08D838 */  lui       $t0, (0xD8380002 >> 16)
/* 32EB0C E001467C 35080002 */  ori       $t0, $t0, (0xD8380002 & 0xFFFF)
/* 32EB10 E0014680 8E640000 */  lw        $a0, 0x0($s3)
/* 32EB14 E0014684 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 32EB18 E0014688 0080302D */  daddu     $a2, $a0, $zero
/* 32EB1C E001468C 24840008 */  addiu     $a0, $a0, 0x8
/* 32EB20 E0014690 AE640000 */  sw        $a0, 0x0($s3)
/* 32EB24 E0014694 ACC20000 */  sw        $v0, 0x0($a2)
/* 32EB28 E0014698 92050000 */  lbu       $a1, 0x0($s0)
/* 32EB2C E001469C 96E30000 */  lhu       $v1, 0x0($s7)
/* 32EB30 E00146A0 24820008 */  addiu     $v0, $a0, 0x8
/* 32EB34 E00146A4 AE620000 */  sw        $v0, 0x0($s3)
/* 32EB38 E00146A8 24620001 */  addiu     $v0, $v1, 0x1
/* 32EB3C E00146AC A6E20000 */  sh        $v0, 0x0($s7)
/* 32EB40 E00146B0 24820010 */  addiu     $v0, $a0, 0x10
/* 32EB44 E00146B4 AE620000 */  sw        $v0, 0x0($s3)
/* 32EB48 E00146B8 24820018 */  addiu     $v0, $a0, 0x18
/* 32EB4C E00146BC 00A72825 */  or        $a1, $a1, $a3
/* 32EB50 E00146C0 AE620000 */  sw        $v0, 0x0($s3)
/* 32EB54 E00146C4 3C02DA38 */  lui       $v0, (0xDA380000 >> 16)
/* 32EB58 E00146C8 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 32EB5C E00146CC 00031980 */  sll       $v1, $v1, 6
/* 32EB60 E00146D0 ACC50004 */  sw        $a1, 0x4($a2)
/* 32EB64 E00146D4 AC820000 */  sw        $v0, 0x0($a0)
/* 32EB68 E00146D8 8FC20000 */  lw        $v0, 0x0($fp)
/* 32EB6C E00146DC 00741821 */  addu      $v1, $v1, $s4
/* 32EB70 E00146E0 AC880010 */  sw        $t0, 0x10($a0)
/* 32EB74 E00146E4 00431021 */  addu      $v0, $v0, $v1
/* 32EB78 E00146E8 AC820004 */  sw        $v0, 0x4($a0)
/* 32EB7C E00146EC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 32EB80 E00146F0 AC820008 */  sw        $v0, 0x8($a0)
/* 32EB84 E00146F4 3C020900 */  lui       $v0, %hi(D_090001B8_415218)
/* 32EB88 E00146F8 244201B8 */  addiu     $v0, $v0, %lo(D_090001B8_415218)
/* 32EB8C E00146FC AC82000C */  sw        $v0, 0xC($a0)
/* 32EB90 E0014700 24020040 */  addiu     $v0, $zero, 0x40
/* 32EB94 E0014704 AC820014 */  sw        $v0, 0x14($a0)
/* 32EB98 E0014708 26520001 */  addiu     $s2, $s2, 0x1
.LE001470C:
/* 32EB9C E001470C 2610004C */  addiu     $s0, $s0, 0x4C
/* 32EBA0 E0014710 8EC20008 */  lw        $v0, 0x8($s6)
/* 32EBA4 E0014714 0242102A */  slt       $v0, $s2, $v0
/* 32EBA8 E0014718 1440FFA6 */  bnez      $v0, .LE00145B4
/* 32EBAC E001471C 2631004C */   addiu    $s1, $s1, 0x4C
.LE0014720:
/* 32EBB0 E0014720 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 32EBB4 E0014724 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 32EBB8 E0014728 8C620000 */  lw        $v0, 0x0($v1)
/* 32EBBC E001472C 0040202D */  daddu     $a0, $v0, $zero
/* 32EBC0 E0014730 24420008 */  addiu     $v0, $v0, 0x8
/* 32EBC4 E0014734 AC620000 */  sw        $v0, 0x0($v1)
/* 32EBC8 E0014738 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 32EBCC E001473C AC820000 */  sw        $v0, 0x0($a0)
/* 32EBD0 E0014740 AC800004 */  sw        $zero, 0x4($a0)
/* 32EBD4 E0014744 8FBF00C4 */  lw        $ra, 0xC4($sp)
/* 32EBD8 E0014748 8FBE00C0 */  lw        $fp, 0xC0($sp)
/* 32EBDC E001474C 8FB700BC */  lw        $s7, 0xBC($sp)
/* 32EBE0 E0014750 8FB600B8 */  lw        $s6, 0xB8($sp)
/* 32EBE4 E0014754 8FB500B4 */  lw        $s5, 0xB4($sp)
/* 32EBE8 E0014758 8FB400B0 */  lw        $s4, 0xB0($sp)
/* 32EBEC E001475C 8FB300AC */  lw        $s3, 0xAC($sp)
/* 32EBF0 E0014760 8FB200A8 */  lw        $s2, 0xA8($sp)
/* 32EBF4 E0014764 8FB100A4 */  lw        $s1, 0xA4($sp)
/* 32EBF8 E0014768 8FB000A0 */  lw        $s0, 0xA0($sp)
/* 32EBFC E001476C D7B400C8 */  ldc1      $f20, 0xC8($sp)
/* 32EC00 E0014770 03E00008 */  jr        $ra
/* 32EC04 E0014774 27BD00D0 */   addiu    $sp, $sp, 0xD0
/* 32EC08 E0014778 00000000 */  nop
/* 32EC0C E001477C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void cloud_puff_appendGfx(void* effect) {
    EffectInstance* effectTemp = effect;
    CloudPuffFXData* part = effectTemp->data.cloudPuff;
    Matrix4f sp20;
    Matrix4f sp60;
    s32 i;

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_090000E0_32ED30);

    for (i = 0; i < effectTemp->numParts; i++, part++) {
        if (part->alive) {
            shim_guPositionF(sp20, 0.0f, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f,
                             part->unk_0C, part->unk_10, part->unk_14);
            shim_guScaleF(sp60, part->unk_18, part->unk_1C, part->unk_20);
            shim_guMtxCatF(sp60, sp20, sp20);
            shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]);

            gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha);
            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
                        G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, D_090001B8_32EE08);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel spiky_white_aura_update
/* 34E144 E0038424 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 34E148 E0038428 AFB40020 */  sw        $s4, 0x20($sp)
/* 34E14C E003842C 0080A02D */  daddu     $s4, $a0, $zero
/* 34E150 E0038430 AFBF0028 */  sw        $ra, 0x28($sp)
/* 34E154 E0038434 AFB50024 */  sw        $s5, 0x24($sp)
/* 34E158 E0038438 AFB3001C */  sw        $s3, 0x1C($sp)
/* 34E15C E003843C AFB20018 */  sw        $s2, 0x18($sp)
/* 34E160 E0038440 AFB10014 */  sw        $s1, 0x14($sp)
/* 34E164 E0038444 AFB00010 */  sw        $s0, 0x10($sp)
/* 34E168 E0038448 F7BC0050 */  sdc1      $f28, 0x50($sp)
/* 34E16C E003844C F7BA0048 */  sdc1      $f26, 0x48($sp)
/* 34E170 E0038450 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 34E174 E0038454 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 34E178 E0038458 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 34E17C E003845C 8E83000C */  lw        $v1, 0xC($s4)
/* 34E180 E0038460 8C620028 */  lw        $v0, 0x28($v1)
/* 34E184 E0038464 2442FFFF */  addiu     $v0, $v0, -0x1
/* 34E188 E0038468 AC620028 */  sw        $v0, 0x28($v1)
/* 34E18C E003846C 8C62002C */  lw        $v0, 0x2C($v1)
/* 34E190 E0038470 8C640028 */  lw        $a0, 0x28($v1)
/* 34E194 E0038474 24450001 */  addiu     $a1, $v0, 0x1
/* 34E198 E0038478 04810005 */  bgez      $a0, .LE0038490
/* 34E19C E003847C AC65002C */   sw       $a1, 0x2C($v1)
/* 34E1A0 E0038480 0C080128 */  jal       shim_remove_effect
/* 34E1A4 E0038484 0280202D */   daddu    $a0, $s4, $zero
/* 34E1A8 E0038488 0800E1B3 */  j         .LE00386CC
/* 34E1AC E003848C 00000000 */   nop
.LE0038490:
/* 34E1B0 E0038490 0000882D */  daddu     $s1, $zero, $zero
/* 34E1B4 E0038494 0080982D */  daddu     $s3, $a0, $zero
/* 34E1B8 E0038498 8E820008 */  lw        $v0, 0x8($s4)
/* 34E1BC E003849C 1840008B */  blez      $v0, .LE00386CC
/* 34E1C0 E00384A0 00A0902D */   daddu    $s2, $a1, $zero
/* 34E1C4 E00384A4 241500FF */  addiu     $s5, $zero, 0xFF
/* 34E1C8 E00384A8 2470000C */  addiu     $s0, $v1, 0xC
/* 34E1CC E00384AC 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34E1D0 E00384B0 D4388A28 */  ldc1      $f24, -0x75D8($at)
/* 34E1D4 E00384B4 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* 34E1D8 E00384B8 4481D000 */  mtc1      $at, $f26
/* 34E1DC E00384BC 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 34E1E0 E00384C0 4481E000 */  mtc1      $at, $f28
/* 34E1E4 E00384C4 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34E1E8 E00384C8 D4368A30 */  ldc1      $f22, -0x75D0($at)
.LE00384CC:
/* 34E1EC E00384CC 2A620006 */  slti      $v0, $s3, 0x6
/* 34E1F0 E00384D0 14400037 */  bnez      $v0, .LE00385B0
/* 34E1F4 E00384D4 2A620005 */   slti     $v0, $s3, 0x5
/* 34E1F8 E00384D8 C6020004 */  lwc1      $f2, 0x4($s0)
/* 34E1FC E00384DC 460010A1 */  cvt.d.s   $f2, $f2
/* 34E200 E00384E0 46381082 */  mul.d     $f2, $f2, $f24
/* 34E204 E00384E4 00000000 */  nop
/* 34E208 E00384E8 C6000008 */  lwc1      $f0, 0x8($s0)
/* 34E20C E00384EC 46000021 */  cvt.d.s   $f0, $f0
/* 34E210 E00384F0 46380002 */  mul.d     $f0, $f0, $f24
/* 34E214 E00384F4 00000000 */  nop
/* 34E218 E00384F8 C604000C */  lwc1      $f4, 0xC($s0)
/* 34E21C E00384FC 46002121 */  cvt.d.s   $f4, $f4
/* 34E220 E0038500 46382102 */  mul.d     $f4, $f4, $f24
/* 34E224 E0038504 00000000 */  nop
/* 34E228 E0038508 8E030018 */  lw        $v1, 0x18($s0)
/* 34E22C E003850C 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34E230 E0038510 D4268A38 */  ldc1      $f6, -0x75C8($at)
/* 34E234 E0038514 02A31023 */  subu      $v0, $s5, $v1
/* 34E238 E0038518 44824000 */  mtc1      $v0, $f8
/* 34E23C E003851C 00000000 */  nop
/* 34E240 E0038520 46804221 */  cvt.d.w   $f8, $f8
/* 34E244 E0038524 46264202 */  mul.d     $f8, $f8, $f6
/* 34E248 E0038528 00000000 */  nop
/* 34E24C E003852C 462010A0 */  cvt.s.d   $f2, $f2
/* 34E250 E0038530 46200020 */  cvt.s.d   $f0, $f0
/* 34E254 E0038534 E6000008 */  swc1      $f0, 0x8($s0)
/* 34E258 E0038538 44830000 */  mtc1      $v1, $f0
/* 34E25C E003853C 00000000 */  nop
/* 34E260 E0038540 46800021 */  cvt.d.w   $f0, $f0
/* 34E264 E0038544 46202120 */  cvt.s.d   $f4, $f4
/* 34E268 E0038548 46280000 */  add.d     $f0, $f0, $f8
/* 34E26C E003854C E6020004 */  swc1      $f2, 0x4($s0)
/* 34E270 E0038550 E604000C */  swc1      $f4, 0xC($s0)
/* 34E274 E0038554 4620028D */  trunc.w.d $f10, $f0
/* 34E278 E0038558 44035000 */  mfc1      $v1, $f10
/* 34E27C E003855C 00000000 */  nop
/* 34E280 E0038560 000317C2 */  srl       $v0, $v1, 31
/* 34E284 E0038564 00621021 */  addu      $v0, $v1, $v0
/* 34E288 E0038568 00021043 */  sra       $v0, $v0, 1
/* 34E28C E003856C 44826000 */  mtc1      $v0, $f12
/* 34E290 E0038570 00000000 */  nop
/* 34E294 E0038574 46806320 */  cvt.s.w   $f12, $f12
/* 34E298 E0038578 0C080140 */  jal       shim_sin_deg
/* 34E29C E003857C AE030018 */   sw       $v1, 0x18($s0)
/* 34E2A0 E0038580 44926000 */  mtc1      $s2, $f12
/* 34E2A4 E0038584 00000000 */  nop
/* 34E2A8 E0038588 46806320 */  cvt.s.w   $f12, $f12
/* 34E2AC E003858C 461A6302 */  mul.s     $f12, $f12, $f26
/* 34E2B0 E0038590 00000000 */  nop
/* 34E2B4 E0038594 0C080140 */  jal       shim_sin_deg
/* 34E2B8 E0038598 46000506 */   mov.s    $f20, $f0
/* 34E2BC E003859C 461CA502 */  mul.s     $f20, $f20, $f28
/* 34E2C0 E00385A0 00000000 */  nop
/* 34E2C4 E00385A4 4600A500 */  add.s     $f20, $f20, $f0
/* 34E2C8 E00385A8 E6140014 */  swc1      $f20, 0x14($s0)
/* 34E2CC E00385AC 2A620005 */  slti      $v0, $s3, 0x5
.LE00385B0:
/* 34E2D0 E00385B0 10400035 */  beqz      $v0, .LE0038688
/* 34E2D4 E00385B4 00000000 */   nop
/* 34E2D8 E00385B8 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34E2DC E00385BC D4208A40 */  ldc1      $f0, -0x75C0($at)
/* 34E2E0 E00385C0 C6060018 */  lwc1      $f6, 0x18($s0)
/* 34E2E4 E00385C4 468031A1 */  cvt.d.w   $f6, $f6
/* 34E2E8 E00385C8 46203182 */  mul.d     $f6, $f6, $f0
/* 34E2EC E00385CC 00000000 */  nop
/* 34E2F0 E00385D0 C6040004 */  lwc1      $f4, 0x4($s0)
/* 34E2F4 E00385D4 46002121 */  cvt.d.s   $f4, $f4
/* 34E2F8 E00385D8 46362102 */  mul.d     $f4, $f4, $f22
/* 34E2FC E00385DC 00000000 */  nop
/* 34E300 E00385E0 C602000C */  lwc1      $f2, 0xC($s0)
/* 34E304 E00385E4 460010A1 */  cvt.d.s   $f2, $f2
/* 34E308 E00385E8 46361082 */  mul.d     $f2, $f2, $f22
/* 34E30C E00385EC 00000000 */  nop
/* 34E310 E00385F0 C6000008 */  lwc1      $f0, 0x8($s0)
/* 34E314 E00385F4 46000021 */  cvt.d.s   $f0, $f0
/* 34E318 E00385F8 46360002 */  mul.d     $f0, $f0, $f22
/* 34E31C E00385FC 00000000 */  nop
/* 34E320 E0038600 4620328D */  trunc.w.d $f10, $f6
/* 34E324 E0038604 E60A0018 */  swc1      $f10, 0x18($s0)
/* 34E328 E0038608 46202120 */  cvt.s.d   $f4, $f4
/* 34E32C E003860C 8E030018 */  lw        $v1, 0x18($s0)
/* 34E330 E0038610 462010A0 */  cvt.s.d   $f2, $f2
/* 34E334 E0038614 E6040004 */  swc1      $f4, 0x4($s0)
/* 34E338 E0038618 E602000C */  swc1      $f2, 0xC($s0)
/* 34E33C E003861C 46200020 */  cvt.s.d   $f0, $f0
/* 34E340 E0038620 000317C2 */  srl       $v0, $v1, 31
/* 34E344 E0038624 00621821 */  addu      $v1, $v1, $v0
/* 34E348 E0038628 00031843 */  sra       $v1, $v1, 1
/* 34E34C E003862C 44836000 */  mtc1      $v1, $f12
/* 34E350 E0038630 00000000 */  nop
/* 34E354 E0038634 46806320 */  cvt.s.w   $f12, $f12
/* 34E358 E0038638 0C080140 */  jal       shim_sin_deg
/* 34E35C E003863C E6000008 */   swc1     $f0, 0x8($s0)
/* 34E360 E0038640 44926000 */  mtc1      $s2, $f12
/* 34E364 E0038644 00000000 */  nop
/* 34E368 E0038648 46806320 */  cvt.s.w   $f12, $f12
/* 34E36C E003864C 461A6302 */  mul.s     $f12, $f12, $f26
/* 34E370 E0038650 00000000 */  nop
/* 34E374 E0038654 0C080140 */  jal       shim_sin_deg
/* 34E378 E0038658 46000506 */   mov.s    $f20, $f0
/* 34E37C E003865C 461CA502 */  mul.s     $f20, $f20, $f28
/* 34E380 E0038660 00000000 */  nop
/* 34E384 E0038664 8E020018 */  lw        $v0, 0x18($s0)
/* 34E388 E0038668 02A21023 */  subu      $v0, $s5, $v0
/* 34E38C E003866C 4600A500 */  add.s     $f20, $f20, $f0
/* 34E390 E0038670 44820000 */  mtc1      $v0, $f0
/* 34E394 E0038674 00000000 */  nop
/* 34E398 E0038678 46800020 */  cvt.s.w   $f0, $f0
/* 34E39C E003867C 461A0003 */  div.s     $f0, $f0, $f26
/* 34E3A0 E0038680 4600A500 */  add.s     $f20, $f20, $f0
/* 34E3A4 E0038684 E6140014 */  swc1      $f20, 0x14($s0)
.LE0038688:
/* 34E3A8 E0038688 C606FFF8 */  lwc1      $f6, -0x8($s0)
/* 34E3AC E003868C C6000004 */  lwc1      $f0, 0x4($s0)
/* 34E3B0 E0038690 C604FFFC */  lwc1      $f4, -0x4($s0)
/* 34E3B4 E0038694 46003180 */  add.s     $f6, $f6, $f0
/* 34E3B8 E0038698 C6000008 */  lwc1      $f0, 0x8($s0)
/* 34E3BC E003869C C602000C */  lwc1      $f2, 0xC($s0)
/* 34E3C0 E00386A0 46002100 */  add.s     $f4, $f4, $f0
/* 34E3C4 E00386A4 C6000000 */  lwc1      $f0, 0x0($s0)
/* 34E3C8 E00386A8 26310001 */  addiu     $s1, $s1, 0x1
/* 34E3CC E00386AC 46020000 */  add.s     $f0, $f0, $f2
/* 34E3D0 E00386B0 E606FFF8 */  swc1      $f6, -0x8($s0)
/* 34E3D4 E00386B4 E604FFFC */  swc1      $f4, -0x4($s0)
/* 34E3D8 E00386B8 E6000000 */  swc1      $f0, 0x0($s0)
/* 34E3DC E00386BC 8E820008 */  lw        $v0, 0x8($s4)
/* 34E3E0 E00386C0 0222102A */  slt       $v0, $s1, $v0
/* 34E3E4 E00386C4 1440FF81 */  bnez      $v0, .LE00384CC
/* 34E3E8 E00386C8 26100030 */   addiu    $s0, $s0, 0x30
.LE00386CC:
/* 34E3EC E00386CC 8FBF0028 */  lw        $ra, 0x28($sp)
/* 34E3F0 E00386D0 8FB50024 */  lw        $s5, 0x24($sp)
/* 34E3F4 E00386D4 8FB40020 */  lw        $s4, 0x20($sp)
/* 34E3F8 E00386D8 8FB3001C */  lw        $s3, 0x1C($sp)
/* 34E3FC E00386DC 8FB20018 */  lw        $s2, 0x18($sp)
/* 34E400 E00386E0 8FB10014 */  lw        $s1, 0x14($sp)
/* 34E404 E00386E4 8FB00010 */  lw        $s0, 0x10($sp)
/* 34E408 E00386E8 D7BC0050 */  ldc1      $f28, 0x50($sp)
/* 34E40C E00386EC D7BA0048 */  ldc1      $f26, 0x48($sp)
/* 34E410 E00386F0 D7B80040 */  ldc1      $f24, 0x40($sp)
/* 34E414 E00386F4 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 34E418 E00386F8 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 34E41C E00386FC 03E00008 */  jr        $ra
/* 34E420 E0038700 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void spiky_white_aura_update(EffectInstance* effect) {
    SpikyWhiteAuraFXData* part = effect->data.spikyWhiteAura;
    s32 unk_28;
    s32 unk_2C;
    s32 i;

    part->unk_28--;
    part->unk_2C++;

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

    unk_28 = part->unk_28;
    unk_2C = part->unk_2C;

    for (i = 0; i < effect->numParts; i++, part++) {
        if (unk_28 >= 6) {
            part->unk_10 *= 0.8;
            part->unk_14 *= 0.8;
            part->unk_18 *= 0.8;
            part->unk_24 += (255 - part->unk_24) * 0.4;
            part->unk_20 = shim_sin_deg(part->unk_24 / 2) * 3.0f + shim_sin_deg(unk_2C * 30.0f);
        }

        if (unk_28 < 5) {
            part->unk_24 *= 0.6;
            part->unk_10 *= 0.7;
            part->unk_14 *= 0.7;
            part->unk_18 *= 0.7;
            part->unk_20 = shim_sin_deg(part->unk_24 / 2) * 3.0f + shim_sin_deg(unk_2C * 30.0f) + (255 - part->unk_24) / 30.0f;
        }

        part->unk_04 += part->unk_10;
        part->unk_08 += part->unk_14;
        part->unk_0C += part->unk_18;
    }
}