### RAW ASSEMBLY INSTRUCTIONS:

glabel shimmer_wave_update
/* 376648 E00741E8 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 37664C E00741EC AFB20020 */  sw        $s2, 0x20($sp)
/* 376650 E00741F0 0080902D */  daddu     $s2, $a0, $zero
/* 376654 E00741F4 AFBF0028 */  sw        $ra, 0x28($sp)
/* 376658 E00741F8 AFB30024 */  sw        $s3, 0x24($sp)
/* 37665C E00741FC AFB1001C */  sw        $s1, 0x1C($sp)
/* 376660 E0074200 AFB00018 */  sw        $s0, 0x18($sp)
/* 376664 E0074204 F7BE0058 */  sdc1      $f30, 0x58($sp)
/* 376668 E0074208 F7BC0050 */  sdc1      $f28, 0x50($sp)
/* 37666C E007420C F7BA0048 */  sdc1      $f26, 0x48($sp)
/* 376670 E0074210 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 376674 E0074214 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 376678 E0074218 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 37667C E007421C 8E440000 */  lw        $a0, 0x0($s2)
/* 376680 E0074220 8E43000C */  lw        $v1, 0xC($s2)
/* 376684 E0074224 30820010 */  andi      $v0, $a0, 0x10
/* 376688 E0074228 10400005 */  beqz      $v0, .LE0074240
/* 37668C E007422C 2402FFEF */   addiu    $v0, $zero, -0x11
/* 376690 E0074230 00821024 */  and       $v0, $a0, $v0
/* 376694 E0074234 AE420000 */  sw        $v0, 0x0($s2)
/* 376698 E0074238 24020010 */  addiu     $v0, $zero, 0x10
/* 37669C E007423C AC620038 */  sw        $v0, 0x38($v1)
.LE0074240:
/* 3766A0 E0074240 8C640038 */  lw        $a0, 0x38($v1)
/* 3766A4 E0074244 288203E8 */  slti      $v0, $a0, 0x3E8
/* 3766A8 E0074248 10400002 */  beqz      $v0, .LE0074254
/* 3766AC E007424C 2482FFFF */   addiu    $v0, $a0, -0x1
/* 3766B0 E0074250 AC620038 */  sw        $v0, 0x38($v1)
.LE0074254:
/* 3766B4 E0074254 8C62003C */  lw        $v0, 0x3C($v1)
/* 3766B8 E0074258 8C640038 */  lw        $a0, 0x38($v1)
/* 3766BC E007425C 24420001 */  addiu     $v0, $v0, 0x1
/* 3766C0 E0074260 04810005 */  bgez      $a0, .LE0074278
/* 3766C4 E0074264 AC62003C */   sw       $v0, 0x3C($v1)
/* 3766C8 E0074268 0C080128 */  jal       shim_remove_effect
/* 3766CC E007426C 0240202D */   daddu    $a0, $s2, $zero
/* 3766D0 E0074270 0801D159 */  j         .LE0074564
/* 3766D4 E0074274 00000000 */   nop
.LE0074278:
/* 3766D8 E0074278 28820008 */  slti      $v0, $a0, 0x8
/* 3766DC E007427C 10400002 */  beqz      $v0, .LE0074288
/* 3766E0 E0074280 00041140 */   sll      $v0, $a0, 5
/* 3766E4 E0074284 AC62004C */  sw        $v0, 0x4C($v1)
.LE0074288:
/* 3766E8 E0074288 C47E0010 */  lwc1      $f30, 0x10($v1)
/* 3766EC E007428C C47C0014 */  lwc1      $f28, 0x14($v1)
/* 3766F0 E0074290 E7BC0010 */  swc1      $f28, 0x10($sp)
/* 3766F4 E0074294 8E420008 */  lw        $v0, 0x8($s2)
/* 3766F8 E0074298 24110001 */  addiu     $s1, $zero, 0x1
/* 3766FC E007429C 0222102A */  slt       $v0, $s1, $v0
/* 376700 E00742A0 104000B0 */  beqz      $v0, .LE0074564
/* 376704 E00742A4 2463006C */   addiu    $v1, $v1, 0x6C
/* 376708 E00742A8 3C13E007 */  lui       $s3, %hi(D_E0074B80)
/* 37670C E00742AC 26734B80 */  addiu     $s3, $s3, %lo(D_E0074B80)
/* 376710 E00742B0 24700020 */  addiu     $s0, $v1, 0x20
/* 376714 E00742B4 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 376718 E00742B8 4481C800 */  mtc1      $at, $f25
/* 37671C E00742BC 4480C000 */  mtc1      $zero, $f24
/* 376720 E00742C0 3C01E007 */  lui       $at, (0xE0074BF0 >> 16)
/* 376724 E00742C4 D43A4BF0 */  ldc1      $f26, (0xE0074BF0 & 0xFFFF)($at)
.LE00742C8:
/* 376728 E00742C8 8E020010 */  lw        $v0, 0x10($s0)
/* 37672C E00742CC 24420001 */  addiu     $v0, $v0, 0x1
/* 376730 E00742D0 AE020010 */  sw        $v0, 0x10($s0)
/* 376734 E00742D4 28420014 */  slti      $v0, $v0, 0x14
/* 376738 E00742D8 50400001 */  beql      $v0, $zero, .LE00742E0
/* 37673C E00742DC AE000010 */   sw       $zero, 0x10($s0)
.LE00742E0:
/* 376740 E00742E0 8E020010 */  lw        $v0, 0x10($s0)
/* 376744 E00742E4 0442009B */  bltzl     $v0, .LE0074554
/* 376748 E00742E8 26310001 */   addiu    $s1, $s1, 0x1
/* 37674C E00742EC 14400055 */  bnez      $v0, .LE0074444
/* 376750 E00742F0 00000000 */   nop
/* 376754 E00742F4 0C080138 */  jal       shim_rand_int
/* 376758 E00742F8 24040167 */   addiu    $a0, $zero, 0x167
/* 37675C E00742FC 4482A000 */  mtc1      $v0, $f20
/* 376760 E0074300 00000000 */  nop
/* 376764 E0074304 4680A520 */  cvt.s.w   $f20, $f20
/* 376768 E0074308 0C080138 */  jal       shim_rand_int
/* 37676C E007430C 24040167 */   addiu    $a0, $zero, 0x167
/* 376770 E0074310 0C080140 */  jal       shim_sin_deg
/* 376774 E0074314 4600A306 */   mov.s    $f12, $f20
/* 376778 E0074318 4600F002 */  mul.s     $f0, $f30, $f0
/* 37677C E007431C 00000000 */  nop
/* 376780 E0074320 C7BC0010 */  lwc1      $f28, 0x10($sp)
/* 376784 E0074324 4600E70D */  trunc.w.s $f28, $f28
/* 376788 E0074328 4404E000 */  mfc1      $a0, $f28
/* 37678C E007432C 0C080138 */  jal       shim_rand_int
/* 376790 E0074330 E600FFE4 */   swc1     $f0, -0x1C($s0)
/* 376794 E0074334 C7BC0010 */  lwc1      $f28, 0x10($sp)
/* 376798 E0074338 4600E0A1 */  cvt.d.s   $f2, $f28
/* 37679C E007433C 46381082 */  mul.d     $f2, $f2, $f24
/* 3767A0 E0074340 00000000 */  nop
/* 3767A4 E0074344 44820000 */  mtc1      $v0, $f0
/* 3767A8 E0074348 00000000 */  nop
/* 3767AC E007434C 46800021 */  cvt.d.w   $f0, $f0
/* 3767B0 E0074350 46220001 */  sub.d     $f0, $f0, $f2
/* 3767B4 E0074354 4600A306 */  mov.s     $f12, $f20
/* 3767B8 E0074358 46200020 */  cvt.s.d   $f0, $f0
/* 3767BC E007435C 0C080144 */  jal       shim_cos_deg
/* 3767C0 E0074360 E600FFE8 */   swc1     $f0, -0x18($s0)
/* 3767C4 E0074364 4600F002 */  mul.s     $f0, $f30, $f0
/* 3767C8 E0074368 00000000 */  nop
/* 3767CC E007436C 4600A306 */  mov.s     $f12, $f20
/* 3767D0 E0074370 0C080140 */  jal       shim_sin_deg
/* 3767D4 E0074374 E600FFEC */   swc1     $f0, -0x14($s0)
/* 3767D8 E0074378 C602FFE8 */  lwc1      $f2, -0x18($s0)
/* 3767DC E007437C 3C01E007 */  lui       $at, (0xE0074BF8 >> 16)
/* 3767E0 E0074380 D4244BF8 */  ldc1      $f4, (0xE0074BF8 & 0xFFFF)($at)
/* 3767E4 E0074384 460010A1 */  cvt.d.s   $f2, $f2
/* 3767E8 E0074388 46241082 */  mul.d     $f2, $f2, $f4
/* 3767EC E007438C 00000000 */  nop
/* 3767F0 E0074390 3C014170 */  lui       $at, (0x41700000 >> 16)
/* 3767F4 E0074394 4481E000 */  mtc1      $at, $f28
/* 3767F8 E0074398 00000000 */  nop
/* 3767FC E007439C 461C0002 */  mul.s     $f0, $f0, $f28
/* 376800 E00743A0 00000000 */  nop
/* 376804 E00743A4 4600A306 */  mov.s     $f12, $f20
/* 376808 E00743A8 E600FFF8 */  swc1      $f0, -0x8($s0)
/* 37680C E00743AC 462010A0 */  cvt.s.d   $f2, $f2
/* 376810 E00743B0 0C080144 */  jal       shim_cos_deg
/* 376814 E00743B4 E602FFFC */   swc1     $f2, -0x4($s0)
/* 376818 E00743B8 C604FFF8 */  lwc1      $f4, -0x8($s0)
/* 37681C E00743BC 46002121 */  cvt.d.s   $f4, $f4
/* 376820 E00743C0 46382102 */  mul.d     $f4, $f4, $f24
/* 376824 E00743C4 00000000 */  nop
/* 376828 E00743C8 C602FFFC */  lwc1      $f2, -0x4($s0)
/* 37682C E00743CC 460010A1 */  cvt.d.s   $f2, $f2
/* 376830 E00743D0 46381082 */  mul.d     $f2, $f2, $f24
/* 376834 E00743D4 00000000 */  nop
/* 376838 E00743D8 461C0002 */  mul.s     $f0, $f0, $f28
/* 37683C E00743DC 00000000 */  nop
/* 376840 E00743E0 E6000000 */  swc1      $f0, 0x0($s0)
/* 376844 E00743E4 46000021 */  cvt.d.s   $f0, $f0
/* 376848 E00743E8 46380002 */  mul.d     $f0, $f0, $f24
/* 37684C E00743EC 00000000 */  nop
/* 376850 E00743F0 2404000F */  addiu     $a0, $zero, 0xF
/* 376854 E00743F4 46202120 */  cvt.s.d   $f4, $f4
/* 376858 E00743F8 462010A0 */  cvt.s.d   $f2, $f2
/* 37685C E00743FC E6040004 */  swc1      $f4, 0x4($s0)
/* 376860 E0074400 E6020008 */  swc1      $f2, 0x8($s0)
/* 376864 E0074404 46200020 */  cvt.s.d   $f0, $f0
/* 376868 E0074408 0C080138 */  jal       shim_rand_int
/* 37686C E007440C E600000C */   swc1     $f0, 0xC($s0)
/* 376870 E0074410 2404000F */  addiu     $a0, $zero, 0xF
/* 376874 E0074414 44820000 */  mtc1      $v0, $f0
/* 376878 E0074418 00000000 */  nop
/* 37687C E007441C 46800020 */  cvt.s.w   $f0, $f0
/* 376880 E0074420 0C080138 */  jal       shim_rand_int
/* 376884 E0074424 E6000044 */   swc1     $f0, 0x44($s0)
/* 376888 E0074428 44820000 */  mtc1      $v0, $f0
/* 37688C E007442C 00000000 */  nop
/* 376890 E0074430 46800020 */  cvt.s.w   $f0, $f0
/* 376894 E0074434 240200FF */  addiu     $v0, $zero, 0xFF
/* 376898 E0074438 E6000048 */  swc1      $f0, 0x48($s0)
/* 37689C E007443C AE000014 */  sw        $zero, 0x14($s0)
/* 3768A0 E0074440 AE02002C */  sw        $v0, 0x2C($s0)
.LE0074444:
/* 3768A4 E0074444 C610FFF8 */  lwc1      $f16, -0x8($s0)
/* 3768A8 E0074448 C60A0004 */  lwc1      $f10, 0x4($s0)
/* 3768AC E007444C 46105281 */  sub.s     $f10, $f10, $f16
/* 3768B0 E0074450 460052A1 */  cvt.d.s   $f10, $f10
/* 3768B4 E0074454 463A5282 */  mul.d     $f10, $f10, $f26
/* 3768B8 E0074458 00000000 */  nop
/* 3768BC E007445C C60EFFFC */  lwc1      $f14, -0x4($s0)
/* 3768C0 E0074460 C60C0008 */  lwc1      $f12, 0x8($s0)
/* 3768C4 E0074464 460E6301 */  sub.s     $f12, $f12, $f14
/* 3768C8 E0074468 46006321 */  cvt.d.s   $f12, $f12
/* 3768CC E007446C 463A6302 */  mul.d     $f12, $f12, $f26
/* 3768D0 E0074470 00000000 */  nop
/* 3768D4 E0074474 C6060000 */  lwc1      $f6, 0x0($s0)
/* 3768D8 E0074478 C608000C */  lwc1      $f8, 0xC($s0)
/* 3768DC E007447C 46064201 */  sub.s     $f8, $f8, $f6
/* 3768E0 E0074480 8E020010 */  lw        $v0, 0x10($s0)
/* 3768E4 E0074484 46004221 */  cvt.d.s   $f8, $f8
/* 3768E8 E0074488 463A4202 */  mul.d     $f8, $f8, $f26
/* 3768EC E007448C 00000000 */  nop
/* 3768F0 E0074490 C6000014 */  lwc1      $f0, 0x14($s0)
/* 3768F4 E0074494 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 3768F8 E0074498 44811000 */  mtc1      $at, $f2
/* 3768FC E007449C C614FFE4 */  lwc1      $f20, -0x1C($s0)
/* 376900 E00744A0 C612FFE8 */  lwc1      $f18, -0x18($s0)
/* 376904 E00744A4 C604FFEC */  lwc1      $f4, -0x14($s0)
/* 376908 E00744A8 00021080 */  sll       $v0, $v0, 2
/* 37690C E00744AC 00531021 */  addu      $v0, $v0, $s3
/* 376910 E00744B0 46020000 */  add.s     $f0, $f0, $f2
/* 376914 E00744B4 C4560000 */  lwc1      $f22, 0x0($v0)
/* 376918 E00744B8 C6020044 */  lwc1      $f2, 0x44($s0)
/* 37691C E00744BC 4616B580 */  add.s     $f22, $f22, $f22
/* 376920 E00744C0 E6000014 */  swc1      $f0, 0x14($s0)
/* 376924 E00744C4 46008006 */  mov.s     $f0, $f16
/* 376928 E00744C8 4600A500 */  add.s     $f20, $f20, $f0
/* 37692C E00744CC 460010A1 */  cvt.d.s   $f2, $f2
/* 376930 E00744D0 46007006 */  mov.s     $f0, $f14
/* 376934 E00744D4 46009480 */  add.s     $f18, $f18, $f0
/* 376938 E00744D8 46003006 */  mov.s     $f0, $f6
/* 37693C E00744DC 46008421 */  cvt.d.s   $f16, $f16
/* 376940 E00744E0 46002100 */  add.s     $f4, $f4, $f0
/* 376944 E00744E4 460073A1 */  cvt.d.s   $f14, $f14
/* 376948 E00744E8 460031A1 */  cvt.d.s   $f6, $f6
/* 37694C E00744EC E604FFEC */  swc1      $f4, -0x14($s0)
/* 376950 E00744F0 3C01E007 */  lui       $at, (0xE0074C00 >> 16)
/* 376954 E00744F4 D4244C00 */  ldc1      $f4, (0xE0074C00 & 0xFFFF)($at)
/* 376958 E00744F8 C6000048 */  lwc1      $f0, 0x48($s0)
/* 37695C E00744FC 46241080 */  add.d     $f2, $f2, $f4
/* 376960 E0074500 3C01E007 */  lui       $at, (0xE0074C08 >> 16)
/* 376964 E0074504 D4244C08 */  ldc1      $f4, (0xE0074C08 & 0xFFFF)($at)
/* 376968 E0074508 46000021 */  cvt.d.s   $f0, $f0
/* 37696C E007450C E6160040 */  swc1      $f22, 0x40($s0)
/* 376970 E0074510 46240000 */  add.d     $f0, $f0, $f4
/* 376974 E0074514 E614FFE4 */  swc1      $f20, -0x1C($s0)
/* 376978 E0074518 E612FFE8 */  swc1      $f18, -0x18($s0)
/* 37697C E007451C 462A8400 */  add.d     $f16, $f16, $f10
/* 376980 E0074520 462010A0 */  cvt.s.d   $f2, $f2
/* 376984 E0074524 E6020044 */  swc1      $f2, 0x44($s0)
/* 376988 E0074528 462C7380 */  add.d     $f14, $f14, $f12
/* 37698C E007452C 46200020 */  cvt.s.d   $f0, $f0
/* 376990 E0074530 E6000048 */  swc1      $f0, 0x48($s0)
/* 376994 E0074534 46283180 */  add.d     $f6, $f6, $f8
/* 376998 E0074538 46208420 */  cvt.s.d   $f16, $f16
/* 37699C E007453C 462073A0 */  cvt.s.d   $f14, $f14
/* 3769A0 E0074540 462031A0 */  cvt.s.d   $f6, $f6
/* 3769A4 E0074544 E610FFF8 */  swc1      $f16, -0x8($s0)
/* 3769A8 E0074548 E60EFFFC */  swc1      $f14, -0x4($s0)
/* 3769AC E007454C E6060000 */  swc1      $f6, 0x0($s0)
/* 3769B0 E0074550 26310001 */  addiu     $s1, $s1, 0x1
.LE0074554:
/* 3769B4 E0074554 8E420008 */  lw        $v0, 0x8($s2)
/* 3769B8 E0074558 0222102A */  slt       $v0, $s1, $v0
/* 3769BC E007455C 1440FF5A */  bnez      $v0, .LE00742C8
/* 3769C0 E0074560 2610006C */   addiu    $s0, $s0, 0x6C
.LE0074564:
/* 3769C4 E0074564 8FBF0028 */  lw        $ra, 0x28($sp)
/* 3769C8 E0074568 8FB30024 */  lw        $s3, 0x24($sp)
/* 3769CC E007456C 8FB20020 */  lw        $s2, 0x20($sp)
/* 3769D0 E0074570 8FB1001C */  lw        $s1, 0x1C($sp)
/* 3769D4 E0074574 8FB00018 */  lw        $s0, 0x18($sp)
/* 3769D8 E0074578 D7BE0058 */  ldc1      $f30, 0x58($sp)
/* 3769DC E007457C D7BC0050 */  ldc1      $f28, 0x50($sp)
/* 3769E0 E0074580 D7BA0048 */  ldc1      $f26, 0x48($sp)
/* 3769E4 E0074584 D7B80040 */  ldc1      $f24, 0x40($sp)
/* 3769E8 E0074588 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 3769EC E007458C D7B40030 */  ldc1      $f20, 0x30($sp)
/* 3769F0 E0074590 03E00008 */  jr        $ra
/* 3769F4 E0074594 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

void shimmer_wave_update(EffectInstance* effect) {
    ShimmerWaveFXData* part = effect->data.shimmerWave;
    f32 unk_10;
    f32 unk_14;
    s32 i;

    if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
        effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
        part->unk_38 = 16;
    }

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

    part->unk_3C++;

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

    if (part->unk_38 < 8) {
        part->unk_4C = part->unk_38 * 32;
    }

    unk_10 = part->unk_10;
    unk_14 = part->unk_14;

    part++;
    for (i = 1; i < effect->numParts; i++, part++) {
        part->unk_30++;
        if (part->unk_30 >= ARRAY_COUNT(D_E0074B80)) {
            part->unk_30 = 0;
        }

        if (part->unk_30 >= 0) {
            if (part->unk_30 == 0) {
                f32 rand = shim_rand_int(359);
                shim_rand_int(359);

                part->unk_04 = unk_10 * shim_sin_deg(rand);
                part->unk_08 = shim_rand_int(unk_14) - unk_14 * 0.5;
                part->unk_0C = unk_10 * shim_cos_deg(rand);
                part->unk_18 = shim_sin_deg(rand) * 15.0f;
                part->unk_1C = part->unk_08 * 0.4;
                part->unk_20 = shim_cos_deg(rand) * 15.0f;
                part->unk_24 = part->unk_18 * 0.5;
                part->unk_28 = part->unk_1C * 0.5;
                part->unk_2C = part->unk_20 * 0.5;
                part->unk_64 = shim_rand_int(15);
                part->unk_68 = shim_rand_int(15);
                part->unk_34 = 0.0f;
                part->unk_4C = 255;
            }

            part->unk_60 = 2.0f * D_E0074B80[part->unk_30];
            part->unk_34 += 4.0f;
            part->unk_04 += part->unk_18;
            part->unk_08 += part->unk_1C;
            part->unk_0C += part->unk_20;
            part->unk_64 += 0.2;
            part->unk_68 += 0.6;
            part->unk_18 += (part->unk_24 - part->unk_18) * 0.04;
            part->unk_1C += (part->unk_28 - part->unk_1C) * 0.04;
            part->unk_20 += (part->unk_2C - part->unk_20) * 0.04;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel crash_screen_draw
/* 77B0 8002C3B0 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 77B4 8002C3B4 AFB1001C */  sw        $s1, 0x1C($sp)
/* 77B8 8002C3B8 0080882D */  daddu     $s1, $a0, $zero
/* 77BC 8002C3BC AFB20020 */  sw        $s2, 0x20($sp)
/* 77C0 8002C3C0 26320020 */  addiu     $s2, $s1, 0x20
/* 77C4 8002C3C4 AFBF0024 */  sw        $ra, 0x24($sp)
/* 77C8 8002C3C8 AFB00018 */  sw        $s0, 0x18($sp)
/* 77CC 8002C3CC 8E220120 */  lw        $v0, 0x120($s1)
/* 77D0 8002C3D0 24030017 */  addiu     $v1, $zero, 0x17
/* 77D4 8002C3D4 00021082 */  srl       $v0, $v0, 2
/* 77D8 8002C3D8 3042001F */  andi      $v0, $v0, 0x1F
/* 77DC 8002C3DC 14430002 */  bne       $v0, $v1, .L8002C3E8
/* 77E0 8002C3E0 0040802D */   daddu    $s0, $v0, $zero
/* 77E4 8002C3E4 24100010 */  addiu     $s0, $zero, 0x10
.L8002C3E8:
/* 77E8 8002C3E8 2402001F */  addiu     $v0, $zero, 0x1F
/* 77EC 8002C3EC 52020001 */  beql      $s0, $v0, .L8002C3F4
/* 77F0 8002C3F0 24100011 */   addiu    $s0, $zero, 0x11
.L8002C3F4:
/* 77F4 8002C3F4 0C018634 */  jal       osWritebackDCacheAll
/* 77F8 8002C3F8 00000000 */   nop
/* 77FC 8002C3FC 24040019 */  addiu     $a0, $zero, 0x19
/* 7800 8002C400 24050014 */  addiu     $a1, $zero, 0x14
/* 7804 8002C404 2406010E */  addiu     $a2, $zero, 0x10E
/* 7808 8002C408 0C00AFEC */  jal       crash_screen_draw_rect
/* 780C 8002C40C 0080382D */   daddu    $a3, $a0, $zero
/* 7810 8002C410 2404001E */  addiu     $a0, $zero, 0x1E
/* 7814 8002C414 00101080 */  sll       $v0, $s0, 2
/* 7818 8002C418 3C018007 */  lui       $at, %hi(gFaultCauses)
/* 781C 8002C41C 00220821 */  addu      $at, $at, $v0
/* 7820 8002C420 8C227390 */  lw        $v0, %lo(gFaultCauses)($at)
/* 7824 8002C424 AFA20010 */  sw        $v0, 0x10($sp)
/* 7828 8002C428 8E270014 */  lw        $a3, 0x14($s1)
/* 782C 8002C42C 3C06800A */  lui       $a2, %hi(D_80098064)
/* 7830 8002C430 24C68064 */  addiu     $a2, $a2, %lo(D_80098064)
/* 7834 8002C434 0C00B082 */  jal       crash_screen_printf
/* 7838 8002C438 24050019 */   addiu    $a1, $zero, 0x19
/* 783C 8002C43C 8E220118 */  lw        $v0, 0x118($s1)
/* 7840 8002C440 2404001E */  addiu     $a0, $zero, 0x1E
/* 7844 8002C444 AFA20010 */  sw        $v0, 0x10($sp)
/* 7848 8002C448 8E220124 */  lw        $v0, 0x124($s1)
/* 784C 8002C44C AFA20014 */  sw        $v0, 0x14($sp)
/* 7850 8002C450 8E27011C */  lw        $a3, 0x11C($s1)
/* 7854 8002C454 3C06800A */  lui       $a2, %hi(D_80098074)
/* 7858 8002C458 24C68074 */  addiu     $a2, $a2, %lo(D_80098074)
/* 785C 8002C45C 0C00B082 */  jal       crash_screen_printf
/* 7860 8002C460 24050023 */   addiu    $a1, $zero, 0x23
/* 7864 8002C464 0C00AFD0 */  jal       crash_screen_sleep
/* 7868 8002C468 240407D0 */   addiu    $a0, $zero, 0x7D0
/* 786C 8002C46C 0C019CE0 */  jal       osViBlack
/* 7870 8002C470 0000202D */   daddu    $a0, $zero, $zero
/* 7874 8002C474 0C019CF8 */  jal       osViRepeatLine
/* 7878 8002C478 0000202D */   daddu    $a0, $zero, $zero
/* 787C 8002C47C 3C04800A */  lui       $a0, %hi(D_8009C4FC)
/* 7880 8002C480 8C84C4FC */  lw        $a0, %lo(D_8009C4FC)($a0)
/* 7884 8002C484 0C019C08 */  jal       osViSwapBuffer
/* 7888 8002C488 00000000 */   nop
/* 788C 8002C48C 24040019 */  addiu     $a0, $zero, 0x19
/* 7890 8002C490 2405002D */  addiu     $a1, $zero, 0x2D
/* 7894 8002C494 2406010E */  addiu     $a2, $zero, 0x10E
/* 7898 8002C498 0C00AFEC */  jal       crash_screen_draw_rect
/* 789C 8002C49C 240700B9 */   addiu    $a3, $zero, 0xB9
/* 78A0 8002C4A0 8E22002C */  lw        $v0, 0x2C($s1)
/* 78A4 8002C4A4 2404001E */  addiu     $a0, $zero, 0x1E
/* 78A8 8002C4A8 AFA20010 */  sw        $v0, 0x10($sp)
/* 78AC 8002C4AC 8E220034 */  lw        $v0, 0x34($s1)
/* 78B0 8002C4B0 AFA20014 */  sw        $v0, 0x14($sp)
/* 78B4 8002C4B4 8E270024 */  lw        $a3, 0x24($s1)
/* 78B8 8002C4B8 3C06800A */  lui       $a2, %hi(D_80098094)
/* 78BC 8002C4BC 24C68094 */  addiu     $a2, $a2, %lo(D_80098094)
/* 78C0 8002C4C0 0C00B082 */  jal       crash_screen_printf
/* 78C4 8002C4C4 24050032 */   addiu    $a1, $zero, 0x32
/* 78C8 8002C4C8 8E220044 */  lw        $v0, 0x44($s1)
/* 78CC 8002C4CC 2404001E */  addiu     $a0, $zero, 0x1E
/* 78D0 8002C4D0 AFA20010 */  sw        $v0, 0x10($sp)
/* 78D4 8002C4D4 8E22004C */  lw        $v0, 0x4C($s1)
/* 78D8 8002C4D8 AFA20014 */  sw        $v0, 0x14($sp)
/* 78DC 8002C4DC 8E27003C */  lw        $a3, 0x3C($s1)
/* 78E0 8002C4E0 3C06800A */  lui       $a2, %hi(D_800980B4)
/* 78E4 8002C4E4 24C680B4 */  addiu     $a2, $a2, %lo(D_800980B4)
/* 78E8 8002C4E8 0C00B082 */  jal       crash_screen_printf
/* 78EC 8002C4EC 2405003C */   addiu    $a1, $zero, 0x3C
/* 78F0 8002C4F0 8E22005C */  lw        $v0, 0x5C($s1)
/* 78F4 8002C4F4 2404001E */  addiu     $a0, $zero, 0x1E
/* 78F8 8002C4F8 AFA20010 */  sw        $v0, 0x10($sp)
/* 78FC 8002C4FC 8E220064 */  lw        $v0, 0x64($s1)
/* 7900 8002C500 AFA20014 */  sw        $v0, 0x14($sp)
/* 7904 8002C504 8E270054 */  lw        $a3, 0x54($s1)
/* 7908 8002C508 3C06800A */  lui       $a2, %hi(D_800980D4)
/* 790C 8002C50C 24C680D4 */  addiu     $a2, $a2, %lo(D_800980D4)
/* 7910 8002C510 0C00B082 */  jal       crash_screen_printf
/* 7914 8002C514 24050046 */   addiu    $a1, $zero, 0x46
/* 7918 8002C518 8E220074 */  lw        $v0, 0x74($s1)
/* 791C 8002C51C 2404001E */  addiu     $a0, $zero, 0x1E
/* 7920 8002C520 AFA20010 */  sw        $v0, 0x10($sp)
/* 7924 8002C524 8E22007C */  lw        $v0, 0x7C($s1)
/* 7928 8002C528 AFA20014 */  sw        $v0, 0x14($sp)
/* 792C 8002C52C 8E27006C */  lw        $a3, 0x6C($s1)
/* 7930 8002C530 3C06800A */  lui       $a2, %hi(D_800980F4)
/* 7934 8002C534 24C680F4 */  addiu     $a2, $a2, %lo(D_800980F4)
/* 7938 8002C538 0C00B082 */  jal       crash_screen_printf
/* 793C 8002C53C 24050050 */   addiu    $a1, $zero, 0x50
/* 7940 8002C540 8E22008C */  lw        $v0, 0x8C($s1)
/* 7944 8002C544 2404001E */  addiu     $a0, $zero, 0x1E
/* 7948 8002C548 AFA20010 */  sw        $v0, 0x10($sp)
/* 794C 8002C54C 8E220094 */  lw        $v0, 0x94($s1)
/* 7950 8002C550 AFA20014 */  sw        $v0, 0x14($sp)
/* 7954 8002C554 8E270084 */  lw        $a3, 0x84($s1)
/* 7958 8002C558 3C06800A */  lui       $a2, %hi(D_80098114)
/* 795C 8002C55C 24C68114 */  addiu     $a2, $a2, %lo(D_80098114)
/* 7960 8002C560 0C00B082 */  jal       crash_screen_printf
/* 7964 8002C564 2405005A */   addiu    $a1, $zero, 0x5A
/* 7968 8002C568 8E2200A4 */  lw        $v0, 0xA4($s1)
/* 796C 8002C56C 2404001E */  addiu     $a0, $zero, 0x1E
/* 7970 8002C570 AFA20010 */  sw        $v0, 0x10($sp)
/* 7974 8002C574 8E2200AC */  lw        $v0, 0xAC($s1)
/* 7978 8002C578 AFA20014 */  sw        $v0, 0x14($sp)
/* 797C 8002C57C 8E27009C */  lw        $a3, 0x9C($s1)
/* 7980 8002C580 3C06800A */  lui       $a2, %hi(D_80098134)
/* 7984 8002C584 24C68134 */  addiu     $a2, $a2, %lo(D_80098134)
/* 7988 8002C588 0C00B082 */  jal       crash_screen_printf
/* 798C 8002C58C 24050064 */   addiu    $a1, $zero, 0x64
/* 7990 8002C590 8E2200BC */  lw        $v0, 0xBC($s1)
/* 7994 8002C594 2404001E */  addiu     $a0, $zero, 0x1E
/* 7998 8002C598 AFA20010 */  sw        $v0, 0x10($sp)
/* 799C 8002C59C 8E2200C4 */  lw        $v0, 0xC4($s1)
/* 79A0 8002C5A0 AFA20014 */  sw        $v0, 0x14($sp)
/* 79A4 8002C5A4 8E2700B4 */  lw        $a3, 0xB4($s1)
/* 79A8 8002C5A8 3C06800A */  lui       $a2, %hi(D_80098154)
/* 79AC 8002C5AC 24C68154 */  addiu     $a2, $a2, %lo(D_80098154)
/* 79B0 8002C5B0 0C00B082 */  jal       crash_screen_printf
/* 79B4 8002C5B4 2405006E */   addiu    $a1, $zero, 0x6E
/* 79B8 8002C5B8 8E2200D4 */  lw        $v0, 0xD4($s1)
/* 79BC 8002C5BC 2404001E */  addiu     $a0, $zero, 0x1E
/* 79C0 8002C5C0 AFA20010 */  sw        $v0, 0x10($sp)
/* 79C4 8002C5C4 8E2200DC */  lw        $v0, 0xDC($s1)
/* 79C8 8002C5C8 AFA20014 */  sw        $v0, 0x14($sp)
/* 79CC 8002C5CC 8E2700CC */  lw        $a3, 0xCC($s1)
/* 79D0 8002C5D0 3C06800A */  lui       $a2, %hi(D_80098174)
/* 79D4 8002C5D4 24C68174 */  addiu     $a2, $a2, %lo(D_80098174)
/* 79D8 8002C5D8 0C00B082 */  jal       crash_screen_printf
/* 79DC 8002C5DC 24050078 */   addiu    $a1, $zero, 0x78
/* 79E0 8002C5E0 8E2200EC */  lw        $v0, 0xEC($s1)
/* 79E4 8002C5E4 2404001E */  addiu     $a0, $zero, 0x1E
/* 79E8 8002C5E8 AFA20010 */  sw        $v0, 0x10($sp)
/* 79EC 8002C5EC 8E2200F4 */  lw        $v0, 0xF4($s1)
/* 79F0 8002C5F0 AFA20014 */  sw        $v0, 0x14($sp)
/* 79F4 8002C5F4 8E2700E4 */  lw        $a3, 0xE4($s1)
/* 79F8 8002C5F8 3C06800A */  lui       $a2, %hi(D_80098194)
/* 79FC 8002C5FC 24C68194 */  addiu     $a2, $a2, %lo(D_80098194)
/* 7A00 8002C600 0C00B082 */  jal       crash_screen_printf
/* 7A04 8002C604 24050082 */   addiu    $a1, $zero, 0x82
/* 7A08 8002C608 2404001E */  addiu     $a0, $zero, 0x1E
/* 7A0C 8002C60C 8E220104 */  lw        $v0, 0x104($s1)
/* 7A10 8002C610 AFA20010 */  sw        $v0, 0x10($sp)
/* 7A14 8002C614 8E2700FC */  lw        $a3, 0xFC($s1)
/* 7A18 8002C618 3C06800A */  lui       $a2, %hi(D_800981B4)
/* 7A1C 8002C61C 24C681B4 */  addiu     $a2, $a2, %lo(D_800981B4)
/* 7A20 8002C620 0C00B082 */  jal       crash_screen_printf
/* 7A24 8002C624 2405008C */   addiu    $a1, $zero, 0x8C
/* 7A28 8002C628 8E24012C */  lw        $a0, 0x12C($s1)
/* 7A2C 8002C62C 0C00B0C9 */  jal       crash_screen_print_fpcsr
/* 7A30 8002C630 00000000 */   nop
/* 7A34 8002C634 2404001E */  addiu     $a0, $zero, 0x1E
/* 7A38 8002C638 240500AA */  addiu     $a1, $zero, 0xAA
/* 7A3C 8002C63C 0000302D */  daddu     $a2, $zero, $zero
/* 7A40 8002C640 0C00B0AE */  jal       crash_screen_print_fpr
/* 7A44 8002C644 26270134 */   addiu    $a3, $s1, 0x134
/* 7A48 8002C648 24040078 */  addiu     $a0, $zero, 0x78
/* 7A4C 8002C64C 240500AA */  addiu     $a1, $zero, 0xAA
/* 7A50 8002C650 24060002 */  addiu     $a2, $zero, 0x2
/* 7A54 8002C654 0C00B0AE */  jal       crash_screen_print_fpr
/* 7A58 8002C658 2627013C */   addiu    $a3, $s1, 0x13C
/* 7A5C 8002C65C 240400D2 */  addiu     $a0, $zero, 0xD2
/* 7A60 8002C660 240500AA */  addiu     $a1, $zero, 0xAA
/* 7A64 8002C664 24060004 */  addiu     $a2, $zero, 0x4
/* 7A68 8002C668 0C00B0AE */  jal       crash_screen_print_fpr
/* 7A6C 8002C66C 26270144 */   addiu    $a3, $s1, 0x144
/* 7A70 8002C670 2404001E */  addiu     $a0, $zero, 0x1E
/* 7A74 8002C674 240500B4 */  addiu     $a1, $zero, 0xB4
/* 7A78 8002C678 24060006 */  addiu     $a2, $zero, 0x6
/* 7A7C 8002C67C 0C00B0AE */  jal       crash_screen_print_fpr
/* 7A80 8002C680 2627014C */   addiu    $a3, $s1, 0x14C
/* 7A84 8002C684 24040078 */  addiu     $a0, $zero, 0x78
/* 7A88 8002C688 240500B4 */  addiu     $a1, $zero, 0xB4
/* 7A8C 8002C68C 24060008 */  addiu     $a2, $zero, 0x8
/* 7A90 8002C690 0C00B0AE */  jal       crash_screen_print_fpr
/* 7A94 8002C694 26270154 */   addiu    $a3, $s1, 0x154
/* 7A98 8002C698 240400D2 */  addiu     $a0, $zero, 0xD2
/* 7A9C 8002C69C 240500B4 */  addiu     $a1, $zero, 0xB4
/* 7AA0 8002C6A0 2406000A */  addiu     $a2, $zero, 0xA
/* 7AA4 8002C6A4 0C00B0AE */  jal       crash_screen_print_fpr
/* 7AA8 8002C6A8 2627015C */   addiu    $a3, $s1, 0x15C
/* 7AAC 8002C6AC 2404001E */  addiu     $a0, $zero, 0x1E
/* 7AB0 8002C6B0 240500BE */  addiu     $a1, $zero, 0xBE
/* 7AB4 8002C6B4 2406000C */  addiu     $a2, $zero, 0xC
/* 7AB8 8002C6B8 0C00B0AE */  jal       crash_screen_print_fpr
/* 7ABC 8002C6BC 26270164 */   addiu    $a3, $s1, 0x164
/* 7AC0 8002C6C0 24040078 */  addiu     $a0, $zero, 0x78
/* 7AC4 8002C6C4 240500BE */  addiu     $a1, $zero, 0xBE
/* 7AC8 8002C6C8 2406000E */  addiu     $a2, $zero, 0xE
/* 7ACC 8002C6CC 0C00B0AE */  jal       crash_screen_print_fpr
/* 7AD0 8002C6D0 2627016C */   addiu    $a3, $s1, 0x16C
/* 7AD4 8002C6D4 240400D2 */  addiu     $a0, $zero, 0xD2
/* 7AD8 8002C6D8 240500BE */  addiu     $a1, $zero, 0xBE
/* 7ADC 8002C6DC 24060010 */  addiu     $a2, $zero, 0x10
/* 7AE0 8002C6E0 0C00B0AE */  jal       crash_screen_print_fpr
/* 7AE4 8002C6E4 26270174 */   addiu    $a3, $s1, 0x174
/* 7AE8 8002C6E8 2404001E */  addiu     $a0, $zero, 0x1E
/* 7AEC 8002C6EC 240500C8 */  addiu     $a1, $zero, 0xC8
/* 7AF0 8002C6F0 24060012 */  addiu     $a2, $zero, 0x12
/* 7AF4 8002C6F4 0C00B0AE */  jal       crash_screen_print_fpr
/* 7AF8 8002C6F8 2627017C */   addiu    $a3, $s1, 0x17C
/* 7AFC 8002C6FC 24040078 */  addiu     $a0, $zero, 0x78
/* 7B00 8002C700 240500C8 */  addiu     $a1, $zero, 0xC8
/* 7B04 8002C704 24060014 */  addiu     $a2, $zero, 0x14
/* 7B08 8002C708 0C00B0AE */  jal       crash_screen_print_fpr
/* 7B0C 8002C70C 26270184 */   addiu    $a3, $s1, 0x184
/* 7B10 8002C710 240400D2 */  addiu     $a0, $zero, 0xD2
/* 7B14 8002C714 240500C8 */  addiu     $a1, $zero, 0xC8
/* 7B18 8002C718 24060016 */  addiu     $a2, $zero, 0x16
/* 7B1C 8002C71C 0C00B0AE */  jal       crash_screen_print_fpr
/* 7B20 8002C720 2627018C */   addiu    $a3, $s1, 0x18C
/* 7B24 8002C724 2404001E */  addiu     $a0, $zero, 0x1E
/* 7B28 8002C728 240500D2 */  addiu     $a1, $zero, 0xD2
/* 7B2C 8002C72C 24060018 */  addiu     $a2, $zero, 0x18
/* 7B30 8002C730 0C00B0AE */  jal       crash_screen_print_fpr
/* 7B34 8002C734 26270194 */   addiu    $a3, $s1, 0x194
/* 7B38 8002C738 24040078 */  addiu     $a0, $zero, 0x78
/* 7B3C 8002C73C 240500D2 */  addiu     $a1, $zero, 0xD2
/* 7B40 8002C740 2406001A */  addiu     $a2, $zero, 0x1A
/* 7B44 8002C744 0C00B0AE */  jal       crash_screen_print_fpr
/* 7B48 8002C748 2627019C */   addiu    $a3, $s1, 0x19C
/* 7B4C 8002C74C 240400D2 */  addiu     $a0, $zero, 0xD2
/* 7B50 8002C750 0080282D */  daddu     $a1, $a0, $zero
/* 7B54 8002C754 2406001C */  addiu     $a2, $zero, 0x1C
/* 7B58 8002C758 0C00B0AE */  jal       crash_screen_print_fpr
/* 7B5C 8002C75C 262701A4 */   addiu    $a3, $s1, 0x1A4
/* 7B60 8002C760 2404001E */  addiu     $a0, $zero, 0x1E
/* 7B64 8002C764 240500DC */  addiu     $a1, $zero, 0xDC
/* 7B68 8002C768 0080302D */  daddu     $a2, $a0, $zero
/* 7B6C 8002C76C 0C00B0AE */  jal       crash_screen_print_fpr
/* 7B70 8002C770 262701AC */   addiu    $a3, $s1, 0x1AC
/* 7B74 8002C774 0C00AFD0 */  jal       crash_screen_sleep
/* 7B78 8002C778 240401F4 */   addiu    $a0, $zero, 0x1F4
/* 7B7C 8002C77C 240400D2 */  addiu     $a0, $zero, 0xD2
/* 7B80 8002C780 8E4200FC */  lw        $v0, 0xFC($s2)
/* 7B84 8002C784 8C470000 */  lw        $a3, 0x0($v0)
/* 7B88 8002C788 3C06800A */  lui       $a2, %hi(D_800981C8)
/* 7B8C 8002C78C 24C681C8 */  addiu     $a2, $a2, %lo(D_800981C8)
/* 7B90 8002C790 0C00B082 */  jal       crash_screen_printf
/* 7B94 8002C794 2405008C */   addiu    $a1, $zero, 0x8C
/* 7B98 8002C798 8FBF0024 */  lw        $ra, 0x24($sp)
/* 7B9C 8002C79C 8FB20020 */  lw        $s2, 0x20($sp)
/* 7BA0 8002C7A0 8FB1001C */  lw        $s1, 0x1C($sp)
/* 7BA4 8002C7A4 8FB00018 */  lw        $s0, 0x18($sp)
/* 7BA8 8002C7A8 03E00008 */  jr        $ra
/* 7BAC 8002C7AC 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void crash_screen_draw_rect(s32 x, s32 y, s32 width, s32 height) {
    u16* ptr;
    s32 i;
    s32 j;

    if (gCrashScreen.width == (SCREEN_WIDTH * 2)) {
        x <<= 1;
        y <<= 1;
        width <<= 1;
        height <<= 1;
    }

    ptr = gCrashScreen.frameBuf + gCrashScreen.width * y + x;

    for (i = 0; i < height; i++) {
        for (j = 0; j < width; j++) {
            *ptr = ((*ptr & 0xE738) >> 2) | 1;
            ptr++;
        }

        ptr += gCrashScreen.width - width;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel update_player_shadow
/* 7B074 800E1BC4 3C02800F */  lui       $v0, %hi(gPlayerStatusPtr)
/* 7B078 800E1BC8 8C427B30 */  lw        $v0, %lo(gPlayerStatusPtr)($v0)
/* 7B07C 800E1BCC 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 7B080 800E1BD0 AFBF0058 */  sw        $ra, 0x58($sp)
/* 7B084 800E1BD4 AFB30054 */  sw        $s3, 0x54($sp)
/* 7B088 800E1BD8 AFB20050 */  sw        $s2, 0x50($sp)
/* 7B08C 800E1BDC AFB1004C */  sw        $s1, 0x4C($sp)
/* 7B090 800E1BE0 AFB00048 */  sw        $s0, 0x48($sp)
/* 7B094 800E1BE4 F7B60068 */  sdc1      $f22, 0x68($sp)
/* 7B098 800E1BE8 F7B40060 */  sdc1      $f20, 0x60($sp)
/* 7B09C 800E1BEC 0C044181 */  jal       get_shadow_by_index
/* 7B0A0 800E1BF0 8C4400CC */   lw       $a0, 0xCC($v0)
/* 7B0A4 800E1BF4 3C128011 */  lui       $s2, %hi(gPlayerStatus)
/* 7B0A8 800E1BF8 2652EFC8 */  addiu     $s2, $s2, %lo(gPlayerStatus)
/* 7B0AC 800E1BFC 0040802D */  daddu     $s0, $v0, $zero
/* 7B0B0 800E1C00 3C04800B */  lui       $a0, %hi(gCameras)
/* 7B0B4 800E1C04 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 7B0B8 800E1C08 44801000 */  mtc1      $zero, $f2
/* 7B0BC 800E1C0C C64400A8 */  lwc1      $f4, 0xA8($s2)
/* 7B0C0 800E1C10 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 7B0C4 800E1C14 44810000 */  mtc1      $at, $f0
/* 7B0C8 800E1C18 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 7B0CC 800E1C1C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 7B0D0 800E1C20 46001206 */  mov.s     $f8, $f2
/* 7B0D4 800E1C24 00031080 */  sll       $v0, $v1, 2
/* 7B0D8 800E1C28 00431021 */  addu      $v0, $v0, $v1
/* 7B0DC 800E1C2C 00021080 */  sll       $v0, $v0, 2
/* 7B0E0 800E1C30 00431023 */  subu      $v0, $v0, $v1
/* 7B0E4 800E1C34 000218C0 */  sll       $v1, $v0, 3
/* 7B0E8 800E1C38 00431021 */  addu      $v0, $v0, $v1
/* 7B0EC 800E1C3C 000210C0 */  sll       $v0, $v0, 3
/* 7B0F0 800E1C40 00448821 */  addu      $s1, $v0, $a0
/* 7B0F4 800E1C44 4604003E */  c.le.s    $f0, $f4
/* 7B0F8 800E1C48 00000000 */  nop
/* 7B0FC 800E1C4C 4500000A */  bc1f      .L800E1C78
/* 7B100 800E1C50 E7A80034 */   swc1     $f8, 0x34($sp)
/* 7B104 800E1C54 3C014387 */  lui       $at, (0x43870000 >> 16)
/* 7B108 800E1C58 44810000 */  mtc1      $at, $f0
/* 7B10C 800E1C5C 00000000 */  nop
/* 7B110 800E1C60 4600203C */  c.lt.s    $f4, $f0
/* 7B114 800E1C64 00000000 */  nop
/* 7B118 800E1C68 45000003 */  bc1f      .L800E1C78
/* 7B11C 800E1C6C 00000000 */   nop
/* 7B120 800E1C70 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 7B124 800E1C74 44814000 */  mtc1      $at, $f8
.L800E1C78:
/* 7B128 800E1C78 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 7B12C 800E1C7C 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 7B130 800E1C80 C6420028 */  lwc1      $f2, 0x28($s2)
/* 7B134 800E1C84 3C014480 */  lui       $at, (0x44800000 >> 16)
/* 7B138 800E1C88 44810000 */  mtc1      $at, $f0
/* 7B13C 800E1C8C 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 7B140 800E1C90 44816000 */  mtc1      $at, $f12
/* 7B144 800E1C94 00031080 */  sll       $v0, $v1, 2
/* 7B148 800E1C98 00431021 */  addu      $v0, $v0, $v1
/* 7B14C 800E1C9C 00021080 */  sll       $v0, $v0, 2
/* 7B150 800E1CA0 00431023 */  subu      $v0, $v0, $v1
/* 7B154 800E1CA4 000218C0 */  sll       $v1, $v0, 3
/* 7B158 800E1CA8 00431021 */  addu      $v0, $v0, $v1
/* 7B15C 800E1CAC 000210C0 */  sll       $v0, $v0, 3
/* 7B160 800E1CB0 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 7B164 800E1CB4 00220821 */  addu      $at, $at, $v0
/* 7B168 800E1CB8 C4261DEC */  lwc1      $f6, %lo(gCameras + 0x6C)($at)
/* 7B16C 800E1CBC E6020010 */  swc1      $f2, 0x10($s0)
/* 7B170 800E1CC0 C6440030 */  lwc1      $f4, 0x30($s2)
/* 7B174 800E1CC4 E6040018 */  swc1      $f4, 0x18($s0)
/* 7B178 800E1CC8 864200B0 */  lh        $v0, 0xB0($s2)
/* 7B17C 800E1CCC 27A60028 */  addiu     $a2, $sp, 0x28
/* 7B180 800E1CD0 E7A00034 */  swc1      $f0, 0x34($sp)
/* 7B184 800E1CD4 3C014060 */  lui       $at, (0x40600000 >> 16)
/* 7B188 800E1CD8 44810000 */  mtc1      $at, $f0
/* 7B18C 800E1CDC 460C4301 */  sub.s     $f12, $f8, $f12
/* 7B190 800E1CE0 E7A20028 */  swc1      $f2, 0x28($sp)
/* 7B194 800E1CE4 44821000 */  mtc1      $v0, $f2
/* 7B198 800E1CE8 00000000 */  nop
/* 7B19C 800E1CEC 468010A0 */  cvt.s.w   $f2, $f2
/* 7B1A0 800E1CF0 46001083 */  div.s     $f2, $f2, $f0
/* 7B1A4 800E1CF4 46066300 */  add.s     $f12, $f12, $f6
/* 7B1A8 800E1CF8 C640002C */  lwc1      $f0, 0x2C($s2)
/* 7B1AC 800E1CFC 864200B2 */  lh        $v0, 0xB2($s2)
/* 7B1B0 800E1D00 27A7002C */  addiu     $a3, $sp, 0x2C
/* 7B1B4 800E1D04 E7A40030 */  swc1      $f4, 0x30($sp)
/* 7B1B8 800E1D08 46020000 */  add.s     $f0, $f0, $f2
/* 7B1BC 800E1D0C 44827000 */  mtc1      $v0, $f14
/* 7B1C0 800E1D10 00000000 */  nop
/* 7B1C4 800E1D14 468073A0 */  cvt.s.w   $f14, $f14
/* 7B1C8 800E1D18 27A20030 */  addiu     $v0, $sp, 0x30
/* 7B1CC 800E1D1C E7A0002C */  swc1      $f0, 0x2C($sp)
/* 7B1D0 800E1D20 AFA20010 */  sw        $v0, 0x10($sp)
/* 7B1D4 800E1D24 27A20034 */  addiu     $v0, $sp, 0x34
/* 7B1D8 800E1D28 AFA20014 */  sw        $v0, 0x14($sp)
/* 7B1DC 800E1D2C 27A20038 */  addiu     $v0, $sp, 0x38
/* 7B1E0 800E1D30 AFA20018 */  sw        $v0, 0x18($sp)
/* 7B1E4 800E1D34 27A2003C */  addiu     $v0, $sp, 0x3C
/* 7B1E8 800E1D38 AFA2001C */  sw        $v0, 0x1C($sp)
/* 7B1EC 800E1D3C 27A20040 */  addiu     $v0, $sp, 0x40
/* 7B1F0 800E1D40 AFA20020 */  sw        $v0, 0x20($sp)
/* 7B1F4 800E1D44 27A20044 */  addiu     $v0, $sp, 0x44
/* 7B1F8 800E1D48 0C0377F4 */  jal       player_raycast_below
/* 7B1FC 800E1D4C AFA20024 */   sw       $v0, 0x24($sp)
/* 7B200 800E1D50 C7A00038 */  lwc1      $f0, 0x38($sp)
/* 7B204 800E1D54 C7A2003C */  lwc1      $f2, 0x3C($sp)
/* 7B208 800E1D58 3C018016 */  lui       $at, %hi(gCollisionStatus + 0x6)
/* 7B20C 800E1D5C A422A556 */  sh        $v0, %lo(gCollisionStatus + 0x6)($at)
/* 7B210 800E1D60 E6000028 */  swc1      $f0, 0x28($s0)
/* 7B214 800E1D64 E6020030 */  swc1      $f2, 0x30($s0)
/* 7B218 800E1D68 C62C006C */  lwc1      $f12, 0x6C($s1)
/* 7B21C 800E1D6C 0C00A6C9 */  jal       clamp_angle
/* 7B220 800E1D70 46006307 */   neg.s    $f12, $f12
/* 7B224 800E1D74 C7A40038 */  lwc1      $f4, 0x38($sp)
/* 7B228 800E1D78 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 7B22C 800E1D7C 44813000 */  mtc1      $at, $f6
/* 7B230 800E1D80 00000000 */  nop
/* 7B234 800E1D84 46062100 */  add.s     $f4, $f4, $f6
/* 7B238 800E1D88 C7A2003C */  lwc1      $f2, 0x3C($sp)
/* 7B23C 800E1D8C 4480B000 */  mtc1      $zero, $f22
/* 7B240 800E1D90 46061080 */  add.s     $f2, $f2, $f6
/* 7B244 800E1D94 E600002C */  swc1      $f0, 0x2C($s0)
/* 7B248 800E1D98 46162032 */  c.eq.s    $f4, $f22
/* 7B24C 800E1D9C E7A40038 */  swc1      $f4, 0x38($sp)
/* 7B250 800E1DA0 45000005 */  bc1f      .L800E1DB8
/* 7B254 800E1DA4 E7A2003C */   swc1     $f2, 0x3C($sp)
/* 7B258 800E1DA8 46161032 */  c.eq.s    $f2, $f22
/* 7B25C 800E1DAC 00000000 */  nop
/* 7B260 800E1DB0 45010041 */  bc1t      .L800E1EB8
/* 7B264 800E1DB4 00000000 */   nop
.L800E1DB8:
/* 7B268 800E1DB8 C7AC0028 */  lwc1      $f12, 0x28($sp)
/* 7B26C 800E1DBC C7AE0030 */  lwc1      $f14, 0x30($sp)
/* 7B270 800E1DC0 8E460028 */  lw        $a2, 0x28($s2)
/* 7B274 800E1DC4 0C00A7B5 */  jal       dist2D
/* 7B278 800E1DC8 8E470030 */   lw       $a3, 0x30($s2)
/* 7B27C 800E1DCC C64C0028 */  lwc1      $f12, 0x28($s2)
/* 7B280 800E1DD0 C64E0030 */  lwc1      $f14, 0x30($s2)
/* 7B284 800E1DD4 8FA60028 */  lw        $a2, 0x28($sp)
/* 7B288 800E1DD8 8FA70030 */  lw        $a3, 0x30($sp)
/* 7B28C 800E1DDC 4600028D */  trunc.w.s $f10, $f0
/* 7B290 800E1DE0 44135000 */  mfc1      $s3, $f10
/* 7B294 800E1DE4 0C00A720 */  jal       atan2
/* 7B298 800E1DE8 00000000 */   nop
/* 7B29C 800E1DEC 0C00A788 */  jal       get_player_normal_yaw
/* 7B2A0 800E1DF0 46000506 */   mov.s    $f20, $f0
/* 7B2A4 800E1DF4 3C01C2B4 */  lui       $at, (0xC2B40000 >> 16)
/* 7B2A8 800E1DF8 44816000 */  mtc1      $at, $f12
/* 7B2AC 800E1DFC 00000000 */  nop
/* 7B2B0 800E1E00 46146301 */  sub.s     $f12, $f12, $f20
/* 7B2B4 800E1E04 0C00A6C9 */  jal       clamp_angle
/* 7B2B8 800E1E08 46006300 */   add.s    $f12, $f12, $f0
/* 7B2BC 800E1E0C 3C118007 */  lui       $s1, %hi(gGameStatusPtr)
/* 7B2C0 800E1E10 2631419C */  addiu     $s1, $s1, %lo(gGameStatusPtr)
/* 7B2C4 800E1E14 8E220000 */  lw        $v0, 0x0($s1)
/* 7B2C8 800E1E18 C442012C */  lwc1      $f2, 0x12C($v0)
/* 7B2CC 800E1E1C 4600028D */  trunc.w.s $f10, $f0
/* 7B2D0 800E1E20 44025000 */  mfc1      $v0, $f10
/* 7B2D4 800E1E24 46161032 */  c.eq.s    $f2, $f22
/* 7B2D8 800E1E28 00000000 */  nop
/* 7B2DC 800E1E2C 45010022 */  bc1t      .L800E1EB8
/* 7B2E0 800E1E30 00000000 */   nop
/* 7B2E4 800E1E34 44826000 */  mtc1      $v0, $f12
/* 7B2E8 800E1E38 00000000 */  nop
/* 7B2EC 800E1E3C 0C00A8BB */  jal       sin_deg
/* 7B2F0 800E1E40 46806320 */   cvt.s.w  $f12, $f12
/* 7B2F4 800E1E44 8E220000 */  lw        $v0, 0x0($s1)
/* 7B2F8 800E1E48 C4440128 */  lwc1      $f4, 0x128($v0)
/* 7B2FC 800E1E4C 46042102 */  mul.s     $f4, $f4, $f4
/* 7B300 800E1E50 00000000 */  nop
/* 7B304 800E1E54 C4420130 */  lwc1      $f2, 0x130($v0)
/* 7B308 800E1E58 46021082 */  mul.s     $f2, $f2, $f2
/* 7B30C 800E1E5C 00000000 */  nop
/* 7B310 800E1E60 46022300 */  add.s     $f12, $f4, $f2
/* 7B314 800E1E64 46006084 */  sqrt.s    $f2, $f12
/* 7B318 800E1E68 46021032 */  c.eq.s    $f2, $f2
/* 7B31C 800E1E6C 00000000 */  nop
/* 7B320 800E1E70 45010005 */  bc1t      .L800E1E88
/* 7B324 800E1E74 46000506 */   mov.s    $f20, $f0
/* 7B328 800E1E78 0C0187BC */  jal       sqrtf
/* 7B32C 800E1E7C 00000000 */   nop
/* 7B330 800E1E80 46000086 */  mov.s     $f2, $f0
/* 7B334 800E1E84 8E220000 */  lw        $v0, 0x0($s1)
.L800E1E88:
/* 7B338 800E1E88 C440012C */  lwc1      $f0, 0x12C($v0)
/* 7B33C 800E1E8C 46001003 */  div.s     $f0, $f2, $f0
/* 7B340 800E1E90 44931000 */  mtc1      $s3, $f2
/* 7B344 800E1E94 00000000 */  nop
/* 7B348 800E1E98 468010A0 */  cvt.s.w   $f2, $f2
/* 7B34C 800E1E9C 46020002 */  mul.s     $f0, $f0, $f2
/* 7B350 800E1EA0 00000000 */  nop
/* 7B354 800E1EA4 46140002 */  mul.s     $f0, $f0, $f20
/* 7B358 800E1EA8 00000000 */  nop
/* 7B35C 800E1EAC C7A2002C */  lwc1      $f2, 0x2C($sp)
/* 7B360 800E1EB0 46001081 */  sub.s     $f2, $f2, $f0
/* 7B364 800E1EB4 E7A2002C */  swc1      $f2, 0x2C($sp)
.L800E1EB8:
/* 7B368 800E1EB8 C7A0002C */  lwc1      $f0, 0x2C($sp)
/* 7B36C 800E1EBC E6000014 */  swc1      $f0, 0x14($s0)
/* 7B370 800E1EC0 9242000E */  lbu       $v0, 0xE($s2)
/* 7B374 800E1EC4 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 7B378 800E1EC8 44811800 */  mtc1      $at, $f3
/* 7B37C 800E1ECC 44801000 */  mtc1      $zero, $f2
/* 7B380 800E1ED0 44820000 */  mtc1      $v0, $f0
/* 7B384 800E1ED4 00000000 */  nop
/* 7B388 800E1ED8 46800021 */  cvt.d.w   $f0, $f0
/* 7B38C 800E1EDC 46220002 */  mul.d     $f0, $f0, $f2
/* 7B390 800E1EE0 00000000 */  nop
/* 7B394 800E1EE4 3C0141E0 */  lui       $at, (0x41E00000 >> 16)
/* 7B398 800E1EE8 44811800 */  mtc1      $at, $f3
/* 7B39C 800E1EEC 44801000 */  mtc1      $zero, $f2
/* 7B3A0 800E1EF0 00000000 */  nop
/* 7B3A4 800E1EF4 4620103E */  c.le.d    $f2, $f0
/* 7B3A8 800E1EF8 00000000 */  nop
/* 7B3AC 800E1EFC 45010005 */  bc1t      .L800E1F14
/* 7B3B0 800E1F00 26040005 */   addiu    $a0, $s0, 0x5
/* 7B3B4 800E1F04 4620028D */  trunc.w.d $f10, $f0
/* 7B3B8 800E1F08 44035000 */  mfc1      $v1, $f10
/* 7B3BC 800E1F0C 080387CC */  j         .L800E1F30
/* 7B3C0 800E1F10 A0830000 */   sb       $v1, 0x0($a0)
.L800E1F14:
/* 7B3C4 800E1F14 46220001 */  sub.d     $f0, $f0, $f2
/* 7B3C8 800E1F18 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 7B3CC 800E1F1C 4620028D */  trunc.w.d $f10, $f0
/* 7B3D0 800E1F20 44035000 */  mfc1      $v1, $f10
/* 7B3D4 800E1F24 00000000 */  nop
/* 7B3D8 800E1F28 00621825 */  or        $v1, $v1, $v0
/* 7B3DC 800E1F2C A0830000 */  sb        $v1, 0x0($a0)
.L800E1F30:
/* 7B3E0 800E1F30 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 7B3E4 800E1F34 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 7B3E8 800E1F38 9042007E */  lbu       $v0, 0x7E($v0)
/* 7B3EC 800E1F3C 30420001 */  andi      $v0, $v0, 0x1
/* 7B3F0 800E1F40 14400006 */  bnez      $v0, .L800E1F5C
/* 7B3F4 800E1F44 00000000 */   nop
/* 7B3F8 800E1F48 8FA50034 */  lw        $a1, 0x34($sp)
/* 7B3FC 800E1F4C 0C044A17 */  jal       set_standard_shadow_scale
/* 7B400 800E1F50 0200202D */   daddu    $a0, $s0, $zero
/* 7B404 800E1F54 080387DA */  j         .L800E1F68
/* 7B408 800E1F58 00000000 */   nop
.L800E1F5C:
/* 7B40C 800E1F5C 8FA50034 */  lw        $a1, 0x34($sp)
/* 7B410 800E1F60 0C044A75 */  jal       set_peach_shadow_scale
/* 7B414 800E1F64 0200202D */   daddu    $a0, $s0, $zero
.L800E1F68:
/* 7B418 800E1F68 8FBF0058 */  lw        $ra, 0x58($sp)
/* 7B41C 800E1F6C 8FB30054 */  lw        $s3, 0x54($sp)
/* 7B420 800E1F70 8FB20050 */  lw        $s2, 0x50($sp)
/* 7B424 800E1F74 8FB1004C */  lw        $s1, 0x4C($sp)
/* 7B428 800E1F78 8FB00048 */  lw        $s0, 0x48($sp)
/* 7B42C 800E1F7C D7B60068 */  ldc1      $f22, 0x68($sp)
/* 7B430 800E1F80 D7B40060 */  ldc1      $f20, 0x60($sp)
/* 7B434 800E1F84 03E00008 */  jr        $ra
/* 7B438 800E1F88 27BD0070 */   addiu    $sp, $sp, 0x70
/* 7B43C 800E1F8C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void update_player_shadow(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    Shadow* shadow = get_shadow_by_index(gPlayerStatusPtr->shadowID);
    Camera* camera = &gCameras[gCurrentCameraID];
    f32 shadowScale = 0.0f;
    f32 yawTemp = 0.0f;
    f32 hitDirX, hitDirZ;
    f32 hitRx, hitRz;
    f32 x, y, z;
    f32 playerX, playerZ;
    s32 dist;
    f32 raycastYaw;

    if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
        yawTemp = 180.0f;
    }

    raycastYaw = (yawTemp - 90.0f) + gCameras[gCurrentCameraID].currentYaw;
    shadow->position.x = playerX = playerStatus->position.x;
    shadow->position.z = playerZ = playerStatus->position.z;
    x = playerX;
    y = playerStatus->position.y + (playerStatus->colliderHeight / 3.5f);
    z = playerZ;
    shadowScale = 1024.0f;
    gCollisionStatus.floorBelow = player_raycast_below(raycastYaw, playerStatus->colliderDiameter, &x, &y, &z,
                                                       &shadowScale, &hitRx, &hitRz, &hitDirX, &hitDirZ);
    shadow->rotation.x = hitRx;
    shadow->rotation.z = hitRz;
    shadow->rotation.y = clamp_angle(-camera->currentYaw);
    hitRx += 180.0f;
    hitRz += 180.0f;

    if (hitRx != 0.0f || hitRz != 0.0f) {
        s32 dist = dist2D(x, z, playerStatus->position.x, playerStatus->position.z);
        f32 tan = atan2(playerStatus->position.x, playerStatus->position.z, x, z);
        s32 angleTemp = clamp_angle((-90.0f - tan) + get_player_normal_yaw());

        if (gGameStatusPtr->playerGroundTraceNormal.y != 0.0f) {
            y -= sqrtf(SQ(gGameStatusPtr->playerGroundTraceNormal.x) + SQ(gGameStatusPtr->playerGroundTraceNormal.z)) /
                       gGameStatusPtr->playerGroundTraceNormal.y * dist * sin_deg(angleTemp);
        }
    }

    shadow->position.y = y;
    shadow->alpha = (f64)playerStatus->alpha1 / 2;

    if (!(gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH)) {
        set_standard_shadow_scale(shadow, shadowScale);
    } else {
        set_peach_shadow_scale(shadow, shadowScale);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel gfx_frame_filter_pass_1
/* 265C 8002725C 27BDFF88 */  addiu     $sp, $sp, -0x78
/* 2660 80027260 0080582D */  daddu     $t3, $a0, $zero
/* 2664 80027264 AFA5007C */  sw        $a1, 0x7C($sp)
/* 2668 80027268 0000282D */  daddu     $a1, $zero, $zero
/* 266C 8002726C 27A90018 */  addiu     $t1, $sp, 0x18
/* 2670 80027270 27A80038 */  addiu     $t0, $sp, 0x38
/* 2674 80027274 27A70058 */  addiu     $a3, $sp, 0x58
/* 2678 80027278 8BAC007C */  lwl       $t4, 0x7C($sp)
/* 267C 8002727C 9BAC007F */  lwr       $t4, 0x7F($sp)
/* 2680 80027280 ABAC0008 */  swl       $t4, 0x8($sp)
/* 2684 80027284 BBAC000B */  swr       $t4, 0xB($sp)
/* 2688 80027288 8BAC007C */  lwl       $t4, 0x7C($sp)
/* 268C 8002728C 9BAC007F */  lwr       $t4, 0x7F($sp)
/* 2690 80027290 ABAC0000 */  swl       $t4, 0x0($sp)
/* 2694 80027294 BBAC0003 */  swr       $t4, 0x3($sp)
.L80027298:
/* 2698 80027298 01251021 */  addu      $v0, $t1, $a1
/* 269C 8002729C 01051821 */  addu      $v1, $t0, $a1
/* 26A0 800272A0 00E52021 */  addu      $a0, $a3, $a1
/* 26A4 800272A4 24A50001 */  addiu     $a1, $a1, 0x1
/* 26A8 800272A8 A0400000 */  sb        $zero, 0x0($v0)
/* 26AC 800272AC 28A20020 */  slti      $v0, $a1, 0x20
/* 26B0 800272B0 A0600000 */  sb        $zero, 0x0($v1)
/* 26B4 800272B4 1440FFF8 */  bnez      $v0, .L80027298
/* 26B8 800272B8 A0800000 */   sb       $zero, 0x0($a0)
/* 26BC 800272BC 0000282D */  daddu     $a1, $zero, $zero
/* 26C0 800272C0 240A0008 */  addiu     $t2, $zero, 0x8
/* 26C4 800272C4 27A90018 */  addiu     $t1, $sp, 0x18
/* 26C8 800272C8 27A80038 */  addiu     $t0, $sp, 0x38
/* 26CC 800272CC 27A70058 */  addiu     $a3, $sp, 0x58
/* 26D0 800272D0 0160202D */  daddu     $a0, $t3, $zero
.L800272D4:
/* 26D4 800272D4 90820003 */  lbu       $v0, 0x3($a0)
/* 26D8 800272D8 144A0010 */  bne       $v0, $t2, .L8002731C
/* 26DC 800272DC 24A50001 */   addiu    $a1, $a1, 0x1
/* 26E0 800272E0 90830000 */  lbu       $v1, 0x0($a0)
/* 26E4 800272E4 01231821 */  addu      $v1, $t1, $v1
/* 26E8 800272E8 90620000 */  lbu       $v0, 0x0($v1)
/* 26EC 800272EC 24420001 */  addiu     $v0, $v0, 0x1
/* 26F0 800272F0 A0620000 */  sb        $v0, 0x0($v1)
/* 26F4 800272F4 90830001 */  lbu       $v1, 0x1($a0)
/* 26F8 800272F8 01031821 */  addu      $v1, $t0, $v1
/* 26FC 800272FC 90620000 */  lbu       $v0, 0x0($v1)
/* 2700 80027300 24420001 */  addiu     $v0, $v0, 0x1
/* 2704 80027304 A0620000 */  sb        $v0, 0x0($v1)
/* 2708 80027308 90830002 */  lbu       $v1, 0x2($a0)
/* 270C 8002730C 00E31821 */  addu      $v1, $a3, $v1
/* 2710 80027310 90620000 */  lbu       $v0, 0x0($v1)
/* 2714 80027314 24420001 */  addiu     $v0, $v0, 0x1
/* 2718 80027318 A0620000 */  sb        $v0, 0x0($v1)
.L8002731C:
/* 271C 8002731C 28A20006 */  slti      $v0, $a1, 0x6
/* 2720 80027320 1440FFEC */  bnez      $v0, .L800272D4
/* 2724 80027324 24840004 */   addiu    $a0, $a0, 0x4
/* 2728 80027328 0000282D */  daddu     $a1, $zero, $zero
/* 272C 8002732C 27A40018 */  addiu     $a0, $sp, 0x18
/* 2730 80027330 00851821 */  addu      $v1, $a0, $a1
.L80027334:
/* 2734 80027334 90620000 */  lbu       $v0, 0x0($v1)
/* 2738 80027338 50400004 */  beql      $v0, $zero, .L8002734C
/* 273C 8002733C 24A50001 */   addiu    $a1, $a1, 0x1
/* 2740 80027340 2442FFFF */  addiu     $v0, $v0, -0x1
/* 2744 80027344 08009CD6 */  j         .L80027358
/* 2748 80027348 A0620000 */   sb       $v0, 0x0($v1)
.L8002734C:
/* 274C 8002734C 28A20020 */  slti      $v0, $a1, 0x20
/* 2750 80027350 1440FFF8 */  bnez      $v0, .L80027334
/* 2754 80027354 00851821 */   addu     $v1, $a0, $a1
.L80027358:
/* 2758 80027358 28A20020 */  slti      $v0, $a1, 0x20
/* 275C 8002735C 10400009 */  beqz      $v0, .L80027384
/* 2760 80027360 27A30018 */   addiu    $v1, $sp, 0x18
/* 2764 80027364 00651021 */  addu      $v0, $v1, $a1
.L80027368:
/* 2768 80027368 90420000 */  lbu       $v0, 0x0($v0)
/* 276C 8002736C 14400005 */  bnez      $v0, .L80027384
/* 2770 80027370 00000000 */   nop
/* 2774 80027374 24A50001 */  addiu     $a1, $a1, 0x1
/* 2778 80027378 28A20020 */  slti      $v0, $a1, 0x20
/* 277C 8002737C 1440FFFA */  bnez      $v0, .L80027368
/* 2780 80027380 00651021 */   addu     $v0, $v1, $a1
.L80027384:
/* 2784 80027384 93A20000 */  lbu       $v0, 0x0($sp)
/* 2788 80027388 00A2102A */  slt       $v0, $a1, $v0
/* 278C 8002738C 54400001 */  bnel      $v0, $zero, .L80027394
/* 2790 80027390 A3A50000 */   sb       $a1, 0x0($sp)
.L80027394:
/* 2794 80027394 0000282D */  daddu     $a1, $zero, $zero
/* 2798 80027398 27A40038 */  addiu     $a0, $sp, 0x38
/* 279C 8002739C 00851821 */  addu      $v1, $a0, $a1
.L800273A0:
/* 27A0 800273A0 90620000 */  lbu       $v0, 0x0($v1)
/* 27A4 800273A4 50400004 */  beql      $v0, $zero, .L800273B8
/* 27A8 800273A8 24A50001 */   addiu    $a1, $a1, 0x1
/* 27AC 800273AC 2442FFFF */  addiu     $v0, $v0, -0x1
/* 27B0 800273B0 08009CF1 */  j         .L800273C4
/* 27B4 800273B4 A0620000 */   sb       $v0, 0x0($v1)
.L800273B8:
/* 27B8 800273B8 28A20020 */  slti      $v0, $a1, 0x20
/* 27BC 800273BC 1440FFF8 */  bnez      $v0, .L800273A0
/* 27C0 800273C0 00851821 */   addu     $v1, $a0, $a1
.L800273C4:
/* 27C4 800273C4 28A20020 */  slti      $v0, $a1, 0x20
/* 27C8 800273C8 10400009 */  beqz      $v0, .L800273F0
/* 27CC 800273CC 27A30038 */   addiu    $v1, $sp, 0x38
/* 27D0 800273D0 00651021 */  addu      $v0, $v1, $a1
.L800273D4:
/* 27D4 800273D4 90420000 */  lbu       $v0, 0x0($v0)
/* 27D8 800273D8 14400005 */  bnez      $v0, .L800273F0
/* 27DC 800273DC 00000000 */   nop
/* 27E0 800273E0 24A50001 */  addiu     $a1, $a1, 0x1
/* 27E4 800273E4 28A20020 */  slti      $v0, $a1, 0x20
/* 27E8 800273E8 1440FFFA */  bnez      $v0, .L800273D4
/* 27EC 800273EC 00651021 */   addu     $v0, $v1, $a1
.L800273F0:
/* 27F0 800273F0 93A20001 */  lbu       $v0, 0x1($sp)
/* 27F4 800273F4 00A2102A */  slt       $v0, $a1, $v0
/* 27F8 800273F8 54400001 */  bnel      $v0, $zero, .L80027400
/* 27FC 800273FC A3A50001 */   sb       $a1, 0x1($sp)
.L80027400:
/* 2800 80027400 0000282D */  daddu     $a1, $zero, $zero
/* 2804 80027404 27A40058 */  addiu     $a0, $sp, 0x58
/* 2808 80027408 00851821 */  addu      $v1, $a0, $a1
.L8002740C:
/* 280C 8002740C 90620000 */  lbu       $v0, 0x0($v1)
/* 2810 80027410 50400004 */  beql      $v0, $zero, .L80027424
/* 2814 80027414 24A50001 */   addiu    $a1, $a1, 0x1
/* 2818 80027418 2442FFFF */  addiu     $v0, $v0, -0x1
/* 281C 8002741C 08009D0C */  j         .L80027430
/* 2820 80027420 A0620000 */   sb       $v0, 0x0($v1)
.L80027424:
/* 2824 80027424 28A20020 */  slti      $v0, $a1, 0x20
/* 2828 80027428 1440FFF8 */  bnez      $v0, .L8002740C
/* 282C 8002742C 00851821 */   addu     $v1, $a0, $a1
.L80027430:
/* 2830 80027430 28A20020 */  slti      $v0, $a1, 0x20
/* 2834 80027434 10400009 */  beqz      $v0, .L8002745C
/* 2838 80027438 27A30058 */   addiu    $v1, $sp, 0x58
/* 283C 8002743C 00651021 */  addu      $v0, $v1, $a1
.L80027440:
/* 2840 80027440 90420000 */  lbu       $v0, 0x0($v0)
/* 2844 80027444 14400005 */  bnez      $v0, .L8002745C
/* 2848 80027448 00000000 */   nop
/* 284C 8002744C 24A50001 */  addiu     $a1, $a1, 0x1
/* 2850 80027450 28A20020 */  slti      $v0, $a1, 0x20
/* 2854 80027454 1440FFFA */  bnez      $v0, .L80027440
/* 2858 80027458 00651021 */   addu     $v0, $v1, $a1
.L8002745C:
/* 285C 8002745C 93A20002 */  lbu       $v0, 0x2($sp)
/* 2860 80027460 00A2102A */  slt       $v0, $a1, $v0
/* 2864 80027464 54400001 */  bnel      $v0, $zero, .L8002746C
/* 2868 80027468 A3A50002 */   sb       $a1, 0x2($sp)
.L8002746C:
/* 286C 8002746C 2405001F */  addiu     $a1, $zero, 0x1F
/* 2870 80027470 27A30018 */  addiu     $v1, $sp, 0x18
/* 2874 80027474 00651021 */  addu      $v0, $v1, $a1
.L80027478:
/* 2878 80027478 90420000 */  lbu       $v0, 0x0($v0)
/* 287C 8002747C 14400004 */  bnez      $v0, .L80027490
/* 2880 80027480 00000000 */   nop
/* 2884 80027484 24A5FFFF */  addiu     $a1, $a1, -0x1
/* 2888 80027488 04A1FFFB */  bgez      $a1, .L80027478
/* 288C 8002748C 00651021 */   addu     $v0, $v1, $a1
.L80027490:
/* 2890 80027490 93A20008 */  lbu       $v0, 0x8($sp)
/* 2894 80027494 0045102A */  slt       $v0, $v0, $a1
/* 2898 80027498 54400001 */  bnel      $v0, $zero, .L800274A0
/* 289C 8002749C A3A50008 */   sb       $a1, 0x8($sp)
.L800274A0:
/* 28A0 800274A0 2405001F */  addiu     $a1, $zero, 0x1F
/* 28A4 800274A4 27A30038 */  addiu     $v1, $sp, 0x38
/* 28A8 800274A8 00651021 */  addu      $v0, $v1, $a1
.L800274AC:
/* 28AC 800274AC 90420000 */  lbu       $v0, 0x0($v0)
/* 28B0 800274B0 14400004 */  bnez      $v0, .L800274C4
/* 28B4 800274B4 00000000 */   nop
/* 28B8 800274B8 24A5FFFF */  addiu     $a1, $a1, -0x1
/* 28BC 800274BC 04A1FFFB */  bgez      $a1, .L800274AC
/* 28C0 800274C0 00651021 */   addu     $v0, $v1, $a1
.L800274C4:
/* 28C4 800274C4 93A20009 */  lbu       $v0, 0x9($sp)
/* 28C8 800274C8 0045102A */  slt       $v0, $v0, $a1
/* 28CC 800274CC 54400001 */  bnel      $v0, $zero, .L800274D4
/* 28D0 800274D0 A3A50009 */   sb       $a1, 0x9($sp)
.L800274D4:
/* 28D4 800274D4 2405001F */  addiu     $a1, $zero, 0x1F
/* 28D8 800274D8 27A30058 */  addiu     $v1, $sp, 0x58
/* 28DC 800274DC 00651021 */  addu      $v0, $v1, $a1
.L800274E0:
/* 28E0 800274E0 90420000 */  lbu       $v0, 0x0($v0)
/* 28E4 800274E4 14400004 */  bnez      $v0, .L800274F8
/* 28E8 800274E8 00000000 */   nop
/* 28EC 800274EC 24A5FFFF */  addiu     $a1, $a1, -0x1
/* 28F0 800274F0 04A1FFFB */  bgez      $a1, .L800274E0
/* 28F4 800274F4 00651021 */   addu     $v0, $v1, $a1
.L800274F8:
/* 28F8 800274F8 93A2000A */  lbu       $v0, 0xA($sp)
/* 28FC 800274FC 0045102A */  slt       $v0, $v0, $a1
/* 2900 80027500 54400001 */  bnel      $v0, $zero, .L80027508
/* 2904 80027504 A3A5000A */   sb       $a1, 0xA($sp)
.L80027508:
/* 2908 80027508 93A20008 */  lbu       $v0, 0x8($sp)
/* 290C 8002750C 93A30000 */  lbu       $v1, 0x0($sp)
/* 2910 80027510 93A4007C */  lbu       $a0, 0x7C($sp)
/* 2914 80027514 00431021 */  addu      $v0, $v0, $v1
/* 2918 80027518 00441023 */  subu      $v0, $v0, $a0
/* 291C 8002751C A3A20010 */  sb        $v0, 0x10($sp)
/* 2920 80027520 93A20009 */  lbu       $v0, 0x9($sp)
/* 2924 80027524 93A30001 */  lbu       $v1, 0x1($sp)
/* 2928 80027528 93A4007D */  lbu       $a0, 0x7D($sp)
/* 292C 8002752C 00431021 */  addu      $v0, $v0, $v1
/* 2930 80027530 00441023 */  subu      $v0, $v0, $a0
/* 2934 80027534 A3A20011 */  sb        $v0, 0x11($sp)
/* 2938 80027538 93A2000A */  lbu       $v0, 0xA($sp)
/* 293C 8002753C 93A30002 */  lbu       $v1, 0x2($sp)
/* 2940 80027540 93A4007E */  lbu       $a0, 0x7E($sp)
/* 2944 80027544 00431021 */  addu      $v0, $v0, $v1
/* 2948 80027548 00441023 */  subu      $v0, $v0, $a0
/* 294C 8002754C A3A20012 */  sb        $v0, 0x12($sp)
/* 2950 80027550 93A2007C */  lbu       $v0, 0x7C($sp)
/* 2954 80027554 93A4007F */  lbu       $a0, 0x7F($sp)
/* 2958 80027558 00440018 */  mult      $v0, $a0
/* 295C 8002755C 24030008 */  addiu     $v1, $zero, 0x8
/* 2960 80027560 00002812 */  mflo      $a1
/* 2964 80027564 93A20010 */  lbu       $v0, 0x10($sp)
/* 2968 80027568 00641823 */  subu      $v1, $v1, $a0
/* 296C 8002756C 00430018 */  mult      $v0, $v1
/* 2970 80027570 00001012 */  mflo      $v0
/* 2974 80027574 00A21021 */  addu      $v0, $a1, $v0
/* 2978 80027578 000210C3 */  sra       $v0, $v0, 3
/* 297C 8002757C A3A20010 */  sb        $v0, 0x10($sp)
/* 2980 80027580 93A2007D */  lbu       $v0, 0x7D($sp)
/* 2984 80027584 00440018 */  mult      $v0, $a0
/* 2988 80027588 00002812 */  mflo      $a1
/* 298C 8002758C 93A20011 */  lbu       $v0, 0x11($sp)
/* 2990 80027590 00000000 */  nop
/* 2994 80027594 00430018 */  mult      $v0, $v1
/* 2998 80027598 00001012 */  mflo      $v0
/* 299C 8002759C 00A21021 */  addu      $v0, $a1, $v0
/* 29A0 800275A0 000210C3 */  sra       $v0, $v0, 3
/* 29A4 800275A4 A3A20011 */  sb        $v0, 0x11($sp)
/* 29A8 800275A8 93A2007E */  lbu       $v0, 0x7E($sp)
/* 29AC 800275AC 00440018 */  mult      $v0, $a0
/* 29B0 800275B0 00002012 */  mflo      $a0
/* 29B4 800275B4 93A20012 */  lbu       $v0, 0x12($sp)
/* 29B8 800275B8 00000000 */  nop
/* 29BC 800275BC 00430018 */  mult      $v0, $v1
/* 29C0 800275C0 00001012 */  mflo      $v0
/* 29C4 800275C4 00821021 */  addu      $v0, $a0, $v0
/* 29C8 800275C8 000210C3 */  sra       $v0, $v0, 3
/* 29CC 800275CC A3A20012 */  sb        $v0, 0x12($sp)
/* 29D0 800275D0 93A20010 */  lbu       $v0, 0x10($sp)
/* 29D4 800275D4 93A40011 */  lbu       $a0, 0x11($sp)
/* 29D8 800275D8 93A30012 */  lbu       $v1, 0x12($sp)
/* 29DC 800275DC 000212C0 */  sll       $v0, $v0, 11
/* 29E0 800275E0 00042180 */  sll       $a0, $a0, 6
/* 29E4 800275E4 00441021 */  addu      $v0, $v0, $a0
/* 29E8 800275E8 00031840 */  sll       $v1, $v1, 1
/* 29EC 800275EC 00431021 */  addu      $v0, $v0, $v1
/* 29F0 800275F0 24420001 */  addiu     $v0, $v0, 0x1
/* 29F4 800275F4 A4C20000 */  sh        $v0, 0x0($a2)
/* 29F8 800275F8 03E00008 */  jr        $ra
/* 29FC 800275FC 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

void gfx_frame_filter_pass_1(Color_RGBA8* filterBuf0, Color_RGBA8 filterBuf1, u16* out) {
    Color_RGBA8 sp0;
    Color_RGBA8 sp8;
    Color_RGBA8 final;
    u8 rs[0x20];
    u8 gs[0x20];
    u8 bs[0x20];
    s32 i;

    sp8 = filterBuf1;
    sp0 = filterBuf1;

    for (i = 0; i < ARRAY_COUNT(rs); i++) {
        rs[i] = 0;
        gs[i] = 0;
        bs[i] = 0;
    }

    for (i = 0; i < 6; i++) {
        if (filterBuf0[i].a == 8) {
            rs[filterBuf0[i].r]++;
            gs[filterBuf0[i].g]++;
            bs[filterBuf0[i].b]++;
        }
    }

    for (i = 0; i < ARRAY_COUNT(rs); i++) {
        if (rs[i] != 0) {
            rs[i]--;
            break;
        }
    }
    for (; i < ARRAY_COUNT(rs); i++) {
        if (rs[i] != 0) {
            break;
        }
    }
    if (sp0.r > i) {
        sp0.r = i;
    }

    for (i = 0; i < ARRAY_COUNT(gs); i++) {
        if (gs[i] != 0) {
            gs[i]--;
            break;
        }
    }
    for (; i < ARRAY_COUNT(gs); i++) {
        if (gs[i] != 0) {
            break;
        }
    }
    if (sp0.g > i) {
        sp0.g = i;
    }

    for (i = 0; i < ARRAY_COUNT(bs); i++) {
        if (bs[i] != 0) {
            bs[i]--;
            break;
        }
    }
    for (; i < ARRAY_COUNT(bs); i++) {
        if (bs[i] != 0) {
            break;
        }
    }
    if (sp0.b > i) {
        sp0.b = i;
    }

    for (i = ARRAY_COUNT(rs) - 1; i >= 0; i--) {
        if (rs[i] != 0) {
            break;
        }
    }
    if (sp8.r < i) {
        sp8.r = i;
    }

    for (i = ARRAY_COUNT(gs) - 1; i >= 0; i--) {
        if (gs[i] != 0) {
            break;
        }
    }
    if (sp8.g < i) {
        sp8.g = i;
    }

    for (i = ARRAY_COUNT(bs) - 1; i >= 0; i--) {
        if (bs[i] != 0) {
            break;
        }
    }
    if (sp8.b < i) {
        sp8.b = i;
    }

    final.r = (sp8.r + sp0.r) - filterBuf1.r;
    final.g = (sp8.g + sp0.g) - filterBuf1.g;
    final.b = (sp8.b + sp0.b) - filterBuf1.b;

    final.r = ((filterBuf1.r * filterBuf1.a) + (final.r * (8 - filterBuf1.a))) >> 3;
    final.g = ((filterBuf1.g * filterBuf1.a) + (final.g * (8 - filterBuf1.a))) >> 3;
    final.b = ((filterBuf1.b * filterBuf1.a) + (final.b * (8 - filterBuf1.a))) >> 3;

    *out = (final.r << 11) + (final.g << 6) + (final.b << 1) + 1;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel disable_x_update
/* 3857F8 E00821B8 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 3857FC E00821BC AFB40028 */  sw        $s4, 0x28($sp)
/* 385800 E00821C0 0080A02D */  daddu     $s4, $a0, $zero
/* 385804 E00821C4 AFBF0038 */  sw        $ra, 0x38($sp)
/* 385808 E00821C8 AFB70034 */  sw        $s7, 0x34($sp)
/* 38580C E00821CC AFB60030 */  sw        $s6, 0x30($sp)
/* 385810 E00821D0 AFB5002C */  sw        $s5, 0x2C($sp)
/* 385814 E00821D4 AFB30024 */  sw        $s3, 0x24($sp)
/* 385818 E00821D8 AFB20020 */  sw        $s2, 0x20($sp)
/* 38581C E00821DC AFB1001C */  sw        $s1, 0x1C($sp)
/* 385820 E00821E0 AFB00018 */  sw        $s0, 0x18($sp)
/* 385824 E00821E4 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 385828 E00821E8 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 38582C E00821EC 8E830000 */  lw        $v1, 0x0($s4)
/* 385830 E00821F0 8E90000C */  lw        $s0, 0xC($s4)
/* 385834 E00821F4 30620010 */  andi      $v0, $v1, 0x10
/* 385838 E00821F8 10400005 */  beqz      $v0, .LE0082210
/* 38583C E00821FC 2402FFEF */   addiu    $v0, $zero, -0x11
/* 385840 E0082200 00621024 */  and       $v0, $v1, $v0
/* 385844 E0082204 AE820000 */  sw        $v0, 0x0($s4)
/* 385848 E0082208 24020015 */  addiu     $v0, $zero, 0x15
/* 38584C E008220C AE020028 */  sw        $v0, 0x28($s0)
.LE0082210:
/* 385850 E0082210 8E030028 */  lw        $v1, 0x28($s0)
/* 385854 E0082214 28620064 */  slti      $v0, $v1, 0x64
/* 385858 E0082218 10400002 */  beqz      $v0, .LE0082224
/* 38585C E008221C 2462FFFF */   addiu    $v0, $v1, -0x1
/* 385860 E0082220 AE020028 */  sw        $v0, 0x28($s0)
.LE0082224:
/* 385864 E0082224 8E020028 */  lw        $v0, 0x28($s0)
/* 385868 E0082228 04410005 */  bgez      $v0, .LE0082240
/* 38586C E008222C 3C030004 */   lui      $v1, (0x4F1A0 >> 16)
/* 385870 E0082230 0C080128 */  jal       shim_remove_effect
/* 385874 E0082234 0280202D */   daddu    $a0, $s4, $zero
/* 385878 E0082238 0802093B */  j         .LE00824EC
/* 38587C E008223C 00000000 */   nop
.LE0082240:
/* 385880 E0082240 8E02002C */  lw        $v0, 0x2C($s0)
/* 385884 E0082244 3463F1A0 */  ori       $v1, $v1, (0x4F1A0 & 0xFFFF)
/* 385888 E0082248 24420001 */  addiu     $v0, $v0, 0x1
/* 38588C E008224C 0062182A */  slt       $v1, $v1, $v0
/* 385890 E0082250 10600003 */  beqz      $v1, .LE0082260
/* 385894 E0082254 AE02002C */   sw       $v0, 0x2C($s0)
/* 385898 E0082258 24020100 */  addiu     $v0, $zero, 0x100
/* 38589C E008225C AE02002C */  sw        $v0, 0x2C($s0)
.LE0082260:
/* 3858A0 E0082260 8E03003C */  lw        $v1, 0x3C($s0)
/* 3858A4 E0082264 8E130000 */  lw        $s3, 0x0($s0)
/* 3858A8 E0082268 8E120028 */  lw        $s2, 0x28($s0)
/* 3858AC E008226C 8E15002C */  lw        $s5, 0x2C($s0)
/* 3858B0 E0082270 8E040038 */  lw        $a0, 0x38($s0)
/* 3858B4 E0082274 16600034 */  bnez      $s3, .LE0082348
/* 3858B8 E0082278 C6160034 */   lwc1     $f22, 0x34($s0)
/* 3858BC E008227C 8E020044 */  lw        $v0, 0x44($s0)
/* 3858C0 E0082280 1C400030 */  bgtz      $v0, .LE0082344
/* 3858C4 E0082284 2442FFFF */   addiu    $v0, $v0, -0x1
/* 3858C8 E0082288 1064002F */  beq       $v1, $a0, .LE0082348
/* 3858CC E008228C 00000000 */   nop
/* 3858D0 E0082290 04620001 */  bltzl     $v1, .LE0082298
/* 3858D4 E0082294 0000182D */   daddu    $v1, $zero, $zero
.LE0082298:
/* 3858D8 E0082298 0083102A */  slt       $v0, $a0, $v1
/* 3858DC E008229C 10400017 */  beqz      $v0, .LE00822FC
/* 3858E0 E00822A0 24020064 */   addiu    $v0, $zero, 0x64
/* 3858E4 E00822A4 AE020028 */  sw        $v0, 0x28($s0)
/* 3858E8 E00822A8 24020001 */  addiu     $v0, $zero, 0x1
/* 3858EC E00822AC AE02002C */  sw        $v0, 0x2C($s0)
/* 3858F0 E00822B0 8E020038 */  lw        $v0, 0x38($s0)
/* 3858F4 E00822B4 C602000C */  lwc1      $f2, 0xC($s0)
/* 3858F8 E00822B8 3C01C3FA */  lui       $at, (0xC3FA0000 >> 16)
/* 3858FC E00822BC 44810000 */  mtc1      $at, $f0
/* 385900 E00822C0 AE000070 */  sw        $zero, 0x70($s0)
/* 385904 E00822C4 24420001 */  addiu     $v0, $v0, 0x1
/* 385908 E00822C8 4602003C */  c.lt.s    $f0, $f2
/* 38590C E00822CC 00000000 */  nop
/* 385910 E00822D0 4500001B */  bc1f      .LE0082340
/* 385914 E00822D4 AE020038 */   sw       $v0, 0x38($s0)
/* 385918 E00822D8 C6000010 */  lwc1      $f0, 0x10($s0)
/* 38591C E00822DC 24042107 */  addiu     $a0, $zero, 0x2107
/* 385920 E00822E0 E7A00010 */  swc1      $f0, 0x10($sp)
/* 385924 E00822E4 8E060008 */  lw        $a2, 0x8($s0)
/* 385928 E00822E8 8E07000C */  lw        $a3, 0xC($s0)
/* 38592C E00822EC 0C0801A0 */  jal       shim_sfx_play_sound_at_position
/* 385930 E00822F0 0000282D */   daddu    $a1, $zero, $zero
/* 385934 E00822F4 080208D1 */  j         .LE0082344
/* 385938 E00822F8 24020008 */   addiu    $v0, $zero, 0x8
.LE00822FC:
/* 38593C E00822FC 0064102A */  slt       $v0, $v1, $a0
/* 385940 E0082300 10400010 */  beqz      $v0, .LE0082344
/* 385944 E0082304 24020008 */   addiu    $v0, $zero, 0x8
/* 385948 E0082308 0C080150 */  jal       shim_load_effect
/* 38594C E008230C 24040041 */   addiu    $a0, $zero, 0x41
/* 385950 E0082310 C602000C */  lwc1      $f2, 0xC($s0)
/* 385954 E0082314 C6000068 */  lwc1      $f0, 0x68($s0)
/* 385958 E0082318 AFA00010 */  sw        $zero, 0x10($sp)
/* 38595C E008231C 46001080 */  add.s     $f2, $f2, $f0
/* 385960 E0082320 8E050008 */  lw        $a1, 0x8($s0)
/* 385964 E0082324 8E070010 */  lw        $a3, 0x10($s0)
/* 385968 E0082328 44061000 */  mfc1      $a2, $f2
/* 38596C E008232C 0C020800 */  jal       disable_x_main
/* 385970 E0082330 2404000A */   addiu    $a0, $zero, 0xA
/* 385974 E0082334 8E020038 */  lw        $v0, 0x38($s0)
/* 385978 E0082338 2442FFFF */  addiu     $v0, $v0, -0x1
/* 38597C E008233C AE020038 */  sw        $v0, 0x38($s0)
.LE0082340:
/* 385980 E0082340 24020008 */  addiu     $v0, $zero, 0x8
.LE0082344:
/* 385984 E0082344 AE020044 */  sw        $v0, 0x44($s0)
.LE0082348:
/* 385988 E0082348 8E820008 */  lw        $v0, 0x8($s4)
/* 38598C E008234C 24110001 */  addiu     $s1, $zero, 0x1
/* 385990 E0082350 0222102A */  slt       $v0, $s1, $v0
/* 385994 E0082354 10400065 */  beqz      $v0, .LE00824EC
/* 385998 E0082358 26100048 */   addiu    $s0, $s0, 0x48
/* 38599C E008235C 3C17E008 */  lui       $s7, %hi(D_E0082D30)
/* 3859A0 E0082360 26F72D30 */  addiu     $s7, $s7, %lo(D_E0082D30)
/* 3859A4 E0082364 02351004 */  sllv      $v0, $s5, $s1
/* 3859A8 E0082368 00551021 */  addu      $v0, $v0, $s5
/* 3859AC E008236C 0002B080 */  sll       $s6, $v0, 2
/* 3859B0 E0082370 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 3859B4 E0082374 4481A000 */  mtc1      $at, $f20
/* 3859B8 E0082378 02321004 */  sllv      $v0, $s2, $s1
/* 3859BC E008237C 00521021 */  addu      $v0, $v0, $s2
/* 3859C0 E0082380 000210C0 */  sll       $v0, $v0, 3
/* 3859C4 E0082384 0052A821 */  addu      $s5, $v0, $s2
/* 3859C8 E0082388 26100028 */  addiu     $s0, $s0, 0x28
.LE008238C:
/* 3859CC E008238C 8E030000 */  lw        $v1, 0x0($s0)
/* 3859D0 E0082390 28620009 */  slti      $v0, $v1, 0x9
/* 3859D4 E0082394 10400007 */  beqz      $v0, .LE00823B4
/* 3859D8 E0082398 2402000A */   addiu    $v0, $zero, 0xA
/* 3859DC E008239C 12620005 */  beq       $s3, $v0, .LE00823B4
/* 3859E0 E00823A0 00031080 */   sll      $v0, $v1, 2
/* 3859E4 E00823A4 00571021 */  addu      $v0, $v0, $s7
/* 3859E8 E00823A8 C4400000 */  lwc1      $f0, 0x0($v0)
/* 3859EC E00823AC 080208F1 */  j         .LE00823C4
/* 3859F0 E00823B0 E6000008 */   swc1     $f0, 0x8($s0)
.LE00823B4:
/* 3859F4 E00823B4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3859F8 E00823B8 44810000 */  mtc1      $at, $f0
/* 3859FC E00823BC 00000000 */  nop
/* 385A00 E00823C0 E6000008 */  swc1      $f0, 0x8($s0)
.LE00823C4:
/* 385A04 E00823C4 C6000008 */  lwc1      $f0, 0x8($s0)
/* 385A08 E00823C8 46160002 */  mul.s     $f0, $f0, $f22
/* 385A0C E00823CC 00000000 */  nop
/* 385A10 E00823D0 2E620002 */  sltiu     $v0, $s3, 0x2
/* 385A14 E00823D4 10400009 */  beqz      $v0, .LE00823FC
/* 385A18 E00823D8 E6000008 */   swc1     $f0, 0x8($s0)
/* 385A1C E00823DC 44966000 */  mtc1      $s6, $f12
/* 385A20 E00823E0 00000000 */  nop
/* 385A24 E00823E4 0C080144 */  jal       shim_cos_deg
/* 385A28 E00823E8 46806320 */   cvt.s.w  $f12, $f12
/* 385A2C E00823EC 46140002 */  mul.s     $f0, $f0, $f20
/* 385A30 E00823F0 00000000 */  nop
/* 385A34 E00823F4 08020900 */  j         .LE0082400
/* 385A38 E00823F8 E600FFF8 */   swc1     $f0, -0x8($s0)
.LE00823FC:
/* 385A3C E00823FC AE00FFF8 */  sw        $zero, -0x8($s0)
.LE0082400:
/* 385A40 E0082400 C606FFE0 */  lwc1      $f6, -0x20($s0)
/* 385A44 E0082404 C600FFEC */  lwc1      $f0, -0x14($s0)
/* 385A48 E0082408 C604FFE4 */  lwc1      $f4, -0x1C($s0)
/* 385A4C E008240C 46003180 */  add.s     $f6, $f6, $f0
/* 385A50 E0082410 C600FFF0 */  lwc1      $f0, -0x10($s0)
/* 385A54 E0082414 C602FFE8 */  lwc1      $f2, -0x18($s0)
/* 385A58 E0082418 46002100 */  add.s     $f4, $f4, $f0
/* 385A5C E008241C C600FFF4 */  lwc1      $f0, -0xC($s0)
/* 385A60 E0082420 24020014 */  addiu     $v0, $zero, 0x14
/* 385A64 E0082424 46001080 */  add.s     $f2, $f2, $f0
/* 385A68 E0082428 E606FFE0 */  swc1      $f6, -0x20($s0)
/* 385A6C E008242C E604FFE4 */  swc1      $f4, -0x1C($s0)
/* 385A70 E0082430 16420005 */  bne       $s2, $v0, .LE0082448
/* 385A74 E0082434 E602FFE8 */   swc1     $f2, -0x18($s0)
/* 385A78 E0082438 3C01C000 */  lui       $at, (0xC0000000 >> 16)
/* 385A7C E008243C 44810000 */  mtc1      $at, $f0
/* 385A80 E0082440 E614FFF0 */  swc1      $f20, -0x10($s0)
/* 385A84 E0082444 E600FFEC */  swc1      $f0, -0x14($s0)
.LE0082448:
/* 385A88 E0082448 2A420014 */  slti      $v0, $s2, 0x14
/* 385A8C E008244C 1040001D */  beqz      $v0, .LE00824C4
/* 385A90 E0082450 2A42000A */   slti     $v0, $s2, 0xA
/* 385A94 E0082454 44920000 */  mtc1      $s2, $f0
/* 385A98 E0082458 00000000 */  nop
/* 385A9C E008245C 46800020 */  cvt.s.w   $f0, $f0
/* 385AA0 E0082460 3C01E008 */  lui       $at, (0xE0082D60 >> 16)
/* 385AA4 E0082464 D4222D60 */  ldc1      $f2, (0xE0082D60 & 0xFFFF)($at)
/* 385AA8 E0082468 46000021 */  cvt.d.s   $f0, $f0
/* 385AAC E008246C 46220002 */  mul.d     $f0, $f0, $f2
/* 385AB0 E0082470 00000000 */  nop
/* 385AB4 E0082474 C602FFF8 */  lwc1      $f2, -0x8($s0)
/* 385AB8 E0082478 460010A1 */  cvt.d.s   $f2, $f2
/* 385ABC E008247C 46201082 */  mul.d     $f2, $f2, $f0
/* 385AC0 E0082480 00000000 */  nop
/* 385AC4 E0082484 3C01BFE0 */  lui       $at, (0xBFE00000 >> 16)
/* 385AC8 E0082488 44812800 */  mtc1      $at, $f5
/* 385ACC E008248C 44802000 */  mtc1      $zero, $f4
/* 385AD0 E0082490 C600FFF0 */  lwc1      $f0, -0x10($s0)
/* 385AD4 E0082494 C6060018 */  lwc1      $f6, 0x18($s0)
/* 385AD8 E0082498 46000021 */  cvt.d.s   $f0, $f0
/* 385ADC E008249C 46240000 */  add.d     $f0, $f0, $f4
/* 385AE0 E00824A0 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 385AE4 E00824A4 44812000 */  mtc1      $at, $f4
/* 385AE8 E00824A8 00000000 */  nop
/* 385AEC E00824AC 46043180 */  add.s     $f6, $f6, $f4
/* 385AF0 E00824B0 46200020 */  cvt.s.d   $f0, $f0
/* 385AF4 E00824B4 E600FFF0 */  swc1      $f0, -0x10($s0)
/* 385AF8 E00824B8 E6060018 */  swc1      $f6, 0x18($s0)
/* 385AFC E00824BC 462010A0 */  cvt.s.d   $f2, $f2
/* 385B00 E00824C0 E602FFF8 */  swc1      $f2, -0x8($s0)
.LE00824C4:
/* 385B04 E00824C4 54400001 */  bnel      $v0, $zero, .LE00824CC
/* 385B08 E00824C8 AE15FFFC */   sw       $s5, -0x4($s0)
.LE00824CC:
/* 385B0C E00824CC 8E020000 */  lw        $v0, 0x0($s0)
/* 385B10 E00824D0 26310001 */  addiu     $s1, $s1, 0x1
/* 385B14 E00824D4 24420001 */  addiu     $v0, $v0, 0x1
/* 385B18 E00824D8 AE020000 */  sw        $v0, 0x0($s0)
/* 385B1C E00824DC 8E820008 */  lw        $v0, 0x8($s4)
/* 385B20 E00824E0 0222102A */  slt       $v0, $s1, $v0
/* 385B24 E00824E4 1440FFA9 */  bnez      $v0, .LE008238C
/* 385B28 E00824E8 26100048 */   addiu    $s0, $s0, 0x48
.LE00824EC:
/* 385B2C E00824EC 8FBF0038 */  lw        $ra, 0x38($sp)
/* 385B30 E00824F0 8FB70034 */  lw        $s7, 0x34($sp)
/* 385B34 E00824F4 8FB60030 */  lw        $s6, 0x30($sp)
/* 385B38 E00824F8 8FB5002C */  lw        $s5, 0x2C($sp)
/* 385B3C E00824FC 8FB40028 */  lw        $s4, 0x28($sp)
/* 385B40 E0082500 8FB30024 */  lw        $s3, 0x24($sp)
/* 385B44 E0082504 8FB20020 */  lw        $s2, 0x20($sp)
/* 385B48 E0082508 8FB1001C */  lw        $s1, 0x1C($sp)
/* 385B4C E008250C 8FB00018 */  lw        $s0, 0x18($sp)
/* 385B50 E0082510 D7B60048 */  ldc1      $f22, 0x48($sp)
/* 385B54 E0082514 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 385B58 E0082518 03E00008 */  jr        $ra
/* 385B5C E008251C 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void disable_x_update(EffectInstance* effect) {
    static const f32 D_E0082D30[12] = { 5.0f, 4.0f, 4.0f, 3.0f, 2.0f, 1.0f, 0.7f, 1.2f, 1.0f, 0.0f, 0.0f, 0.0f };

    DisableXFXData* data = effect->data.disableX;
    s32 unk_28;
    s32 unk_2C;
    f32 unk_34;
    s32 unk_3C;
    s32 unk_38;
    u32 type;
    s32 i;

    if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
        effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
        data->unk_28 = 21;
    }

    if (data->unk_28 < 100) {
        data->unk_28--;
    }

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

    data->unk_2C++;
    if (data->unk_2C > 324000) {
        data->unk_2C = 256;
    }

    type = data->type;
    unk_28 = data->unk_28;
    unk_2C = data->unk_2C;
    unk_38 = data->unk_38;
    unk_34 = data->scale;
    unk_3C = data->koDuration;

    if (type == 0) {
        if (data->unk_44 > 0) {
            data->unk_44--;
        } else {
            if (data->koDuration != unk_38) {
                if (data->koDuration < 0) {
                    unk_3C = 0;
                }
                if (unk_38 < unk_3C) {
                    data->unk_28 = 100;
                    data->unk_2C = 1;
                    data[1].unk_28 = 0;
                    data->unk_38++;
                    if (data->pos.y > -500.0f) {
                        shim_sfx_play_sound_at_position(SOUND_2107, SOUND_SPACE_MODE_0, data->pos.x, data->pos.y, data->pos.z);
                    }
                } else if (unk_3C < unk_38) {
                    shim_load_effect(EFFECT_DISABLE_X);
                    disable_x_main(10, data->pos.x, data->pos.y + data[1].unk_20, data->pos.z, 0);
                    data->unk_38--;
                }
                data->unk_44 = 8;
            }
        }
    }

    data++;
    for (i = 1; i < effect->numParts; i++, data++) {
        if (data->unk_28 < 9 && type != 10) {
            data->unk_30 = D_E0082D30[data->unk_28];
        } else {
            data->unk_30 = 1.0f;
        }

        data->unk_30 *= unk_34;
        if (type < 2) {
            data->unk_20 = shim_cos_deg(unk_2C * 12) * 4.0f;
        } else {
            data->unk_20 = 0.0f;
        }

        data->pos.x += data->unk_14;
        data->pos.y += data->unk_18;
        data->pos.z += data->unk_1C;

        if (unk_28 == 20) {
            data->unk_18 = 4.0f;
            data->unk_14 = -2.0f;
        }
        if (unk_28 < 20) {
            data->unk_18 += -0.5;
            data->unk_40 += 10.0f;
            data->unk_20 *= (f32) unk_28 * 0.05;
        }
        if (unk_28 < 10) {
            data->alpha = unk_28 * 25;
        }
        data->unk_28 += 1;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel update_collider_transform
/* 36E24 8005BA24 27BDFF58 */  addiu     $sp, $sp, -0xA8
/* 36E28 8005BA28 00042400 */  sll       $a0, $a0, 16
/* 36E2C 8005BA2C 00042403 */  sra       $a0, $a0, 16
/* 36E30 8005BA30 000410C0 */  sll       $v0, $a0, 3
/* 36E34 8005BA34 00441023 */  subu      $v0, $v0, $a0
/* 36E38 8005BA38 3C03800B */  lui       $v1, %hi(D_800B42E4)
/* 36E3C 8005BA3C 8C6342E4 */  lw        $v1, %lo(D_800B42E4)($v1)
/* 36E40 8005BA40 00021080 */  sll       $v0, $v0, 2
/* 36E44 8005BA44 AFBF0074 */  sw        $ra, 0x74($sp)
/* 36E48 8005BA48 AFB40070 */  sw        $s4, 0x70($sp)
/* 36E4C 8005BA4C AFB3006C */  sw        $s3, 0x6C($sp)
/* 36E50 8005BA50 AFB20068 */  sw        $s2, 0x68($sp)
/* 36E54 8005BA54 AFB10064 */  sw        $s1, 0x64($sp)
/* 36E58 8005BA58 AFB00060 */  sw        $s0, 0x60($sp)
/* 36E5C 8005BA5C F7BE00A0 */  sdc1      $f30, 0xA0($sp)
/* 36E60 8005BA60 F7BC0098 */  sdc1      $f28, 0x98($sp)
/* 36E64 8005BA64 F7BA0090 */  sdc1      $f26, 0x90($sp)
/* 36E68 8005BA68 F7B80088 */  sdc1      $f24, 0x88($sp)
/* 36E6C 8005BA6C F7B60080 */  sdc1      $f22, 0x80($sp)
/* 36E70 8005BA70 F7B40078 */  sdc1      $f20, 0x78($sp)
/* 36E74 8005BA74 00629821 */  addu      $s3, $v1, $v0
/* 36E78 8005BA78 0C046B4C */  jal       get_model_from_list_index
/* 36E7C 8005BA7C 86640008 */   lh       $a0, 0x8($s3)
/* 36E80 8005BA80 0040802D */  daddu     $s0, $v0, $zero
/* 36E84 8005BA84 8E050004 */  lw        $a1, 0x4($s0)
/* 36E88 8005BA88 14A00005 */  bnez      $a1, .L8005BAA0
/* 36E8C 8005BA8C 26040058 */   addiu    $a0, $s0, 0x58
/* 36E90 8005BA90 0C00A5C8 */  jal       copy_matrix
/* 36E94 8005BA94 27A50020 */   addiu    $a1, $sp, 0x20
/* 36E98 8005BA98 08016EAF */  j         .L8005BABC
/* 36E9C 8005BA9C 0000902D */   daddu    $s2, $zero, $zero
.L8005BAA0:
/* 36EA0 8005BAA0 0C019D60 */  jal       guMtxL2F
/* 36EA4 8005BAA4 27A40020 */   addiu    $a0, $sp, 0x20
/* 36EA8 8005BAA8 26040058 */  addiu     $a0, $s0, 0x58
/* 36EAC 8005BAAC 27A50020 */  addiu     $a1, $sp, 0x20
/* 36EB0 8005BAB0 0C019D80 */  jal       guMtxCatF
/* 36EB4 8005BAB4 00A0302D */   daddu    $a2, $a1, $zero
/* 36EB8 8005BAB8 0000902D */  daddu     $s2, $zero, $zero
.L8005BABC:
/* 36EBC 8005BABC 8E74000C */  lw        $s4, 0xC($s3)
/* 36EC0 8005BAC0 8E710018 */  lw        $s1, 0x18($s3)
/* 36EC4 8005BAC4 3C014974 */  lui       $at, (0x497423FE >> 16)
/* 36EC8 8005BAC8 342123FE */  ori       $at, $at, (0x497423FE & 0xFFFF)
/* 36ECC 8005BACC 4481A000 */  mtc1      $at, $f20
/* 36ED0 8005BAD0 3C01C974 */  lui       $at, (0xC97423FE >> 16)
/* 36ED4 8005BAD4 342123FE */  ori       $at, $at, (0xC97423FE & 0xFFFF)
/* 36ED8 8005BAD8 4481B000 */  mtc1      $at, $f22
/* 36EDC 8005BADC 86620014 */  lh        $v0, 0x14($s3)
/* 36EE0 8005BAE0 4600A686 */  mov.s     $f26, $f20
/* 36EE4 8005BAE4 4600A606 */  mov.s     $f24, $f20
/* 36EE8 8005BAE8 4600B786 */  mov.s     $f30, $f22
/* 36EEC 8005BAEC 1840002C */  blez      $v0, .L8005BBA0
/* 36EF0 8005BAF0 4600B706 */   mov.s    $f28, $f22
/* 36EF4 8005BAF4 26300008 */  addiu     $s0, $s1, 0x8
.L8005BAF8:
/* 36EF8 8005BAF8 26220004 */  addiu     $v0, $s1, 0x4
/* 36EFC 8005BAFC AFB10010 */  sw        $s1, 0x10($sp)
/* 36F00 8005BB00 AFA20014 */  sw        $v0, 0x14($sp)
/* 36F04 8005BB04 AFB00018 */  sw        $s0, 0x18($sp)
/* 36F08 8005BB08 8E050004 */  lw        $a1, 0x4($s0)
/* 36F0C 8005BB0C 8E060008 */  lw        $a2, 0x8($s0)
/* 36F10 8005BB10 8E07000C */  lw        $a3, 0xC($s0)
/* 36F14 8005BB14 0C019E9C */  jal       guMtxXFMF
/* 36F18 8005BB18 27A40020 */   addiu    $a0, $sp, 0x20
/* 36F1C 8005BB1C C6200000 */  lwc1      $f0, 0x0($s1)
/* 36F20 8005BB20 4618003C */  c.lt.s    $f0, $f24
/* 36F24 8005BB24 00000000 */  nop
/* 36F28 8005BB28 45030001 */  bc1tl     .L8005BB30
/* 36F2C 8005BB2C 46000606 */   mov.s    $f24, $f0
.L8005BB30:
/* 36F30 8005BB30 4600E03C */  c.lt.s    $f28, $f0
/* 36F34 8005BB34 00000000 */  nop
/* 36F38 8005BB38 45030001 */  bc1tl     .L8005BB40
/* 36F3C 8005BB3C 46000706 */   mov.s    $f28, $f0
.L8005BB40:
/* 36F40 8005BB40 C600FFFC */  lwc1      $f0, -0x4($s0)
/* 36F44 8005BB44 461A003C */  c.lt.s    $f0, $f26
/* 36F48 8005BB48 00000000 */  nop
/* 36F4C 8005BB4C 45030001 */  bc1tl     .L8005BB54
/* 36F50 8005BB50 46000686 */   mov.s    $f26, $f0
.L8005BB54:
/* 36F54 8005BB54 4600F03C */  c.lt.s    $f30, $f0
/* 36F58 8005BB58 00000000 */  nop
/* 36F5C 8005BB5C 45030001 */  bc1tl     .L8005BB64
/* 36F60 8005BB60 46000786 */   mov.s    $f30, $f0
.L8005BB64:
/* 36F64 8005BB64 C6000000 */  lwc1      $f0, 0x0($s0)
/* 36F68 8005BB68 4614003C */  c.lt.s    $f0, $f20
/* 36F6C 8005BB6C 00000000 */  nop
/* 36F70 8005BB70 45030001 */  bc1tl     .L8005BB78
/* 36F74 8005BB74 46000506 */   mov.s    $f20, $f0
.L8005BB78:
/* 36F78 8005BB78 4600B03C */  c.lt.s    $f22, $f0
/* 36F7C 8005BB7C 00000000 */  nop
/* 36F80 8005BB80 45030001 */  bc1tl     .L8005BB88
/* 36F84 8005BB84 46000586 */   mov.s    $f22, $f0
.L8005BB88:
/* 36F88 8005BB88 26100018 */  addiu     $s0, $s0, 0x18
/* 36F8C 8005BB8C 86620014 */  lh        $v0, 0x14($s3)
/* 36F90 8005BB90 26520001 */  addiu     $s2, $s2, 0x1
/* 36F94 8005BB94 0242102A */  slt       $v0, $s2, $v0
/* 36F98 8005BB98 1440FFD7 */  bnez      $v0, .L8005BAF8
/* 36F9C 8005BB9C 26310018 */   addiu    $s1, $s1, 0x18
.L8005BBA0:
/* 36FA0 8005BBA0 8E620010 */  lw        $v0, 0x10($s3)
/* 36FA4 8005BBA4 E4580000 */  swc1      $f24, 0x0($v0)
/* 36FA8 8005BBA8 8E620010 */  lw        $v0, 0x10($s3)
/* 36FAC 8005BBAC E45A0004 */  swc1      $f26, 0x4($v0)
/* 36FB0 8005BBB0 8E620010 */  lw        $v0, 0x10($s3)
/* 36FB4 8005BBB4 E4540008 */  swc1      $f20, 0x8($v0)
/* 36FB8 8005BBB8 8E620010 */  lw        $v0, 0x10($s3)
/* 36FBC 8005BBBC E45C000C */  swc1      $f28, 0xC($v0)
/* 36FC0 8005BBC0 8E620010 */  lw        $v0, 0x10($s3)
/* 36FC4 8005BBC4 E45E0010 */  swc1      $f30, 0x10($v0)
/* 36FC8 8005BBC8 8E620010 */  lw        $v0, 0x10($s3)
/* 36FCC 8005BBCC E4560014 */  swc1      $f22, 0x14($v0)
/* 36FD0 8005BBD0 8662000A */  lh        $v0, 0xA($s3)
/* 36FD4 8005BBD4 18400066 */  blez      $v0, .L8005BD70
/* 36FD8 8005BBD8 0000902D */   daddu    $s2, $zero, $zero
/* 36FDC 8005BBDC 4480D000 */  mtc1      $zero, $f26
/* 36FE0 8005BBE0 26900038 */  addiu     $s0, $s4, 0x38
.L8005BBE4:
/* 36FE4 8005BBE4 8E04FFD0 */  lw        $a0, -0x30($s0)
/* 36FE8 8005BBE8 8E820000 */  lw        $v0, 0x0($s4)
/* 36FEC 8005BBEC C4800000 */  lwc1      $f0, 0x0($a0)
/* 36FF0 8005BBF0 C4420000 */  lwc1      $f2, 0x0($v0)
/* 36FF4 8005BBF4 46020001 */  sub.s     $f0, $f0, $f2
/* 36FF8 8005BBF8 E600FFD4 */  swc1      $f0, -0x2C($s0)
/* 36FFC 8005BBFC C4800004 */  lwc1      $f0, 0x4($a0)
/* 37000 8005BC00 C4420004 */  lwc1      $f2, 0x4($v0)
/* 37004 8005BC04 46020001 */  sub.s     $f0, $f0, $f2
/* 37008 8005BC08 E600FFD8 */  swc1      $f0, -0x28($s0)
/* 3700C 8005BC0C C4800008 */  lwc1      $f0, 0x8($a0)
/* 37010 8005BC10 C4420008 */  lwc1      $f2, 0x8($v0)
/* 37014 8005BC14 46020001 */  sub.s     $f0, $f0, $f2
/* 37018 8005BC18 8E03FFCC */  lw        $v1, -0x34($s0)
/* 3701C 8005BC1C E600FFDC */  swc1      $f0, -0x24($s0)
/* 37020 8005BC20 C4400000 */  lwc1      $f0, 0x0($v0)
/* 37024 8005BC24 C4620000 */  lwc1      $f2, 0x0($v1)
/* 37028 8005BC28 46020001 */  sub.s     $f0, $f0, $f2
/* 3702C 8005BC2C E600FFE0 */  swc1      $f0, -0x20($s0)
/* 37030 8005BC30 C4400004 */  lwc1      $f0, 0x4($v0)
/* 37034 8005BC34 C4620004 */  lwc1      $f2, 0x4($v1)
/* 37038 8005BC38 46020001 */  sub.s     $f0, $f0, $f2
/* 3703C 8005BC3C E600FFE4 */  swc1      $f0, -0x1C($s0)
/* 37040 8005BC40 C4400008 */  lwc1      $f0, 0x8($v0)
/* 37044 8005BC44 C4620008 */  lwc1      $f2, 0x8($v1)
/* 37048 8005BC48 46020001 */  sub.s     $f0, $f0, $f2
/* 3704C 8005BC4C C60AFFD8 */  lwc1      $f10, -0x28($s0)
/* 37050 8005BC50 E600FFE8 */  swc1      $f0, -0x18($s0)
/* 37054 8005BC54 46000186 */  mov.s     $f6, $f0
/* 37058 8005BC58 46065382 */  mul.s     $f14, $f10, $f6
/* 3705C 8005BC5C 00000000 */  nop
/* 37060 8005BC60 C604FFD4 */  lwc1      $f4, -0x2C($s0)
/* 37064 8005BC64 46062182 */  mul.s     $f6, $f4, $f6
/* 37068 8005BC68 00000000 */  nop
/* 3706C 8005BC6C C608FFE4 */  lwc1      $f8, -0x1C($s0)
/* 37070 8005BC70 46082102 */  mul.s     $f4, $f4, $f8
/* 37074 8005BC74 00000000 */  nop
/* 37078 8005BC78 C602FFE0 */  lwc1      $f2, -0x20($s0)
/* 3707C 8005BC7C 46025282 */  mul.s     $f10, $f10, $f2
/* 37080 8005BC80 00000000 */  nop
/* 37084 8005BC84 C600FFDC */  lwc1      $f0, -0x24($s0)
/* 37088 8005BC88 46080302 */  mul.s     $f12, $f0, $f8
/* 3708C 8005BC8C 00000000 */  nop
/* 37090 8005BC90 46020002 */  mul.s     $f0, $f0, $f2
/* 37094 8005BC94 00000000 */  nop
/* 37098 8005BC98 460A2501 */  sub.s     $f20, $f4, $f10
/* 3709C 8005BC9C 4614A102 */  mul.s     $f4, $f20, $f20
/* 370A0 8005BCA0 00000000 */  nop
/* 370A4 8005BCA4 460C7601 */  sub.s     $f24, $f14, $f12
/* 370A8 8005BCA8 4618C202 */  mul.s     $f8, $f24, $f24
/* 370AC 8005BCAC 00000000 */  nop
/* 370B0 8005BCB0 C4620000 */  lwc1      $f2, 0x0($v1)
/* 370B4 8005BCB4 46060581 */  sub.s     $f22, $f0, $f6
/* 370B8 8005BCB8 C4800000 */  lwc1      $f0, 0x0($a0)
/* 370BC 8005BCBC 46001081 */  sub.s     $f2, $f2, $f0
/* 370C0 8005BCC0 4616B182 */  mul.s     $f6, $f22, $f22
/* 370C4 8005BCC4 00000000 */  nop
/* 370C8 8005BCC8 E602FFEC */  swc1      $f2, -0x14($s0)
/* 370CC 8005BCCC C4620004 */  lwc1      $f2, 0x4($v1)
/* 370D0 8005BCD0 C4800004 */  lwc1      $f0, 0x4($a0)
/* 370D4 8005BCD4 46001081 */  sub.s     $f2, $f2, $f0
/* 370D8 8005BCD8 E602FFF0 */  swc1      $f2, -0x10($s0)
/* 370DC 8005BCDC C4620008 */  lwc1      $f2, 0x8($v1)
/* 370E0 8005BCE0 46064200 */  add.s     $f8, $f8, $f6
/* 370E4 8005BCE4 C4800008 */  lwc1      $f0, 0x8($a0)
/* 370E8 8005BCE8 46001081 */  sub.s     $f2, $f2, $f0
/* 370EC 8005BCEC 46044300 */  add.s     $f12, $f8, $f4
/* 370F0 8005BCF0 461A6032 */  c.eq.s    $f12, $f26
/* 370F4 8005BCF4 00000000 */  nop
/* 370F8 8005BCF8 4501000D */  bc1t      .L8005BD30
/* 370FC 8005BCFC E602FFF4 */   swc1     $f2, -0xC($s0)
/* 37100 8005BD00 46006084 */  sqrt.s    $f2, $f12
/* 37104 8005BD04 46021032 */  c.eq.s    $f2, $f2
/* 37108 8005BD08 00000000 */  nop
/* 3710C 8005BD0C 45010004 */  bc1t      .L8005BD20
/* 37110 8005BD10 00000000 */   nop
/* 37114 8005BD14 0C0187BC */  jal       sqrtf
/* 37118 8005BD18 00000000 */   nop
/* 3711C 8005BD1C 46000086 */  mov.s     $f2, $f0
.L8005BD20:
/* 37120 8005BD20 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 37124 8005BD24 44810000 */  mtc1      $at, $f0
/* 37128 8005BD28 08016F4D */  j         .L8005BD34
/* 3712C 8005BD2C 46020303 */   div.s    $f12, $f0, $f2
.L8005BD30:
/* 37130 8005BD30 4600D306 */  mov.s     $f12, $f26
.L8005BD34:
/* 37134 8005BD34 460CC002 */  mul.s     $f0, $f24, $f12
/* 37138 8005BD38 00000000 */  nop
/* 3713C 8005BD3C 460CB082 */  mul.s     $f2, $f22, $f12
/* 37140 8005BD40 00000000 */  nop
/* 37144 8005BD44 460CA102 */  mul.s     $f4, $f20, $f12
/* 37148 8005BD48 00000000 */  nop
/* 3714C 8005BD4C 26940040 */  addiu     $s4, $s4, 0x40
/* 37150 8005BD50 26520001 */  addiu     $s2, $s2, 0x1
/* 37154 8005BD54 E600FFF8 */  swc1      $f0, -0x8($s0)
/* 37158 8005BD58 E602FFFC */  swc1      $f2, -0x4($s0)
/* 3715C 8005BD5C E6040000 */  swc1      $f4, 0x0($s0)
/* 37160 8005BD60 8662000A */  lh        $v0, 0xA($s3)
/* 37164 8005BD64 0242102A */  slt       $v0, $s2, $v0
/* 37168 8005BD68 1440FF9E */  bnez      $v0, .L8005BBE4
/* 3716C 8005BD6C 26100040 */   addiu    $s0, $s0, 0x40
.L8005BD70:
/* 37170 8005BD70 8FBF0074 */  lw        $ra, 0x74($sp)
/* 37174 8005BD74 8FB40070 */  lw        $s4, 0x70($sp)
/* 37178 8005BD78 8FB3006C */  lw        $s3, 0x6C($sp)
/* 3717C 8005BD7C 8FB20068 */  lw        $s2, 0x68($sp)
/* 37180 8005BD80 8FB10064 */  lw        $s1, 0x64($sp)
/* 37184 8005BD84 8FB00060 */  lw        $s0, 0x60($sp)
/* 37188 8005BD88 D7BE00A0 */  ldc1      $f30, 0xA0($sp)
/* 3718C 8005BD8C D7BC0098 */  ldc1      $f28, 0x98($sp)
/* 37190 8005BD90 D7BA0090 */  ldc1      $f26, 0x90($sp)
/* 37194 8005BD94 D7B80088 */  ldc1      $f24, 0x88($sp)
/* 37198 8005BD98 D7B60080 */  ldc1      $f22, 0x80($sp)
/* 3719C 8005BD9C D7B40078 */  ldc1      $f20, 0x78($sp)
/* 371A0 8005BDA0 03E00008 */  jr        $ra
/* 371A4 8005BDA4 27BD00A8 */   addiu    $sp, $sp, 0xA8

