### RAW ASSEMBLY INSTRUCTIONS:

glabel sun_update
/* 40B52C E012013C 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 40B530 E0120140 AFBF0020 */  sw        $ra, 0x20($sp)
/* 40B534 E0120144 AFB3001C */  sw        $s3, 0x1C($sp)
/* 40B538 E0120148 AFB20018 */  sw        $s2, 0x18($sp)
/* 40B53C E012014C AFB10014 */  sw        $s1, 0x14($sp)
/* 40B540 E0120150 AFB00010 */  sw        $s0, 0x10($sp)
/* 40B544 E0120154 F7BA0040 */  sdc1      $f26, 0x40($sp)
/* 40B548 E0120158 F7B80038 */  sdc1      $f24, 0x38($sp)
/* 40B54C E012015C F7B60030 */  sdc1      $f22, 0x30($sp)
/* 40B550 E0120160 F7B40028 */  sdc1      $f20, 0x28($sp)
/* 40B554 E0120164 8C830000 */  lw        $v1, 0x0($a0)
/* 40B558 E0120168 8C85000C */  lw        $a1, 0xC($a0)
/* 40B55C E012016C 30620010 */  andi      $v0, $v1, 0x10
/* 40B560 E0120170 10400005 */  beqz      $v0, .LE0120188
/* 40B564 E0120174 2402FFEF */   addiu    $v0, $zero, -0x11
/* 40B568 E0120178 00621024 */  and       $v0, $v1, $v0
/* 40B56C E012017C AC820000 */  sw        $v0, 0x0($a0)
/* 40B570 E0120180 24020010 */  addiu     $v0, $zero, 0x10
/* 40B574 E0120184 ACA20010 */  sw        $v0, 0x10($a1)
.LE0120188:
/* 40B578 E0120188 8CA30010 */  lw        $v1, 0x10($a1)
/* 40B57C E012018C 286203E8 */  slti      $v0, $v1, 0x3E8
/* 40B580 E0120190 10400002 */  beqz      $v0, .LE012019C
/* 40B584 E0120194 2462FFFF */   addiu    $v0, $v1, -0x1
/* 40B588 E0120198 ACA20010 */  sw        $v0, 0x10($a1)
.LE012019C:
/* 40B58C E012019C 3C030004 */  lui       $v1, (0x4F1A0 >> 16)
/* 40B590 E01201A0 8CA20014 */  lw        $v0, 0x14($a1)
/* 40B594 E01201A4 3463F1A0 */  ori       $v1, $v1, (0x4F1A0 & 0xFFFF)
/* 40B598 E01201A8 24420001 */  addiu     $v0, $v0, 0x1
/* 40B59C E01201AC 0062182A */  slt       $v1, $v1, $v0
/* 40B5A0 E01201B0 10600003 */  beqz      $v1, .LE01201C0
/* 40B5A4 E01201B4 ACA20014 */   sw       $v0, 0x14($a1)
/* 40B5A8 E01201B8 24020100 */  addiu     $v0, $zero, 0x100
/* 40B5AC E01201BC ACA20014 */  sw        $v0, 0x14($a1)
.LE01201C0:
/* 40B5B0 E01201C0 8CA20010 */  lw        $v0, 0x10($a1)
/* 40B5B4 E01201C4 04410005 */  bgez      $v0, .LE01201DC
/* 40B5B8 E01201C8 28420010 */   slti     $v0, $v0, 0x10
/* 40B5BC E01201CC 0C080128 */  jal       shim_remove_effect
/* 40B5C0 E01201D0 00000000 */   nop
/* 40B5C4 E01201D4 080480DC */  j         .LE0120370
/* 40B5C8 E01201D8 00000000 */   nop
.LE01201DC:
/* 40B5CC E01201DC 10400006 */  beqz      $v0, .LE01201F8
/* 40B5D0 E01201E0 8CB30014 */   lw       $s3, 0x14($a1)
/* 40B5D4 E01201E4 8CA20038 */  lw        $v0, 0x38($a1)
/* 40B5D8 E01201E8 2442FFF0 */  addiu     $v0, $v0, -0x10
/* 40B5DC E01201EC 04410002 */  bgez      $v0, .LE01201F8
/* 40B5E0 E01201F0 ACA20038 */   sw       $v0, 0x38($a1)
/* 40B5E4 E01201F4 ACA00038 */  sw        $zero, 0x38($a1)
.LE01201F8:
/* 40B5E8 E01201F8 8CA2003C */  lw        $v0, 0x3C($a1)
/* 40B5EC E01201FC 04410003 */  bgez      $v0, .LE012020C
/* 40B5F0 E0120200 28420100 */   slti     $v0, $v0, 0x100
/* 40B5F4 E0120204 08048086 */  j         .LE0120218
/* 40B5F8 E0120208 ACA0003C */   sw       $zero, 0x3C($a1)
.LE012020C:
/* 40B5FC E012020C 14400002 */  bnez      $v0, .LE0120218
/* 40B600 E0120210 240200FF */   addiu    $v0, $zero, 0xFF
/* 40B604 E0120214 ACA2003C */  sw        $v0, 0x3C($a1)
.LE0120218:
/* 40B608 E0120218 8CA30038 */  lw        $v1, 0x38($a1)
/* 40B60C E012021C 8CA4003C */  lw        $a0, 0x3C($a1)
/* 40B610 E0120220 0083102A */  slt       $v0, $a0, $v1
/* 40B614 E0120224 10400004 */  beqz      $v0, .LE0120238
/* 40B618 E0120228 2462FFF8 */   addiu    $v0, $v1, -0x8
/* 40B61C E012022C ACA20038 */  sw        $v0, 0x38($a1)
/* 40B620 E0120230 08048094 */  j         .LE0120250
/* 40B624 E0120234 0044102A */   slt      $v0, $v0, $a0
.LE0120238:
/* 40B628 E0120238 0064102A */  slt       $v0, $v1, $a0
/* 40B62C E012023C 10400006 */  beqz      $v0, .LE0120258
/* 40B630 E0120240 24620008 */   addiu    $v0, $v1, 0x8
/* 40B634 E0120244 8CA4003C */  lw        $a0, 0x3C($a1)
/* 40B638 E0120248 ACA20038 */  sw        $v0, 0x38($a1)
/* 40B63C E012024C 0082102A */  slt       $v0, $a0, $v0
.LE0120250:
/* 40B640 E0120250 54400001 */  bnel      $v0, $zero, .LE0120258
/* 40B644 E0120254 ACA40038 */   sw       $a0, 0x38($a1)
.LE0120258:
/* 40B648 E0120258 0000882D */  daddu     $s1, $zero, $zero
/* 40B64C E012025C 00A0802D */  daddu     $s0, $a1, $zero
/* 40B650 E0120260 00139040 */  sll       $s2, $s3, 1
/* 40B654 E0120264 3C013FD0 */  lui       $at, (0x3FD00000 >> 16)
/* 40B658 E0120268 4481D800 */  mtc1      $at, $f27
/* 40B65C E012026C 4480D000 */  mtc1      $zero, $f26
/* 40B660 E0120270 3C01E012 */  lui       $at, (0xE01207A0 >> 16)
/* 40B664 E0120274 D43807A0 */  ldc1      $f24, (0xE01207A0 & 0xFFFF)($at)
/* 40B668 E0120278 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 40B66C E012027C 4481B000 */  mtc1      $at, $f22
.LE0120280:
/* 40B670 E0120280 44926000 */  mtc1      $s2, $f12
/* 40B674 E0120284 00000000 */  nop
/* 40B678 E0120288 0C080140 */  jal       shim_sin_deg
/* 40B67C E012028C 46806320 */   cvt.s.w  $f12, $f12
/* 40B680 E0120290 44936000 */  mtc1      $s3, $f12
/* 40B684 E0120294 00000000 */  nop
/* 40B688 E0120298 46806320 */  cvt.s.w   $f12, $f12
/* 40B68C E012029C 46006321 */  cvt.d.s   $f12, $f12
/* 40B690 E01202A0 463A6302 */  mul.d     $f12, $f12, $f26
/* 40B694 E01202A4 00000000 */  nop
/* 40B698 E01202A8 02310018 */  mult      $s1, $s1
/* 40B69C E01202AC 00001812 */  mflo      $v1
/* 40B6A0 E01202B0 00031080 */  sll       $v0, $v1, 2
/* 40B6A4 E01202B4 00431021 */  addu      $v0, $v0, $v1
/* 40B6A8 E01202B8 00021080 */  sll       $v0, $v0, 2
/* 40B6AC E01202BC 44821000 */  mtc1      $v0, $f2
/* 40B6B0 E01202C0 00000000 */  nop
/* 40B6B4 E01202C4 468010A1 */  cvt.d.w   $f2, $f2
/* 40B6B8 E01202C8 46226300 */  add.d     $f12, $f12, $f2
/* 40B6BC E01202CC 46000506 */  mov.s     $f20, $f0
/* 40B6C0 E01202D0 0C080140 */  jal       shim_sin_deg
/* 40B6C4 E01202D4 46206320 */   cvt.s.d  $f12, $f12
/* 40B6C8 E01202D8 4600A521 */  cvt.d.s   $f20, $f20
/* 40B6CC E01202DC 4638A502 */  mul.d     $f20, $f20, $f24
/* 40B6D0 E01202E0 00000000 */  nop
/* 40B6D4 E01202E4 3C01E012 */  lui       $at, (0xE01207A8 >> 16)
/* 40B6D8 E01202E8 D42207A8 */  ldc1      $f2, (0xE01207A8 & 0xFFFF)($at)
/* 40B6DC E01202EC 4622A500 */  add.d     $f20, $f20, $f2
/* 40B6E0 E01202F0 3C014010 */  lui       $at, (0x40100000 >> 16)
/* 40B6E4 E01202F4 44811800 */  mtc1      $at, $f3
/* 40B6E8 E01202F8 44801000 */  mtc1      $zero, $f2
/* 40B6EC E01202FC 00000000 */  nop
/* 40B6F0 E0120300 4622A502 */  mul.d     $f20, $f20, $f2
/* 40B6F4 E0120304 00000000 */  nop
/* 40B6F8 E0120308 46000021 */  cvt.d.s   $f0, $f0
/* 40B6FC E012030C 4620A502 */  mul.d     $f20, $f20, $f0
/* 40B700 E0120310 00000000 */  nop
/* 40B704 E0120314 C6000020 */  lwc1      $f0, 0x20($s0)
/* 40B708 E0120318 46000021 */  cvt.d.s   $f0, $f0
/* 40B70C E012031C 46340001 */  sub.d     $f0, $f0, $f20
/* 40B710 E0120320 44801000 */  mtc1      $zero, $f2
/* 40B714 E0120324 46200020 */  cvt.s.d   $f0, $f0
/* 40B718 E0120328 4602003C */  c.lt.s    $f0, $f2
/* 40B71C E012032C 00000000 */  nop
/* 40B720 E0120330 45000003 */  bc1f      .LE0120340
/* 40B724 E0120334 E6000020 */   swc1     $f0, 0x20($s0)
/* 40B728 E0120338 46160000 */  add.s     $f0, $f0, $f22
/* 40B72C E012033C E6000020 */  swc1      $f0, 0x20($s0)
.LE0120340:
/* 40B730 E0120340 C6000020 */  lwc1      $f0, 0x20($s0)
/* 40B734 E0120344 4600B03C */  c.lt.s    $f22, $f0
/* 40B738 E0120348 00000000 */  nop
/* 40B73C E012034C 45020004 */  bc1fl     .LE0120360
/* 40B740 E0120350 26100004 */   addiu    $s0, $s0, 0x4
/* 40B744 E0120354 46160001 */  sub.s     $f0, $f0, $f22
/* 40B748 E0120358 E6000020 */  swc1      $f0, 0x20($s0)
/* 40B74C E012035C 26100004 */  addiu     $s0, $s0, 0x4
.LE0120360:
/* 40B750 E0120360 26310001 */  addiu     $s1, $s1, 0x1
/* 40B754 E0120364 2A220005 */  slti      $v0, $s1, 0x5
/* 40B758 E0120368 1440FFC5 */  bnez      $v0, .LE0120280
/* 40B75C E012036C 26520014 */   addiu    $s2, $s2, 0x14
.LE0120370:
/* 40B760 E0120370 8FBF0020 */  lw        $ra, 0x20($sp)
/* 40B764 E0120374 8FB3001C */  lw        $s3, 0x1C($sp)
/* 40B768 E0120378 8FB20018 */  lw        $s2, 0x18($sp)
/* 40B76C E012037C 8FB10014 */  lw        $s1, 0x14($sp)
/* 40B770 E0120380 8FB00010 */  lw        $s0, 0x10($sp)
/* 40B774 E0120384 D7BA0040 */  ldc1      $f26, 0x40($sp)
/* 40B778 E0120388 D7B80038 */  ldc1      $f24, 0x38($sp)
/* 40B77C E012038C D7B60030 */  ldc1      $f22, 0x30($sp)
/* 40B780 E0120390 D7B40028 */  ldc1      $f20, 0x28($sp)
/* 40B784 E0120394 03E00008 */  jr        $ra
/* 40B788 E0120398 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void sun_update(EffectInstance* effect) {
    SunFXData* data = effect->data.sun;
    s32 time;
    s32 i;

    if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
        effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
        data->timeLeft = 16;
    }
    if (data->timeLeft < 1000) {
        data->timeLeft--;
    }

    data->lifeTime++;
    if (data->lifeTime > 90*60*60) {
        data->lifeTime = 256;
    }
    if (data->timeLeft < 0) {
        shim_remove_effect(effect);
        return;
    }

    time = data->lifeTime;
    if (data->timeLeft < 16) {
        data->alpha -= 16;
        if (data->alpha < 0) {
            data->alpha = 0;
        }
    }
    if (data->targetAlpha < 0) {
        data->targetAlpha = 0;
    } else if (data->targetAlpha > 255) {
        data->targetAlpha = 255;
    }

    if (data->alpha > data->targetAlpha) {
        data->alpha -= 8;
        if (data->alpha < data->targetAlpha) {
            data->alpha = data->targetAlpha;
        }
    } else if (data->alpha < data->targetAlpha) {
        data->alpha += 8;
        if (data->targetAlpha < data->alpha) {
            data->alpha = data->targetAlpha;
        }
    }

    for (i = 0; i < 5; i++) {
        data->texScrollAmt[i] -= 4.0
            * ((shim_sin_deg((time * 2 + (20 * i))) * 0.01) + 0.05)
            * shim_sin_deg(((f32) time * 0.25) + (SQ(i) * 20));

        if (data->texScrollAmt[i] < 0.0f) {
            data->texScrollAmt[i] += 256.0f;
        }
        if (data->texScrollAmt[i] > 256.0f) {
            data->texScrollAmt[i] -= 256.0f;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel chomp_drop_update
/* 3966F0 E009A140 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 3966F4 E009A144 AFBF0020 */  sw        $ra, 0x20($sp)
/* 3966F8 E009A148 AFB1001C */  sw        $s1, 0x1C($sp)
/* 3966FC E009A14C AFB00018 */  sw        $s0, 0x18($sp)
/* 396700 E009A150 F7B40028 */  sdc1      $f20, 0x28($sp)
/* 396704 E009A154 8C91000C */  lw        $s1, 0xC($a0)
/* 396708 E009A158 8E220040 */  lw        $v0, 0x40($s1)
/* 39670C E009A15C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 396710 E009A160 AE220040 */  sw        $v0, 0x40($s1)
/* 396714 E009A164 8E220044 */  lw        $v0, 0x44($s1)
/* 396718 E009A168 8E230040 */  lw        $v1, 0x40($s1)
/* 39671C E009A16C 24420001 */  addiu     $v0, $v0, 0x1
/* 396720 E009A170 04610005 */  bgez      $v1, .LE009A188
/* 396724 E009A174 AE220044 */   sw       $v0, 0x44($s1)
/* 396728 E009A178 0C080128 */  jal       shim_remove_effect
/* 39672C E009A17C 00000000 */   nop
/* 396730 E009A180 080268E0 */  j         .LE009A380
/* 396734 E009A184 00000000 */   nop
.LE009A188:
/* 396738 E009A188 8E24002C */  lw        $a0, 0x2C($s1)
/* 39673C E009A18C 2C820006 */  sltiu     $v0, $a0, 0x6
/* 396740 E009A190 1040007B */  beqz      $v0, .LE009A380
/* 396744 E009A194 00041080 */   sll      $v0, $a0, 2
/* 396748 E009A198 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 39674C E009A19C 00220821 */  addu      $at, $at, $v0
/* 396750 E009A1A0 8C22AA60 */  lw        $v0, -0x55A0($at)
/* 396754 E009A1A4 00400008 */  jr        $v0
/* 396758 E009A1A8 00000000 */   nop
/* 39675C E009A1AC 8E23003C */  lw        $v1, 0x3C($s1)
/* 396760 E009A1B0 8E220020 */  lw        $v0, 0x20($s1)
/* 396764 E009A1B4 C6200028 */  lwc1      $f0, 0x28($s1)
/* 396768 E009A1B8 00431023 */  subu      $v0, $v0, $v1
/* 39676C E009A1BC 44822000 */  mtc1      $v0, $f4
/* 396770 E009A1C0 00000000 */  nop
/* 396774 E009A1C4 46802120 */  cvt.s.w   $f4, $f4
/* 396778 E009A1C8 46002102 */  mul.s     $f4, $f4, $f0
/* 39677C E009A1CC 00000000 */  nop
/* 396780 E009A1D0 C6220018 */  lwc1      $f2, 0x18($s1)
/* 396784 E009A1D4 C6260024 */  lwc1      $f6, 0x24($s1)
/* 396788 E009A1D8 46061081 */  sub.s     $f2, $f2, $f6
/* 39678C E009A1DC 46001082 */  mul.s     $f2, $f2, $f0
/* 396790 E009A1E0 00000000 */  nop
/* 396794 E009A1E4 C6200034 */  lwc1      $f0, 0x34($s1)
/* 396798 E009A1E8 46023180 */  add.s     $f6, $f6, $f2
/* 39679C E009A1EC 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 3967A0 E009A1F0 D422AA78 */  ldc1      $f2, -0x5588($at)
/* 3967A4 E009A1F4 46000021 */  cvt.d.s   $f0, $f0
/* 3967A8 E009A1F8 46220001 */  sub.d     $f0, $f0, $f2
/* 3967AC E009A1FC 44804000 */  mtc1      $zero, $f8
/* 3967B0 E009A200 44831000 */  mtc1      $v1, $f2
/* 3967B4 E009A204 00000000 */  nop
/* 3967B8 E009A208 468010A0 */  cvt.s.w   $f2, $f2
/* 3967BC E009A20C 46041080 */  add.s     $f2, $f2, $f4
/* 3967C0 E009A210 E6260024 */  swc1      $f6, 0x24($s1)
/* 3967C4 E009A214 46200020 */  cvt.s.d   $f0, $f0
/* 3967C8 E009A218 4600128D */  trunc.w.s $f10, $f2
/* 3967CC E009A21C E62A003C */  swc1      $f10, 0x3C($s1)
/* 3967D0 E009A220 4608003C */  c.lt.s    $f0, $f8
/* 3967D4 E009A224 00000000 */  nop
/* 3967D8 E009A228 45000055 */  bc1f      .LE009A380
/* 3967DC E009A22C E6200034 */   swc1     $f0, 0x34($s1)
/* 3967E0 E009A230 2402000A */  addiu     $v0, $zero, 0xA
/* 3967E4 E009A234 AE220030 */  sw        $v0, 0x30($s1)
/* 3967E8 E009A238 24020001 */  addiu     $v0, $zero, 0x1
/* 3967EC E009A23C E6280034 */  swc1      $f8, 0x34($s1)
/* 3967F0 E009A240 E6280010 */  swc1      $f8, 0x10($s1)
/* 3967F4 E009A244 080268E0 */  j         .LE009A380
/* 3967F8 E009A248 AE22002C */   sw       $v0, 0x2C($s1)
/* 3967FC E009A24C 8E220030 */  lw        $v0, 0x30($s1)
/* 396800 E009A250 2442FFFF */  addiu     $v0, $v0, -0x1
/* 396804 E009A254 1C40004A */  bgtz      $v0, .LE009A380
/* 396808 E009A258 AE220030 */   sw       $v0, 0x30($s1)
/* 39680C E009A25C 24020002 */  addiu     $v0, $zero, 0x2
/* 396810 E009A260 AE22002C */  sw        $v0, 0x2C($s1)
/* 396814 E009A264 2402000A */  addiu     $v0, $zero, 0xA
/* 396818 E009A268 080268E0 */  j         .LE009A380
/* 39681C E009A26C AE220030 */   sw       $v0, 0x30($s1)
/* 396820 E009A270 8E220030 */  lw        $v0, 0x30($s1)
/* 396824 E009A274 2442FFFF */  addiu     $v0, $v0, -0x1
/* 396828 E009A278 1C400041 */  bgtz      $v0, .LE009A380
/* 39682C E009A27C AE220030 */   sw       $v0, 0x30($s1)
/* 396830 E009A280 24020003 */  addiu     $v0, $zero, 0x3
/* 396834 E009A284 080268E0 */  j         .LE009A380
/* 396838 E009A288 AE22002C */   sw       $v0, 0x2C($s1)
/* 39683C E009A28C C6200010 */  lwc1      $f0, 0x10($s1)
/* 396840 E009A290 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 396844 E009A294 44811000 */  mtc1      $at, $f2
/* 396848 E009A298 00000000 */  nop
/* 39684C E009A29C 46020001 */  sub.s     $f0, $f0, $f2
/* 396850 E009A2A0 C6220008 */  lwc1      $f2, 0x8($s1)
/* 396854 E009A2A4 44802000 */  mtc1      $zero, $f4
/* 396858 E009A2A8 46001080 */  add.s     $f2, $f2, $f0
/* 39685C E009A2AC E6200010 */  swc1      $f0, 0x10($s1)
/* 396860 E009A2B0 4604103C */  c.lt.s    $f2, $f4
/* 396864 E009A2B4 00000000 */  nop
/* 396868 E009A2B8 45000031 */  bc1f      .LE009A380
/* 39686C E009A2BC E6220008 */   swc1     $f2, 0x8($s1)
/* 396870 E009A2C0 24040015 */  addiu     $a0, $zero, 0x15
/* 396874 E009A2C4 0C080150 */  jal       shim_load_effect
/* 396878 E009A2C8 E6240008 */   swc1     $f4, 0x8($s1)
/* 39687C E009A2CC C6200004 */  lwc1      $f0, 0x4($s1)
/* 396880 E009A2D0 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 396884 E009A2D4 4481A000 */  mtc1      $at, $f20
/* 396888 E009A2D8 2410001E */  addiu     $s0, $zero, 0x1E
/* 39688C E009A2DC AFB00010 */  sw        $s0, 0x10($sp)
/* 396890 E009A2E0 46140000 */  add.s     $f0, $f0, $f20
/* 396894 E009A2E4 8E260008 */  lw        $a2, 0x8($s1)
/* 396898 E009A2E8 8E27000C */  lw        $a3, 0xC($s1)
/* 39689C E009A2EC 44050000 */  mfc1      $a1, $f0
/* 3968A0 E009A2F0 0C00A800 */  jal       dust_main
/* 3968A4 E009A2F4 24040002 */   addiu    $a0, $zero, 0x2
/* 3968A8 E009A2F8 C6200004 */  lwc1      $f0, 0x4($s1)
/* 3968AC E009A2FC AFB00010 */  sw        $s0, 0x10($sp)
/* 3968B0 E009A300 46140001 */  sub.s     $f0, $f0, $f20
/* 3968B4 E009A304 8E260008 */  lw        $a2, 0x8($s1)
/* 3968B8 E009A308 8E27000C */  lw        $a3, 0xC($s1)
/* 3968BC E009A30C 44050000 */  mfc1      $a1, $f0
/* 3968C0 E009A310 0C00A800 */  jal       dust_main
/* 3968C4 E009A314 24040002 */   addiu    $a0, $zero, 0x2
/* 3968C8 E009A318 24020004 */  addiu     $v0, $zero, 0x4
/* 3968CC E009A31C AE22002C */  sw        $v0, 0x2C($s1)
/* 3968D0 E009A320 24020014 */  addiu     $v0, $zero, 0x14
/* 3968D4 E009A324 080268E0 */  j         .LE009A380
/* 3968D8 E009A328 AE220030 */   sw       $v0, 0x30($s1)
/* 3968DC E009A32C 8E220030 */  lw        $v0, 0x30($s1)
/* 3968E0 E009A330 2442FFFF */  addiu     $v0, $v0, -0x1
/* 3968E4 E009A334 1C400012 */  bgtz      $v0, .LE009A380
/* 3968E8 E009A338 AE220030 */   sw       $v0, 0x30($s1)
/* 3968EC E009A33C 24020005 */  addiu     $v0, $zero, 0x5
/* 3968F0 E009A340 080268E0 */  j         .LE009A380
/* 3968F4 E009A344 AE22002C */   sw       $v0, 0x2C($s1)
/* 3968F8 E009A348 2862000A */  slti      $v0, $v1, 0xA
/* 3968FC E009A34C 10400005 */  beqz      $v0, .LE009A364
/* 396900 E009A350 00031040 */   sll      $v0, $v1, 1
/* 396904 E009A354 00431021 */  addu      $v0, $v0, $v1
/* 396908 E009A358 000210C0 */  sll       $v0, $v0, 3
/* 39690C E009A35C 00431021 */  addu      $v0, $v0, $v1
/* 396910 E009A360 AE22003C */  sw        $v0, 0x3C($s1)
.LE009A364:
/* 396914 E009A364 C6200034 */  lwc1      $f0, 0x34($s1)
/* 396918 E009A368 3C01E00A */  lui       $at, (0xE00A0000 >> 16)
/* 39691C E009A36C D422AA80 */  ldc1      $f2, -0x5580($at)
/* 396920 E009A370 46000021 */  cvt.d.s   $f0, $f0
/* 396924 E009A374 46220001 */  sub.d     $f0, $f0, $f2
/* 396928 E009A378 46200020 */  cvt.s.d   $f0, $f0
/* 39692C E009A37C E6200034 */  swc1      $f0, 0x34($s1)
.LE009A380:
/* 396930 E009A380 8FBF0020 */  lw        $ra, 0x20($sp)
/* 396934 E009A384 8FB1001C */  lw        $s1, 0x1C($sp)
/* 396938 E009A388 8FB00018 */  lw        $s0, 0x18($sp)
/* 39693C E009A38C D7B40028 */  ldc1      $f20, 0x28($sp)
/* 396940 E009A390 03E00008 */  jr        $ra
/* 396944 E009A394 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void chomp_drop_update(EffectInstance* effect) {
    ChompDropFXData* data = effect->data.chompDrop;
    s32 unk40;

    data->unk_40--;
    data->unk_44++;
    if (data->unk_40 < 0) {
        shim_remove_effect(effect);
        return;
    }

    unk40 = data->unk_40;
    switch (data->unk_2C) {
        case 0:
            data->unk_24 += (data->unk_18 - data->unk_24) * data->unk_28;
            data->unk_3C += (data->unk_20 - data->unk_3C) * data->unk_28;
            data->unk_34 -= 0.02;
            if (data->unk_34 < 0.0f) {
                data->unk_30 = 10;
                data->unk_34 = 0.0f;
                data->unk_10 = 0.0f;
                data->unk_2C = 1;
            }
            break;
        case 1:
            data->unk_30--;
            if (data->unk_30 <= 0) {
                data->unk_2C = 2;
                data->unk_30 = 10;
            }
            break;
        case 2:
            data->unk_30--;
            if (data->unk_30 <= 0) {
                data->unk_2C = 3;
            }
            break;
        case 3:
            data->unk_10 -= 1.0f;
            data->unk_08 += data->unk_10;
            if (data->unk_08 < 0.0f) {
                data->unk_08 = 0.0f;
                shim_load_effect(EFFECT_DUST);
                dust_main(2, data->unk_04 + 5.0f, data->unk_08, data->unk_0C, 30);
                dust_main(2, data->unk_04 - 5.0f, data->unk_08, data->unk_0C, 30);
                data->unk_2C = 4;
                data->unk_30 = 20;
            }
            break;
        case 4:
            data->unk_30--;
            if (data->unk_30 <= 0) {
                data->unk_2C = 5;
            }
            break;
        case 5:
            if (unk40 < 10) {
                data->unk_3C = unk40 * 25;
            }
            data->unk_34 -= 0.05;
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_802A16F4_7A9094
/* 7907C4 802A16F4 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 7907C8 802A16F8 AFBF001C */  sw        $ra, 0x1C($sp)
.L802A16FC_7A909C:
/* 7907CC 802A16FC AFB00018 */  sw        $s0, 0x18($sp)
.L802A1700_7A90A0:
/* 7907D0 802A1700 0C09A75B */  jal       get_actor
D_802A1704_7A90A4:
/* 7907D4 802A1704 8C840148 */   lw       $a0, 0x148($a0)
.L802A1708_7A90A8:
/* 7907D8 802A1708 0040802D */  daddu     $s0, $v0, $zero
D_802A170C_7A90AC:
/* 7907DC 802A170C 0C09A75B */  jal       get_actor
D_802A1710_7A90B0:
/* 7907E0 802A1710 86040428 */   lh       $a0, 0x428($s0)
/* 7907E4 802A1714 82050426 */  lb        $a1, 0x426($s0)
/* 7907E8 802A1718 0040802D */  daddu     $s0, $v0, $zero
.L802A171C_7A90BC:
/* 7907EC 802A171C 0C099117 */  jal       get_actor_part
/* 7907F0 802A1720 0200202D */   daddu    $a0, $s0, $zero
D_802A1724_7A90C4:
/* 7907F4 802A1724 8E030000 */  lw        $v1, 0x0($s0)
/* 7907F8 802A1728 0040202D */  daddu     $a0, $v0, $zero
/* 7907FC 802A172C 30624000 */  andi      $v0, $v1, 0x4000
/* 790800 802A1730 14400069 */  bnez      $v0, func_802A18D8_7A9278
glabel .L802A1734_7A90D4
/* 790804 802A1734 24020002 */   addiu    $v0, $zero, 0x2
.L802A1738_7A90D8:
/* 790808 802A1738 3C020040 */  lui       $v0, (0x400000 >> 16)
/* 79080C 802A173C 00621024 */  and       $v0, $v1, $v0
D_802A1740_7A90E0:
/* 790810 802A1740 10400003 */  beqz      $v0, .L802A1750_7A90F0
D_802A1744_7A90E4:
/* 790814 802A1744 30622000 */   andi     $v0, $v1, 0x2000
/* 790818 802A1748 080A8636 */  j         func_802A18D8_7A9278
D_802A174C_7A90EC:
/* 79081C 802A174C 24020002 */   addiu    $v0, $zero, 0x2
.L802A1750_7A90F0:
/* 790820 802A1750 14400061 */  bnez      $v0, func_802A18D8_7A9278
glabel .L802A1754_7A90F4
/* 790824 802A1754 24020002 */   addiu    $v0, $zero, 0x2
.L802A1758_7A90F8:
/* 790828 802A1758 8C83007C */  lw        $v1, 0x7C($a0)
.L802A175C_7A90FC:
/* 79082C 802A175C 3C020004 */  lui       $v0, (0x40000 >> 16)
/* 790830 802A1760 00621024 */  and       $v0, $v1, $v0
/* 790834 802A1764 1440005C */  bnez      $v0, func_802A18D8_7A9278
/* 790838 802A1768 24020002 */   addiu    $v0, $zero, 0x2
D_802A176C_7A910C:
/* 79083C 802A176C 3C020008 */  lui       $v0, (0x80000 >> 16)
D_802A1770_7A9110:
/* 790840 802A1770 00621024 */  and       $v0, $v1, $v0
.L802A1774_7A9114:
/* 790844 802A1774 14400058 */  bnez      $v0, func_802A18D8_7A9278
/* 790848 802A1778 24020002 */   addiu    $v0, $zero, 0x2
.L802A177C_7A911C:
/* 79084C 802A177C 0200202D */  daddu     $a0, $s0, $zero
/* 790850 802A1780 0000282D */  daddu     $a1, $zero, $zero
D_802A1784_7A9124:
/* 790854 802A1784 2406000A */  addiu     $a2, $zero, 0xA
.L802A1788_7A9128:
/* 790858 802A1788 24020004 */  addiu     $v0, $zero, 0x4
/* 79085C 802A178C A2020224 */  sb        $v0, 0x224($s0)
D_802A1790_7A9130:
/* 790860 802A1790 24020003 */  addiu     $v0, $zero, 0x3
.L802A1794_7A9134:
/* 790864 802A1794 0C09E23E */  jal       dispatch_damage_event_actor_0
.L802A1798_7A9138:
/* 790868 802A1798 A2020223 */   sb       $v0, 0x223($s0)
.L802A179C_7A913C:
/* 79086C 802A179C 86020150 */  lh        $v0, 0x150($s0)
D_802A17A0_7A9140:
/* 790870 802A17A0 C6000144 */  lwc1      $f0, 0x144($s0)
D_802A17A4_7A9144:
/* 790874 802A17A4 8E030000 */  lw        $v1, 0x0($s0)
/* 790878 802A17A8 44821000 */  mtc1      $v0, $f2
D_802A17AC_7A914C:
/* 79087C 802A17AC 00000000 */  nop
.L802A17B0_7A9150:
/* 790880 802A17B0 468010A0 */  cvt.s.w   $f2, $f2
.L802A17B4_7A9154:
/* 790884 802A17B4 92020190 */  lbu       $v0, 0x190($s0)
.L802A17B8_7A9158:
/* 790888 802A17B8 46020000 */  add.s     $f0, $f0, $f2
.L802A17BC_7A915C:
/* 79088C 802A17BC 00021042 */  srl       $v0, $v0, 1
/* 790890 802A17C0 44821000 */  mtc1      $v0, $f2
D_802A17C4_7A9164:
/* 790894 802A17C4 00000000 */  nop
/* 790898 802A17C8 468010A0 */  cvt.s.w   $f2, $f2
D_802A17CC_7A916C:
/* 79089C 802A17CC 30620800 */  andi      $v0, $v1, 0x800
D_802A17D0_7A9170:
/* 7908A0 802A17D0 1040000D */  beqz      $v0, .L802A1808_7A91A8
glabel func_802A17D4_7A9174
/* 7908A4 802A17D4 46020100 */   add.s    $f4, $f0, $f2
/* 7908A8 802A17D8 86020152 */  lh        $v0, 0x152($s0)
D_802A17DC_7A917C:
/* 7908AC 802A17DC C6000148 */  lwc1      $f0, 0x148($s0)
/* 7908B0 802A17E0 44821000 */  mtc1      $v0, $f2
D_802A17E4_7A9184:
/* 7908B4 802A17E4 00000000 */  nop
.L802A17E8_7A9188:
/* 7908B8 802A17E8 468010A0 */  cvt.s.w   $f2, $f2
/* 7908BC 802A17EC 92020191 */  lbu       $v0, 0x191($s0)
.L802A17F0_7A9190:
/* 7908C0 802A17F0 46020000 */  add.s     $f0, $f0, $f2
.L802A17F4_7A9194:
/* 7908C4 802A17F4 44821000 */  mtc1      $v0, $f2
.L802A17F8_7A9198:
/* 7908C8 802A17F8 00000000 */  nop
D_802A17FC_7A919C:
/* 7908CC 802A17FC 468010A0 */  cvt.s.w   $f2, $f2
D_802A1800_7A91A0:
/* 7908D0 802A1800 080A861D */  j         .L802A1874_7A9214
D_802A1804_7A91A4:
/* 7908D4 802A1804 46020001 */   sub.s    $f0, $f0, $f2
.L802A1808_7A91A8:
/* 7908D8 802A1808 30628000 */  andi      $v0, $v1, 0x8000
D_802A180C_7A91AC:
/* 7908DC 802A180C 1440000D */  bnez      $v0, D_802A1844_7A91E4
/* 7908E0 802A1810 00000000 */   nop
D_802A1814_7A91B4:
/* 7908E4 802A1814 86020152 */  lh        $v0, 0x152($s0)
glabel func_802A1818_7A91B8
/* 7908E8 802A1818 C6000148 */  lwc1      $f0, 0x148($s0)
.L802A181C_7A91BC:
/* 7908EC 802A181C 44821000 */  mtc1      $v0, $f2
/* 7908F0 802A1820 00000000 */  nop
D_802A1824_7A91C4:
/* 7908F4 802A1824 468010A0 */  cvt.s.w   $f2, $f2
/* 7908F8 802A1828 92020191 */  lbu       $v0, 0x191($s0)
D_802A182C_7A91CC:
/* 7908FC 802A182C 46020000 */  add.s     $f0, $f0, $f2
D_802A1830_7A91D0:
/* 790900 802A1830 44821000 */  mtc1      $v0, $f2
D_802A1834_7A91D4:
/* 790904 802A1834 00000000 */  nop
/* 790908 802A1838 468010A0 */  cvt.s.w   $f2, $f2
D_802A183C_7A91DC:
/* 79090C 802A183C 080A861D */  j         .L802A1874_7A9214
glabel func_802A1840_7A91E0
/* 790910 802A1840 46001000 */   add.s    $f0, $f2, $f0
D_802A1844_7A91E4:
/* 790914 802A1844 86020152 */  lh        $v0, 0x152($s0)
glabel func_802A1848_7A91E8
/* 790918 802A1848 C6020148 */  lwc1      $f2, 0x148($s0)
/* 79091C 802A184C 44820000 */  mtc1      $v0, $f0
D_802A1850_7A91F0:
/* 790920 802A1850 00000000 */  nop
D_802A1854_7A91F4:
/* 790924 802A1854 46800020 */  cvt.s.w   $f0, $f0
.L802A1858_7A91F8:
/* 790928 802A1858 92020191 */  lbu       $v0, 0x191($s0)
D_802A185C_7A91FC:
/* 79092C 802A185C 46001080 */  add.s     $f2, $f2, $f0
/* 790930 802A1860 00021040 */  sll       $v0, $v0, 1
/* 790934 802A1864 44820000 */  mtc1      $v0, $f0
/* 790938 802A1868 00000000 */  nop
D_802A186C_7A920C:
/* 79093C 802A186C 46800020 */  cvt.s.w   $f0, $f0
D_802A1870_7A9210:
/* 790940 802A1870 46001000 */  add.s     $f0, $f2, $f0
.L802A1874_7A9214:
/* 790944 802A1874 86020154 */  lh        $v0, 0x154($s0)
.L802A1878_7A9218:
/* 790948 802A1878 44060000 */  mfc1      $a2, $f0
.L802A187C_7A921C:
/* 79094C 802A187C C600014C */  lwc1      $f0, 0x14C($s0)
/* 790950 802A1880 44821000 */  mtc1      $v0, $f2
D_802A1884_7A9224:
/* 790954 802A1884 00000000 */  nop
/* 790958 802A1888 468010A0 */  cvt.s.w   $f2, $f2
glabel func_802A188C_7A922C
/* 79095C 802A188C 46020000 */  add.s     $f0, $f0, $f2
.L802A1890_7A9230:
/* 790960 802A1890 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
glabel func_802A1894_7A9234
/* 790964 802A1894 44811000 */  mtc1      $at, $f2
/* 790968 802A1898 24040005 */  addiu     $a0, $zero, 0x5
D_802A189C_7A923C:
/* 79096C 802A189C 46020000 */  add.s     $f0, $f0, $f2
.L802A18A0_7A9240:
/* 790970 802A18A0 44052000 */  mfc1      $a1, $f4
D_802A18A4_7A9244:
/* 790974 802A18A4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 790978 802A18A8 44812000 */  mtc1      $at, $f4
D_802A18AC_7A924C:
/* 79097C 802A18AC 44070000 */  mfc1      $a3, $f0
glabel .L802A18B0_7A9250
/* 790980 802A18B0 2402003C */  addiu     $v0, $zero, 0x3C
/* 790984 802A18B4 AFA20014 */  sw        $v0, 0x14($sp)
D_802A18B8_7A9258:
/* 790988 802A18B8 0C01C634 */  jal       fx_stat_change
/* 79098C 802A18BC E7A40010 */   swc1     $f4, 0x10($sp)
/* 790990 802A18C0 0C05272D */  jal       sfx_play_sound
/* 790994 802A18C4 24042106 */   addiu    $a0, $zero, 0x2106
D_802A18C8_7A9268:
/* 790998 802A18C8 24020002 */  addiu     $v0, $zero, 0x2
D_802A18CC_7A926C:
/* 79099C 802A18CC 24030001 */  addiu     $v1, $zero, 0x1
D_802A18D0_7A9270:
/* 7909A0 802A18D0 3C01802A */  lui       $at, %hi(func_802A2C84_7AA624 + 0x3C)
/* 7909A4 802A18D4 AC232CC0 */  sw        $v1, %lo(func_802A2C84_7AA624 + 0x3C)($at)
glabel func_802A18D8_7A9278
/* 7909A8 802A18D8 8FBF001C */  lw        $ra, 0x1C($sp)
/* 7909AC 802A18DC 8FB00018 */  lw        $s0, 0x18($sp)
D_802A18E0_7A9280:
/* 7909B0 802A18E0 03E00008 */  jr        $ra
D_802A18E4_7A9284:
/* 7909B4 802A18E4 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(func_802A16F4_7907C4) {
    Actor* enemy = get_actor(script->owner1.enemyID);
    Actor* target = get_actor(enemy->targetActorID);
    ActorPart* targetPart = get_actor_part(target, enemy->targetPartIndex);
    f32 x, y, z;

    if (target->flags & ACTOR_FLAG_TARGET_ONLY) {
        return ApiStatus_DONE2;
    }

    if (target->flags & ACTOR_FLAG_NO_DMG_APPLY) {
        return ApiStatus_DONE2;
    }

    if (target->flags & ACTOR_FLAG_2000) {
        return ApiStatus_DONE2;
    }

    if (targetPart->eventFlags & ACTOR_PART_FLAG_40000) {
        return ApiStatus_DONE2;
    }

    if (targetPart->eventFlags & ACTOR_PART_FLAG_80000) {
        return ApiStatus_DONE2;
    }

    target->chillOutTurns = 4;
    target->chillOutAmount = 3;

    dispatch_damage_event_actor_0(target, 0, 10);

    x = target->currentPos.x + target->headOffset.x + (target->size.x / 2);
    if (target->flags & ACTOR_FLAG_UPSIDE_DOWN) {
        y = target->currentPos.y + target->headOffset.y - target->size.y;
    } else if (!(target->flags & ACTOR_FLAG_8000)) {
        y = target->currentPos.y + target->headOffset.y + target->size.y;
    } else {
        y = target->currentPos.y + target->headOffset.y + target->size.y * 2;
    }
    z = target->currentPos.z + target->headOffset.z + 5.0f;

    fx_stat_change(5, x, y, z, 1.0f, 60);
    sfx_play_sound(SOUND_2106);
    D_802A2CC0 = 1;

    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8024F394
/* 17DC74 8024F394 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 17DC78 8024F398 AFB40020 */  sw        $s4, 0x20($sp)
/* 17DC7C 8024F39C 0080A02D */  daddu     $s4, $a0, $zero
D_8024F3A0:
/* 17DC80 8024F3A0 AFB3001C */  sw        $s3, 0x1C($sp)
/* 17DC84 8024F3A4 0000982D */  daddu     $s3, $zero, $zero
/* 17DC88 8024F3A8 AFB50024 */  sw        $s5, 0x24($sp)
/* 17DC8C 8024F3AC AFBF0028 */  sw        $ra, 0x28($sp)
D_8024F3B0:
/* 17DC90 8024F3B0 AFB20018 */  sw        $s2, 0x18($sp)
/* 17DC94 8024F3B4 AFB10014 */  sw        $s1, 0x14($sp)
D_8024F3B8:
/* 17DC98 8024F3B8 AFB00010 */  sw        $s0, 0x10($sp)
/* 17DC9C 8024F3BC F7B40030 */  sdc1      $f20, 0x30($sp)
D_8024F3C0_C0CC40:
/* 17DCA0 8024F3C0 86820012 */  lh        $v0, 0x12($s4)
/* 17DCA4 8024F3C4 8E920018 */  lw        $s2, 0x18($s4)
/* 17DCA8 8024F3C8 18400067 */  blez      $v0, .L8024F568
/* 17DCAC 8024F3CC 0260A82D */   daddu    $s5, $s3, $zero
/* 17DCB0 8024F3D0 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 17DCB4 8024F3D4 4481A800 */  mtc1      $at, $f21
/* 17DCB8 8024F3D8 4480A000 */  mtc1      $zero, $f20
/* 17DCBC 8024F3DC 26500044 */  addiu     $s0, $s2, 0x44
.L8024F3E0:
/* 17DCC0 8024F3E0 8E420000 */  lw        $v0, 0x0($s2)
/* 17DCC4 8024F3E4 5040005B */  beql      $v0, $zero, .L8024F554
/* 17DCC8 8024F3E8 26730001 */   addiu    $s3, $s3, 0x1
/* 17DCCC 8024F3EC 8E02FFE0 */  lw        $v0, -0x20($s0)
/* 17DCD0 8024F3F0 8E11FFC0 */  lw        $s1, -0x40($s0)
/* 17DCD4 8024F3F4 1040000B */  beqz      $v0, .L8024F424
D_8024F3F8:
/* 17DCD8 8024F3F8 24150001 */   addiu    $s5, $zero, 0x1
/* 17DCDC 8024F3FC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 17DCE0 8024F400 14400004 */  bnez      $v0, .L8024F414
D_8024F404:
/* 17DCE4 8024F404 AE02FFE0 */   sw       $v0, -0x20($s0)
/* 17DCE8 8024F408 0220202D */  daddu     $a0, $s1, $zero
/* 17DCEC 8024F40C 0C048BC9 */  jal       clear_entity_model_flags
/* 17DCF0 8024F410 24050020 */   addiu    $a1, $zero, 0x20
.L8024F414:
/* 17DCF4 8024F414 0C0483C1 */  jal       exec_entity_model_commandlist
/* 17DCF8 8024F418 0220202D */   daddu    $a0, $s1, $zero
/* 17DCFC 8024F41C 08093D5A */  j         .L8024F568
D_8024F420_C0CCA0:
/* 17DD00 8024F420 00000000 */   nop
.L8024F424:
/* 17DD04 8024F424 0C0483C1 */  jal       exec_entity_model_commandlist
D_8024F428:
/* 17DD08 8024F428 0220202D */   daddu    $a0, $s1, $zero
/* 17DD0C 8024F42C 8E02FFDC */  lw        $v0, -0x24($s0)
/* 17DD10 8024F430 0440000D */  bltz      $v0, .L8024F468
D_8024F434:
/* 17DD14 8024F434 00000000 */   nop
/* 17DD18 8024F438 C606FFF4 */  lwc1      $f6, -0xC($s0)
/* 17DD1C 8024F43C C600FFD0 */  lwc1      $f0, -0x30($s0)
/* 17DD20 8024F440 C604FFF8 */  lwc1      $f4, -0x8($s0)
/* 17DD24 8024F444 46003180 */  add.s     $f6, $f6, $f0
D_8024F448:
/* 17DD28 8024F448 C600FFD4 */  lwc1      $f0, -0x2C($s0)
/* 17DD2C 8024F44C C602FFFC */  lwc1      $f2, -0x4($s0)
D_8024F450:
/* 17DD30 8024F450 46002100 */  add.s     $f4, $f4, $f0
/* 17DD34 8024F454 C600FFD8 */  lwc1      $f0, -0x28($s0)
D_8024F458_C0CCD8:
/* 17DD38 8024F458 46001080 */  add.s     $f2, $f2, $f0
/* 17DD3C 8024F45C E606FFF4 */  swc1      $f6, -0xC($s0)
/* 17DD40 8024F460 E604FFF8 */  swc1      $f4, -0x8($s0)
/* 17DD44 8024F464 E602FFFC */  swc1      $f2, -0x4($s0)
.L8024F468:
/* 17DD48 8024F468 3C01800B */  lui       $at, %hi(gCameras + 0x5C4)
D_8024F46C:
/* 17DD4C 8024F46C C4202344 */  lwc1      $f0, %lo(gCameras + 0x5C4)($at)
D_8024F470:
/* 17DD50 8024F470 3C014334 */  lui       $at, (0x43340000 >> 16)
D_8024F474:
/* 17DD54 8024F474 44816000 */  mtc1      $at, $f12
D_8024F478:
/* 17DD58 8024F478 0C00A6C9 */  jal       clamp_angle
D_8024F47C:
/* 17DD5C 8024F47C 46006301 */   sub.s    $f12, $f12, $f0
D_8024F480:
/* 17DD60 8024F480 C60CFFE4 */  lwc1      $f12, -0x1C($s0)
D_8024F484:
/* 17DD64 8024F484 C602FFE8 */  lwc1      $f2, -0x18($s0)
D_8024F488:
/* 17DD68 8024F488 46026300 */  add.s     $f12, $f12, $f2
/* 17DD6C 8024F48C E600FFEC */  swc1      $f0, -0x14($s0)
/* 17DD70 8024F490 0C00A6C9 */  jal       clamp_angle
/* 17DD74 8024F494 E60CFFE4 */   swc1     $f12, -0x1C($s0)
D_8024F498:
/* 17DD78 8024F498 C602FFE8 */  lwc1      $f2, -0x18($s0)
/* 17DD7C 8024F49C 3C01802A */  lui       $at, %hi(D_8029CD90)
/* 17DD80 8024F4A0 D424CD90 */  ldc1      $f4, %lo(D_8029CD90)($at)
/* 17DD84 8024F4A4 460010A1 */  cvt.d.s   $f2, $f2
/* 17DD88 8024F4A8 46241082 */  mul.d     $f2, $f2, $f4
D_8024F4AC:
/* 17DD8C 8024F4AC 00000000 */  nop
/* 17DD90 8024F4B0 8E02FFDC */  lw        $v0, -0x24($s0)
/* 17DD94 8024F4B4 E600FFE4 */  swc1      $f0, -0x1C($s0)
/* 17DD98 8024F4B8 2842000A */  slti      $v0, $v0, 0xA
/* 17DD9C 8024F4BC 462010A0 */  cvt.s.d   $f2, $f2
D_8024F4C0_C0CD40:
/* 17DDA0 8024F4C0 10400018 */  beqz      $v0, .L8024F524
/* 17DDA4 8024F4C4 E602FFE8 */   swc1     $f2, -0x18($s0)
/* 17DDA8 8024F4C8 C604FFC4 */  lwc1      $f4, -0x3C($s0)
/* 17DDAC 8024F4CC 46002121 */  cvt.d.s   $f4, $f4
D_8024F4D0:
/* 17DDB0 8024F4D0 46342102 */  mul.d     $f4, $f4, $f20
/* 17DDB4 8024F4D4 00000000 */  nop
/* 17DDB8 8024F4D8 C600FFCC */  lwc1      $f0, -0x34($s0)
/* 17DDBC 8024F4DC 46000021 */  cvt.d.s   $f0, $f0
/* 17DDC0 8024F4E0 46340002 */  mul.d     $f0, $f0, $f20
/* 17DDC4 8024F4E4 00000000 */  nop
D_8024F4E8:
/* 17DDC8 8024F4E8 C602FFC8 */  lwc1      $f2, -0x38($s0)
/* 17DDCC 8024F4EC 460010A1 */  cvt.d.s   $f2, $f2
/* 17DDD0 8024F4F0 46341082 */  mul.d     $f2, $f2, $f20
/* 17DDD4 8024F4F4 00000000 */  nop
/* 17DDD8 8024F4F8 46202120 */  cvt.s.d   $f4, $f4
/* 17DDDC 8024F4FC 46200020 */  cvt.s.d   $f0, $f0
/* 17DDE0 8024F500 E604FFC4 */  swc1      $f4, -0x3C($s0)
/* 17DDE4 8024F504 E600FFCC */  swc1      $f0, -0x34($s0)
/* 17DDE8 8024F508 46002006 */  mov.s     $f0, $f4
/* 17DDEC 8024F50C C604FFCC */  lwc1      $f4, -0x34($s0)
/* 17DDF0 8024F510 462010A0 */  cvt.s.d   $f2, $f2
/* 17DDF4 8024F514 E602FFC8 */  swc1      $f2, -0x38($s0)
/* 17DDF8 8024F518 E600FFD0 */  swc1      $f0, -0x30($s0)
/* 17DDFC 8024F51C E602FFD4 */  swc1      $f2, -0x2C($s0)
D_8024F520_C0CDA0:
/* 17DE00 8024F520 E604FFD8 */  swc1      $f4, -0x28($s0)
.L8024F524:
/* 17DE04 8024F524 8E02FFDC */  lw        $v0, -0x24($s0)
D_8024F528:
/* 17DE08 8024F528 2442FFFF */  addiu     $v0, $v0, -0x1
/* 17DE0C 8024F52C 04410008 */  bgez      $v0, D_8024F550
/* 17DE10 8024F530 AE02FFDC */   sw       $v0, -0x24($s0)
/* 17DE14 8024F534 8E020000 */  lw        $v0, 0x0($s0)
/* 17DE18 8024F538 2442FFFF */  addiu     $v0, $v0, -0x1
/* 17DE1C 8024F53C 04410004 */  bgez      $v0, D_8024F550
/* 17DE20 8024F540 AE020000 */   sw       $v0, 0x0($s0)
/* 17DE24 8024F544 0C048B7F */  jal       free_entity_model_by_index
/* 17DE28 8024F548 0220202D */   daddu    $a0, $s1, $zero
D_8024F54C:
/* 17DE2C 8024F54C AE400000 */  sw        $zero, 0x0($s2)
D_8024F550:
/* 17DE30 8024F550 26730001 */  addiu     $s3, $s3, 0x1
.L8024F554:
/* 17DE34 8024F554 2610004C */  addiu     $s0, $s0, 0x4C
D_8024F558_C0CDD8:
/* 17DE38 8024F558 86820012 */  lh        $v0, 0x12($s4)
/* 17DE3C 8024F55C 0262102A */  slt       $v0, $s3, $v0
/* 17DE40 8024F560 1440FF9F */  bnez      $v0, .L8024F3E0
/* 17DE44 8024F564 2652004C */   addiu    $s2, $s2, 0x4C
.L8024F568:
/* 17DE48 8024F568 16A00006 */  bnez      $s5, .L8024F584
/* 17DE4C 8024F56C 00000000 */   nop
D_8024F570:
/* 17DE50 8024F570 0C00AB4B */  jal       heap_free
/* 17DE54 8024F574 8E840018 */   lw       $a0, 0x18($s4)
/* 17DE58 8024F578 0280202D */  daddu     $a0, $s4, $zero
/* 17DE5C 8024F57C 0C093BE9 */  jal       dro_02_pad_D_8024EFA4
D_8024F580:
/* 17DE60 8024F580 AC800018 */   sw       $zero, 0x18($a0)
.L8024F584:
/* 17DE64 8024F584 8FBF0028 */  lw        $ra, 0x28($sp)
D_8024F588:
/* 17DE68 8024F588 8FB50024 */  lw        $s5, 0x24($sp)
D_8024F58C:
/* 17DE6C 8024F58C 8FB40020 */  lw        $s4, 0x20($sp)
D_8024F590:
/* 17DE70 8024F590 8FB3001C */  lw        $s3, 0x1C($sp)
D_8024F594:
/* 17DE74 8024F594 8FB20018 */  lw        $s2, 0x18($sp)
D_8024F598:
/* 17DE78 8024F598 8FB10014 */  lw        $s1, 0x14($sp)
D_8024F59C:
/* 17DE7C 8024F59C 8FB00010 */  lw        $s0, 0x10($sp)
mac_04_Quizmo_Worker:
/* 17DE80 8024F5A0 D7B40030 */  ldc1      $f20, 0x30($sp)
D_8024F5A4:
/* 17DE84 8024F5A4 03E00008 */  jr        $ra
/* 17DE88 8024F5A8 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void btl_bonk_update(void* data) {
    PopupMessage* popup = data;
    Message* message = popup->message;
    s32 found = FALSE;
    s32 i;

    for (i = 0; i < popup->messageIndex; i++, message++) {
        if (message->unk_00) {
            s32 modelIdx = message->entityModelIndex;

            found = TRUE;
            if (message->unk_24 != 0) {
                message->unk_24--;
                if (message->unk_24 == 0) {
                    clear_entity_model_flags(modelIdx, MODEL_FLAG_FLAG_20);
                }
                exec_entity_model_commandlist(modelIdx);
                break;
            }

            exec_entity_model_commandlist(modelIdx);
            if (message->appearTime >= 0) {
                message->pos.x += message->vel.x;
                message->pos.y += message->vel.y;
                message->pos.z += message->vel.z;
            }
            message->rotY = clamp_angle(180.0f - gCameras[CAM_BATTLE].currentYaw);
            message->rotZ += message->rotVelZ;
            message->rotZ = clamp_angle(message->rotZ);
            message->rotVelZ *= 0.8;
            if (message->appearTime < 10) {
                message->accel.x *= 0.5;
                message->accel.y *= 0.5;
                message->accel.z *= 0.5;
                message->vel.x = message->accel.x;
                message->vel.y = message->accel.y;
                message->vel.z = message->accel.z;
            }

            message->appearTime--;
            if (message->appearTime < 0) {
                message->deleteTime--;
                if (message->deleteTime < 0) {
                    free_entity_model_by_index(modelIdx);
                    message->unk_00 = FALSE;
                }
            }
        }
    }

    if (!found) {
        heap_free(popup->message);
        popup->message = NULL;
        free_popup(popup);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel bombette_breaking_update
/* 389030 E0084660 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 389034 E0084664 AFBF0010 */  sw        $ra, 0x10($sp)
/* 389038 E0084668 F7B80028 */  sdc1      $f24, 0x28($sp)
/* 38903C E008466C F7B60020 */  sdc1      $f22, 0x20($sp)
/* 389040 E0084670 F7B40018 */  sdc1      $f20, 0x18($sp)
/* 389044 E0084674 8C85000C */  lw        $a1, 0xC($a0)
/* 389048 E0084678 8CA20048 */  lw        $v0, 0x48($a1)
/* 38904C E008467C 8CA30044 */  lw        $v1, 0x44($a1)
/* 389050 E0084680 24420001 */  addiu     $v0, $v0, 0x1
/* 389054 E0084684 2463FFFF */  addiu     $v1, $v1, -0x1
/* 389058 E0084688 ACA20048 */  sw        $v0, 0x48($a1)
/* 38905C E008468C 04610005 */  bgez      $v1, .LE00846A4
/* 389060 E0084690 ACA30044 */   sw       $v1, 0x44($a1)
/* 389064 E0084694 0C080128 */  jal       shim_remove_effect
/* 389068 E0084698 00000000 */   nop
/* 38906C E008469C 08021233 */  j         .LE00848CC
/* 389070 E00846A0 00000000 */   nop
.LE00846A4:
/* 389074 E00846A4 44831000 */  mtc1      $v1, $f2
/* 389078 E00846A8 00000000 */  nop
/* 38907C E00846AC 468010A0 */  cvt.s.w   $f2, $f2
/* 389080 E00846B0 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 389084 E00846B4 44810000 */  mtc1      $at, $f0
/* 389088 E00846B8 C4AA0004 */  lwc1      $f10, 0x4($a1)
/* 38908C E00846BC 4600103C */  c.lt.s    $f2, $f0
/* 389090 E00846C0 00000000 */  nop
/* 389094 E00846C4 45000008 */  bc1f      .LE00846E8
/* 389098 E00846C8 00000000 */   nop
/* 38909C E00846CC 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3890A0 E00846D0 44810000 */  mtc1      $at, $f0
/* 3890A4 E00846D4 00000000 */  nop
/* 3890A8 E00846D8 46001002 */  mul.s     $f0, $f2, $f0
/* 3890AC E00846DC 00000000 */  nop
/* 3890B0 E00846E0 4600060D */  trunc.w.s $f24, $f0
/* 3890B4 E00846E4 E4B8004C */  swc1      $f24, 0x4C($a1)
.LE00846E8:
/* 3890B8 E00846E8 C4A20038 */  lwc1      $f2, 0x38($a1)
/* 3890BC E00846EC C4A0003C */  lwc1      $f0, 0x3C($a1)
/* 3890C0 E00846F0 46020001 */  sub.s     $f0, $f0, $f2
/* 3890C4 E00846F4 3C01E008 */  lui       $at, (0xE0084E50 >> 16)
/* 3890C8 E00846F8 D4244E50 */  ldc1      $f4, (0xE0084E50 & 0xFFFF)($at)
/* 3890CC E00846FC 46000021 */  cvt.d.s   $f0, $f0
/* 3890D0 E0084700 46240002 */  mul.d     $f0, $f0, $f4
/* 3890D4 E0084704 00000000 */  nop
/* 3890D8 E0084708 460010A1 */  cvt.d.s   $f2, $f2
/* 3890DC E008470C 46201080 */  add.d     $f2, $f2, $f0
/* 3890E0 E0084710 24060001 */  addiu     $a2, $zero, 0x1
/* 3890E4 E0084714 462010A0 */  cvt.s.d   $f2, $f2
/* 3890E8 E0084718 E4A20038 */  swc1      $f2, 0x38($a1)
/* 3890EC E008471C 8C820008 */  lw        $v0, 0x8($a0)
/* 3890F0 E0084720 00C2102A */  slt       $v0, $a2, $v0
/* 3890F4 E0084724 10400069 */  beqz      $v0, .LE00848CC
/* 3890F8 E0084728 24A50050 */   addiu    $a1, $a1, 0x50
/* 3890FC E008472C 24A30030 */  addiu     $v1, $a1, 0x30
/* 389100 E0084730 3C01E008 */  lui       $at, (0xE0084E58 >> 16)
/* 389104 E0084734 D42C4E58 */  ldc1      $f12, (0xE0084E58 & 0xFFFF)($at)
/* 389108 E0084738 44808000 */  mtc1      $zero, $f16
/* 38910C E008473C 3C01E008 */  lui       $at, (0xE0084E60 >> 16)
/* 389110 E0084740 D4364E60 */  ldc1      $f22, (0xE0084E60 & 0xFFFF)($at)
/* 389114 E0084744 3C01E008 */  lui       $at, (0xE0084E68 >> 16)
/* 389118 E0084748 D42E4E68 */  ldc1      $f14, (0xE0084E68 & 0xFFFF)($at)
/* 38911C E008474C 3C01E008 */  lui       $at, (0xE0084E70 >> 16)
/* 389120 E0084750 D4344E70 */  ldc1      $f20, (0xE0084E70 & 0xFFFF)($at)
/* 389124 E0084754 3C01E008 */  lui       $at, (0xE0084E78 >> 16)
/* 389128 E0084758 D4324E78 */  ldc1      $f18, (0xE0084E78 & 0xFFFF)($at)
.LE008475C:
/* 38912C E008475C C460FFF0 */  lwc1      $f0, -0x10($v1)
/* 389130 E0084760 46000021 */  cvt.d.s   $f0, $f0
/* 389134 E0084764 462C0002 */  mul.d     $f0, $f0, $f12
/* 389138 E0084768 00000000 */  nop
/* 38913C E008476C C462FFF4 */  lwc1      $f2, -0xC($v1)
/* 389140 E0084770 460010A1 */  cvt.d.s   $f2, $f2
/* 389144 E0084774 462C1082 */  mul.d     $f2, $f2, $f12
/* 389148 E0084778 00000000 */  nop
/* 38914C E008477C C464FFF8 */  lwc1      $f4, -0x8($v1)
/* 389150 E0084780 46002121 */  cvt.d.s   $f4, $f4
/* 389154 E0084784 462C2102 */  mul.d     $f4, $f4, $f12
/* 389158 E0084788 00000000 */  nop
/* 38915C E008478C C468FFD8 */  lwc1      $f8, -0x28($v1)
/* 389160 E0084790 C466FFDC */  lwc1      $f6, -0x24($v1)
/* 389164 E0084794 46200020 */  cvt.s.d   $f0, $f0
/* 389168 E0084798 462010A0 */  cvt.s.d   $f2, $f2
/* 38916C E008479C E460FFF0 */  swc1      $f0, -0x10($v1)
/* 389170 E00847A0 46004200 */  add.s     $f8, $f8, $f0
/* 389174 E00847A4 E462FFF4 */  swc1      $f2, -0xC($v1)
/* 389178 E00847A8 46001006 */  mov.s     $f0, $f2
/* 38917C E00847AC 46003180 */  add.s     $f6, $f6, $f0
/* 389180 E00847B0 C460FFE0 */  lwc1      $f0, -0x20($v1)
/* 389184 E00847B4 46202120 */  cvt.s.d   $f4, $f4
/* 389188 E00847B8 E464FFF8 */  swc1      $f4, -0x8($v1)
/* 38918C E00847BC 46002086 */  mov.s     $f2, $f4
/* 389190 E00847C0 46020000 */  add.s     $f0, $f0, $f2
/* 389194 E00847C4 E466FFDC */  swc1      $f6, -0x24($v1)
/* 389198 E00847C8 46003086 */  mov.s     $f2, $f6
/* 38919C E00847CC E468FFD8 */  swc1      $f8, -0x28($v1)
/* 3891A0 E00847D0 460A103C */  c.lt.s    $f2, $f10
/* 3891A4 E00847D4 00000000 */  nop
/* 3891A8 E00847D8 4500000C */  bc1f      .LE008480C
/* 3891AC E00847DC E460FFE0 */   swc1     $f0, -0x20($v1)
/* 3891B0 E00847E0 C460FFF4 */  lwc1      $f0, -0xC($v1)
/* 3891B4 E00847E4 4610003C */  c.lt.s    $f0, $f16
/* 3891B8 E00847E8 00000000 */  nop
/* 3891BC E00847EC 45000007 */  bc1f      .LE008480C
/* 3891C0 E00847F0 00000000 */   nop
/* 3891C4 E00847F4 46000021 */  cvt.d.s   $f0, $f0
/* 3891C8 E00847F8 46360002 */  mul.d     $f0, $f0, $f22
/* 3891CC E00847FC 00000000 */  nop
/* 3891D0 E0084800 E46AFFDC */  swc1      $f10, -0x24($v1)
/* 3891D4 E0084804 46200020 */  cvt.s.d   $f0, $f0
/* 3891D8 E0084808 E460FFF4 */  swc1      $f0, -0xC($v1)
.LE008480C:
/* 3891DC E008480C C460FFFC */  lwc1      $f0, -0x4($v1)
/* 3891E0 E0084810 46000021 */  cvt.d.s   $f0, $f0
/* 3891E4 E0084814 462E0002 */  mul.d     $f0, $f0, $f14
/* 3891E8 E0084818 00000000 */  nop
/* 3891EC E008481C C4640004 */  lwc1      $f4, 0x4($v1)
/* 3891F0 E0084820 46002121 */  cvt.d.s   $f4, $f4
/* 3891F4 E0084824 462E2102 */  mul.d     $f4, $f4, $f14
/* 3891F8 E0084828 00000000 */  nop
/* 3891FC E008482C C4620000 */  lwc1      $f2, 0x0($v1)
/* 389200 E0084830 460010A1 */  cvt.d.s   $f2, $f2
/* 389204 E0084834 46341081 */  sub.d     $f2, $f2, $f20
/* 389208 E0084838 C466FFE4 */  lwc1      $f6, -0x1C($v1)
/* 38920C E008483C 462010A0 */  cvt.s.d   $f2, $f2
/* 389210 E0084840 E4620000 */  swc1      $f2, 0x0($v1)
/* 389214 E0084844 C462FFE8 */  lwc1      $f2, -0x18($v1)
/* 389218 E0084848 46200020 */  cvt.s.d   $f0, $f0
/* 38921C E008484C 46003180 */  add.s     $f6, $f6, $f0
/* 389220 E0084850 E460FFFC */  swc1      $f0, -0x4($v1)
/* 389224 E0084854 C4600000 */  lwc1      $f0, 0x0($v1)
/* 389228 E0084858 46202120 */  cvt.s.d   $f4, $f4
/* 38922C E008485C E4640004 */  swc1      $f4, 0x4($v1)
/* 389230 E0084860 C464FFEC */  lwc1      $f4, -0x14($v1)
/* 389234 E0084864 46001080 */  add.s     $f2, $f2, $f0
/* 389238 E0084868 C4600004 */  lwc1      $f0, 0x4($v1)
/* 38923C E008486C 46002100 */  add.s     $f4, $f4, $f0
/* 389240 E0084870 E466FFE4 */  swc1      $f6, -0x1C($v1)
/* 389244 E0084874 E462FFE8 */  swc1      $f2, -0x18($v1)
/* 389248 E0084878 46001006 */  mov.s     $f0, $f2
/* 38924C E008487C 460A003C */  c.lt.s    $f0, $f10
/* 389250 E0084880 00000000 */  nop
/* 389254 E0084884 4500000C */  bc1f      .LE00848B8
/* 389258 E0084888 E464FFEC */   swc1     $f4, -0x14($v1)
/* 38925C E008488C C4600000 */  lwc1      $f0, 0x0($v1)
/* 389260 E0084890 4610003C */  c.lt.s    $f0, $f16
/* 389264 E0084894 00000000 */  nop
/* 389268 E0084898 45020008 */  bc1fl     .LE00848BC
/* 38926C E008489C 24C60001 */   addiu    $a2, $a2, 0x1
/* 389270 E00848A0 46000021 */  cvt.d.s   $f0, $f0
/* 389274 E00848A4 46320002 */  mul.d     $f0, $f0, $f18
/* 389278 E00848A8 00000000 */  nop
/* 38927C E00848AC E46AFFE8 */  swc1      $f10, -0x18($v1)
/* 389280 E00848B0 46200020 */  cvt.s.d   $f0, $f0
/* 389284 E00848B4 E4600000 */  swc1      $f0, 0x0($v1)
.LE00848B8:
/* 389288 E00848B8 24C60001 */  addiu     $a2, $a2, 0x1
.LE00848BC:
/* 38928C E00848BC 8C820008 */  lw        $v0, 0x8($a0)
/* 389290 E00848C0 00C2102A */  slt       $v0, $a2, $v0
/* 389294 E00848C4 1440FFA5 */  bnez      $v0, .LE008475C
/* 389298 E00848C8 24630050 */   addiu    $v1, $v1, 0x50
.LE00848CC:
/* 38929C E00848CC 8FBF0010 */  lw        $ra, 0x10($sp)
/* 3892A0 E00848D0 D7B80028 */  ldc1      $f24, 0x28($sp)
/* 3892A4 E00848D4 D7B60020 */  ldc1      $f22, 0x20($sp)
/* 3892A8 E00848D8 D7B40018 */  ldc1      $f20, 0x18($sp)
/* 3892AC E00848DC 03E00008 */  jr        $ra
/* 3892B0 E00848E0 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void bombette_breaking_update(EffectInstance* effect) {
    BombetteBreakingFXData* data = effect->data.bombetteBreaking;
    f32 unk_04;
    s32 i;

    data->unk_48++;
    data->timeLeft--;

    if (data->timeLeft < 0) {
        shim_remove_effect(effect);
        return;
    }

    unk_04 = data->unk_04;

    if (data->timeLeft < 25.0f) {
        data->alpha = data->timeLeft * 10.0f;
    }
    data->unk_38 += (data->unk_3C - data->unk_38) * 0.1;

    data++;
    for (i = 1; i < effect->numParts; i++, data++) {
        data->unk_20.x *= 0.9;
        data->unk_20.y *= 0.9;
        data->unk_20.z *= 0.9;
        data->center.x += data->unk_20.x;
        data->center.y += data->unk_20.y;
        data->center.z += data->unk_20.z;
        if (data->center.y < unk_04 && data->unk_20.y < 0.0f) {
            data->center.y = unk_04;
            data->unk_20.y *= -0.7;
        }

        data->unk_2C.x *= 0.95;
        data->unk_2C.y -= 0.4;
        data->unk_2C.z *= 0.95;
        data->unk_14.x += data->unk_2C.x;
        data->unk_14.y += data->unk_2C.y;
        data->unk_14.z += data->unk_2C.z;
        if (data->unk_14.y < unk_04 && data->unk_2C.y < 0.0f) {
            data->unk_14.y = unk_04;
            data->unk_2C.y *= -0.4;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel au_sfx_init
/* 26840 8004B440 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 26844 8004B444 AFB00010 */  sw        $s0, 0x10($sp)
/* 26848 8004B448 0080802D */  daddu     $s0, $a0, $zero
/* 2684C 8004B44C 3C030006 */  lui       $v1, (0x6A25E >> 16)
/* 26850 8004B450 3463A25E */  ori       $v1, $v1, (0x6A25E & 0xFFFF)
/* 26854 8004B454 3C020004 */  lui       $v0, (0x4C4B4 >> 16)
/* 26858 8004B458 8FA40028 */  lw        $a0, 0x28($sp)
/* 2685C 8004B45C 3442C4B4 */  ori       $v0, $v0, (0x4C4B4 & 0xFFFF)
/* 26860 8004B460 AFBF0014 */  sw        $ra, 0x14($sp)
/* 26864 8004B464 AE070000 */  sw        $a3, 0x0($s0)
/* 26868 8004B468 AE020034 */  sw        $v0, 0x34($s0)
/* 2686C 8004B46C AE03003C */  sw        $v1, 0x3C($s0)
/* 26870 8004B470 AE030038 */  sw        $v1, 0x38($s0)
/* 26874 8004B474 A20500BC */  sb        $a1, 0xBC($s0)
/* 26878 8004B478 308200FF */  andi      $v0, $a0, 0xFF
/* 2687C 8004B47C 2C420011 */  sltiu     $v0, $v0, 0x11
/* 26880 8004B480 14400004 */  bnez      $v0, .L8004B494
/* 26884 8004B484 A20600BE */   sb       $a2, 0xBE($s0)
/* 26888 8004B488 24020010 */  addiu     $v0, $zero, 0x10
/* 2688C 8004B48C 08012D26 */  j         .L8004B498
/* 26890 8004B490 A20200BD */   sb       $v0, 0xBD($s0)
.L8004B494:
/* 26894 8004B494 A20400BD */  sb        $a0, 0xBD($s0)
.L8004B498:
/* 26898 8004B498 0000202D */  daddu     $a0, $zero, $zero
/* 2689C 8004B49C 24060040 */  addiu     $a2, $zero, 0x40
/* 268A0 8004B4A0 240500B0 */  addiu     $a1, $zero, 0xB0
/* 268A4 8004B4A4 2403016C */  addiu     $v1, $zero, 0x16C
/* 268A8 8004B4A8 34028000 */  ori       $v0, $zero, 0x8000
/* 268AC 8004B4AC AE02005C */  sw        $v0, 0x5C($s0)
/* 268B0 8004B4B0 A60200B8 */  sh        $v0, 0xB8($s0)
/* 268B4 8004B4B4 AE000030 */  sw        $zero, 0x30($s0)
/* 268B8 8004B4B8 AE000060 */  sw        $zero, 0x60($s0)
.L8004B4BC:
/* 268BC 8004B4BC 02031021 */  addu      $v0, $s0, $v1
/* 268C0 8004B4C0 24840001 */  addiu     $a0, $a0, 0x1
/* 268C4 8004B4C4 AC400000 */  sw        $zero, 0x0($v0)
/* 268C8 8004B4C8 A440005C */  sh        $zero, 0x5C($v0)
/* 268CC 8004B4CC A440008E */  sh        $zero, 0x8E($v0)
/* 268D0 8004B4D0 A4400090 */  sh        $zero, 0x90($v0)
/* 268D4 8004B4D4 A4400092 */  sh        $zero, 0x92($v0)
/* 268D8 8004B4D8 A0400094 */  sb        $zero, 0x94($v0)
/* 268DC 8004B4DC A040009B */  sb        $zero, 0x9B($v0)
/* 268E0 8004B4E0 A040009C */  sb        $zero, 0x9C($v0)
/* 268E4 8004B4E4 A040009D */  sb        $zero, 0x9D($v0)
/* 268E8 8004B4E8 A040009E */  sb        $zero, 0x9E($v0)
/* 268EC 8004B4EC A040009F */  sb        $zero, 0x9F($v0)
/* 268F0 8004B4F0 A0400099 */  sb        $zero, 0x99($v0)
/* 268F4 8004B4F4 A0400078 */  sb        $zero, 0x78($v0)
/* 268F8 8004B4F8 A0400079 */  sb        $zero, 0x79($v0)
/* 268FC 8004B4FC A040007A */  sb        $zero, 0x7A($v0)
/* 26900 8004B500 A046007B */  sb        $a2, 0x7B($v0)
/* 26904 8004B504 A040007C */  sb        $zero, 0x7C($v0)
/* 26908 8004B508 A045007D */  sb        $a1, 0x7D($v0)
/* 2690C 8004B50C A040007E */  sb        $zero, 0x7E($v0)
/* 26910 8004B510 A040007F */  sb        $zero, 0x7F($v0)
/* 26914 8004B514 2C820008 */  sltiu     $v0, $a0, 0x8
/* 26918 8004B518 1440FFE8 */  bnez      $v0, .L8004B4BC
/* 2691C 8004B51C 246300AC */   addiu    $v1, $v1, 0xAC
/* 26920 8004B520 0000202D */  daddu     $a0, $zero, $zero
/* 26924 8004B524 0200182D */  daddu     $v1, $s0, $zero
.L8004B528:
/* 26928 8004B528 AC600090 */  sw        $zero, 0x90($v1)
/* 2692C 8004B52C 24840001 */  addiu     $a0, $a0, 0x1
/* 26930 8004B530 2C820004 */  sltiu     $v0, $a0, 0x4
/* 26934 8004B534 1440FFFC */  bnez      $v0, .L8004B528
/* 26938 8004B538 24630004 */   addiu    $v1, $v1, 0x4
/* 2693C 8004B53C 0000202D */  daddu     $a0, $zero, $zero
/* 26940 8004B540 0200182D */  daddu     $v1, $s0, $zero
.L8004B544:
/* 26944 8004B544 A46000A0 */  sh        $zero, 0xA0($v1)
/* 26948 8004B548 24840001 */  addiu     $a0, $a0, 0x1
/* 2694C 8004B54C 2C820004 */  sltiu     $v0, $a0, 0x4
/* 26950 8004B550 1440FFFC */  bnez      $v0, .L8004B544
/* 26954 8004B554 24630006 */   addiu    $v1, $v1, 0x6
/* 26958 8004B558 0200202D */  daddu     $a0, $s0, $zero
/* 2695C 8004B55C 0000282D */  daddu     $a1, $zero, $zero
/* 26960 8004B560 0C012E95 */  jal       au_sfx_set_state
/* 26964 8004B564 AE000168 */   sw       $zero, 0x168($s0)
/* 26968 8004B568 0C012DA6 */  jal       au_sfx_clear_queue
/* 2696C 8004B56C 0200202D */   daddu    $a0, $s0, $zero
/* 26970 8004B570 26040040 */  addiu     $a0, $s0, 0x40
/* 26974 8004B574 0000282D */  daddu     $a1, $zero, $zero
/* 26978 8004B578 24067FFF */  addiu     $a2, $zero, 0x7FFF
/* 2697C 8004B57C 0C014E5D */  jal       au_fade_init
/* 26980 8004B580 00C0382D */   daddu    $a3, $a2, $zero
/* 26984 8004B584 920400BE */  lbu       $a0, 0xBE($s0)
/* 26988 8004B588 96050040 */  lhu       $a1, 0x40($s0)
/* 2698C 8004B58C 0C014EA6 */  jal       au_fade_set_volume
/* 26990 8004B590 8E06005C */   lw       $a2, 0x5C($s0)
/* 26994 8004B594 0200202D */  daddu     $a0, $s0, $zero
/* 26998 8004B598 0000282D */  daddu     $a1, $zero, $zero
/* 2699C 8004B59C 240200FF */  addiu     $v0, $zero, 0xFF
/* 269A0 8004B5A0 A082008C */  sb        $v0, 0x8C($a0)
/* 269A4 8004B5A4 3C028008 */  lui       $v0, %hi(D_80078290)
/* 269A8 8004B5A8 24428290 */  addiu     $v0, $v0, %lo(D_80078290)
/* 269AC 8004B5AC AC820064 */  sw        $v0, 0x64($a0)
/* 269B0 8004B5B0 3C028008 */  lui       $v0, %hi(D_800782F8)
/* 269B4 8004B5B4 244282F8 */  addiu     $v0, $v0, %lo(D_800782F8)
/* 269B8 8004B5B8 AC820068 */  sw        $v0, 0x68($a0)
/* 269BC 8004B5BC 3C028008 */  lui       $v0, %hi(D_80078320)
/* 269C0 8004B5C0 24428320 */  addiu     $v0, $v0, %lo(D_80078320)
/* 269C4 8004B5C4 AC82006C */  sw        $v0, 0x6C($a0)
/* 269C8 8004B5C8 3C028008 */  lui       $v0, %hi(D_80078348)
/* 269CC 8004B5CC 24428348 */  addiu     $v0, $v0, %lo(D_80078348)
/* 269D0 8004B5D0 AC820070 */  sw        $v0, 0x70($a0)
/* 269D4 8004B5D4 AC820074 */  sw        $v0, 0x74($a0)
/* 269D8 8004B5D8 AC820078 */  sw        $v0, 0x78($a0)
/* 269DC 8004B5DC AC82007C */  sw        $v0, 0x7C($a0)
/* 269E0 8004B5E0 AC820080 */  sw        $v0, 0x80($a0)
/* 269E4 8004B5E4 24020010 */  addiu     $v0, $zero, 0x10
/* 269E8 8004B5E8 A0820084 */  sb        $v0, 0x84($a0)
/* 269EC 8004B5EC 24020020 */  addiu     $v0, $zero, 0x20
/* 269F0 8004B5F0 A0820085 */  sb        $v0, 0x85($a0)
/* 269F4 8004B5F4 A0820086 */  sb        $v0, 0x86($a0)
/* 269F8 8004B5F8 A0820087 */  sb        $v0, 0x87($a0)
/* 269FC 8004B5FC A0820088 */  sb        $v0, 0x88($a0)
/* 26A00 8004B600 24020030 */  addiu     $v0, $zero, 0x30
/* 26A04 8004B604 A0820089 */  sb        $v0, 0x89($a0)
/* 26A08 8004B608 24020040 */  addiu     $v0, $zero, 0x40
/* 26A0C 8004B60C A082008A */  sb        $v0, 0x8A($a0)
/* 26A10 8004B610 24020050 */  addiu     $v0, $zero, 0x50
/* 26A14 8004B614 0C012E79 */  jal       au_sfx_set_reverb_type
/* 26A18 8004B618 A082008B */   sb       $v0, 0x8B($a0)
/* 26A1C 8004B61C 8FBF0014 */  lw        $ra, 0x14($sp)
/* 26A20 8004B620 8FB00010 */  lw        $s0, 0x10($sp)
/* 26A24 8004B624 03E00008 */  jr        $ra
/* 26A28 8004B628 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void au_sfx_init(SoundManager* manager, u8 priority, u8 busId, AuGlobals* globals, u8 minVoiceIdx) {
    u32 i;
    s32 c = 434782;

    manager->globals = globals;
    manager->nextUpdateStep = 312500;
    manager->nextUpdateCounter = c;
    manager->nextUpdateInterval = c;
    manager->priority = priority;
    manager->busId = busId;

    if (minVoiceIdx > 16) {
        manager->sfxPlayerSelector = 16;
    } else {
        manager->sfxPlayerSelector = minVoiceIdx;
    }

    manager->busVolume = 0x8000;
    manager->baseVolume = 0x8000;
    manager->playCounter = 0;
    manager->randomValue = 0;

    for (i = 0; i < ARRAY_COUNT(manager->players); i++) {
        SoundPlayer* player = &manager->players[i];

        player->sefDataReadPos = NULL;
        player->sfxVolume = 0;
        player->delay = 0;
        player->playLength = 0;
        player->coarseTune = 0;
        player->fineTune = 0;
        player->sfxPan = 0;
        player->reverb = 0;
        player->instrumentIndex = 0;
        player->envelopePreset = 0;
        player->playVelocity = 0;
        player->exclusiveID = 0;
        player->cmdList_mode2[0] = 0;
        player->cmdList_mode2[1] = 0;
        player->cmdList_mode2[2] = 0;
        player->cmdList_mode2[3] = 64; // default pan
        player->cmdList_mode2[4] = 0;
        player->cmdList_mode2[5] = 0x80 + 48; // default tune, higher bit is meaningless
        player->cmdList_mode2[6] = 0;
        player->cmdList_mode2[7] = 0;
    }

    for (i = 0; i < ARRAY_COUNT(manager->bgmSounds); i++) {
        manager->bgmSounds[i].s32 = 0;
    }

    for (i = 0; i < ARRAY_COUNT(manager->customCmdList); i++) {
        manager->customCmdList[i].data[0] = 0;
    }

    manager->resetPending = FALSE;
    au_sfx_set_state(manager, SND_MANAGER_STATE_ENABLED);
    au_sfx_clear_queue(manager);
    au_fade_init(&manager->fadeInfo, 0, 0x7FFF, 0x7FFF);
    au_fade_set_volume(manager->busId, manager->fadeInfo.currentVolume.u16, manager->busVolume);
    manager->lastCustomEffectIdx = 0xFF;

    manager->customReverbParams[0] = CUSTOM_SMALL_ROOM_PARAMS;
    manager->customReverbParams[1] = CUSTOM_ECHO_PARAMS_1;
    manager->customReverbParams[2] = CUSTOM_ECHO_PARAMS_2;
    manager->customReverbParams[3] = CUSTOM_ECHO_PARAMS_3;
    manager->customReverbParams[4] = CUSTOM_ECHO_PARAMS_3;
    manager->customReverbParams[5] = CUSTOM_ECHO_PARAMS_3;
    manager->customReverbParams[6] = CUSTOM_ECHO_PARAMS_3;
    manager->customReverbParams[7] = CUSTOM_ECHO_PARAMS_3;

    manager->customReverbAmounts[0] = 0x10;
    manager->customReverbAmounts[1] = 0x20;
    manager->customReverbAmounts[2] = 0x20;
    manager->customReverbAmounts[3] = 0x20;
    manager->customReverbAmounts[4] = 0x20;
    manager->customReverbAmounts[5] = 0x30;
    manager->customReverbAmounts[6] = 0x40;
    manager->customReverbAmounts[7] = 0x50;

    au_sfx_set_reverb_type(manager, 0);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel cloud_puff_main
/* 32E490 E0014000 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 32E494 E0014004 F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 32E498 E0014008 46006686 */  mov.s     $f26, $f12
/* 32E49C E001400C F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 32E4A0 E0014010 46007706 */  mov.s     $f28, $f14
/* 32E4A4 E0014014 27A40010 */  addiu     $a0, $sp, 0x10
/* 32E4A8 E0014018 F7BE0068 */  sdc1      $f30, 0x68($sp)
/* 32E4AC E001401C 4486F000 */  mtc1      $a2, $f30
/* 32E4B0 E0014020 3C02E001 */  lui       $v0, %hi(cloud_puff_init)
/* 32E4B4 E0014024 24424258 */  addiu     $v0, $v0, %lo(cloud_puff_init)
/* 32E4B8 E0014028 AFA20018 */  sw        $v0, 0x18($sp)
/* 32E4BC E001402C 3C02E001 */  lui       $v0, %hi(cloud_puff_update)
/* 32E4C0 E0014030 24424260 */  addiu     $v0, $v0, %lo(cloud_puff_update)
/* 32E4C4 E0014034 AFA2001C */  sw        $v0, 0x1C($sp)
/* 32E4C8 E0014038 3C02E001 */  lui       $v0, %hi(cloud_puff_render)
/* 32E4CC E001403C 2442449C */  addiu     $v0, $v0, %lo(cloud_puff_render)
/* 32E4D0 E0014040 AFA20020 */  sw        $v0, 0x20($sp)
/* 32E4D4 E0014044 2402000A */  addiu     $v0, $zero, 0xA
/* 32E4D8 E0014048 AFBF003C */  sw        $ra, 0x3C($sp)
/* 32E4DC E001404C AFB40038 */  sw        $s4, 0x38($sp)
/* 32E4E0 E0014050 AFB30034 */  sw        $s3, 0x34($sp)
/* 32E4E4 E0014054 AFB20030 */  sw        $s2, 0x30($sp)
/* 32E4E8 E0014058 AFB1002C */  sw        $s1, 0x2C($sp)
/* 32E4EC E001405C AFB00028 */  sw        $s0, 0x28($sp)
/* 32E4F0 E0014060 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 32E4F4 E0014064 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 32E4F8 E0014068 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 32E4FC E001406C AFA7007C */  sw        $a3, 0x7C($sp)
/* 32E500 E0014070 AFA00010 */  sw        $zero, 0x10($sp)
/* 32E504 E0014074 AFA00024 */  sw        $zero, 0x24($sp)
/* 32E508 E0014078 0C080124 */  jal       shim_create_effect_instance
/* 32E50C E001407C AFA20014 */   sw       $v0, 0x14($sp)
/* 32E510 E0014080 24040260 */  addiu     $a0, $zero, 0x260
/* 32E514 E0014084 24140008 */  addiu     $s4, $zero, 0x8
/* 32E518 E0014088 0040802D */  daddu     $s0, $v0, $zero
/* 32E51C E001408C 0C08012C */  jal       shim_general_heap_malloc
/* 32E520 E0014090 AE140008 */   sw       $s4, 0x8($s0)
/* 32E524 E0014094 0040882D */  daddu     $s1, $v0, $zero
/* 32E528 E0014098 16200003 */  bnez      $s1, .LE00140A8
/* 32E52C E001409C AE11000C */   sw       $s1, 0xC($s0)
.LE00140A0:
/* 32E530 E00140A0 08005028 */  j         .LE00140A0
/* 32E534 E00140A4 00000000 */   nop
.LE00140A8:
/* 32E538 E00140A8 0220202D */  daddu     $a0, $s1, $zero
/* 32E53C E00140AC 00142880 */  sll       $a1, $s4, 2
/* 32E540 E00140B0 00B42821 */  addu      $a1, $a1, $s4
/* 32E544 E00140B4 00052880 */  sll       $a1, $a1, 2
/* 32E548 E00140B8 00B42823 */  subu      $a1, $a1, $s4
/* 32E54C E00140BC 0C080130 */  jal       shim_mem_clear
/* 32E550 E00140C0 00052880 */   sll      $a1, $a1, 2
/* 32E554 E00140C4 12800056 */  beqz      $s4, .LE0014220
/* 32E558 E00140C8 0000902D */   daddu    $s2, $zero, $zero
/* 32E55C E00140CC 26300048 */  addiu     $s0, $s1, 0x48
/* 32E560 E00140D0 0240982D */  daddu     $s3, $s2, $zero
/* 32E564 E00140D4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 32E568 E00140D8 4481C000 */  mtc1      $at, $f24
/* 32E56C E00140DC 3C01E001 */  lui       $at, (0xE0014780 >> 16)
/* 32E570 E00140E0 D4364780 */  ldc1      $f22, (0xE0014780 & 0xFFFF)($at)
.LE00140E4:
/* 32E574 E00140E4 2404000A */  addiu     $a0, $zero, 0xA
/* 32E578 E00140E8 24020001 */  addiu     $v0, $zero, 0x1
/* 32E57C E00140EC AE220000 */  sw        $v0, 0x0($s1)
/* 32E580 E00140F0 240200FF */  addiu     $v0, $zero, 0xFF
/* 32E584 E00140F4 AE00FFF8 */  sw        $zero, -0x8($s0)
/* 32E588 E00140F8 E61AFFC4 */  swc1      $f26, -0x3C($s0)
/* 32E58C E00140FC E61CFFC8 */  swc1      $f28, -0x38($s0)
/* 32E590 E0014100 E61EFFCC */  swc1      $f30, -0x34($s0)
/* 32E594 E0014104 E618FFD0 */  swc1      $f24, -0x30($s0)
/* 32E598 E0014108 E618FFD4 */  swc1      $f24, -0x2C($s0)
/* 32E59C E001410C E618FFD8 */  swc1      $f24, -0x28($s0)
/* 32E5A0 E0014110 0C080138 */  jal       shim_rand_int
/* 32E5A4 E0014114 A202FFC0 */   sb       $v0, -0x40($s0)
/* 32E5A8 E0014118 44820000 */  mtc1      $v0, $f0
/* 32E5AC E001411C 00000000 */  nop
/* 32E5B0 E0014120 46800021 */  cvt.d.w   $f0, $f0
/* 32E5B4 E0014124 46360002 */  mul.d     $f0, $f0, $f22
/* 32E5B8 E0014128 00000000 */  nop
/* 32E5BC E001412C 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 32E5C0 E0014130 44811800 */  mtc1      $at, $f3
/* 32E5C4 E0014134 44801000 */  mtc1      $zero, $f2
/* 32E5C8 E0014138 00000000 */  nop
/* 32E5CC E001413C 46220000 */  add.d     $f0, $f0, $f2
/* 32E5D0 E0014140 2404000A */  addiu     $a0, $zero, 0xA
/* 32E5D4 E0014144 46200020 */  cvt.s.d   $f0, $f0
/* 32E5D8 E0014148 0C080138 */  jal       shim_rand_int
/* 32E5DC E001414C E600FFDC */   swc1     $f0, -0x24($s0)
/* 32E5E0 E0014150 44820000 */  mtc1      $v0, $f0
/* 32E5E4 E0014154 00000000 */  nop
/* 32E5E8 E0014158 46800021 */  cvt.d.w   $f0, $f0
/* 32E5EC E001415C 46360002 */  mul.d     $f0, $f0, $f22
/* 32E5F0 E0014160 00000000 */  nop
/* 32E5F4 E0014164 3C01E001 */  lui       $at, (0xE0014788 >> 16)
/* 32E5F8 E0014168 D4224788 */  ldc1      $f2, (0xE0014788 & 0xFFFF)($at)
/* 32E5FC E001416C 26520001 */  addiu     $s2, $s2, 0x1
/* 32E600 E0014170 46220000 */  add.d     $f0, $f0, $f2
/* 32E604 E0014174 2631004C */  addiu     $s1, $s1, 0x4C
/* 32E608 E0014178 2404003C */  addiu     $a0, $zero, 0x3C
/* 32E60C E001417C 46200020 */  cvt.s.d   $f0, $f0
/* 32E610 E0014180 0C080000 */  jal       effect_rand_int
/* 32E614 E0014184 E600FFE0 */   swc1     $f0, -0x20($s0)
/* 32E618 E0014188 44936000 */  mtc1      $s3, $f12
/* 32E61C E001418C 00000000 */  nop
/* 32E620 E0014190 46806320 */  cvt.s.w   $f12, $f12
/* 32E624 E0014194 2673002D */  addiu     $s3, $s3, 0x2D
/* 32E628 E0014198 C7A8007C */  lwc1      $f8, 0x7C($sp)
/* 32E62C E001419C 44820000 */  mtc1      $v0, $f0
/* 32E630 E00141A0 00000000 */  nop
/* 32E634 E00141A4 46800020 */  cvt.s.w   $f0, $f0
/* 32E638 E00141A8 E600FFE4 */  swc1      $f0, -0x1C($s0)
/* 32E63C E00141AC 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 32E640 E00141B0 44810000 */  mtc1      $at, $f0
/* 32E644 E00141B4 3C01BCA3 */  lui       $at, (0xBCA3D70A >> 16)
/* 32E648 E00141B8 3421D70A */  ori       $at, $at, (0xBCA3D70A & 0xFFFF)
/* 32E64C E00141BC 44811000 */  mtc1      $at, $f2
/* 32E650 E00141C0 3C013851 */  lui       $at, (0x3851B717 >> 16)
/* 32E654 E00141C4 3421B717 */  ori       $at, $at, (0x3851B717 & 0xFFFF)
/* 32E658 E00141C8 44812000 */  mtc1      $at, $f4
/* 32E65C E00141CC 3C01C079 */  lui       $at, (0xC079999A >> 16)
/* 32E660 E00141D0 3421999A */  ori       $at, $at, (0xC079999A & 0xFFFF)
/* 32E664 E00141D4 44813000 */  mtc1      $at, $f6
/* 32E668 E00141D8 2402001E */  addiu     $v0, $zero, 0x1E
/* 32E66C E00141DC A602FFBE */  sh        $v0, -0x42($s0)
/* 32E670 E00141E0 460C4300 */  add.s     $f12, $f8, $f12
/* 32E674 E00141E4 E600FFEC */  swc1      $f0, -0x14($s0)
/* 32E678 E00141E8 E602FFF0 */  swc1      $f2, -0x10($s0)
/* 32E67C E00141EC E604FFF4 */  swc1      $f4, -0xC($s0)
/* 32E680 E00141F0 0C08013C */  jal       shim_clamp_angle
/* 32E684 E00141F4 E606FFE8 */   swc1     $f6, -0x18($s0)
/* 32E688 E00141F8 46000506 */  mov.s     $f20, $f0
/* 32E68C E00141FC 0C080140 */  jal       shim_sin_deg
/* 32E690 E0014200 4600A306 */   mov.s    $f12, $f20
/* 32E694 E0014204 4600A306 */  mov.s     $f12, $f20
/* 32E698 E0014208 0C080144 */  jal       shim_cos_deg
/* 32E69C E001420C E600FFFC */   swc1     $f0, -0x4($s0)
/* 32E6A0 E0014210 E6000000 */  swc1      $f0, 0x0($s0)
/* 32E6A4 E0014214 0254102A */  slt       $v0, $s2, $s4
/* 32E6A8 E0014218 1440FFB2 */  bnez      $v0, .LE00140E4
/* 32E6AC E001421C 2610004C */   addiu    $s0, $s0, 0x4C
.LE0014220:
/* 32E6B0 E0014220 8FBF003C */  lw        $ra, 0x3C($sp)
/* 32E6B4 E0014224 8FB40038 */  lw        $s4, 0x38($sp)
/* 32E6B8 E0014228 8FB30034 */  lw        $s3, 0x34($sp)
/* 32E6BC E001422C 8FB20030 */  lw        $s2, 0x30($sp)
/* 32E6C0 E0014230 8FB1002C */  lw        $s1, 0x2C($sp)
/* 32E6C4 E0014234 8FB00028 */  lw        $s0, 0x28($sp)
/* 32E6C8 E0014238 D7BE0068 */  ldc1      $f30, 0x68($sp)
/* 32E6CC E001423C D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 32E6D0 E0014240 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 32E6D4 E0014244 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 32E6D8 E0014248 D7B60048 */  ldc1      $f22, 0x48($sp)
/* 32E6DC E001424C D7B40040 */  ldc1      $f20, 0x40($sp)
/* 32E6E0 E0014250 03E00008 */  jr        $ra
/* 32E6E4 E0014254 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

void cloud_puff_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3) {
    EffectBlueprint bp;
    EffectInstance* effect;
    f32 temp_f20;
    CloudPuffFXData* part;
    s32 numParts = 8;
    s32 i;

    bp.unk_00 = 0;
    bp.init = cloud_puff_init;
    bp.update = cloud_puff_update;
    bp.renderWorld = cloud_puff_render;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_CLOUD_PUFF;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = numParts;
    part = shim_general_heap_malloc(numParts * sizeof(*part));
    effect->data.cloudPuff = part;
    ASSERT(effect->data.cloudPuff != NULL);

    shim_mem_clear(part, numParts * sizeof(*part));

    for (i = 0; i < numParts; i++, part++) {
        part->alive = TRUE;
        part->unk_40 = 0;
        part->unk_0C = arg0;
        part->unk_10 = arg1;
        part->unk_14 = arg2;
        part->unk_18 = 1.0f;
        part->unk_1C = 1.0f;
        part->unk_20 = 1.0f;
        part->alpha = 255;
        part->unk_24 = (shim_rand_int(10) * 0.03) + 1.0;
        part->unk_28 = (shim_rand_int(10) * 0.03) + 1.7;
        part->unk_2C = effect_rand_int(60);
        part->timeLeft = 30;
        part->unk_34 = 0.5f;
        part->unk_38 = -0.02f;
        part->unk_3C = 0.00005f;
        part->unk_30 = -3.9f;
        temp_f20 = shim_clamp_angle(arg3 + i * 45);
        part->unk_44 = shim_sin_deg(temp_f20);
        part->unk_48 = shim_cos_deg(temp_f20);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel entity_raycast_down
/* A8CE8 801125E8 27BDFF70 */  addiu     $sp, $sp, -0x90
/* A8CEC 801125EC AFBE0078 */  sw        $fp, 0x78($sp)
/* A8CF0 801125F0 8FBE00A0 */  lw        $fp, 0xA0($sp)
/* A8CF4 801125F4 AFB60070 */  sw        $s6, 0x70($sp)
/* A8CF8 801125F8 8FB600A4 */  lw        $s6, 0xA4($sp)
/* A8CFC 801125FC 3C0146FF */  lui       $at, (0x46FFFE00 >> 16)
/* A8D00 80112600 3421FE00 */  ori       $at, $at, (0x46FFFE00 & 0xFFFF)
/* A8D04 80112604 44810000 */  mtc1      $at, $f0
/* A8D08 80112608 AFB5006C */  sw        $s5, 0x6C($sp)
/* A8D0C 8011260C 0080A82D */  daddu     $s5, $a0, $zero
/* A8D10 80112610 AFB30064 */  sw        $s3, 0x64($sp)
/* A8D14 80112614 00A0982D */  daddu     $s3, $a1, $zero
/* A8D18 80112618 AFB40068 */  sw        $s4, 0x68($sp)
/* A8D1C 8011261C 00C0A02D */  daddu     $s4, $a2, $zero
/* A8D20 80112620 AFB70074 */  sw        $s7, 0x74($sp)
/* A8D24 80112624 00E0B82D */  daddu     $s7, $a3, $zero
/* A8D28 80112628 AFB1005C */  sw        $s1, 0x5C($sp)
/* A8D2C 8011262C 2411FFFF */  addiu     $s1, $zero, -0x1
/* A8D30 80112630 F7B40080 */  sdc1      $f20, 0x80($sp)
/* A8D34 80112634 4480A000 */  mtc1      $zero, $f20
/* A8D38 80112638 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* A8D3C 8011263C 44811000 */  mtc1      $at, $f2
/* A8D40 80112640 27A20038 */  addiu     $v0, $sp, 0x38
/* A8D44 80112644 AFBF007C */  sw        $ra, 0x7C($sp)
/* A8D48 80112648 AFB20060 */  sw        $s2, 0x60($sp)
/* A8D4C 8011264C AFB00058 */  sw        $s0, 0x58($sp)
/* A8D50 80112650 F7B60088 */  sdc1      $f22, 0x88($sp)
/* A8D54 80112654 E7A00044 */  swc1      $f0, 0x44($sp)
/* A8D58 80112658 E6C00000 */  swc1      $f0, 0x0($s6)
/* A8D5C 8011265C AFA20018 */  sw        $v0, 0x18($sp)
/* A8D60 80112660 27A2003C */  addiu     $v0, $sp, 0x3C
/* A8D64 80112664 AFA2001C */  sw        $v0, 0x1C($sp)
/* A8D68 80112668 27A20040 */  addiu     $v0, $sp, 0x40
/* A8D6C 8011266C AFA20020 */  sw        $v0, 0x20($sp)
/* A8D70 80112670 27A20044 */  addiu     $v0, $sp, 0x44
/* A8D74 80112674 AFA20024 */  sw        $v0, 0x24($sp)
/* A8D78 80112678 27A20048 */  addiu     $v0, $sp, 0x48
/* A8D7C 8011267C AFA20028 */  sw        $v0, 0x28($sp)
/* A8D80 80112680 27A2004C */  addiu     $v0, $sp, 0x4C
/* A8D84 80112684 AFA2002C */  sw        $v0, 0x2C($sp)
/* A8D88 80112688 27A20050 */  addiu     $v0, $sp, 0x50
/* A8D8C 8011268C E7A20010 */  swc1      $f2, 0x10($sp)
/* A8D90 80112690 E7B40014 */  swc1      $f20, 0x14($sp)
/* A8D94 80112694 AFA20030 */  sw        $v0, 0x30($sp)
/* A8D98 80112698 C6AC0000 */  lwc1      $f12, 0x0($s5)
/* A8D9C 8011269C C66E0000 */  lwc1      $f14, 0x0($s3)
/* A8DA0 801126A0 8E860000 */  lw        $a2, 0x0($s4)
/* A8DA4 801126A4 4407A000 */  mfc1      $a3, $f20
/* A8DA8 801126A8 0C017512 */  jal       test_ray_entities
/* A8DAC 801126AC 0000902D */   daddu    $s2, $zero, $zero
/* A8DB0 801126B0 0040802D */  daddu     $s0, $v0, $zero
/* A8DB4 801126B4 06000019 */  bltz      $s0, .L8011271C
/* A8DB8 801126B8 00000000 */   nop
/* A8DBC 801126BC 0C0441A9 */  jal       get_entity_type
/* A8DC0 801126C0 0200202D */   daddu    $a0, $s0, $zero
/* A8DC4 801126C4 2403000C */  addiu     $v1, $zero, 0xC
/* A8DC8 801126C8 54430014 */  bnel      $v0, $v1, .L8011271C
/* A8DCC 801126CC 36114000 */   ori      $s1, $s0, 0x4000
/* A8DD0 801126D0 C7A00048 */  lwc1      $f0, 0x48($sp)
/* A8DD4 801126D4 46140032 */  c.eq.s    $f0, $f20
/* A8DD8 801126D8 00000000 */  nop
/* A8DDC 801126DC 4500000F */  bc1f      .L8011271C
/* A8DE0 801126E0 00000000 */   nop
/* A8DE4 801126E4 C7A00050 */  lwc1      $f0, 0x50($sp)
/* A8DE8 801126E8 46140032 */  c.eq.s    $f0, $f20
/* A8DEC 801126EC 00000000 */  nop
/* A8DF0 801126F0 4500000A */  bc1f      .L8011271C
/* A8DF4 801126F4 00000000 */   nop
/* A8DF8 801126F8 C7A0004C */  lwc1      $f0, 0x4C($sp)
/* A8DFC 801126FC 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* A8E00 80112700 44811800 */  mtc1      $at, $f3
/* A8E04 80112704 44801000 */  mtc1      $zero, $f2
/* A8E08 80112708 46000021 */  cvt.d.s   $f0, $f0
/* A8E0C 8011270C 46220032 */  c.eq.d    $f0, $f2
/* A8E10 80112710 00000000 */  nop
/* A8E14 80112714 45030001 */  bc1tl     .L8011271C
/* A8E18 80112718 36114000 */   ori      $s1, $s0, 0x4000
.L8011271C:
/* A8E1C 8011271C 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* A8E20 80112720 44810000 */  mtc1      $at, $f0
/* A8E24 80112724 27A20038 */  addiu     $v0, $sp, 0x38
/* A8E28 80112728 AFA2001C */  sw        $v0, 0x1C($sp)
/* A8E2C 8011272C 27A2003C */  addiu     $v0, $sp, 0x3C
/* A8E30 80112730 AFA20020 */  sw        $v0, 0x20($sp)
/* A8E34 80112734 27A20040 */  addiu     $v0, $sp, 0x40
/* A8E38 80112738 AFA20024 */  sw        $v0, 0x24($sp)
/* A8E3C 8011273C 27A20044 */  addiu     $v0, $sp, 0x44
/* A8E40 80112740 AFA20028 */  sw        $v0, 0x28($sp)
/* A8E44 80112744 27A20048 */  addiu     $v0, $sp, 0x48
/* A8E48 80112748 AFA2002C */  sw        $v0, 0x2C($sp)
/* A8E4C 8011274C 27A2004C */  addiu     $v0, $sp, 0x4C
/* A8E50 80112750 AFA20030 */  sw        $v0, 0x30($sp)
/* A8E54 80112754 27A20050 */  addiu     $v0, $sp, 0x50
/* A8E58 80112758 AFA00010 */  sw        $zero, 0x10($sp)
/* A8E5C 8011275C AFA00018 */  sw        $zero, 0x18($sp)
/* A8E60 80112760 AFA20034 */  sw        $v0, 0x34($sp)
/* A8E64 80112764 E7A00014 */  swc1      $f0, 0x14($sp)
/* A8E68 80112768 8E660000 */  lw        $a2, 0x0($s3)
/* A8E6C 8011276C 8E870000 */  lw        $a3, 0x0($s4)
/* A8E70 80112770 8EA50000 */  lw        $a1, 0x0($s5)
/* A8E74 80112774 0C017334 */  jal       test_ray_colliders
/* A8E78 80112778 3C040001 */   lui      $a0, (0x10000 >> 16)
/* A8E7C 8011277C 04430001 */  bgezl     $v0, .L80112784
/* A8E80 80112780 0040882D */   daddu    $s1, $v0, $zero
.L80112784:
/* A8E84 80112784 06220025 */  bltzl     $s1, .L8011281C
/* A8E88 80112788 AEE00000 */   sw       $zero, 0x0($s7)
/* A8E8C 8011278C C7A00044 */  lwc1      $f0, 0x44($sp)
/* A8E90 80112790 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
/* A8E94 80112794 4481A000 */  mtc1      $at, $f20
/* A8E98 80112798 E6C00000 */  swc1      $f0, 0x0($s6)
/* A8E9C 8011279C C7A0003C */  lwc1      $f0, 0x3C($sp)
/* A8EA0 801127A0 E6600000 */  swc1      $f0, 0x0($s3)
/* A8EA4 801127A4 C7A00050 */  lwc1      $f0, 0x50($sp)
/* A8EA8 801127A8 46140002 */  mul.s     $f0, $f0, $f20
/* A8EAC 801127AC 00000000 */  nop
/* A8EB0 801127B0 44060000 */  mfc1      $a2, $f0
/* A8EB4 801127B4 C7A0004C */  lwc1      $f0, 0x4C($sp)
/* A8EB8 801127B8 46140002 */  mul.s     $f0, $f0, $f20
/* A8EBC 801127BC 00000000 */  nop
/* A8EC0 801127C0 4480B000 */  mtc1      $zero, $f22
/* A8EC4 801127C4 00000000 */  nop
/* A8EC8 801127C8 4600B306 */  mov.s     $f12, $f22
/* A8ECC 801127CC 44070000 */  mfc1      $a3, $f0
/* A8ED0 801127D0 0C00A720 */  jal       atan2
/* A8ED4 801127D4 4600B386 */   mov.s    $f14, $f22
/* A8ED8 801127D8 46000007 */  neg.s     $f0, $f0
/* A8EDC 801127DC E6E00000 */  swc1      $f0, 0x0($s7)
/* A8EE0 801127E0 C7A00048 */  lwc1      $f0, 0x48($sp)
/* A8EE4 801127E4 46140002 */  mul.s     $f0, $f0, $f20
/* A8EE8 801127E8 00000000 */  nop
/* A8EEC 801127EC 44060000 */  mfc1      $a2, $f0
/* A8EF0 801127F0 C7A0004C */  lwc1      $f0, 0x4C($sp)
/* A8EF4 801127F4 46140002 */  mul.s     $f0, $f0, $f20
/* A8EF8 801127F8 00000000 */  nop
/* A8EFC 801127FC 24120001 */  addiu     $s2, $zero, 0x1
/* A8F00 80112800 4600B306 */  mov.s     $f12, $f22
/* A8F04 80112804 44070000 */  mfc1      $a3, $f0
/* A8F08 80112808 0C00A720 */  jal       atan2
/* A8F0C 8011280C 46006386 */   mov.s    $f14, $f12
/* A8F10 80112810 46000007 */  neg.s     $f0, $f0
/* A8F14 80112814 08044A08 */  j         .L80112820
/* A8F18 80112818 E7C00000 */   swc1     $f0, 0x0($fp)
.L8011281C:
/* A8F1C 8011281C AFC00000 */  sw        $zero, 0x0($fp)
.L80112820:
/* A8F20 80112820 0240102D */  daddu     $v0, $s2, $zero
/* A8F24 80112824 8FBF007C */  lw        $ra, 0x7C($sp)
/* A8F28 80112828 8FBE0078 */  lw        $fp, 0x78($sp)
/* A8F2C 8011282C 8FB70074 */  lw        $s7, 0x74($sp)
/* A8F30 80112830 8FB60070 */  lw        $s6, 0x70($sp)
/* A8F34 80112834 8FB5006C */  lw        $s5, 0x6C($sp)
/* A8F38 80112838 8FB40068 */  lw        $s4, 0x68($sp)
/* A8F3C 8011283C 8FB30064 */  lw        $s3, 0x64($sp)
/* A8F40 80112840 8FB20060 */  lw        $s2, 0x60($sp)
/* A8F44 80112844 8FB1005C */  lw        $s1, 0x5C($sp)
/* A8F48 80112848 8FB00058 */  lw        $s0, 0x58($sp)
/* A8F4C 8011284C D7B60088 */  ldc1      $f22, 0x88($sp)
/* A8F50 80112850 D7B40080 */  ldc1      $f20, 0x80($sp)
/* A8F54 80112854 03E00008 */  jr        $ra
/* A8F58 80112858 27BD0090 */   addiu    $sp, $sp, 0x90

