### RAW ASSEMBLY INSTRUCTIONS:

glabel PutPartnerAway
/* F4338 802CF988 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* F433C 802CF98C AFB00010 */  sw        $s0, 0x10($sp)
/* F4340 802CF990 00A0802D */  daddu     $s0, $a1, $zero
/* F4344 802CF994 AFBF0018 */  sw        $ra, 0x18($sp)
/* F4348 802CF998 AFB10014 */  sw        $s1, 0x14($sp)
/* F434C 802CF99C F7BE0048 */  sdc1      $f30, 0x48($sp)
/* F4350 802CF9A0 F7BC0040 */  sdc1      $f28, 0x40($sp)
/* F4354 802CF9A4 F7BA0038 */  sdc1      $f26, 0x38($sp)
/* F4358 802CF9A8 F7B80030 */  sdc1      $f24, 0x30($sp)
/* F435C 802CF9AC F7B60028 */  sdc1      $f22, 0x28($sp)
/* F4360 802CF9B0 F7B40020 */  sdc1      $f20, 0x20($sp)
/* F4364 802CF9B4 0C00EABB */  jal       get_npc_unsafe
/* F4368 802CF9B8 2404FFFC */   addiu    $a0, $zero, -0x4
/* F436C 802CF9BC 3C048011 */  lui       $a0, %hi(gPlayerStatus)
/* F4370 802CF9C0 2484EFC8 */  addiu     $a0, $a0, %lo(gPlayerStatus)
/* F4374 802CF9C4 1200005F */  beqz      $s0, .L802CFB44
/* F4378 802CF9C8 0040882D */   daddu    $s1, $v0, $zero
/* F437C 802CF9CC 3C10802E */  lui       $s0, %hi(wExtraPartnerID)
/* F4380 802CF9D0 2610AE40 */  addiu     $s0, $s0, %lo(wExtraPartnerID)
/* F4384 802CF9D4 8E020000 */  lw        $v0, 0x0($s0)
/* F4388 802CF9D8 1040009A */  beqz      $v0, .L802CFC44
/* F438C 802CF9DC 2403FDFF */   addiu    $v1, $zero, -0x201
/* F4390 802CF9E0 8E220000 */  lw        $v0, 0x0($s1)
/* F4394 802CF9E4 C63A0038 */  lwc1      $f26, 0x38($s1)
/* F4398 802CF9E8 C63C003C */  lwc1      $f28, 0x3C($s1)
/* F439C 802CF9EC C6380040 */  lwc1      $f24, 0x40($s1)
/* F43A0 802CF9F0 00431024 */  and       $v0, $v0, $v1
/* F43A4 802CF9F4 2403FFF7 */  addiu     $v1, $zero, -0x9
/* F43A8 802CF9F8 00431024 */  and       $v0, $v0, $v1
/* F43AC 802CF9FC AE220000 */  sw        $v0, 0x0($s1)
/* F43B0 802CFA00 C4960028 */  lwc1      $f22, 0x28($a0)
/* F43B4 802CFA04 E6360060 */  swc1      $f22, 0x60($s1)
/* F43B8 802CFA08 948200B0 */  lhu       $v0, 0xB0($a0)
/* F43BC 802CFA0C C482002C */  lwc1      $f2, 0x2C($a0)
/* F43C0 802CFA10 4406B000 */  mfc1      $a2, $f22
/* F43C4 802CFA14 00021400 */  sll       $v0, $v0, 16
/* F43C8 802CFA18 00021C03 */  sra       $v1, $v0, 16
/* F43CC 802CFA1C 000217C2 */  srl       $v0, $v0, 31
/* F43D0 802CFA20 00621821 */  addu      $v1, $v1, $v0
/* F43D4 802CFA24 00031843 */  sra       $v1, $v1, 1
/* F43D8 802CFA28 44830000 */  mtc1      $v1, $f0
/* F43DC 802CFA2C 00000000 */  nop
/* F43E0 802CFA30 46800020 */  cvt.s.w   $f0, $f0
/* F43E4 802CFA34 46001780 */  add.s     $f30, $f2, $f0
/* F43E8 802CFA38 3C014080 */  lui       $at, (0x40800000 >> 16)
/* F43EC 802CFA3C 44810000 */  mtc1      $at, $f0
/* F43F0 802CFA40 4600D306 */  mov.s     $f12, $f26
/* F43F4 802CFA44 E63E0064 */  swc1      $f30, 0x64($s1)
/* F43F8 802CFA48 C4940030 */  lwc1      $f20, 0x30($a0)
/* F43FC 802CFA4C 3C014026 */  lui       $at, (0x40266666 >> 16)
/* F4400 802CFA50 34216666 */  ori       $at, $at, (0x40266666 & 0xFFFF)
/* F4404 802CFA54 44811000 */  mtc1      $at, $f2
/* F4408 802CFA58 4407A000 */  mfc1      $a3, $f20
/* F440C 802CFA5C 4600C386 */  mov.s     $f14, $f24
/* F4410 802CFA60 E6200018 */  swc1      $f0, 0x18($s1)
/* F4414 802CFA64 E6220014 */  swc1      $f2, 0x14($s1)
/* F4418 802CFA68 0C00A7B5 */  jal       dist2D
/* F441C 802CFA6C E6340068 */   swc1     $f20, 0x68($s1)
/* F4420 802CFA70 4600D306 */  mov.s     $f12, $f26
/* F4424 802CFA74 4406B000 */  mfc1      $a2, $f22
/* F4428 802CFA78 4407A000 */  mfc1      $a3, $f20
/* F442C 802CFA7C 4600C386 */  mov.s     $f14, $f24
/* F4430 802CFA80 0C00A720 */  jal       atan2
/* F4434 802CFA84 E6200010 */   swc1     $f0, 0x10($s1)
/* F4438 802CFA88 C6220010 */  lwc1      $f2, 0x10($s1)
/* F443C 802CFA8C C6240018 */  lwc1      $f4, 0x18($s1)
/* F4440 802CFA90 E620000C */  swc1      $f0, 0xC($s1)
/* F4444 802CFA94 46041083 */  div.s     $f2, $f2, $f4
/* F4448 802CFA98 4600118D */  trunc.w.s $f6, $f2
/* F444C 802CFA9C 44023000 */  mfc1      $v0, $f6
/* F4450 802CFAA0 00000000 */  nop
/* F4454 802CFAA4 A622008E */  sh        $v0, 0x8E($s1)
/* F4458 802CFAA8 00021400 */  sll       $v0, $v0, 16
/* F445C 802CFAAC 00021403 */  sra       $v0, $v0, 16
/* F4460 802CFAB0 2842000A */  slti      $v0, $v0, 0xA
/* F4464 802CFAB4 10400007 */  beqz      $v0, .L802CFAD4
/* F4468 802CFAB8 2402000A */   addiu    $v0, $zero, 0xA
/* F446C 802CFABC 3C014120 */  lui       $at, (0x41200000 >> 16)
/* F4470 802CFAC0 44810000 */  mtc1      $at, $f0
/* F4474 802CFAC4 C6220010 */  lwc1      $f2, 0x10($s1)
/* F4478 802CFAC8 A622008E */  sh        $v0, 0x8E($s1)
/* F447C 802CFACC 46001083 */  div.s     $f2, $f2, $f0
/* F4480 802CFAD0 E6220018 */  swc1      $f2, 0x18($s1)
.L802CFAD4:
/* F4484 802CFAD4 8622008E */  lh        $v0, 0x8E($s1)
/* F4488 802CFAD8 C6200014 */  lwc1      $f0, 0x14($s1)
/* F448C 802CFADC 44822000 */  mtc1      $v0, $f4
/* F4490 802CFAE0 00000000 */  nop
/* F4494 802CFAE4 46802120 */  cvt.s.w   $f4, $f4
/* F4498 802CFAE8 46040002 */  mul.s     $f0, $f0, $f4
/* F449C 802CFAEC 00000000 */  nop
/* F44A0 802CFAF0 46040002 */  mul.s     $f0, $f0, $f4
/* F44A4 802CFAF4 00000000 */  nop
/* F44A8 802CFAF8 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* F44AC 802CFAFC 44811000 */  mtc1      $at, $f2
/* F44B0 802CFB00 00000000 */  nop
/* F44B4 802CFB04 46020002 */  mul.s     $f0, $f0, $f2
/* F44B8 802CFB08 00000000 */  nop
/* F44BC 802CFB0C 8E030000 */  lw        $v1, 0x0($s0)
/* F44C0 802CFB10 461CF701 */  sub.s     $f28, $f30, $f28
/* F44C4 802CFB14 000310C0 */  sll       $v0, $v1, 3
/* F44C8 802CFB18 4600E000 */  add.s     $f0, $f28, $f0
/* F44CC 802CFB1C 00431021 */  addu      $v0, $v0, $v1
/* F44D0 802CFB20 00021080 */  sll       $v0, $v0, 2
/* F44D4 802CFB24 46040003 */  div.s     $f0, $f0, $f4
/* F44D8 802CFB28 E620001C */  swc1      $f0, 0x1C($s1)
/* F44DC 802CFB2C 3C038010 */  lui       $v1, %hi(gPartnerAnimations + 0x4)
/* F44E0 802CFB30 00621821 */  addu      $v1, $v1, $v0
/* F44E4 802CFB34 8C63834C */  lw        $v1, %lo(gPartnerAnimations + 0x4)($v1)
/* F44E8 802CFB38 0000102D */  daddu     $v0, $zero, $zero
/* F44EC 802CFB3C 080B3F12 */  j         .L802CFC48
/* F44F0 802CFB40 AE230028 */   sw       $v1, 0x28($s1)
.L802CFB44:
/* F44F4 802CFB44 C620001C */  lwc1      $f0, 0x1C($s1)
/* F44F8 802CFB48 C6220014 */  lwc1      $f2, 0x14($s1)
/* F44FC 802CFB4C 46020001 */  sub.s     $f0, $f0, $f2
/* F4500 802CFB50 C622003C */  lwc1      $f2, 0x3C($s1)
/* F4504 802CFB54 46001080 */  add.s     $f2, $f2, $f0
/* F4508 802CFB58 4480A000 */  mtc1      $zero, $f20
/* F450C 802CFB5C 00000000 */  nop
/* F4510 802CFB60 4614003E */  c.le.s    $f0, $f20
/* F4514 802CFB64 E620001C */  swc1      $f0, 0x1C($s1)
/* F4518 802CFB68 4500000A */  bc1f      .L802CFB94
/* F451C 802CFB6C E622003C */   swc1     $f2, 0x3C($s1)
/* F4520 802CFB70 3C02802E */  lui       $v0, %hi(wExtraPartnerID)
/* F4524 802CFB74 8C42AE40 */  lw        $v0, %lo(wExtraPartnerID)($v0)
/* F4528 802CFB78 000218C0 */  sll       $v1, $v0, 3
/* F452C 802CFB7C 00621821 */  addu      $v1, $v1, $v0
/* F4530 802CFB80 00031880 */  sll       $v1, $v1, 2
/* F4534 802CFB84 3C028010 */  lui       $v0, %hi(gPartnerAnimations + 0x8)
/* F4538 802CFB88 00431021 */  addu      $v0, $v0, $v1
/* F453C 802CFB8C 8C428350 */  lw        $v0, %lo(gPartnerAnimations + 0x8)($v0)
/* F4540 802CFB90 AE220028 */  sw        $v0, 0x28($s1)
.L802CFB94:
/* F4544 802CFB94 8E26000C */  lw        $a2, 0xC($s1)
/* F4548 802CFB98 8E250018 */  lw        $a1, 0x18($s1)
/* F454C 802CFB9C 0C00EA95 */  jal       npc_move_heading
/* F4550 802CFBA0 0220202D */   daddu    $a0, $s1, $zero
/* F4554 802CFBA4 8622008E */  lh        $v0, 0x8E($s1)
/* F4558 802CFBA8 3C014120 */  lui       $at, (0x41200000 >> 16)
/* F455C 802CFBAC 44811000 */  mtc1      $at, $f2
/* F4560 802CFBB0 44820000 */  mtc1      $v0, $f0
/* F4564 802CFBB4 00000000 */  nop
/* F4568 802CFBB8 46800020 */  cvt.s.w   $f0, $f0
/* F456C 802CFBBC 4600103C */  c.lt.s    $f2, $f0
/* F4570 802CFBC0 00000000 */  nop
/* F4574 802CFBC4 45030001 */  bc1tl     .L802CFBCC
/* F4578 802CFBC8 46001006 */   mov.s    $f0, $f2
.L802CFBCC:
/* F457C 802CFBCC 9622008E */  lhu       $v0, 0x8E($s1)
/* F4580 802CFBD0 46020003 */  div.s     $f0, $f0, $f2
/* F4584 802CFBD4 E6200054 */  swc1      $f0, 0x54($s1)
/* F4588 802CFBD8 46000086 */  mov.s     $f2, $f0
/* F458C 802CFBDC E6200058 */  swc1      $f0, 0x58($s1)
/* F4590 802CFBE0 E622005C */  swc1      $f2, 0x5C($s1)
/* F4594 802CFBE4 2442FFFF */  addiu     $v0, $v0, -0x1
/* F4598 802CFBE8 A622008E */  sh        $v0, 0x8E($s1)
/* F459C 802CFBEC 00021400 */  sll       $v0, $v0, 16
/* F45A0 802CFBF0 04410015 */  bgez      $v0, .L802CFC48
/* F45A4 802CFBF4 0000102D */   daddu    $v0, $zero, $zero
/* F45A8 802CFBF8 3C03802E */  lui       $v1, %hi(wExtraPartnerID)
/* F45AC 802CFBFC 8C63AE40 */  lw        $v1, %lo(wExtraPartnerID)($v1)
/* F45B0 802CFC00 3C04802E */  lui       $a0, %hi(wExtraPartnerNpcID)
/* F45B4 802CFC04 8C84AE44 */  lw        $a0, %lo(wExtraPartnerNpcID)($a0)
/* F45B8 802CFC08 C6200064 */  lwc1      $f0, 0x64($s1)
/* F45BC 802CFC0C 000310C0 */  sll       $v0, $v1, 3
/* F45C0 802CFC10 00431021 */  addu      $v0, $v0, $v1
/* F45C4 802CFC14 00021080 */  sll       $v0, $v0, 2
/* F45C8 802CFC18 3C018010 */  lui       $at, %hi(gPartnerAnimations + 0xC)
/* F45CC 802CFC1C 00220821 */  addu      $at, $at, $v0
/* F45D0 802CFC20 8C228354 */  lw        $v0, %lo(gPartnerAnimations + 0xC)($at)
/* F45D4 802CFC24 E634001C */  swc1      $f20, 0x1C($s1)
/* F45D8 802CFC28 E620003C */  swc1      $f0, 0x3C($s1)
/* F45DC 802CFC2C 0C00E228 */  jal       free_npc_by_index
/* F45E0 802CFC30 AE220028 */   sw       $v0, 0x28($s1)
/* F45E4 802CFC34 0C00EABB */  jal       get_npc_unsafe
/* F45E8 802CFC38 2404FFFB */   addiu    $a0, $zero, -0x5
/* F45EC 802CFC3C 2403FFFC */  addiu     $v1, $zero, -0x4
/* F45F0 802CFC40 A04300A4 */  sb        $v1, 0xA4($v0)
.L802CFC44:
/* F45F4 802CFC44 24020002 */  addiu     $v0, $zero, 0x2
.L802CFC48:
/* F45F8 802CFC48 8FBF0018 */  lw        $ra, 0x18($sp)
/* F45FC 802CFC4C 8FB10014 */  lw        $s1, 0x14($sp)
/* F4600 802CFC50 8FB00010 */  lw        $s0, 0x10($sp)
/* F4604 802CFC54 D7BE0048 */  ldc1      $f30, 0x48($sp)
/* F4608 802CFC58 D7BC0040 */  ldc1      $f28, 0x40($sp)
/* F460C 802CFC5C D7BA0038 */  ldc1      $f26, 0x38($sp)
/* F4610 802CFC60 D7B80030 */  ldc1      $f24, 0x30($sp)
/* F4614 802CFC64 D7B60028 */  ldc1      $f22, 0x28($sp)
/* F4618 802CFC68 D7B40020 */  ldc1      $f20, 0x20($sp)
/* F461C 802CFC6C 03E00008 */  jr        $ra
/* F4620 802CFC70 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

ApiStatus PutPartnerAway(Evt* script, s32 isInitialCall) {
    Npc* partner = get_npc_unsafe(NPC_PARTNER);
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 scale;
    f32 targetX;
    f32 targetY;
    f32 targetZ;
    f32 partnerX;
    f32 partnerY;
    f32 partnerZ;

    if (isInitialCall) {
        if (wExtraPartnerID != 0) {
            partner->flags &= ~NPC_FLAG_GRAVITY;
            partner->flags &= ~NPC_FLAG_8;
            targetX = playerStatus->position.x;
            partner->moveToPos.x = targetX;
            partnerX = partner->pos.x;
            targetY = playerStatus->position.y + (playerStatus->colliderHeight / 2);
            partner->moveToPos.y = targetY;
            partnerY = partner->pos.y;
            targetZ = playerStatus->position.z;
            partner->moveToPos.z = targetZ;
            partnerZ = partner->pos.z;
            partner->moveSpeed = 4.0f;
            partner->jumpScale = 2.6f;
            partner->planarFlyDist = dist2D(partnerX, partnerZ, targetX, targetZ);
            partner->yaw = atan2(partnerX, partnerZ, targetX, targetZ);
            partner->duration = partner->planarFlyDist / partner->moveSpeed;

            if (partner->duration < 10) {
                partner->duration = 10;
                partner->moveSpeed = partner->planarFlyDist / partner->duration;
            }

            partnerY = targetY - partnerY;
            partner->jumpVelocity = (partnerY + (partner->jumpScale * partner->duration * partner->duration * 0.5f)) / partner->duration;
            partner->currentAnim = gPartnerAnimations[wExtraPartnerID].walk;
            return ApiStatus_BLOCK;
        } else {
            return ApiStatus_DONE2;
        }
    }

    partner->jumpVelocity -= partner->jumpScale;
    partner->pos.y += partner->jumpVelocity;
    if (partner->jumpVelocity <= 0.0f) {
        partner->currentAnim = gPartnerAnimations[wExtraPartnerID].jump;
    }
    npc_move_heading(partner, partner->moveSpeed, partner->yaw);

    scale = partner->duration;
    if (scale > 10.0f) {
        scale = 10.0f;
    }

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

    partner->duration--;
    if (partner->duration < 0) {
        partner->currentAnim = gPartnerAnimations[wExtraPartnerID].fall;
        partner->jumpVelocity = 0.0f;
        partner->pos.y = partner->moveToPos.y;
        free_npc_by_index(wExtraPartnerNpcID);
        get_npc_unsafe(-5)->npcID = NPC_PARTNER;
        return ApiStatus_DONE2;
    }
    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel gather_energy_pink_update
/* 33B30C E002618C 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 33B310 E0026190 AFB1003C */  sw        $s1, 0x3C($sp)
/* 33B314 E0026194 0080882D */  daddu     $s1, $a0, $zero
/* 33B318 E0026198 AFBF0040 */  sw        $ra, 0x40($sp)
/* 33B31C E002619C AFB00038 */  sw        $s0, 0x38($sp)
/* 33B320 E00261A0 F7B40048 */  sdc1      $f20, 0x48($sp)
/* 33B324 E00261A4 8E30000C */  lw        $s0, 0xC($s1)
/* 33B328 E00261A8 8E020028 */  lw        $v0, 0x28($s0)
/* 33B32C E00261AC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 33B330 E00261B0 AE020028 */  sw        $v0, 0x28($s0)
/* 33B334 E00261B4 8E02002C */  lw        $v0, 0x2C($s0)
/* 33B338 E00261B8 8E030028 */  lw        $v1, 0x28($s0)
/* 33B33C E00261BC 24440001 */  addiu     $a0, $v0, 0x1
/* 33B340 E00261C0 04610005 */  bgez      $v1, .LE00261D8
/* 33B344 E00261C4 AE04002C */   sw       $a0, 0x2C($s0)
/* 33B348 E00261C8 0C080128 */  jal       shim_remove_effect
/* 33B34C E00261CC 0220202D */   daddu    $a0, $s1, $zero
/* 33B350 E00261D0 08009926 */  j         .LE0026498
/* 33B354 E00261D4 00000000 */   nop
.LE00261D8:
/* 33B358 E00261D8 2882000B */  slti      $v0, $a0, 0xB
/* 33B35C E00261DC 1040000B */  beqz      $v0, .LE002620C
/* 33B360 E00261E0 0060282D */   daddu    $a1, $v1, $zero
/* 33B364 E00261E4 3C036666 */  lui       $v1, (0x66666667 >> 16)
/* 33B368 E00261E8 34636667 */  ori       $v1, $v1, (0x66666667 & 0xFFFF)
/* 33B36C E00261EC 00041200 */  sll       $v0, $a0, 8
/* 33B370 E00261F0 00441023 */  subu      $v0, $v0, $a0
/* 33B374 E00261F4 00430018 */  mult      $v0, $v1
/* 33B378 E00261F8 000217C3 */  sra       $v0, $v0, 31
/* 33B37C E00261FC 00004010 */  mfhi      $t0
/* 33B380 E0026200 00081883 */  sra       $v1, $t0, 2
/* 33B384 E0026204 00621823 */  subu      $v1, $v1, $v0
/* 33B388 E0026208 AE030024 */  sw        $v1, 0x24($s0)
.LE002620C:
/* 33B38C E002620C 28A20006 */  slti      $v0, $a1, 0x6
/* 33B390 E0026210 10400009 */  beqz      $v0, .LE0026238
/* 33B394 E0026214 3C032AAA */   lui      $v1, (0x2AAAAAAB >> 16)
/* 33B398 E0026218 3463AAAB */  ori       $v1, $v1, (0x2AAAAAAB & 0xFFFF)
/* 33B39C E002621C 00051200 */  sll       $v0, $a1, 8
/* 33B3A0 E0026220 00451023 */  subu      $v0, $v0, $a1
/* 33B3A4 E0026224 00430018 */  mult      $v0, $v1
/* 33B3A8 E0026228 000217C3 */  sra       $v0, $v0, 31
/* 33B3AC E002622C 00004010 */  mfhi      $t0
/* 33B3B0 E0026230 01021023 */  subu      $v0, $t0, $v0
/* 33B3B4 E0026234 AE020024 */  sw        $v0, 0x24($s0)
.LE0026238:
/* 33B3B8 E0026238 28A2000A */  slti      $v0, $a1, 0xA
/* 33B3BC E002623C 1040000C */  beqz      $v0, .LE0026270
/* 33B3C0 E0026240 00000000 */   nop
/* 33B3C4 E0026244 8E020000 */  lw        $v0, 0x0($s0)
/* 33B3C8 E0026248 14400009 */  bnez      $v0, .LE0026270
/* 33B3CC E002624C 00000000 */   nop
/* 33B3D0 E0026250 C600001C */  lwc1      $f0, 0x1C($s0)
/* 33B3D4 E0026254 3C01E002 */  lui       $at, (0xE0026A28 >> 16)
/* 33B3D8 E0026258 D4226A28 */  ldc1      $f2, (0xE0026A28 & 0xFFFF)($at)
/* 33B3DC E002625C 46000021 */  cvt.d.s   $f0, $f0
/* 33B3E0 E0026260 46220002 */  mul.d     $f0, $f0, $f2
/* 33B3E4 E0026264 00000000 */  nop
/* 33B3E8 E0026268 46200020 */  cvt.s.d   $f0, $f0
/* 33B3EC E002626C E600001C */  swc1      $f0, 0x1C($s0)
.LE0026270:
/* 33B3F0 E0026270 8E030000 */  lw        $v1, 0x0($s0)
/* 33B3F4 E0026274 24020001 */  addiu     $v0, $zero, 0x1
/* 33B3F8 E0026278 14620017 */  bne       $v1, $v0, .LE00262D8
/* 33B3FC E002627C 00051080 */   sll      $v0, $a1, 2
/* 33B400 E0026280 00451021 */  addu      $v0, $v0, $a1
/* 33B404 E0026284 00021040 */  sll       $v0, $v0, 1
/* 33B408 E0026288 44826000 */  mtc1      $v0, $f12
/* 33B40C E002628C 00000000 */  nop
/* 33B410 E0026290 0C080140 */  jal       shim_sin_deg
/* 33B414 E0026294 46806320 */   cvt.s.w  $f12, $f12
/* 33B418 E0026298 3C01E002 */  lui       $at, (0xE0026A30 >> 16)
/* 33B41C E002629C D4226A30 */  ldc1      $f2, (0xE0026A30 & 0xFFFF)($at)
/* 33B420 E00262A0 46000021 */  cvt.d.s   $f0, $f0
/* 33B424 E00262A4 46220002 */  mul.d     $f0, $f0, $f2
/* 33B428 E00262A8 00000000 */  nop
/* 33B42C E00262AC C6020020 */  lwc1      $f2, 0x20($s0)
/* 33B430 E00262B0 460010A1 */  cvt.d.s   $f2, $f2
/* 33B434 E00262B4 46220002 */  mul.d     $f0, $f0, $f2
/* 33B438 E00262B8 00000000 */  nop
/* 33B43C E00262BC C604001C */  lwc1      $f4, 0x1C($s0)
/* 33B440 E00262C0 46201080 */  add.d     $f2, $f2, $f0
/* 33B444 E00262C4 46002121 */  cvt.d.s   $f4, $f4
/* 33B448 E00262C8 3C01E002 */  lui       $at, (0xE0026A38 >> 16)
/* 33B44C E00262CC D4206A38 */  ldc1      $f0, (0xE0026A38 & 0xFFFF)($at)
/* 33B450 E00262D0 080098CB */  j         .LE002632C
/* 33B454 E00262D4 46241081 */   sub.d    $f2, $f2, $f4
.LE00262D8:
/* 33B458 E00262D8 00451021 */  addu      $v0, $v0, $a1
/* 33B45C E00262DC 00021040 */  sll       $v0, $v0, 1
/* 33B460 E00262E0 44826000 */  mtc1      $v0, $f12
/* 33B464 E00262E4 00000000 */  nop
/* 33B468 E00262E8 0C080140 */  jal       shim_sin_deg
/* 33B46C E00262EC 46806320 */   cvt.s.w  $f12, $f12
/* 33B470 E00262F0 3C01E002 */  lui       $at, (0xE0026A40 >> 16)
/* 33B474 E00262F4 D4226A40 */  ldc1      $f2, (0xE0026A40 & 0xFFFF)($at)
/* 33B478 E00262F8 46000021 */  cvt.d.s   $f0, $f0
/* 33B47C E00262FC 46220002 */  mul.d     $f0, $f0, $f2
/* 33B480 E0026300 00000000 */  nop
/* 33B484 E0026304 C6020020 */  lwc1      $f2, 0x20($s0)
/* 33B488 E0026308 460010A1 */  cvt.d.s   $f2, $f2
/* 33B48C E002630C 46220002 */  mul.d     $f0, $f0, $f2
/* 33B490 E0026310 00000000 */  nop
/* 33B494 E0026314 C604001C */  lwc1      $f4, 0x1C($s0)
/* 33B498 E0026318 46201080 */  add.d     $f2, $f2, $f0
/* 33B49C E002631C 46002121 */  cvt.d.s   $f4, $f4
/* 33B4A0 E0026320 46241081 */  sub.d     $f2, $f2, $f4
/* 33B4A4 E0026324 3C01E002 */  lui       $at, (0xE0026A48 >> 16)
/* 33B4A8 E0026328 D4206A48 */  ldc1      $f0, (0xE0026A48 & 0xFFFF)($at)
.LE002632C:
/* 33B4AC E002632C 46201082 */  mul.d     $f2, $f2, $f0
/* 33B4B0 E0026330 00000000 */  nop
/* 33B4B4 E0026334 46222100 */  add.d     $f4, $f4, $f2
/* 33B4B8 E0026338 46202120 */  cvt.s.d   $f4, $f4
/* 33B4BC E002633C E604001C */  swc1      $f4, 0x1C($s0)
/* 33B4C0 E0026340 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 33B4C4 E0026344 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 33B4C8 E0026348 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 33B4CC E002634C 4481A000 */  mtc1      $at, $f20
/* 33B4D0 E0026350 27A20028 */  addiu     $v0, $sp, 0x28
/* 33B4D4 E0026354 AFA20014 */  sw        $v0, 0x14($sp)
/* 33B4D8 E0026358 27A2002C */  addiu     $v0, $sp, 0x2C
/* 33B4DC E002635C AFA20018 */  sw        $v0, 0x18($sp)
/* 33B4E0 E0026360 27A20030 */  addiu     $v0, $sp, 0x30
/* 33B4E4 E0026364 AFA2001C */  sw        $v0, 0x1C($sp)
/* 33B4E8 E0026368 27A20034 */  addiu     $v0, $sp, 0x34
/* 33B4EC E002636C AFA20020 */  sw        $v0, 0x20($sp)
/* 33B4F0 E0026370 00032080 */  sll       $a0, $v1, 2
/* 33B4F4 E0026374 00832021 */  addu      $a0, $a0, $v1
/* 33B4F8 E0026378 00042080 */  sll       $a0, $a0, 2
/* 33B4FC E002637C 00832023 */  subu      $a0, $a0, $v1
/* 33B500 E0026380 000410C0 */  sll       $v0, $a0, 3
/* 33B504 E0026384 00822021 */  addu      $a0, $a0, $v0
/* 33B508 E0026388 000420C0 */  sll       $a0, $a0, 3
/* 33B50C E002638C 3C02800B */  lui       $v0, %hi(gCameras + 0xD4)
/* 33B510 E0026390 24421E54 */  addiu     $v0, $v0, %lo(gCameras + 0xD4)
/* 33B514 E0026394 E7B40010 */  swc1      $f20, 0x10($sp)
/* 33B518 E0026398 8E050004 */  lw        $a1, 0x4($s0)
/* 33B51C E002639C 8E060008 */  lw        $a2, 0x8($s0)
/* 33B520 E00263A0 8E07000C */  lw        $a3, 0xC($s0)
/* 33B524 E00263A4 0C080168 */  jal       shim_transform_point
/* 33B528 E00263A8 00822021 */   addu     $a0, $a0, $v0
/* 33B52C E00263AC C7A00034 */  lwc1      $f0, 0x34($sp)
/* 33B530 E00263B0 C7A40028 */  lwc1      $f4, 0x28($sp)
/* 33B534 E00263B4 4600A503 */  div.s     $f20, $f20, $f0
/* 33B538 E00263B8 46142102 */  mul.s     $f4, $f4, $f20
/* 33B53C E00263BC 00000000 */  nop
/* 33B540 E00263C0 C7A0002C */  lwc1      $f0, 0x2C($sp)
/* 33B544 E00263C4 46140002 */  mul.s     $f0, $f0, $f20
/* 33B548 E00263C8 00000000 */  nop
/* 33B54C E00263CC C7A20030 */  lwc1      $f2, 0x30($sp)
/* 33B550 E00263D0 46141082 */  mul.s     $f2, $f2, $f20
/* 33B554 E00263D4 00000000 */  nop
/* 33B558 E00263D8 AE000018 */  sw        $zero, 0x18($s0)
/* 33B55C E00263DC E6040010 */  swc1      $f4, 0x10($s0)
/* 33B560 E00263E0 E6000014 */  swc1      $f0, 0x14($s0)
/* 33B564 E00263E4 8E220008 */  lw        $v0, 0x8($s1)
/* 33B568 E00263E8 0000382D */  daddu     $a3, $zero, $zero
/* 33B56C E00263EC E7B40034 */  swc1      $f20, 0x34($sp)
/* 33B570 E00263F0 E7A40028 */  swc1      $f4, 0x28($sp)
/* 33B574 E00263F4 E7A0002C */  swc1      $f0, 0x2C($sp)
/* 33B578 E00263F8 18400027 */  blez      $v0, .LE0026498
/* 33B57C E00263FC E7A20030 */   swc1     $f2, 0x30($sp)
/* 33B580 E0026400 26060048 */  addiu     $a2, $s0, 0x48
.LE0026404:
/* 33B584 E0026404 8CC2FFE8 */  lw        $v0, -0x18($a2)
/* 33B588 E0026408 8CC3FFEC */  lw        $v1, -0x14($a2)
/* 33B58C E002640C 8CC4FFF4 */  lw        $a0, -0xC($a2)
/* 33B590 E0026410 8CC5FFFC */  lw        $a1, -0x4($a2)
/* 33B594 E0026414 C4C40010 */  lwc1      $f4, 0x10($a2)
/* 33B598 E0026418 C4C00014 */  lwc1      $f0, 0x14($a2)
/* 33B59C E002641C C4C2000C */  lwc1      $f2, 0xC($a2)
/* 33B5A0 E0026420 00431021 */  addu      $v0, $v0, $v1
/* 33B5A4 E0026424 8CC3FFF8 */  lw        $v1, -0x8($a2)
/* 33B5A8 E0026428 46002100 */  add.s     $f4, $f4, $f0
/* 33B5AC E002642C ACC2FFE8 */  sw        $v0, -0x18($a2)
/* 33B5B0 E0026430 8CC2FFF0 */  lw        $v0, -0x10($a2)
/* 33B5B4 E0026434 00651821 */  addu      $v1, $v1, $a1
/* 33B5B8 E0026438 ACC3FFF8 */  sw        $v1, -0x8($a2)
/* 33B5BC E002643C 8CC30000 */  lw        $v1, 0x0($a2)
/* 33B5C0 E0026440 00441021 */  addu      $v0, $v0, $a0
/* 33B5C4 E0026444 ACC2FFF0 */  sw        $v0, -0x10($a2)
/* 33B5C8 E0026448 8CC20004 */  lw        $v0, 0x4($a2)
/* 33B5CC E002644C C4C00008 */  lwc1      $f0, 0x8($a2)
/* 33B5D0 E0026450 00621821 */  addu      $v1, $v1, $v0
/* 33B5D4 E0026454 8CC2FFF8 */  lw        $v0, -0x8($a2)
/* 33B5D8 E0026458 46020000 */  add.s     $f0, $f0, $f2
/* 33B5DC E002645C ACC30000 */  sw        $v1, 0x0($a2)
/* 33B5E0 E0026460 E4C40010 */  swc1      $f4, 0x10($a2)
/* 33B5E4 E0026464 04410003 */  bgez      $v0, .LE0026474
/* 33B5E8 E0026468 E4C00008 */   swc1     $f0, 0x8($a2)
/* 33B5EC E002646C 24420100 */  addiu     $v0, $v0, 0x100
/* 33B5F0 E0026470 ACC2FFF8 */  sw        $v0, -0x8($a2)
.LE0026474:
/* 33B5F4 E0026474 8CC20000 */  lw        $v0, 0x0($a2)
/* 33B5F8 E0026478 04410003 */  bgez      $v0, .LE0026488
/* 33B5FC E002647C 24E70001 */   addiu    $a3, $a3, 0x1
/* 33B600 E0026480 24420100 */  addiu     $v0, $v0, 0x100
/* 33B604 E0026484 ACC20000 */  sw        $v0, 0x0($a2)
.LE0026488:
/* 33B608 E0026488 8E220008 */  lw        $v0, 0x8($s1)
/* 33B60C E002648C 00E2102A */  slt       $v0, $a3, $v0
/* 33B610 E0026490 1440FFDC */  bnez      $v0, .LE0026404
/* 33B614 E0026494 24C60060 */   addiu    $a2, $a2, 0x60
.LE0026498:
/* 33B618 E0026498 8FBF0040 */  lw        $ra, 0x40($sp)
/* 33B61C E002649C 8FB1003C */  lw        $s1, 0x3C($sp)
/* 33B620 E00264A0 8FB00038 */  lw        $s0, 0x38($sp)
/* 33B624 E00264A4 D7B40048 */  ldc1      $f20, 0x48($sp)
/* 33B628 E00264A8 03E00008 */  jr        $ra
/* 33B62C E00264AC 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void gather_energy_pink_update(EffectInstance* effect) {
    GatherEnergyPinkFXData* part = effect->data.gatherEnergyPink;
    s32 unk_28;
    s32 unk_2C;
    f32 sp28;
    f32 sp2C;
    f32 sp30;
    f32 sp34;
    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;

    if (unk_2C < 11) {
        part->unk_24 = (unk_2C * 255) / 10;
    }

    if (unk_28 < 6) {
        part->unk_24 = (unk_28 * 255) / 6;
    }

    if (unk_28 < 10 && part->unk_00 == 0) {
        part->unk_1C *= 0.7;
    }

    if (part->unk_00 == 1) {
        part->unk_1C += (part->unk_20 + shim_sin_deg(unk_28 * 10) * 0.1 * part->unk_20 - part->unk_1C) * 0.4;
    } else {
        part->unk_1C += (part->unk_20 + shim_sin_deg(unk_28 * 10) * 0.1 * part->unk_20 - part->unk_1C) * 0.3;
    }

    shim_transform_point(&gCameras[gCurrentCameraID].perspectiveMatrix[0], part->posA.x, part->posA.y, part->posA.z, 1.0f, &sp28, &sp2C, &sp30, &sp34);

    sp34 = 1.0f / sp34;
    sp28 *= sp34;
    sp2C *= sp34;
    sp30 *= sp34;

    part->posB.x = sp28;
    part->posB.y = sp2C;
    part->posB.z = 0;

    for (i = 0; i < effect->numParts; i++, part++) {
        part->unk_30 += part->unk_34;
        part->unk_38 += part->unk_3C;
        part->unk_40 += part->unk_44;
        part->unk_48 += part->unk_4C;
        part->unk_58 += part->unk_5C;
        part->unk_50 += part->unk_54;
        if (part->unk_40 < 0) {
            part->unk_40 += 256;
        }
        if (part->unk_48 < 0) {
            part->unk_48 += 256;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel entity_base_block_update_slow_sinking
/* 104BF0 802E3370 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 104BF4 802E3374 AFB00010 */  sw        $s0, 0x10($sp)
/* 104BF8 802E3378 0080802D */  daddu     $s0, $a0, $zero
/* 104BFC 802E337C 3C058011 */  lui       $a1, %hi(gPlayerStatus)
/* 104C00 802E3380 24A5EFC8 */  addiu     $a1, $a1, %lo(gPlayerStatus)
/* 104C04 802E3384 AFB20018 */  sw        $s2, 0x18($sp)
/* 104C08 802E3388 AFBF001C */  sw        $ra, 0x1C($sp)
/* 104C0C 802E338C AFB10014 */  sw        $s1, 0x14($sp)
/* 104C10 802E3390 9202000B */  lbu       $v0, 0xB($s0)
/* 104C14 802E3394 8E110040 */  lw        $s1, 0x40($s0)
/* 104C18 802E3398 2C4200FF */  sltiu     $v0, $v0, 0xFF
/* 104C1C 802E339C 10400003 */  beqz      $v0, .L802E33AC
/* 104C20 802E33A0 00A0902D */   daddu    $s2, $a1, $zero
/* 104C24 802E33A4 080B8D29 */  j         .L802E34A4
/* 104C28 802E33A8 3C03FFDF */   lui      $v1, (0xFFDFFFFF >> 16)
.L802E33AC:
/* 104C2C 802E33AC 8624000E */  lh        $a0, 0xE($s1)
/* 104C30 802E33B0 9623000E */  lhu       $v1, 0xE($s1)
/* 104C34 802E33B4 30828000 */  andi      $v0, $a0, 0x8000
/* 104C38 802E33B8 1440003F */  bnez      $v0, .L802E34B8
/* 104C3C 802E33BC 28820096 */   slti     $v0, $a0, 0x96
/* 104C40 802E33C0 1440009C */  bnez      $v0, .L802E3634
/* 104C44 802E33C4 24620001 */   addiu    $v0, $v1, 0x1
/* 104C48 802E33C8 C6220014 */  lwc1      $f2, 0x14($s1)
/* 104C4C 802E33CC 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 104C50 802E33D0 44810000 */  mtc1      $at, $f0
/* 104C54 802E33D4 00000000 */  nop
/* 104C58 802E33D8 46001001 */  sub.s     $f0, $f2, $f0
/* 104C5C 802E33DC C604004C */  lwc1      $f4, 0x4C($s0)
/* 104C60 802E33E0 4600203C */  c.lt.s    $f4, $f0
/* 104C64 802E33E4 00000000 */  nop
/* 104C68 802E33E8 4502000A */  bc1fl     .L802E3414
/* 104C6C 802E33EC 46041081 */   sub.s    $f2, $f2, $f4
/* 104C70 802E33F0 46022001 */  sub.s     $f0, $f4, $f2
/* 104C74 802E33F4 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 104C78 802E33F8 44811000 */  mtc1      $at, $f2
/* 104C7C 802E33FC 00000000 */  nop
/* 104C80 802E3400 46020000 */  add.s     $f0, $f0, $f2
/* 104C84 802E3404 3C013E00 */  lui       $at, (0x3E000000 >> 16)
/* 104C88 802E3408 44811000 */  mtc1      $at, $f2
/* 104C8C 802E340C 080B8D08 */  j         .L802E3420
/* 104C90 802E3410 00000000 */   nop
.L802E3414:
/* 104C94 802E3414 3C013E00 */  lui       $at, (0x3E000000 >> 16)
/* 104C98 802E3418 44810000 */  mtc1      $at, $f0
/* 104C9C 802E341C 00000000 */  nop
.L802E3420:
/* 104CA0 802E3420 46001102 */  mul.s     $f4, $f2, $f0
/* 104CA4 802E3424 00000000 */  nop
/* 104CA8 802E3428 3C01802F */  lui       $at, %hi(D_802EB1F0)
/* 104CAC 802E342C D422B1F0 */  ldc1      $f2, %lo(D_802EB1F0)($at)
/* 104CB0 802E3430 46002021 */  cvt.d.s   $f0, $f4
/* 104CB4 802E3434 4620103C */  c.lt.d    $f2, $f0
/* 104CB8 802E3438 00000000 */  nop
/* 104CBC 802E343C 45000004 */  bc1f      .L802E3450
/* 104CC0 802E3440 00000000 */   nop
/* 104CC4 802E3444 3C013F99 */  lui       $at, (0x3F99999A >> 16)
/* 104CC8 802E3448 3421999A */  ori       $at, $at, (0x3F99999A & 0xFFFF)
/* 104CCC 802E344C 44812000 */  mtc1      $at, $f4
.L802E3450:
/* 104CD0 802E3450 3C01802F */  lui       $at, %hi(D_802EB1F8)
/* 104CD4 802E3454 D422B1F8 */  ldc1      $f2, %lo(D_802EB1F8)($at)
/* 104CD8 802E3458 46002021 */  cvt.d.s   $f0, $f4
/* 104CDC 802E345C 4622003C */  c.lt.d    $f0, $f2
/* 104CE0 802E3460 00000000 */  nop
/* 104CE4 802E3464 45000004 */  bc1f      .L802E3478
/* 104CE8 802E3468 00000000 */   nop
/* 104CEC 802E346C 3C013E99 */  lui       $at, (0x3E99999A >> 16)
/* 104CF0 802E3470 3421999A */  ori       $at, $at, (0x3E99999A & 0xFFFF)
/* 104CF4 802E3474 44812000 */  mtc1      $at, $f4
.L802E3478:
/* 104CF8 802E3478 C600004C */  lwc1      $f0, 0x4C($s0)
/* 104CFC 802E347C 46040000 */  add.s     $f0, $f0, $f4
/* 104D00 802E3480 E600004C */  swc1      $f0, 0x4C($s0)
/* 104D04 802E3484 C6220014 */  lwc1      $f2, 0x14($s1)
/* 104D08 802E3488 4600103C */  c.lt.s    $f2, $f0
/* 104D0C 802E348C 00000000 */  nop
/* 104D10 802E3490 45000069 */  bc1f      .L802E3638
/* 104D14 802E3494 3C03FFDF */   lui      $v1, (0xFFDFFFFF >> 16)
/* 104D18 802E3498 2402FFFF */  addiu     $v0, $zero, -0x1
/* 104D1C 802E349C E602004C */  swc1      $f2, 0x4C($s0)
/* 104D20 802E34A0 A622000E */  sh        $v0, 0xE($s1)
.L802E34A4:
/* 104D24 802E34A4 8E020000 */  lw        $v0, 0x0($s0)
/* 104D28 802E34A8 3463FFFF */  ori       $v1, $v1, (0xFFDFFFFF & 0xFFFF)
/* 104D2C 802E34AC 00431024 */  and       $v0, $v0, $v1
/* 104D30 802E34B0 080B8D8E */  j         .L802E3638
/* 104D34 802E34B4 AE020000 */   sw       $v0, 0x0($s0)
.L802E34B8:
/* 104D38 802E34B8 92020006 */  lbu       $v0, 0x6($s0)
/* 104D3C 802E34BC 30420004 */  andi      $v0, $v0, 0x4
/* 104D40 802E34C0 10400014 */  beqz      $v0, .L802E3514
/* 104D44 802E34C4 00000000 */   nop
/* 104D48 802E34C8 8CA20000 */  lw        $v0, 0x0($a1)
/* 104D4C 802E34CC 30420002 */  andi      $v0, $v0, 0x2
/* 104D50 802E34D0 14400058 */  bnez      $v0, .L802E3634
/* 104D54 802E34D4 24020001 */   addiu    $v0, $zero, 0x1
/* 104D58 802E34D8 86040016 */  lh        $a0, 0x16($s0)
/* 104D5C 802E34DC 0C044181 */  jal       get_shadow_by_index
/* 104D60 802E34E0 00000000 */   nop
/* 104D64 802E34E4 10400017 */  beqz      $v0, .L802E3544
/* 104D68 802E34E8 00000000 */   nop
/* 104D6C 802E34EC C600004C */  lwc1      $f0, 0x4C($s0)
/* 104D70 802E34F0 C4420014 */  lwc1      $f2, 0x14($v0)
/* 104D74 802E34F4 46020081 */  sub.s     $f2, $f0, $f2
/* 104D78 802E34F8 864200B0 */  lh        $v0, 0xB0($s2)
/* 104D7C 802E34FC 46020001 */  sub.s     $f0, $f0, $f2
/* 104D80 802E3500 24420001 */  addiu     $v0, $v0, 0x1
/* 104D84 802E3504 44821000 */  mtc1      $v0, $f2
/* 104D88 802E3508 00000000 */  nop
/* 104D8C 802E350C 080B8D4B */  j         .L802E352C
/* 104D90 802E3510 468010A0 */   cvt.s.w  $f2, $f2
.L802E3514:
/* 104D94 802E3514 0C044181 */  jal       get_shadow_by_index
/* 104D98 802E3518 86040016 */   lh       $a0, 0x16($s0)
/* 104D9C 802E351C 10400009 */  beqz      $v0, .L802E3544
/* 104DA0 802E3520 00000000 */   nop
/* 104DA4 802E3524 C600004C */  lwc1      $f0, 0x4C($s0)
/* 104DA8 802E3528 C4420014 */  lwc1      $f2, 0x14($v0)
.L802E352C:
/* 104DAC 802E352C 4602003E */  c.le.s    $f0, $f2
/* 104DB0 802E3530 00000000 */  nop
/* 104DB4 802E3534 45000003 */  bc1f      .L802E3544
/* 104DB8 802E3538 24020001 */   addiu    $v0, $zero, 0x1
/* 104DBC 802E353C E602004C */  swc1      $f2, 0x4C($s0)
/* 104DC0 802E3540 A622000E */  sh        $v0, 0xE($s1)
.L802E3544:
/* 104DC4 802E3544 92020006 */  lbu       $v0, 0x6($s0)
/* 104DC8 802E3548 30420004 */  andi      $v0, $v0, 0x4
/* 104DCC 802E354C 14400039 */  bnez      $v0, .L802E3634
/* 104DD0 802E3550 24020001 */   addiu    $v0, $zero, 0x1
/* 104DD4 802E3554 C6220014 */  lwc1      $f2, 0x14($s1)
/* 104DD8 802E3558 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 104DDC 802E355C 44810000 */  mtc1      $at, $f0
/* 104DE0 802E3560 00000000 */  nop
/* 104DE4 802E3564 46001001 */  sub.s     $f0, $f2, $f0
/* 104DE8 802E3568 C604004C */  lwc1      $f4, 0x4C($s0)
/* 104DEC 802E356C 4600203C */  c.lt.s    $f4, $f0
/* 104DF0 802E3570 00000000 */  nop
/* 104DF4 802E3574 4502000A */  bc1fl     .L802E35A0
/* 104DF8 802E3578 46041081 */   sub.s    $f2, $f2, $f4
/* 104DFC 802E357C 46022001 */  sub.s     $f0, $f4, $f2
/* 104E00 802E3580 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 104E04 802E3584 44811000 */  mtc1      $at, $f2
/* 104E08 802E3588 00000000 */  nop
/* 104E0C 802E358C 46020000 */  add.s     $f0, $f0, $f2
/* 104E10 802E3590 3C013E00 */  lui       $at, (0x3E000000 >> 16)
/* 104E14 802E3594 44811000 */  mtc1      $at, $f2
/* 104E18 802E3598 080B8D6B */  j         .L802E35AC
/* 104E1C 802E359C 00000000 */   nop
.L802E35A0:
/* 104E20 802E35A0 3C013E00 */  lui       $at, (0x3E000000 >> 16)
/* 104E24 802E35A4 44810000 */  mtc1      $at, $f0
/* 104E28 802E35A8 00000000 */  nop
.L802E35AC:
/* 104E2C 802E35AC 46001102 */  mul.s     $f4, $f2, $f0
/* 104E30 802E35B0 00000000 */  nop
/* 104E34 802E35B4 3C01802F */  lui       $at, %hi(D_802EB200)
/* 104E38 802E35B8 D422B200 */  ldc1      $f2, %lo(D_802EB200)($at)
/* 104E3C 802E35BC 46002021 */  cvt.d.s   $f0, $f4
/* 104E40 802E35C0 4620103C */  c.lt.d    $f2, $f0
/* 104E44 802E35C4 00000000 */  nop
/* 104E48 802E35C8 45000004 */  bc1f      .L802E35DC
/* 104E4C 802E35CC 00000000 */   nop
/* 104E50 802E35D0 3C013F99 */  lui       $at, (0x3F99999A >> 16)
/* 104E54 802E35D4 3421999A */  ori       $at, $at, (0x3F99999A & 0xFFFF)
/* 104E58 802E35D8 44812000 */  mtc1      $at, $f4
.L802E35DC:
/* 104E5C 802E35DC 3C01802F */  lui       $at, %hi(D_802EB208)
/* 104E60 802E35E0 D422B208 */  ldc1      $f2, %lo(D_802EB208)($at)
/* 104E64 802E35E4 46002021 */  cvt.d.s   $f0, $f4
/* 104E68 802E35E8 4622003C */  c.lt.d    $f0, $f2
/* 104E6C 802E35EC 00000000 */  nop
/* 104E70 802E35F0 45000004 */  bc1f      .L802E3604
/* 104E74 802E35F4 00000000 */   nop
/* 104E78 802E35F8 3C013E99 */  lui       $at, (0x3E99999A >> 16)
/* 104E7C 802E35FC 3421999A */  ori       $at, $at, (0x3E99999A & 0xFFFF)
/* 104E80 802E3600 44812000 */  mtc1      $at, $f4
.L802E3604:
/* 104E84 802E3604 C600004C */  lwc1      $f0, 0x4C($s0)
/* 104E88 802E3608 46040001 */  sub.s     $f0, $f0, $f4
/* 104E8C 802E360C 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 104E90 802E3610 44811000 */  mtc1      $at, $f2
/* 104E94 802E3614 E600004C */  swc1      $f0, 0x4C($s0)
/* 104E98 802E3618 C6240014 */  lwc1      $f4, 0x14($s1)
/* 104E9C 802E361C 46022101 */  sub.s     $f4, $f4, $f2
/* 104EA0 802E3620 4604003C */  c.lt.s    $f0, $f4
/* 104EA4 802E3624 00000000 */  nop
/* 104EA8 802E3628 45000003 */  bc1f      .L802E3638
/* 104EAC 802E362C 24020001 */   addiu    $v0, $zero, 0x1
/* 104EB0 802E3630 E604004C */  swc1      $f4, 0x4C($s0)
.L802E3634:
/* 104EB4 802E3634 A622000E */  sh        $v0, 0xE($s1)
.L802E3638:
/* 104EB8 802E3638 8FBF001C */  lw        $ra, 0x1C($sp)
/* 104EBC 802E363C 8FB20018 */  lw        $s2, 0x18($sp)
/* 104EC0 802E3640 8FB10014 */  lw        $s1, 0x14($sp)
/* 104EC4 802E3644 8FB00010 */  lw        $s0, 0x10($sp)
/* 104EC8 802E3648 03E00008 */  jr        $ra
/* 104ECC 802E364C 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void entity_base_block_update_slow_sinking(Entity* entity) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    BlockData* data = entity->dataBuf.block;
    f32 deltaY;

    if (entity->alpha < 255) {
        entity->flags &= ~ENTITY_FLAG_200000;
        return;
    }

    if (!(data->sinkingTimer & 0x8000)) {
        if (data->sinkingTimer < 150) {
            data->sinkingTimer++;
            return;
        }

        if (entity->position.y < data->initialY - 25.0f) {
            deltaY = (entity->position.y - data->initialY + 50.0f) * 0.125f;
        } else {
            deltaY = (data->initialY - entity->position.y) * 0.125f;
        }

        if (deltaY > 1.2) {
            deltaY = 1.2f;
        }
        if (deltaY < 0.3) {
            deltaY = 0.3f;
        }

        entity->position.y += deltaY;

        if (data->initialY < entity->position.y) {
            entity->position.y = data->initialY;
            data->sinkingTimer = -1;
            entity->flags &= ~ENTITY_FLAG_200000;
        }
    } else {
        if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_CEILING) {
            if (!(playerStatus->flags & PS_FLAG_JUMPING)) {
                Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
                if (shadow != NULL) {
                    f32 temp2 = entity->position.y - shadow->position.y;

                    if (entity->position.y - temp2 <= playerStatus->colliderHeight + 1) {
                        entity->position.y = playerStatus->colliderHeight + 1;
                        data->sinkingTimer = 1;
                    }
                }
            } else {
                data->sinkingTimer = 1;
                return;
            }
            do {} while (0); // needed to match
        } else {
            Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
            if (shadow != NULL) {
                if (entity->position.y <= shadow->position.y) {
                    entity->position.y = shadow->position.y;
                    data->sinkingTimer = 1;
                }
            }
        }

        if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_CEILING) {
            data->sinkingTimer = 1;
            return;
        }

        if (entity->position.y < data->initialY - 25.0f) {
            deltaY = (entity->position.y - data->initialY + 50.0f) * 0.125f;
        } else {
            deltaY = (data->initialY - entity->position.y) * 0.125f;
        }

        if (deltaY > 1.2) {
            deltaY = 1.2f;
        }
        if (deltaY < 0.3) {
            deltaY = 0.3f;
        }

        entity->position.y -= deltaY;

        if (entity->position.y < data->initialY - 50.0f) {
            entity->position.y = data->initialY - 50.0f;
            data->sinkingTimer = 1;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel lil_oink_appendGfx
/* 3FEE68 E0114388 27BDFF70 */  addiu     $sp, $sp, -0x90
/* 3FEE6C E011438C 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 3FEE70 E0114390 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 3FEE74 E0114394 3C08DC08 */  lui       $t0, (0xDC08000A >> 16)
/* 3FEE78 E0114398 3508000A */  ori       $t0, $t0, (0xDC08000A & 0xFFFF)
/* 3FEE7C E011439C 3C09DC08 */  lui       $t1, (0xDC08030A >> 16)
/* 3FEE80 E01143A0 3529030A */  ori       $t1, $t1, (0xDC08030A & 0xFFFF)
/* 3FEE84 E01143A4 AFB3006C */  sw        $s3, 0x6C($sp)
/* 3FEE88 E01143A8 0000982D */  daddu     $s3, $zero, $zero
/* 3FEE8C E01143AC 3C02800A */  lui       $v0, %hi(gDisplayContext)
/* 3FEE90 E01143B0 2442A674 */  addiu     $v0, $v0, %lo(gDisplayContext)
/* 3FEE94 E01143B4 AFBE0080 */  sw        $fp, 0x80($sp)
/* 3FEE98 E01143B8 0040F02D */  daddu     $fp, $v0, $zero
/* 3FEE9C E01143BC AFB7007C */  sw        $s7, 0x7C($sp)
/* 3FEEA0 E01143C0 3C178007 */  lui       $s7, %hi(gMatrixListPos)
/* 3FEEA4 E01143C4 26F741F0 */  addiu     $s7, $s7, %lo(gMatrixListPos)
/* 3FEEA8 E01143C8 AFB60078 */  sw        $s6, 0x78($sp)
/* 3FEEAC E01143CC 3C160001 */  lui       $s6, (0x11630 >> 16)
/* 3FEEB0 E01143D0 36D61630 */  ori       $s6, $s6, (0x11630 & 0xFFFF)
/* 3FEEB4 E01143D4 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 3FEEB8 E01143D8 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 3FEEBC E01143DC AFB20068 */  sw        $s2, 0x68($sp)
/* 3FEEC0 E01143E0 0040902D */  daddu     $s2, $v0, $zero
/* 3FEEC4 E01143E4 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3FEEC8 E01143E8 AFBF0084 */  sw        $ra, 0x84($sp)
/* 3FEECC E01143EC AFB50074 */  sw        $s5, 0x74($sp)
/* 3FEED0 E01143F0 AFB40070 */  sw        $s4, 0x70($sp)
/* 3FEED4 E01143F4 AFB10064 */  sw        $s1, 0x64($sp)
/* 3FEED8 E01143F8 AFB00060 */  sw        $s0, 0x60($sp)
/* 3FEEDC E01143FC F7B40088 */  sdc1      $f20, 0x88($sp)
/* 3FEEE0 E0114400 8E430000 */  lw        $v1, 0x0($s2)
/* 3FEEE4 E0114404 4480A000 */  mtc1      $zero, $f20
/* 3FEEE8 E0114408 8C95000C */  lw        $s5, 0xC($a0)
/* 3FEEEC E011440C 0060282D */  daddu     $a1, $v1, $zero
/* 3FEEF0 E0114410 24630008 */  addiu     $v1, $v1, 0x8
/* 3FEEF4 E0114414 AE430000 */  sw        $v1, 0x0($s2)
/* 3FEEF8 E0114418 8EA60004 */  lw        $a2, 0x4($s5)
/* 3FEEFC E011441C 02A0882D */  daddu     $s1, $s5, $zero
/* 3FEF00 E0114420 ACA20000 */  sw        $v0, 0x0($a1)
/* 3FEF04 E0114424 24620008 */  addiu     $v0, $v1, 0x8
/* 3FEF08 E0114428 ACA00004 */  sw        $zero, 0x4($a1)
/* 3FEF0C E011442C AE420000 */  sw        $v0, 0x0($s2)
/* 3FEF10 E0114430 24620010 */  addiu     $v0, $v1, 0x10
/* 3FEF14 E0114434 AC670000 */  sw        $a3, 0x0($v1)
/* 3FEF18 E0114438 AE420000 */  sw        $v0, 0x0($s2)
/* 3FEF1C E011443C 24620018 */  addiu     $v0, $v1, 0x18
/* 3FEF20 E0114440 AE420000 */  sw        $v0, 0x0($s2)
/* 3FEF24 E0114444 24620020 */  addiu     $v0, $v1, 0x20
/* 3FEF28 E0114448 AE420000 */  sw        $v0, 0x0($s2)
/* 3FEF2C E011444C 8C840010 */  lw        $a0, 0x10($a0)
/* 3FEF30 E0114450 00061100 */  sll       $v0, $a2, 4
/* 3FEF34 E0114454 00461023 */  subu      $v0, $v0, $a2
/* 3FEF38 E0114458 0002A040 */  sll       $s4, $v0, 1
/* 3FEF3C E011445C 8C85001C */  lw        $a1, 0x1C($a0)
/* 3FEF40 E0114460 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3FEF44 E0114464 AC620008 */  sw        $v0, 0x8($v1)
/* 3FEF48 E0114468 8FC40000 */  lw        $a0, 0x0($fp)
/* 3FEF4C E011446C 3C020900 */  lui       $v0, %hi(D_09002D70_410000)
/* 3FEF50 E0114470 24422D70 */  addiu     $v0, $v0, %lo(D_09002D70_410000)
/* 3FEF54 E0114474 AC62000C */  sw        $v0, 0xC($v1)
/* 3FEF58 E0114478 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 3FEF5C E011447C AC680010 */  sw        $t0, 0x10($v1)
/* 3FEF60 E0114480 AC690018 */  sw        $t1, 0x18($v1)
/* 3FEF64 E0114484 AC640014 */  sw        $a0, 0x14($v1)
/* 3FEF68 E0114488 24840010 */  addiu     $a0, $a0, 0x10
/* 3FEF6C E011448C 00A22821 */  addu      $a1, $a1, $v0
/* 3FEF70 E0114490 AC64001C */  sw        $a0, 0x1C($v1)
/* 3FEF74 E0114494 AC650004 */  sw        $a1, 0x4($v1)
.LE0114498:
/* 3FEF78 E0114498 8E220008 */  lw        $v0, 0x8($s1)
/* 3FEF7C E011449C 30420001 */  andi      $v0, $v0, 0x1
/* 3FEF80 E01144A0 1040006D */  beqz      $v0, .LE0114658
/* 3FEF84 E01144A4 27A40020 */   addiu    $a0, $sp, 0x20
/* 3FEF88 E01144A8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3FEF8C E01144AC 44810000 */  mtc1      $at, $f0
/* 3FEF90 E01144B0 C62400B8 */  lwc1      $f4, 0xB8($s1)
/* 3FEF94 E01144B4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 3FEF98 E01144B8 C6200034 */  lwc1      $f0, 0x34($s1)
/* 3FEF9C E01144BC E7A00014 */  swc1      $f0, 0x14($sp)
/* 3FEFA0 E01144C0 C6200060 */  lwc1      $f0, 0x60($s1)
/* 3FEFA4 E01144C4 C6220110 */  lwc1      $f2, 0x110($s1)
/* 3FEFA8 E01144C8 4405A000 */  mfc1      $a1, $f20
/* 3FEFAC E01144CC 46020000 */  add.s     $f0, $f0, $f2
/* 3FEFB0 E01144D0 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 3FEFB4 E01144D4 44811000 */  mtc1      $at, $f2
/* 3FEFB8 E01144D8 4407A000 */  mfc1      $a3, $f20
/* 3FEFBC E01144DC 46041081 */  sub.s     $f2, $f2, $f4
/* 3FEFC0 E01144E0 E7A00018 */  swc1      $f0, 0x18($sp)
/* 3FEFC4 E01144E4 C620008C */  lwc1      $f0, 0x8C($s1)
/* 3FEFC8 E01144E8 44061000 */  mfc1      $a2, $f2
/* 3FEFCC E01144EC 0C080180 */  jal       shim_guPositionF
/* 3FEFD0 E01144F0 E7A0001C */   swc1     $f0, 0x1C($sp)
/* 3FEFD4 E01144F4 27A40020 */  addiu     $a0, $sp, 0x20
/* 3FEFD8 E01144F8 96E50000 */  lhu       $a1, 0x0($s7)
/* 3FEFDC E01144FC 8FC20000 */  lw        $v0, 0x0($fp)
/* 3FEFE0 E0114500 00052980 */  sll       $a1, $a1, 6
/* 3FEFE4 E0114504 00B62821 */  addu      $a1, $a1, $s6
/* 3FEFE8 E0114508 0C080118 */  jal       shim_guMtxF2L
/* 3FEFEC E011450C 00452821 */   addu     $a1, $v0, $a1
/* 3FEFF0 E0114510 3C02DA38 */  lui       $v0, (0xDA380002 >> 16)
/* 3FEFF4 E0114514 34420002 */  ori       $v0, $v0, (0xDA380002 & 0xFFFF)
/* 3FEFF8 E0114518 02B38021 */  addu      $s0, $s5, $s3
/* 3FEFFC E011451C 8E440000 */  lw        $a0, 0x0($s2)
/* 3FF000 E0114520 96E30000 */  lhu       $v1, 0x0($s7)
/* 3FF004 E0114524 0080282D */  daddu     $a1, $a0, $zero
/* 3FF008 E0114528 24840008 */  addiu     $a0, $a0, 0x8
/* 3FF00C E011452C AE440000 */  sw        $a0, 0x0($s2)
/* 3FF010 E0114530 ACA20000 */  sw        $v0, 0x0($a1)
/* 3FF014 E0114534 24620001 */  addiu     $v0, $v1, 0x1
/* 3FF018 E0114538 3063FFFF */  andi      $v1, $v1, 0xFFFF
/* 3FF01C E011453C 00031980 */  sll       $v1, $v1, 6
/* 3FF020 E0114540 A6E20000 */  sh        $v0, 0x0($s7)
/* 3FF024 E0114544 8FC20000 */  lw        $v0, 0x0($fp)
/* 3FF028 E0114548 00761821 */  addu      $v1, $v1, $s6
/* 3FF02C E011454C 00431021 */  addu      $v0, $v0, $v1
/* 3FF030 E0114550 ACA20004 */  sw        $v0, 0x4($a1)
/* 3FF034 E0114554 24820008 */  addiu     $v0, $a0, 0x8
/* 3FF038 E0114558 3C0ADE00 */  lui       $t2, (0xDE000000 >> 16)
/* 3FF03C E011455C AE420000 */  sw        $v0, 0x0($s2)
/* 3FF040 E0114560 AC8A0000 */  sw        $t2, 0x0($a0)
/* 3FF044 E0114564 920200E4 */  lbu       $v0, 0xE4($s0)
/* 3FF048 E0114568 3C0AE011 */  lui       $t2, %hi(D_E0114718)
/* 3FF04C E011456C 254A4718 */  addiu     $t2, $t2, %lo(D_E0114718)
/* 3FF050 E0114570 00021080 */  sll       $v0, $v0, 2
/* 3FF054 E0114574 004A1021 */  addu      $v0, $v0, $t2
/* 3FF058 E0114578 8C420000 */  lw        $v0, 0x0($v0)
/* 3FF05C E011457C AC820004 */  sw        $v0, 0x4($a0)
/* 3FF060 E0114580 920200E4 */  lbu       $v0, 0xE4($s0)
/* 3FF064 E0114584 2442FFF8 */  addiu     $v0, $v0, -0x8
/* 3FF068 E0114588 2C420002 */  sltiu     $v0, $v0, 0x2
/* 3FF06C E011458C 1040001B */  beqz      $v0, .LE01145FC
/* 3FF070 E0114590 3C07D838 */   lui      $a3, (0xD8380002 >> 16)
/* 3FF074 E0114594 44946000 */  mtc1      $s4, $f12
/* 3FF078 E0114598 00000000 */  nop
/* 3FF07C E011459C 0C080140 */  jal       shim_sin_deg
/* 3FF080 E01145A0 46806320 */   cvt.s.w  $f12, $f12
/* 3FF084 E01145A4 3C01427C */  lui       $at, (0x427C0000 >> 16)
/* 3FF088 E01145A8 44811000 */  mtc1      $at, $f2
/* 3FF08C E01145AC 8E420000 */  lw        $v0, 0x0($s2)
/* 3FF090 E01145B0 46020002 */  mul.s     $f0, $f0, $f2
/* 3FF094 E01145B4 00000000 */  nop
/* 3FF098 E01145B8 0040282D */  daddu     $a1, $v0, $zero
/* 3FF09C E01145BC 24420008 */  addiu     $v0, $v0, 0x8
/* 3FF0A0 E01145C0 AE420000 */  sw        $v0, 0x0($s2)
/* 3FF0A4 E01145C4 46020000 */  add.s     $f0, $f0, $f2
/* 3FF0A8 E01145C8 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3FF0AC E01145CC ACA20000 */  sw        $v0, 0x0($a1)
/* 3FF0B0 E01145D0 4600018D */  trunc.w.s $f6, $f0
/* 3FF0B4 E01145D4 44023000 */  mfc1      $v0, $f6
/* 3FF0B8 E01145D8 00000000 */  nop
/* 3FF0BC E01145DC 304200FF */  andi      $v0, $v0, 0xFF
/* 3FF0C0 E01145E0 00022600 */  sll       $a0, $v0, 24
/* 3FF0C4 E01145E4 00021C00 */  sll       $v1, $v0, 16
/* 3FF0C8 E01145E8 00832025 */  or        $a0, $a0, $v1
/* 3FF0CC E01145EC 00021200 */  sll       $v0, $v0, 8
/* 3FF0D0 E01145F0 00822025 */  or        $a0, $a0, $v0
/* 3FF0D4 E01145F4 ACA40004 */  sw        $a0, 0x4($a1)
/* 3FF0D8 E01145F8 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
.LE01145FC:
/* 3FF0DC E01145FC 8E440000 */  lw        $a0, 0x0($s2)
/* 3FF0E0 E0114600 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* 3FF0E4 E0114604 0080302D */  daddu     $a2, $a0, $zero
/* 3FF0E8 E0114608 24840008 */  addiu     $a0, $a0, 0x8
/* 3FF0EC E011460C 3C0ADE00 */  lui       $t2, (0xDE000000 >> 16)
/* 3FF0F0 E0114610 AE440000 */  sw        $a0, 0x0($s2)
/* 3FF0F4 E0114614 ACCA0000 */  sw        $t2, 0x0($a2)
/* 3FF0F8 E0114618 3C0AE011 */  lui       $t2, %hi(D_E01146A0)
/* 3FF0FC E011461C 254A46A0 */  addiu     $t2, $t2, %lo(D_E01146A0)
/* 3FF100 E0114620 920500E4 */  lbu       $a1, 0xE4($s0)
/* 3FF104 E0114624 92030105 */  lbu       $v1, 0x105($s0)
/* 3FF108 E0114628 00051040 */  sll       $v0, $a1, 1
/* 3FF10C E011462C 00451021 */  addu      $v0, $v0, $a1
/* 3FF110 E0114630 00431021 */  addu      $v0, $v0, $v1
/* 3FF114 E0114634 00021080 */  sll       $v0, $v0, 2
/* 3FF118 E0114638 004A1021 */  addu      $v0, $v0, $t2
/* 3FF11C E011463C 8C430000 */  lw        $v1, 0x0($v0)
/* 3FF120 E0114640 24820008 */  addiu     $v0, $a0, 0x8
/* 3FF124 E0114644 AE420000 */  sw        $v0, 0x0($s2)
/* 3FF128 E0114648 24020040 */  addiu     $v0, $zero, 0x40
/* 3FF12C E011464C ACC30004 */  sw        $v1, 0x4($a2)
/* 3FF130 E0114650 AC870000 */  sw        $a3, 0x0($a0)
/* 3FF134 E0114654 AC820004 */  sw        $v0, 0x4($a0)
.LE0114658:
/* 3FF138 E0114658 26940014 */  addiu     $s4, $s4, 0x14
/* 3FF13C E011465C 26730001 */  addiu     $s3, $s3, 0x1
/* 3FF140 E0114660 2A62000B */  slti      $v0, $s3, 0xB
/* 3FF144 E0114664 1440FF8C */  bnez      $v0, .LE0114498
/* 3FF148 E0114668 26310004 */   addiu    $s1, $s1, 0x4
/* 3FF14C E011466C 8FBF0084 */  lw        $ra, 0x84($sp)
/* 3FF150 E0114670 8FBE0080 */  lw        $fp, 0x80($sp)
/* 3FF154 E0114674 8FB7007C */  lw        $s7, 0x7C($sp)
/* 3FF158 E0114678 8FB60078 */  lw        $s6, 0x78($sp)
/* 3FF15C E011467C 8FB50074 */  lw        $s5, 0x74($sp)
/* 3FF160 E0114680 8FB40070 */  lw        $s4, 0x70($sp)
/* 3FF164 E0114684 8FB3006C */  lw        $s3, 0x6C($sp)
/* 3FF168 E0114688 8FB20068 */  lw        $s2, 0x68($sp)
/* 3FF16C E011468C 8FB10064 */  lw        $s1, 0x64($sp)
/* 3FF170 E0114690 8FB00060 */  lw        $s0, 0x60($sp)
/* 3FF174 E0114694 D7B40088 */  ldc1      $f20, 0x88($sp)
/* 3FF178 E0114698 03E00008 */  jr        $ra
/* 3FF17C E011469C 27BD0090 */   addiu    $sp, $sp, 0x90

