### RAW ASSEMBLY INSTRUCTIONS:

glabel state_step_logos
/* F4A4 800340A4 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* F4A8 800340A8 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* F4AC 800340AC 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* F4B0 800340B0 AFBF0014 */  sw        $ra, 0x14($sp)
/* F4B4 800340B4 AFB00010 */  sw        $s0, 0x10($sp)
/* F4B8 800340B8 806200AE */  lb        $v0, 0xAE($v1)
/* F4BC 800340BC 1040000E */  beqz      $v0, .L800340F8
/* F4C0 800340C0 00000000 */   nop
/* F4C4 800340C4 0C00CE0C */  jal       intro_logos_fade_out
/* F4C8 800340C8 2404000A */   addiu    $a0, $zero, 0xA
/* F4CC 800340CC 104000A4 */  beqz      $v0, .L80034360
/* F4D0 800340D0 00000000 */   nop
/* F4D4 800340D4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* F4D8 800340D8 44816000 */  mtc1      $at, $f12
/* F4DC 800340DC 0C00AFBB */  jal       set_curtain_scale
/* F4E0 800340E0 00000000 */   nop
/* F4E4 800340E4 44806000 */  mtc1      $zero, $f12
/* F4E8 800340E8 0C00AFC9 */  jal       set_curtain_fade
/* F4EC 800340EC 00000000 */   nop
/* F4F0 800340F0 0800D0D6 */  j         .L80034358
/* F4F4 800340F4 24040002 */   addiu    $a0, $zero, 0x2
.L800340F8:
/* F4F8 800340F8 806300AC */  lb        $v1, 0xAC($v1)
/* F4FC 800340FC 2C62000C */  sltiu     $v0, $v1, 0xC
/* F500 80034100 10400097 */  beqz      $v0, .L80034360
/* F504 80034104 00031080 */   sll      $v0, $v1, 2
/* F508 80034108 3C01800A */  lui       $at, %hi(jtbl_80098290)
/* F50C 8003410C 00220821 */  addu      $at, $at, $v0
/* F510 80034110 8C228290 */  lw        $v0, %lo(jtbl_80098290)($at)
/* F514 80034114 00400008 */  jr        $v0
/* F518 80034118 00000000 */   nop
glabel .L8003411C
/* F51C 8003411C 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* F520 80034120 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* F524 80034124 8E020000 */  lw        $v0, 0x0($s0)
/* F528 80034128 804200AD */  lb        $v0, 0xAD($v0)
/* F52C 8003412C 1440004D */  bnez      $v0, .L80034264
/* F530 80034130 00000000 */   nop
/* F534 80034134 0C00CDF8 */  jal       intro_logos_set_fade_color
/* F538 80034138 240400D0 */   addiu    $a0, $zero, 0xD0
/* F53C 8003413C 8E030000 */  lw        $v1, 0x0($s0)
/* F540 80034140 906200AC */  lbu       $v0, 0xAC($v1)
/* F544 80034144 24420001 */  addiu     $v0, $v0, 0x1
/* F548 80034148 0800D099 */  j         .L80034264
/* F54C 8003414C A06200AC */   sb       $v0, 0xAC($v1)
glabel .L80034150
/* F550 80034150 0C00CE0C */  jal       intro_logos_fade_out
/* F554 80034154 2404000A */   addiu    $a0, $zero, 0xA
/* F558 80034158 10400081 */  beqz      $v0, .L80034360
/* F55C 8003415C 00000000 */   nop
/* F560 80034160 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* F564 80034164 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* F568 80034168 0800D0C5 */  j         .L80034314
/* F56C 8003416C 00000000 */   nop
glabel .L80034170
/* F570 80034170 0C00CDFE */  jal       intro_logos_fade_in
/* F574 80034174 2404000A */   addiu    $a0, $zero, 0xA
/* F578 80034178 10400079 */  beqz      $v0, .L80034360
/* F57C 8003417C 00000000 */   nop
/* F580 80034180 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* F584 80034184 2484419C */  addiu     $a0, $a0, %lo(gGameStatusPtr)
/* F588 80034188 8C830000 */  lw        $v1, 0x0($a0)
/* F58C 8003418C 906200AC */  lbu       $v0, 0xAC($v1)
/* F590 80034190 24420001 */  addiu     $v0, $v0, 0x1
/* F594 80034194 A06200AC */  sb        $v0, 0xAC($v1)
/* F598 80034198 8C830000 */  lw        $v1, 0x0($a0)
/* F59C 8003419C 24020028 */  addiu     $v0, $zero, 0x28
/* F5A0 800341A0 0800D0D8 */  j         .L80034360
/* F5A4 800341A4 A06200AD */   sb       $v0, 0xAD($v1)
glabel .L800341A8
/* F5A8 800341A8 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* F5AC 800341AC 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* F5B0 800341B0 8E030000 */  lw        $v1, 0x0($s0)
/* F5B4 800341B4 806200AD */  lb        $v0, 0xAD($v1)
/* F5B8 800341B8 1440002B */  bnez      $v0, .L80034268
/* F5BC 800341BC 240400D0 */   addiu    $a0, $zero, 0xD0
/* F5C0 800341C0 906200AC */  lbu       $v0, 0xAC($v1)
/* F5C4 800341C4 24420001 */  addiu     $v0, $v0, 0x1
/* F5C8 800341C8 0C00CDF8 */  jal       intro_logos_set_fade_color
/* F5CC 800341CC A06200AC */   sb       $v0, 0xAC($v1)
/* F5D0 800341D0 0800D099 */  j         .L80034264
/* F5D4 800341D4 00000000 */   nop
glabel .L800341D8
/* F5D8 800341D8 0C00CE0C */  jal       intro_logos_fade_out
/* F5DC 800341DC 2404000A */   addiu    $a0, $zero, 0xA
/* F5E0 800341E0 1040005F */  beqz      $v0, .L80034360
/* F5E4 800341E4 00000000 */   nop
/* F5E8 800341E8 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* F5EC 800341EC 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* F5F0 800341F0 0800D0C5 */  j         .L80034314
/* F5F4 800341F4 00000000 */   nop
glabel .L800341F8
/* F5F8 800341F8 0C00CDFE */  jal       intro_logos_fade_in
/* F5FC 800341FC 2404000A */   addiu    $a0, $zero, 0xA
/* F600 80034200 10400057 */  beqz      $v0, .L80034360
/* F604 80034204 00000000 */   nop
/* F608 80034208 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* F60C 8003420C 2484419C */  addiu     $a0, $a0, %lo(gGameStatusPtr)
/* F610 80034210 8C830000 */  lw        $v1, 0x0($a0)
/* F614 80034214 906200AC */  lbu       $v0, 0xAC($v1)
/* F618 80034218 24420001 */  addiu     $v0, $v0, 0x1
/* F61C 8003421C A06200AC */  sb        $v0, 0xAC($v1)
/* F620 80034220 8C830000 */  lw        $v1, 0x0($a0)
/* F624 80034224 2402001E */  addiu     $v0, $zero, 0x1E
/* F628 80034228 0800D0D8 */  j         .L80034360
/* F62C 8003422C A06200AD */   sb       $v0, 0xAD($v1)
glabel .L80034230
/* F630 80034230 3C108007 */  lui       $s0, %hi(gGameStatusPtr)
/* F634 80034234 2610419C */  addiu     $s0, $s0, %lo(gGameStatusPtr)
/* F638 80034238 8E030000 */  lw        $v1, 0x0($s0)
/* F63C 8003423C 806200AD */  lb        $v0, 0xAD($v1)
/* F640 80034240 14400009 */  bnez      $v0, .L80034268
/* F644 80034244 240400D0 */   addiu    $a0, $zero, 0xD0
/* F648 80034248 906200AC */  lbu       $v0, 0xAC($v1)
/* F64C 8003424C 24420001 */  addiu     $v0, $v0, 0x1
/* F650 80034250 0C00CDF8 */  jal       intro_logos_set_fade_color
/* F654 80034254 A06200AC */   sb       $v0, 0xAC($v1)
/* F658 80034258 8E030000 */  lw        $v1, 0x0($s0)
/* F65C 8003425C 2402001E */  addiu     $v0, $zero, 0x1E
/* F660 80034260 A06200AD */  sb        $v0, 0xAD($v1)
.L80034264:
/* F664 80034264 8E030000 */  lw        $v1, 0x0($s0)
.L80034268:
/* F668 80034268 906200AD */  lbu       $v0, 0xAD($v1)
/* F66C 8003426C 2442FFFF */  addiu     $v0, $v0, -0x1
/* F670 80034270 0800D0D8 */  j         .L80034360
/* F674 80034274 A06200AD */   sb       $v0, 0xAD($v1)
glabel .L80034278
/* F678 80034278 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* F67C 8003427C 8C84419C */  lw        $a0, %lo(gGameStatusPtr)($a0)
/* F680 80034280 808200AD */  lb        $v0, 0xAD($a0)
/* F684 80034284 908300AD */  lbu       $v1, 0xAD($a0)
/* F688 80034288 14400010 */  bnez      $v0, .L800342CC
/* F68C 8003428C 2462FFFF */   addiu    $v0, $v1, -0x1
/* F690 80034290 908200AC */  lbu       $v0, 0xAC($a0)
/* F694 80034294 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* F698 80034298 44816000 */  mtc1      $at, $f12
/* F69C 8003429C 24420001 */  addiu     $v0, $v0, 0x1
/* F6A0 800342A0 0C00AFB7 */  jal       set_curtain_scale_goal
/* F6A4 800342A4 A08200AC */   sb       $v0, 0xAC($a0)
/* F6A8 800342A8 0C00AFC1 */  jal       set_curtain_draw_callback
/* F6AC 800342AC 0000202D */   daddu    $a0, $zero, $zero
/* F6B0 800342B0 3C013E99 */  lui       $at, (0x3E99999A >> 16)
/* F6B4 800342B4 3421999A */  ori       $at, $at, (0x3E99999A & 0xFFFF)
/* F6B8 800342B8 44816000 */  mtc1      $at, $f12
/* F6BC 800342BC 0C00AFC5 */  jal       set_curtain_fade_goal
/* F6C0 800342C0 00000000 */   nop
/* F6C4 800342C4 0800D0D8 */  j         .L80034360
/* F6C8 800342C8 00000000 */   nop
.L800342CC:
/* F6CC 800342CC 0800D0D8 */  j         .L80034360
/* F6D0 800342D0 A08200AD */   sb       $v0, 0xAD($a0)
glabel .L800342D4
/* F6D4 800342D4 0C00CE0C */  jal       intro_logos_fade_out
/* F6D8 800342D8 2404000A */   addiu    $a0, $zero, 0xA
/* F6DC 800342DC 10400020 */  beqz      $v0, .L80034360
/* F6E0 800342E0 2402000F */   addiu    $v0, $zero, 0xF
/* F6E4 800342E4 3C048007 */  lui       $a0, %hi(gGameStatusPtr)
/* F6E8 800342E8 2484419C */  addiu     $a0, $a0, %lo(gGameStatusPtr)
/* F6EC 800342EC 8C830000 */  lw        $v1, 0x0($a0)
/* F6F0 800342F0 A06200AD */  sb        $v0, 0xAD($v1)
/* F6F4 800342F4 0800D0C5 */  j         .L80034314
/* F6F8 800342F8 8C830000 */   lw       $v1, 0x0($a0)
glabel .L800342FC
/* F6FC 800342FC 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* F700 80034300 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* F704 80034304 806200AD */  lb        $v0, 0xAD($v1)
/* F708 80034308 906400AD */  lbu       $a0, 0xAD($v1)
/* F70C 8003430C 14400005 */  bnez      $v0, .L80034324
/* F710 80034310 2482FFFF */   addiu    $v0, $a0, -0x1
.L80034314:
/* F714 80034314 906200AC */  lbu       $v0, 0xAC($v1)
/* F718 80034318 24420001 */  addiu     $v0, $v0, 0x1
/* F71C 8003431C 0800D0D8 */  j         .L80034360
/* F720 80034320 A06200AC */   sb       $v0, 0xAC($v1)
.L80034324:
/* F724 80034324 0800D0D8 */  j         .L80034360
/* F728 80034328 A06200AD */   sb       $v0, 0xAD($v1)
glabel .L8003432C
/* F72C 8003432C 3C10800A */  lui       $s0, %hi(gLogosImages)
/* F730 80034330 26100910 */  addiu     $s0, $s0, %lo(gLogosImages)
/* F734 80034334 0C00AB4B */  jal       heap_free
/* F738 80034338 8E040000 */   lw       $a0, 0x0($s0)
/* F73C 8003433C 240400FF */  addiu     $a0, $zero, 0xFF
/* F740 80034340 0C00CDF4 */  jal       intro_logos_set_fade_alpha
/* F744 80034344 AE000000 */   sw       $zero, 0x0($s0)
/* F748 80034348 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* F74C 8003434C 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* F750 80034350 24040010 */  addiu     $a0, $zero, 0x10
/* F754 80034354 A04000A8 */  sb        $zero, 0xA8($v0)
.L80034358:
/* F758 80034358 0C00CD3C */  jal       set_game_mode
/* F75C 8003435C 00000000 */   nop
.L80034360:
/* F760 80034360 0C00E64C */  jal       update_npcs
/* F764 80034364 00000000 */   nop
/* F768 80034368 0C00B500 */  jal       update_cameras
/* F76C 8003436C 00000000 */   nop
/* F770 80034370 0C00CE1D */  jal       intro_logos_update_fade
/* F774 80034374 00000000 */   nop
/* F778 80034378 8FBF0014 */  lw        $ra, 0x14($sp)
/* F77C 8003437C 8FB00010 */  lw        $s0, 0x10($sp)
/* F780 80034380 03E00008 */  jr        $ra
/* F784 80034384 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void state_step_logos(void) {
#if VERSION_JP
    int pressedButtons = gGameStatusPtr->pressedButtons[0];
#endif

    if (gGameStatusPtr->bSkipIntro) {
        if (intro_logos_fade_out(10)) {
            set_curtain_scale(1.0f);
            set_curtain_fade(0.0f);
            set_game_mode(GAME_MODE_TITLE_SCREEN);
        }
    } else {
#if VERSION_JP
        if ((gGameStatusPtr->introState == INTRO_STATE_1 ||
             gGameStatusPtr->introState == INTRO_STATE_2 ||
             gGameStatusPtr->introState == INTRO_STATE_3 ||
             gGameStatusPtr->introState == INTRO_STATE_4 ||
             gGameStatusPtr->introState == INTRO_STATE_5 ||
             gGameStatusPtr->introState == INTRO_STATE_6 ||
             gGameStatusPtr->introState == INTRO_STATE_7 ||
             gGameStatusPtr->introState == INTRO_STATE_8 ||
             gGameStatusPtr->introState == INTRO_STATE_9 ||
             gGameStatusPtr->introState == INTRO_STATE_A) &&
            (pressedButtons & (BUTTON_START | BUTTON_Z | BUTTON_A)))
        {
            intro_logos_set_fade_color(208);
            gGameStatusPtr->bSkipIntro = 1;
        }
#endif

        switch (gGameStatusPtr->introState) {
            case INTRO_STATE_0:
                if (intro_logos_fade_in(10)) {
                    gGameStatusPtr->introState++;
                    gGameStatusPtr->introCounter = 30;
                }
                break;
            case INTRO_STATE_1:
                if (gGameStatusPtr->introCounter == 0) {
                    intro_logos_set_fade_color(208);
                    gGameStatusPtr->introState++;
                }
                gGameStatusPtr->introCounter--;
                break;
            case INTRO_STATE_2:
                if (intro_logos_fade_out(10)) {
                    gGameStatusPtr->introState++;
#if VERSION_JP
                    gGameStatusPtr->introState += 2;
#endif
                }
                break;
            case INTRO_STATE_3:
                if (intro_logos_fade_in(10)) {
                    gGameStatusPtr->introState++;
#if VERSION_JP
                    gGameStatusPtr->introCounter = 30;
#else
                    gGameStatusPtr->introCounter = 40;
#endif
                }
                break;
            case INTRO_STATE_4:
                if (gGameStatusPtr->introCounter == 0) {
                    gGameStatusPtr->introState++;
#if VERSION_JP
                    intro_logos_set_fade_color(0);
#else
                    intro_logos_set_fade_color(208);
#endif
                }
                gGameStatusPtr->introCounter--;
                break;
            case INTRO_STATE_5:
                if (intro_logos_fade_out(10)) {
                    gGameStatusPtr->introState++;
                }
                break;
            case INTRO_STATE_6:
                if (intro_logos_fade_in(10)) {
                    gGameStatusPtr->introState++;
                    gGameStatusPtr->introCounter = 30;
                }
                break;
            case INTRO_STATE_7:
                if (gGameStatusPtr->introCounter == 0) {
                    gGameStatusPtr->introState++;
                    intro_logos_set_fade_color(208);
                    gGameStatusPtr->introCounter = 30;
                }
                gGameStatusPtr->introCounter--;
                break;
            case INTRO_STATE_8:
                if (gGameStatusPtr->introCounter == 0) {
                    gGameStatusPtr->introState++;
                    set_curtain_scale_goal(1.0f);
                    set_curtain_draw_callback(NULL);
                    set_curtain_fade_goal(0.3f);
                } else {
                    gGameStatusPtr->introCounter--;
                }
                break;
            case INTRO_STATE_9:
                if (intro_logos_fade_out(10)) {
                    gGameStatusPtr->introCounter = 15;
                    gGameStatusPtr->introState++;
                }
                break;
            case INTRO_STATE_A:
                if (gGameStatusPtr->introCounter == 0) {
                    gGameStatusPtr->introState++;
                } else {
                    gGameStatusPtr->introCounter--;
                }
                break;
            case INTRO_STATE_B:
                heap_free(gLogosImages);
                gLogosImages = NULL;
                intro_logos_set_fade_alpha(255);
                gGameStatusPtr->creditsViewportMode = 0;
                set_game_mode(GAME_MODE_INTRO);
                break;
        }
    }
    update_npcs();
    update_cameras();
    intro_logos_update_fade();
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel CancelablePlayerRunToGoal
/* 1A27DC 80273EFC 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 1A27E0 80273F00 AFB30024 */  sw        $s3, 0x24($sp)
/* 1A27E4 80273F04 0080982D */  daddu     $s3, $a0, $zero
/* 1A27E8 80273F08 AFB40028 */  sw        $s4, 0x28($sp)
/* 1A27EC 80273F0C 3C14800E */  lui       $s4, %hi(gBattleStatus)
/* 1A27F0 80273F10 2694C070 */  addiu     $s4, $s4, %lo(gBattleStatus)
/* 1A27F4 80273F14 AFBF002C */  sw        $ra, 0x2C($sp)
/* 1A27F8 80273F18 AFB20020 */  sw        $s2, 0x20($sp)
/* 1A27FC 80273F1C AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A2800 80273F20 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A2804 80273F24 F7BA0048 */  sdc1      $f26, 0x48($sp)
/* 1A2808 80273F28 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 1A280C 80273F2C F7B60038 */  sdc1      $f22, 0x38($sp)
/* 1A2810 80273F30 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 1A2814 80273F34 8E9000D8 */  lw        $s0, 0xD8($s4)
/* 1A2818 80273F38 8E71000C */  lw        $s1, 0xC($s3)
/* 1A281C 80273F3C 10A00002 */  beqz      $a1, .L80273F48
/* 1A2820 80273F40 2612000C */   addiu    $s2, $s0, 0xC
/* 1A2824 80273F44 AE600070 */  sw        $zero, 0x70($s3)
.L80273F48:
/* 1A2828 80273F48 8E620070 */  lw        $v0, 0x70($s3)
/* 1A282C 80273F4C 14400046 */  bnez      $v0, .L80274068
/* 1A2830 80273F50 00000000 */   nop
/* 1A2834 80273F54 8E250000 */  lw        $a1, 0x0($s1)
/* 1A2838 80273F58 26310004 */  addiu     $s1, $s1, 0x4
/* 1A283C 80273F5C 0C0B1EAF */  jal       evt_get_variable
/* 1A2840 80273F60 0260202D */   daddu    $a0, $s3, $zero
/* 1A2844 80273F64 A6020070 */  sh        $v0, 0x70($s0)
/* 1A2848 80273F68 8E220000 */  lw        $v0, 0x0($s1)
/* 1A284C 80273F6C AE620074 */  sw        $v0, 0x74($s3)
/* 1A2850 80273F70 C6180018 */  lwc1      $f24, 0x18($s0)
/* 1A2854 80273F74 C61A0020 */  lwc1      $f26, 0x20($s0)
/* 1A2858 80273F78 C6000144 */  lwc1      $f0, 0x144($s0)
/* 1A285C 80273F7C C614014C */  lwc1      $f20, 0x14C($s0)
/* 1A2860 80273F80 4406C000 */  mfc1      $a2, $f24
/* 1A2864 80273F84 4407D000 */  mfc1      $a3, $f26
/* 1A2868 80273F88 E600000C */  swc1      $f0, 0xC($s0)
/* 1A286C 80273F8C C6000148 */  lwc1      $f0, 0x148($s0)
/* 1A2870 80273F90 C616000C */  lwc1      $f22, 0xC($s0)
/* 1A2874 80273F94 4600A386 */  mov.s     $f14, $f20
/* 1A2878 80273F98 E6140014 */  swc1      $f20, 0x14($s0)
/* 1A287C 80273F9C 4600B306 */  mov.s     $f12, $f22
/* 1A2880 80273FA0 0C00A720 */  jal       atan2
/* 1A2884 80273FA4 E6000010 */   swc1     $f0, 0x10($s0)
/* 1A2888 80273FA8 4600B306 */  mov.s     $f12, $f22
/* 1A288C 80273FAC 4406C000 */  mfc1      $a2, $f24
/* 1A2890 80273FB0 4407D000 */  mfc1      $a3, $f26
/* 1A2894 80273FB4 4600A386 */  mov.s     $f14, $f20
/* 1A2898 80273FB8 0C00A7B5 */  jal       dist2D
/* 1A289C 80273FBC E6000054 */   swc1     $f0, 0x54($s0)
/* 1A28A0 80273FC0 86020070 */  lh        $v0, 0x70($s0)
/* 1A28A4 80273FC4 46000086 */  mov.s     $f2, $f0
/* 1A28A8 80273FC8 14400015 */  bnez      $v0, .L80274020
/* 1A28AC 80273FCC E6020058 */   swc1     $f2, 0x58($s0)
/* 1A28B0 80273FD0 C600004C */  lwc1      $f0, 0x4C($s0)
/* 1A28B4 80273FD4 46001003 */  div.s     $f0, $f2, $f0
/* 1A28B8 80273FD8 4600020D */  trunc.w.s $f8, $f0
/* 1A28BC 80273FDC 44034000 */  mfc1      $v1, $f8
/* 1A28C0 80273FE0 00000000 */  nop
/* 1A28C4 80273FE4 00031400 */  sll       $v0, $v1, 16
/* 1A28C8 80273FE8 00021403 */  sra       $v0, $v0, 16
/* 1A28CC 80273FEC C602004C */  lwc1      $f2, 0x4C($s0)
/* 1A28D0 80273FF0 44823000 */  mtc1      $v0, $f6
/* 1A28D4 80273FF4 00000000 */  nop
/* 1A28D8 80273FF8 468031A0 */  cvt.s.w   $f6, $f6
/* 1A28DC 80273FFC 46023102 */  mul.s     $f4, $f6, $f2
/* 1A28E0 80274000 00000000 */  nop
/* 1A28E4 80274004 C6000058 */  lwc1      $f0, 0x58($s0)
/* 1A28E8 80274008 46040001 */  sub.s     $f0, $f0, $f4
/* 1A28EC 8027400C 46060003 */  div.s     $f0, $f0, $f6
/* 1A28F0 80274010 46001080 */  add.s     $f2, $f2, $f0
/* 1A28F4 80274014 A6030070 */  sh        $v1, 0x70($s0)
/* 1A28F8 80274018 0809D00D */  j         .L80274034
/* 1A28FC 8027401C E602004C */   swc1     $f2, 0x4C($s0)
.L80274020:
/* 1A2900 80274020 44820000 */  mtc1      $v0, $f0
/* 1A2904 80274024 00000000 */  nop
/* 1A2908 80274028 46800020 */  cvt.s.w   $f0, $f0
/* 1A290C 8027402C 46001003 */  div.s     $f0, $f2, $f0
/* 1A2910 80274030 E600004C */  swc1      $f0, 0x4C($s0)
.L80274034:
/* 1A2914 80274034 860201B4 */  lh        $v0, 0x1B4($s0)
/* 1A2918 80274038 86430064 */  lh        $v1, 0x64($s2)
/* 1A291C 8027403C 24420001 */  addiu     $v0, $v0, 0x1
/* 1A2920 80274040 44820000 */  mtc1      $v0, $f0
/* 1A2924 80274044 00000000 */  nop
/* 1A2928 80274048 46800020 */  cvt.s.w   $f0, $f0
/* 1A292C 8027404C E640004C */  swc1      $f0, 0x4C($s2)
/* 1A2930 80274050 1060006C */  beqz      $v1, .L80274204
/* 1A2934 80274054 24020002 */   addiu    $v0, $zero, 0x2
/* 1A2938 80274058 24020001 */  addiu     $v0, $zero, 0x1
/* 1A293C 8027405C AE600078 */  sw        $zero, 0x78($s3)
/* 1A2940 80274060 AE60007C */  sw        $zero, 0x7C($s3)
/* 1A2944 80274064 AE620070 */  sw        $v0, 0x70($s3)
.L80274068:
/* 1A2948 80274068 8E450040 */  lw        $a1, 0x40($s2)
/* 1A294C 8027406C 8E460048 */  lw        $a2, 0x48($s2)
/* 1A2950 80274070 0C09904A */  jal       add_xz_vec3f
/* 1A2954 80274074 0240202D */   daddu    $a0, $s2, $zero
/* 1A2958 80274078 C6400000 */  lwc1      $f0, 0x0($s2)
/* 1A295C 8027407C E6000144 */  swc1      $f0, 0x144($s0)
/* 1A2960 80274080 C6400004 */  lwc1      $f0, 0x4($s2)
/* 1A2964 80274084 E6000148 */  swc1      $f0, 0x148($s0)
/* 1A2968 80274088 C6400008 */  lwc1      $f0, 0x8($s2)
/* 1A296C 8027408C E600014C */  swc1      $f0, 0x14C($s0)
/* 1A2970 80274090 C6420040 */  lwc1      $f2, 0x40($s2)
/* 1A2974 80274094 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 1A2978 80274098 44810000 */  mtc1      $at, $f0
/* 1A297C 8027409C 00000000 */  nop
/* 1A2980 802740A0 4600103C */  c.lt.s    $f2, $f0
/* 1A2984 802740A4 00000000 */  nop
/* 1A2988 802740A8 45000007 */  bc1f      .L802740C8
/* 1A298C 802740AC 0000202D */   daddu    $a0, $zero, $zero
/* 1A2990 802740B0 C600018C */  lwc1      $f0, 0x18C($s0)
/* 1A2994 802740B4 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A2998 802740B8 8E050144 */  lw        $a1, 0x144($s0)
/* 1A299C 802740BC 8E060148 */  lw        $a2, 0x148($s0)
/* 1A29A0 802740C0 0809D038 */  j         .L802740E0
/* 1A29A4 802740C4 8E07014C */   lw       $a3, 0x14C($s0)
.L802740C8:
/* 1A29A8 802740C8 C600018C */  lwc1      $f0, 0x18C($s0)
/* 1A29AC 802740CC E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A29B0 802740D0 8E050144 */  lw        $a1, 0x144($s0)
/* 1A29B4 802740D4 8E060148 */  lw        $a2, 0x148($s0)
/* 1A29B8 802740D8 8E07014C */  lw        $a3, 0x14C($s0)
/* 1A29BC 802740DC 24040001 */  addiu     $a0, $zero, 0x1
.L802740E0:
/* 1A29C0 802740E0 0C0990BC */  jal       play_movement_dust_effects
/* 1A29C4 802740E4 00000000 */   nop
/* 1A29C8 802740E8 C642004C */  lwc1      $f2, 0x4C($s2)
/* 1A29CC 802740EC C6400040 */  lwc1      $f0, 0x40($s2)
/* 1A29D0 802740F0 46001080 */  add.s     $f2, $f2, $f0
/* 1A29D4 802740F4 E642004C */  swc1      $f2, 0x4C($s2)
/* 1A29D8 802740F8 860201B4 */  lh        $v0, 0x1B4($s0)
/* 1A29DC 802740FC 44820000 */  mtc1      $v0, $f0
/* 1A29E0 80274100 00000000 */  nop
/* 1A29E4 80274104 46800020 */  cvt.s.w   $f0, $f0
/* 1A29E8 80274108 4602003C */  c.lt.s    $f0, $f2
/* 1A29EC 8027410C 00000000 */  nop
/* 1A29F0 80274110 45000013 */  bc1f      .L80274160
/* 1A29F4 80274114 00000000 */   nop
/* 1A29F8 80274118 92020135 */  lbu       $v0, 0x135($s0)
/* 1A29FC 8027411C 24420001 */  addiu     $v0, $v0, 0x1
/* 1A2A00 80274120 A2020135 */  sb        $v0, 0x135($s0)
/* 1A2A04 80274124 AE40004C */  sw        $zero, 0x4C($s2)
/* 1A2A08 80274128 92020135 */  lbu       $v0, 0x135($s0)
/* 1A2A0C 8027412C 30420001 */  andi      $v0, $v0, 0x1
/* 1A2A10 80274130 10400004 */  beqz      $v0, .L80274144
/* 1A2A14 80274134 24040141 */   addiu    $a0, $zero, 0x141
/* 1A2A18 80274138 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1A2A1C 8027413C 0809D054 */  j         .L80274150
/* 1A2A20 80274140 E7A00010 */   swc1     $f0, 0x10($sp)
.L80274144:
/* 1A2A24 80274144 C600014C */  lwc1      $f0, 0x14C($s0)
/* 1A2A28 80274148 24040142 */  addiu     $a0, $zero, 0x142
/* 1A2A2C 8027414C E7A00010 */  swc1      $f0, 0x10($sp)
.L80274150:
/* 1A2A30 80274150 8E060144 */  lw        $a2, 0x144($s0)
/* 1A2A34 80274154 8E070148 */  lw        $a3, 0x148($s0)
/* 1A2A38 80274158 0C052757 */  jal       sfx_play_sound_at_position
/* 1A2A3C 8027415C 0000282D */   daddu    $a1, $zero, $zero
.L80274160:
/* 1A2A40 80274160 8E62007C */  lw        $v0, 0x7C($s3)
/* 1A2A44 80274164 2842000D */  slti      $v0, $v0, 0xD
/* 1A2A48 80274168 14400013 */  bnez      $v0, .L802741B8
/* 1A2A4C 8027416C 00000000 */   nop
/* 1A2A50 80274170 8E620078 */  lw        $v0, 0x78($s3)
/* 1A2A54 80274174 14400009 */  bnez      $v0, .L8027419C
/* 1A2A58 80274178 00000000 */   nop
/* 1A2A5C 8027417C 8E820210 */  lw        $v0, 0x210($s4)
/* 1A2A60 80274180 30428000 */  andi      $v0, $v0, 0x8000
/* 1A2A64 80274184 14400002 */  bnez      $v0, .L80274190
/* 1A2A68 80274188 24020001 */   addiu    $v0, $zero, 0x1
/* 1A2A6C 8027418C AE620078 */  sw        $v0, 0x78($s3)
.L80274190:
/* 1A2A70 80274190 8E620078 */  lw        $v0, 0x78($s3)
/* 1A2A74 80274194 10400008 */  beqz      $v0, .L802741B8
/* 1A2A78 80274198 00000000 */   nop
.L8027419C:
/* 1A2A7C 8027419C 8E820214 */  lw        $v0, 0x214($s4)
/* 1A2A80 802741A0 30428000 */  andi      $v0, $v0, 0x8000
/* 1A2A84 802741A4 10400004 */  beqz      $v0, .L802741B8
/* 1A2A88 802741A8 0260202D */   daddu    $a0, $s3, $zero
/* 1A2A8C 802741AC 8C850074 */  lw        $a1, 0x74($a0)
/* 1A2A90 802741B0 0809D07E */  j         .L802741F8
/* 1A2A94 802741B4 24060001 */   addiu    $a2, $zero, 0x1
.L802741B8:
/* 1A2A98 802741B8 8E62007C */  lw        $v0, 0x7C($s3)
/* 1A2A9C 802741BC 24420001 */  addiu     $v0, $v0, 0x1
/* 1A2AA0 802741C0 AE62007C */  sw        $v0, 0x7C($s3)
/* 1A2AA4 802741C4 96420064 */  lhu       $v0, 0x64($s2)
/* 1A2AA8 802741C8 2442FFFF */  addiu     $v0, $v0, -0x1
/* 1A2AAC 802741CC A6420064 */  sh        $v0, 0x64($s2)
/* 1A2AB0 802741D0 00021400 */  sll       $v0, $v0, 16
/* 1A2AB4 802741D4 1C40000B */  bgtz      $v0, .L80274204
/* 1A2AB8 802741D8 0000102D */   daddu    $v0, $zero, $zero
/* 1A2ABC 802741DC C640000C */  lwc1      $f0, 0xC($s2)
/* 1A2AC0 802741E0 E6000144 */  swc1      $f0, 0x144($s0)
/* 1A2AC4 802741E4 C6400014 */  lwc1      $f0, 0x14($s2)
/* 1A2AC8 802741E8 0260202D */  daddu     $a0, $s3, $zero
/* 1A2ACC 802741EC E600014C */  swc1      $f0, 0x14C($s0)
/* 1A2AD0 802741F0 8C850074 */  lw        $a1, 0x74($a0)
/* 1A2AD4 802741F4 0000302D */  daddu     $a2, $zero, $zero
.L802741F8:
/* 1A2AD8 802741F8 0C0B2026 */  jal       evt_set_variable
/* 1A2ADC 802741FC 00000000 */   nop
/* 1A2AE0 80274200 24020002 */  addiu     $v0, $zero, 0x2
.L80274204:
/* 1A2AE4 80274204 8FBF002C */  lw        $ra, 0x2C($sp)
/* 1A2AE8 80274208 8FB40028 */  lw        $s4, 0x28($sp)
/* 1A2AEC 8027420C 8FB30024 */  lw        $s3, 0x24($sp)
/* 1A2AF0 80274210 8FB20020 */  lw        $s2, 0x20($sp)
/* 1A2AF4 80274214 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1A2AF8 80274218 8FB00018 */  lw        $s0, 0x18($sp)
/* 1A2AFC 8027421C D7BA0048 */  ldc1      $f26, 0x48($sp)
/* 1A2B00 80274220 D7B80040 */  ldc1      $f24, 0x40($sp)
/* 1A2B04 80274224 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 1A2B08 80274228 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 1A2B0C 8027422C 03E00008 */  jr        $ra
/* 1A2B10 80274230 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

ApiStatus CancelablePlayerRunToGoal(Evt* script, s32 isInitialCall) {
    BattleStatus* battleStatus = &gBattleStatus;
    Bytecode* args = script->ptrReadPos;
    Actor* player = battleStatus->playerActor;
    ActorState* playerState = &player->state;
    f32 currentX, currentZ, goalX, goalZ;

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

    if (!script->functionTemp[0]) {
        player->state.moveTime = evt_get_variable(script, *args++);
        script->functionTemp[1] = *args++;
        player->state.currentPos.x = player->currentPos.x;
        player->state.currentPos.y = player->currentPos.y;
        player->state.currentPos.z = player->currentPos.z;

        goalX = player->state.goalPos.x;
        goalZ = player->state.goalPos.z;
        currentX = player->state.currentPos.x;
        currentZ = player->state.currentPos.z;

        player->state.angle = atan2(currentX, currentZ, goalX, goalZ);
        player->state.distance = dist2D(currentX, currentZ, goalX, goalZ);
        if (player->state.moveTime == 0) {
            player->state.moveTime = player->state.distance / player->state.speed;
            player->state.speed += (player->state.distance - (player->state.moveTime * player->state.speed)) / player->state.moveTime;
        } else {
            player->state.speed = player->state.distance / player->state.moveTime;
        }
        playerState->distance = player->actorTypeData1b[0] + 1;

        if (playerState->moveTime == 0) {
            return ApiStatus_DONE2;
        }

        script->functionTemp[2] = FALSE;
        script->functionTemp[3] = 0;
        script->functionTemp[0] = TRUE;
    }

    add_xz_vec3f(&playerState->currentPos, playerState->speed, playerState->angle);

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

    if (playerState->speed < 4.0f) {
        play_movement_dust_effects(0, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
    } else {
        play_movement_dust_effects(1, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw);
    }

    playerState->distance += playerState->speed;
    if (playerState->distance > player->actorTypeData1b[0]) {
        player->footStepCounter++;
        playerState->distance = 0.0f;
        if ((player->footStepCounter % 2) != 0) {
            sfx_play_sound_at_position(SOUND_STEP_NORMAL1, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
        } else {
            sfx_play_sound_at_position(SOUND_STEP_NORMAL2, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z);
        }
    }

    if (script->functionTemp[3] > 12) {
        if (!script->functionTemp[2]) {
            if (!(battleStatus->currentButtonsDown & BUTTON_A)) {
                script->functionTemp[2] = TRUE;
            }
        }

        if (script->functionTemp[2]) {
            if (battleStatus->currentButtonsPressed & BUTTON_A) {
                evt_set_variable(script, script->functionTemp[1], 1);
                return ApiStatus_DONE2;
            }
        }
    }

    script->functionTemp[3]++;

    playerState->moveTime--;
    if (playerState->moveTime > 0) {
        return ApiStatus_BLOCK;
    }

    player->currentPos.x = playerState->goalPos.x;
    player->currentPos.z = playerState->goalPos.z;
    evt_set_variable(script, script->functionTemp[1], 0);
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_8025C918
/* 18B1F8 8025C918 27BDFF58 */  addiu     $sp, $sp, -0xA8
/* 18B1FC 8025C91C AFB70084 */  sw        $s7, 0x84($sp)
/* 18B200 8025C920 00A0B82D */  daddu     $s7, $a1, $zero
/* 18B204 8025C924 AFBF008C */  sw        $ra, 0x8C($sp)
/* 18B208 8025C928 AFBE0088 */  sw        $fp, 0x88($sp)
/* 18B20C 8025C92C AFB60080 */  sw        $s6, 0x80($sp)
/* 18B210 8025C930 AFB5007C */  sw        $s5, 0x7C($sp)
/* 18B214 8025C934 AFB40078 */  sw        $s4, 0x78($sp)
/* 18B218 8025C938 AFB30074 */  sw        $s3, 0x74($sp)
/* 18B21C 8025C93C AFB20070 */  sw        $s2, 0x70($sp)
/* 18B220 8025C940 AFB1006C */  sw        $s1, 0x6C($sp)
/* 18B224 8025C944 AFB00068 */  sw        $s0, 0x68($sp)
/* 18B228 8025C948 F7B800A0 */  sdc1      $f24, 0xA0($sp)
/* 18B22C 8025C94C F7B60098 */  sdc1      $f22, 0x98($sp)
/* 18B230 8025C950 F7B40090 */  sdc1      $f20, 0x90($sp)
/* 18B234 8025C954 AFA700B4 */  sw        $a3, 0xB4($sp)
/* 18B238 8025C958 8EF200C0 */  lw        $s2, 0xC0($s7)
/* 18B23C 8025C95C 82420751 */  lb        $v0, 0x751($s2)
/* 18B240 8025C960 1040001B */  beqz      $v0, .L8025C9D0
/* 18B244 8025C964 0080F02D */   daddu    $fp, $a0, $zero
/* 18B248 8025C968 2402FFFE */  addiu     $v0, $zero, -0x2
/* 18B24C 8025C96C A2420752 */  sb        $v0, 0x752($s2)
/* 18B250 8025C970 A640075A */  sh        $zero, 0x75A($s2)
/* 18B254 8025C974 A2400751 */  sb        $zero, 0x751($s2)
/* 18B258 8025C978 17C0000C */  bnez      $fp, .L8025C9AC
/* 18B25C 8025C97C A6400758 */   sh       $zero, 0x758($s2)
/* 18B260 8025C980 0000202D */  daddu     $a0, $zero, $zero
/* 18B264 8025C984 24050011 */  addiu     $a1, $zero, 0x11
/* 18B268 8025C988 24060014 */  addiu     $a2, $zero, 0x14
/* 18B26C 8025C98C 0080382D */  daddu     $a3, $a0, $zero
/* 18B270 8025C990 240200FF */  addiu     $v0, $zero, 0xFF
/* 18B274 8025C994 AFA00010 */  sw        $zero, 0x10($sp)
/* 18B278 8025C998 AFA20014 */  sw        $v0, 0x14($sp)
/* 18B27C 8025C99C 0C0B77FE */  jal       set_player_imgfx_all
/* 18B280 8025C9A0 AFA00018 */   sw       $zero, 0x18($sp)
/* 18B284 8025C9A4 08097274 */  j         .L8025C9D0
/* 18B288 8025C9A8 00000000 */   nop
.L8025C9AC:
/* 18B28C 8025C9AC 24050011 */  addiu     $a1, $zero, 0x11
/* 18B290 8025C9B0 24060014 */  addiu     $a2, $zero, 0x14
/* 18B294 8025C9B4 240200FF */  addiu     $v0, $zero, 0xFF
/* 18B298 8025C9B8 AFA00010 */  sw        $zero, 0x10($sp)
/* 18B29C 8025C9BC AFA20014 */  sw        $v0, 0x14($sp)
/* 18B2A0 8025C9C0 AFA00018 */  sw        $zero, 0x18($sp)
/* 18B2A4 8025C9C4 8EE40084 */  lw        $a0, 0x84($s7)
/* 18B2A8 8025C9C8 0C0B7A25 */  jal       set_npc_imgfx_all
/* 18B2AC 8025C9CC 0000382D */   daddu    $a3, $zero, $zero
.L8025C9D0:
/* 18B2B0 8025C9D0 9642075C */  lhu       $v0, 0x75C($s2)
/* 18B2B4 8025C9D4 24420007 */  addiu     $v0, $v0, 0x7
/* 18B2B8 8025C9D8 00021C00 */  sll       $v1, $v0, 16
/* 18B2BC 8025C9DC 00032403 */  sra       $a0, $v1, 16
/* 18B2C0 8025C9E0 A642075C */  sh        $v0, 0x75C($s2)
/* 18B2C4 8025C9E4 28820168 */  slti      $v0, $a0, 0x168
/* 18B2C8 8025C9E8 14400010 */  bnez      $v0, .L8025CA2C
/* 18B2CC 8025C9EC 0000802D */   daddu    $s0, $zero, $zero
/* 18B2D0 8025C9F0 3C02B60B */  lui       $v0, (0xB60B60B7 >> 16)
/* 18B2D4 8025C9F4 344260B7 */  ori       $v0, $v0, (0xB60B60B7 & 0xFFFF)
/* 18B2D8 8025C9F8 00820018 */  mult      $a0, $v0
/* 18B2DC 8025C9FC 00031FC3 */  sra       $v1, $v1, 31
/* 18B2E0 8025CA00 00004010 */  mfhi      $t0
/* 18B2E4 8025CA04 01041021 */  addu      $v0, $t0, $a0
/* 18B2E8 8025CA08 00021203 */  sra       $v0, $v0, 8
/* 18B2EC 8025CA0C 00431023 */  subu      $v0, $v0, $v1
/* 18B2F0 8025CA10 00021840 */  sll       $v1, $v0, 1
/* 18B2F4 8025CA14 00621821 */  addu      $v1, $v1, $v0
/* 18B2F8 8025CA18 00031100 */  sll       $v0, $v1, 4
/* 18B2FC 8025CA1C 00431023 */  subu      $v0, $v0, $v1
/* 18B300 8025CA20 000210C0 */  sll       $v0, $v0, 3
/* 18B304 8025CA24 00821023 */  subu      $v0, $a0, $v0
/* 18B308 8025CA28 A642075C */  sh        $v0, 0x75C($s2)
.L8025CA2C:
/* 18B30C 8025CA2C 3C138000 */  lui       $s3, (0x80000000 >> 16)
/* 18B310 8025CA30 0200882D */  daddu     $s1, $s0, $zero
/* 18B314 8025CA34 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* 18B318 8025CA38 4481C800 */  mtc1      $at, $f25
/* 18B31C 8025CA3C 4480C000 */  mtc1      $zero, $f24
/* 18B320 8025CA40 3C01405C */  lui       $at, (0x405C0000 >> 16)
/* 18B324 8025CA44 4481B800 */  mtc1      $at, $f23
/* 18B328 8025CA48 4480B000 */  mtc1      $zero, $f22
/* 18B32C 8025CA4C 3C0141E0 */  lui       $at, (0x41E00000 >> 16)
/* 18B330 8025CA50 4481A800 */  mtc1      $at, $f21
/* 18B334 8025CA54 4480A000 */  mtc1      $zero, $f20
.L8025CA58:
/* 18B338 8025CA58 9644075C */  lhu       $a0, 0x75C($s2)
/* 18B33C 8025CA5C 00912021 */  addu      $a0, $a0, $s1
/* 18B340 8025CA60 00042400 */  sll       $a0, $a0, 16
/* 18B344 8025CA64 0C00A4F5 */  jal       cosine
/* 18B348 8025CA68 00042403 */   sra      $a0, $a0, 16
/* 18B34C 8025CA6C 46000021 */  cvt.d.s   $f0, $f0
/* 18B350 8025CA70 46380000 */  add.d     $f0, $f0, $f24
/* 18B354 8025CA74 46360002 */  mul.d     $f0, $f0, $f22
/* 18B358 8025CA78 00000000 */  nop
/* 18B35C 8025CA7C 27A20020 */  addiu     $v0, $sp, 0x20
/* 18B360 8025CA80 4620A03E */  c.le.d    $f20, $f0
/* 18B364 8025CA84 00000000 */  nop
/* 18B368 8025CA88 45010005 */  bc1t      .L8025CAA0
/* 18B36C 8025CA8C 00501021 */   addu     $v0, $v0, $s0
/* 18B370 8025CA90 4620008D */  trunc.w.d $f2, $f0
/* 18B374 8025CA94 44031000 */  mfc1      $v1, $f2
/* 18B378 8025CA98 080972AE */  j         .L8025CAB8
/* 18B37C 8025CA9C A0430000 */   sb       $v1, 0x0($v0)
.L8025CAA0:
/* 18B380 8025CAA0 46340001 */  sub.d     $f0, $f0, $f20
/* 18B384 8025CAA4 4620008D */  trunc.w.d $f2, $f0
/* 18B388 8025CAA8 44031000 */  mfc1      $v1, $f2
/* 18B38C 8025CAAC 00000000 */  nop
/* 18B390 8025CAB0 00731825 */  or        $v1, $v1, $s3
/* 18B394 8025CAB4 A0430000 */  sb        $v1, 0x0($v0)
.L8025CAB8:
/* 18B398 8025CAB8 9644075C */  lhu       $a0, 0x75C($s2)
/* 18B39C 8025CABC 00912021 */  addu      $a0, $a0, $s1
/* 18B3A0 8025CAC0 2484002D */  addiu     $a0, $a0, 0x2D
/* 18B3A4 8025CAC4 00042400 */  sll       $a0, $a0, 16
/* 18B3A8 8025CAC8 0C00A4F5 */  jal       cosine
/* 18B3AC 8025CACC 00042403 */   sra      $a0, $a0, 16
/* 18B3B0 8025CAD0 46000021 */  cvt.d.s   $f0, $f0
/* 18B3B4 8025CAD4 46380000 */  add.d     $f0, $f0, $f24
/* 18B3B8 8025CAD8 46360002 */  mul.d     $f0, $f0, $f22
/* 18B3BC 8025CADC 00000000 */  nop
/* 18B3C0 8025CAE0 27A20038 */  addiu     $v0, $sp, 0x38
/* 18B3C4 8025CAE4 4620A03E */  c.le.d    $f20, $f0
/* 18B3C8 8025CAE8 00000000 */  nop
/* 18B3CC 8025CAEC 45010005 */  bc1t      .L8025CB04
/* 18B3D0 8025CAF0 00501021 */   addu     $v0, $v0, $s0
/* 18B3D4 8025CAF4 4620008D */  trunc.w.d $f2, $f0
/* 18B3D8 8025CAF8 44031000 */  mfc1      $v1, $f2
/* 18B3DC 8025CAFC 080972C7 */  j         .L8025CB1C
/* 18B3E0 8025CB00 A0430000 */   sb       $v1, 0x0($v0)
.L8025CB04:
/* 18B3E4 8025CB04 46340001 */  sub.d     $f0, $f0, $f20
/* 18B3E8 8025CB08 4620008D */  trunc.w.d $f2, $f0
/* 18B3EC 8025CB0C 44031000 */  mfc1      $v1, $f2
/* 18B3F0 8025CB10 00000000 */  nop
/* 18B3F4 8025CB14 00731825 */  or        $v1, $v1, $s3
/* 18B3F8 8025CB18 A0430000 */  sb        $v1, 0x0($v0)
.L8025CB1C:
/* 18B3FC 8025CB1C 9644075C */  lhu       $a0, 0x75C($s2)
/* 18B400 8025CB20 00912021 */  addu      $a0, $a0, $s1
/* 18B404 8025CB24 2484005A */  addiu     $a0, $a0, 0x5A
D_8025CB28:
/* 18B408 8025CB28 00042400 */  sll       $a0, $a0, 16
/* 18B40C 8025CB2C 0C00A4F5 */  jal       cosine
/* 18B410 8025CB30 00042403 */   sra      $a0, $a0, 16
/* 18B414 8025CB34 46000021 */  cvt.d.s   $f0, $f0
/* 18B418 8025CB38 46380000 */  add.d     $f0, $f0, $f24
/* 18B41C 8025CB3C 46360002 */  mul.d     $f0, $f0, $f22
/* 18B420 8025CB40 00000000 */  nop
/* 18B424 8025CB44 27A20050 */  addiu     $v0, $sp, 0x50
/* 18B428 8025CB48 4620A03E */  c.le.d    $f20, $f0
/* 18B42C 8025CB4C 00000000 */  nop
/* 18B430 8025CB50 45010005 */  bc1t      .L8025CB68
/* 18B434 8025CB54 00501021 */   addu     $v0, $v0, $s0
/* 18B438 8025CB58 4620008D */  trunc.w.d $f2, $f0
/* 18B43C 8025CB5C 44031000 */  mfc1      $v1, $f2
/* 18B440 8025CB60 080972E0 */  j         .L8025CB80
/* 18B444 8025CB64 A0430000 */   sb       $v1, 0x0($v0)
.L8025CB68:
/* 18B448 8025CB68 46340001 */  sub.d     $f0, $f0, $f20
/* 18B44C 8025CB6C 4620008D */  trunc.w.d $f2, $f0
/* 18B450 8025CB70 44031000 */  mfc1      $v1, $f2
/* 18B454 8025CB74 00000000 */  nop
/* 18B458 8025CB78 00731825 */  or        $v1, $v1, $s3
D_8025CB7C:
/* 18B45C 8025CB7C A0430000 */  sb        $v1, 0x0($v0)
.L8025CB80:
/* 18B460 8025CB80 26100001 */  addiu     $s0, $s0, 0x1
/* 18B464 8025CB84 2A020014 */  slti      $v0, $s0, 0x14
/* 18B468 8025CB88 1440FFB3 */  bnez      $v0, .L8025CA58
/* 18B46C 8025CB8C 26310019 */   addiu    $s1, $s1, 0x19
/* 18B470 8025CB90 86E30098 */  lh        $v1, 0x98($s7)
/* 18B474 8025CB94 241100FF */  addiu     $s1, $zero, 0xFF
/* 18B478 8025CB98 0071102A */  slt       $v0, $v1, $s1
/* 18B47C 8025CB9C 54400001 */  bnel      $v0, $zero, .L8025CBA4
/* 18B480 8025CBA0 0060882D */   daddu    $s1, $v1, $zero
.L8025CBA4:
/* 18B484 8025CBA4 8EE20000 */  lw        $v0, 0x0($s7)
/* 18B488 8025CBA8 30420100 */  andi      $v0, $v0, 0x100
/* 18B48C 8025CBAC 1040000B */  beqz      $v0, .L8025CBDC
/* 18B490 8025CBB0 3C038080 */   lui      $v1, (0x80808081 >> 16)
/* 18B494 8025CBB4 34638081 */  ori       $v1, $v1, (0x80808081 & 0xFFFF)
/* 18B498 8025CBB8 00111100 */  sll       $v0, $s1, 4
/* 18B49C 8025CBBC 00511023 */  subu      $v0, $v0, $s1
/* 18B4A0 8025CBC0 000210C0 */  sll       $v0, $v0, 3
/* 18B4A4 8025CBC4 00430018 */  mult      $v0, $v1
/* 18B4A8 8025CBC8 00004010 */  mfhi      $t0
/* 18B4AC 8025CBCC 01021821 */  addu      $v1, $t0, $v0
/* 18B4B0 8025CBD0 000319C3 */  sra       $v1, $v1, 7
/* 18B4B4 8025CBD4 000217C3 */  sra       $v0, $v0, 31
/* 18B4B8 8025CBD8 00628823 */  subu      $s1, $v1, $v0
.L8025CBDC:
/* 18B4BC 8025CBDC 0000802D */  daddu     $s0, $zero, $zero
/* 18B4C0 8025CBE0 27B60020 */  addiu     $s6, $sp, 0x20
/* 18B4C4 8025CBE4 27B50038 */  addiu     $s5, $sp, 0x38
/* 18B4C8 8025CBE8 27B40050 */  addiu     $s4, $sp, 0x50
/* 18B4CC 8025CBEC 241300FF */  addiu     $s3, $zero, 0xFF
D_8025CBF0:
/* 18B4D0 8025CBF0 02D01021 */  addu      $v0, $s6, $s0
.L8025CBF4:
/* 18B4D4 8025CBF4 02B02021 */  addu      $a0, $s5, $s0
/* 18B4D8 8025CBF8 90430000 */  lbu       $v1, 0x0($v0)
/* 18B4DC 8025CBFC 02901021 */  addu      $v0, $s4, $s0
/* 18B4E0 8025CC00 90840000 */  lbu       $a0, 0x0($a0)
/* 18B4E4 8025CC04 90420000 */  lbu       $v0, 0x0($v0)
/* 18B4E8 8025CC08 00031E00 */  sll       $v1, $v1, 24
/* 18B4EC 8025CC0C 00042400 */  sll       $a0, $a0, 16
/* 18B4F0 8025CC10 00641825 */  or        $v1, $v1, $a0
/* 18B4F4 8025CC14 00021200 */  sll       $v0, $v0, 8
/* 18B4F8 8025CC18 00621825 */  or        $v1, $v1, $v0
/* 18B4FC 8025CC1C 17C0000A */  bnez      $fp, .L8025CC48
/* 18B500 8025CC20 00713825 */   or       $a3, $v1, $s1
/* 18B504 8025CC24 0000202D */  daddu     $a0, $zero, $zero
/* 18B508 8025CC28 2405000C */  addiu     $a1, $zero, 0xC
/* 18B50C 8025CC2C 0200302D */  daddu     $a2, $s0, $zero
/* 18B510 8025CC30 AFA00010 */  sw        $zero, 0x10($sp)
/* 18B514 8025CC34 AFB30014 */  sw        $s3, 0x14($sp)
/* 18B518 8025CC38 0C0B77FE */  jal       set_player_imgfx_all
/* 18B51C 8025CC3C AFA00018 */   sw       $zero, 0x18($sp)
/* 18B520 8025CC40 0809731A */  j         .L8025CC68
/* 18B524 8025CC44 26100001 */   addiu    $s0, $s0, 0x1
.L8025CC48:
/* 18B528 8025CC48 2405000C */  addiu     $a1, $zero, 0xC
/* 18B52C 8025CC4C AFA00010 */  sw        $zero, 0x10($sp)
/* 18B530 8025CC50 AFB30014 */  sw        $s3, 0x14($sp)
/* 18B534 8025CC54 AFA00018 */  sw        $zero, 0x18($sp)
/* 18B538 8025CC58 8EE40084 */  lw        $a0, 0x84($s7)
/* 18B53C 8025CC5C 0C0B7A25 */  jal       set_npc_imgfx_all
/* 18B540 8025CC60 0200302D */   daddu    $a2, $s0, $zero
/* 18B544 8025CC64 26100001 */  addiu     $s0, $s0, 0x1
.L8025CC68:
/* 18B548 8025CC68 2A020014 */  slti      $v0, $s0, 0x14
/* 18B54C 8025CC6C 1440FFE1 */  bnez      $v0, .L8025CBF4
/* 18B550 8025CC70 02D01021 */   addu     $v0, $s6, $s0
/* 18B554 8025CC74 8FA800B4 */  lw        $t0, 0xB4($sp)
/* 18B558 8025CC78 15000004 */  bnez      $t0, .L8025CC8C
/* 18B55C 8025CC7C 00000000 */   nop
D_8025CC80:
/* 18B560 8025CC80 9642075A */  lhu       $v0, 0x75A($s2)
/* 18B564 8025CC84 2442FFFF */  addiu     $v0, $v0, -0x1
/* 18B568 8025CC88 A642075A */  sh        $v0, 0x75A($s2)
.L8025CC8C:
/* 18B56C 8025CC8C 8FBF008C */  lw        $ra, 0x8C($sp)
/* 18B570 8025CC90 8FBE0088 */  lw        $fp, 0x88($sp)
/* 18B574 8025CC94 8FB70084 */  lw        $s7, 0x84($sp)
D_8025CC98:
/* 18B578 8025CC98 8FB60080 */  lw        $s6, 0x80($sp)
/* 18B57C 8025CC9C 8FB5007C */  lw        $s5, 0x7C($sp)
/* 18B580 8025CCA0 8FB40078 */  lw        $s4, 0x78($sp)
/* 18B584 8025CCA4 8FB30074 */  lw        $s3, 0x74($sp)
D_8025CCA8:
/* 18B588 8025CCA8 8FB20070 */  lw        $s2, 0x70($sp)
/* 18B58C 8025CCAC 8FB1006C */  lw        $s1, 0x6C($sp)
/* 18B590 8025CCB0 8FB00068 */  lw        $s0, 0x68($sp)
/* 18B594 8025CCB4 D7B800A0 */  ldc1      $f24, 0xA0($sp)
/* 18B598 8025CCB8 D7B60098 */  ldc1      $f22, 0x98($sp)
/* 18B59C 8025CCBC D7B40090 */  ldc1      $f20, 0x90($sp)
/* 18B5A0 8025CCC0 03E00008 */  jr        $ra
/* 18B5A4 8025CCC4 27BD00A8 */   addiu    $sp, $sp, 0xA8