### DECOMPILED C INSTRUCTIONS:

        if (!entity_raycast_down(&rayX, &rayY, &rayZ, &hitYaw, &hitPitch, &hitLength) && hitLength == 32767.0f) {
            hitLength = 0.0f;
        }

        origHitLength = hitLength;

        if (shadow->flags & ENTITY_FLAG_FIXED_SHADOW_SIZE) {
            hitLength = 212.5f;
            shadow->scale.x = entity->aabb.x / hitLength;
            shadow->scale.z = entity->aabb.z / hitLength;
        } else {
            hitLength = ((hitLength / 150.0f) + 0.95) * 250.0;
            shadow->scale.x = (entity->aabb.x / hitLength) * entity->scale.x;
            shadow->scale.z = (entity->aabb.z / hitLength) * entity->scale.z;
        }

        shadow->position.x = entity->position.x;
        shadow->position.z = entity->position.z;
        shadow->position.y = rayY;
        entity->shadowPosY = rayY;
        shadow->rotation.x = hitYaw;
        shadow->rotation.z = hitPitch;
        shadow->rotation.y = entity->rotation.y;

        if (entity->position.y < rayY) {
            shadow->flags |= ENTITY_FLAG_SKIP_UPDATE;
            entity->position.y = rayY + 10.0f;
        } else {
            shadow->flags &= ~ENTITY_FLAG_SKIP_UPDATE;
        }

        shadow->flags = (shadow->flags & ~ENTITY_FLAG_HIDDEN) | ((u16)entity->flags & ENTITY_FLAG_HIDDEN);
        if (!(entity->flags & ENTITY_FLAG_400) && origHitLength == 0.0f) {
            shadow->flags |= ENTITY_FLAG_HIDDEN;
        }
    } else {
        entity->shadowPosY = 0.0f;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel set_part_goal_to_actor_part
/* 1982B8 802699D8 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 1982BC 802699DC 00A0202D */  daddu     $a0, $a1, $zero
/* 1982C0 802699E0 AFB20018 */  sw        $s2, 0x18($sp)
/* 1982C4 802699E4 00C0902D */  daddu     $s2, $a2, $zero
/* 1982C8 802699E8 AFB00010 */  sw        $s0, 0x10($sp)
/* 1982CC 802699EC 30900700 */  andi      $s0, $a0, 0x700
/* 1982D0 802699F0 AFBF001C */  sw        $ra, 0x1C($sp)
/* 1982D4 802699F4 0C09A75B */  jal       get_actor
/* 1982D8 802699F8 AFB10014 */   sw       $s1, 0x14($sp)
/* 1982DC 802699FC 0040882D */  daddu     $s1, $v0, $zero
/* 1982E0 80269A00 24020100 */  addiu     $v0, $zero, 0x100
/* 1982E4 80269A04 12020028 */  beq       $s0, $v0, .L80269AA8
/* 1982E8 80269A08 2A020101 */   slti     $v0, $s0, 0x101
/* 1982EC 80269A0C 50400005 */  beql      $v0, $zero, .L80269A24
/* 1982F0 80269A10 24020200 */   addiu    $v0, $zero, 0x200
/* 1982F4 80269A14 12000007 */  beqz      $s0, .L80269A34
/* 1982F8 80269A18 0220202D */   daddu    $a0, $s1, $zero
/* 1982FC 80269A1C 0809A703 */  j         .L80269C0C
/* 198300 80269A20 00000000 */   nop
.L80269A24:
/* 198304 80269A24 12020021 */  beq       $s0, $v0, .L80269AAC
/* 198308 80269A28 0220202D */   daddu    $a0, $s1, $zero
/* 19830C 80269A2C 0809A703 */  j         .L80269C0C
/* 198310 80269A30 00000000 */   nop
.L80269A34:
/* 198314 80269A34 0C099117 */  jal       get_actor_part
/* 198318 80269A38 0000282D */   daddu    $a1, $zero, $zero
/* 19831C 80269A3C 0040202D */  daddu     $a0, $v0, $zero
/* 198320 80269A40 84820014 */  lh        $v0, 0x14($a0)
/* 198324 80269A44 C6220188 */  lwc1      $f2, 0x188($s1)
/* 198328 80269A48 44820000 */  mtc1      $v0, $f0
/* 19832C 80269A4C 00000000 */  nop
/* 198330 80269A50 46800020 */  cvt.s.w   $f0, $f0
/* 198334 80269A54 46020002 */  mul.s     $f0, $f0, $f2
/* 198338 80269A58 00000000 */  nop
/* 19833C 80269A5C C6220144 */  lwc1      $f2, 0x144($s1)
/* 198340 80269A60 46001080 */  add.s     $f2, $f2, $f0
/* 198344 80269A64 8C820010 */  lw        $v0, 0x10($a0)
/* 198348 80269A68 E442000C */  swc1      $f2, 0xC($v0)
/* 19834C 80269A6C 84820016 */  lh        $v0, 0x16($a0)
/* 198350 80269A70 C6220188 */  lwc1      $f2, 0x188($s1)
/* 198354 80269A74 44820000 */  mtc1      $v0, $f0
/* 198358 80269A78 00000000 */  nop
/* 19835C 80269A7C 46800020 */  cvt.s.w   $f0, $f0
/* 198360 80269A80 46020002 */  mul.s     $f0, $f0, $f2
/* 198364 80269A84 00000000 */  nop
/* 198368 80269A88 C6220148 */  lwc1      $f2, 0x148($s1)
/* 19836C 80269A8C 46001080 */  add.s     $f2, $f2, $f0
/* 198370 80269A90 8C820010 */  lw        $v0, 0x10($a0)
/* 198374 80269A94 E4420010 */  swc1      $f2, 0x10($v0)
/* 198378 80269A98 8C820010 */  lw        $v0, 0x10($a0)
/* 19837C 80269A9C C620014C */  lwc1      $f0, 0x14C($s1)
/* 198380 80269AA0 0809A703 */  j         .L80269C0C
/* 198384 80269AA4 E4400014 */   swc1     $f0, 0x14($v0)
.L80269AA8:
/* 198388 80269AA8 0220202D */  daddu     $a0, $s1, $zero
.L80269AAC:
/* 19838C 80269AAC 0C099117 */  jal       get_actor_part
/* 198390 80269AB0 0240282D */   daddu    $a1, $s2, $zero
/* 198394 80269AB4 0040202D */  daddu     $a0, $v0, $zero
/* 198398 80269AB8 8C820000 */  lw        $v0, 0x0($a0)
/* 19839C 80269ABC 3C030010 */  lui       $v1, (0x100000 >> 16)
/* 1983A0 80269AC0 00431024 */  and       $v0, $v0, $v1
/* 1983A4 80269AC4 1440002D */  bnez      $v0, .L80269B7C
/* 1983A8 80269AC8 00000000 */   nop
/* 1983AC 80269ACC 84820014 */  lh        $v0, 0x14($a0)
/* 1983B0 80269AD0 8483006C */  lh        $v1, 0x6C($a0)
/* 1983B4 80269AD4 C6220188 */  lwc1      $f2, 0x188($s1)
/* 1983B8 80269AD8 00431021 */  addu      $v0, $v0, $v1
/* 1983BC 80269ADC 44820000 */  mtc1      $v0, $f0
/* 1983C0 80269AE0 00000000 */  nop
/* 1983C4 80269AE4 46800020 */  cvt.s.w   $f0, $f0
/* 1983C8 80269AE8 46020002 */  mul.s     $f0, $f0, $f2
/* 1983CC 80269AEC 00000000 */  nop
/* 1983D0 80269AF0 C6220144 */  lwc1      $f2, 0x144($s1)
/* 1983D4 80269AF4 46001080 */  add.s     $f2, $f2, $f0
/* 1983D8 80269AF8 8C820010 */  lw        $v0, 0x10($a0)
/* 1983DC 80269AFC E442000C */  swc1      $f2, 0xC($v0)
/* 1983E0 80269B00 8E220000 */  lw        $v0, 0x0($s1)
/* 1983E4 80269B04 30420800 */  andi      $v0, $v0, 0x800
/* 1983E8 80269B08 14400006 */  bnez      $v0, .L80269B24
/* 1983EC 80269B0C 00000000 */   nop
/* 1983F0 80269B10 84820016 */  lh        $v0, 0x16($a0)
/* 1983F4 80269B14 8483006E */  lh        $v1, 0x6E($a0)
/* 1983F8 80269B18 C6220188 */  lwc1      $f2, 0x188($s1)
/* 1983FC 80269B1C 0809A6CE */  j         .L80269B38
/* 198400 80269B20 00431021 */   addu     $v0, $v0, $v1
.L80269B24:
/* 198404 80269B24 84820016 */  lh        $v0, 0x16($a0)
/* 198408 80269B28 8483006E */  lh        $v1, 0x6E($a0)
/* 19840C 80269B2C C6220188 */  lwc1      $f2, 0x188($s1)
/* 198410 80269B30 00021023 */  negu      $v0, $v0
/* 198414 80269B34 00431023 */  subu      $v0, $v0, $v1
.L80269B38:
/* 198418 80269B38 44820000 */  mtc1      $v0, $f0
/* 19841C 80269B3C 00000000 */  nop
/* 198420 80269B40 46800020 */  cvt.s.w   $f0, $f0
/* 198424 80269B44 46020002 */  mul.s     $f0, $f0, $f2
/* 198428 80269B48 00000000 */  nop
/* 19842C 80269B4C C6220148 */  lwc1      $f2, 0x148($s1)
/* 198430 80269B50 46001080 */  add.s     $f2, $f2, $f0
/* 198434 80269B54 8C820010 */  lw        $v0, 0x10($a0)
/* 198438 80269B58 E4420010 */  swc1      $f2, 0x10($v0)
/* 19843C 80269B5C 84820018 */  lh        $v0, 0x18($a0)
/* 198440 80269B60 C620014C */  lwc1      $f0, 0x14C($s1)
/* 198444 80269B64 44821000 */  mtc1      $v0, $f2
/* 198448 80269B68 00000000 */  nop
/* 19844C 80269B6C 468010A0 */  cvt.s.w   $f2, $f2
/* 198450 80269B70 8C820010 */  lw        $v0, 0x10($a0)
/* 198454 80269B74 0809A702 */  j         .L80269C08
/* 198458 80269B78 46020000 */   add.s    $f0, $f0, $f2
.L80269B7C:
/* 19845C 80269B7C 8482006C */  lh        $v0, 0x6C($a0)
/* 198460 80269B80 C480002C */  lwc1      $f0, 0x2C($a0)
/* 198464 80269B84 44821000 */  mtc1      $v0, $f2
/* 198468 80269B88 00000000 */  nop
/* 19846C 80269B8C 468010A0 */  cvt.s.w   $f2, $f2
/* 198470 80269B90 46020000 */  add.s     $f0, $f0, $f2
/* 198474 80269B94 8C820010 */  lw        $v0, 0x10($a0)
/* 198478 80269B98 E440000C */  swc1      $f0, 0xC($v0)
/* 19847C 80269B9C 8E220000 */  lw        $v0, 0x0($s1)
/* 198480 80269BA0 30420800 */  andi      $v0, $v0, 0x800
/* 198484 80269BA4 1440000B */  bnez      $v0, .L80269BD4
/* 198488 80269BA8 00000000 */   nop
/* 19848C 80269BAC 8482006E */  lh        $v0, 0x6E($a0)
/* 198490 80269BB0 C6220188 */  lwc1      $f2, 0x188($s1)
/* 198494 80269BB4 44820000 */  mtc1      $v0, $f0
/* 198498 80269BB8 00000000 */  nop
/* 19849C 80269BBC 46800020 */  cvt.s.w   $f0, $f0
/* 1984A0 80269BC0 46020002 */  mul.s     $f0, $f0, $f2
/* 1984A4 80269BC4 00000000 */  nop
/* 1984A8 80269BC8 C4820030 */  lwc1      $f2, 0x30($a0)
/* 1984AC 80269BCC 0809A6FE */  j         .L80269BF8
/* 1984B0 80269BD0 46001080 */   add.s    $f2, $f2, $f0
.L80269BD4:
/* 1984B4 80269BD4 8482006E */  lh        $v0, 0x6E($a0)
/* 1984B8 80269BD8 C6220188 */  lwc1      $f2, 0x188($s1)
/* 1984BC 80269BDC 44820000 */  mtc1      $v0, $f0
/* 1984C0 80269BE0 00000000 */  nop
/* 1984C4 80269BE4 46800020 */  cvt.s.w   $f0, $f0
/* 1984C8 80269BE8 46020002 */  mul.s     $f0, $f0, $f2
/* 1984CC 80269BEC 00000000 */  nop
/* 1984D0 80269BF0 C4820030 */  lwc1      $f2, 0x30($a0)
/* 1984D4 80269BF4 46001081 */  sub.s     $f2, $f2, $f0
.L80269BF8:
/* 1984D8 80269BF8 8C820010 */  lw        $v0, 0x10($a0)
/* 1984DC 80269BFC E4420010 */  swc1      $f2, 0x10($v0)
/* 1984E0 80269C00 8C820010 */  lw        $v0, 0x10($a0)
/* 1984E4 80269C04 C4800034 */  lwc1      $f0, 0x34($a0)
.L80269C08:
/* 1984E8 80269C08 E4400014 */  swc1      $f0, 0x14($v0)
.L80269C0C:
/* 1984EC 80269C0C 8FBF001C */  lw        $ra, 0x1C($sp)
/* 1984F0 80269C10 8FB20018 */  lw        $s2, 0x18($sp)
/* 1984F4 80269C14 8FB10014 */  lw        $s1, 0x14($sp)
/* 1984F8 80269C18 8FB00010 */  lw        $s0, 0x10($sp)
/* 1984FC 80269C1C 03E00008 */  jr        $ra
/* 198500 80269C20 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void set_part_goal_to_actor_part(ActorPartMovement* movement, s32 actorID, s32 partID) {
    s32 actorClass = actorID & ACTOR_CLASS_MASK;
    Actor* actor = get_actor(actorID);
    ActorPart* part;

    switch (actorClass) {
        case ACTOR_CLASS_PLAYER:
            part = get_actor_part(actor, 0);
            part->movement->goalPos.x = actor->currentPos.x + part->partOffset.x * actor->scalingFactor;
            part->movement->goalPos.y = actor->currentPos.y + part->partOffset.y * actor->scalingFactor;
            part->movement->goalPos.z = actor->currentPos.z;
            break;
        case ACTOR_CLASS_PARTNER:
        case ACTOR_CLASS_ENEMY:
            part = get_actor_part(actor, partID);
            if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) {
                part->movement->goalPos.x = actor->currentPos.x + (part->partOffset.x + part->targetOffset.x) * actor->scalingFactor;
                if (!(actor->flags & ACTOR_PART_FLAG_800)) {
                    part->movement->goalPos.y = actor->currentPos.y + (part->partOffset.y + part->targetOffset.y) * actor->scalingFactor;
                } else {
                    part->movement->goalPos.y = actor->currentPos.y + (-part->partOffset.y - part->targetOffset.y) * actor->scalingFactor;
                }
                part->movement->goalPos.z = actor->currentPos.z + part->partOffset.z;
            } else {
                part->movement->goalPos.x = part->absolutePosition.x + part->targetOffset.x;
                if (!(actor->flags & ACTOR_PART_FLAG_800)) {
                    part->movement->goalPos.y = part->absolutePosition.y + part->targetOffset.y * actor->scalingFactor;
                } else {
                    part->movement->goalPos.y = part->absolutePosition.y - part->targetOffset.y * actor->scalingFactor;
                }
                part->movement->goalPos.z = part->absolutePosition.z;
            }
            break;
    }
}