### DECOMPILED C INSTRUCTIONS:

void lil_oink_appendGfx(void* effect) {
    Matrix4f mtxTransform;
    EffectInstance* eff = effect;
    LilOinkFXData* data = eff->data.lilOink;
    s32 angle = data->lifetime * 30;
    s32 i;

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x9, VIRTUAL_TO_PHYSICAL(eff->graphics->data));

    gSPDisplayList(gMainGfxPos++, D_09002D70_401FC0);
    gSPLookAt(gMainGfxPos++, &gDisplayContext->lookAt);

    for (i = 0; i < MAX_LIL_OINKS; i++) {
        if (data->flags[i] & LIL_OINK_FLAG_VISIBLE) {
            shim_guPositionF(mtxTransform, 0.0f, 180.0f - data->rot[i], 0.0f, 1.0f,
                             data->x[i], data->y[i] + data->jumpOffset[i], data->z[i]);
            shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
                      G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
            gSPDisplayList(gMainGfxPos++, D_E0114718[data->type[i]]);
            if (data->type[i] == LIL_OINK_TYPE_SILVER || data->type[i] == LIL_OINK_TYPE_GOLD) {
                f32 shineVariation = shim_sin_deg(angle) * 63.0f;
                s8 primColor = shineVariation + 63.0f;

                gDPSetPrimColor(gMainGfxPos++, 0, 0, primColor, primColor, primColor, 0);
            }
            gSPDisplayList(gMainGfxPos++, lil_oink_FramesGfx[data->type[i]][data->gfxFrame[i]]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
        angle += 20;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel windy_leaves_main
/* 35DA00 E0056000 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 35DA04 E0056004 F7B40048 */  sdc1      $f20, 0x48($sp)
/* 35DA08 E0056008 4485A000 */  mtc1      $a1, $f20
/* 35DA0C E005600C AFB5003C */  sw        $s5, 0x3C($sp)
/* 35DA10 E0056010 0080A82D */  daddu     $s5, $a0, $zero
/* 35DA14 E0056014 F7B60050 */  sdc1      $f22, 0x50($sp)
/* 35DA18 E0056018 4486B000 */  mtc1      $a2, $f22
/* 35DA1C E005601C 27A40010 */  addiu     $a0, $sp, 0x10
/* 35DA20 E0056020 F7B80058 */  sdc1      $f24, 0x58($sp)
/* 35DA24 E0056024 4487C000 */  mtc1      $a3, $f24
/* 35DA28 E0056028 3C02E005 */  lui       $v0, %hi(windy_leaves_init)
/* 35DA2C E005602C 24426304 */  addiu     $v0, $v0, %lo(windy_leaves_init)
/* 35DA30 E0056030 AFA20018 */  sw        $v0, 0x18($sp)
/* 35DA34 E0056034 3C02E005 */  lui       $v0, %hi(windy_leaves_update)
/* 35DA38 E0056038 2442630C */  addiu     $v0, $v0, %lo(windy_leaves_update)
/* 35DA3C E005603C AFA2001C */  sw        $v0, 0x1C($sp)
/* 35DA40 E0056040 3C02E005 */  lui       $v0, %hi(windy_leaves_render)
/* 35DA44 E0056044 24426B8C */  addiu     $v0, $v0, %lo(windy_leaves_render)
/* 35DA48 E0056048 AFA20020 */  sw        $v0, 0x20($sp)
/* 35DA4C E005604C 2402002B */  addiu     $v0, $zero, 0x2B
/* 35DA50 E0056050 AFBF0044 */  sw        $ra, 0x44($sp)
/* 35DA54 E0056054 AFB60040 */  sw        $s6, 0x40($sp)
/* 35DA58 E0056058 AFB40038 */  sw        $s4, 0x38($sp)
/* 35DA5C E005605C AFB30034 */  sw        $s3, 0x34($sp)
/* 35DA60 E0056060 AFB20030 */  sw        $s2, 0x30($sp)
/* 35DA64 E0056064 AFB1002C */  sw        $s1, 0x2C($sp)
/* 35DA68 E0056068 AFB00028 */  sw        $s0, 0x28($sp)
/* 35DA6C E005606C AFA00010 */  sw        $zero, 0x10($sp)
/* 35DA70 E0056070 AFA00024 */  sw        $zero, 0x24($sp)
/* 35DA74 E0056074 0C080124 */  jal       shim_create_effect_instance
/* 35DA78 E0056078 AFA20014 */   sw       $v0, 0x14($sp)
/* 35DA7C E005607C 2404012C */  addiu     $a0, $zero, 0x12C
/* 35DA80 E0056080 24160005 */  addiu     $s6, $zero, 0x5
/* 35DA84 E0056084 0040802D */  daddu     $s0, $v0, $zero
/* 35DA88 E0056088 0C08012C */  jal       shim_general_heap_malloc
/* 35DA8C E005608C AE160008 */   sw       $s6, 0x8($s0)
/* 35DA90 E0056090 0040182D */  daddu     $v1, $v0, $zero
/* 35DA94 E0056094 14600003 */  bnez      $v1, .LE00560A4
/* 35DA98 E0056098 AE03000C */   sw       $v1, 0xC($s0)
.LE005609C:
/* 35DA9C E005609C 08015827 */  j         .LE005609C
/* 35DAA0 E00560A0 00000000 */   nop
.LE00560A4:
/* 35DAA4 E00560A4 24020064 */  addiu     $v0, $zero, 0x64
/* 35DAA8 E00560A8 AC750000 */  sw        $s5, 0x0($v1)
/* 35DAAC E00560AC E4740004 */  swc1      $f20, 0x4($v1)
/* 35DAB0 E00560B0 E4760008 */  swc1      $f22, 0x8($v1)
/* 35DAB4 E00560B4 E478000C */  swc1      $f24, 0xC($v1)
/* 35DAB8 E00560B8 AC620028 */  sw        $v0, 0x28($v1)
/* 35DABC E00560BC AC60002C */  sw        $zero, 0x2C($v1)
/* 35DAC0 E00560C0 AC600024 */  sw        $zero, 0x24($v1)
/* 35DAC4 E00560C4 24140001 */  addiu     $s4, $zero, 0x1
/* 35DAC8 E00560C8 0296102A */  slt       $v0, $s4, $s6
/* 35DACC E00560CC 10400080 */  beqz      $v0, .LE00562D0
/* 35DAD0 E00560D0 2463003C */   addiu    $v1, $v1, 0x3C
/* 35DAD4 E00560D4 24730014 */  addiu     $s3, $v1, 0x14
/* 35DAD8 E00560D8 3C01E005 */  lui       $at, (0xE0056EA0 >> 16)
/* 35DADC E00560DC D4346EA0 */  ldc1      $f20, (0xE0056EA0 & 0xFFFF)($at)
/* 35DAE0 E00560E0 3C01E005 */  lui       $at, (0xE0056EA8 >> 16)
/* 35DAE4 E00560E4 D4386EA8 */  ldc1      $f24, (0xE0056EA8 & 0xFFFF)($at)
/* 35DAE8 E00560E8 3C01E005 */  lui       $at, (0xE0056EB0 >> 16)
/* 35DAEC E00560EC D4366EB0 */  ldc1      $f22, (0xE0056EB0 & 0xFFFF)($at)
.LE00560F0:
/* 35DAF0 E00560F0 0C080000 */  jal       effect_rand_int
/* 35DAF4 E00560F4 24040032 */   addiu    $a0, $zero, 0x32
/* 35DAF8 E00560F8 24040014 */  addiu     $a0, $zero, 0x14
/* 35DAFC E00560FC 0C080000 */  jal       effect_rand_int
/* 35DB00 E0056100 0040802D */   daddu    $s0, $v0, $zero
/* 35DB04 E0056104 24040168 */  addiu     $a0, $zero, 0x168
/* 35DB08 E0056108 0C080000 */  jal       effect_rand_int
/* 35DB0C E005610C 0040882D */   daddu    $s1, $v0, $zero
/* 35DB10 E0056110 24040064 */  addiu     $a0, $zero, 0x64
/* 35DB14 E0056114 0C080000 */  jal       effect_rand_int
/* 35DB18 E0056118 0040902D */   daddu    $s2, $v0, $zero
/* 35DB1C E005611C 2610004B */  addiu     $s0, $s0, 0x4B
/* 35DB20 E0056120 44900000 */  mtc1      $s0, $f0
/* 35DB24 E0056124 00000000 */  nop
/* 35DB28 E0056128 46800020 */  cvt.s.w   $f0, $f0
/* 35DB2C E005612C 26310046 */  addiu     $s1, $s1, 0x46
/* 35DB30 E0056130 E660FFF0 */  swc1      $f0, -0x10($s3)
/* 35DB34 E0056134 44910000 */  mtc1      $s1, $f0
/* 35DB38 E0056138 00000000 */  nop
/* 35DB3C E005613C 46800020 */  cvt.s.w   $f0, $f0
/* 35DB40 E0056140 E660FFF4 */  swc1      $f0, -0xC($s3)
/* 35DB44 E0056144 44920000 */  mtc1      $s2, $f0
/* 35DB48 E0056148 00000000 */  nop
/* 35DB4C E005614C 46800020 */  cvt.s.w   $f0, $f0
/* 35DB50 E0056150 24030168 */  addiu     $v1, $zero, 0x168
/* 35DB54 E0056154 00721823 */  subu      $v1, $v1, $s2
/* 35DB58 E0056158 E6600004 */  swc1      $f0, 0x4($s3)
/* 35DB5C E005615C 44830000 */  mtc1      $v1, $f0
/* 35DB60 E0056160 00000000 */  nop
/* 35DB64 E0056164 46800020 */  cvt.s.w   $f0, $f0
/* 35DB68 E0056168 0040182D */  daddu     $v1, $v0, $zero
/* 35DB6C E005616C 24020001 */  addiu     $v0, $zero, 0x1
/* 35DB70 E0056170 AE60FFF8 */  sw        $zero, -0x8($s3)
/* 35DB74 E0056174 12A20019 */  beq       $s5, $v0, .LE00561DC
/* 35DB78 E0056178 E660000C */   swc1     $f0, 0xC($s3)
/* 35DB7C E005617C 2AA20002 */  slti      $v0, $s5, 0x2
/* 35DB80 E0056180 10400005 */  beqz      $v0, .LE0056198
/* 35DB84 E0056184 24020002 */   addiu    $v0, $zero, 0x2
/* 35DB88 E0056188 52A00007 */  beql      $s5, $zero, .LE00561A8
/* 35DB8C E005618C AE60FFFC */   sw       $zero, -0x4($s3)
/* 35DB90 E0056190 080158B1 */  j         .LE00562C4
/* 35DB94 E0056194 26940001 */   addiu    $s4, $s4, 0x1
.LE0056198:
/* 35DB98 E0056198 12A20023 */  beq       $s5, $v0, .LE0056228
/* 35DB9C E005619C 2404000A */   addiu    $a0, $zero, 0xA
/* 35DBA0 E00561A0 080158B1 */  j         .LE00562C4
/* 35DBA4 E00561A4 26940001 */   addiu    $s4, $s4, 0x1
.LE00561A8:
/* 35DBA8 E00561A8 44830000 */  mtc1      $v1, $f0
/* 35DBAC E00561AC 00000000 */  nop
/* 35DBB0 E00561B0 46800020 */  cvt.s.w   $f0, $f0
/* 35DBB4 E00561B4 46000021 */  cvt.d.s   $f0, $f0
/* 35DBB8 E00561B8 46340002 */  mul.d     $f0, $f0, $f20
/* 35DBBC E00561BC 00000000 */  nop
/* 35DBC0 E00561C0 3C01C040 */  lui       $at, (0xC0400000 >> 16)
/* 35DBC4 E00561C4 44811000 */  mtc1      $at, $f2
/* 35DBC8 E00561C8 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 35DBCC E00561CC 44812000 */  mtc1      $at, $f4
/* 35DBD0 E00561D0 AE600000 */  sw        $zero, 0x0($s3)
/* 35DBD4 E00561D4 08015885 */  j         .LE0056214
/* 35DBD8 E00561D8 AE600020 */   sw       $zero, 0x20($s3)
.LE00561DC:
/* 35DBDC E00561DC 44830000 */  mtc1      $v1, $f0
/* 35DBE0 E00561E0 00000000 */  nop
/* 35DBE4 E00561E4 46800020 */  cvt.s.w   $f0, $f0
/* 35DBE8 E00561E8 46000021 */  cvt.d.s   $f0, $f0
/* 35DBEC E00561EC 46340002 */  mul.d     $f0, $f0, $f20
/* 35DBF0 E00561F0 00000000 */  nop
/* 35DBF4 E00561F4 3C01C0C0 */  lui       $at, (0xC0C00000 >> 16)
/* 35DBF8 E00561F8 44811000 */  mtc1      $at, $f2
/* 35DBFC E00561FC 3C0140C0 */  lui       $at, (0x40C00000 >> 16)
/* 35DC00 E0056200 44812000 */  mtc1      $at, $f4
/* 35DC04 E0056204 AE60FFFC */  sw        $zero, -0x4($s3)
/* 35DC08 E0056208 AE600000 */  sw        $zero, 0x0($s3)
/* 35DC0C E005620C AE600020 */  sw        $zero, 0x20($s3)
/* 35DC10 E0056210 46200000 */  add.d     $f0, $f0, $f0
.LE0056214:
/* 35DC14 E0056214 E662001C */  swc1      $f2, 0x1C($s3)
/* 35DC18 E0056218 E6640024 */  swc1      $f4, 0x24($s3)
/* 35DC1C E005621C 46200020 */  cvt.s.d   $f0, $f0
/* 35DC20 E0056220 080158B0 */  j         .LE00562C0
/* 35DC24 E0056224 E6600008 */   swc1     $f0, 0x8($s3)
.LE0056228:
/* 35DC28 E0056228 44830000 */  mtc1      $v1, $f0
/* 35DC2C E005622C 00000000 */  nop
/* 35DC30 E0056230 46800020 */  cvt.s.w   $f0, $f0
/* 35DC34 E0056234 46000021 */  cvt.d.s   $f0, $f0
/* 35DC38 E0056238 46340002 */  mul.d     $f0, $f0, $f20
/* 35DC3C E005623C 00000000 */  nop
/* 35DC40 E0056240 46200000 */  add.d     $f0, $f0, $f0
/* 35DC44 E0056244 46200020 */  cvt.s.d   $f0, $f0
/* 35DC48 E0056248 0C080138 */  jal       shim_rand_int
/* 35DC4C E005624C E6600008 */   swc1     $f0, 0x8($s3)
/* 35DC50 E0056250 44821000 */  mtc1      $v0, $f2
/* 35DC54 E0056254 00000000 */  nop
/* 35DC58 E0056258 468010A1 */  cvt.d.w   $f2, $f2
/* 35DC5C E005625C 46381082 */  mul.d     $f2, $f2, $f24
/* 35DC60 E0056260 00000000 */  nop
/* 35DC64 E0056264 46361080 */  add.d     $f2, $f2, $f22
/* 35DC68 E0056268 C660FFF0 */  lwc1      $f0, -0x10($s3)
/* 35DC6C E005626C 46000007 */  neg.s     $f0, $f0
/* 35DC70 E0056270 46000021 */  cvt.d.s   $f0, $f0
/* 35DC74 E0056274 46220002 */  mul.d     $f0, $f0, $f2
/* 35DC78 E0056278 00000000 */  nop
/* 35DC7C E005627C 2404000A */  addiu     $a0, $zero, 0xA
/* 35DC80 E0056280 46200020 */  cvt.s.d   $f0, $f0
/* 35DC84 E0056284 0C080138 */  jal       shim_rand_int
/* 35DC88 E0056288 E660FFFC */   swc1     $f0, -0x4($s3)
/* 35DC8C E005628C 44821000 */  mtc1      $v0, $f2
/* 35DC90 E0056290 00000000 */  nop
/* 35DC94 E0056294 468010A1 */  cvt.d.w   $f2, $f2
/* 35DC98 E0056298 46381082 */  mul.d     $f2, $f2, $f24
/* 35DC9C E005629C 00000000 */  nop
/* 35DCA0 E00562A0 46361080 */  add.d     $f2, $f2, $f22
/* 35DCA4 E00562A4 C660FFF4 */  lwc1      $f0, -0xC($s3)
/* 35DCA8 E00562A8 46000007 */  neg.s     $f0, $f0
/* 35DCAC E00562AC 46000021 */  cvt.d.s   $f0, $f0
/* 35DCB0 E00562B0 46220002 */  mul.d     $f0, $f0, $f2
/* 35DCB4 E00562B4 00000000 */  nop
/* 35DCB8 E00562B8 46200020 */  cvt.s.d   $f0, $f0
/* 35DCBC E00562BC E6600000 */  swc1      $f0, 0x0($s3)
.LE00562C0:
/* 35DCC0 E00562C0 26940001 */  addiu     $s4, $s4, 0x1
.LE00562C4:
/* 35DCC4 E00562C4 0296102A */  slt       $v0, $s4, $s6
/* 35DCC8 E00562C8 1440FF89 */  bnez      $v0, .LE00560F0
/* 35DCCC E00562CC 2673003C */   addiu    $s3, $s3, 0x3C
.LE00562D0:
/* 35DCD0 E00562D0 8FBF0044 */  lw        $ra, 0x44($sp)
/* 35DCD4 E00562D4 8FB60040 */  lw        $s6, 0x40($sp)
/* 35DCD8 E00562D8 8FB5003C */  lw        $s5, 0x3C($sp)
/* 35DCDC E00562DC 8FB40038 */  lw        $s4, 0x38($sp)
/* 35DCE0 E00562E0 8FB30034 */  lw        $s3, 0x34($sp)
/* 35DCE4 E00562E4 8FB20030 */  lw        $s2, 0x30($sp)
/* 35DCE8 E00562E8 8FB1002C */  lw        $s1, 0x2C($sp)
/* 35DCEC E00562EC 8FB00028 */  lw        $s0, 0x28($sp)
/* 35DCF0 E00562F0 D7B80058 */  ldc1      $f24, 0x58($sp)
/* 35DCF4 E00562F4 D7B60050 */  ldc1      $f22, 0x50($sp)
/* 35DCF8 E00562F8 D7B40048 */  ldc1      $f20, 0x48($sp)
/* 35DCFC E00562FC 03E00008 */  jr        $ra
/* 35DD00 E0056300 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

void windy_leaves_main(s32 type, f32 arg1, f32 arg2, f32 arg3) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance* effect;
    WindyLeavesFXData* part;
    s32 numParts;
    s32 i;

    bp.init = windy_leaves_init;
    bp.update = windy_leaves_update;
    bp.renderWorld = windy_leaves_render;
    bp.unk_00 = 0;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_WINDY_LEAVES;

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

    part->type = type;
    part->unk_04.x = arg1;
    part->unk_04.y = arg2;
    part->unk_04.z = arg3;
    part->unk_28 = 100;
    part->unk_2C = 0;
    part->alpha = 0;

    part++;
    for (i = 1; i < numParts; i++, part++) {
        s32 temp_s0_2 = effect_rand_int(50);
        s32 temp_s1 = effect_rand_int(20);
        s32 temp_s2 = effect_rand_int(360);
        s32 temp_v0_2 = effect_rand_int(100);
        part->unk_04.x = temp_s0_2 + 75;
        part->unk_04.y = temp_s1 + 70;
        part->unk_04.z = 0;
        part->unk_18 = temp_s2;
        part->unk_20 = 360 - temp_s2;

        switch (type) {
            case 0:
                part->unk_10 = 0.0f;
                part->unk_14 = 0.0f;
                part->unk_34 = 0;
                part->unk_30 = -3.0f;
                part->unk_38 = 3.0f;
                part->unk_1C = (f32)temp_v0_2 * 0.1;
                break;
            case 1:
                part->unk_10 = 0.0f;
                part->unk_14 = 0.0f;
                part->unk_34 = 0;
                part->unk_30 = -6.0f;
                part->unk_38 = 6.0f;
                part->unk_1C = 2.0 * ((f32)temp_v0_2 * 0.1);
                break;
            case 2:
                part->unk_1C = 2.0 * ((f32)temp_v0_2 * 0.1);
                part->unk_10 = -part->unk_04.x * (shim_rand_int(10) * 0.008 + 0.05);
                part->unk_14 = -part->unk_04.y * (shim_rand_int(10) * 0.008 + 0.05);
                break;
            default:
                break;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel blast_appendGfx
/* 37D684 E007C1F4 27BDFEF0 */  addiu     $sp, $sp, -0x110
/* 37D688 E007C1F8 0080302D */  daddu     $a2, $a0, $zero
/* 37D68C E007C1FC 3C07DB06 */  lui       $a3, (0xDB060024 >> 16)
/* 37D690 E007C200 34E70024 */  ori       $a3, $a3, (0xDB060024 & 0xFFFF)
/* 37D694 E007C204 27A40018 */  addiu     $a0, $sp, 0x18
/* 37D698 E007C208 AFB300E4 */  sw        $s3, 0xE4($sp)
/* 37D69C E007C20C 3C130001 */  lui       $s3, (0x11630 >> 16)
/* 37D6A0 E007C210 AFB400E8 */  sw        $s4, 0xE8($sp)
/* 37D6A4 E007C214 3C14800A */  lui       $s4, %hi(gMainGfxPos)
/* 37D6A8 E007C218 2694A66C */  addiu     $s4, $s4, %lo(gMainGfxPos)
/* 37D6AC E007C21C AFBF00F0 */  sw        $ra, 0xF0($sp)
/* 37D6B0 E007C220 AFB500EC */  sw        $s5, 0xEC($sp)
/* 37D6B4 E007C224 AFB200E0 */  sw        $s2, 0xE0($sp)
/* 37D6B8 E007C228 AFB100DC */  sw        $s1, 0xDC($sp)
/* 37D6BC E007C22C AFB000D8 */  sw        $s0, 0xD8($sp)
/* 37D6C0 E007C230 F7B80108 */  sdc1      $f24, 0x108($sp)
/* 37D6C4 E007C234 F7B60100 */  sdc1      $f22, 0x100($sp)
/* 37D6C8 E007C238 F7B400F8 */  sdc1      $f20, 0xF8($sp)
/* 37D6CC E007C23C 8E830000 */  lw        $v1, 0x0($s4)
/* 37D6D0 E007C240 8CD1000C */  lw        $s1, 0xC($a2)
/* 37D6D4 E007C244 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 37D6D8 E007C248 4481C000 */  mtc1      $at, $f24
/* 37D6DC E007C24C 0060282D */  daddu     $a1, $v1, $zero
/* 37D6E0 E007C250 24630008 */  addiu     $v1, $v1, 0x8
/* 37D6E4 E007C254 AE830000 */  sw        $v1, 0x0($s4)
/* 37D6E8 E007C258 C6220020 */  lwc1      $f2, 0x20($s1)
/* 37D6EC E007C25C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 37D6F0 E007C260 ACA20000 */  sw        $v0, 0x0($a1)
/* 37D6F4 E007C264 24620008 */  addiu     $v0, $v1, 0x8
/* 37D6F8 E007C268 ACA00004 */  sw        $zero, 0x4($a1)
/* 37D6FC E007C26C AE820000 */  sw        $v0, 0x0($s4)
/* 37D700 E007C270 24620010 */  addiu     $v0, $v1, 0x10
/* 37D704 E007C274 AC670000 */  sw        $a3, 0x0($v1)
/* 37D708 E007C278 AE820000 */  sw        $v0, 0x0($s4)
/* 37D70C E007C27C 24620018 */  addiu     $v0, $v1, 0x18
/* 37D710 E007C280 8CC50010 */  lw        $a1, 0x10($a2)
/* 37D714 E007C284 3C06DE00 */  lui       $a2, (0xDE000000 >> 16)
/* 37D718 E007C288 AE820000 */  sw        $v0, 0x0($s4)
/* 37D71C E007C28C 8CA5001C */  lw        $a1, 0x1C($a1)
/* 37D720 E007C290 3C020900 */  lui       $v0, %hi(D_09001300_40E590)
/* 37D724 E007C294 24421300 */  addiu     $v0, $v0, %lo(D_09001300_40E590)
/* 37D728 E007C298 AC62000C */  sw        $v0, 0xC($v1)
/* 37D72C E007C29C 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 37D730 E007C2A0 AC660008 */  sw        $a2, 0x8($v1)
/* 37D734 E007C2A4 AC660010 */  sw        $a2, 0x10($v1)
/* 37D738 E007C2A8 00A22821 */  addu      $a1, $a1, $v0
/* 37D73C E007C2AC 4600110D */  trunc.w.s $f4, $f2
/* 37D740 E007C2B0 44022000 */  mfc1      $v0, $f4
/* 37D744 E007C2B4 00000000 */  nop
/* 37D748 E007C2B8 44820000 */  mtc1      $v0, $f0
/* 37D74C E007C2BC 00000000 */  nop
/* 37D750 E007C2C0 46800020 */  cvt.s.w   $f0, $f0
/* 37D754 E007C2C4 00021080 */  sll       $v0, $v0, 2
/* 37D758 E007C2C8 46001081 */  sub.s     $f2, $f2, $f0
/* 37D75C E007C2CC AC650004 */  sw        $a1, 0x4($v1)
/* 37D760 E007C2D0 3C01E008 */  lui       $at, (0xE0080000 >> 16)
/* 37D764 E007C2D4 00220821 */  addu      $at, $at, $v0
/* 37D768 E007C2D8 8C22C510 */  lw        $v0, -0x3AF0($at)
/* 37D76C E007C2DC 46181082 */  mul.s     $f2, $f2, $f24
/* 37D770 E007C2E0 00000000 */  nop
/* 37D774 E007C2E4 AC620014 */  sw        $v0, 0x14($v1)
/* 37D778 E007C2E8 8E250004 */  lw        $a1, 0x4($s1)
/* 37D77C E007C2EC 8E260008 */  lw        $a2, 0x8($s1)
/* 37D780 E007C2F0 8E27000C */  lw        $a3, 0xC($s1)
/* 37D784 E007C2F4 4600110D */  trunc.w.s $f4, $f2
/* 37D788 E007C2F8 44152000 */  mfc1      $s5, $f4
/* 37D78C E007C2FC 0C080108 */  jal       shim_guTranslateF
/* 37D790 E007C300 36731630 */   ori      $s3, $s3, (0x11630 & 0xFFFF)
/* 37D794 E007C304 27B00058 */  addiu     $s0, $sp, 0x58
/* 37D798 E007C308 4480B000 */  mtc1      $zero, $f22
/* 37D79C E007C30C 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 37D7A0 E007C310 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 37D7A4 E007C314 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 37D7A8 E007C318 4481A000 */  mtc1      $at, $f20
/* 37D7AC E007C31C 00031080 */  sll       $v0, $v1, 2
/* 37D7B0 E007C320 00431021 */  addu      $v0, $v0, $v1
/* 37D7B4 E007C324 00021080 */  sll       $v0, $v0, 2
/* 37D7B8 E007C328 00431023 */  subu      $v0, $v0, $v1
/* 37D7BC E007C32C 000218C0 */  sll       $v1, $v0, 3
/* 37D7C0 E007C330 00431021 */  addu      $v0, $v0, $v1
/* 37D7C4 E007C334 000210C0 */  sll       $v0, $v0, 3
/* 37D7C8 E007C338 4406B000 */  mfc1      $a2, $f22
/* 37D7CC E007C33C 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 37D7D0 E007C340 00220821 */  addu      $at, $at, $v0
/* 37D7D4 E007C344 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 37D7D8 E007C348 4407A000 */  mfc1      $a3, $f20
/* 37D7DC E007C34C 46000007 */  neg.s     $f0, $f0
/* 37D7E0 E007C350 44050000 */  mfc1      $a1, $f0
/* 37D7E4 E007C354 0200202D */  daddu     $a0, $s0, $zero
/* 37D7E8 E007C358 0C080104 */  jal       shim_guRotateF
/* 37D7EC E007C35C E7B60010 */   swc1     $f22, 0x10($sp)
/* 37D7F0 E007C360 0200202D */  daddu     $a0, $s0, $zero
/* 37D7F4 E007C364 27A50018 */  addiu     $a1, $sp, 0x18
/* 37D7F8 E007C368 27B00098 */  addiu     $s0, $sp, 0x98
/* 37D7FC E007C36C 0C080114 */  jal       shim_guMtxCatF
/* 37D800 E007C370 0200302D */   daddu    $a2, $s0, $zero
/* 37D804 E007C374 27A40018 */  addiu     $a0, $sp, 0x18
/* 37D808 E007C378 8E250010 */  lw        $a1, 0x10($s1)
/* 37D80C E007C37C 4407A000 */  mfc1      $a3, $f20
/* 37D810 E007C380 0C080110 */  jal       shim_guScaleF
/* 37D814 E007C384 00A0302D */   daddu    $a2, $a1, $zero
/* 37D818 E007C388 27A40018 */  addiu     $a0, $sp, 0x18
/* 37D81C E007C38C 0200282D */  daddu     $a1, $s0, $zero
/* 37D820 E007C390 0C080114 */  jal       shim_guMtxCatF
/* 37D824 E007C394 0200302D */   daddu    $a2, $s0, $zero
/* 37D828 E007C398 4406B000 */  mfc1      $a2, $f22
/* 37D82C E007C39C 27A40018 */  addiu     $a0, $sp, 0x18
/* 37D830 E007C3A0 E7B40010 */  swc1      $f20, 0x10($sp)
/* 37D834 E007C3A4 8E250024 */  lw        $a1, 0x24($s1)
/* 37D838 E007C3A8 0C080104 */  jal       shim_guRotateF
/* 37D83C E007C3AC 00C0382D */   daddu    $a3, $a2, $zero
/* 37D840 E007C3B0 27A40018 */  addiu     $a0, $sp, 0x18
/* 37D844 E007C3B4 0200282D */  daddu     $a1, $s0, $zero
/* 37D848 E007C3B8 0C080114 */  jal       shim_guMtxCatF
/* 37D84C E007C3BC 0200302D */   daddu    $a2, $s0, $zero
/* 37D850 E007C3C0 0200202D */  daddu     $a0, $s0, $zero
/* 37D854 E007C3C4 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 37D858 E007C3C8 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 37D85C E007C3CC 3C12800A */  lui       $s2, %hi(gDisplayContext)
/* 37D860 E007C3D0 2652A674 */  addiu     $s2, $s2, %lo(gDisplayContext)
/* 37D864 E007C3D4 96050000 */  lhu       $a1, 0x0($s0)
/* 37D868 E007C3D8 8E420000 */  lw        $v0, 0x0($s2)
/* 37D86C E007C3DC 00052980 */  sll       $a1, $a1, 6
/* 37D870 E007C3E0 00B32821 */  addu      $a1, $a1, $s3
/* 37D874 E007C3E4 0C080118 */  jal       shim_guMtxF2L
/* 37D878 E007C3E8 00452821 */   addu     $a1, $v0, $a1
/* 37D87C E007C3EC 8E850000 */  lw        $a1, 0x0($s4)
/* 37D880 E007C3F0 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 37D884 E007C3F4 44810000 */  mtc1      $at, $f0
/* 37D888 E007C3F8 00A0202D */  daddu     $a0, $a1, $zero
/* 37D88C E007C3FC 24A50008 */  addiu     $a1, $a1, 0x8
/* 37D890 E007C400 AE850000 */  sw        $a1, 0x0($s4)
/* 37D894 E007C404 96020000 */  lhu       $v0, 0x0($s0)
/* 37D898 E007C408 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 37D89C E007C40C AC830000 */  sw        $v1, 0x0($a0)
/* 37D8A0 E007C410 24430001 */  addiu     $v1, $v0, 0x1
/* 37D8A4 E007C414 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 37D8A8 E007C418 00021180 */  sll       $v0, $v0, 6
/* 37D8AC E007C41C A6030000 */  sh        $v1, 0x0($s0)
/* 37D8B0 E007C420 8E430000 */  lw        $v1, 0x0($s2)
/* 37D8B4 E007C424 00531021 */  addu      $v0, $v0, $s3
/* 37D8B8 E007C428 00621821 */  addu      $v1, $v1, $v0
/* 37D8BC E007C42C AC830004 */  sw        $v1, 0x4($a0)
/* 37D8C0 E007C430 C6220020 */  lwc1      $f2, 0x20($s1)
/* 37D8C4 E007C434 4602003C */  c.lt.s    $f0, $f2
/* 37D8C8 E007C438 00000000 */  nop
/* 37D8CC E007C43C 45000006 */  bc1f      .LE007C458
/* 37D8D0 E007C440 24A20008 */   addiu    $v0, $a1, 0x8
/* 37D8D4 E007C444 AE820000 */  sw        $v0, 0x0($s4)
/* 37D8D8 E007C448 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 37D8DC E007C44C ACA20000 */  sw        $v0, 0x0($a1)
/* 37D8E0 E007C450 0801F11A */  j         .LE007C468
/* 37D8E4 E007C454 2402FF7F */   addiu    $v0, $zero, -0x81
.LE007C458:
/* 37D8E8 E007C458 AE820000 */  sw        $v0, 0x0($s4)
/* 37D8EC E007C45C 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 37D8F0 E007C460 ACA20000 */  sw        $v0, 0x0($a1)
/* 37D8F4 E007C464 2402807F */  addiu     $v0, $zero, -0x7F81
.LE007C468:
/* 37D8F8 E007C468 ACA20004 */  sw        $v0, 0x4($a1)
/* 37D8FC E007C46C 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
/* 37D900 E007C470 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 37D904 E007C474 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 37D908 E007C478 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* 37D90C E007C47C 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 37D910 E007C480 8CA40000 */  lw        $a0, 0x0($a1)
/* 37D914 E007C484 24038B00 */  addiu     $v1, $zero, -0x7500
/* 37D918 E007C488 0080302D */  daddu     $a2, $a0, $zero
/* 37D91C E007C48C 24840008 */  addiu     $a0, $a0, 0x8
/* 37D920 E007C490 ACA40000 */  sw        $a0, 0x0($a1)
/* 37D924 E007C494 ACC20000 */  sw        $v0, 0x0($a2)
/* 37D928 E007C498 32A200FF */  andi      $v0, $s5, 0xFF
/* 37D92C E007C49C 00431025 */  or        $v0, $v0, $v1
/* 37D930 E007C4A0 ACC20004 */  sw        $v0, 0x4($a2)
/* 37D934 E007C4A4 24820008 */  addiu     $v0, $a0, 0x8
/* 37D938 E007C4A8 ACA20000 */  sw        $v0, 0x0($a1)
/* 37D93C E007C4AC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 37D940 E007C4B0 AC820000 */  sw        $v0, 0x0($a0)
/* 37D944 E007C4B4 3C020900 */  lui       $v0, %hi(D_090017B0_40EA40)
/* 37D948 E007C4B8 244217B0 */  addiu     $v0, $v0, %lo(D_090017B0_40EA40)
/* 37D94C E007C4BC AC820004 */  sw        $v0, 0x4($a0)
/* 37D950 E007C4C0 24820010 */  addiu     $v0, $a0, 0x10
/* 37D954 E007C4C4 ACA20000 */  sw        $v0, 0x0($a1)
/* 37D958 E007C4C8 24020040 */  addiu     $v0, $zero, 0x40
/* 37D95C E007C4CC AC870008 */  sw        $a3, 0x8($a0)
/* 37D960 E007C4D0 AC82000C */  sw        $v0, 0xC($a0)
/* 37D964 E007C4D4 8FBF00F0 */  lw        $ra, 0xF0($sp)
/* 37D968 E007C4D8 8FB500EC */  lw        $s5, 0xEC($sp)
/* 37D96C E007C4DC 8FB400E8 */  lw        $s4, 0xE8($sp)
/* 37D970 E007C4E0 8FB300E4 */  lw        $s3, 0xE4($sp)
/* 37D974 E007C4E4 8FB200E0 */  lw        $s2, 0xE0($sp)
/* 37D978 E007C4E8 8FB100DC */  lw        $s1, 0xDC($sp)
/* 37D97C E007C4EC 8FB000D8 */  lw        $s0, 0xD8($sp)
/* 37D980 E007C4F0 D7B80108 */  ldc1      $f24, 0x108($sp)
/* 37D984 E007C4F4 D7B60100 */  ldc1      $f22, 0x100($sp)
/* 37D988 E007C4F8 D7B400F8 */  ldc1      $f20, 0xF8($sp)
/* 37D98C E007C4FC 03E00008 */  jr        $ra
/* 37D990 E007C500 27BD0110 */   addiu    $sp, $sp, 0x110
/* 37D994 E007C504 00000000 */  nop
/* 37D998 E007C508 00000000 */  nop
/* 37D99C E007C50C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void blast_appendGfx(void *effect) {
    Matrix4f sp18;
    Matrix4f sp58;
    Matrix4f sp98;
    Gfx* dlist = D_090017B0_37F180;
    BlastFXData* data = ((EffectInstance*) effect)->data.blast;
    s32 unk_20 = data->unk_20;
    f32 t = 256.0f;
    s32 envAlpha = (data->unk_20 - unk_20) * t;

    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
    gSPDisplayList(gMainGfxPos++, D_09001300_37ECD0);
    gSPDisplayList(gMainGfxPos++, D_E007C510[unk_20]);

    shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
    shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
    shim_guMtxCatF(sp58, sp18, sp98);
    shim_guScaleF(sp18, data->unk_10, data->unk_10, 1.0f);
    shim_guMtxCatF(sp18, sp98, sp98);
    shim_guRotateF(sp18, data->unk_24, 0.0f, 0.0f, 1.0f);
    shim_guMtxCatF(sp18, sp98, sp98);
    shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);

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

    if (data->unk_20 > 4.0f) {
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, 127);
    } else {
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 128, 127);
    }
    t = !(s32)t; // required to match
    gDPSetEnvColor(gMainGfxPos++, 255, 255, 139, envAlpha);

    gSPDisplayList(gMainGfxPos++, dlist);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel create_npc_impl
/* 13998 80038598 3C03800A */  lui       $v1, %hi(gCurrentNpcListPtr)
/* 1399C 8003859C 8C630B90 */  lw        $v1, %lo(gCurrentNpcListPtr)($v1)
/* 139A0 800385A0 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 139A4 800385A4 AFB20018 */  sw        $s2, 0x18($sp)
/* 139A8 800385A8 0080902D */  daddu     $s2, $a0, $zero
/* 139AC 800385AC AFB3001C */  sw        $s3, 0x1C($sp)
/* 139B0 800385B0 00A0982D */  daddu     $s3, $a1, $zero
/* 139B4 800385B4 AFB40020 */  sw        $s4, 0x20($sp)
/* 139B8 800385B8 00C0A02D */  daddu     $s4, $a2, $zero
/* 139BC 800385BC AFB10014 */  sw        $s1, 0x14($sp)
/* 139C0 800385C0 0000882D */  daddu     $s1, $zero, $zero
/* 139C4 800385C4 AFBF0024 */  sw        $ra, 0x24($sp)
/* 139C8 800385C8 AFB00010 */  sw        $s0, 0x10($sp)
.L800385CC:
/* 139CC 800385CC 8C620000 */  lw        $v0, 0x0($v1)
/* 139D0 800385D0 10400006 */  beqz      $v0, .L800385EC
/* 139D4 800385D4 2A220040 */   slti     $v0, $s1, 0x40
/* 139D8 800385D8 26310001 */  addiu     $s1, $s1, 0x1
/* 139DC 800385DC 2A220040 */  slti      $v0, $s1, 0x40
/* 139E0 800385E0 1440FFFA */  bnez      $v0, .L800385CC
/* 139E4 800385E4 24630004 */   addiu    $v1, $v1, 0x4
/* 139E8 800385E8 2A220040 */  slti      $v0, $s1, 0x40
.L800385EC:
/* 139EC 800385EC 14400003 */  bnez      $v0, .L800385FC
/* 139F0 800385F0 00000000 */   nop
.L800385F4:
/* 139F4 800385F4 0800E17D */  j         .L800385F4
/* 139F8 800385F8 00000000 */   nop
.L800385FC:
/* 139FC 800385FC 0C00AB39 */  jal       heap_malloc
/* 13A00 80038600 24040340 */   addiu    $a0, $zero, 0x340
/* 13A04 80038604 00112080 */  sll       $a0, $s1, 2
/* 13A08 80038608 3C03800A */  lui       $v1, %hi(gCurrentNpcListPtr)
/* 13A0C 8003860C 8C630B90 */  lw        $v1, %lo(gCurrentNpcListPtr)($v1)
/* 13A10 80038610 3C05800A */  lui       $a1, %hi(gNpcCount)
/* 13A14 80038614 24A5A604 */  addiu     $a1, $a1, %lo(gNpcCount)
/* 13A18 80038618 00832021 */  addu      $a0, $a0, $v1
/* 13A1C 8003861C 94A30000 */  lhu       $v1, 0x0($a1)
/* 13A20 80038620 0040802D */  daddu     $s0, $v0, $zero
/* 13A24 80038624 AC900000 */  sw        $s0, 0x0($a0)
/* 13A28 80038628 24630001 */  addiu     $v1, $v1, 0x1
/* 13A2C 8003862C 16000003 */  bnez      $s0, .L8003863C
/* 13A30 80038630 A4A30000 */   sh       $v1, 0x0($a1)
.L80038634:
/* 13A34 80038634 0800E18D */  j         .L80038634
/* 13A38 80038638 00000000 */   nop
.L8003863C:
/* 13A3C 8003863C 3C030041 */  lui       $v1, (0x410011 >> 16)
/* 13A40 80038640 8E420000 */  lw        $v0, 0x0($s2)
/* 13A44 80038644 34630011 */  ori       $v1, $v1, (0x410011 & 0xFFFF)
/* 13A48 80038648 00431825 */  or        $v1, $v0, $v1
/* 13A4C 8003864C 12800004 */  beqz      $s4, .L80038660
/* 13A50 80038650 AE030000 */   sw       $v1, 0x0($s0)
/* 13A54 80038654 3C024000 */  lui       $v0, (0x40000000 >> 16)
/* 13A58 80038658 00621025 */  or        $v0, $v1, $v0
/* 13A5C 8003865C AE020000 */  sw        $v0, 0x0($s0)
.L80038660:
/* 13A60 80038660 0000202D */  daddu     $a0, $zero, $zero
/* 13A64 80038664 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 13A68 80038668 44810000 */  mtc1      $at, $f0
/* 13A6C 8003866C 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 13A70 80038670 44811000 */  mtc1      $at, $f2
/* 13A74 80038674 24020020 */  addiu     $v0, $zero, 0x20
/* 13A78 80038678 A60200A6 */  sh        $v0, 0xA6($s0)
/* 13A7C 8003867C 24020040 */  addiu     $v0, $zero, 0x40
/* 13A80 80038680 A60200A8 */  sh        $v0, 0xA8($s0)
/* 13A84 80038684 2402000D */  addiu     $v0, $zero, 0xD
/* 13A88 80038688 A20200AA */  sb        $v0, 0xAA($s0)
/* 13A8C 8003868C 240200FF */  addiu     $v0, $zero, 0xFF
/* 13A90 80038690 AE000020 */  sw        $zero, 0x20($s0)
/* 13A94 80038694 AE00000C */  sw        $zero, 0xC($s0)
/* 13A98 80038698 AE00001C */  sw        $zero, 0x1C($s0)
/* 13A9C 8003869C AE000038 */  sw        $zero, 0x38($s0)
/* 13AA0 800386A0 AE00003C */  sw        $zero, 0x3C($s0)
/* 13AA4 800386A4 AE000040 */  sw        $zero, 0x40($s0)
/* 13AA8 800386A8 AE00006C */  sw        $zero, 0x6C($s0)
/* 13AAC 800386AC AE000070 */  sw        $zero, 0x70($s0)
/* 13AB0 800386B0 AE000074 */  sw        $zero, 0x74($s0)
/* 13AB4 800386B4 AE000050 */  sw        $zero, 0x50($s0)
/* 13AB8 800386B8 AE000044 */  sw        $zero, 0x44($s0)
/* 13ABC 800386BC AE000048 */  sw        $zero, 0x48($s0)
/* 13AC0 800386C0 AE00004C */  sw        $zero, 0x4C($s0)
/* 13AC4 800386C4 A6000090 */  sh        $zero, 0x90($s0)
/* 13AC8 800386C8 A6000092 */  sh        $zero, 0x92($s0)
/* 13ACC 800386CC A6000094 */  sh        $zero, 0x94($s0)
/* 13AD0 800386D0 A6000096 */  sh        $zero, 0x96($s0)
/* 13AD4 800386D4 A20000AB */  sb        $zero, 0xAB($s0)
/* 13AD8 800386D8 A20200AC */  sb        $v0, 0xAC($s0)
/* 13ADC 800386DC A20200AD */  sb        $v0, 0xAD($s0)
/* 13AE0 800386E0 E6000014 */  swc1      $f0, 0x14($s0)
/* 13AE4 800386E4 E6020018 */  swc1      $f2, 0x18($s0)
/* 13AE8 800386E8 E6000054 */  swc1      $f0, 0x54($s0)
/* 13AEC 800386EC E6000058 */  swc1      $f0, 0x58($s0)
/* 13AF0 800386F0 E600005C */  swc1      $f0, 0x5C($s0)
/* 13AF4 800386F4 8E420004 */  lw        $v0, 0x4($s2)
/* 13AF8 800386F8 0200182D */  daddu     $v1, $s0, $zero
/* 13AFC 800386FC E6000030 */  swc1      $f0, 0x30($s0)
/* 13B00 80038700 AE000034 */  sw        $zero, 0x34($s0)
/* 13B04 80038704 A6000098 */  sh        $zero, 0x98($s0)
/* 13B08 80038708 AE020028 */  sw        $v0, 0x28($s0)
/* 13B0C 8003870C 3C020002 */  lui       $v0, (0x20000 >> 16)
/* 13B10 80038710 A60000A2 */  sh        $zero, 0xA2($s0)
/* 13B14 80038714 AE020080 */  sw        $v0, 0x80($s0)
/* 13B18 80038718 2402FFFF */  addiu     $v0, $zero, -0x1
/* 13B1C 8003871C A6000088 */  sh        $zero, 0x88($s0)
/* 13B20 80038720 A600008A */  sh        $zero, 0x8A($s0)
/* 13B24 80038724 A600008C */  sh        $zero, 0x8C($s0)
/* 13B28 80038728 A6020084 */  sh        $v0, 0x84($s0)
/* 13B2C 8003872C A6020086 */  sh        $v0, 0x86($s0)
/* 13B30 80038730 A20000B4 */  sb        $zero, 0xB4($s0)
/* 13B34 80038734 A20000B5 */  sb        $zero, 0xB5($s0)
/* 13B38 80038738 AE000318 */  sw        $zero, 0x318($s0)
/* 13B3C 8003873C AE00031C */  sw        $zero, 0x31C($s0)
/* 13B40 80038740 E6000320 */  swc1      $f0, 0x320($s0)
.L80038744:
/* 13B44 80038744 AC600324 */  sw        $zero, 0x324($v1)
/* 13B48 80038748 02041021 */  addu      $v0, $s0, $a0
/* 13B4C 8003874C 24840001 */  addiu     $a0, $a0, 0x1
/* 13B50 80038750 A040032C */  sb        $zero, 0x32C($v0)
/* 13B54 80038754 28820002 */  slti      $v0, $a0, 0x2
/* 13B58 80038758 1440FFFA */  bnez      $v0, .L80038744
/* 13B5C 8003875C 24630004 */   addiu    $v1, $v1, 0x4
/* 13B60 80038760 8E420008 */  lw        $v0, 0x8($s2)
/* 13B64 80038764 14400004 */  bnez      $v0, .L80038778
/* 13B68 80038768 AE020004 */   sw       $v0, 0x4($s0)
/* 13B6C 8003876C 3C028004 */  lui       $v0, %hi(STUB_npc_callback)
/* 13B70 80038770 24428470 */  addiu     $v0, $v0, %lo(STUB_npc_callback)
/* 13B74 80038774 AE020004 */  sw        $v0, 0x4($s0)
.L80038778:
/* 13B78 80038778 8E42000C */  lw        $v0, 0xC($s2)
/* 13B7C 8003877C 14400004 */  bnez      $v0, .L80038790
/* 13B80 80038780 AE020008 */   sw       $v0, 0x8($s0)
/* 13B84 80038784 3C028004 */  lui       $v0, %hi(STUB_npc_callback)
/* 13B88 80038788 24428470 */  addiu     $v0, $v0, %lo(STUB_npc_callback)
/* 13B8C 8003878C AE020008 */  sw        $v0, 0x8($s0)
.L80038790:
/* 13B90 80038790 16800015 */  bnez      $s4, .L800387E8
/* 13B94 80038794 3C020100 */   lui      $v0, (0x1000000 >> 16)
/* 13B98 80038798 8E030000 */  lw        $v1, 0x0($s0)
/* 13B9C 8003879C 00621024 */  and       $v0, $v1, $v0
/* 13BA0 800387A0 1440000F */  bnez      $v0, .L800387E0
/* 13BA4 800387A4 AE1300B0 */   sw       $s3, 0xB0($s0)
/* 13BA8 800387A8 3C020400 */  lui       $v0, (0x4000000 >> 16)
/* 13BAC 800387AC 00621024 */  and       $v0, $v1, $v0
/* 13BB0 800387B0 14400004 */  bnez      $v0, .L800387C4
/* 13BB4 800387B4 0260282D */   daddu    $a1, $s3, $zero
/* 13BB8 800387B8 8E040028 */  lw        $a0, 0x28($s0)
/* 13BBC 800387BC 0800E1F4 */  j         .L800387D0
/* 13BC0 800387C0 00000000 */   nop
.L800387C4:
/* 13BC4 800387C4 8E020028 */  lw        $v0, 0x28($s0)
/* 13BC8 800387C8 3C048000 */  lui       $a0, (0x80000000 >> 16)
/* 13BCC 800387CC 00442025 */  or        $a0, $v0, $a0
.L800387D0:
/* 13BD0 800387D0 0C0B783B */  jal       spr_load_npc_sprite
/* 13BD4 800387D4 00000000 */   nop
/* 13BD8 800387D8 0800E1FA */  j         .L800387E8
/* 13BDC 800387DC AE020024 */   sw       $v0, 0x24($s0)
.L800387E0:
/* 13BE0 800387E0 34620002 */  ori       $v0, $v1, 0x2
/* 13BE4 800387E4 AE020000 */  sw        $v0, 0x0($s0)
.L800387E8:
/* 13BE8 800387E8 8E050038 */  lw        $a1, 0x38($s0)
/* 13BEC 800387EC 8E06003C */  lw        $a2, 0x3C($s0)
/* 13BF0 800387F0 8E070040 */  lw        $a3, 0x40($s0)
/* 13BF4 800387F4 0C044898 */  jal       create_shadow_type
/* 13BF8 800387F8 0000202D */   daddu    $a0, $zero, $zero
/* 13BFC 800387FC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 13C00 80038800 44810000 */  mtc1      $at, $f0
/* 13C04 80038804 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 13C08 80038808 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 13C0C 8003880C AE020078 */  sw        $v0, 0x78($s0)
/* 13C10 80038810 E600007C */  swc1      $f0, 0x7C($s0)
/* 13C14 80038814 80620070 */  lb        $v0, 0x70($v1)
/* 13C18 80038818 54400001 */  bnel      $v0, $zero, .L80038820
/* 13C1C 8003881C 36310800 */   ori      $s1, $s1, 0x800
.L80038820:
/* 13C20 80038820 0220102D */  daddu     $v0, $s1, $zero
/* 13C24 80038824 8FBF0024 */  lw        $ra, 0x24($sp)
/* 13C28 80038828 8FB40020 */  lw        $s4, 0x20($sp)
/* 13C2C 8003882C 8FB3001C */  lw        $s3, 0x1C($sp)
/* 13C30 80038830 8FB20018 */  lw        $s2, 0x18($sp)
/* 13C34 80038834 8FB10014 */  lw        $s1, 0x14($sp)
/* 13C38 80038838 8FB00010 */  lw        $s0, 0x10($sp)
/* 13C3C 8003883C 03E00008 */  jr        $ra
/* 13C40 80038840 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

s32 create_npc_impl(NpcBlueprint* blueprint, AnimID* animList, s32 isPeachNpc) {
    Npc* npc;
    s32 i;
    s32 j;

    for (i = 0; i < MAX_NPCS; i++) {
        if ((*gCurrentNpcListPtr)[i] == NULL) {
            break;
        }
    }
    ASSERT(i < MAX_NPCS);

    (*gCurrentNpcListPtr)[i] = npc = heap_malloc(sizeof(*npc));
    gNpcCount++;
    ASSERT(npc != NULL);

    npc->flags = blueprint->flags | (NPC_FLAG_TOUCHES_GROUND | NPC_FLAG_DIRTY_SHADOW | NPC_FLAG_HAS_SHADOW | NPC_FLAG_ENABLED);
    if (isPeachNpc) {
        npc->flags |= NPC_FLAG_NO_ANIMS_LOADED;
    }

    npc->collisionDiameter = 32;
    npc->collisionHeight = 64;
    npc->renderMode = 13;
    npc->blur.any = NULL;
    npc->yaw = 0.0f;
    npc->jumpVelocity = 0.0f;
    npc->pos.x = 0.0f;
    npc->pos.y = 0.0f;
    npc->pos.z = 0.0f;
    npc->colliderPos.x = 0.0f;
    npc->colliderPos.y = 0.0f;
    npc->colliderPos.z = 0.0f;
    npc->rotationPivotOffsetY = 0.0f;
    npc->rotation.x = 0.0f;
    npc->rotation.y = 0.0f;
    npc->rotation.z = 0.0f;
    npc->homePos.x = 0.0f;
    npc->homePos.y = 0.0f;
    npc->homePos.z = 0.0f;
    npc->unk_96 = 0; // TODO: fix
    npc->verticalRenderOffset = 0;
    npc->alpha = 255;
    npc->alpha2 = 255;
    npc->jumpScale = 1.0f;
    npc->moveSpeed = 4.0f;
    npc->scale.x = 1.0f;
    npc->scale.y = 1.0f;
    npc->scale.z = 1.0f;
    npc->currentAnim = blueprint->initialAnim;
    npc->animationSpeed = 1.0f;
    npc->renderYaw = 0.0f;
    npc->imgfxType = IMGFX_CLEAR;
    npc->imgfxFlags = 0;
    npc->collisionChannel = COLLISION_CHANNEL_20000;
    npc->isFacingAway = FALSE;
    npc->yawCamOffset = 0;
    npc->turnAroundYawAdjustment = 0;
    npc->currentFloor = NO_COLLIDER;
    npc->currentWall = NO_COLLIDER;
    npc->palSwapType = 0;
    npc->palSwapPrevType = 0;
    npc->screenSpaceOffset2D[0] = 0.0f;
    npc->screenSpaceOffset2D[1] = 0.0f;
    npc->verticalStretch = 1.0f;

    for (j = 0; j < ARRAY_COUNT(npc->decorations); j++) {
        npc->decorations[j] = 0;
        npc->decorationType[j] = 0;
    }

    npc->onUpdate = blueprint->onUpdate;
    if (npc->onUpdate == NULL) {
        npc->onUpdate = &STUB_npc_callback;
    }

    npc->onRender = blueprint->onRender;
    if (npc->onRender == NULL) {
        npc->onRender = &STUB_npc_callback;
    }
    if (!isPeachNpc) {
        npc->extraAnimList = animList;
        if (!(npc->flags & NPC_FLAG_HAS_NO_SPRITE)) {
            if (!(npc->flags & NPC_FLAG_PARTNER)) {
                npc->spriteInstanceID = spr_load_npc_sprite(npc->currentAnim, animList);
            } else {
                npc->spriteInstanceID = spr_load_npc_sprite(npc->currentAnim | SPRITE_ID_TAIL_ALLOCATE, animList);
            }
        } else {
            npc->flags |= NPC_FLAG_INVISIBLE;
        }
    }

    npc->shadowIndex = create_shadow_type(0, npc->pos.x, npc->pos.y, npc->pos.z);
    npc->shadowScale = 1.0f;

    if (gGameStatusPtr->isBattle) {
        i |= BATTLE_NPC_ID_BIT;
    }
    return i;
}