### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80246B2C
/* 16738C 80246B2C 3C058015 */  lui       $a1, %hi(gWindowStyles)
.L80246B30:
/* 167390 80246B30 24A5F150 */  addiu     $a1, $a1, %lo(gWindowStyles)
glabel func_80246B34
/* 167394 80246B34 3C068025 */  lui       $a2, %hi(D_8024BDA8)
/* 167398 80246B38 24C6BDA8 */  addiu     $a2, $a2, %lo(D_8024BDA8)
/* 16739C 80246B3C 24C20070 */  addiu     $v0, $a2, 0x70
/* 1673A0 80246B40 ACA600E0 */  sw        $a2, 0xE0($a1)
/* 1673A4 80246B44 ACA600E4 */  sw        $a2, 0xE4($a1)
/* 1673A8 80246B48 ACA600E8 */  sw        $a2, 0xE8($a1)
/* 1673AC 80246B4C ACA600EC */  sw        $a2, 0xEC($a1)
/* 1673B0 80246B50 ACA200F0 */  sw        $v0, 0xF0($a1)
/* 1673B4 80246B54 ACA200F4 */  sw        $v0, 0xF4($a1)
/* 1673B8 80246B58 ACA200F8 */  sw        $v0, 0xF8($a1)
/* 1673BC 80246B5C ACA200FC */  sw        $v0, 0xFC($a1)
D_80246B60:
/* 1673C0 80246B60 90830003 */  lbu       $v1, 0x3($a0)
/* 1673C4 80246B64 24020001 */  addiu     $v0, $zero, 0x1
/* 1673C8 80246B68 10620011 */  beq       $v1, $v0, .L80246BB0
/* 1673CC 80246B6C 28620002 */   slti     $v0, $v1, 0x2
/* 1673D0 80246B70 10400005 */  beqz      $v0, .L80246B88
glabel func_80246B74
/* 1673D4 80246B74 24020002 */   addiu    $v0, $zero, 0x2
/* 1673D8 80246B78 10600009 */  beqz      $v1, D_80246BA0
/* 1673DC 80246B7C 24C20038 */   addiu    $v0, $a2, 0x38
/* 1673E0 80246B80 08091AF9 */  j         .L80246BE4
/* 1673E4 80246B84 00000000 */   nop
.L80246B88:
/* 1673E8 80246B88 1062000E */  beq       $v1, $v0, D_80246BC4
glabel .L80246B8C
/* 1673EC 80246B8C 24020003 */   addiu    $v0, $zero, 0x3
/* 1673F0 80246B90 10620011 */  beq       $v1, $v0, D_80246BD8
/* 1673F4 80246B94 24C20038 */   addiu    $v0, $a2, 0x38
/* 1673F8 80246B98 08091AF9 */  j         .L80246BE4
/* 1673FC 80246B9C 00000000 */   nop
D_80246BA0:
/* 167400 80246BA0 ACA200E0 */  sw        $v0, 0xE0($a1)
.L80246BA4:
/* 167404 80246BA4 24C200A8 */  addiu     $v0, $a2, 0xA8
jtbl_80246BA8:
/* 167408 80246BA8 08091AF9 */  j         .L80246BE4
/* 16740C 80246BAC ACA200F0 */   sw       $v0, 0xF0($a1)
.L80246BB0:
/* 167410 80246BB0 24C20038 */  addiu     $v0, $a2, 0x38
/* 167414 80246BB4 ACA200E4 */  sw        $v0, 0xE4($a1)
/* 167418 80246BB8 24C200A8 */  addiu     $v0, $a2, 0xA8
/* 16741C 80246BBC 08091AF9 */  j         .L80246BE4
/* 167420 80246BC0 ACA200F4 */   sw       $v0, 0xF4($a1)
D_80246BC4:
/* 167424 80246BC4 24C20038 */  addiu     $v0, $a2, 0x38
/* 167428 80246BC8 ACA200E8 */  sw        $v0, 0xE8($a1)
/* 16742C 80246BCC 24C200A8 */  addiu     $v0, $a2, 0xA8
D_80246BD0:
/* 167430 80246BD0 08091AF9 */  j         .L80246BE4
/* 167434 80246BD4 ACA200F8 */   sw       $v0, 0xF8($a1)
D_80246BD8:
/* 167438 80246BD8 ACA200EC */  sw        $v0, 0xEC($a1)
/* 16743C 80246BDC 24C200A8 */  addiu     $v0, $a2, 0xA8
jtbl_80246BE0:
/* 167440 80246BE0 ACA200FC */  sw        $v0, 0xFC($a1)
.L80246BE4:
/* 167444 80246BE4 3C028025 */  lui       $v0, %hi(D_80249B84)
D_80246BE8:
/* 167448 80246BE8 8C429B84 */  lw        $v0, %lo(D_80249B84)($v0)
/* 16744C 80246BEC 80430004 */  lb        $v1, 0x4($v0)
/* 167450 80246BF0 24020004 */  addiu     $v0, $zero, 0x4
D_80246BF4:
/* 167454 80246BF4 14620009 */  bne       $v1, $v0, .L80246C1C
/* 167458 80246BF8 24020001 */   addiu    $v0, $zero, 0x1
/* 16745C 80246BFC 3C038025 */  lui       $v1, %hi(D_8024C094)
/* 167460 80246C00 8C63C094 */  lw        $v1, %lo(D_8024C094)($v1)
D_80246C04:
/* 167464 80246C04 10620015 */  beq       $v1, $v0, .L80246C5C
/* 167468 80246C08 28620002 */   slti     $v0, $v1, 0x2
/* 16746C 80246C0C 50400005 */  beql      $v0, $zero, .L80246C24
.L80246C10:
/* 167470 80246C10 24020002 */   addiu    $v0, $zero, 0x2
/* 167474 80246C14 10600009 */  beqz      $v1, .L80246C3C
/* 167478 80246C18 00000000 */   nop
.L80246C1C:
/* 16747C 80246C1C 03E00008 */  jr        $ra
/* 167480 80246C20 00000000 */   nop
.L80246C24:
/* 167484 80246C24 10620015 */  beq       $v1, $v0, .L80246C7C
/* 167488 80246C28 24020003 */   addiu    $v0, $zero, 0x3
/* 16748C 80246C2C 1062001B */  beq       $v1, $v0, .L80246C9C
.L80246C30:
/* 167490 80246C30 00000000 */   nop
/* 167494 80246C34 03E00008 */  jr        $ra
/* 167498 80246C38 00000000 */   nop
.L80246C3C:
/* 16749C 80246C3C 3C038015 */  lui       $v1, %hi(gWindowStyles)
/* 1674A0 80246C40 2463F150 */  addiu     $v1, $v1, %lo(gWindowStyles)
/* 1674A4 80246C44 3C028025 */  lui       $v0, %hi(hos_03_Quizmo_Worker + 0x10)
/* 1674A8 80246C48 2442BDE0 */  addiu     $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10)
/* 1674AC 80246C4C AC6200E0 */  sw        $v0, 0xE0($v1)
/* 1674B0 80246C50 24420070 */  addiu     $v0, $v0, 0x70
/* 1674B4 80246C54 03E00008 */  jr        $ra
/* 1674B8 80246C58 AC6200F0 */   sw       $v0, 0xF0($v1)
glabel .L80246C5C
/* 1674BC 80246C5C 3C038015 */  lui       $v1, %hi(gWindowStyles)
D_80246C60:
/* 1674C0 80246C60 2463F150 */  addiu     $v1, $v1, %lo(gWindowStyles)
/* 1674C4 80246C64 3C028025 */  lui       $v0, %hi(hos_03_Quizmo_Worker + 0x10)
/* 1674C8 80246C68 2442BDE0 */  addiu     $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10)
/* 1674CC 80246C6C AC6200E4 */  sw        $v0, 0xE4($v1)
/* 1674D0 80246C70 24420070 */  addiu     $v0, $v0, 0x70
.L80246C74:
/* 1674D4 80246C74 03E00008 */  jr        $ra
/* 1674D8 80246C78 AC6200F4 */   sw       $v0, 0xF4($v1)
.L80246C7C:
/* 1674DC 80246C7C 3C038015 */  lui       $v1, %hi(gWindowStyles)
/* 1674E0 80246C80 2463F150 */  addiu     $v1, $v1, %lo(gWindowStyles)
/* 1674E4 80246C84 3C028025 */  lui       $v0, %hi(hos_03_Quizmo_Worker + 0x10)
/* 1674E8 80246C88 2442BDE0 */  addiu     $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10)
D_80246C8C:
/* 1674EC 80246C8C AC6200E8 */  sw        $v0, 0xE8($v1)
.L80246C90:
/* 1674F0 80246C90 24420070 */  addiu     $v0, $v0, 0x70
D_80246C94:
/* 1674F4 80246C94 03E00008 */  jr        $ra
/* 1674F8 80246C98 AC6200F8 */   sw       $v0, 0xF8($v1)
.L80246C9C:
/* 1674FC 80246C9C 3C038015 */  lui       $v1, %hi(gWindowStyles)
/* 167500 80246CA0 2463F150 */  addiu     $v1, $v1, %lo(gWindowStyles)
/* 167504 80246CA4 3C028025 */  lui       $v0, %hi(hos_03_Quizmo_Worker + 0x10)
D_80246CA8:
/* 167508 80246CA8 2442BDE0 */  addiu     $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10)
/* 16750C 80246CAC AC6200EC */  sw        $v0, 0xEC($v1)
D_80246CB0:
/* 167510 80246CB0 24420070 */  addiu     $v0, $v0, 0x70
.L80246CB4:
/* 167514 80246CB4 03E00008 */  jr        $ra
jtbl_80246CB8:
/* 167518 80246CB8 AC6200FC */   sw       $v0, 0xFC($v1)

### DECOMPILED C INSTRUCTIONS:

void filemenu_main_update(MenuPanel* menu) {
    gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[15];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[15];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[15];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[15];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[17];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[17];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[17];
    gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[17];

    switch (menu->selected) {
        case 0:
            gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16];
            gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[18];
            break;
        case 1:
            gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16];
            gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[18];
            break;
        case 2:
            gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16];
            gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[18];
            break;
        case 3:
            gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16];
            gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[18];
            break;
    }

    if (filemenu_menus[0]->page == PAGE_4) {
        switch (filemenu_loadedFileIdx) {
            case 0:
                gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16];
                gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[18];
                return;
            case 1:
                gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16];
                gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[18];
                return;
            case 2:
                gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16];
                gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[18];
                return;
            case 3:
                gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16];
                gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[18];
                return;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel damage_indicator_update