### DECOMPILED C INSTRUCTIONS:

void update_collider_transform(s16 colliderID) {
    Collider* collider;
    struct Model* model;
    Matrix4f matrix;
    s32 i;
    Vec3f* vertexTable;
    f32 min_x, min_y, min_z, max_x, max_y, max_z;
    ColliderTriangle* triangle;
    f32 e13_y, e21_z, e13_z, e21_y, e21_x, e13_x, normalX, normalY, normalZ, coeff;

    collider = &gCollisionData.colliderList[colliderID];
    model = get_model_from_list_index(collider->parentModelIndex);

    if (!model->currentMatrix) {
        copy_matrix(model->transformMatrix, matrix);
    } else {
        guMtxL2F(matrix, (Mtx*)model->currentMatrix);
        guMtxCatF(model->transformMatrix, matrix, matrix);
    }

    triangle = collider->triangleTable;
    vertexTable = collider->vertexTable;

    min_x = min_y = min_z = 999999.9f;
    max_x = max_y = max_z = -999999.9f;

    for (i = 0; i < collider->numVertices; vertexTable += 2, i++) {
        guMtxXFMF(matrix, vertexTable[1].x, vertexTable[1].y, vertexTable[1].z, &vertexTable[0].x, &vertexTable[0].y, &vertexTable[0].z);

        if (vertexTable[0].x < min_x)
            min_x = vertexTable[0].x;
        if (vertexTable[0].x > max_x)
            max_x = vertexTable[0].x;
        if (vertexTable[0].y < min_y)
            min_y = vertexTable[0].y;
        if (vertexTable[0].y > max_y)
            max_y = vertexTable[0].y;
        if (vertexTable[0].z < min_z)
            min_z = vertexTable[0].z;
        if (vertexTable[0].z > max_z)
            max_z = vertexTable[0].z;
    }

    collider->aabb->min.x = min_x;
    collider->aabb->min.y = min_y;
    collider->aabb->min.z = min_z;
    collider->aabb->max.x = max_x;
    collider->aabb->max.y = max_y;
    collider->aabb->max.z = max_z;

    for (i = 0; i < collider->numTriangles; triangle++, i++) {
        Vec3f* v1 = triangle->v1;
        Vec3f* v2 = triangle->v2;
        Vec3f* v3 = triangle->v3;

        triangle->e13.x = v3->x - v1->x;
        triangle->e13.y = v3->y - v1->y;
        triangle->e13.z = v3->z - v1->z;
        triangle->e21.x = v1->x - v2->x;
        triangle->e21.y = v1->y - v2->y;
        triangle->e21.z = v1->z - v2->z;
        triangle->e32.x = v2->x - v3->x;
        triangle->e32.y = v2->y - v3->y;
        triangle->e32.z = v2->z - v3->z;

        e13_x = triangle->e13.x;
        e13_y = triangle->e13.y;
        e13_z = triangle->e13.z;
        e21_x = triangle->e21.x;
        e21_y = triangle->e21.y;
        e21_z = triangle->e21.z;

        // vector product
        normalX = e13_y * e21_z - e13_z * e21_y;
        normalY = e13_z * e21_x - e13_x * e21_z;
        normalZ = e13_x * e21_y - e13_y * e21_x;
        coeff  = SQ(normalX) + SQ(normalY) + SQ(normalZ);

        if (coeff != 0) {
            coeff = 1.0f / sqrtf(coeff);
        } else {
            coeff = 0.0f;
        }

        triangle->normal.x = normalX * coeff;
        triangle->normal.y = normalY * coeff;
        triangle->normal.z = normalZ * coeff;
    }
}