### DECOMPILED C INSTRUCTIONS:

void func_8025C918(b32 isNpcSprite, ActorPart* part, s32 yaw, s32 arg3) {
    DecorationTable* decor = part->decorationTable;
    u8 rbuf[20];
    u8 gbuf[20];
    u8 bbuf[20];
    s32 alpha;
    s32 color;
    s32 i;
    s32 baseAngle;

    if (decor->unk_751 != 0) {
        decor->unk_752 = -2;
        decor->unk75A = 0;
        decor->unk_751 = 0;
        decor->unk758 = 0;
        if (isNpcSprite == SPRITE_MODE_PLAYER) {
            set_player_imgfx_all(PLAYER_SPRITE_MAIN, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0);
        } else {
            set_npc_imgfx_all(part->spriteInstanceID, IMGFX_ALLOC_COLOR_BUF, 20, 0, 0, 255, 0);
        }
    }

    decor->unk75C += 7;
    baseAngle = decor->unk75C;

    if (decor->unk75C >= 360) {
        decor->unk75C = baseAngle % 360;
    }

    for (i = 0; i < ARRAY_COUNT(rbuf); i++) {
        rbuf[i] = (cosine(decor->unk75C + (25 * i)) + 1.0) * 112.0;
        gbuf[i] = (cosine(decor->unk75C + (25 * i) + 45) + 1.0) * 112.0;
        bbuf[i] = (cosine(decor->unk75C + (25 * i) + 90) + 1.0) * 112.0;
    }

    alpha = 255;
    if (part->opacity < 255) {
        alpha = part->opacity;
    }
    if (part->flags & 0x100) {
        alpha = (alpha * 120) / 255;
    }

    for (i = 0; i < ARRAY_COUNT(rbuf); i++) {
        color = (rbuf[i] << 0x18) | (gbuf[i] << 0x10) | (bbuf[i] << 8) | alpha;
        if (isNpcSprite == SPRITE_MODE_PLAYER) {
            set_player_imgfx_all(PLAYER_SPRITE_MAIN, IMGFX_COLOR_BUF_SET_MODULATE, i, color, 0, 255, 0);
        } else {
            set_npc_imgfx_all(part->spriteInstanceID, IMGFX_COLOR_BUF_SET_MODULATE, i, color, 0, 255, 0);
        }
    }

    if (arg3 == 0) {
        decor->unk75A -= 1;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel fire_breath_update
/* 372AEC E006E35C 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 372AF0 E006E360 AFBF0034 */  sw        $ra, 0x34($sp)
/* 372AF4 E006E364 AFB20030 */  sw        $s2, 0x30($sp)
/* 372AF8 E006E368 AFB1002C */  sw        $s1, 0x2C($sp)
/* 372AFC E006E36C AFB00028 */  sw        $s0, 0x28($sp)
/* 372B00 E006E370 8C90000C */  lw        $s0, 0xC($a0)
/* 372B04 E006E374 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 372B08 E006E378 44811000 */  mtc1      $at, $f2
/* 372B0C E006E37C C600004C */  lwc1      $f0, 0x4C($s0)
/* 372B10 E006E380 46800020 */  cvt.s.w   $f0, $f0
/* 372B14 E006E384 8E020048 */  lw        $v0, 0x48($s0)
/* 372B18 E006E388 46020002 */  mul.s     $f0, $f0, $f2
/* 372B1C E006E38C 00000000 */  nop
/* 372B20 E006E390 2442FFFF */  addiu     $v0, $v0, -0x1
/* 372B24 E006E394 AE020048 */  sw        $v0, 0x48($s0)
/* 372B28 E006E398 8E02004C */  lw        $v0, 0x4C($s0)
/* 372B2C E006E39C 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 372B30 E006E3A0 44811000 */  mtc1      $at, $f2
/* 372B34 E006E3A4 24430001 */  addiu     $v1, $v0, 0x1
/* 372B38 E006E3A8 8E020048 */  lw        $v0, 0x48($s0)
/* 372B3C E006E3AC AE03004C */  sw        $v1, 0x4C($s0)
/* 372B40 E006E3B0 46020003 */  div.s     $f0, $f0, $f2
/* 372B44 E006E3B4 04410005 */  bgez      $v0, .LE006E3CC
/* 372B48 E006E3B8 E600005C */   swc1     $f0, 0x5C($s0)
/* 372B4C E006E3BC 0C080128 */  jal       shim_remove_effect
/* 372B50 E006E3C0 00000000 */   nop
/* 372B54 E006E3C4 0801B9B3 */  j         .LE006E6CC
/* 372B58 E006E3C8 00000000 */   nop
.LE006E3CC:
/* 372B5C E006E3CC 0040882D */  daddu     $s1, $v0, $zero
/* 372B60 E006E3D0 8E120044 */  lw        $s2, 0x44($s0)
/* 372B64 E006E3D4 2A220006 */  slti      $v0, $s1, 0x6
/* 372B68 E006E3D8 14400011 */  bnez      $v0, .LE006E420
/* 372B6C E006E3DC 0060202D */   daddu    $a0, $v1, $zero
/* 372B70 E006E3E0 8E020000 */  lw        $v0, 0x0($s0)
/* 372B74 E006E3E4 1440000E */  bnez      $v0, .LE006E420
/* 372B78 E006E3E8 00000000 */   nop
/* 372B7C E006E3EC C6000038 */  lwc1      $f0, 0x38($s0)
/* 372B80 E006E3F0 3C014004 */  lui       $at, (0x40040000 >> 16)
/* 372B84 E006E3F4 44811800 */  mtc1      $at, $f3
/* 372B88 E006E3F8 44801000 */  mtc1      $zero, $f2
/* 372B8C E006E3FC 46000021 */  cvt.d.s   $f0, $f0
/* 372B90 E006E400 46201081 */  sub.d     $f2, $f2, $f0
/* 372B94 E006E404 3C01E007 */  lui       $at, (0xE0070000 >> 16)
/* 372B98 E006E408 D424EC30 */  ldc1      $f4, -0x13D0($at)
/* 372B9C E006E40C 46241082 */  mul.d     $f2, $f2, $f4
/* 372BA0 E006E410 00000000 */  nop
/* 372BA4 E006E414 46220000 */  add.d     $f0, $f0, $f2
/* 372BA8 E006E418 46200020 */  cvt.s.d   $f0, $f0
/* 372BAC E006E41C E6000038 */  swc1      $f0, 0x38($s0)
.LE006E420:
/* 372BB0 E006E420 C6060024 */  lwc1      $f6, 0x24($s0)
/* 372BB4 E006E424 C60C0018 */  lwc1      $f12, 0x18($s0)
/* 372BB8 E006E428 460C3181 */  sub.s     $f6, $f6, $f12
/* 372BBC E006E42C C6000050 */  lwc1      $f0, 0x50($s0)
/* 372BC0 E006E430 46003180 */  add.s     $f6, $f6, $f0
/* 372BC4 E006E434 44847000 */  mtc1      $a0, $f14
/* 372BC8 E006E438 00000000 */  nop
/* 372BCC E006E43C 468073A0 */  cvt.s.w   $f14, $f14
/* 372BD0 E006E440 460E3182 */  mul.s     $f6, $f6, $f14
/* 372BD4 E006E444 00000000 */  nop
/* 372BD8 E006E448 C6040028 */  lwc1      $f4, 0x28($s0)
/* 372BDC E006E44C C60A001C */  lwc1      $f10, 0x1C($s0)
/* 372BE0 E006E450 460A2101 */  sub.s     $f4, $f4, $f10
/* 372BE4 E006E454 C6000054 */  lwc1      $f0, 0x54($s0)
/* 372BE8 E006E458 46002100 */  add.s     $f4, $f4, $f0
/* 372BEC E006E45C 460E2102 */  mul.s     $f4, $f4, $f14
/* 372BF0 E006E460 00000000 */  nop
/* 372BF4 E006E464 C6080020 */  lwc1      $f8, 0x20($s0)
/* 372BF8 E006E468 C600002C */  lwc1      $f0, 0x2C($s0)
/* 372BFC E006E46C 46080001 */  sub.s     $f0, $f0, $f8
/* 372C00 E006E470 C6020058 */  lwc1      $f2, 0x58($s0)
/* 372C04 E006E474 46020000 */  add.s     $f0, $f0, $f2
/* 372C08 E006E478 460E0002 */  mul.s     $f0, $f0, $f14
/* 372C0C E006E47C 00000000 */  nop
/* 372C10 E006E480 44921000 */  mtc1      $s2, $f2
/* 372C14 E006E484 00000000 */  nop
/* 372C18 E006E488 468010A0 */  cvt.s.w   $f2, $f2
/* 372C1C E006E48C 46023183 */  div.s     $f6, $f6, $f2
/* 372C20 E006E490 46066300 */  add.s     $f12, $f12, $f6
/* 372C24 E006E494 24020001 */  addiu     $v0, $zero, 0x1
/* 372C28 E006E498 46022103 */  div.s     $f4, $f4, $f2
/* 372C2C E006E49C 46045280 */  add.s     $f10, $f10, $f4
/* 372C30 E006E4A0 8E030000 */  lw        $v1, 0x0($s0)
/* 372C34 E006E4A4 46020003 */  div.s     $f0, $f0, $f2
/* 372C38 E006E4A8 46004200 */  add.s     $f8, $f8, $f0
/* 372C3C E006E4AC E60C000C */  swc1      $f12, 0xC($s0)
/* 372C40 E006E4B0 E60A0010 */  swc1      $f10, 0x10($s0)
/* 372C44 E006E4B4 1462000E */  bne       $v1, $v0, .LE006E4F0
/* 372C48 E006E4B8 E6080014 */   swc1     $f8, 0x14($s0)
/* 372C4C E006E4BC 3C01E007 */  lui       $at, (0xE0070000 >> 16)
/* 372C50 E006E4C0 D420EC38 */  ldc1      $f0, -0x13C8($at)
/* 372C54 E006E4C4 460070A1 */  cvt.d.s   $f2, $f14
/* 372C58 E006E4C8 46201082 */  mul.d     $f2, $f2, $f0
/* 372C5C E006E4CC 00000000 */  nop
/* 372C60 E006E4D0 C6000060 */  lwc1      $f0, 0x60($s0)
/* 372C64 E006E4D4 46000021 */  cvt.d.s   $f0, $f0
/* 372C68 E006E4D8 46220000 */  add.d     $f0, $f0, $f2
/* 372C6C E006E4DC 46005086 */  mov.s     $f2, $f10
/* 372C70 E006E4E0 46200020 */  cvt.s.d   $f0, $f0
/* 372C74 E006E4E4 46001080 */  add.s     $f2, $f2, $f0
/* 372C78 E006E4E8 E6000060 */  swc1      $f0, 0x60($s0)
/* 372C7C E006E4EC E6020010 */  swc1      $f2, 0x10($s0)
.LE006E4F0:
/* 372C80 E006E4F0 8E020008 */  lw        $v0, 0x8($s0)
/* 372C84 E006E4F4 24420001 */  addiu     $v0, $v0, 0x1
/* 372C88 E006E4F8 14820034 */  bne       $a0, $v0, .LE006E5CC
/* 372C8C E006E4FC 2A22000A */   slti     $v0, $s1, 0xA
/* 372C90 E006E500 8E020004 */  lw        $v0, 0x4($s0)
/* 372C94 E006E504 18400031 */  blez      $v0, .LE006E5CC
/* 372C98 E006E508 2A22000A */   slti     $v0, $s1, 0xA
/* 372C9C E006E50C 0C080150 */  jal       shim_load_effect
/* 372CA0 E006E510 24040037 */   addiu    $a0, $zero, 0x37
/* 372CA4 E006E514 C6000024 */  lwc1      $f0, 0x24($s0)
/* 372CA8 E006E518 E7A00010 */  swc1      $f0, 0x10($sp)
/* 372CAC E006E51C C6000028 */  lwc1      $f0, 0x28($s0)
/* 372CB0 E006E520 E7A00014 */  swc1      $f0, 0x14($sp)
/* 372CB4 E006E524 C600002C */  lwc1      $f0, 0x2C($s0)
/* 372CB8 E006E528 E7A00018 */  swc1      $f0, 0x18($sp)
/* 372CBC E006E52C 8E020004 */  lw        $v0, 0x4($s0)
/* 372CC0 E006E530 2442FFFF */  addiu     $v0, $v0, -0x1
/* 372CC4 E006E534 AFA2001C */  sw        $v0, 0x1C($sp)
/* 372CC8 E006E538 8E020008 */  lw        $v0, 0x8($s0)
/* 372CCC E006E53C AFB20024 */  sw        $s2, 0x24($sp)
/* 372CD0 E006E540 AFA20020 */  sw        $v0, 0x20($sp)
/* 372CD4 E006E544 8E040000 */  lw        $a0, 0x0($s0)
/* 372CD8 E006E548 8E050018 */  lw        $a1, 0x18($s0)
/* 372CDC E006E54C 8E06001C */  lw        $a2, 0x1C($s0)
/* 372CE0 E006E550 0C01B800 */  jal       fire_breath_main
/* 372CE4 E006E554 8E070020 */   lw       $a3, 0x20($s0)
/* 372CE8 E006E558 8C44000C */  lw        $a0, 0xC($v0)
/* 372CEC E006E55C 8E030064 */  lw        $v1, 0x64($s0)
/* 372CF0 E006E560 AC830064 */  sw        $v1, 0x64($a0)
/* 372CF4 E006E564 8C44000C */  lw        $a0, 0xC($v0)
/* 372CF8 E006E568 8E030068 */  lw        $v1, 0x68($s0)
/* 372CFC E006E56C AC830068 */  sw        $v1, 0x68($a0)
/* 372D00 E006E570 8C44000C */  lw        $a0, 0xC($v0)
/* 372D04 E006E574 8E03006C */  lw        $v1, 0x6C($s0)
/* 372D08 E006E578 AC83006C */  sw        $v1, 0x6C($a0)
/* 372D0C E006E57C 8C44000C */  lw        $a0, 0xC($v0)
/* 372D10 E006E580 8E030070 */  lw        $v1, 0x70($s0)
/* 372D14 E006E584 AC830070 */  sw        $v1, 0x70($a0)
/* 372D18 E006E588 8C44000C */  lw        $a0, 0xC($v0)
/* 372D1C E006E58C 8E030074 */  lw        $v1, 0x74($s0)
/* 372D20 E006E590 AC830074 */  sw        $v1, 0x74($a0)
/* 372D24 E006E594 8C44000C */  lw        $a0, 0xC($v0)
/* 372D28 E006E598 8E030078 */  lw        $v1, 0x78($s0)
/* 372D2C E006E59C AC830078 */  sw        $v1, 0x78($a0)
/* 372D30 E006E5A0 8C43000C */  lw        $v1, 0xC($v0)
/* 372D34 E006E5A4 C6000030 */  lwc1      $f0, 0x30($s0)
/* 372D38 E006E5A8 E4600038 */  swc1      $f0, 0x38($v1)
/* 372D3C E006E5AC E4600030 */  swc1      $f0, 0x30($v1)
/* 372D40 E006E5B0 8C43000C */  lw        $v1, 0xC($v0)
/* 372D44 E006E5B4 C6000034 */  lwc1      $f0, 0x34($s0)
/* 372D48 E006E5B8 E4600034 */  swc1      $f0, 0x34($v1)
/* 372D4C E006E5BC 8C42000C */  lw        $v0, 0xC($v0)
/* 372D50 E006E5C0 C600003C */  lwc1      $f0, 0x3C($s0)
/* 372D54 E006E5C4 E440003C */  swc1      $f0, 0x3C($v0)
/* 372D58 E006E5C8 2A22000A */  slti      $v0, $s1, 0xA
.LE006E5CC:
/* 372D5C E006E5CC 10400008 */  beqz      $v0, .LE006E5F0
/* 372D60 E006E5D0 00000000 */   nop
/* 372D64 E006E5D4 8E020000 */  lw        $v0, 0x0($s0)
/* 372D68 E006E5D8 14400005 */  bnez      $v0, .LE006E5F0
/* 372D6C E006E5DC 00111040 */   sll      $v0, $s1, 1
/* 372D70 E006E5E0 00511021 */  addu      $v0, $v0, $s1
/* 372D74 E006E5E4 000210C0 */  sll       $v0, $v0, 3
/* 372D78 E006E5E8 00511021 */  addu      $v0, $v0, $s1
/* 372D7C E006E5EC AE020040 */  sw        $v0, 0x40($s0)
.LE006E5F0:
/* 372D80 E006E5F0 8E030000 */  lw        $v1, 0x0($s0)
/* 372D84 E006E5F4 24020001 */  addiu     $v0, $zero, 0x1
/* 372D88 E006E5F8 1462001D */  bne       $v1, $v0, .LE006E670
/* 372D8C E006E5FC 24020002 */   addiu    $v0, $zero, 0x2
/* 372D90 E006E600 001110C0 */  sll       $v0, $s1, 3
/* 372D94 E006E604 00511023 */  subu      $v0, $v0, $s1
/* 372D98 E006E608 00021140 */  sll       $v0, $v0, 5
/* 372D9C E006E60C 16400002 */  bnez      $s2, .LE006E618
/* 372DA0 E006E610 0052001A */   div      $zero, $v0, $s2
/* 372DA4 E006E614 0007000D */  break     7
.LE006E618:
/* 372DA8 E006E618 2401FFFF */  addiu     $at, $zero, -0x1
/* 372DAC E006E61C 16410004 */  bne       $s2, $at, .LE006E630
/* 372DB0 E006E620 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 372DB4 E006E624 14410002 */  bne       $v0, $at, .LE006E630
/* 372DB8 E006E628 00000000 */   nop
/* 372DBC E006E62C 0006000D */  break     6
.LE006E630:
/* 372DC0 E006E630 00001012 */  mflo      $v0
/* 372DC4 E006E634 C6000038 */  lwc1      $f0, 0x38($s0)
/* 372DC8 E006E638 3C01E007 */  lui       $at, (0xE0070000 >> 16)
/* 372DCC E006E63C D422EC40 */  ldc1      $f2, -0x13C0($at)
/* 372DD0 E006E640 46000021 */  cvt.d.s   $f0, $f0
/* 372DD4 E006E644 46201081 */  sub.d     $f2, $f2, $f0
/* 372DD8 E006E648 3C01E007 */  lui       $at, (0xE0070000 >> 16)
/* 372DDC E006E64C D424EC48 */  ldc1      $f4, -0x13B8($at)
/* 372DE0 E006E650 46241082 */  mul.d     $f2, $f2, $f4
/* 372DE4 E006E654 00000000 */  nop
/* 372DE8 E006E658 46220000 */  add.d     $f0, $f0, $f2
/* 372DEC E006E65C 46200020 */  cvt.s.d   $f0, $f0
/* 372DF0 E006E660 E6000038 */  swc1      $f0, 0x38($s0)
/* 372DF4 E006E664 AE020040 */  sw        $v0, 0x40($s0)
/* 372DF8 E006E668 8E030000 */  lw        $v1, 0x0($s0)
/* 372DFC E006E66C 24020002 */  addiu     $v0, $zero, 0x2
.LE006E670:
/* 372E00 E006E670 14620016 */  bne       $v1, $v0, .LE006E6CC
/* 372E04 E006E674 001110C0 */   sll      $v0, $s1, 3
/* 372E08 E006E678 00511023 */  subu      $v0, $v0, $s1
/* 372E0C E006E67C 00021140 */  sll       $v0, $v0, 5
/* 372E10 E006E680 16400002 */  bnez      $s2, .LE006E68C
/* 372E14 E006E684 0052001A */   div      $zero, $v0, $s2
/* 372E18 E006E688 0007000D */  break     7
.LE006E68C:
/* 372E1C E006E68C 2401FFFF */  addiu     $at, $zero, -0x1
/* 372E20 E006E690 16410004 */  bne       $s2, $at, .LE006E6A4
/* 372E24 E006E694 3C018000 */   lui      $at, (0x80000000 >> 16)
/* 372E28 E006E698 14410002 */  bne       $v0, $at, .LE006E6A4
/* 372E2C E006E69C 00000000 */   nop
/* 372E30 E006E6A0 0006000D */  break     6
.LE006E6A4:
/* 372E34 E006E6A4 00001012 */  mflo      $v0
/* 372E38 E006E6A8 C6000034 */  lwc1      $f0, 0x34($s0)
/* 372E3C E006E6AC C6020038 */  lwc1      $f2, 0x38($s0)
/* 372E40 E006E6B0 46020001 */  sub.s     $f0, $f0, $f2
/* 372E44 E006E6B4 C604003C */  lwc1      $f4, 0x3C($s0)
/* 372E48 E006E6B8 46040002 */  mul.s     $f0, $f0, $f4
/* 372E4C E006E6BC 00000000 */  nop
/* 372E50 E006E6C0 46001080 */  add.s     $f2, $f2, $f0
/* 372E54 E006E6C4 E6020038 */  swc1      $f2, 0x38($s0)
/* 372E58 E006E6C8 AE020040 */  sw        $v0, 0x40($s0)
.LE006E6CC:
/* 372E5C E006E6CC 8FBF0034 */  lw        $ra, 0x34($sp)
/* 372E60 E006E6D0 8FB20030 */  lw        $s2, 0x30($sp)
/* 372E64 E006E6D4 8FB1002C */  lw        $s1, 0x2C($sp)
/* 372E68 E006E6D8 8FB00028 */  lw        $s0, 0x28($sp)
/* 372E6C E006E6DC 03E00008 */  jr        $ra
/* 372E70 E006E6E0 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void fire_breath_update(EffectInstance* effect) {
    FireBreathFXData* data = effect->data.fireBreath;
    s32 lifeTime;
    s32 timeLeft;
    s32 spawnTimer;

    data->timeLeft--;
    data->unk_5C = (data->spawnTimer * 4.0f) / 10.0f;
    data->spawnTimer++;

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

    timeLeft = data->timeLeft;
    lifeTime = data->lifeTime;
    spawnTimer = data->spawnTimer;

    if (timeLeft >= 6 && data->type == FIRE_BREATH_LARGE) {
        data->scale += (2.5 - data->scale) * 0.05;
    }

    data->pos.x = data->initPos.x + (((data->endPos.x - data->initPos.x + data->unk_50.x) * spawnTimer) / lifeTime);
    data->pos.y = data->initPos.y + (((data->endPos.y - data->initPos.y + data->unk_50.y) * spawnTimer) / lifeTime);
    data->pos.z = data->initPos.z + (((data->endPos.z - data->initPos.z + data->unk_50.z) * spawnTimer) / lifeTime);

    if (data->type == FIRE_BREATH_SMALL) {
        data->unk_60 += (f32) spawnTimer * 0.01;
        data->pos.y += data->unk_60;
    }

    if (spawnTimer == data->spawnDelay + 1 && data->numChildren > 0) {
        EffectInstance* spawned;

        shim_load_effect(EFFECT_FIRE_BREATH);
        spawned = fire_breath_main(
            data->type, data->initPos.x, data->initPos.y, data->initPos.z, data->endPos.x, data->endPos.y,
            data->endPos.z, data->numChildren - 1, data->spawnDelay, lifeTime
        );

        spawned->data.fireBreath->primR = data->primR;
        spawned->data.fireBreath->primG = data->primG;
        spawned->data.fireBreath->primB = data->primB;
        spawned->data.fireBreath->envR = data->envR;
        spawned->data.fireBreath->envG = data->envG;
        spawned->data.fireBreath->envB = data->envB;
        spawned->data.fireBreath->unk_30 = spawned->data.fireBreath->scale = data->unk_30;
        spawned->data.fireBreath->unk_34 = data->unk_34;
        spawned->data.fireBreath->scaleChangeFactor = data->scaleChangeFactor;
    }

    if (timeLeft < 10 && data->type == FIRE_BREATH_LARGE) {
        data->alpha = timeLeft * 25;
    }

    if (data->type == FIRE_BREATH_SMALL) {
        data->scale += (0.3 - data->scale) * 0.008;
        data->alpha = (timeLeft * 224) / lifeTime;
    }

    if (data->type == FIRE_BREATH_TINY) {
        data->scale += (data->unk_34 - data->scale) * data->scaleChangeFactor;
        data->alpha = (timeLeft * 224) / lifeTime;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel ice_pillar_update
/* 409B24 E011E194 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 409B28 E011E198 AFB30024 */  sw        $s3, 0x24($sp)
/* 409B2C E011E19C 0080982D */  daddu     $s3, $a0, $zero
/* 409B30 E011E1A0 AFBF0028 */  sw        $ra, 0x28($sp)
/* 409B34 E011E1A4 AFB20020 */  sw        $s2, 0x20($sp)
/* 409B38 E011E1A8 AFB1001C */  sw        $s1, 0x1C($sp)
/* 409B3C E011E1AC AFB00018 */  sw        $s0, 0x18($sp)
/* 409B40 E011E1B0 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 409B44 E011E1B4 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 409B48 E011E1B8 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 409B4C E011E1BC 8E630000 */  lw        $v1, 0x0($s3)
/* 409B50 E011E1C0 8E71000C */  lw        $s1, 0xC($s3)
/* 409B54 E011E1C4 30620010 */  andi      $v0, $v1, 0x10
/* 409B58 E011E1C8 10400005 */  beqz      $v0, .LE011E1E0
/* 409B5C E011E1CC 2402FFEF */   addiu    $v0, $zero, -0x11
/* 409B60 E011E1D0 00621024 */  and       $v0, $v1, $v0
/* 409B64 E011E1D4 AE620000 */  sw        $v0, 0x0($s3)
/* 409B68 E011E1D8 24020010 */  addiu     $v0, $zero, 0x10
/* 409B6C E011E1DC AE220010 */  sw        $v0, 0x10($s1)
.LE011E1E0:
/* 409B70 E011E1E0 8E230010 */  lw        $v1, 0x10($s1)
/* 409B74 E011E1E4 286203E8 */  slti      $v0, $v1, 0x3E8
/* 409B78 E011E1E8 10400002 */  beqz      $v0, .LE011E1F4
/* 409B7C E011E1EC 2462FFFF */   addiu    $v0, $v1, -0x1
/* 409B80 E011E1F0 AE220010 */  sw        $v0, 0x10($s1)
.LE011E1F4:
/* 409B84 E011E1F4 8E220014 */  lw        $v0, 0x14($s1)
/* 409B88 E011E1F8 8E240010 */  lw        $a0, 0x10($s1)
/* 409B8C E011E1FC 24430001 */  addiu     $v1, $v0, 0x1
/* 409B90 E011E200 04810085 */  bgez      $a0, .LE011E418
/* 409B94 E011E204 AE230014 */   sw       $v1, 0x14($s1)
/* 409B98 E011E208 0C080150 */  jal       shim_load_effect
/* 409B9C E011E20C 2404007A */   addiu    $a0, $zero, 0x7A
/* 409BA0 E011E210 0000902D */  daddu     $s2, $zero, $zero
/* 409BA4 E011E214 3C01E012 */  lui       $at, (0xE0120000 >> 16)
/* 409BA8 E011E218 D438E810 */  ldc1      $f24, -0x17F0($at)
.LE011E21C:
/* 409BAC E011E21C 0C080138 */  jal       shim_rand_int
/* 409BB0 E011E220 24040014 */   addiu    $a0, $zero, 0x14
/* 409BB4 E011E224 C6340004 */  lwc1      $f20, 0x4($s1)
/* 409BB8 E011E228 44820000 */  mtc1      $v0, $f0
/* 409BBC E011E22C 00000000 */  nop
/* 409BC0 E011E230 46800020 */  cvt.s.w   $f0, $f0
/* 409BC4 E011E234 4600A500 */  add.s     $f20, $f20, $f0
/* 409BC8 E011E238 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 409BCC E011E23C 44810000 */  mtc1      $at, $f0
/* 409BD0 E011E240 24040028 */  addiu     $a0, $zero, 0x28
/* 409BD4 E011E244 0C080138 */  jal       shim_rand_int
/* 409BD8 E011E248 4600A501 */   sub.s    $f20, $f20, $f0
/* 409BDC E011E24C C6220020 */  lwc1      $f2, 0x20($s1)
/* 409BE0 E011E250 44820000 */  mtc1      $v0, $f0
/* 409BE4 E011E254 00000000 */  nop
/* 409BE8 E011E258 46800020 */  cvt.s.w   $f0, $f0
/* 409BEC E011E25C 46020002 */  mul.s     $f0, $f0, $f2
/* 409BF0 E011E260 00000000 */  nop
/* 409BF4 E011E264 C6360008 */  lwc1      $f22, 0x8($s1)
/* 409BF8 E011E268 2404000A */  addiu     $a0, $zero, 0xA
/* 409BFC E011E26C 0C080138 */  jal       shim_rand_int
/* 409C00 E011E270 4600B580 */   add.s    $f22, $f22, $f0
/* 409C04 E011E274 3C01E012 */  lui       $at, (0xE0120000 >> 16)
/* 409C08 E011E278 D422E818 */  ldc1      $f2, -0x17E8($at)
/* 409C0C E011E27C 44820000 */  mtc1      $v0, $f0
/* 409C10 E011E280 00000000 */  nop
/* 409C14 E011E284 46800021 */  cvt.d.w   $f0, $f0
/* 409C18 E011E288 46220002 */  mul.d     $f0, $f0, $f2
/* 409C1C E011E28C 00000000 */  nop
/* 409C20 E011E290 46380002 */  mul.d     $f0, $f0, $f24
/* 409C24 E011E294 00000000 */  nop
/* 409C28 E011E298 001227C2 */  srl       $a0, $s2, 31
/* 409C2C E011E29C 02442021 */  addu      $a0, $s2, $a0
/* 409C30 E011E2A0 3C01E012 */  lui       $at, (0xE0120000 >> 16)
/* 409C34 E011E2A4 D422E820 */  ldc1      $f2, -0x17E0($at)
/* 409C38 E011E2A8 C6240020 */  lwc1      $f4, 0x20($s1)
/* 409C3C E011E2AC 46220000 */  add.d     $f0, $f0, $f2
/* 409C40 E011E2B0 00042043 */  sra       $a0, $a0, 1
/* 409C44 E011E2B4 46002121 */  cvt.d.s   $f4, $f4
/* 409C48 E011E2B8 46202102 */  mul.d     $f4, $f4, $f0
/* 409C4C E011E2BC 00000000 */  nop
/* 409C50 E011E2C0 00042040 */  sll       $a0, $a0, 1
/* 409C54 E011E2C4 02442023 */  subu      $a0, $s2, $a0
/* 409C58 E011E2C8 24840002 */  addiu     $a0, $a0, 0x2
/* 409C5C E011E2CC 4405A000 */  mfc1      $a1, $f20
/* 409C60 E011E2D0 C622000C */  lwc1      $f2, 0xC($s1)
/* 409C64 E011E2D4 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 409C68 E011E2D8 44810000 */  mtc1      $at, $f0
/* 409C6C E011E2DC 4406B000 */  mfc1      $a2, $f22
/* 409C70 E011E2E0 46001080 */  add.s     $f2, $f2, $f0
/* 409C74 E011E2E4 2642001E */  addiu     $v0, $s2, 0x1E
/* 409C78 E011E2E8 AFA20014 */  sw        $v0, 0x14($sp)
/* 409C7C E011E2EC 44071000 */  mfc1      $a3, $f2
/* 409C80 E011E2F0 46202120 */  cvt.s.d   $f4, $f4
/* 409C84 E011E2F4 0C044000 */  jal       ice_shard_main
/* 409C88 E011E2F8 E7A40010 */   swc1     $f4, 0x10($sp)
/* 409C8C E011E2FC 2404000A */  addiu     $a0, $zero, 0xA
/* 409C90 E011E300 0C080138 */  jal       shim_rand_int
/* 409C94 E011E304 0040802D */   daddu    $s0, $v0, $zero
/* 409C98 E011E308 44820000 */  mtc1      $v0, $f0
/* 409C9C E011E30C 00000000 */  nop
/* 409CA0 E011E310 46800021 */  cvt.d.w   $f0, $f0
/* 409CA4 E011E314 46380002 */  mul.d     $f0, $f0, $f24
/* 409CA8 E011E318 00000000 */  nop
/* 409CAC E011E31C 2404001E */  addiu     $a0, $zero, 0x1E
/* 409CB0 E011E320 8E02000C */  lw        $v0, 0xC($s0)
/* 409CB4 E011E324 46200020 */  cvt.s.d   $f0, $f0
/* 409CB8 E011E328 0C080138 */  jal       shim_rand_int
/* 409CBC E011E32C E4400044 */   swc1     $f0, 0x44($v0)
/* 409CC0 E011E330 3C01E012 */  lui       $at, (0xE0120000 >> 16)
/* 409CC4 E011E334 D422E828 */  ldc1      $f2, -0x17D8($at)
/* 409CC8 E011E338 44820000 */  mtc1      $v0, $f0
/* 409CCC E011E33C 00000000 */  nop
/* 409CD0 E011E340 46800021 */  cvt.d.w   $f0, $f0
/* 409CD4 E011E344 46220002 */  mul.d     $f0, $f0, $f2
/* 409CD8 E011E348 00000000 */  nop
/* 409CDC E011E34C 46380000 */  add.d     $f0, $f0, $f24
/* 409CE0 E011E350 24040167 */  addiu     $a0, $zero, 0x167
/* 409CE4 E011E354 8E02000C */  lw        $v0, 0xC($s0)
/* 409CE8 E011E358 46200020 */  cvt.s.d   $f0, $f0
/* 409CEC E011E35C 0C080138 */  jal       shim_rand_int
/* 409CF0 E011E360 E4400048 */   swc1     $f0, 0x48($v0)
/* 409CF4 E011E364 24040014 */  addiu     $a0, $zero, 0x14
/* 409CF8 E011E368 8E03000C */  lw        $v1, 0xC($s0)
/* 409CFC E011E36C 44820000 */  mtc1      $v0, $f0
/* 409D00 E011E370 00000000 */  nop
/* 409D04 E011E374 46800020 */  cvt.s.w   $f0, $f0
/* 409D08 E011E378 0C080138 */  jal       shim_rand_int
/* 409D0C E011E37C E460003C */   swc1     $f0, 0x3C($v1)
/* 409D10 E011E380 2404000A */  addiu     $a0, $zero, 0xA
/* 409D14 E011E384 8E03000C */  lw        $v1, 0xC($s0)
/* 409D18 E011E388 44820000 */  mtc1      $v0, $f0
/* 409D1C E011E38C 00000000 */  nop
/* 409D20 E011E390 46800020 */  cvt.s.w   $f0, $f0
/* 409D24 E011E394 0C080138 */  jal       shim_rand_int
/* 409D28 E011E398 E4600040 */   swc1     $f0, 0x40($v1)
/* 409D2C E011E39C 2404000A */  addiu     $a0, $zero, 0xA
/* 409D30 E011E3A0 2442FFFB */  addiu     $v0, $v0, -0x5
/* 409D34 E011E3A4 8E03000C */  lw        $v1, 0xC($s0)
/* 409D38 E011E3A8 44820000 */  mtc1      $v0, $f0
/* 409D3C E011E3AC 00000000 */  nop
/* 409D40 E011E3B0 46800020 */  cvt.s.w   $f0, $f0
/* 409D44 E011E3B4 0C080138 */  jal       shim_rand_int
/* 409D48 E011E3B8 E460004C */   swc1     $f0, 0x4C($v1)
/* 409D4C E011E3BC 2442FFFB */  addiu     $v0, $v0, -0x5
/* 409D50 E011E3C0 8E03000C */  lw        $v1, 0xC($s0)
/* 409D54 E011E3C4 44820000 */  mtc1      $v0, $f0
/* 409D58 E011E3C8 00000000 */  nop
/* 409D5C E011E3CC 46800020 */  cvt.s.w   $f0, $f0
/* 409D60 E011E3D0 E4600050 */  swc1      $f0, 0x50($v1)
/* 409D64 E011E3D4 8E02000C */  lw        $v0, 0xC($s0)
/* 409D68 E011E3D8 3C01BDCC */  lui       $at, (0xBDCCCCCD >> 16)
/* 409D6C E011E3DC 3421CCCD */  ori       $at, $at, (0xBDCCCCCD & 0xFFFF)
/* 409D70 E011E3E0 44810000 */  mtc1      $at, $f0
/* 409D74 E011E3E4 AC400054 */  sw        $zero, 0x54($v0)
/* 409D78 E011E3E8 8E02000C */  lw        $v0, 0xC($s0)
/* 409D7C E011E3EC 26520001 */  addiu     $s2, $s2, 0x1
/* 409D80 E011E3F0 E4400058 */  swc1      $f0, 0x58($v0)
/* 409D84 E011E3F4 2A420014 */  slti      $v0, $s2, 0x14
/* 409D88 E011E3F8 1440FF88 */  bnez      $v0, .LE011E21C
/* 409D8C E011E3FC 00000000 */   nop
/* 409D90 E011E400 0C080128 */  jal       shim_remove_effect
/* 409D94 E011E404 8E240028 */   lw       $a0, 0x28($s1)
/* 409D98 E011E408 0C080128 */  jal       shim_remove_effect
/* 409D9C E011E40C 0260202D */   daddu    $a0, $s3, $zero
/* 409DA0 E011E410 08047942 */  j         .LE011E508
/* 409DA4 E011E414 00000000 */   nop
.LE011E418:
/* 409DA8 E011E418 0080802D */  daddu     $s0, $a0, $zero
/* 409DAC E011E41C 92220025 */  lbu       $v0, 0x25($s1)
/* 409DB0 E011E420 2442FFFF */  addiu     $v0, $v0, -0x1
/* 409DB4 E011E424 A2220025 */  sb        $v0, 0x25($s1)
/* 409DB8 E011E428 00021600 */  sll       $v0, $v0, 24
/* 409DBC E011E42C 04410005 */  bgez      $v0, .LE011E444
/* 409DC0 E011E430 0060902D */   daddu    $s2, $v1, $zero
/* 409DC4 E011E434 0C080138 */  jal       shim_rand_int
/* 409DC8 E011E438 2404003C */   addiu    $a0, $zero, 0x3C
/* 409DCC E011E43C 24420008 */  addiu     $v0, $v0, 0x8
/* 409DD0 E011E440 A2220025 */  sb        $v0, 0x25($s1)
.LE011E444:
/* 409DD4 E011E444 92220025 */  lbu       $v0, 0x25($s1)
/* 409DD8 E011E448 00022600 */  sll       $a0, $v0, 24
/* 409DDC E011E44C 00041E03 */  sra       $v1, $a0, 24
/* 409DE0 E011E450 28620008 */  slti      $v0, $v1, 0x8
/* 409DE4 E011E454 10400005 */  beqz      $v0, .LE011E46C
/* 409DE8 E011E458 000417C2 */   srl      $v0, $a0, 31
/* 409DEC E011E45C 00621021 */  addu      $v0, $v1, $v0
/* 409DF0 E011E460 00021043 */  sra       $v0, $v0, 1
/* 409DF4 E011E464 0804791C */  j         .LE011E470
/* 409DF8 E011E468 A2220024 */   sb       $v0, 0x24($s1)
.LE011E46C:
/* 409DFC E011E46C A2200024 */  sb        $zero, 0x24($s1)
.LE011E470:
/* 409E00 E011E470 2A020011 */  slti      $v0, $s0, 0x11
/* 409E04 E011E474 14400015 */  bnez      $v0, .LE011E4CC
/* 409E08 E011E478 3242000F */   andi     $v0, $s2, 0xF
/* 409E0C E011E47C 14400013 */  bnez      $v0, .LE011E4CC
/* 409E10 E011E480 00000000 */   nop
/* 409E14 E011E484 0C080150 */  jal       shim_load_effect
/* 409E18 E011E488 2404006F */   addiu    $a0, $zero, 0x6F
/* 409E1C E011E48C C6220020 */  lwc1      $f2, 0x20($s1)
/* 409E20 E011E490 3C014220 */  lui       $at, (0x42200000 >> 16)
/* 409E24 E011E494 44810000 */  mtc1      $at, $f0
/* 409E28 E011E498 00000000 */  nop
/* 409E2C E011E49C 46001002 */  mul.s     $f0, $f2, $f0
/* 409E30 E011E4A0 00000000 */  nop
/* 409E34 E011E4A4 C6240008 */  lwc1      $f4, 0x8($s1)
/* 409E38 E011E4A8 2402001E */  addiu     $v0, $zero, 0x1E
/* 409E3C E011E4AC AFA20014 */  sw        $v0, 0x14($sp)
/* 409E40 E011E4B0 E7A20010 */  swc1      $f2, 0x10($sp)
/* 409E44 E011E4B4 46002100 */  add.s     $f4, $f4, $f0
/* 409E48 E011E4B8 8E250004 */  lw        $a1, 0x4($s1)
/* 409E4C E011E4BC 8E27000C */  lw        $a3, 0xC($s1)
/* 409E50 E011E4C0 44062000 */  mfc1      $a2, $f4
/* 409E54 E011E4C4 0C037800 */  jal       cold_breath_main
/* 409E58 E011E4C8 24040002 */   addiu    $a0, $zero, 0x2
.LE011E4CC:
/* 409E5C E011E4CC 8E220028 */  lw        $v0, 0x28($s1)
/* 409E60 E011E4D0 C6200004 */  lwc1      $f0, 0x4($s1)
/* 409E64 E011E4D4 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 409E68 E011E4D8 44811000 */  mtc1      $at, $f2
/* 409E6C E011E4DC 8C42000C */  lw        $v0, 0xC($v0)
/* 409E70 E011E4E0 E4400004 */  swc1      $f0, 0x4($v0)
/* 409E74 E011E4E4 C6200008 */  lwc1      $f0, 0x8($s1)
/* 409E78 E011E4E8 8E220028 */  lw        $v0, 0x28($s1)
/* 409E7C E011E4EC 46020000 */  add.s     $f0, $f0, $f2
/* 409E80 E011E4F0 8C42000C */  lw        $v0, 0xC($v0)
/* 409E84 E011E4F4 E4400008 */  swc1      $f0, 0x8($v0)
/* 409E88 E011E4F8 8E220028 */  lw        $v0, 0x28($s1)
/* 409E8C E011E4FC C620000C */  lwc1      $f0, 0xC($s1)
/* 409E90 E011E500 8C42000C */  lw        $v0, 0xC($v0)
/* 409E94 E011E504 E440000C */  swc1      $f0, 0xC($v0)
.LE011E508:
/* 409E98 E011E508 8FBF0028 */  lw        $ra, 0x28($sp)
/* 409E9C E011E50C 8FB30024 */  lw        $s3, 0x24($sp)
/* 409EA0 E011E510 8FB20020 */  lw        $s2, 0x20($sp)
/* 409EA4 E011E514 8FB1001C */  lw        $s1, 0x1C($sp)
/* 409EA8 E011E518 8FB00018 */  lw        $s0, 0x18($sp)
/* 409EAC E011E51C D7B80040 */  ldc1      $f24, 0x40($sp)
/* 409EB0 E011E520 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 409EB4 E011E524 D7B40030 */  ldc1      $f20, 0x30($sp)
/* 409EB8 E011E528 03E00008 */  jr        $ra
/* 409EBC E011E52C 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void ice_pillar_update(EffectInstance* effect) {
    IcePillarFXData* data = effect->data.icePillar;
    s32 timeLeft;
    s32 lifeTime;
    s32 i;

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

    if (data->timeLeft < 1000) {
        data->timeLeft--;
    }

    data->lifeTime++;

    if (data->timeLeft < 0) {
        shim_load_effect(EFFECT_ICE_SHARD);

        for (i = 0; i < 20; i++) {
            EffectInstance* iceShard;

            iceShard = ice_shard_main(
                (i % 2) + 2,
                (data->pos.x + shim_rand_int(20)) - 10.0f,
                data->pos.y + (shim_rand_int(40) * data->scale),
                data->pos.z + 3.0f,
                (data->scale * ((shim_rand_int(10) * 0.7 * 0.1) + 0.3)),
                i + 30
            );
            iceShard->data.iceShard->animFrame = shim_rand_int(10) * 0.1;
            iceShard->data.iceShard->animRate = (shim_rand_int(30) * 0.01) + 0.1;
            iceShard->data.iceShard->rotation = shim_rand_int(359);
            iceShard->data.iceShard->angularVel = shim_rand_int(20);
            iceShard->data.iceShard->vel.x = shim_rand_int(10) - 5;
            iceShard->data.iceShard->vel.y = shim_rand_int(10) - 5;
            iceShard->data.iceShard->vel.z = 0;
            iceShard->data.iceShard->gravAccel = -0.1f;
        }
        shim_remove_effect(data->miscParticles);
        shim_remove_effect(effect);
        return;
    }

    timeLeft = data->timeLeft;
    lifeTime = data->lifeTime;

    data->unk_25--;
    if (data->unk_25 < 0) {
        data->unk_25 = shim_rand_int(60) + 8;
    }

    if (data->unk_25 < 8) {
        data->unk_24 = data->unk_25 / 2;
    } else {
        data->unk_24 = 0;
    }

    if (timeLeft > 16 && (lifeTime % 16) == 0) {
        shim_load_effect(EFFECT_COLD_BREATH);
        cold_breath_main(2, data->pos.x, data->pos.y + (data->scale * 40.0f), data->pos.z, data->scale, 30);
    }
    data->miscParticles->data.miscParticles->pos.x = data->pos.x;
    data->miscParticles->data.miscParticles->pos.y = data->pos.y + 10.0f;
    data->miscParticles->data.miscParticles->pos.z = data->pos.z;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel sfx_compute_spatialized_sound_params_full
/* DF950 80149250 44860000 */  mtc1      $a2, $f0
/* DF954 80149254 3C048007 */  lui       $a0, %hi(gCurrentCameraID)
/* DF958 80149258 8C847410 */  lw        $a0, %lo(gCurrentCameraID)($a0)
/* DF95C 8014925C 44056000 */  mfc1      $a1, $f12
/* DF960 80149260 44067000 */  mfc1      $a2, $f14
/* DF964 80149264 27BDFF98 */  addiu     $sp, $sp, -0x68
/* DF968 80149268 AFB20038 */  sw        $s2, 0x38($sp)
/* DF96C 8014926C 8FB20078 */  lw        $s2, 0x78($sp)
/* DF970 80149270 AFB10034 */  sw        $s1, 0x34($sp)
/* DF974 80149274 00E0882D */  daddu     $s1, $a3, $zero
/* DF978 80149278 AFB00030 */  sw        $s0, 0x30($sp)
/* DF97C 8014927C 8FB0007C */  lw        $s0, 0x7C($sp)
/* DF980 80149280 27A20020 */  addiu     $v0, $sp, 0x20
/* DF984 80149284 AFA20010 */  sw        $v0, 0x10($sp)
/* DF988 80149288 27A20024 */  addiu     $v0, $sp, 0x24
/* DF98C 8014928C AFA20014 */  sw        $v0, 0x14($sp)
/* DF990 80149290 44070000 */  mfc1      $a3, $f0
/* DF994 80149294 27A20028 */  addiu     $v0, $sp, 0x28
/* DF998 80149298 AFBF003C */  sw        $ra, 0x3C($sp)
/* DF99C 8014929C F7BC0060 */  sdc1      $f28, 0x60($sp)
/* DF9A0 801492A0 F7BA0058 */  sdc1      $f26, 0x58($sp)
/* DF9A4 801492A4 F7B80050 */  sdc1      $f24, 0x50($sp)
/* DF9A8 801492A8 F7B60048 */  sdc1      $f22, 0x48($sp)
/* DF9AC 801492AC F7B40040 */  sdc1      $f20, 0x40($sp)
/* DF9B0 801492B0 0C00B94E */  jal       get_screen_coords
/* DF9B4 801492B4 AFA20018 */   sw       $v0, 0x18($sp)
/* DF9B8 801492B8 8FA40020 */  lw        $a0, 0x20($sp)
/* DF9BC 801492BC 24821388 */  addiu     $v0, $a0, 0x1388
/* DF9C0 801492C0 2C422711 */  sltiu     $v0, $v0, 0x2711
/* DF9C4 801492C4 10400020 */  beqz      $v0, .L80149348
/* DF9C8 801492C8 2402FFFF */   addiu    $v0, $zero, -0x1
/* DF9CC 801492CC 8FA30024 */  lw        $v1, 0x24($sp)
/* DF9D0 801492D0 28621389 */  slti      $v0, $v1, 0x1389
/* DF9D4 801492D4 1040001B */  beqz      $v0, .L80149344
/* DF9D8 801492D8 2862EC78 */   slti     $v0, $v1, -0x1388
/* DF9DC 801492DC 1440001A */  bnez      $v0, .L80149348
/* DF9E0 801492E0 2402FFFF */   addiu    $v0, $zero, -0x1
/* DF9E4 801492E4 3C020002 */  lui       $v0, (0x20000 >> 16)
/* DF9E8 801492E8 02021024 */  and       $v0, $s0, $v0
/* DF9EC 801492EC 10400008 */  beqz      $v0, .L80149310
/* DF9F0 801492F0 2482001E */   addiu    $v0, $a0, 0x1E
/* DF9F4 801492F4 2C42017D */  sltiu     $v0, $v0, 0x17D
/* DF9F8 801492F8 10400012 */  beqz      $v0, .L80149344
/* DF9FC 801492FC 2862FFE2 */   slti     $v0, $v1, -0x1E
/* DFA00 80149300 14400011 */  bnez      $v0, .L80149348
/* DFA04 80149304 2402FFFF */   addiu    $v0, $zero, -0x1
/* DFA08 80149308 080524CF */  j         .L8014933C
/* DFA0C 8014930C 2862010F */   slti     $v0, $v1, 0x10F
.L80149310:
/* DFA10 80149310 3C020004 */  lui       $v0, (0x40000 >> 16)
/* DFA14 80149314 02021024 */  and       $v0, $s0, $v0
/* DFA18 80149318 10400003 */  beqz      $v0, .L80149328
/* DFA1C 8014931C 2482001E */   addiu    $v0, $a0, 0x1E
/* DFA20 80149320 080524CF */  j         .L8014933C
/* DFA24 80149324 2C42017D */   sltiu    $v0, $v0, 0x17D
.L80149328:
/* DFA28 80149328 3C020008 */  lui       $v0, (0x80000 >> 16)
/* DFA2C 8014932C 02021024 */  and       $v0, $s0, $v0
/* DFA30 80149330 10400008 */  beqz      $v0, .L80149354
/* DFA34 80149334 2462001E */   addiu    $v0, $v1, 0x1E
/* DFA38 80149338 2C42012D */  sltiu     $v0, $v0, 0x12D
.L8014933C:
/* DFA3C 8014933C 14400006 */  bnez      $v0, .L80149358
/* DFA40 80149340 240300A0 */   addiu    $v1, $zero, 0xA0
.L80149344:
/* DFA44 80149344 2402FFFF */  addiu     $v0, $zero, -0x1
.L80149348:
/* DFA48 80149348 A6220000 */  sh        $v0, 0x0($s1)
/* DFA4C 8014934C 08052575 */  j         .L801495D4
/* DFA50 80149350 A6400000 */   sh       $zero, 0x0($s2)
.L80149354:
/* DFA54 80149354 240300A0 */  addiu     $v1, $zero, 0xA0
.L80149358:
/* DFA58 80149358 8FA20020 */  lw        $v0, 0x20($sp)
/* DFA5C 8014935C 4480C000 */  mtc1      $zero, $f24
/* DFA60 80149360 4480C800 */  mtc1      $zero, $f25
/* DFA64 80149364 00621823 */  subu      $v1, $v1, $v0
/* DFA68 80149368 04620001 */  bltzl     $v1, .L80149370
/* DFA6C 8014936C 00031823 */   negu     $v1, $v1
.L80149370:
/* DFA70 80149370 2463FF6F */  addiu     $v1, $v1, -0x91
/* DFA74 80149374 44831000 */  mtc1      $v1, $f2
/* DFA78 80149378 00000000 */  nop
/* DFA7C 8014937C 468010A0 */  cvt.s.w   $f2, $f2
/* DFA80 80149380 46001021 */  cvt.d.s   $f0, $f2
/* DFA84 80149384 4638003C */  c.lt.d    $f0, $f24
/* DFA88 80149388 00000000 */  nop
/* DFA8C 8014938C 45000003 */  bc1f      .L8014939C
/* DFA90 80149390 0000202D */   daddu    $a0, $zero, $zero
/* DFA94 80149394 44801000 */  mtc1      $zero, $f2
/* DFA98 80149398 00000000 */  nop
.L8014939C:
/* DFA9C 8014939C 4600120D */  trunc.w.s $f8, $f2
/* DFAA0 801493A0 44074000 */  mfc1      $a3, $f8
/* DFAA4 801493A4 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* DFAA8 801493A8 4481E000 */  mtc1      $at, $f28
/* DFAAC 801493AC 4480B000 */  mtc1      $zero, $f22
/* DFAB0 801493B0 4405E000 */  mfc1      $a1, $f28
/* DFAB4 801493B4 4406B000 */  mfc1      $a2, $f22
/* DFAB8 801493B8 240200C8 */  addiu     $v0, $zero, 0xC8
/* DFABC 801493BC 0C00A8ED */  jal       update_lerp
/* DFAC0 801493C0 AFA20010 */   sw       $v0, 0x10($sp)
/* DFAC4 801493C4 46000686 */  mov.s     $f26, $f0
/* DFAC8 801493C8 4600D021 */  cvt.d.s   $f0, $f26
/* DFACC 801493CC 4638003C */  c.lt.d    $f0, $f24
/* DFAD0 801493D0 00000000 */  nop
/* DFAD4 801493D4 45030001 */  bc1tl     .L801493DC
/* DFAD8 801493D8 4600B686 */   mov.s    $f26, $f22
.L801493DC:
/* DFADC 801493DC 8FA20024 */  lw        $v0, 0x24($sp)
/* DFAE0 801493E0 24030078 */  addiu     $v1, $zero, 0x78
/* DFAE4 801493E4 00621823 */  subu      $v1, $v1, $v0
/* DFAE8 801493E8 04620001 */  bltzl     $v1, .L801493F0
/* DFAEC 801493EC 00031823 */   negu     $v1, $v1
.L801493F0:
/* DFAF0 801493F0 2463FF97 */  addiu     $v1, $v1, -0x69
/* DFAF4 801493F4 44831000 */  mtc1      $v1, $f2
/* DFAF8 801493F8 00000000 */  nop
/* DFAFC 801493FC 468010A0 */  cvt.s.w   $f2, $f2
/* DFB00 80149400 46001021 */  cvt.d.s   $f0, $f2
/* DFB04 80149404 4638003C */  c.lt.d    $f0, $f24
/* DFB08 80149408 00000000 */  nop
/* DFB0C 8014940C 45030001 */  bc1tl     .L80149414
/* DFB10 80149410 4600B086 */   mov.s    $f2, $f22
.L80149414:
/* DFB14 80149414 0000202D */  daddu     $a0, $zero, $zero
/* DFB18 80149418 4600120D */  trunc.w.s $f8, $f2
/* DFB1C 8014941C 44074000 */  mfc1      $a3, $f8
/* DFB20 80149420 4405E000 */  mfc1      $a1, $f28
/* DFB24 80149424 4406B000 */  mfc1      $a2, $f22
/* DFB28 80149428 24020082 */  addiu     $v0, $zero, 0x82
/* DFB2C 8014942C 0C00A8ED */  jal       update_lerp
/* DFB30 80149430 AFA20010 */   sw       $v0, 0x10($sp)
/* DFB34 80149434 46000506 */  mov.s     $f20, $f0
/* DFB38 80149438 4600A021 */  cvt.d.s   $f0, $f20
/* DFB3C 8014943C 4638003C */  c.lt.d    $f0, $f24
/* DFB40 80149440 00000000 */  nop
/* DFB44 80149444 45030001 */  bc1tl     .L8014944C
/* DFB48 80149448 4600B506 */   mov.s    $f20, $f22
.L8014944C:
/* DFB4C 8014944C 3C018015 */  lui       $at, %hi(D_80151250)
/* DFB50 80149450 D4201250 */  ldc1      $f0, %lo(D_80151250)($at)
/* DFB54 80149454 C7A20028 */  lwc1      $f2, 0x28($sp)
/* DFB58 80149458 468010A1 */  cvt.d.w   $f2, $f2
/* DFB5C 8014945C 46201081 */  sub.d     $f2, $f2, $f0
/* DFB60 80149460 462010A0 */  cvt.s.d   $f2, $f2
/* DFB64 80149464 46001021 */  cvt.d.s   $f0, $f2
/* DFB68 80149468 4638003C */  c.lt.d    $f0, $f24
/* DFB6C 8014946C 00000000 */  nop
/* DFB70 80149470 45030001 */  bc1tl     .L80149478
/* DFB74 80149474 4600B086 */   mov.s    $f2, $f22
.L80149478:
/* DFB78 80149478 0000202D */  daddu     $a0, $zero, $zero
/* DFB7C 8014947C 4600120D */  trunc.w.s $f8, $f2
/* DFB80 80149480 44074000 */  mfc1      $a3, $f8
/* DFB84 80149484 4405E000 */  mfc1      $a1, $f28
/* DFB88 80149488 4406B000 */  mfc1      $a2, $f22
/* DFB8C 8014948C 240200FA */  addiu     $v0, $zero, 0xFA
/* DFB90 80149490 0C00A8ED */  jal       update_lerp
/* DFB94 80149494 AFA20010 */   sw       $v0, 0x10($sp)
/* DFB98 80149498 46000086 */  mov.s     $f2, $f0
/* DFB9C 8014949C 46001021 */  cvt.d.s   $f0, $f2
/* DFBA0 801494A0 4638003C */  c.lt.d    $f0, $f24
/* DFBA4 801494A4 00000000 */  nop
/* DFBA8 801494A8 45030001 */  bc1tl     .L801494B0
/* DFBAC 801494AC 4600B086 */   mov.s    $f2, $f22
.L801494B0:
/* DFBB0 801494B0 4614D002 */  mul.s     $f0, $f26, $f20
/* DFBB4 801494B4 00000000 */  nop
/* DFBB8 801494B8 46020002 */  mul.s     $f0, $f0, $f2
/* DFBBC 801494BC 00000000 */  nop
/* DFBC0 801494C0 3C018015 */  lui       $at, %hi(D_80151258)
/* DFBC4 801494C4 D4261258 */  ldc1      $f6, %lo(D_80151258)($at)
/* DFBC8 801494C8 46000021 */  cvt.d.s   $f0, $f0
/* DFBCC 801494CC 46260002 */  mul.d     $f0, $f0, $f6
/* DFBD0 801494D0 00000000 */  nop
/* DFBD4 801494D4 46200120 */  cvt.s.d   $f4, $f0
/* DFBD8 801494D8 3C01402E */  lui       $at, (0x402E0000 >> 16)
/* DFBDC 801494DC 44810800 */  mtc1      $at, $f1
/* DFBE0 801494E0 44800000 */  mtc1      $zero, $f0
/* DFBE4 801494E4 460020A1 */  cvt.d.s   $f2, $f4
/* DFBE8 801494E8 4620103C */  c.lt.d    $f2, $f0
/* DFBEC 801494EC 00000000 */  nop
/* DFBF0 801494F0 45000005 */  bc1f      .L80149508
/* DFBF4 801494F4 00000000 */   nop
/* DFBF8 801494F8 3C014170 */  lui       $at, (0x41700000 >> 16)
/* DFBFC 801494FC 44812000 */  mtc1      $at, $f4
/* DFC00 80149500 08052549 */  j         .L80149524
/* DFC04 80149504 00000000 */   nop
.L80149508:
/* DFC08 80149508 4622303C */  c.lt.d    $f6, $f2
/* DFC0C 8014950C 00000000 */  nop
/* DFC10 80149510 45000004 */  bc1f      .L80149524
/* DFC14 80149514 00000000 */   nop
/* DFC18 80149518 3C0142FE */  lui       $at, (0x42FE0000 >> 16)
/* DFC1C 8014951C 44812000 */  mtc1      $at, $f4
/* DFC20 80149520 00000000 */  nop
.L80149524:
/* DFC24 80149524 4600220D */  trunc.w.s $f8, $f4
/* DFC28 80149528 44024000 */  mfc1      $v0, $f8
/* DFC2C 8014952C 00000000 */  nop
/* DFC30 80149530 A6220000 */  sh        $v0, 0x0($s1)
/* DFC34 80149534 C7A00020 */  lwc1      $f0, 0x20($sp)
/* DFC38 80149538 46800020 */  cvt.s.w   $f0, $f0
/* DFC3C 8014953C 3C014064 */  lui       $at, (0x40640000 >> 16)
/* DFC40 80149540 44811800 */  mtc1      $at, $f3
/* DFC44 80149544 44801000 */  mtc1      $zero, $f2
/* DFC48 80149548 46000021 */  cvt.d.s   $f0, $f0
/* DFC4C 8014954C 46220001 */  sub.d     $f0, $f0, $f2
/* DFC50 80149550 3C018015 */  lui       $at, %hi(D_80151260)
/* DFC54 80149554 D4221260 */  ldc1      $f2, %lo(D_80151260)($at)
/* DFC58 80149558 3C014050 */  lui       $at, (0x40500000 >> 16)
/* DFC5C 8014955C 44812800 */  mtc1      $at, $f5
/* DFC60 80149560 44802000 */  mtc1      $zero, $f4
/* DFC64 80149564 46220003 */  div.d     $f0, $f0, $f2
/* DFC68 80149568 46240000 */  add.d     $f0, $f0, $f4
/* DFC6C 8014956C 46200120 */  cvt.s.d   $f4, $f0
/* DFC70 80149570 3C013FF0 */  lui       $at, (0x3FF00000 >> 16)
/* DFC74 80149574 44810800 */  mtc1      $at, $f1
/* DFC78 80149578 44800000 */  mtc1      $zero, $f0
/* DFC7C 8014957C 460020A1 */  cvt.d.s   $f2, $f4
/* DFC80 80149580 4620103C */  c.lt.d    $f2, $f0
/* DFC84 80149584 00000000 */  nop
/* DFC88 80149588 45000005 */  bc1f      .L801495A0
/* DFC8C 8014958C 00000000 */   nop
/* DFC90 80149590 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* DFC94 80149594 44812000 */  mtc1      $at, $f4
/* DFC98 80149598 08052571 */  j         .L801495C4
/* DFC9C 8014959C 00000000 */   nop
.L801495A0:
/* DFCA0 801495A0 3C018015 */  lui       $at, %hi(D_80151268)
/* DFCA4 801495A4 D4201268 */  ldc1      $f0, %lo(D_80151268)($at)
/* DFCA8 801495A8 4622003C */  c.lt.d    $f0, $f2
/* DFCAC 801495AC 00000000 */  nop
/* DFCB0 801495B0 45000004 */  bc1f      .L801495C4
/* DFCB4 801495B4 00000000 */   nop
/* DFCB8 801495B8 3C0142FE */  lui       $at, (0x42FE0000 >> 16)
/* DFCBC 801495BC 44812000 */  mtc1      $at, $f4
/* DFCC0 801495C0 00000000 */  nop
.L801495C4:
/* DFCC4 801495C4 4600220D */  trunc.w.s $f8, $f4
/* DFCC8 801495C8 44024000 */  mfc1      $v0, $f8
/* DFCCC 801495CC 00000000 */  nop
/* DFCD0 801495D0 A6420000 */  sh        $v0, 0x0($s2)
.L801495D4:
/* DFCD4 801495D4 8FBF003C */  lw        $ra, 0x3C($sp)
/* DFCD8 801495D8 8FB20038 */  lw        $s2, 0x38($sp)
/* DFCDC 801495DC 8FB10034 */  lw        $s1, 0x34($sp)
/* DFCE0 801495E0 8FB00030 */  lw        $s0, 0x30($sp)
/* DFCE4 801495E4 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* DFCE8 801495E8 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* DFCEC 801495EC D7B80050 */  ldc1      $f24, 0x50($sp)
/* DFCF0 801495F0 D7B60048 */  ldc1      $f22, 0x48($sp)
/* DFCF4 801495F4 D7B40040 */  ldc1      $f20, 0x40($sp)
/* DFCF8 801495F8 03E00008 */  jr        $ra
/* DFCFC 801495FC 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

void sfx_compute_spatialized_sound_params_full(f32 x, f32 y, f32 z, s16* volume, s16* pan, s32 flags) {
    s32 screenX, screenY, screenZ;
    f32 volAmtOffsetX, volAmtDeltaY, volAmtDepth;
    f32 offsetX, offsetY, depth;
    f32 volTemp, panTemp;
    s32 phi_v0;

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

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

    if (flags & SOUND_PARAM_CLIP_OFFSCREEN_ANY) {
        if (screenX < -30 || screenX > SCREEN_WIDTH + 30 || screenY < -30 || screenY > SCREEN_HEIGHT + 30) {
            *volume = -1;
            *pan = 0;
            return;
        }
    } else if (flags & SOUND_PARAM_CLIP_OFFSCREEN_X) {
        if (screenX < -30 || screenX > SCREEN_WIDTH + 30) {
            *volume = -1;
            *pan = 0;
            return;
        }
    } else if (flags & SOUND_PARAM_CLIP_OFFSCREEN_Y) {
        if (screenY < -30 || screenY > SCREEN_HEIGHT + 30) {
            *volume = -1;
            *pan = 0;
            return;
        }
    }

    offsetX = abs((SCREEN_WIDTH / 2) - screenX) - 145;
    if (offsetX < 0.0) {
        offsetX = 0.0f;
    }

    volAmtOffsetX = update_lerp(EASING_LINEAR, 1.0f, 0.0f, offsetX, 200);
    if (volAmtOffsetX < 0.0) {
        volAmtOffsetX = 0.0f;
    }

    offsetY = abs((SCREEN_HEIGHT / 2) - screenY) - 105;
    if (offsetY < 0.0) {
        offsetY = 0.0f;
    }

    volAmtDeltaY = update_lerp(EASING_LINEAR, 1.0f, 0.0f, offsetY, 130);
    if (volAmtDeltaY < 0.0) {
        volAmtDeltaY = 0.0f;
    }

    depth = screenZ - 5550.0;
    if (depth < 0.0) {
        depth = 0.0f;
    }

    volAmtDepth = update_lerp(EASING_LINEAR, 1.0f, 0.0f, depth, 250);
    if (volAmtDepth < 0.0) {
        volAmtDepth = 0.0f;
    }

    volTemp = (volAmtOffsetX * volAmtDeltaY * volAmtDepth) * 127.0;
    if (volTemp < 15.0) {
        volTemp = 15.0f;
    } else if (volTemp > 127.0) {
        volTemp = 127.0f;
    }
    *volume = volTemp;

    panTemp = (((f32) screenX - (SCREEN_WIDTH / 2.0)) / 3.6) + 64.0;
    if (panTemp < 1.0) {
        panTemp = 1.0f;
    } else if (panTemp > 127.0) {
        panTemp = 127.0f;
    }
    *pan = panTemp;
}