/* 34F704 E003C244 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 34F708 E003C248 AFBF0010 */  sw        $ra, 0x10($sp)
/* 34F70C E003C24C F7B40018 */  sdc1      $f20, 0x18($sp)
/* 34F710 E003C250 8C85000C */  lw        $a1, 0xC($a0)
/* 34F714 E003C254 8CA30030 */  lw        $v1, 0x30($a1)
/* 34F718 E003C258 28620064 */  slti      $v0, $v1, 0x64
/* 34F71C E003C25C 10400002 */  beqz      $v0, .LE003C268
/* 34F720 E003C260 2462FFFF */   addiu    $v0, $v1, -0x1
/* 34F724 E003C264 ACA20030 */  sw        $v0, 0x30($a1)
.LE003C268:
/* 34F728 E003C268 8CA60034 */  lw        $a2, 0x34($a1)
/* 34F72C E003C26C 8CA30030 */  lw        $v1, 0x30($a1)
/* 34F730 E003C270 24C80001 */  addiu     $t0, $a2, 0x1
/* 34F734 E003C274 04610005 */  bgez      $v1, .LE003C28C
/* 34F738 E003C278 ACA80034 */   sw       $t0, 0x34($a1)
/* 34F73C E003C27C 0C080128 */  jal       shim_remove_effect
/* 34F740 E003C280 00000000 */   nop
/* 34F744 E003C284 0800F119 */  j         .LE003C464
/* 34F748 E003C288 00000000 */   nop
.LE003C28C:
/* 34F74C E003C28C 8C820008 */  lw        $v0, 0x8($a0)
/* 34F750 E003C290 24070001 */  addiu     $a3, $zero, 0x1
/* 34F754 E003C294 00E2102A */  slt       $v0, $a3, $v0
/* 34F758 E003C298 10400072 */  beqz      $v0, .LE003C464
/* 34F75C E003C29C 24A50040 */   addiu    $a1, $a1, 0x40
/* 34F760 E003C2A0 286C0006 */  slti      $t4, $v1, 0x6
/* 34F764 E003C2A4 286B0005 */  slti      $t3, $v1, 0x5
/* 34F768 E003C2A8 28CA0009 */  slti      $t2, $a2, 0x9
/* 34F76C E003C2AC 3C02E004 */  lui       $v0, %hi(D_E003CD1C)
/* 34F770 E003C2B0 2442CD1C */  addiu     $v0, $v0, %lo(D_E003CD1C)
/* 34F774 E003C2B4 00061880 */  sll       $v1, $a2, 2
/* 34F778 E003C2B8 00624821 */  addu      $t1, $v1, $v0
/* 34F77C E003C2BC 29080029 */  slti      $t0, $t0, 0x29
/* 34F780 E003C2C0 3C02E004 */  lui       $v0, %hi(D_E003CCD0)
/* 34F784 E003C2C4 2442CCD0 */  addiu     $v0, $v0, %lo(D_E003CCD0)
/* 34F788 E003C2C8 00C21821 */  addu      $v1, $a2, $v0
/* 34F78C E003C2CC 24A50038 */  addiu     $a1, $a1, 0x38
/* 34F790 E003C2D0 3C013FE8 */  lui       $at, (0x3FE80000 >> 16)
/* 34F794 E003C2D4 44818800 */  mtc1      $at, $f17
/* 34F798 E003C2D8 44808000 */  mtc1      $zero, $f16
/* 34F79C E003C2DC 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34F7A0 E003C2E0 D432CD40 */  ldc1      $f18, -0x32C0($at)
/* 34F7A4 E003C2E4 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34F7A8 E003C2E8 D42ECD48 */  ldc1      $f14, -0x32B8($at)
.LE003C2EC:
/* 34F7AC E003C2EC 15800013 */  bnez      $t4, .LE003C33C
/* 34F7B0 E003C2F0 00000000 */   nop
/* 34F7B4 E003C2F4 C4A4FFE4 */  lwc1      $f4, -0x1C($a1)
/* 34F7B8 E003C2F8 46002121 */  cvt.d.s   $f4, $f4
/* 34F7BC E003C2FC 46302102 */  mul.d     $f4, $f4, $f16
/* 34F7C0 E003C300 00000000 */  nop
/* 34F7C4 E003C304 C4A2FFE8 */  lwc1      $f2, -0x18($a1)
/* 34F7C8 E003C308 460010A1 */  cvt.d.s   $f2, $f2
/* 34F7CC E003C30C 46301082 */  mul.d     $f2, $f2, $f16
/* 34F7D0 E003C310 00000000 */  nop
/* 34F7D4 E003C314 C4A0FFEC */  lwc1      $f0, -0x14($a1)
/* 34F7D8 E003C318 46000021 */  cvt.d.s   $f0, $f0
/* 34F7DC E003C31C 46300002 */  mul.d     $f0, $f0, $f16
/* 34F7E0 E003C320 00000000 */  nop
/* 34F7E4 E003C324 46202120 */  cvt.s.d   $f4, $f4
/* 34F7E8 E003C328 462010A0 */  cvt.s.d   $f2, $f2
/* 34F7EC E003C32C 46200020 */  cvt.s.d   $f0, $f0
/* 34F7F0 E003C330 E4A4FFE4 */  swc1      $f4, -0x1C($a1)
/* 34F7F4 E003C334 E4A2FFE8 */  swc1      $f2, -0x18($a1)
/* 34F7F8 E003C338 E4A0FFEC */  swc1      $f0, -0x14($a1)
.LE003C33C:
/* 34F7FC E003C33C 11600019 */  beqz      $t3, .LE003C3A4
/* 34F800 E003C340 00000000 */   nop
/* 34F804 E003C344 C4A6FFF4 */  lwc1      $f6, -0xC($a1)
/* 34F808 E003C348 468031A1 */  cvt.d.w   $f6, $f6
/* 34F80C E003C34C 46323182 */  mul.d     $f6, $f6, $f18
/* 34F810 E003C350 00000000 */  nop
/* 34F814 E003C354 C4A4FFE4 */  lwc1      $f4, -0x1C($a1)
/* 34F818 E003C358 46002121 */  cvt.d.s   $f4, $f4
/* 34F81C E003C35C 462E2102 */  mul.d     $f4, $f4, $f14
/* 34F820 E003C360 00000000 */  nop
/* 34F824 E003C364 C4A2FFE8 */  lwc1      $f2, -0x18($a1)
/* 34F828 E003C368 460010A1 */  cvt.d.s   $f2, $f2
/* 34F82C E003C36C 462E1082 */  mul.d     $f2, $f2, $f14
/* 34F830 E003C370 00000000 */  nop
/* 34F834 E003C374 C4A0FFEC */  lwc1      $f0, -0x14($a1)
/* 34F838 E003C378 46000021 */  cvt.d.s   $f0, $f0
/* 34F83C E003C37C 462E0002 */  mul.d     $f0, $f0, $f14
/* 34F840 E003C380 00000000 */  nop
/* 34F844 E003C384 4620350D */  trunc.w.d $f20, $f6
/* 34F848 E003C388 E4B4FFF4 */  swc1      $f20, -0xC($a1)
/* 34F84C E003C38C 46202120 */  cvt.s.d   $f4, $f4
/* 34F850 E003C390 462010A0 */  cvt.s.d   $f2, $f2
/* 34F854 E003C394 46200020 */  cvt.s.d   $f0, $f0
/* 34F858 E003C398 E4A4FFE4 */  swc1      $f4, -0x1C($a1)
/* 34F85C E003C39C E4A2FFE8 */  swc1      $f2, -0x18($a1)
/* 34F860 E003C3A0 E4A0FFEC */  swc1      $f0, -0x14($a1)
.LE003C3A4:
/* 34F864 E003C3A4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 34F868 E003C3A8 44816000 */  mtc1      $at, $f12
/* 34F86C E003C3AC 11400002 */  beqz      $t2, .LE003C3B8
/* 34F870 E003C3B0 00000000 */   nop
/* 34F874 E003C3B4 C52C0000 */  lwc1      $f12, 0x0($t1)
.LE003C3B8:
/* 34F878 E003C3B8 C4AAFFCC */  lwc1      $f10, -0x34($a1)
/* 34F87C E003C3BC 460C5282 */  mul.s     $f10, $f10, $f12
/* 34F880 E003C3C0 00000000 */  nop
/* 34F884 E003C3C4 C4A8FFD0 */  lwc1      $f8, -0x30($a1)
/* 34F888 E003C3C8 460C4202 */  mul.s     $f8, $f8, $f12
/* 34F88C E003C3CC 00000000 */  nop
/* 34F890 E003C3D0 C4A6FFCC */  lwc1      $f6, -0x34($a1)
/* 34F894 E003C3D4 C4A0FFE4 */  lwc1      $f0, -0x1C($a1)
/* 34F898 E003C3D8 C4A4FFD0 */  lwc1      $f4, -0x30($a1)
/* 34F89C E003C3DC 46003180 */  add.s     $f6, $f6, $f0
/* 34F8A0 E003C3E0 C4A0FFE8 */  lwc1      $f0, -0x18($a1)
/* 34F8A4 E003C3E4 C4A2FFD4 */  lwc1      $f2, -0x2C($a1)
/* 34F8A8 E003C3E8 46002100 */  add.s     $f4, $f4, $f0
/* 34F8AC E003C3EC C4A0FFEC */  lwc1      $f0, -0x14($a1)
/* 34F8B0 E003C3F0 46001080 */  add.s     $f2, $f2, $f0
/* 34F8B4 E003C3F4 C4A0FFD4 */  lwc1      $f0, -0x2C($a1)
/* 34F8B8 E003C3F8 E4A6FFCC */  swc1      $f6, -0x34($a1)
/* 34F8BC E003C3FC 460C0002 */  mul.s     $f0, $f0, $f12
/* 34F8C0 E003C400 00000000 */  nop
/* 34F8C4 E003C404 E4A4FFD0 */  swc1      $f4, -0x30($a1)
/* 34F8C8 E003C408 E4A2FFD4 */  swc1      $f2, -0x2C($a1)
/* 34F8CC E003C40C E4AAFFD8 */  swc1      $f10, -0x28($a1)
/* 34F8D0 E003C410 E4A8FFDC */  swc1      $f8, -0x24($a1)
/* 34F8D4 E003C414 1100000D */  beqz      $t0, .LE003C44C
/* 34F8D8 E003C418 E4A0FFE0 */   swc1     $f0, -0x20($a1)
/* 34F8DC E003C41C 90620000 */  lbu       $v0, 0x0($v1)
/* 34F8E0 E003C420 3C01E004 */  lui       $at, (0xE0040000 >> 16)
/* 34F8E4 E003C424 D422CD50 */  ldc1      $f2, -0x32B0($at)
/* 34F8E8 E003C428 44820000 */  mtc1      $v0, $f0
/* 34F8EC E003C42C 00000000 */  nop
/* 34F8F0 E003C430 46800020 */  cvt.s.w   $f0, $f0
/* 34F8F4 E003C434 46000021 */  cvt.d.s   $f0, $f0
/* 34F8F8 E003C438 46220002 */  mul.d     $f0, $f0, $f2
/* 34F8FC E003C43C 00000000 */  nop
/* 34F900 E003C440 46200020 */  cvt.s.d   $f0, $f0
/* 34F904 E003C444 0800F114 */  j         .LE003C450
/* 34F908 E003C448 E4A00000 */   swc1     $f0, 0x0($a1)
.LE003C44C:
/* 34F90C E003C44C ACA00000 */  sw        $zero, 0x0($a1)
.LE003C450:
/* 34F910 E003C450 24E70001 */  addiu     $a3, $a3, 0x1
/* 34F914 E003C454 8C820008 */  lw        $v0, 0x8($a0)
/* 34F918 E003C458 00E2102A */  slt       $v0, $a3, $v0
/* 34F91C E003C45C 1440FFA3 */  bnez      $v0, .LE003C2EC
/* 34F920 E003C460 24A50040 */   addiu    $a1, $a1, 0x40
.LE003C464:
/* 34F924 E003C464 8FBF0010 */  lw        $ra, 0x10($sp)
/* 34F928 E003C468 D7B40018 */  ldc1      $f20, 0x18($sp)
/* 34F92C E003C46C 03E00008 */  jr        $ra
/* 34F930 E003C470 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void damage_indicator_update(EffectInstance* effect) {
    DamageIndicatorFXData* part = effect->data.damageIndicator;
    s32 temp_a2;
    s32 temp_t0;
    s32 timeLeft;
    f32 phi_f12;
    s32 i;

    if (part->timeLeft < 100) {
        part->timeLeft--;
    }

    temp_a2 = part->lifetime++;
    temp_t0 = part->lifetime;
    timeLeft = part->timeLeft;

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

    part++;
    for (i = 1; i < effect->numParts; i++, part++) {
        f32 x, y, z;

        if (timeLeft > 5) {
            part->relPos.x = part->relPos.x * 0.75;
            part->relPos.y = part->relPos.y * 0.75;
            part->relPos.z = part->relPos.z * 0.75;
        }
        if (timeLeft < 5) {
            part->alpha = part->alpha * 0.6;
            part->relPos.x = part->relPos.x * 0.7;
            part->relPos.y = part->relPos.y * 0.7;
            part->relPos.z = part->relPos.z * 0.7;
        }
        phi_f12 = 1.0f;
        if (temp_a2 < 9) {
            phi_f12 = D_E003CD1C[temp_a2];
        }
        part->curPos.x = part->basePos.x * phi_f12;
        part->curPos.y = part->basePos.y * phi_f12;
        part->curPos.z = part->basePos.z * phi_f12;
        part->basePos.x += part->relPos.x;
        part->basePos.y += part->relPos.y;
        part->basePos.z += part->relPos.z;

        if (temp_t0 <= 40) {
            part->scale = (f32)D_E003CCD0[temp_a2] * 0.01;
        } else {
            part->scale = 0.0f;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel npc_raycast_up_corners
/* 766D8 800DD228 27BDFF88 */  addiu     $sp, $sp, -0x78
/* 766DC 800DD22C F7B40050 */  sdc1      $f20, 0x50($sp)
/* 766E0 800DD230 C7B4008C */  lwc1      $f20, 0x8C($sp)
/* 766E4 800DD234 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 766E8 800DD238 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 766EC 800DD23C 44810000 */  mtc1      $at, $f0
/* 766F0 800DD240 AFB60040 */  sw        $s6, 0x40($sp)
/* 766F4 800DD244 8FB60088 */  lw        $s6, 0x88($sp)
/* 766F8 800DD248 F7B60058 */  sdc1      $f22, 0x58($sp)
/* 766FC 800DD24C C7B60090 */  lwc1      $f22, 0x90($sp)
/* 76700 800DD250 AFB5003C */  sw        $s5, 0x3C($sp)
/* 76704 800DD254 0080A82D */  daddu     $s5, $a0, $zero
/* 76708 800DD258 AFB70044 */  sw        $s7, 0x44($sp)
/* 7670C 800DD25C 00A0B82D */  daddu     $s7, $a1, $zero
/* 76710 800DD260 AFBE0048 */  sw        $fp, 0x48($sp)
/* 76714 800DD264 4600A502 */  mul.s     $f20, $f20, $f0
/* 76718 800DD268 00000000 */  nop
/* 7671C 800DD26C 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 76720 800DD270 44810000 */  mtc1      $at, $f0
/* 76724 800DD274 00C0F02D */  daddu     $fp, $a2, $zero
/* 76728 800DD278 AFBF004C */  sw        $ra, 0x4C($sp)
/* 7672C 800DD27C AFB40038 */  sw        $s4, 0x38($sp)
/* 76730 800DD280 AFB30034 */  sw        $s3, 0x34($sp)
/* 76734 800DD284 AFB20030 */  sw        $s2, 0x30($sp)
/* 76738 800DD288 AFB1002C */  sw        $s1, 0x2C($sp)
/* 7673C 800DD28C AFB00028 */  sw        $s0, 0x28($sp)
/* 76740 800DD290 F7BC0070 */  sdc1      $f28, 0x70($sp)
/* 76744 800DD294 F7BA0068 */  sdc1      $f26, 0x68($sp)
/* 76748 800DD298 F7B80060 */  sdc1      $f24, 0x60($sp)
/* 7674C 800DD29C AFA70084 */  sw        $a3, 0x84($sp)
/* 76750 800DD2A0 4600A503 */  div.s     $f20, $f20, $f0
/* 76754 800DD2A4 0C00A85B */  jal       sin_rad
/* 76758 800DD2A8 4600A306 */   mov.s    $f12, $f20
/* 7675C 800DD2AC 4600B702 */  mul.s     $f28, $f22, $f0
/* 76760 800DD2B0 00000000 */  nop
/* 76764 800DD2B4 2414FFFF */  addiu     $s4, $zero, -0x1
/* 76768 800DD2B8 4600A306 */  mov.s     $f12, $f20
/* 7676C 800DD2BC 0C00A874 */  jal       cos_rad
/* 76770 800DD2C0 4600B587 */   neg.s    $f22, $f22
/* 76774 800DD2C4 02A0202D */  daddu     $a0, $s5, $zero
/* 76778 800DD2C8 27B30018 */  addiu     $s3, $sp, 0x18
/* 7677C 800DD2CC 0260282D */  daddu     $a1, $s3, $zero
/* 76780 800DD2D0 27B2001C */  addiu     $s2, $sp, 0x1C
/* 76784 800DD2D4 0240302D */  daddu     $a2, $s2, $zero
/* 76788 800DD2D8 27B10020 */  addiu     $s1, $sp, 0x20
/* 7678C 800DD2DC 0220382D */  daddu     $a3, $s1, $zero
/* 76790 800DD2E0 4600B682 */  mul.s     $f26, $f22, $f0
/* 76794 800DD2E4 00000000 */  nop
/* 76798 800DD2E8 C6F60000 */  lwc1      $f22, 0x0($s7)
/* 7679C 800DD2EC C7D80000 */  lwc1      $f24, 0x0($fp)
/* 767A0 800DD2F0 8FA30084 */  lw        $v1, 0x84($sp)
/* 767A4 800DD2F4 C6C00000 */  lwc1      $f0, 0x0($s6)
/* 767A8 800DD2F8 C4740000 */  lwc1      $f20, 0x0($v1)
/* 767AC 800DD2FC 461CB080 */  add.s     $f2, $f22, $f28
/* 767B0 800DD300 27B00024 */  addiu     $s0, $sp, 0x24
/* 767B4 800DD304 E7A00024 */  swc1      $f0, 0x24($sp)
/* 767B8 800DD308 461AA000 */  add.s     $f0, $f20, $f26
/* 767BC 800DD30C E7B8001C */  swc1      $f24, 0x1C($sp)
/* 767C0 800DD310 E7A20018 */  swc1      $f2, 0x18($sp)
/* 767C4 800DD314 E7A00020 */  swc1      $f0, 0x20($sp)
/* 767C8 800DD318 0C037413 */  jal       npc_raycast_up_corner
/* 767CC 800DD31C AFB00010 */   sw       $s0, 0x10($sp)
/* 767D0 800DD320 04410025 */  bgez      $v0, .L800DD3B8
/* 767D4 800DD324 02A0202D */   daddu    $a0, $s5, $zero
/* 767D8 800DD328 0260282D */  daddu     $a1, $s3, $zero
/* 767DC 800DD32C 461CB081 */  sub.s     $f2, $f22, $f28
/* 767E0 800DD330 0240302D */  daddu     $a2, $s2, $zero
/* 767E4 800DD334 0220382D */  daddu     $a3, $s1, $zero
/* 767E8 800DD338 461AA001 */  sub.s     $f0, $f20, $f26
/* 767EC 800DD33C E7B8001C */  swc1      $f24, 0x1C($sp)
/* 767F0 800DD340 E7A20018 */  swc1      $f2, 0x18($sp)
/* 767F4 800DD344 E7A00020 */  swc1      $f0, 0x20($sp)
/* 767F8 800DD348 0C037413 */  jal       npc_raycast_up_corner
/* 767FC 800DD34C AFB00010 */   sw       $s0, 0x10($sp)
/* 76800 800DD350 04410019 */  bgez      $v0, .L800DD3B8
/* 76804 800DD354 02A0202D */   daddu    $a0, $s5, $zero
/* 76808 800DD358 0260282D */  daddu     $a1, $s3, $zero
/* 7680C 800DD35C 461AB080 */  add.s     $f2, $f22, $f26
/* 76810 800DD360 0240302D */  daddu     $a2, $s2, $zero
/* 76814 800DD364 0220382D */  daddu     $a3, $s1, $zero
/* 76818 800DD368 461CA000 */  add.s     $f0, $f20, $f28
/* 7681C 800DD36C E7B8001C */  swc1      $f24, 0x1C($sp)
/* 76820 800DD370 E7A20018 */  swc1      $f2, 0x18($sp)
/* 76824 800DD374 E7A00020 */  swc1      $f0, 0x20($sp)
/* 76828 800DD378 0C037413 */  jal       npc_raycast_up_corner
/* 7682C 800DD37C AFB00010 */   sw       $s0, 0x10($sp)
/* 76830 800DD380 0441000D */  bgez      $v0, .L800DD3B8
/* 76834 800DD384 02A0202D */   daddu    $a0, $s5, $zero
/* 76838 800DD388 0260282D */  daddu     $a1, $s3, $zero
/* 7683C 800DD38C 461AB081 */  sub.s     $f2, $f22, $f26
/* 76840 800DD390 0240302D */  daddu     $a2, $s2, $zero
/* 76844 800DD394 0220382D */  daddu     $a3, $s1, $zero
/* 76848 800DD398 461CA001 */  sub.s     $f0, $f20, $f28
/* 7684C 800DD39C E7B8001C */  swc1      $f24, 0x1C($sp)
/* 76850 800DD3A0 E7A20018 */  swc1      $f2, 0x18($sp)
/* 76854 800DD3A4 E7A00020 */  swc1      $f0, 0x20($sp)
/* 76858 800DD3A8 0C037413 */  jal       npc_raycast_up_corner
/* 7685C 800DD3AC AFB00010 */   sw       $s0, 0x10($sp)
/* 76860 800DD3B0 0440000B */  bltz      $v0, .L800DD3E0
/* 76864 800DD3B4 00000000 */   nop
.L800DD3B8:
/* 76868 800DD3B8 C7A00018 */  lwc1      $f0, 0x18($sp)
/* 7686C 800DD3BC E6E00000 */  swc1      $f0, 0x0($s7)
/* 76870 800DD3C0 C7A0001C */  lwc1      $f0, 0x1C($sp)
/* 76874 800DD3C4 E7C00000 */  swc1      $f0, 0x0($fp)
/* 76878 800DD3C8 C7A00020 */  lwc1      $f0, 0x20($sp)
/* 7687C 800DD3CC 8FA30084 */  lw        $v1, 0x84($sp)
/* 76880 800DD3D0 E4600000 */  swc1      $f0, 0x0($v1)
/* 76884 800DD3D4 C7A00024 */  lwc1      $f0, 0x24($sp)
/* 76888 800DD3D8 0040A02D */  daddu     $s4, $v0, $zero
/* 7688C 800DD3DC E6C00000 */  swc1      $f0, 0x0($s6)
.L800DD3E0:
/* 76890 800DD3E0 06810009 */  bgez      $s4, .L800DD408
/* 76894 800DD3E4 0280102D */   daddu    $v0, $s4, $zero
/* 76898 800DD3E8 C7A00018 */  lwc1      $f0, 0x18($sp)
/* 7689C 800DD3EC E6E00000 */  swc1      $f0, 0x0($s7)
/* 768A0 800DD3F0 C7A0001C */  lwc1      $f0, 0x1C($sp)
/* 768A4 800DD3F4 E7C00000 */  swc1      $f0, 0x0($fp)
/* 768A8 800DD3F8 C7A00020 */  lwc1      $f0, 0x20($sp)
/* 768AC 800DD3FC 8FA30084 */  lw        $v1, 0x84($sp)
/* 768B0 800DD400 E4600000 */  swc1      $f0, 0x0($v1)
/* 768B4 800DD404 AEC00000 */  sw        $zero, 0x0($s6)
.L800DD408:
/* 768B8 800DD408 8FBF004C */  lw        $ra, 0x4C($sp)
/* 768BC 800DD40C 8FBE0048 */  lw        $fp, 0x48($sp)
/* 768C0 800DD410 8FB70044 */  lw        $s7, 0x44($sp)
/* 768C4 800DD414 8FB60040 */  lw        $s6, 0x40($sp)
/* 768C8 800DD418 8FB5003C */  lw        $s5, 0x3C($sp)
/* 768CC 800DD41C 8FB40038 */  lw        $s4, 0x38($sp)
/* 768D0 800DD420 8FB30034 */  lw        $s3, 0x34($sp)
/* 768D4 800DD424 8FB20030 */  lw        $s2, 0x30($sp)
/* 768D8 800DD428 8FB1002C */  lw        $s1, 0x2C($sp)
/* 768DC 800DD42C 8FB00028 */  lw        $s0, 0x28($sp)
/* 768E0 800DD430 D7BC0070 */  ldc1      $f28, 0x70($sp)
/* 768E4 800DD434 D7BA0068 */  ldc1      $f26, 0x68($sp)
/* 768E8 800DD438 D7B80060 */  ldc1      $f24, 0x60($sp)
/* 768EC 800DD43C D7B60058 */  ldc1      $f22, 0x58($sp)
/* 768F0 800DD440 D7B40050 */  ldc1      $f20, 0x50($sp)
/* 768F4 800DD444 03E00008 */  jr        $ra
/* 768F8 800DD448 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) {
    f32 startX;
    f32 startY;
    f32 startZ;
    f32 depth;
    f32 theta;
    f32 deltaZ;
    f32 deltaX;
    f32 x,y,z;
    s32 ret;
    s32 hitID;
    f32 temp;

    theta = DEG_TO_RAD(yaw);
    deltaX = radius * sin_rad(theta);
    temp = -radius; // needed to match
    deltaZ = temp * cos_rad(theta);

    x = *posX;
    y = *posY;
    z = *posZ;

    depth = *hitDepth;
    startX = x + deltaX;
    startY = y;
    startZ = z + deltaZ;

    ret = -1;
    hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth);

    if (hitID < 0) {
        startX = x - deltaX;
        startY = y;
        startZ = z - deltaZ;
        hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth);
    }

    if (hitID < 0) {
        startX = x + deltaZ;
        startY = y;
        startZ = z + deltaX;
        hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth);
    }

    if (hitID < 0) {
        startX = x - deltaZ;
        startY = y;
        startZ = z - deltaX;
        hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth);
    }

    if (hitID >= 0) {
        *posX = startX;
        *posY = startY;
        *posZ = startZ;
        *hitDepth = depth;
        ret = hitID;
    }

    if (ret < 0) {
        *posX = startX;
        *posY = startY;
        *posZ = startZ;
        *hitDepth = 0;
    }

    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel floating_rock_appendGfx
/* 395E9C E00982EC 27BDFF80 */  addiu     $sp, $sp, -0x80
/* 395EA0 E00982F0 3C05DB06 */  lui       $a1, (0xDB060024 >> 16)
/* 395EA4 E00982F4 AFB50074 */  sw        $s5, 0x74($sp)
/* 395EA8 E00982F8 3C15800A */  lui       $s5, %hi(gMainGfxPos)
/* 395EAC E00982FC 26B5A66C */  addiu     $s5, $s5, %lo(gMainGfxPos)
/* 395EB0 E0098300 34A50024 */  ori       $a1, $a1, (0xDB060024 & 0xFFFF)
/* 395EB4 E0098304 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 395EB8 E0098308 AFBF0078 */  sw        $ra, 0x78($sp)
/* 395EBC E009830C AFB40070 */  sw        $s4, 0x70($sp)
/* 395EC0 E0098310 AFB3006C */  sw        $s3, 0x6C($sp)
/* 395EC4 E0098314 AFB20068 */  sw        $s2, 0x68($sp)
/* 395EC8 E0098318 AFB10064 */  sw        $s1, 0x64($sp)
/* 395ECC E009831C AFB00060 */  sw        $s0, 0x60($sp)
/* 395ED0 E0098320 8EA80000 */  lw        $t0, 0x0($s5)
/* 395ED4 E0098324 8C94000C */  lw        $s4, 0xC($a0)
/* 395ED8 E0098328 0100182D */  daddu     $v1, $t0, $zero
/* 395EDC E009832C 8E930044 */  lw        $s3, 0x44($s4)
/* 395EE0 E0098330 25080008 */  addiu     $t0, $t0, 0x8
/* 395EE4 E0098334 AC620000 */  sw        $v0, 0x0($v1)
/* 395EE8 E0098338 AC600004 */  sw        $zero, 0x4($v1)
/* 395EEC E009833C AD050000 */  sw        $a1, 0x0($t0)
/* 395EF0 E0098340 8C820010 */  lw        $v0, 0x10($a0)
/* 395EF4 E0098344 8C42001C */  lw        $v0, 0x1C($v0)
/* 395EF8 E0098348 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 395EFC E009834C 00431021 */  addu      $v0, $v0, $v1
/* 395F00 E0098350 AD020004 */  sw        $v0, 0x4($t0)
/* 395F04 E0098354 C680003C */  lwc1      $f0, 0x3C($s4)
/* 395F08 E0098358 E7A00010 */  swc1      $f0, 0x10($sp)
/* 395F0C E009835C C6800004 */  lwc1      $f0, 0x4($s4)
/* 395F10 E0098360 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 395F14 E0098364 E7A00014 */  swc1      $f0, 0x14($sp)
/* 395F18 E0098368 C6800008 */  lwc1      $f0, 0x8($s4)
/* 395F1C E009836C 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 395F20 E0098370 E7A00018 */  swc1      $f0, 0x18($sp)
/* 395F24 E0098374 C680000C */  lwc1      $f0, 0xC($s4)
/* 395F28 E0098378 27A40020 */  addiu     $a0, $sp, 0x20
/* 395F2C E009837C AEA80000 */  sw        $t0, 0x0($s5)
/* 395F30 E0098380 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 395F34 E0098384 8E850024 */  lw        $a1, 0x24($s4)
/* 395F38 E0098388 8E86002C */  lw        $a2, 0x2C($s4)
/* 395F3C E009838C 8E870028 */  lw        $a3, 0x28($s4)
/* 395F40 E0098390 25080008 */  addiu     $t0, $t0, 0x8
/* 395F44 E0098394 0C080180 */  jal       shim_guPositionF
/* 395F48 E0098398 AEA80000 */   sw       $t0, 0x0($s5)
/* 395F4C E009839C 27A40020 */  addiu     $a0, $sp, 0x20
/* 395F50 E00983A0 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 395F54 E00983A4 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 395F58 E00983A8 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 395F5C E00983AC 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 395F60 E00983B0 96050000 */  lhu       $a1, 0x0($s0)
/* 395F64 E00983B4 8E220000 */  lw        $v0, 0x0($s1)
/* 395F68 E00983B8 00052980 */  sll       $a1, $a1, 6
/* 395F6C E00983BC 00B22821 */  addu      $a1, $a1, $s2
/* 395F70 E00983C0 0C080118 */  jal       shim_guMtxF2L
/* 395F74 E00983C4 00452821 */   addu     $a1, $v0, $a1
/* 395F78 E00983C8 3C05D7D7 */  lui       $a1, (0xD7D76E00 >> 16)
/* 395F7C E00983CC 8EA60000 */  lw        $a2, 0x0($s5)
/* 395F80 E00983D0 34A56E00 */  ori       $a1, $a1, (0xD7D76E00 & 0xFFFF)
/* 395F84 E00983D4 00C0202D */  daddu     $a0, $a2, $zero
/* 395F88 E00983D8 24C60008 */  addiu     $a2, $a2, 0x8
/* 395F8C E00983DC AEA60000 */  sw        $a2, 0x0($s5)
/* 395F90 E00983E0 96020000 */  lhu       $v0, 0x0($s0)
/* 395F94 E00983E4 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 395F98 E00983E8 AC830000 */  sw        $v1, 0x0($a0)
/* 395F9C E00983EC 24430001 */  addiu     $v1, $v0, 0x1
/* 395FA0 E00983F0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 395FA4 E00983F4 00021180 */  sll       $v0, $v0, 6
/* 395FA8 E00983F8 A6030000 */  sh        $v1, 0x0($s0)
/* 395FAC E00983FC 8E230000 */  lw        $v1, 0x0($s1)
/* 395FB0 E0098400 00521021 */  addu      $v0, $v0, $s2
/* 395FB4 E0098404 00621821 */  addu      $v1, $v1, $v0
/* 395FB8 E0098408 24C20008 */  addiu     $v0, $a2, 0x8
/* 395FBC E009840C AC830004 */  sw        $v1, 0x4($a0)
/* 395FC0 E0098410 AEA20000 */  sw        $v0, 0x0($s5)
/* 395FC4 E0098414 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 395FC8 E0098418 ACC20000 */  sw        $v0, 0x0($a2)
/* 395FCC E009841C 326200FF */  andi      $v0, $s3, 0xFF
/* 395FD0 E0098420 00451025 */  or        $v0, $v0, $a1
/* 395FD4 E0098424 ACC20004 */  sw        $v0, 0x4($a2)
/* 395FD8 E0098428 240200FF */  addiu     $v0, $zero, 0xFF
/* 395FDC E009842C 12620005 */  beq       $s3, $v0, .LE0098444
/* 395FE0 E0098430 3C04E200 */   lui      $a0, (0xE200001C >> 16)
/* 395FE4 E0098434 3484001C */  ori       $a0, $a0, (0xE200001C & 0xFFFF)
/* 395FE8 E0098438 3C030050 */  lui       $v1, (0x5049D8 >> 16)
/* 395FEC E009843C 08026114 */  j         .LE0098450
/* 395FF0 E0098440 346349D8 */   ori      $v1, $v1, (0x5049D8 & 0xFFFF)
.LE0098444:
/* 395FF4 E0098444 3484001C */  ori       $a0, $a0, (0xE200001C & 0xFFFF)
/* 395FF8 E0098448 3C030055 */  lui       $v1, (0x552078 >> 16)
/* 395FFC E009844C 34632078 */  ori       $v1, $v1, (0x552078 & 0xFFFF)
.LE0098450:
/* 396000 E0098450 24C20010 */  addiu     $v0, $a2, 0x10
/* 396004 E0098454 AEA20000 */  sw        $v0, 0x0($s5)
/* 396008 E0098458 ACC40008 */  sw        $a0, 0x8($a2)
/* 39600C E009845C ACC3000C */  sw        $v1, 0xC($a2)
/* 396010 E0098460 3C07D838 */  lui       $a3, (0xD8380002 >> 16)
/* 396014 E0098464 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 396018 E0098468 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 39601C E009846C 34E70002 */  ori       $a3, $a3, (0xD8380002 & 0xFFFF)
/* 396020 E0098470 3C06DE00 */  lui       $a2, (0xDE000000 >> 16)
/* 396024 E0098474 8CA40000 */  lw        $a0, 0x0($a1)
/* 396028 E0098478 3C020900 */  lui       $v0, %hi(D_09000450_4154B0)
/* 39602C E009847C 24420450 */  addiu     $v0, $v0, %lo(D_09000450_4154B0)
/* 396030 E0098480 0080182D */  daddu     $v1, $a0, $zero
/* 396034 E0098484 24840008 */  addiu     $a0, $a0, 0x8
/* 396038 E0098488 ACA40000 */  sw        $a0, 0x0($a1)
/* 39603C E009848C AC620004 */  sw        $v0, 0x4($v1)
/* 396040 E0098490 24820008 */  addiu     $v0, $a0, 0x8
/* 396044 E0098494 AC660000 */  sw        $a2, 0x0($v1)
/* 396048 E0098498 ACA20000 */  sw        $v0, 0x0($a1)
/* 39604C E009849C AC860000 */  sw        $a2, 0x0($a0)
/* 396050 E00984A0 8E820000 */  lw        $v0, 0x0($s4)
/* 396054 E00984A4 24830010 */  addiu     $v1, $a0, 0x10
/* 396058 E00984A8 ACA30000 */  sw        $v1, 0x0($a1)
/* 39605C E00984AC 00021080 */  sll       $v0, $v0, 2
/* 396060 E00984B0 3C03E00A */  lui       $v1, (0xE00A0000 >> 16)
/* 396064 E00984B4 00621821 */  addu      $v1, $v1, $v0
/* 396068 E00984B8 8C638510 */  lw        $v1, -0x7AF0($v1)
/* 39606C E00984BC 24820018 */  addiu     $v0, $a0, 0x18
/* 396070 E00984C0 ACA20000 */  sw        $v0, 0x0($a1)
/* 396074 E00984C4 24020040 */  addiu     $v0, $zero, 0x40
/* 396078 E00984C8 AC82000C */  sw        $v0, 0xC($a0)
/* 39607C E00984CC 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 396080 E00984D0 AC870008 */  sw        $a3, 0x8($a0)
/* 396084 E00984D4 AC820010 */  sw        $v0, 0x10($a0)
/* 396088 E00984D8 AC800014 */  sw        $zero, 0x14($a0)
/* 39608C E00984DC AC830004 */  sw        $v1, 0x4($a0)
/* 396090 E00984E0 8FBF0078 */  lw        $ra, 0x78($sp)
/* 396094 E00984E4 8FB50074 */  lw        $s5, 0x74($sp)
/* 396098 E00984E8 8FB40070 */  lw        $s4, 0x70($sp)
/* 39609C E00984EC 8FB3006C */  lw        $s3, 0x6C($sp)
/* 3960A0 E00984F0 8FB20068 */  lw        $s2, 0x68($sp)
/* 3960A4 E00984F4 8FB10064 */  lw        $s1, 0x64($sp)
/* 3960A8 E00984F8 8FB00060 */  lw        $s0, 0x60($sp)
/* 3960AC E00984FC 03E00008 */  jr        $ra
/* 3960B0 E0098500 27BD0080 */   addiu    $sp, $sp, 0x80
/* 3960B4 E0098504 00000000 */  nop
/* 3960B8 E0098508 00000000 */  nop
/* 3960BC E009850C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void floating_rock_appendGfx(void* effect) {
    FloatingRockFXData* data = ((EffectInstance*)effect)->data.floatingRock;
    s32 alpha = data->alpha;
    Matrix4f mtxTransform;

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

    shim_guPositionF(mtxTransform, data->rot.x, data->rot.z, data->rot.y, data->scale, data->pos.x, data->pos.y, data->pos.z);
    shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gDPSetPrimColor(gMainGfxPos++, 0, 0, 215, 215, 110, alpha);

    if (alpha != 255) {
        gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2);
    } else {
        gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
    }

    gSPDisplayList(gMainGfxPos++, D_09000450_396540);
    gSPDisplayList(gMainGfxPos++, D_E0098510[data->type]);
    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel whirlwind_main
/* 3D2AC0 E00CE000 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 3D2AC4 E00CE004 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 3D2AC8 E00CE008 4485E000 */  mtc1      $a1, $f28
/* 3D2ACC E00CE00C AFB20030 */  sw        $s2, 0x30($sp)
/* 3D2AD0 E00CE010 0080902D */  daddu     $s2, $a0, $zero
/* 3D2AD4 E00CE014 F7BE0068 */  sdc1      $f30, 0x68($sp)
/* 3D2AD8 E00CE018 4486F000 */  mtc1      $a2, $f30
/* 3D2ADC E00CE01C 27A40010 */  addiu     $a0, $sp, 0x10
/* 3D2AE0 E00CE020 AFB00028 */  sw        $s0, 0x28($sp)
/* 3D2AE4 E00CE024 8FB00084 */  lw        $s0, 0x84($sp)
/* 3D2AE8 E00CE028 3C02E00D */  lui       $v0, %hi(whirlwind_init)
/* 3D2AEC E00CE02C 2442E21C */  addiu     $v0, $v0, %lo(whirlwind_init)
/* 3D2AF0 E00CE030 AFA20018 */  sw        $v0, 0x18($sp)
/* 3D2AF4 E00CE034 3C02E00D */  lui       $v0, %hi(whirlwind_update)
/* 3D2AF8 E00CE038 2442E224 */  addiu     $v0, $v0, %lo(whirlwind_update)
/* 3D2AFC E00CE03C AFA2001C */  sw        $v0, 0x1C($sp)
/* 3D2B00 E00CE040 3C02E00D */  lui       $v0, %hi(whirlwind_render)
/* 3D2B04 E00CE044 2442E428 */  addiu     $v0, $v0, %lo(whirlwind_render)
/* 3D2B08 E00CE048 AFA20020 */  sw        $v0, 0x20($sp)
/* 3D2B0C E00CE04C 24020067 */  addiu     $v0, $zero, 0x67
/* 3D2B10 E00CE050 AFBF0038 */  sw        $ra, 0x38($sp)
/* 3D2B14 E00CE054 AFB30034 */  sw        $s3, 0x34($sp)
/* 3D2B18 E00CE058 AFB1002C */  sw        $s1, 0x2C($sp)
/* 3D2B1C E00CE05C F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 3D2B20 E00CE060 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 3D2B24 E00CE064 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 3D2B28 E00CE068 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 3D2B2C E00CE06C AFA7007C */  sw        $a3, 0x7C($sp)
/* 3D2B30 E00CE070 AFA00010 */  sw        $zero, 0x10($sp)
/* 3D2B34 E00CE074 AFA00024 */  sw        $zero, 0x24($sp)
/* 3D2B38 E00CE078 0C080124 */  jal       shim_create_effect_instance
/* 3D2B3C E00CE07C AFA20014 */   sw       $v0, 0x14($sp)
/* 3D2B40 E00CE080 24040144 */  addiu     $a0, $zero, 0x144
/* 3D2B44 E00CE084 24030001 */  addiu     $v1, $zero, 0x1
/* 3D2B48 E00CE088 0040982D */  daddu     $s3, $v0, $zero
/* 3D2B4C E00CE08C 0C08012C */  jal       shim_general_heap_malloc
/* 3D2B50 E00CE090 AE630008 */   sw       $v1, 0x8($s3)
/* 3D2B54 E00CE094 0040882D */  daddu     $s1, $v0, $zero
/* 3D2B58 E00CE098 16200003 */  bnez      $s1, .LE00CE0A8
/* 3D2B5C E00CE09C AE62000C */   sw       $v0, 0xC($s3)
.LE00CE0A0:
/* 3D2B60 E00CE0A0 08033828 */  j         .LE00CE0A0
/* 3D2B64 E00CE0A4 00000000 */   nop
.LE00CE0A8:
/* 3D2B68 E00CE0A8 AE320000 */  sw        $s2, 0x0($s1)
/* 3D2B6C E00CE0AC 1E000004 */  bgtz      $s0, .LE00CE0C0
/* 3D2B70 E00CE0B0 AE200014 */   sw       $zero, 0x14($s1)
/* 3D2B74 E00CE0B4 240203E8 */  addiu     $v0, $zero, 0x3E8
/* 3D2B78 E00CE0B8 08033831 */  j         .LE00CE0C4
/* 3D2B7C E00CE0BC AE220010 */   sw       $v0, 0x10($s1)
.LE00CE0C0:
/* 3D2B80 E00CE0C0 AE300010 */  sw        $s0, 0x10($s1)
.LE00CE0C4:
/* 3D2B84 E00CE0C4 3C01E00D */  lui       $at, (0xE00D0000 >> 16)
/* 3D2B88 E00CE0C8 D43AEE50 */  ldc1      $f26, -0x11B0($at)
/* 3D2B8C E00CE0CC 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 3D2B90 E00CE0D0 4481C800 */  mtc1      $at, $f25
/* 3D2B94 E00CE0D4 4480C000 */  mtc1      $zero, $f24
/* 3D2B98 E00CE0D8 3C01E00D */  lui       $at, (0xE00D0000 >> 16)
/* 3D2B9C E00CE0DC D434EE58 */  ldc1      $f20, -0x11A8($at)
/* 3D2BA0 E00CE0E0 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 3D2BA4 E00CE0E4 4481B800 */  mtc1      $at, $f23
/* 3D2BA8 E00CE0E8 4480B000 */  mtc1      $zero, $f22
/* 3D2BAC E00CE0EC 0000902D */  daddu     $s2, $zero, $zero
/* 3D2BB0 E00CE0F0 AE200024 */  sw        $zero, 0x24($s1)
/* 3D2BB4 E00CE0F4 E63C0004 */  swc1      $f28, 0x4($s1)
/* 3D2BB8 E00CE0F8 E63E0008 */  swc1      $f30, 0x8($s1)
/* 3D2BBC E00CE0FC C7A2007C */  lwc1      $f2, 0x7C($sp)
/* 3D2BC0 E00CE100 0220802D */  daddu     $s0, $s1, $zero
/* 3D2BC4 E00CE104 E622000C */  swc1      $f2, 0xC($s1)
/* 3D2BC8 E00CE108 C7A00080 */  lwc1      $f0, 0x80($sp)
/* 3D2BCC E00CE10C 240200FF */  addiu     $v0, $zero, 0xFF
/* 3D2BD0 E00CE110 AE220018 */  sw        $v0, 0x18($s1)
/* 3D2BD4 E00CE114 AE22001C */  sw        $v0, 0x1C($s1)
/* 3D2BD8 E00CE118 AE220020 */  sw        $v0, 0x20($s1)
/* 3D2BDC E00CE11C AE220028 */  sw        $v0, 0x28($s1)
/* 3D2BE0 E00CE120 AE22002C */  sw        $v0, 0x2C($s1)
/* 3D2BE4 E00CE124 240200EB */  addiu     $v0, $zero, 0xEB
/* 3D2BE8 E00CE128 AE220030 */  sw        $v0, 0x30($s1)
/* 3D2BEC E00CE12C E6200034 */  swc1      $f0, 0x34($s1)
.LE00CE130:
/* 3D2BF0 E00CE130 44920000 */  mtc1      $s2, $f0
/* 3D2BF4 E00CE134 00000000 */  nop
/* 3D2BF8 E00CE138 46800021 */  cvt.d.w   $f0, $f0
/* 3D2BFC E00CE13C 463A0002 */  mul.d     $f0, $f0, $f26
/* 3D2C00 E00CE140 00000000 */  nop
/* 3D2C04 E00CE144 E61C0038 */  swc1      $f28, 0x38($s0)
/* 3D2C08 E00CE148 E61E0058 */  swc1      $f30, 0x58($s0)
/* 3D2C0C E00CE14C C7A2007C */  lwc1      $f2, 0x7C($sp)
/* 3D2C10 E00CE150 46380000 */  add.d     $f0, $f0, $f24
/* 3D2C14 E00CE154 24040168 */  addiu     $a0, $zero, 0x168
/* 3D2C18 E00CE158 E6020078 */  swc1      $f2, 0x78($s0)
/* 3D2C1C E00CE15C 46200020 */  cvt.s.d   $f0, $f0
/* 3D2C20 E00CE160 0C080138 */  jal       shim_rand_int
/* 3D2C24 E00CE164 E6000098 */   swc1     $f0, 0x98($s0)
/* 3D2C28 E00CE168 24040064 */  addiu     $a0, $zero, 0x64
/* 3D2C2C E00CE16C 44820000 */  mtc1      $v0, $f0
/* 3D2C30 E00CE170 00000000 */  nop
/* 3D2C34 E00CE174 46800020 */  cvt.s.w   $f0, $f0
/* 3D2C38 E00CE178 0C080138 */  jal       shim_rand_int
/* 3D2C3C E00CE17C E60000B8 */   swc1     $f0, 0xB8($s0)
/* 3D2C40 E00CE180 44820000 */  mtc1      $v0, $f0
/* 3D2C44 E00CE184 00000000 */  nop
/* 3D2C48 E00CE188 46800021 */  cvt.d.w   $f0, $f0
/* 3D2C4C E00CE18C 46340002 */  mul.d     $f0, $f0, $f20
/* 3D2C50 E00CE190 00000000 */  nop
/* 3D2C54 E00CE194 46360000 */  add.d     $f0, $f0, $f22
/* 3D2C58 E00CE198 2404001E */  addiu     $a0, $zero, 0x1E
/* 3D2C5C E00CE19C 46200020 */  cvt.s.d   $f0, $f0
/* 3D2C60 E00CE1A0 0C080138 */  jal       shim_rand_int
/* 3D2C64 E00CE1A4 E60000D8 */   swc1     $f0, 0xD8($s0)
/* 3D2C68 E00CE1A8 44820000 */  mtc1      $v0, $f0
/* 3D2C6C E00CE1AC 00000000 */  nop
/* 3D2C70 E00CE1B0 46800021 */  cvt.d.w   $f0, $f0
/* 3D2C74 E00CE1B4 46340002 */  mul.d     $f0, $f0, $f20
/* 3D2C78 E00CE1B8 00000000 */  nop
/* 3D2C7C E00CE1BC 26520001 */  addiu     $s2, $s2, 0x1
/* 3D2C80 E00CE1C0 2A420008 */  slti      $v0, $s2, 0x8
/* 3D2C84 E00CE1C4 AE000118 */  sw        $zero, 0x118($s0)
/* 3D2C88 E00CE1C8 46200020 */  cvt.s.d   $f0, $f0
/* 3D2C8C E00CE1CC E60000F8 */  swc1      $f0, 0xF8($s0)
/* 3D2C90 E00CE1D0 1440FFD7 */  bnez      $v0, .LE00CE130
/* 3D2C94 E00CE1D4 26100004 */   addiu    $s0, $s0, 0x4
/* 3D2C98 E00CE1D8 0260102D */  daddu     $v0, $s3, $zero
/* 3D2C9C E00CE1DC AE200138 */  sw        $zero, 0x138($s1)
/* 3D2CA0 E00CE1E0 AE20013C */  sw        $zero, 0x13C($s1)
/* 3D2CA4 E00CE1E4 AE200140 */  sw        $zero, 0x140($s1)
/* 3D2CA8 E00CE1E8 8FBF0038 */  lw        $ra, 0x38($sp)
/* 3D2CAC E00CE1EC 8FB30034 */  lw        $s3, 0x34($sp)
/* 3D2CB0 E00CE1F0 8FB20030 */  lw        $s2, 0x30($sp)
/* 3D2CB4 E00CE1F4 8FB1002C */  lw        $s1, 0x2C($sp)
/* 3D2CB8 E00CE1F8 8FB00028 */  lw        $s0, 0x28($sp)
/* 3D2CBC E00CE1FC D7BE0068 */  ldc1      $f30, 0x68($sp)
/* 3D2CC0 E00CE200 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 3D2CC4 E00CE204 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 3D2CC8 E00CE208 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 3D2CCC E00CE20C D7B60048 */  ldc1      $f22, 0x48($sp)
/* 3D2CD0 E00CE210 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 3D2CD4 E00CE214 03E00008 */  jr        $ra
/* 3D2CD8 E00CE218 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

EffectInstance* whirlwind_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance *effect;
    WhirlwindFXData* part;
    s32 numParts;
    s32 i;

    bp.init = whirlwind_init;
    bp.update = whirlwind_update;
    bp.renderWorld = whirlwind_render;
    bp.unk_00 = 0;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_WHIRLWIND;

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

    part->unk_00 = arg0;
    part->unk_14 = 0;
    if (arg5 <= 0) {
        part->unk_10 = 1000;
    } else {
        part->unk_10 = arg5;
    }
    part->primAlpha = 0;
    part->pos.x = arg1;
    part->pos.y = arg2;
    part->pos.z = arg3;
    part->unk_34 = arg4;

    part->primR = 255;
    part->primG = 255;
    part->primB = 255;

    part->envR = 255;
    part->envG = 255;
    part->envB = 235;

    for(i = 0; i < MAX_WHIRLWIND_SEGMENTS; i++) {
        part->unk_38[i] = arg1;
        part->unk_58[i] = arg2;
        part->unk_78[i] = arg3;
        part->unk_98[i] = i * 0.2 + 1.0;
        part->unk_B8[i] = shim_rand_int(360);
        part->unk_D8[i] = shim_rand_int(100) * 0.1 + 2.0;
        part->unk_F8[i] = shim_rand_int(30) * 0.1;
        part->unk_118[i] = 0;
    }
    part->unk_138 = 0;
    part->unk_13C = 0;
    part->unk_140 = 0;

    return effect;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel sfx_compute_spatialized_sound_params_0
/* E0658 80149F58 44860000 */  mtc1      $a2, $f0
/* E065C 80149F5C 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* E0660 80149F60 AFB00030 */  sw        $s0, 0x30($sp)
/* E0664 80149F64 00E0802D */  daddu     $s0, $a3, $zero
/* E0668 80149F68 AFB10034 */  sw        $s1, 0x34($sp)
/* E066C 80149F6C 8FB10058 */  lw        $s1, 0x58($sp)
/* E0670 80149F70 3C048007 */  lui       $a0, %hi(gCurrentCameraID)
/* E0674 80149F74 8C847410 */  lw        $a0, %lo(gCurrentCameraID)($a0)
/* E0678 80149F78 44056000 */  mfc1      $a1, $f12
/* E067C 80149F7C 44067000 */  mfc1      $a2, $f14
/* E0680 80149F80 27A20020 */  addiu     $v0, $sp, 0x20
/* E0684 80149F84 AFA20010 */  sw        $v0, 0x10($sp)
/* E0688 80149F88 27A20024 */  addiu     $v0, $sp, 0x24
/* E068C 80149F8C AFA20014 */  sw        $v0, 0x14($sp)
/* E0690 80149F90 44070000 */  mfc1      $a3, $f0
/* E0694 80149F94 27A20028 */  addiu     $v0, $sp, 0x28
/* E0698 80149F98 AFBF0038 */  sw        $ra, 0x38($sp)
/* E069C 80149F9C F7B40040 */  sdc1      $f20, 0x40($sp)
/* E06A0 80149FA0 0C00B94E */  jal       get_screen_coords
/* E06A4 80149FA4 AFA20018 */   sw       $v0, 0x18($sp)
/* E06A8 80149FA8 8FA20020 */  lw        $v0, 0x20($sp)
/* E06AC 80149FAC 24420BB8 */  addiu     $v0, $v0, 0xBB8
/* E06B0 80149FB0 2C421771 */  sltiu     $v0, $v0, 0x1771
/* E06B4 80149FB4 10400008 */  beqz      $v0, .L80149FD8
/* E06B8 80149FB8 24020001 */   addiu    $v0, $zero, 0x1
/* E06BC 80149FBC 8FA30024 */  lw        $v1, 0x24($sp)
/* E06C0 80149FC0 28620BB9 */  slti      $v0, $v1, 0xBB9
/* E06C4 80149FC4 10400003 */  beqz      $v0, .L80149FD4
/* E06C8 80149FC8 2862F448 */   slti     $v0, $v1, -0xBB8
/* E06CC 80149FCC 10400005 */  beqz      $v0, .L80149FE4
/* E06D0 80149FD0 2402007F */   addiu    $v0, $zero, 0x7F
.L80149FD4:
/* E06D4 80149FD4 24020001 */  addiu     $v0, $zero, 0x1
.L80149FD8:
/* E06D8 80149FD8 A6020000 */  sh        $v0, 0x0($s0)
/* E06DC 80149FDC 08052867 */  j         .L8014A19C
/* E06E0 80149FE0 A6200000 */   sh       $zero, 0x0($s1)
.L80149FE4:
/* E06E4 80149FE4 A6020000 */  sh        $v0, 0x0($s0)
/* E06E8 80149FE8 8FA20020 */  lw        $v0, 0x20($sp)
/* E06EC 80149FEC 04410012 */  bgez      $v0, .L8014A038
/* E06F0 80149FF0 00000000 */   nop
/* E06F4 80149FF4 3C013E99 */  lui       $at, (0x3E99999A >> 16)
/* E06F8 80149FF8 3421999A */  ori       $at, $at, (0x3E99999A & 0xFFFF)
/* E06FC 80149FFC 44811000 */  mtc1      $at, $f2
/* E0700 8014A000 44820000 */  mtc1      $v0, $f0
/* E0704 8014A004 00000000 */  nop
/* E0708 8014A008 46800020 */  cvt.s.w   $f0, $f0
/* E070C 8014A00C 46020002 */  mul.s     $f0, $f0, $f2
/* E0710 8014A010 00000000 */  nop
/* E0714 8014A014 3C0142FE */  lui       $at, (0x42FE0000 >> 16)
/* E0718 8014A018 44811000 */  mtc1      $at, $f2
/* E071C 8014A01C 00000000 */  nop
/* E0720 8014A020 46020000 */  add.s     $f0, $f0, $f2
/* E0724 8014A024 4600010D */  trunc.w.s $f4, $f0
/* E0728 8014A028 44022000 */  mfc1      $v0, $f4
/* E072C 8014A02C 00000000 */  nop
/* E0730 8014A030 A6020000 */  sh        $v0, 0x0($s0)
/* E0734 8014A034 AFA00020 */  sw        $zero, 0x20($sp)
.L8014A038:
/* E0738 8014A038 8FA30020 */  lw        $v1, 0x20($sp)
/* E073C 8014A03C 28620141 */  slti      $v0, $v1, 0x141
/* E0740 8014A040 14400013 */  bnez      $v0, .L8014A090
/* E0744 8014A044 2462FEC0 */   addiu    $v0, $v1, -0x140
/* E0748 8014A048 3C013E99 */  lui       $at, (0x3E99999A >> 16)
/* E074C 8014A04C 3421999A */  ori       $at, $at, (0x3E99999A & 0xFFFF)
/* E0750 8014A050 44810000 */  mtc1      $at, $f0
/* E0754 8014A054 44821000 */  mtc1      $v0, $f2
/* E0758 8014A058 00000000 */  nop
/* E075C 8014A05C 468010A0 */  cvt.s.w   $f2, $f2
/* E0760 8014A060 46001082 */  mul.s     $f2, $f2, $f0
/* E0764 8014A064 00000000 */  nop
/* E0768 8014A068 3C0142FE */  lui       $at, (0x42FE0000 >> 16)
/* E076C 8014A06C 44810000 */  mtc1      $at, $f0
/* E0770 8014A070 00000000 */  nop
/* E0774 8014A074 46020001 */  sub.s     $f0, $f0, $f2
/* E0778 8014A078 4600010D */  trunc.w.s $f4, $f0
/* E077C 8014A07C 44022000 */  mfc1      $v0, $f4
/* E0780 8014A080 00000000 */  nop
/* E0784 8014A084 A6020000 */  sh        $v0, 0x0($s0)
/* E0788 8014A088 24020140 */  addiu     $v0, $zero, 0x140
/* E078C 8014A08C AFA20020 */  sw        $v0, 0x20($sp)
.L8014A090:
/* E0790 8014A090 86020000 */  lh        $v0, 0x0($s0)
/* E0794 8014A094 1C400002 */  bgtz      $v0, .L8014A0A0
/* E0798 8014A098 24020001 */   addiu    $v0, $zero, 0x1
/* E079C 8014A09C A6020000 */  sh        $v0, 0x0($s0)
.L8014A0A0:
/* E07A0 8014A0A0 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* E07A4 8014A0A4 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* E07A8 8014A0A8 80420070 */  lb        $v0, 0x70($v0)
/* E07AC 8014A0AC 14400010 */  bnez      $v0, .L8014A0F0
/* E07B0 8014A0B0 00000000 */   nop
/* E07B4 8014A0B4 3C013E4C */  lui       $at, (0x3E4CCCCD >> 16)
/* E07B8 8014A0B8 3421CCCD */  ori       $at, $at, (0x3E4CCCCD & 0xFFFF)
/* E07BC 8014A0BC 44811000 */  mtc1      $at, $f2
/* E07C0 8014A0C0 C7A00020 */  lwc1      $f0, 0x20($sp)
/* E07C4 8014A0C4 46800020 */  cvt.s.w   $f0, $f0
/* E07C8 8014A0C8 46020002 */  mul.s     $f0, $f0, $f2
/* E07CC 8014A0CC 00000000 */  nop
/* E07D0 8014A0D0 3C014200 */  lui       $at, (0x42000000 >> 16)
/* E07D4 8014A0D4 44811000 */  mtc1      $at, $f2
/* E07D8 8014A0D8 00000000 */  nop
/* E07DC 8014A0DC 46020000 */  add.s     $f0, $f0, $f2
/* E07E0 8014A0E0 4600010D */  trunc.w.s $f4, $f0
/* E07E4 8014A0E4 44022000 */  mfc1      $v0, $f4
/* E07E8 8014A0E8 08052867 */  j         .L8014A19C
/* E07EC 8014A0EC A6220000 */   sh       $v0, 0x0($s1)
.L8014A0F0:
/* E07F0 8014A0F0 3C018015 */  lui       $at, %hi(D_80151270)
/* E07F4 8014A0F4 D4201270 */  ldc1      $f0, %lo(D_80151270)($at)
/* E07F8 8014A0F8 C7B40020 */  lwc1      $f20, 0x20($sp)
/* E07FC 8014A0FC 4680A521 */  cvt.d.w   $f20, $f20
/* E0800 8014A100 4620A502 */  mul.d     $f20, $f20, $f0
/* E0804 8014A104 00000000 */  nop
/* E0808 8014A108 3C014074 */  lui       $at, (0x40740000 >> 16)
/* E080C 8014A10C 44810800 */  mtc1      $at, $f1
/* E0810 8014A110 44800000 */  mtc1      $zero, $f0
/* E0814 8014A114 3C014050 */  lui       $at, (0x40500000 >> 16)
/* E0818 8014A118 44811800 */  mtc1      $at, $f3
/* E081C 8014A11C 44801000 */  mtc1      $zero, $f2
/* E0820 8014A120 4620A503 */  div.d     $f20, $f20, $f0
/* E0824 8014A124 4622A501 */  sub.d     $f20, $f20, $f2
/* E0828 8014A128 3C018015 */  lui       $at, %hi(D_80151278)
/* E082C 8014A12C D4201278 */  ldc1      $f0, %lo(D_80151278)($at)
/* E0830 8014A130 4620A520 */  cvt.s.d   $f20, $f20
/* E0834 8014A134 4600A321 */  cvt.d.s   $f12, $f20
/* E0838 8014A138 46206305 */  abs.d     $f12, $f12
/* E083C 8014A13C 46206302 */  mul.d     $f12, $f12, $f0
/* E0840 8014A140 00000000 */  nop
/* E0844 8014A144 3C013F90 */  lui       $at, (0x3F900000 >> 16)
/* E0848 8014A148 44810800 */  mtc1      $at, $f1
/* E084C 8014A14C 44800000 */  mtc1      $zero, $f0
/* E0850 8014A150 00000000 */  nop
/* E0854 8014A154 46206302 */  mul.d     $f12, $f12, $f0
/* E0858 8014A158 00000000 */  nop
/* E085C 8014A15C 3C018015 */  lui       $at, %hi(D_80151280)
/* E0860 8014A160 D4201280 */  ldc1      $f0, %lo(D_80151280)($at)
/* E0864 8014A164 46206302 */  mul.d     $f12, $f12, $f0
/* E0868 8014A168 00000000 */  nop
/* E086C 8014A16C 3C018015 */  lui       $at, %hi(D_80151288)
/* E0870 8014A170 D4201288 */  ldc1      $f0, %lo(D_80151288)($at)
/* E0874 8014A174 46206303 */  div.d     $f12, $f12, $f0
/* E0878 8014A178 0C00A85B */  jal       sin_rad
/* E087C 8014A17C 46206320 */   cvt.s.d  $f12, $f12
/* E0880 8014A180 4600A502 */  mul.s     $f20, $f20, $f0
/* E0884 8014A184 00000000 */  nop
/* E0888 8014A188 4600A10D */  trunc.w.s $f4, $f20
/* E088C 8014A18C 44022000 */  mfc1      $v0, $f4
/* E0890 8014A190 00000000 */  nop
/* E0894 8014A194 24420040 */  addiu     $v0, $v0, 0x40
/* E0898 8014A198 A6220000 */  sh        $v0, 0x0($s1)
.L8014A19C:
/* E089C 8014A19C 8FBF0038 */  lw        $ra, 0x38($sp)
/* E08A0 8014A1A0 8FB10034 */  lw        $s1, 0x34($sp)
/* E08A4 8014A1A4 8FB00030 */  lw        $s0, 0x30($sp)
/* E08A8 8014A1A8 D7B40040 */  ldc1      $f20, 0x40($sp)
/* E08AC 8014A1AC 03E00008 */  jr        $ra
/* E08B0 8014A1B0 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan) {
    s32 screenX, screenY, screenZ;

    get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);

    if (screenX > 3000 || screenX < -3000 || screenY > 3000 || screenY < -3000) {
        *volume = 1;
        *pan = 0;
        return;
    }

    *volume = 127;
    if (screenX < 0) {
        *volume = (screenX * 0.3f) + 127.0f;
        screenX = 0;
    }
    if (screenX > SCREEN_WIDTH) {
        *volume = 127.0f - ((screenX - SCREEN_WIDTH) * 0.3f);
        screenX = SCREEN_WIDTH;
    }

    if (*volume < 1) {
        *volume = 1;
    }

    if (!gGameStatusPtr->isBattle) {
        // 25/75 at screen edge
        *pan = (screenX * 0.2f) + 32.0f;
    } else {
        f32 temp_f20 = ((screenX * 127.0) / SCREEN_WIDTH) - 64.0;
        *pan = (s32) (temp_f20 * sin_rad(DEG_TO_RAD(fabs(temp_f20) * 90.0 / 64.0))) + 64;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80240B4C
/* B2108C 80240B4C 27BDFFB0 */  addiu     $sp, $sp, -0x50
D_80240B50:
/* B21090 80240B50 AFB20018 */  sw        $s2, 0x18($sp)
glabel func_80240B54
/* B21094 80240B54 0080902D */  daddu     $s2, $a0, $zero
.L80240B58:
/* B21098 80240B58 AFBF0028 */  sw        $ra, 0x28($sp)
glabel func_80240B5C
/* B2109C 80240B5C AFB50024 */  sw        $s5, 0x24($sp)
glabel func_80240B60
/* B210A0 80240B60 AFB40020 */  sw        $s4, 0x20($sp)
glabel func_80240B64
/* B210A4 80240B64 AFB3001C */  sw        $s3, 0x1C($sp)
glabel func_80240B68
/* B210A8 80240B68 AFB10014 */  sw        $s1, 0x14($sp)
.L80240B6C:
/* B210AC 80240B6C AFB00010 */  sw        $s0, 0x10($sp)
glabel func_80240B70
/* B210B0 80240B70 F7BA0048 */  sdc1      $f26, 0x48($sp)
D_80240B74:
/* B210B4 80240B74 F7B80040 */  sdc1      $f24, 0x40($sp)
glabel func_80240B78
/* B210B8 80240B78 F7B60038 */  sdc1      $f22, 0x38($sp)
glabel func_80240B7C
/* B210BC 80240B7C F7B40030 */  sdc1      $f20, 0x30($sp)
glabel .L80240B80
/* B210C0 80240B80 8E50000C */  lw        $s0, 0xC($s2)
glabel func_80240B84
/* B210C4 80240B84 4480A000 */  mtc1      $zero, $f20
D_80240B88:
/* B210C8 80240B88 8E050000 */  lw        $a1, 0x0($s0)
glabel func_80240B8C
/* B210CC 80240B8C 26100004 */  addiu     $s0, $s0, 0x4
glabel func_80240B90
/* B210D0 80240B90 4600A686 */  mov.s     $f26, $f20
glabel func_80240B94
/* B210D4 80240B94 0C0B1EAF */  jal       evt_get_variable
glabel arn_08_pad_B98
/* B210D8 80240B98 4600A606 */   mov.s    $f24, $f20
glabel func_80240B9C
/* B210DC 80240B9C 8E130000 */  lw        $s3, 0x0($s0)
glabel func_80240BA0
/* B210E0 80240BA0 26100004 */  addiu     $s0, $s0, 0x4
D_80240BA4:
/* B210E4 80240BA4 0000202D */  daddu     $a0, $zero, $zero
glabel func_80240BA8
/* B210E8 80240BA8 8E140000 */  lw        $s4, 0x0($s0)
glabel omo_11_SuperBlock_SwitchToPartner
/* B210EC 80240BAC 8E150004 */  lw        $s5, 0x4($s0)
glabel mgm_02_RunMinigame
/* B210F0 80240BB0 0C00EAD2 */  jal       get_npc_safe
glabel func_80240BB4
/* B210F4 80240BB4 0040882D */   daddu    $s1, $v0, $zero
glabel dead_flo_09_FlyingAI_Loiter
/* B210F8 80240BB8 0040802D */  daddu     $s0, $v0, $zero
glabel func_80240BBC
/* B210FC 80240BBC 24020001 */  addiu     $v0, $zero, 0x1
glabel func_80240BC0
/* B21100 80240BC0 1222000F */  beq       $s1, $v0, func_80240C00
glabel func_80240BC4
/* B21104 80240BC4 2A220002 */   slti     $v0, $s1, 0x2
glabel func_80240BC8
/* B21108 80240BC8 10400005 */  beqz      $v0, func_80240BE0
D_80240BCC:
/* B2110C 80240BCC 24020002 */   addiu    $v0, $zero, 0x2
glabel func_80240BD0
/* B21110 80240BD0 12200007 */  beqz      $s1, D_80240BF0
glabel func_80240BD4
/* B21114 80240BD4 00000000 */   nop
glabel func_80240BD8
/* B21118 80240BD8 08090308 */  j         D_80240C20
arn_10_pad_BDC:
/* B2111C 80240BDC 00000000 */   nop
glabel func_80240BE0
/* B21120 80240BE0 1222000B */  beq       $s1, $v0, func_80240C10
D_80240BE4:
/* B21124 80240BE4 00000000 */   nop
glabel func_80240BE8
/* B21128 80240BE8 08090308 */  j         D_80240C20
glabel func_80240BEC
/* B2112C 80240BEC 00000000 */   nop
D_80240BF0:
/* B21130 80240BF0 3C014302 */  lui       $at, (0x43020000 >> 16)
glabel mgm_01_EndPanelAnimation
/* B21134 80240BF4 4481B000 */  mtc1      $at, $f22
D_80240BF8:
/* B21138 80240BF8 0809030B */  j         func_80240C2C
glabel func_80240BFC
/* B2113C 80240BFC 2A220004 */   slti     $v0, $s1, 0x4
glabel func_80240C00
/* B21140 80240C00 3C014320 */  lui       $at, (0x43200000 >> 16)
glabel func_80240C04
/* B21144 80240C04 4481B000 */  mtc1      $at, $f22
glabel func_80240C08
/* B21148 80240C08 0809030B */  j         func_80240C2C
glabel func_80240C0C
/* B2114C 80240C0C 2A220004 */   slti     $v0, $s1, 0x4
glabel func_80240C10
/* B21150 80240C10 3C0142C8 */  lui       $at, (0x42C80000 >> 16)
.L80240C14:
/* B21154 80240C14 4481B000 */  mtc1      $at, $f22
glabel func_80240C18
/* B21158 80240C18 0809030B */  j         func_80240C2C
glabel func_80240C1C
/* B2115C 80240C1C 2A220004 */   slti     $v0, $s1, 0x4
D_80240C20:
/* B21160 80240C20 3C0142A0 */  lui       $at, (0x42A00000 >> 16)
D_80240C24:
/* B21164 80240C24 4481B000 */  mtc1      $at, $f22
D_80240C28:
/* B21168 80240C28 2A220004 */  slti      $v0, $s1, 0x4
glabel func_80240C2C
/* B2116C 80240C2C 10400019 */  beqz      $v0, func_80240C94
glabel func_80240C30
/* B21170 80240C30 0240202D */   daddu    $a0, $s2, $zero
glabel func_80240C34
/* B21174 80240C34 C614000C */  lwc1      $f20, 0xC($s0)
glabel omo_04_FlyingAI_Loiter
/* B21178 80240C38 4600A507 */  neg.s     $f20, $f20
.L80240C3C:
/* B2117C 80240C3C 0C00A8BB */  jal       sin_deg
glabel func_80240C40
/* B21180 80240C40 4600A306 */   mov.s    $f12, $f20
glabel func_80240C44
/* B21184 80240C44 46160002 */  mul.s     $f0, $f0, $f22
.L80240C48:
/* B21188 80240C48 00000000 */  nop
glabel dead_11_FlyingAI_JumpInit
/* B2118C 80240C4C C6020038 */  lwc1      $f2, 0x38($s0)
glabel .L80240C50
/* B21190 80240C50 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
glabel mgm_01_UpdateRecords
/* B21194 80240C54 44812000 */  mtc1      $at, $f4
glabel func_80240C58
/* B21198 80240C58 00000000 */  nop
glabel dead_kzn_17_PiranhaPlantAI_00
/* B2119C 80240C5C 46041080 */  add.s     $f2, $f2, $f4
glabel func_80240C60
/* B211A0 80240C60 46001680 */  add.s     $f26, $f2, $f0
glabel kzn_03_MeleeHitbox_31
/* B211A4 80240C64 0C00A8D4 */  jal       cos_deg
glabel func_80240C68
/* B211A8 80240C68 4600A306 */   mov.s    $f12, $f20
glabel sam_07_WanderMeleeAI_Main
/* B211AC 80240C6C 46160002 */  mul.s     $f0, $f0, $f22
glabel func_80240C70
/* B211B0 80240C70 00000000 */  nop
dgb_09_ClubbaNappingAI_LoiterInit:
/* B211B4 80240C74 C604003C */  lwc1      $f4, 0x3C($s0)
glabel func_80240C78
/* B211B8 80240C78 3C014248 */  lui       $at, (0x42480000 >> 16)
glabel func_80240C7C
/* B211BC 80240C7C 44811000 */  mtc1      $at, $f2
glabel func_80240C80
/* B211C0 80240C80 00000000 */  nop
glabel func_80240C84
/* B211C4 80240C84 46022500 */  add.s     $f20, $f4, $f2
glabel func_80240C88
/* B211C8 80240C88 C6020040 */  lwc1      $f2, 0x40($s0)
glabel func_80240C8C
/* B211CC 80240C8C 46001600 */  add.s     $f24, $f2, $f0
glabel arn_02_CleftAI_Main
/* B211D0 80240C90 0240202D */  daddu     $a0, $s2, $zero
glabel func_80240C94
/* B211D4 80240C94 4406D000 */  mfc1      $a2, $f26
.L80240C98:
/* B211D8 80240C98 0C0B2190 */  jal       evt_set_float_variable
glabel omo_07_PatrolAI_JumpInit
/* B211DC 80240C9C 0260282D */   daddu    $a1, $s3, $zero
glabel func_80240CA0
/* B211E0 80240CA0 0240202D */  daddu     $a0, $s2, $zero
glabel .L80240CA4
/* B211E4 80240CA4 4406A000 */  mfc1      $a2, $f20
glabel func_80240CA8
/* B211E8 80240CA8 0C0B2190 */  jal       evt_set_float_variable
glabel func_80240CAC
/* B211EC 80240CAC 0280282D */   daddu    $a1, $s4, $zero
glabel func_80240CB0
/* B211F0 80240CB0 0240202D */  daddu     $a0, $s2, $zero
glabel arn_08_pad_CB4
/* B211F4 80240CB4 4406C000 */  mfc1      $a2, $f24
glabel func_80240CB8
/* B211F8 80240CB8 0C0B2190 */  jal       evt_set_float_variable
D_80240CBC:
/* B211FC 80240CBC 02A0282D */   daddu    $a1, $s5, $zero
glabel dead_flo_14_FlyingAI_Wander
/* B21200 80240CC0 8FBF0028 */  lw        $ra, 0x28($sp)
glabel dead_11_FlyingAI_Jump
/* B21204 80240CC4 8FB50024 */  lw        $s5, 0x24($sp)
glabel func_80240CC8
/* B21208 80240CC8 8FB40020 */  lw        $s4, 0x20($sp)
glabel func_80240CCC
/* B2120C 80240CCC 8FB3001C */  lw        $s3, 0x1C($sp)
glabel func_80240CD0
/* B21210 80240CD0 8FB20018 */  lw        $s2, 0x18($sp)
glabel func_80240CD4
/* B21214 80240CD4 8FB10014 */  lw        $s1, 0x14($sp)
glabel func_80240CD8_EA97B8
/* B21218 80240CD8 8FB00010 */  lw        $s0, 0x10($sp)
glabel func_80240CDC
/* B2121C 80240CDC D7BA0048 */  ldc1      $f26, 0x48($sp)
glabel omo_17_GrooveGuyAI_Main
/* B21220 80240CE0 D7B80040 */  ldc1      $f24, 0x40($sp)
.L80240CE4:
/* B21224 80240CE4 D7B60038 */  ldc1      $f22, 0x38($sp)
glabel func_80240CE8
/* B21228 80240CE8 D7B40030 */  ldc1      $f20, 0x30($sp)
glabel func_80240CEC
/* B2122C 80240CEC 24020002 */  addiu     $v0, $zero, 0x2
D_80240CF0:
/* B21230 80240CF0 03E00008 */  jr        $ra
glabel func_80240CF4
/* B21234 80240CF4 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(func_80240B4C_B2108C) {
    Bytecode* args = script->ptrReadPos;
    s32 temp_s1 = evt_get_variable(script, *args++);
    Npc* npc;
    f32 temp_f20;
    f32 var_f22;
    f32 x, y, z;
    s32 outX, outY, outZ;

    x = 0.0f;
    y = 0.0f;
    z = 0.0f;

    outX = *args++;
    outY = *args++;
    outZ = *args++;
    npc = get_npc_safe(NPC_Whale);

    switch (temp_s1) {
        case 0:
            var_f22 = 130.0f;
            break;
        case 1:
            var_f22 = 160.0f;
            break;
        case 2:
            var_f22 = 100.0f;
            break;
        default:
            var_f22 = 80.0f;
            break;
    }
    if (temp_s1 < 4) {
        temp_f20 = -npc->yaw;
        x = npc->pos.x + 30.0f + sin_deg(temp_f20) * var_f22;
        z = npc->pos.z + cos_deg(temp_f20) * var_f22;
        y = npc->pos.y + 50.0f;
    }
    evt_set_float_variable(script, outX, x);
    evt_set_float_variable(script, outY, y);
    evt_set_float_variable(script, outZ, z);
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel player_raycast_up_corners
/* 77C94 800DE7E4 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 77C98 800DE7E8 F7B40048 */  sdc1      $f20, 0x48($sp)
/* 77C9C 800DE7EC C7B40084 */  lwc1      $f20, 0x84($sp)
/* 77CA0 800DE7F0 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 77CA4 800DE7F4 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 77CA8 800DE7F8 44810000 */  mtc1      $at, $f0
/* 77CAC 800DE7FC AFB60038 */  sw        $s6, 0x38($sp)
/* 77CB0 800DE800 00A0B02D */  daddu     $s6, $a1, $zero
/* 77CB4 800DE804 AFB7003C */  sw        $s7, 0x3C($sp)
/* 77CB8 800DE808 00C0B82D */  daddu     $s7, $a2, $zero
/* 77CBC 800DE80C AFBE0040 */  sw        $fp, 0x40($sp)
/* 77CC0 800DE810 00E0F02D */  daddu     $fp, $a3, $zero
/* 77CC4 800DE814 AFB40030 */  sw        $s4, 0x30($sp)
/* 77CC8 800DE818 2414FFFF */  addiu     $s4, $zero, -0x1
/* 77CCC 800DE81C AFBF0044 */  sw        $ra, 0x44($sp)
/* 77CD0 800DE820 AFB50034 */  sw        $s5, 0x34($sp)
/* 77CD4 800DE824 AFB3002C */  sw        $s3, 0x2C($sp)
/* 77CD8 800DE828 AFB20028 */  sw        $s2, 0x28($sp)
/* 77CDC 800DE82C AFB10024 */  sw        $s1, 0x24($sp)
/* 77CE0 800DE830 AFB00020 */  sw        $s0, 0x20($sp)
/* 77CE4 800DE834 F7BC0068 */  sdc1      $f28, 0x68($sp)
/* 77CE8 800DE838 F7BA0060 */  sdc1      $f26, 0x60($sp)
/* 77CEC 800DE83C F7B80058 */  sdc1      $f24, 0x58($sp)
/* 77CF0 800DE840 F7B60050 */  sdc1      $f22, 0x50($sp)
/* 77CF4 800DE844 848200B2 */  lh        $v0, 0xB2($a0)
/* 77CF8 800DE848 4600A502 */  mul.s     $f20, $f20, $f0
/* 77CFC 800DE84C 00000000 */  nop
/* 77D00 800DE850 3C013E99 */  lui       $at, (0x3E99999A >> 16)
/* 77D04 800DE854 3421999A */  ori       $at, $at, (0x3E99999A & 0xFFFF)
/* 77D08 800DE858 44811000 */  mtc1      $at, $f2
/* 77D0C 800DE85C 8FB50080 */  lw        $s5, 0x80($sp)
/* 77D10 800DE860 4482B000 */  mtc1      $v0, $f22
/* 77D14 800DE864 00000000 */  nop
/* 77D18 800DE868 4680B5A0 */  cvt.s.w   $f22, $f22
/* 77D1C 800DE86C 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 77D20 800DE870 44810000 */  mtc1      $at, $f0
/* 77D24 800DE874 4602B582 */  mul.s     $f22, $f22, $f2
/* 77D28 800DE878 00000000 */  nop
/* 77D2C 800DE87C 4600A503 */  div.s     $f20, $f20, $f0
/* 77D30 800DE880 0C00A85B */  jal       sin_rad
/* 77D34 800DE884 4600A306 */   mov.s    $f12, $f20
/* 77D38 800DE888 4600B702 */  mul.s     $f28, $f22, $f0
/* 77D3C 800DE88C 00000000 */  nop
/* 77D40 800DE890 0C00A874 */  jal       cos_rad
/* 77D44 800DE894 4600A306 */   mov.s    $f12, $f20
/* 77D48 800DE898 27B30010 */  addiu     $s3, $sp, 0x10
/* 77D4C 800DE89C 0260202D */  daddu     $a0, $s3, $zero
/* 77D50 800DE8A0 27B20014 */  addiu     $s2, $sp, 0x14
/* 77D54 800DE8A4 0240282D */  daddu     $a1, $s2, $zero
/* 77D58 800DE8A8 27B10018 */  addiu     $s1, $sp, 0x18
/* 77D5C 800DE8AC 0220302D */  daddu     $a2, $s1, $zero
/* 77D60 800DE8B0 27B0001C */  addiu     $s0, $sp, 0x1C
/* 77D64 800DE8B4 4600B587 */  neg.s     $f22, $f22
/* 77D68 800DE8B8 4600B682 */  mul.s     $f26, $f22, $f0
/* 77D6C 800DE8BC 00000000 */  nop
/* 77D70 800DE8C0 C6D60000 */  lwc1      $f22, 0x0($s6)
/* 77D74 800DE8C4 C6F80000 */  lwc1      $f24, 0x0($s7)
/* 77D78 800DE8C8 C7D40000 */  lwc1      $f20, 0x0($fp)
/* 77D7C 800DE8CC C6A00000 */  lwc1      $f0, 0x0($s5)
/* 77D80 800DE8D0 461CB080 */  add.s     $f2, $f22, $f28
/* 77D84 800DE8D4 0200382D */  daddu     $a3, $s0, $zero
/* 77D88 800DE8D8 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 77D8C 800DE8DC 461AA000 */  add.s     $f0, $f20, $f26
/* 77D90 800DE8E0 E7B80014 */  swc1      $f24, 0x14($sp)
/* 77D94 800DE8E4 E7A20010 */  swc1      $f2, 0x10($sp)
/* 77D98 800DE8E8 0C037A82 */  jal       player_raycast_up_corner
/* 77D9C 800DE8EC E7A00018 */   swc1     $f0, 0x18($sp)
/* 77DA0 800DE8F0 04410022 */  bgez      $v0, .L800DE97C
/* 77DA4 800DE8F4 0260202D */   daddu    $a0, $s3, $zero
/* 77DA8 800DE8F8 0240282D */  daddu     $a1, $s2, $zero
/* 77DAC 800DE8FC 461CB081 */  sub.s     $f2, $f22, $f28
/* 77DB0 800DE900 0220302D */  daddu     $a2, $s1, $zero
/* 77DB4 800DE904 0200382D */  daddu     $a3, $s0, $zero
/* 77DB8 800DE908 461AA001 */  sub.s     $f0, $f20, $f26
/* 77DBC 800DE90C E7B80014 */  swc1      $f24, 0x14($sp)
/* 77DC0 800DE910 E7A20010 */  swc1      $f2, 0x10($sp)
/* 77DC4 800DE914 0C037A82 */  jal       player_raycast_up_corner
/* 77DC8 800DE918 E7A00018 */   swc1     $f0, 0x18($sp)
/* 77DCC 800DE91C 04410017 */  bgez      $v0, .L800DE97C
/* 77DD0 800DE920 0260202D */   daddu    $a0, $s3, $zero
/* 77DD4 800DE924 0240282D */  daddu     $a1, $s2, $zero
/* 77DD8 800DE928 461AB080 */  add.s     $f2, $f22, $f26
/* 77DDC 800DE92C 0220302D */  daddu     $a2, $s1, $zero
/* 77DE0 800DE930 0200382D */  daddu     $a3, $s0, $zero
/* 77DE4 800DE934 461CA000 */  add.s     $f0, $f20, $f28
/* 77DE8 800DE938 E7B80014 */  swc1      $f24, 0x14($sp)
/* 77DEC 800DE93C E7A20010 */  swc1      $f2, 0x10($sp)
/* 77DF0 800DE940 0C037A82 */  jal       player_raycast_up_corner
/* 77DF4 800DE944 E7A00018 */   swc1     $f0, 0x18($sp)
/* 77DF8 800DE948 0441000C */  bgez      $v0, .L800DE97C
/* 77DFC 800DE94C 0260202D */   daddu    $a0, $s3, $zero
/* 77E00 800DE950 0240282D */  daddu     $a1, $s2, $zero
/* 77E04 800DE954 461AB081 */  sub.s     $f2, $f22, $f26
/* 77E08 800DE958 0220302D */  daddu     $a2, $s1, $zero
/* 77E0C 800DE95C 0200382D */  daddu     $a3, $s0, $zero
/* 77E10 800DE960 461CA001 */  sub.s     $f0, $f20, $f28
/* 77E14 800DE964 E7B80014 */  swc1      $f24, 0x14($sp)
/* 77E18 800DE968 E7A20010 */  swc1      $f2, 0x10($sp)
/* 77E1C 800DE96C 0C037A82 */  jal       player_raycast_up_corner
/* 77E20 800DE970 E7A00018 */   swc1     $f0, 0x18($sp)
/* 77E24 800DE974 0440000A */  bltz      $v0, .L800DE9A0
/* 77E28 800DE978 00000000 */   nop
.L800DE97C:
/* 77E2C 800DE97C C7A00010 */  lwc1      $f0, 0x10($sp)
/* 77E30 800DE980 E6C00000 */  swc1      $f0, 0x0($s6)
/* 77E34 800DE984 C7A00014 */  lwc1      $f0, 0x14($sp)
/* 77E38 800DE988 E6E00000 */  swc1      $f0, 0x0($s7)
/* 77E3C 800DE98C C7A00018 */  lwc1      $f0, 0x18($sp)
/* 77E40 800DE990 E7C00000 */  swc1      $f0, 0x0($fp)
/* 77E44 800DE994 C7A0001C */  lwc1      $f0, 0x1C($sp)
/* 77E48 800DE998 0040A02D */  daddu     $s4, $v0, $zero
/* 77E4C 800DE99C E6A00000 */  swc1      $f0, 0x0($s5)
.L800DE9A0:
/* 77E50 800DE9A0 06810008 */  bgez      $s4, .L800DE9C4
/* 77E54 800DE9A4 0280102D */   daddu    $v0, $s4, $zero
/* 77E58 800DE9A8 C7A00010 */  lwc1      $f0, 0x10($sp)
/* 77E5C 800DE9AC E6C00000 */  swc1      $f0, 0x0($s6)
/* 77E60 800DE9B0 C7A00014 */  lwc1      $f0, 0x14($sp)
/* 77E64 800DE9B4 E6E00000 */  swc1      $f0, 0x0($s7)
/* 77E68 800DE9B8 C7A00018 */  lwc1      $f0, 0x18($sp)
/* 77E6C 800DE9BC E7C00000 */  swc1      $f0, 0x0($fp)
/* 77E70 800DE9C0 AEA00000 */  sw        $zero, 0x0($s5)
.L800DE9C4:
/* 77E74 800DE9C4 8FBF0044 */  lw        $ra, 0x44($sp)
/* 77E78 800DE9C8 8FBE0040 */  lw        $fp, 0x40($sp)
/* 77E7C 800DE9CC 8FB7003C */  lw        $s7, 0x3C($sp)
/* 77E80 800DE9D0 8FB60038 */  lw        $s6, 0x38($sp)
/* 77E84 800DE9D4 8FB50034 */  lw        $s5, 0x34($sp)
/* 77E88 800DE9D8 8FB40030 */  lw        $s4, 0x30($sp)
/* 77E8C 800DE9DC 8FB3002C */  lw        $s3, 0x2C($sp)
/* 77E90 800DE9E0 8FB20028 */  lw        $s2, 0x28($sp)
/* 77E94 800DE9E4 8FB10024 */  lw        $s1, 0x24($sp)
/* 77E98 800DE9E8 8FB00020 */  lw        $s0, 0x20($sp)
/* 77E9C 800DE9EC D7BC0068 */  ldc1      $f28, 0x68($sp)
/* 77EA0 800DE9F0 D7BA0060 */  ldc1      $f26, 0x60($sp)
/* 77EA4 800DE9F4 D7B80058 */  ldc1      $f24, 0x58($sp)
/* 77EA8 800DE9F8 D7B60050 */  ldc1      $f22, 0x50($sp)
/* 77EAC 800DE9FC D7B40048 */  ldc1      $f20, 0x48($sp)
/* 77EB0 800DEA00 03E00008 */  jr        $ra
/* 77EB4 800DEA04 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw) {
    f32 startX;
    f32 startY;
    f32 startZ;
    f32 depth;
    f32 theta;
    f32 deltaZ;
    f32 deltaX;
    f32 x,y,z;
    s32 ret;
    s32 hitID;
    f32 radius;

    radius = player->colliderDiameter * 0.3f;
    theta = DEG_TO_RAD(yaw);
    deltaX = radius * sin_rad(theta);
    deltaZ = -radius * cos_rad(theta);

    x = *posX;
    y = *posY;
    z = *posZ;

    depth = *hitDepth;
    startX = x + deltaX;
    startY = y;
    startZ = z + deltaZ;

    ret = NO_COLLIDER;
    hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);

    if (hitID < 0) {
        startX = x - deltaX;
        startY = y;
        startZ = z - deltaZ;
        hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
    }

    if (hitID < 0) {
        startX = x + deltaZ;
        startY = y;
        startZ = z + deltaX;
        hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
    }

    if (hitID < 0) {
        startX = x - deltaZ;
        startY = y;
        startZ = z - deltaX;
        hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth);
    }

    if (hitID >= 0) {
        *posX = startX;
        *posY = startY;
        *posZ = startZ;
        *hitDepth = depth;
        ret = hitID;
    }

    if (ret < 0) {
        *posX = startX;
        *posY = startY;
        *posZ = startZ;
        *hitDepth = 0;
    }

    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel energy_shockwave_update
/* 374FA0 E0072150 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 374FA4 E0072154 AFBF002C */  sw        $ra, 0x2C($sp)
/* 374FA8 E0072158 AFB20028 */  sw        $s2, 0x28($sp)
/* 374FAC E007215C AFB10024 */  sw        $s1, 0x24($sp)
/* 374FB0 E0072160 AFB00020 */  sw        $s0, 0x20($sp)
/* 374FB4 E0072164 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 374FB8 E0072168 8C90000C */  lw        $s0, 0xC($a0)
/* 374FBC E007216C 8E020028 */  lw        $v0, 0x28($s0)
/* 374FC0 E0072170 2442FFFF */  addiu     $v0, $v0, -0x1
/* 374FC4 E0072174 AE020028 */  sw        $v0, 0x28($s0)
/* 374FC8 E0072178 8E02002C */  lw        $v0, 0x2C($s0)
/* 374FCC E007217C 8E120028 */  lw        $s2, 0x28($s0)
/* 374FD0 E0072180 24510001 */  addiu     $s1, $v0, 0x1
/* 374FD4 E0072184 06410005 */  bgez      $s2, .LE007219C
/* 374FD8 E0072188 AE11002C */   sw       $s1, 0x2C($s0)
/* 374FDC E007218C 0C080128 */  jal       shim_remove_effect
/* 374FE0 E0072190 00000000 */   nop
/* 374FE4 E0072194 0801C8DC */  j         .LE0072370
/* 374FE8 E0072198 00000000 */   nop
.LE007219C:
/* 374FEC E007219C 32220001 */  andi      $v0, $s1, 0x1
/* 374FF0 E00721A0 1040001E */  beqz      $v0, .LE007221C
/* 374FF4 E00721A4 00000000 */   nop
/* 374FF8 E00721A8 24040168 */  addiu     $a0, $zero, 0x168
/* 374FFC E00721AC 0C080011 */  jal       func_E0200044
/* 375000 E00721B0 0220282D */   daddu    $a1, $s1, $zero
/* 375004 E00721B4 4482A000 */  mtc1      $v0, $f20
/* 375008 E00721B8 00000000 */  nop
/* 37500C E00721BC 4680A520 */  cvt.s.w   $f20, $f20
/* 375010 E00721C0 0C080140 */  jal       shim_sin_deg
/* 375014 E00721C4 4600A306 */   mov.s    $f12, $f20
/* 375018 E00721C8 0C080144 */  jal       shim_cos_deg
/* 37501C E00721CC 4600A306 */   mov.s    $f12, $f20
/* 375020 E00721D0 0C080150 */  jal       shim_load_effect
/* 375024 E00721D4 2404003A */   addiu    $a0, $zero, 0x3A
/* 375028 E00721D8 001110C0 */  sll       $v0, $s1, 3
/* 37502C E00721DC 44820000 */  mtc1      $v0, $f0
/* 375030 E00721E0 00000000 */  nop
/* 375034 E00721E4 46800020 */  cvt.s.w   $f0, $f0
/* 375038 E00721E8 E7A00010 */  swc1      $f0, 0x10($sp)
/* 37503C E00721EC 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 375040 E00721F0 44810000 */  mtc1      $at, $f0
/* 375044 E00721F4 2402000A */  addiu     $v0, $zero, 0xA
/* 375048 E00721F8 AFA20018 */  sw        $v0, 0x18($sp)
/* 37504C E00721FC 24020014 */  addiu     $v0, $zero, 0x14
/* 375050 E0072200 AFA2001C */  sw        $v0, 0x1C($sp)
/* 375054 E0072204 E7A00014 */  swc1      $f0, 0x14($sp)
/* 375058 E0072208 8E050004 */  lw        $a1, 0x4($s0)
/* 37505C E007220C 8E060008 */  lw        $a2, 0x8($s0)
/* 375060 E0072210 8E07000C */  lw        $a3, 0xC($s0)
/* 375064 E0072214 0C01D000 */  jal       shimmer_wave_main
/* 375068 E0072218 0000202D */   daddu    $a0, $zero, $zero
.LE007221C:
/* 37506C E007221C C600001C */  lwc1      $f0, 0x1C($s0)
/* 375070 E0072220 C6020020 */  lwc1      $f2, 0x20($s0)
/* 375074 E0072224 46020000 */  add.s     $f0, $f0, $f2
/* 375078 E0072228 2A42000A */  slti      $v0, $s2, 0xA
/* 37507C E007222C 10400006 */  beqz      $v0, .LE0072248
/* 375080 E0072230 E600001C */   swc1     $f0, 0x1C($s0)
/* 375084 E0072234 00121040 */  sll       $v0, $s2, 1
/* 375088 E0072238 00521021 */  addu      $v0, $v0, $s2
/* 37508C E007223C 000210C0 */  sll       $v0, $v0, 3
/* 375090 E0072240 00521021 */  addu      $v0, $v0, $s2
/* 375094 E0072244 AE020024 */  sw        $v0, 0x24($s0)
.LE0072248:
/* 375098 E0072248 C6020030 */  lwc1      $f2, 0x30($s0)
/* 37509C E007224C C6000040 */  lwc1      $f0, 0x40($s0)
/* 3750A0 E0072250 C6060034 */  lwc1      $f6, 0x34($s0)
/* 3750A4 E0072254 46001080 */  add.s     $f2, $f2, $f0
/* 3750A8 E0072258 C6000044 */  lwc1      $f0, 0x44($s0)
/* 3750AC E007225C C6040038 */  lwc1      $f4, 0x38($s0)
/* 3750B0 E0072260 46003180 */  add.s     $f6, $f6, $f0
/* 3750B4 E0072264 C6000048 */  lwc1      $f0, 0x48($s0)
/* 3750B8 E0072268 46002100 */  add.s     $f4, $f4, $f0
/* 3750BC E007226C C600003C */  lwc1      $f0, 0x3C($s0)
/* 3750C0 E0072270 E6020030 */  swc1      $f2, 0x30($s0)
/* 3750C4 E0072274 C602004C */  lwc1      $f2, 0x4C($s0)
/* 3750C8 E0072278 3C014300 */  lui       $at, (0x43000000 >> 16)
/* 3750CC E007227C 44814000 */  mtc1      $at, $f8
/* 3750D0 E0072280 46020000 */  add.s     $f0, $f0, $f2
/* 3750D4 E0072284 C60A0030 */  lwc1      $f10, 0x30($s0)
/* 3750D8 E0072288 460A403C */  c.lt.s    $f8, $f10
/* 3750DC E007228C E6060034 */  swc1      $f6, 0x34($s0)
/* 3750E0 E0072290 E6040038 */  swc1      $f4, 0x38($s0)
/* 3750E4 E0072294 45000003 */  bc1f      .LE00722A4
/* 3750E8 E0072298 E600003C */   swc1     $f0, 0x3C($s0)
/* 3750EC E007229C 46085001 */  sub.s     $f0, $f10, $f8
/* 3750F0 E00722A0 E6000030 */  swc1      $f0, 0x30($s0)
.LE00722A4:
/* 3750F4 E00722A4 C6000034 */  lwc1      $f0, 0x34($s0)
/* 3750F8 E00722A8 4600403C */  c.lt.s    $f8, $f0
/* 3750FC E00722AC 00000000 */  nop
/* 375100 E00722B0 45000003 */  bc1f      .LE00722C0
/* 375104 E00722B4 00000000 */   nop
/* 375108 E00722B8 46080001 */  sub.s     $f0, $f0, $f8
/* 37510C E00722BC E6000034 */  swc1      $f0, 0x34($s0)
.LE00722C0:
/* 375110 E00722C0 C6000038 */  lwc1      $f0, 0x38($s0)
/* 375114 E00722C4 4600403C */  c.lt.s    $f8, $f0
/* 375118 E00722C8 00000000 */  nop
/* 37511C E00722CC 45000003 */  bc1f      .LE00722DC
/* 375120 E00722D0 00000000 */   nop
/* 375124 E00722D4 46080001 */  sub.s     $f0, $f0, $f8
/* 375128 E00722D8 E6000038 */  swc1      $f0, 0x38($s0)
.LE00722DC:
/* 37512C E00722DC C600003C */  lwc1      $f0, 0x3C($s0)
/* 375130 E00722E0 4600403C */  c.lt.s    $f8, $f0
/* 375134 E00722E4 00000000 */  nop
/* 375138 E00722E8 45000003 */  bc1f      .LE00722F8
/* 37513C E00722EC 00000000 */   nop
/* 375140 E00722F0 46080001 */  sub.s     $f0, $f0, $f8
/* 375144 E00722F4 E600003C */  swc1      $f0, 0x3C($s0)
.LE00722F8:
/* 375148 E00722F8 C6000030 */  lwc1      $f0, 0x30($s0)
/* 37514C E00722FC 44801000 */  mtc1      $zero, $f2
/* 375150 E0072300 00000000 */  nop
/* 375154 E0072304 4602003C */  c.lt.s    $f0, $f2
/* 375158 E0072308 00000000 */  nop
/* 37515C E007230C 45000003 */  bc1f      .LE007231C
/* 375160 E0072310 00000000 */   nop
/* 375164 E0072314 46080000 */  add.s     $f0, $f0, $f8
/* 375168 E0072318 E6000030 */  swc1      $f0, 0x30($s0)
.LE007231C:
/* 37516C E007231C C6000034 */  lwc1      $f0, 0x34($s0)
/* 375170 E0072320 4602003C */  c.lt.s    $f0, $f2
/* 375174 E0072324 00000000 */  nop
/* 375178 E0072328 45000003 */  bc1f      .LE0072338
/* 37517C E007232C 00000000 */   nop
/* 375180 E0072330 46080000 */  add.s     $f0, $f0, $f8
/* 375184 E0072334 E6000034 */  swc1      $f0, 0x34($s0)
.LE0072338:
/* 375188 E0072338 C6000038 */  lwc1      $f0, 0x38($s0)
/* 37518C E007233C 4602003C */  c.lt.s    $f0, $f2
/* 375190 E0072340 00000000 */  nop
/* 375194 E0072344 45000003 */  bc1f      .LE0072354
/* 375198 E0072348 00000000 */   nop
/* 37519C E007234C 46080000 */  add.s     $f0, $f0, $f8
/* 3751A0 E0072350 E6000038 */  swc1      $f0, 0x38($s0)
.LE0072354:
/* 3751A4 E0072354 C600003C */  lwc1      $f0, 0x3C($s0)
/* 3751A8 E0072358 4602003C */  c.lt.s    $f0, $f2
/* 3751AC E007235C 00000000 */  nop
/* 3751B0 E0072360 45000003 */  bc1f      .LE0072370
/* 3751B4 E0072364 00000000 */   nop
/* 3751B8 E0072368 46080000 */  add.s     $f0, $f0, $f8
/* 3751BC E007236C E600003C */  swc1      $f0, 0x3C($s0)
.LE0072370:
/* 3751C0 E0072370 8FBF002C */  lw        $ra, 0x2C($sp)
/* 3751C4 E0072374 8FB20028 */  lw        $s2, 0x28($sp)
/* 3751C8 E0072378 8FB10024 */  lw        $s1, 0x24($sp)
/* 3751CC E007237C 8FB00020 */  lw        $s0, 0x20($sp)
/* 3751D0 E0072380 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 3751D4 E0072384 03E00008 */  jr        $ra
/* 3751D8 E0072388 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void energy_shockwave_update(EffectInstance* effect) {
    EnergyShockwaveFXData* data = effect->data.energyShockwave;
    s32 unk_28;
    s32 unk_2C;
    f32 angle;

    data->unk_28--;
    data->unk_2C++;

    unk_28 = data->unk_28;
    unk_2C = data->unk_2C;

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

    if (unk_2C % 2) {
        angle = func_E0200044(360, unk_2C);
        shim_sin_deg(angle);
        shim_cos_deg(angle);
        shim_load_effect(EFFECT_SHIMMER_WAVE);
        shimmer_wave_main(0, data->unk_04, data->unk_08, data->unk_0C, unk_2C * 8, 10.0f, 10, 20);
    }

    data->unk_1C += data->unk_20;

    if (unk_28 < 10) {
        data->unk_24 = unk_28 * 25;
    }

    data->unk_30 += data->unk_40;
    data->unk_34 += data->unk_44;
    data->unk_38 += data->unk_48;
    data->unk_3C += data->unk_4C;

    if (data->unk_30 > 128.0f) {
        data->unk_30 -= 128.0f;
    }
    if (data->unk_34 > 128.0f) {
        data->unk_34 -= 128.0f;
    }
    if (data->unk_38 > 128.0f) {
        data->unk_38 -= 128.0f;
    }
    if (data->unk_3C > 128.0f) {
        data->unk_3C -= 128.0f;
    }

    if (data->unk_30 < 0.0f) {
        data->unk_30 += 128.0f;
    }
    if (data->unk_34 < 0.0f) {
        data->unk_34 += 128.0f;
    }
    if (data->unk_38 < 0.0f) {
        data->unk_38 += 128.0f;
    }
    if (data->unk_3C < 0.0f) {
        data->unk_3C += 128.0f;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_E011A48C
/* 4046AC E011A48C 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 4046B0 E011A490 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 4046B4 E011A494 44872000 */  mtc1      $a3, $f4
/* 4046B8 E011A498 8C670000 */  lw        $a3, 0x0($v1)
/* 4046BC E011A49C 24E20008 */  addiu     $v0, $a3, 0x8
/* 4046C0 E011A4A0 AC620000 */  sw        $v0, 0x0($v1)
/* 4046C4 E011A4A4 24820020 */  addiu     $v0, $a0, 0x20
/* 4046C8 E011A4A8 00021480 */  sll       $v0, $v0, 18
/* 4046CC E011A4AC 00021403 */  sra       $v0, $v0, 16
/* 4046D0 E011A4B0 18400005 */  blez      $v0, .LE011A4C8
/* 4046D4 E011A4B4 30420FFF */   andi     $v0, $v0, 0xFFF
/* 4046D8 E011A4B8 00021300 */  sll       $v0, $v0, 12
/* 4046DC E011A4BC 3C03E400 */  lui       $v1, (0xE4000000 >> 16)
/* 4046E0 E011A4C0 08046933 */  j         .LE011A4CC
/* 4046E4 E011A4C4 00431825 */   or       $v1, $v0, $v1
.LE011A4C8:
/* 4046E8 E011A4C8 3C03E400 */  lui       $v1, (0xE4000000 >> 16)
.LE011A4CC:
/* 4046EC E011A4CC 24A20020 */  addiu     $v0, $a1, 0x20
/* 4046F0 E011A4D0 00021480 */  sll       $v0, $v0, 18
/* 4046F4 E011A4D4 00021403 */  sra       $v0, $v0, 16
/* 4046F8 E011A4D8 18400004 */  blez      $v0, .LE011A4EC
/* 4046FC E011A4DC ACE30000 */   sw       $v1, 0x0($a3)
/* 404700 E011A4E0 30420FFF */  andi      $v0, $v0, 0xFFF
/* 404704 E011A4E4 00621025 */  or        $v0, $v1, $v0
/* 404708 E011A4E8 ACE20000 */  sw        $v0, 0x0($a3)
.LE011A4EC:
/* 40470C E011A4EC 30C20007 */  andi      $v0, $a2, 0x7
/* 404710 E011A4F0 00021E00 */  sll       $v1, $v0, 24
/* 404714 E011A4F4 00041480 */  sll       $v0, $a0, 18
/* 404718 E011A4F8 00023403 */  sra       $a2, $v0, 16
/* 40471C E011A4FC 18C00003 */  blez      $a2, .LE011A50C
/* 404720 E011A500 30C20FFF */   andi     $v0, $a2, 0xFFF
/* 404724 E011A504 00021300 */  sll       $v0, $v0, 12
/* 404728 E011A508 00621825 */  or        $v1, $v1, $v0
.LE011A50C:
/* 40472C E011A50C 00051480 */  sll       $v0, $a1, 18
/* 404730 E011A510 00021403 */  sra       $v0, $v0, 16
/* 404734 E011A514 18400004 */  blez      $v0, .LE011A528
/* 404738 E011A518 ACE30004 */   sw       $v1, 0x4($a3)
/* 40473C E011A51C 30420FFF */  andi      $v0, $v0, 0xFFF
/* 404740 E011A520 00621025 */  or        $v0, $v1, $v0
/* 404744 E011A524 ACE20004 */  sw        $v0, 0x4($a3)
.LE011A528:
/* 404748 E011A528 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 40474C E011A52C 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 404750 E011A530 8C620000 */  lw        $v0, 0x0($v1)
/* 404754 E011A534 0040202D */  daddu     $a0, $v0, $zero
/* 404758 E011A538 24420008 */  addiu     $v0, $v0, 0x8
/* 40475C E011A53C AC620000 */  sw        $v0, 0x0($v1)
/* 404760 E011A540 3C02E100 */  lui       $v0, (0xE1000000 >> 16)
/* 404764 E011A544 AC820000 */  sw        $v0, 0x0($a0)
/* 404768 E011A548 04C10015 */  bgez      $a2, .LE011A5A0
/* 40476C E011A54C 24840004 */   addiu    $a0, $a0, 0x4
/* 404770 E011A550 4600218D */  trunc.w.s $f6, $f4
/* 404774 E011A554 44023000 */  mfc1      $v0, $f6
/* 404778 E011A558 00000000 */  nop
/* 40477C E011A55C 00021400 */  sll       $v0, $v0, 16
/* 404780 E011A560 00021403 */  sra       $v0, $v0, 16
/* 404784 E011A564 04410007 */  bgez      $v0, .LE011A584
/* 404788 E011A568 00C20018 */   mult     $a2, $v0
/* 40478C E011A56C 00004012 */  mflo      $t0
/* 404790 E011A570 000811C3 */  sra       $v0, $t0, 7
/* 404794 E011A574 04410008 */  bgez      $v0, .LE011A598
/* 404798 E011A578 00021023 */   negu     $v0, $v0
/* 40479C E011A57C 08046965 */  j         .LE011A594
/* 4047A0 E011A580 0000102D */   daddu    $v0, $zero, $zero
.LE011A584:
/* 4047A4 E011A584 00004012 */  mflo      $t0
/* 4047A8 E011A588 000811C3 */  sra       $v0, $t0, 7
/* 4047AC E011A58C 5C400001 */  bgtzl     $v0, .LE011A594
/* 4047B0 E011A590 0000102D */   daddu    $v0, $zero, $zero
.LE011A594:
/* 4047B4 E011A594 00021023 */  negu      $v0, $v0
.LE011A598:
/* 4047B8 E011A598 08046969 */  j         .LE011A5A4
/* 4047BC E011A59C 00023400 */   sll      $a2, $v0, 16
.LE011A5A0:
/* 4047C0 E011A5A0 0000302D */  daddu     $a2, $zero, $zero
.LE011A5A4:
/* 4047C4 E011A5A4 00051080 */  sll       $v0, $a1, 2
/* 4047C8 E011A5A8 0441001E */  bgez      $v0, .LE011A624
/* 4047CC E011A5AC 34C20400 */   ori      $v0, $a2, 0x400
/* 4047D0 E011A5B0 46002007 */  neg.s     $f0, $f4
/* 4047D4 E011A5B4 4600018D */  trunc.w.s $f6, $f0
/* 4047D8 E011A5B8 44023000 */  mfc1      $v0, $f6
/* 4047DC E011A5BC 00000000 */  nop
/* 4047E0 E011A5C0 00021400 */  sll       $v0, $v0, 16
/* 4047E4 E011A5C4 00021C03 */  sra       $v1, $v0, 16
/* 4047E8 E011A5C8 0461000C */  bgez      $v1, .LE011A5FC
/* 4047EC E011A5CC 00051480 */   sll      $v0, $a1, 18
/* 4047F0 E011A5D0 00021403 */  sra       $v0, $v0, 16
/* 4047F4 E011A5D4 00430018 */  mult      $v0, $v1
/* 4047F8 E011A5D8 00004012 */  mflo      $t0
/* 4047FC E011A5DC 000819C3 */  sra       $v1, $t0, 7
/* 404800 E011A5E0 04620001 */  bltzl     $v1, .LE011A5E8
/* 404804 E011A5E4 0000182D */   daddu    $v1, $zero, $zero
.LE011A5E8:
/* 404808 E011A5E8 24020400 */  addiu     $v0, $zero, 0x400
/* 40480C E011A5EC 00431023 */  subu      $v0, $v0, $v1
/* 404810 E011A5F0 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 404814 E011A5F4 08046989 */  j         .LE011A624
/* 404818 E011A5F8 00C21025 */   or       $v0, $a2, $v0
.LE011A5FC:
/* 40481C E011A5FC 00021403 */  sra       $v0, $v0, 16
/* 404820 E011A600 00430018 */  mult      $v0, $v1
/* 404824 E011A604 00004012 */  mflo      $t0
/* 404828 E011A608 000819C3 */  sra       $v1, $t0, 7
/* 40482C E011A60C 5C600001 */  bgtzl     $v1, .LE011A614
/* 404830 E011A610 0000182D */   daddu    $v1, $zero, $zero
.LE011A614:
/* 404834 E011A614 24020400 */  addiu     $v0, $zero, 0x400
/* 404838 E011A618 00431023 */  subu      $v0, $v0, $v1
/* 40483C E011A61C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 404840 E011A620 00C21025 */  or        $v0, $a2, $v0
.LE011A624:
/* 404844 E011A624 AC820000 */  sw        $v0, 0x0($a0)
/* 404848 E011A628 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 40484C E011A62C 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 404850 E011A630 8C620000 */  lw        $v0, 0x0($v1)
/* 404854 E011A634 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 404858 E011A638 44810000 */  mtc1      $at, $f0
/* 40485C E011A63C 0040202D */  daddu     $a0, $v0, $zero
/* 404860 E011A640 24420008 */  addiu     $v0, $v0, 0x8
/* 404864 E011A644 AC620000 */  sw        $v0, 0x0($v1)
/* 404868 E011A648 3C02F100 */  lui       $v0, (0xF1000000 >> 16)
/* 40486C E011A64C AC820000 */  sw        $v0, 0x0($a0)
/* 404870 E011A650 4604003E */  c.le.s    $f0, $f4
/* 404874 E011A654 00000000 */  nop
/* 404878 E011A658 45010005 */  bc1t      .LE011A670
/* 40487C E011A65C 24840004 */   addiu    $a0, $a0, 0x4
/* 404880 E011A660 4600218D */  trunc.w.s $f6, $f4
/* 404884 E011A664 44033000 */  mfc1      $v1, $f6
/* 404888 E011A668 080469A2 */  j         .LE011A688
/* 40488C E011A66C 00000000 */   nop
.LE011A670:
/* 404890 E011A670 46002001 */  sub.s     $f0, $f4, $f0
/* 404894 E011A674 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 404898 E011A678 4600018D */  trunc.w.s $f6, $f0
/* 40489C E011A67C 44033000 */  mfc1      $v1, $f6
/* 4048A0 E011A680 00000000 */  nop
/* 4048A4 E011A684 00621825 */  or        $v1, $v1, $v0
.LE011A688:
/* 4048A8 E011A688 3C014F00 */  lui       $at, (0x4F000000 >> 16)
/* 4048AC E011A68C 44811000 */  mtc1      $at, $f2
/* 4048B0 E011A690 46002007 */  neg.s     $f0, $f4
/* 4048B4 E011A694 4600103E */  c.le.s    $f2, $f0
/* 4048B8 E011A698 00000000 */  nop
/* 4048BC E011A69C 45010005 */  bc1t      .LE011A6B4
/* 4048C0 E011A6A0 00033400 */   sll      $a2, $v1, 16
/* 4048C4 E011A6A4 4600018D */  trunc.w.s $f6, $f0
/* 4048C8 E011A6A8 44073000 */  mfc1      $a3, $f6
/* 4048CC E011A6AC 080469B3 */  j         .LE011A6CC
/* 4048D0 E011A6B0 00000000 */   nop
.LE011A6B4:
/* 4048D4 E011A6B4 46020001 */  sub.s     $f0, $f0, $f2
/* 4048D8 E011A6B8 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 4048DC E011A6BC 4600018D */  trunc.w.s $f6, $f0
/* 4048E0 E011A6C0 44073000 */  mfc1      $a3, $f6
/* 4048E4 E011A6C4 00000000 */  nop
/* 4048E8 E011A6C8 00E23825 */  or        $a3, $a3, $v0
.LE011A6CC:
/* 4048EC E011A6CC 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 4048F0 E011A6D0 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 4048F4 E011A6D4 30E2FFFF */  andi      $v0, $a3, 0xFFFF
/* 4048F8 E011A6D8 8CA30000 */  lw        $v1, 0x0($a1)
/* 4048FC E011A6DC 00C21025 */  or        $v0, $a2, $v0
/* 404900 E011A6E0 AC820000 */  sw        $v0, 0x0($a0)
/* 404904 E011A6E4 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 404908 E011A6E8 0060202D */  daddu     $a0, $v1, $zero
/* 40490C E011A6EC 24630008 */  addiu     $v1, $v1, 0x8
/* 404910 E011A6F0 ACA30000 */  sw        $v1, 0x0($a1)
/* 404914 E011A6F4 AC820000 */  sw        $v0, 0x0($a0)
/* 404918 E011A6F8 03E00008 */  jr        $ra
/* 40491C E011A6FC AC800004 */   sw       $zero, 0x4($a0)

### DECOMPILED C INSTRUCTIONS:

void func_E011A48C(s32 posX, s32 posY, s32 tile, f32 scale) {
    gSPScisTextureRectangle(gMainGfxPos++,
        posX * 4,
        posY * 4,
        (posX + 32) * 4,
        (posY + 32) * 4,
        tile,
        0,
        1024,
        scale,
        -scale);
    gDPPipeSync(gMainGfxPos++);
}