### RAW ASSEMBLY INSTRUCTIONS:

dlabel D_80245980
/* 138CC0 80245980 27BDFF80 */  addiu     $sp, $sp, -0x80
.L80245984:
/* 138CC4 80245984 AFBE0078 */  sw        $fp, 0x78($sp)
/* 138CC8 80245988 00C0F02D */  daddu     $fp, $a2, $zero
flo_08_pad_598C:
/* 138CCC 8024598C AFA50084 */  sw        $a1, 0x84($sp)
D_80245990:
/* 138CD0 80245990 24A8008F */  addiu     $t0, $a1, 0x8F
glabel .L80245994
/* 138CD4 80245994 0100282D */  daddu     $a1, $t0, $zero
/* 138CD8 80245998 AFB1005C */  sw        $s1, 0x5C($sp)
/* 138CDC 8024599C 3C118027 */  lui       $s1, %hi(gPauseStatsIconIDs)
D_802459A0:
/* 138CE0 802459A0 26310150 */  addiu     $s1, $s1, %lo(gPauseStatsIconIDs)
/* 138CE4 802459A4 AFBF007C */  sw        $ra, 0x7C($sp)
/* 138CE8 802459A8 AFB70074 */  sw        $s7, 0x74($sp)
/* 138CEC 802459AC AFB60070 */  sw        $s6, 0x70($sp)
/* 138CF0 802459B0 AFB5006C */  sw        $s5, 0x6C($sp)
D_802459B4:
/* 138CF4 802459B4 AFB40068 */  sw        $s4, 0x68($sp)
/* 138CF8 802459B8 AFB30064 */  sw        $s3, 0x64($sp)
/* 138CFC 802459BC AFB20060 */  sw        $s2, 0x60($sp)

### DECOMPILED C INSTRUCTIONS:

void pause_stats_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
    StatsEntryData* statsEntryData;
    PlayerData* playerData;
    s16 bootsLevel;
    s16 hammerLevel;
    s32 powHudElemID;
    s32 powIncrements;
    s32 powIncIdx;
    s32 curIncrement;
    b32 drawingFirst;
    s32 powBarIdx;
    s32 boxWidth;
    s16 level;
    s32 frameCount;
    s32 powFullBars;

    // draw coin count
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_COIN], baseX + 143, baseY + 109);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_COIN]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_COINS), baseX + 155, baseY + 101, 255, MSG_PAL_STANDARD, 1);
    draw_number(gPlayerData.coins, baseX + 281, baseY + 101 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 108);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]);

    // draw star point count
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_STAR_POINT], baseX + 143, baseY + 94);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_STAR_POINT]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_STAR_POINTS), baseX + 155, baseY + 86, 255, MSG_PAL_STANDARD, 1);
    draw_number(gPlayerData.starPoints, baseX + 281, baseY + 86 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 93);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]);

    // draw star piece count
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_STAR_PIECE], baseX + 143, baseY + 123);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_STAR_PIECE]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_STAR_PIECES), baseX + 155, baseY + 116, 255, MSG_PAL_STANDARD, 1);
    draw_number(gPlayerData.starPieces, baseX + 281, baseY + 116 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 3);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_TIMES], baseX + 248, baseY + 123);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_TIMES]);

    // draw HP count
    pause_draw_menu_label(PAUSE_LBL_HP, baseX + 21, baseY + 35);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_HP], baseX + 52, baseY + 57);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_HP]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_HP), baseX + COL_A_X, baseY + ROW_1_Y, 255, MSG_PAL_WHITE, 1);
    draw_number(gPlayerData.curHP, baseX + 78, baseY + 51, 1, 0, 255, 3);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_SLASH), baseX + COL_B_X, baseY + ROW_2_Y, 255, MSG_PAL_WHITE, 1);
    draw_number(gPlayerData.curMaxHP, baseX + COL_C_X, baseY + ROW_2_Y + NUMBER_OFFSET_Y, 1, 0, 255, 3);

    // draw FP count
    pause_draw_menu_label(PAUSE_LBL_FP, baseX + 21, baseY + 69);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_FP], baseX + 52, baseY + 92);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_FP]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_FP), baseX + COL_A_X, baseY + ROW_3_Y, 255, MSG_PAL_WHITE, 1);
    draw_number(gPlayerData.curFP, baseX + 78, baseY + 85, 1, MSG_PAL_WHITE, 255, 3);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_SLASH), baseX + COL_B_X, baseY + ROW_3_Y, 255, MSG_PAL_WHITE, 1);
    draw_number(gPlayerData.curMaxFP, baseX + COL_C_X, baseY + ROW_3_Y + NUMBER_OFFSET_Y, 1, MSG_PAL_WHITE, 255, 3);

    // draw BP count
    pause_draw_menu_label(PAUSE_LBL_BP, baseX + 21, baseY + 103);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_BP], baseX + 52, baseY + 126);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_BP]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_BP), baseX + COL_A_X, baseY + ROW_4_Y, 255, MSG_PAL_WHITE, 1);
    draw_number(gPlayerData.maxBP, baseX + 78, baseY + 119, 1, MSG_PAL_WHITE, 255, 3);

    #define MINUTE (60 * 60)
    #define HOUR   (MINUTE * 60)

    // draw play time
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_CLOCK], baseX + 143, baseY + 140);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_CLOCK]);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LBL_TIME), baseX + 155, baseY + 133, 255, MSG_PAL_STANDARD, 1);
    frameCount = gPlayerData.frameCounter;
    if (frameCount >= (100 * HOUR)) {
        frameCount = (100 * HOUR) - 1;
    }
    // draw hours
    draw_number((frameCount / (10 * HOUR)) % 10, baseX + 237, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2);
    draw_number((frameCount / HOUR) % 10, baseX + 246, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_DOT), baseX + 257, baseY + 132, 255, MSG_PAL_STANDARD, 1);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_DOT), baseX + 257, baseY + 127, 255, MSG_PAL_STANDARD, 1);
    // draw minutes
    draw_number((frameCount / (10 * MINUTE)) % 6, baseX + 264, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2);
    draw_number((frameCount / MINUTE) % 10, baseX + 273, baseY + 133 + NUMBER_OFFSET_Y, 1, MSG_PAL_STANDARD, 255, 2);

    bootsLevel = gPlayerData.bootsLevel;
    hammerLevel = gPlayerData.hammerLevel;
    level = gPlayerData.level;
    draw_box(4, &gPauseWS_10, baseX + 7, baseY + 12, 0, level >= 10 ? 121 : 113, 17, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);

    // draw level
#if !VERSION_IQUE
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_MARIO], baseX + 61, baseY + 21);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_MARIO]);
#endif
    draw_msg(pause_get_menu_msg(PAUSE_MSG_MARIO), baseX + 16, baseY + 14, 255, MSG_PAL_WHITE, 1);
    draw_msg(pause_get_menu_msg(PAUSE_MSG_LEVEL), baseX + POS_1_X, baseY + 14, 255, MSG_PAL_WHITE, 1);
    draw_number(level, baseX + POS_2_X, baseY + 14 + NUMBER_OFFSET_Y, 1, MSG_PAL_WHITE, 255, 2);

    bootsLevel++;
    if (bootsLevel < 0) {
        bootsLevel = 0;
    }
    if (bootsLevel > 3) {
        bootsLevel = 3;
    }

    hammerLevel++;
    if (hammerLevel < 0) {
        hammerLevel = 0;
    }
    if (hammerLevel > 3) {
        hammerLevel = 3;
    }

    pause_draw_menu_label(PAUSE_LBL_BOOTS,  baseX + 137, baseY + 10);
    pause_draw_menu_label(PAUSE_LBL_HAMMER, baseX + 137, baseY + 35);

    // draw boots
    hud_element_set_script(gPauseStatsIconIDs[STAT_ICON_BOOTS], gStatsBootsElements[bootsLevel]);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_BOOTS], baseX + 163, baseY + 29);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_BOOTS]);
    draw_msg(pause_get_menu_msg(gPauseStatsBootsMessages[bootsLevel]), baseX + 176, baseY + 23, 255, MSG_PAL_WHITE, 1);

    // draw hammer
    hud_element_set_script(gPauseStatsIconIDs[STAT_ICON_HAMMER], gStatsHammerElements[hammerLevel]);
    hud_element_set_render_pos(gPauseStatsIconIDs[STAT_ICON_HAMMER], baseX + 163, baseY + 54);
    hud_element_draw_without_clipping(gPauseStatsIconIDs[STAT_ICON_HAMMER]);
    draw_msg(pause_get_menu_msg(gPauseStatsHammerMessages[hammerLevel]), baseX + 176, baseY + 48, 255, MSG_PAL_WHITE, 1);

    // draw star power bar
    pause_draw_menu_label(PAUSE_LBL_STATS,  baseX + 130, baseY + 69);
    pause_draw_menu_label(PAUSE_LBL_ENERGY, baseX + 138, baseY + 60);

    drawingFirst = TRUE;
    curIncrement = 0;
    powBarIdx = 0; // which bar of the power meter we're drawing
    powIncIdx = 0; // which increment of the bar we're drawing
    powHudElemID = gPauseStatsIconIDs[STAT_ICON_STAR];

    // get number of full power increments
    playerData = &gPlayerData;
    powFullBars = playerData->specialBarsFilled / 256;
    powIncrements = playerData->specialBarsFilled % 256; // get remainder in unfilled bar
    powIncrements /= 32; // subdivide unfilled bar into 8 segments (8 = 256/32)
    powIncrements += powFullBars * 8; // add 8 increments per full bar

    // draw filled bars
    while (TRUE) {
        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[0], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[1], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[2], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[3], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[4], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[5], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsSPIncElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[6], baseY + 75);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        if (curIncrement >= powIncrements) {
            break;
        }

        curIncrement++;
        hud_element_set_script(powHudElemID, gPauseStatsStarElements[powBarIdx]);
        hud_element_set_render_pos(powHudElemID, baseX + 152 + (powBarIdx * 20), baseY + 77);
        if (drawingFirst) {
            hud_element_draw_without_clipping(powHudElemID);
            drawingFirst = FALSE;
        } else {
            hud_element_draw_next(powHudElemID);
        }
        powIncIdx++;

        powIncIdx = 0;
        powBarIdx += 1;
        if (curIncrement >= powIncrements) {
            break;
        }
    }

    // get number of total power increments
    powFullBars = playerData->maxStarPower;
    powIncrements = 8 * powFullBars;

    // draw empty bars
    while (TRUE) {
        if (curIncrement >= powIncrements) {
            break;
        }

        if (powIncIdx == 0) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[0], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            if (curIncrement >= powIncrements) {
                break;
            }
            powIncIdx++;
        }

        if (powIncIdx == 1) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[1], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }

        if (powIncIdx == 2) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[2], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }

        if (powIncIdx == 3) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[3], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }

        if (powIncIdx == 4) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[4], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }

        if (powIncIdx == 5) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[5], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }

        if (powIncIdx == 6) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusSPEmptyIncrement);
            hud_element_set_render_pos(powHudElemID, baseX + 140 + (powBarIdx * 20) + D_8024F46C[6], baseY + 75);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }

        if (powIncIdx == 7) {
            curIncrement++;
            hud_element_set_script(powHudElemID, &HES_StatusStarEmpty);
            hud_element_set_render_pos(powHudElemID, baseX + 152 + (powBarIdx * 20), baseY + 77);
            if (drawingFirst) {
                hud_element_draw_without_clipping(powHudElemID);
                drawingFirst = FALSE;
            } else {
                hud_element_draw_next(powHudElemID);
            }
            powIncIdx++;

            if (curIncrement >= powIncrements) {
                break;
            }
        }
        powIncIdx = 0;
        powBarIdx++;
    }

    if (gPauseMenuCurrentTab == 1) {
        StatsEntryData* entry = &gStatsMenuEntries[menu->selected];

        pause_set_cursor_pos(WINDOW_ID_PAUSE_STATS, baseX + entry->cursorX, baseY + entry->cursorY);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_801363A0
/* CCAA0 801363A0 27BDFFC0 */  addiu     $sp, $sp, -0x40
/* CCAA4 801363A4 AFB40038 */  sw        $s4, 0x38($sp)
/* CCAA8 801363A8 0080A02D */  daddu     $s4, $a0, $zero
/* CCAAC 801363AC AFBF003C */  sw        $ra, 0x3C($sp)
/* CCAB0 801363B0 AFB30034 */  sw        $s3, 0x34($sp)
/* CCAB4 801363B4 AFB20030 */  sw        $s2, 0x30($sp)
/* CCAB8 801363B8 AFB1002C */  sw        $s1, 0x2C($sp)
/* CCABC 801363BC AFB00028 */  sw        $s0, 0x28($sp)
/* CCAC0 801363C0 86820018 */  lh        $v0, 0x18($s4)
/* CCAC4 801363C4 3C038008 */  lui       $v1, %hi(gItemTable)
/* CCAC8 801363C8 246378E0 */  addiu     $v1, $v1, %lo(gItemTable)
/* CCACC 801363CC 00021140 */  sll       $v0, $v0, 5
/* CCAD0 801363D0 00432021 */  addu      $a0, $v0, $v1
/* CCAD4 801363D4 8283001A */  lb        $v1, 0x1A($s4)
/* CCAD8 801363D8 2402000A */  addiu     $v0, $zero, 0xA
/* CCADC 801363DC 1062000C */  beq       $v1, $v0, .L80136410
/* CCAE0 801363E0 2862000B */   slti     $v0, $v1, 0xB
/* CCAE4 801363E4 10400005 */  beqz      $v0, .L801363FC
/* CCAE8 801363E8 24020002 */   addiu    $v0, $zero, 0x2
/* CCAEC 801363EC 10620008 */  beq       $v1, $v0, .L80136410
/* CCAF0 801363F0 00000000 */   nop
/* CCAF4 801363F4 0804D9C7 */  j         .L8013671C
/* CCAF8 801363F8 00000000 */   nop
.L801363FC:
/* CCAFC 801363FC 2402000C */  addiu     $v0, $zero, 0xC
/* CCB00 80136400 106200AC */  beq       $v1, $v0, .L801366B4
/* CCB04 80136404 00000000 */   nop
/* CCB08 80136408 0804D9C7 */  j         .L8013671C
/* CCB0C 8013640C 00000000 */   nop
.L80136410:
/* CCB10 80136410 94820018 */  lhu       $v0, 0x18($a0)
/* CCB14 80136414 30420040 */  andi      $v0, $v0, 0x40
/* CCB18 80136418 1440003B */  bnez      $v0, .L80136508
/* CCB1C 8013641C 3C030400 */   lui      $v1, (0x4000000 >> 16)
/* CCB20 80136420 8E820000 */  lw        $v0, 0x0($s4)
/* CCB24 80136424 00431024 */  and       $v0, $v0, $v1
/* CCB28 80136428 10400005 */  beqz      $v0, .L80136440
/* CCB2C 8013642C 3C12001D */   lui      $s2, (0x1D0058 >> 16)
/* CCB30 80136430 96820006 */  lhu       $v0, 0x6($s4)
/* CCB34 80136434 30420004 */  andi      $v0, $v0, 0x4
/* CCB38 80136438 50400002 */  beql      $v0, $zero, .L80136444
/* CCB3C 8013643C 3652005A */   ori      $s2, $s2, (0x1D005A & 0xFFFF)
.L80136440:
/* CCB40 80136440 36520058 */  ori       $s2, $s2, (0x1D0058 & 0xFFFF)
.L80136444:
/* CCB44 80136444 96830006 */  lhu       $v1, 0x6($s4)
/* CCB48 80136448 30620010 */  andi      $v0, $v1, 0x10
/* CCB4C 8013644C 10400003 */  beqz      $v0, .L8013645C
/* CCB50 80136450 30620020 */   andi     $v0, $v1, 0x20
/* CCB54 80136454 3C12001D */  lui       $s2, (0x1D005D >> 16)
/* CCB58 80136458 3652005D */  ori       $s2, $s2, (0x1D005D & 0xFFFF)
.L8013645C:
/* CCB5C 8013645C 10400003 */  beqz      $v0, .L8013646C
/* CCB60 80136460 30620040 */   andi     $v0, $v1, 0x40
/* CCB64 80136464 3C12001D */  lui       $s2, (0x1D005E >> 16)
/* CCB68 80136468 3652005E */  ori       $s2, $s2, (0x1D005E & 0xFFFF)
.L8013646C:
/* CCB6C 8013646C 10400003 */  beqz      $v0, .L8013647C
/* CCB70 80136470 00000000 */   nop
/* CCB74 80136474 3C12001D */  lui       $s2, (0x1D005C >> 16)
/* CCB78 80136478 3652005C */  ori       $s2, $s2, (0x1D005C & 0xFFFF)
.L8013647C:
/* CCB7C 8013647C 8C840000 */  lw        $a0, 0x0($a0)
/* CCB80 80136480 0C0496CF */  jal       set_message_msg
/* CCB84 80136484 0000282D */   daddu    $a1, $zero, $zero
/* CCB88 80136488 86840018 */  lh        $a0, 0x18($s4)
/* CCB8C 8013648C 00041140 */  sll       $v0, $a0, 5
/* CCB90 80136490 3C038008 */  lui       $v1, %hi(gItemTable + 0x18)
/* CCB94 80136494 00621821 */  addu      $v1, $v1, $v0
/* CCB98 80136498 946378F8 */  lhu       $v1, %lo(gItemTable + 0x18)($v1)
/* CCB9C 8013649C 30620008 */  andi      $v0, $v1, 0x8
/* CCBA0 801364A0 5440000F */  bnel      $v0, $zero, .L801364E0
/* CCBA4 801364A4 0240202D */   daddu    $a0, $s2, $zero
/* CCBA8 801364A8 2402015C */  addiu     $v0, $zero, 0x15C
/* CCBAC 801364AC 1082000B */  beq       $a0, $v0, .L801364DC
/* CCBB0 801364B0 30620020 */   andi     $v0, $v1, 0x20
/* CCBB4 801364B4 1440000A */  bnez      $v0, .L801364E0
/* CCBB8 801364B8 0240202D */   daddu    $a0, $s2, $zero
/* CCBBC 801364BC 96820006 */  lhu       $v0, 0x6($s4)
/* CCBC0 801364C0 30420030 */  andi      $v0, $v0, 0x30
/* CCBC4 801364C4 14400006 */  bnez      $v0, .L801364E0
/* CCBC8 801364C8 00000000 */   nop
/* CCBCC 801364CC 0C04991D */  jal       get_msg_width
/* CCBD0 801364D0 0000282D */   daddu    $a1, $zero, $zero
/* CCBD4 801364D4 0804D93B */  j         .L801364EC
/* CCBD8 801364D8 24500036 */   addiu    $s0, $v0, 0x36
.L801364DC:
/* CCBDC 801364DC 0240202D */  daddu     $a0, $s2, $zero
.L801364E0:
/* CCBE0 801364E0 0C04991D */  jal       get_msg_width
/* CCBE4 801364E4 0000282D */   daddu    $a1, $zero, $zero
/* CCBE8 801364E8 2450001E */  addiu     $s0, $v0, 0x1E
.L801364EC:
/* CCBEC 801364EC 001017C2 */  srl       $v0, $s0, 31
/* CCBF0 801364F0 02021021 */  addu      $v0, $s0, $v0
/* CCBF4 801364F4 00021043 */  sra       $v0, $v0, 1
/* CCBF8 801364F8 240300A0 */  addiu     $v1, $zero, 0xA0
/* CCBFC 801364FC 00628823 */  subu      $s1, $v1, $v0
/* CCC00 80136500 0804D966 */  j         .L80136598
/* CCC04 80136504 2413004C */   addiu    $s3, $zero, 0x4C
.L80136508:
/* CCC08 80136508 8E820000 */  lw        $v0, 0x0($s4)
/* CCC0C 8013650C 00431024 */  and       $v0, $v0, $v1
/* CCC10 80136510 10400005 */  beqz      $v0, .L80136528
/* CCC14 80136514 3C12001D */   lui      $s2, (0x1D0059 >> 16)
/* CCC18 80136518 96820006 */  lhu       $v0, 0x6($s4)
/* CCC1C 8013651C 30420004 */  andi      $v0, $v0, 0x4
/* CCC20 80136520 50400002 */  beql      $v0, $zero, .L8013652C
/* CCC24 80136524 3652005B */   ori      $s2, $s2, (0x1D005B & 0xFFFF)
.L80136528:
/* CCC28 80136528 36520059 */  ori       $s2, $s2, (0x1D0059 & 0xFFFF)
.L8013652C:
/* CCC2C 8013652C 96830006 */  lhu       $v1, 0x6($s4)
/* CCC30 80136530 30620010 */  andi      $v0, $v1, 0x10
/* CCC34 80136534 10400003 */  beqz      $v0, .L80136544
/* CCC38 80136538 30620020 */   andi     $v0, $v1, 0x20
/* CCC3C 8013653C 3C12001D */  lui       $s2, (0x1D005D >> 16)
/* CCC40 80136540 3652005D */  ori       $s2, $s2, (0x1D005D & 0xFFFF)
.L80136544:
/* CCC44 80136544 10400003 */  beqz      $v0, .L80136554
/* CCC48 80136548 30620040 */   andi     $v0, $v1, 0x40
/* CCC4C 8013654C 3C12001D */  lui       $s2, (0x1D005E >> 16)
/* CCC50 80136550 3652005E */  ori       $s2, $s2, (0x1D005E & 0xFFFF)
.L80136554:
/* CCC54 80136554 10400003 */  beqz      $v0, .L80136564
/* CCC58 80136558 00000000 */   nop
/* CCC5C 8013655C 3C12001D */  lui       $s2, (0x1D005C >> 16)
/* CCC60 80136560 3652005C */  ori       $s2, $s2, (0x1D005C & 0xFFFF)
.L80136564:
/* CCC64 80136564 8C840000 */  lw        $a0, 0x0($a0)
/* CCC68 80136568 0000282D */  daddu     $a1, $zero, $zero
/* CCC6C 8013656C 0C0496CF */  jal       set_message_msg
/* CCC70 80136570 2413004C */   addiu    $s3, $zero, 0x4C
/* CCC74 80136574 0240202D */  daddu     $a0, $s2, $zero
/* CCC78 80136578 0C04991D */  jal       get_msg_width
/* CCC7C 8013657C 0000282D */   daddu    $a1, $zero, $zero
/* CCC80 80136580 2450001E */  addiu     $s0, $v0, 0x1E
/* CCC84 80136584 001017C2 */  srl       $v0, $s0, 31
/* CCC88 80136588 02021021 */  addu      $v0, $s0, $v0
/* CCC8C 8013658C 00021043 */  sra       $v0, $v0, 1
/* CCC90 80136590 240300A0 */  addiu     $v1, $zero, 0xA0
/* CCC94 80136594 00628823 */  subu      $s1, $v1, $v0
.L80136598:
/* CCC98 80136598 0C04992C */  jal       get_msg_lines
/* CCC9C 8013659C 0240202D */   daddu    $a0, $s2, $zero
/* CCCA0 801365A0 2442FFFF */  addiu     $v0, $v0, -0x1
/* CCCA4 801365A4 00021040 */  sll       $v0, $v0, 1
/* CCCA8 801365A8 24040002 */  addiu     $a0, $zero, 0x2
/* CCCAC 801365AC 8283001A */  lb        $v1, 0x1A($s4)
/* CCCB0 801365B0 3C088015 */  lui       $t0, %hi(PickupHeaderWindowHeight)
/* CCCB4 801365B4 01024021 */  addu      $t0, $t0, $v0
/* CCCB8 801365B8 8508C6E0 */  lh        $t0, %lo(PickupHeaderWindowHeight)($t0)
/* CCCBC 801365BC 10640002 */  beq       $v1, $a0, .L801365C8
/* CCCC0 801365C0 0000302D */   daddu    $a2, $zero, $zero
/* CCCC4 801365C4 2406001C */  addiu     $a2, $zero, 0x1C
.L801365C8:
/* CCCC8 801365C8 86840018 */  lh        $a0, 0x18($s4)
/* CCCCC 801365CC 00041140 */  sll       $v0, $a0, 5
/* CCCD0 801365D0 3C038008 */  lui       $v1, %hi(gItemTable + 0x18)
/* CCCD4 801365D4 00621821 */  addu      $v1, $v1, $v0
/* CCCD8 801365D8 946378F8 */  lhu       $v1, %lo(gItemTable + 0x18)($v1)
/* CCCDC 801365DC 2404000C */  addiu     $a0, $zero, 0xC
/* CCCE0 801365E0 0220282D */  daddu     $a1, $s1, $zero
/* CCCE4 801365E4 24C6FFE8 */  addiu     $a2, $a2, -0x18
/* CCCE8 801365E8 02663021 */  addu      $a2, $s3, $a2
/* CCCEC 801365EC 0200382D */  daddu     $a3, $s0, $zero
/* CCCF0 801365F0 3C028013 */  lui       $v0, %hi(draw_content_pickup_item_header)
/* CCCF4 801365F4 2442673C */  addiu     $v0, $v0, %lo(draw_content_pickup_item_header)
/* CCCF8 801365F8 AFA20018 */  sw        $v0, 0x18($sp)
/* CCCFC 801365FC 2402FFFF */  addiu     $v0, $zero, -0x1
/* CCD00 80136600 AFA80010 */  sw        $t0, 0x10($sp)
/* CCD04 80136604 AFA00014 */  sw        $zero, 0x14($sp)
/* CCD08 80136608 AFB4001C */  sw        $s4, 0x1C($sp)
/* CCD0C 8013660C 0C051F32 */  jal       set_window_properties
/* CCD10 80136610 AFA20020 */   sw       $v0, 0x20($sp)
/* CCD14 80136614 86830018 */  lh        $v1, 0x18($s4)
/* CCD18 80136618 2402015C */  addiu     $v0, $zero, 0x15C
/* CCD1C 8013661C 10620010 */  beq       $v1, $v0, .L80136660
/* CCD20 80136620 24020157 */   addiu    $v0, $zero, 0x157
/* CCD24 80136624 1062000E */  beq       $v1, $v0, .L80136660
/* CCD28 80136628 24040013 */   addiu    $a0, $zero, 0x13
/* CCD2C 8013662C 24050014 */  addiu     $a1, $zero, 0x14
/* CCD30 80136630 240600BA */  addiu     $a2, $zero, 0xBA
/* CCD34 80136634 24070118 */  addiu     $a3, $zero, 0x118
/* CCD38 80136638 24020020 */  addiu     $v0, $zero, 0x20
/* CCD3C 8013663C AFA20010 */  sw        $v0, 0x10($sp)
/* CCD40 80136640 3C028013 */  lui       $v0, %hi(draw_content_pickup_item_desc)
/* CCD44 80136644 24426A08 */  addiu     $v0, $v0, %lo(draw_content_pickup_item_desc)
/* CCD48 80136648 AFA20018 */  sw        $v0, 0x18($sp)
/* CCD4C 8013664C 2402FFFF */  addiu     $v0, $zero, -0x1
/* CCD50 80136650 AFA00014 */  sw        $zero, 0x14($sp)
/* CCD54 80136654 AFB4001C */  sw        $s4, 0x1C($sp)
/* CCD58 80136658 0C051F32 */  jal       set_window_properties
/* CCD5C 8013665C AFA20020 */   sw       $v0, 0x20($sp)
.L80136660:
/* CCD60 80136660 8283001A */  lb        $v1, 0x1A($s4)
/* CCD64 80136664 24020002 */  addiu     $v0, $zero, 0x2
/* CCD68 80136668 1062002C */  beq       $v1, $v0, .L8013671C
/* CCD6C 8013666C 3C04001D */   lui      $a0, (0x1D0060 >> 16)
/* CCD70 80136670 34840060 */  ori       $a0, $a0, (0x1D0060 & 0xFFFF)
/* CCD74 80136674 0C04991D */  jal       get_msg_width
/* CCD78 80136678 0000282D */   daddu    $a1, $zero, $zero
/* CCD7C 8013667C 24500018 */  addiu     $s0, $v0, 0x18
/* CCD80 80136680 24040011 */  addiu     $a0, $zero, 0x11
/* CCD84 80136684 00102FC2 */  srl       $a1, $s0, 31
/* CCD88 80136688 02052821 */  addu      $a1, $s0, $a1
/* CCD8C 8013668C 00052843 */  sra       $a1, $a1, 1
/* CCD90 80136690 240200A0 */  addiu     $v0, $zero, 0xA0
/* CCD94 80136694 00452823 */  subu      $a1, $v0, $a1
/* CCD98 80136698 24060024 */  addiu     $a2, $zero, 0x24
/* CCD9C 8013669C 24020028 */  addiu     $v0, $zero, 0x28
/* CCDA0 801366A0 AFA20010 */  sw        $v0, 0x10($sp)
/* CCDA4 801366A4 3C028013 */  lui       $v0, %hi(draw_content_cant_carry_more)
/* CCDA8 801366A8 244269D0 */  addiu     $v0, $v0, %lo(draw_content_cant_carry_more)
/* CCDAC 801366AC 0804D9C1 */  j         .L80136704
/* CCDB0 801366B0 0200382D */   daddu    $a3, $s0, $zero
.L801366B4:
/* CCDB4 801366B4 8C840000 */  lw        $a0, 0x0($a0)
/* CCDB8 801366B8 0C0496CF */  jal       set_message_msg
/* CCDBC 801366BC 0000282D */   daddu    $a1, $zero, $zero
/* CCDC0 801366C0 3C04001D */  lui       $a0, (0x1D005F >> 16)
/* CCDC4 801366C4 3484005F */  ori       $a0, $a0, (0x1D005F & 0xFFFF)
/* CCDC8 801366C8 0C04991D */  jal       get_msg_width
/* CCDCC 801366CC 0000282D */   daddu    $a1, $zero, $zero
/* CCDD0 801366D0 24500036 */  addiu     $s0, $v0, 0x36
/* CCDD4 801366D4 2404000C */  addiu     $a0, $zero, 0xC
/* CCDD8 801366D8 00102FC2 */  srl       $a1, $s0, 31
/* CCDDC 801366DC 02052821 */  addu      $a1, $s0, $a1
/* CCDE0 801366E0 00052843 */  sra       $a1, $a1, 1
/* CCDE4 801366E4 240200A0 */  addiu     $v0, $zero, 0xA0
/* CCDE8 801366E8 00452823 */  subu      $a1, $v0, $a1
/* CCDEC 801366EC 2406004C */  addiu     $a2, $zero, 0x4C
/* CCDF0 801366F0 0200382D */  daddu     $a3, $s0, $zero
/* CCDF4 801366F4 24020028 */  addiu     $v0, $zero, 0x28
/* CCDF8 801366F8 AFA20010 */  sw        $v0, 0x10($sp)
/* CCDFC 801366FC 3C028013 */  lui       $v0, %hi(draw_content_pickup_item_header)
/* CCE00 80136700 2442673C */  addiu     $v0, $v0, %lo(draw_content_pickup_item_header)
.L80136704:
/* CCE04 80136704 AFA20018 */  sw        $v0, 0x18($sp)
/* CCE08 80136708 2402FFFF */  addiu     $v0, $zero, -0x1
/* CCE0C 8013670C AFA00014 */  sw        $zero, 0x14($sp)
/* CCE10 80136710 AFB4001C */  sw        $s4, 0x1C($sp)
/* CCE14 80136714 0C051F32 */  jal       set_window_properties
/* CCE18 80136718 AFA20020 */   sw       $v0, 0x20($sp)
.L8013671C:
/* CCE1C 8013671C 8FBF003C */  lw        $ra, 0x3C($sp)
/* CCE20 80136720 8FB40038 */  lw        $s4, 0x38($sp)
/* CCE24 80136724 8FB30034 */  lw        $s3, 0x34($sp)
/* CCE28 80136728 8FB20030 */  lw        $s2, 0x30($sp)
/* CCE2C 8013672C 8FB1002C */  lw        $s1, 0x2C($sp)
/* CCE30 80136730 8FB00028 */  lw        $s0, 0x28($sp)
/* CCE34 80136734 03E00008 */  jr        $ra
/* CCE38 80136738 27BD0040 */   addiu    $sp, $sp, 0x40

### DECOMPILED C INSTRUCTIONS:

void func_801363A0(ItemEntity* item) {
    ItemData* itemData = &gItemTable[item->itemID];
    s32 itemMsg;
    s32 width;
    s32 posX;
    s32 offsetY;
    s32 posY;
    s32 height;
    s32 v1;

    switch (item->state) {
        case ITEM_PICKUP_STATE_SHOW_GOT_ITEM:
        case ITEM_PICKUP_STATE_SHOW_TOO_MANY:
            if (!(itemData->typeFlags & ITEM_TYPE_FLAG_BADGE)) {
                if (!(item->flags & ITEM_ENTITY_FLAG_4000000) || (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNKNOWN)) {
                    itemMsg = MSG_Menus_0058;
                } else {
                    itemMsg = MSG_Menus_005A;
                }

                if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_1_COIN) {
                    itemMsg = MSG_Menus_005D;
                }
                if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_3_STAR_PIECES) {
                    itemMsg = MSG_Menus_005E;
                }
                if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNIQUE) {
                    itemMsg = MSG_Menus_005C;
                }

                set_message_msg(itemData->nameMsg, 0);

                if (!(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY) &&
                    item->itemID != ITEM_STAR_PIECE &&
                    !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR) &&
                    !(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES))) {
                    width = get_msg_width(itemMsg, 0) + 54;
                } else {
                    width = get_msg_width(itemMsg, 0) + 30;
                }
                posX = 160 - width / 2;
                posY = 76;
            } else {
                if (!(item->flags & ITEM_ENTITY_FLAG_4000000) || (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNKNOWN)) {
                    itemMsg = MSG_Menus_0059;
                } else {
                    itemMsg = MSG_Menus_005B;
                }

                if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_1_COIN) {
                    itemMsg = MSG_Menus_005D;
                }
                if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_3_STAR_PIECES) {
                    itemMsg = MSG_Menus_005E;
                }
                if (item->pickupMsgFlags & ITEM_PICKUP_FLAG_UNIQUE) {
                    itemMsg = MSG_Menus_005C;
                }

                set_message_msg(itemData->nameMsg, 0);
                width = get_msg_width(itemMsg, 0) + 30;
                posX = 160 - width / 2;
                posY = 76;
            }
            height = PickupHeaderWindowHeight[get_msg_lines(itemMsg) - 1];
            if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) {
                offsetY = 28;
            } else {
                offsetY = 0;
            }
            if (   !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_KEY)
                && !(gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_GEAR)
                && !(item->pickupMsgFlags & (ITEM_PICKUP_FLAG_1_COIN | ITEM_PICKUP_FLAG_3_STAR_PIECES)
                && item->itemID != ITEM_STAR_PIECE)
            ) {
                set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width,
                                    height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1);
            } else if (gItemTable[item->itemID].typeFlags & ITEM_TYPE_FLAG_WORLD_USABLE){
                set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width,
                                    height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1);
            } else {
                set_window_properties(WINDOW_ID_12, posX, posY - 24 + offsetY, width,
                                    height, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1);
            }
            if (item->itemID != ITEM_STAR_PIECE && item->itemID != ITEM_COIN) {
                set_window_properties(WINDOW_ID_19, 20, 186, 280, 32, WINDOW_PRIORITY_0, draw_content_pickup_item_desc, item, -1);
            }
            if (item->state != ITEM_PICKUP_STATE_SHOW_GOT_ITEM) {
                width = get_msg_width(MSG_Menus_0060, 0) + 24;
                posX = 160 - width / 2;
                set_window_properties(WINDOW_ID_17, 160 - width / 2, 36, width, 40, WINDOW_PRIORITY_0, draw_content_cant_carry_more, item, -1);
            }
            break;
        case ITEM_PICKUP_STATE_AWAIT_THROW_AWAY:
            set_message_msg(itemData->nameMsg, 0);
            width = get_msg_width(MSG_Menus_005F, 0) + 54;
            posX = 160 - width / 2;
            set_window_properties(WINDOW_ID_12, 160 - width / 2, 76, width, 40, WINDOW_PRIORITY_0, draw_content_pickup_item_header, item, -1);
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel energy_orb_wave_update
/* 3A398C E00A41AC 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 3A3990 E00A41B0 AFBF0018 */  sw        $ra, 0x18($sp)
/* 3A3994 E00A41B4 AFB10014 */  sw        $s1, 0x14($sp)
/* 3A3998 E00A41B8 AFB00010 */  sw        $s0, 0x10($sp)
/* 3A399C E00A41BC 8C830000 */  lw        $v1, 0x0($a0)
/* 3A39A0 E00A41C0 8C90000C */  lw        $s0, 0xC($a0)
/* 3A39A4 E00A41C4 30620010 */  andi      $v0, $v1, 0x10
/* 3A39A8 E00A41C8 10400005 */  beqz      $v0, .LE00A41E0
/* 3A39AC E00A41CC 2402FFEF */   addiu    $v0, $zero, -0x11
/* 3A39B0 E00A41D0 00621024 */  and       $v0, $v1, $v0
/* 3A39B4 E00A41D4 AC820000 */  sw        $v0, 0x0($a0)
/* 3A39B8 E00A41D8 2402001E */  addiu     $v0, $zero, 0x1E
/* 3A39BC E00A41DC AE020010 */  sw        $v0, 0x10($s0)
.LE00A41E0:
/* 3A39C0 E00A41E0 8E030010 */  lw        $v1, 0x10($s0)
/* 3A39C4 E00A41E4 28620064 */  slti      $v0, $v1, 0x64
/* 3A39C8 E00A41E8 10400002 */  beqz      $v0, .LE00A41F4
/* 3A39CC E00A41EC 2462FFFF */   addiu    $v0, $v1, -0x1
/* 3A39D0 E00A41F0 AE020010 */  sw        $v0, 0x10($s0)
.LE00A41F4:
/* 3A39D4 E00A41F4 8E020014 */  lw        $v0, 0x14($s0)
/* 3A39D8 E00A41F8 8E050010 */  lw        $a1, 0x10($s0)
/* 3A39DC E00A41FC 24420001 */  addiu     $v0, $v0, 0x1
/* 3A39E0 E00A4200 04A10005 */  bgez      $a1, .LE00A4218
/* 3A39E4 E00A4204 AE020014 */   sw       $v0, 0x14($s0)
/* 3A39E8 E00A4208 0C080128 */  jal       shim_remove_effect
/* 3A39EC E00A420C 00000000 */   nop
/* 3A39F0 E00A4210 08029172 */  j         .LE00A45C8
/* 3A39F4 E00A4214 00000000 */   nop
.LE00A4218:
/* 3A39F8 E00A4218 241100FF */  addiu     $s1, $zero, 0xFF
/* 3A39FC E00A421C 0040182D */  daddu     $v1, $v0, $zero
/* 3A3A00 E00A4220 8E04001C */  lw        $a0, 0x1C($s0)
/* 3A3A04 E00A4224 28620010 */  slti      $v0, $v1, 0x10
/* 3A3A08 E00A4228 10400003 */  beqz      $v0, .LE00A4238
/* 3A3A0C E00A422C 0220302D */   daddu    $a2, $s1, $zero
/* 3A3A10 E00A4230 00031100 */  sll       $v0, $v1, 4
/* 3A3A14 E00A4234 2451FFFF */  addiu     $s1, $v0, -0x1
.LE00A4238:
/* 3A3A18 E00A4238 28A20010 */  slti      $v0, $a1, 0x10
/* 3A3A1C E00A423C 10400008 */  beqz      $v0, .LE00A4260
/* 3A3A20 E00A4240 2C82000A */   sltiu    $v0, $a0, 0xA
/* 3A3A24 E00A4244 02250018 */  mult      $s1, $a1
/* 3A3A28 E00A4248 00001012 */  mflo      $v0
/* 3A3A2C E00A424C 04420001 */  bltzl     $v0, .LE00A4254
/* 3A3A30 E00A4250 2442000F */   addiu    $v0, $v0, 0xF
.LE00A4254:
/* 3A3A34 E00A4254 00028903 */  sra       $s1, $v0, 4
/* 3A3A38 E00A4258 00053100 */  sll       $a2, $a1, 4
/* 3A3A3C E00A425C 2C82000A */  sltiu     $v0, $a0, 0xA
.LE00A4260:
/* 3A3A40 E00A4260 104000C4 */  beqz      $v0, .LE00A4574
/* 3A3A44 E00A4264 00041080 */   sll      $v0, $a0, 2
/* 3A3A48 E00A4268 3C01E00A */  lui       $at, (0xE00A4AF8 >> 16)
/* 3A3A4C E00A426C 00220821 */  addu      $at, $at, $v0
/* 3A3A50 E00A4270 8C224AF8 */  lw        $v0, (0xE00A4AF8 & 0xFFFF)($at)
/* 3A3A54 E00A4274 00400008 */  jr        $v0
/* 3A3A58 E00A4278 00000000 */   nop
/* 3A3A5C E00A427C 00031040 */  sll       $v0, $v1, 1
/* 3A3A60 E00A4280 44826000 */  mtc1      $v0, $f12
/* 3A3A64 E00A4284 00000000 */  nop
/* 3A3A68 E00A4288 46806320 */  cvt.s.w   $f12, $f12
/* 3A3A6C E00A428C 24020046 */  addiu     $v0, $zero, 0x46
/* 3A3A70 E00A4290 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3A74 E00A4294 240200B4 */  addiu     $v0, $zero, 0xB4
/* 3A3A78 E00A4298 AE020024 */  sw        $v0, 0x24($s0)
/* 3A3A7C E00A429C 24020078 */  addiu     $v0, $zero, 0x78
/* 3A3A80 E00A42A0 0C080140 */  jal       shim_sin_deg
/* 3A3A84 E00A42A4 AE020028 */   sw       $v0, 0x28($s0)
/* 3A3A88 E00A42A8 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3A3A8C E00A42AC 44811000 */  mtc1      $at, $f2
/* 3A3A90 E00A42B0 00000000 */  nop
/* 3A3A94 E00A42B4 46020002 */  mul.s     $f0, $f0, $f2
/* 3A3A98 E00A42B8 00000000 */  nop
/* 3A3A9C E00A42BC 3C01433E */  lui       $at, (0x433E0000 >> 16)
/* 3A3AA0 E00A42C0 44811000 */  mtc1      $at, $f2
/* 3A3AA4 E00A42C4 080290F4 */  j         .LE00A43D0
/* 3A3AA8 E00A42C8 46020000 */   add.s    $f0, $f0, $f2
/* 3A3AAC E00A42CC 240500FF */  addiu     $a1, $zero, 0xFF
/* 3A3AB0 E00A42D0 02250018 */  mult      $s1, $a1
/* 3A3AB4 E00A42D4 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3AB8 E00A42D8 00001812 */  mflo      $v1
/* 3A3ABC E00A42DC 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3AC0 E00A42E0 24020046 */  addiu     $v0, $zero, 0x46
/* 3A3AC4 E00A42E4 00640018 */  mult      $v1, $a0
/* 3A3AC8 E00A42E8 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3ACC E00A42EC 240200E6 */  addiu     $v0, $zero, 0xE6
/* 3A3AD0 E00A42F0 AE050024 */  sw        $a1, 0x24($s0)
/* 3A3AD4 E00A42F4 AE020028 */  sw        $v0, 0x28($s0)
/* 3A3AD8 E00A42F8 00003010 */  mfhi      $a2
/* 3A3ADC E00A42FC 0802916E */  j         .LE00A45B8
/* 3A3AE0 E00A4300 00C31021 */   addu     $v0, $a2, $v1
/* 3A3AE4 E00A4304 00031040 */  sll       $v0, $v1, 1
/* 3A3AE8 E00A4308 44826000 */  mtc1      $v0, $f12
/* 3A3AEC E00A430C 00000000 */  nop
/* 3A3AF0 E00A4310 46806320 */  cvt.s.w   $f12, $f12
/* 3A3AF4 E00A4314 240200AA */  addiu     $v0, $zero, 0xAA
/* 3A3AF8 E00A4318 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3AFC E00A431C 24020028 */  addiu     $v0, $zero, 0x28
/* 3A3B00 E00A4320 AE020024 */  sw        $v0, 0x24($s0)
/* 3A3B04 E00A4324 2402006E */  addiu     $v0, $zero, 0x6E
/* 3A3B08 E00A4328 0C080140 */  jal       shim_sin_deg
/* 3A3B0C E00A432C AE020028 */   sw       $v0, 0x28($s0)
/* 3A3B10 E00A4330 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3A3B14 E00A4334 44811000 */  mtc1      $at, $f2
/* 3A3B18 E00A4338 00000000 */  nop
/* 3A3B1C E00A433C 46020002 */  mul.s     $f0, $f0, $f2
/* 3A3B20 E00A4340 00000000 */  nop
/* 3A3B24 E00A4344 3C01433E */  lui       $at, (0x433E0000 >> 16)
/* 3A3B28 E00A4348 44811000 */  mtc1      $at, $f2
/* 3A3B2C E00A434C 080290F4 */  j         .LE00A43D0
/* 3A3B30 E00A4350 46020000 */   add.s    $f0, $f0, $f2
/* 3A3B34 E00A4354 240300FF */  addiu     $v1, $zero, 0xFF
/* 3A3B38 E00A4358 02230018 */  mult      $s1, $v1
/* 3A3B3C E00A435C 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3B40 E00A4360 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3B44 E00A4364 00001812 */  mflo      $v1
/* 3A3B48 E00A4368 240200DC */  addiu     $v0, $zero, 0xDC
/* 3A3B4C E00A436C AE020020 */  sw        $v0, 0x20($s0)
/* 3A3B50 E00A4370 00640018 */  mult      $v1, $a0
/* 3A3B54 E00A4374 24020028 */  addiu     $v0, $zero, 0x28
/* 3A3B58 E00A4378 AE020024 */  sw        $v0, 0x24($s0)
/* 3A3B5C E00A437C 0802916B */  j         .LE00A45AC
/* 3A3B60 E00A4380 240200AA */   addiu    $v0, $zero, 0xAA
/* 3A3B64 E00A4384 00031040 */  sll       $v0, $v1, 1
/* 3A3B68 E00A4388 44826000 */  mtc1      $v0, $f12
/* 3A3B6C E00A438C 00000000 */  nop
/* 3A3B70 E00A4390 46806320 */  cvt.s.w   $f12, $f12
/* 3A3B74 E00A4394 240200EB */  addiu     $v0, $zero, 0xEB
/* 3A3B78 E00A4398 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3B7C E00A439C AE020024 */  sw        $v0, 0x24($s0)
/* 3A3B80 E00A43A0 240200C8 */  addiu     $v0, $zero, 0xC8
/* 3A3B84 E00A43A4 0C080140 */  jal       shim_sin_deg
/* 3A3B88 E00A43A8 AE020028 */   sw       $v0, 0x28($s0)
/* 3A3B8C E00A43AC 3C014170 */  lui       $at, (0x41700000 >> 16)
/* 3A3B90 E00A43B0 44811000 */  mtc1      $at, $f2
/* 3A3B94 E00A43B4 00000000 */  nop
/* 3A3B98 E00A43B8 46020002 */  mul.s     $f0, $f0, $f2
/* 3A3B9C E00A43BC 00000000 */  nop
/* 3A3BA0 E00A43C0 3C014357 */  lui       $at, (0x43570000 >> 16)
/* 3A3BA4 E00A43C4 44811000 */  mtc1      $at, $f2
/* 3A3BA8 E00A43C8 00000000 */  nop
/* 3A3BAC E00A43CC 46020000 */  add.s     $f0, $f0, $f2
.LE00A43D0:
/* 3A3BB0 E00A43D0 4600010D */  trunc.w.s $f4, $f0
/* 3A3BB4 E00A43D4 44022000 */  mfc1      $v0, $f4
/* 3A3BB8 E00A43D8 00000000 */  nop
/* 3A3BBC E00A43DC 00510018 */  mult      $v0, $s1
/* 3A3BC0 E00A43E0 00001012 */  mflo      $v0
/* 3A3BC4 E00A43E4 3C038080 */  lui       $v1, (0x80808081 >> 16)
/* 3A3BC8 E00A43E8 34638081 */  ori       $v1, $v1, (0x80808081 & 0xFFFF)
/* 3A3BCC E00A43EC 00430018 */  mult      $v0, $v1
/* 3A3BD0 E00A43F0 00001810 */  mfhi      $v1
/* 3A3BD4 E00A43F4 00621821 */  addu      $v1, $v1, $v0
/* 3A3BD8 E00A43F8 000319C3 */  sra       $v1, $v1, 7
/* 3A3BDC E00A43FC 000217C3 */  sra       $v0, $v0, 31
/* 3A3BE0 E00A4400 00621823 */  subu      $v1, $v1, $v0
/* 3A3BE4 E00A4404 08029172 */  j         .LE00A45C8
/* 3A3BE8 E00A4408 AE03002C */   sw       $v1, 0x2C($s0)
/* 3A3BEC E00A440C 240300FF */  addiu     $v1, $zero, 0xFF
/* 3A3BF0 E00A4410 02230018 */  mult      $s1, $v1
/* 3A3BF4 E00A4414 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3BF8 E00A4418 00001812 */  mflo      $v1
/* 3A3BFC E00A441C 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3C00 E00A4420 240200EB */  addiu     $v0, $zero, 0xEB
/* 3A3C04 E00A4424 00640018 */  mult      $v1, $a0
/* 3A3C08 E00A4428 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3C0C E00A442C AE020024 */  sw        $v0, 0x24($s0)
/* 3A3C10 E00A4430 0802916B */  j         .LE00A45AC
/* 3A3C14 E00A4434 240200C8 */   addiu    $v0, $zero, 0xC8
/* 3A3C18 E00A4438 C6000030 */  lwc1      $f0, 0x30($s0)
/* 3A3C1C E00A443C 3C01E00A */  lui       $at, (0xE00A4B20 >> 16)
/* 3A3C20 E00A4440 D4224B20 */  ldc1      $f2, (0xE00A4B20 & 0xFFFF)($at)
/* 3A3C24 E00A4444 46000021 */  cvt.d.s   $f0, $f0
/* 3A3C28 E00A4448 46220002 */  mul.d     $f0, $f0, $f2
/* 3A3C2C E00A444C 00000000 */  nop
/* 3A3C30 E00A4450 2403007F */  addiu     $v1, $zero, 0x7F
/* 3A3C34 E00A4454 00C30018 */  mult      $a2, $v1
/* 3A3C38 E00A4458 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3C3C E00A445C 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3C40 E00A4460 00001812 */  mflo      $v1
/* 3A3C44 E00A4464 24020046 */  addiu     $v0, $zero, 0x46
/* 3A3C48 E00A4468 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3C4C E00A446C 00640018 */  mult      $v1, $a0
/* 3A3C50 E00A4470 240200B4 */  addiu     $v0, $zero, 0xB4
/* 3A3C54 E00A4474 AE020024 */  sw        $v0, 0x24($s0)
/* 3A3C58 E00A4478 08029153 */  j         .LE00A454C
/* 3A3C5C E00A447C 24020078 */   addiu    $v0, $zero, 0x78
/* 3A3C60 E00A4480 C6000030 */  lwc1      $f0, 0x30($s0)
/* 3A3C64 E00A4484 3C01E00A */  lui       $at, (0xE00A4B28 >> 16)
/* 3A3C68 E00A4488 D4224B28 */  ldc1      $f2, (0xE00A4B28 & 0xFFFF)($at)
/* 3A3C6C E00A448C 46000021 */  cvt.d.s   $f0, $f0
/* 3A3C70 E00A4490 46220002 */  mul.d     $f0, $f0, $f2
/* 3A3C74 E00A4494 00000000 */  nop
/* 3A3C78 E00A4498 240300A0 */  addiu     $v1, $zero, 0xA0
/* 3A3C7C E00A449C 00C30018 */  mult      $a2, $v1
/* 3A3C80 E00A44A0 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3C84 E00A44A4 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3C88 E00A44A8 00001812 */  mflo      $v1
/* 3A3C8C E00A44AC 240200A2 */  addiu     $v0, $zero, 0xA2
/* 3A3C90 E00A44B0 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3C94 E00A44B4 00640018 */  mult      $v1, $a0
/* 3A3C98 E00A44B8 08029151 */  j         .LE00A4544
/* 3A3C9C E00A44BC 240200BD */   addiu    $v0, $zero, 0xBD
/* 3A3CA0 E00A44C0 C6000030 */  lwc1      $f0, 0x30($s0)
/* 3A3CA4 E00A44C4 3C01E00A */  lui       $at, (0xE00A4B30 >> 16)
/* 3A3CA8 E00A44C8 D4224B30 */  ldc1      $f2, (0xE00A4B30 & 0xFFFF)($at)
/* 3A3CAC E00A44CC 46000021 */  cvt.d.s   $f0, $f0
/* 3A3CB0 E00A44D0 46220002 */  mul.d     $f0, $f0, $f2
/* 3A3CB4 E00A44D4 00000000 */  nop
/* 3A3CB8 E00A44D8 2403007F */  addiu     $v1, $zero, 0x7F
/* 3A3CBC E00A44DC 00C30018 */  mult      $a2, $v1
/* 3A3CC0 E00A44E0 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3CC4 E00A44E4 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3CC8 E00A44E8 00001812 */  mflo      $v1
/* 3A3CCC E00A44EC 240200AA */  addiu     $v0, $zero, 0xAA
/* 3A3CD0 E00A44F0 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3CD4 E00A44F4 00640018 */  mult      $v1, $a0
/* 3A3CD8 E00A44F8 24020028 */  addiu     $v0, $zero, 0x28
/* 3A3CDC E00A44FC AE020024 */  sw        $v0, 0x24($s0)
/* 3A3CE0 E00A4500 08029153 */  j         .LE00A454C
/* 3A3CE4 E00A4504 2402006E */   addiu    $v0, $zero, 0x6E
/* 3A3CE8 E00A4508 C6000030 */  lwc1      $f0, 0x30($s0)
/* 3A3CEC E00A450C 3C01E00A */  lui       $at, (0xE00A4B38 >> 16)
/* 3A3CF0 E00A4510 D4224B38 */  ldc1      $f2, (0xE00A4B38 & 0xFFFF)($at)
/* 3A3CF4 E00A4514 46000021 */  cvt.d.s   $f0, $f0
/* 3A3CF8 E00A4518 46220002 */  mul.d     $f0, $f0, $f2
/* 3A3CFC E00A451C 00000000 */  nop
/* 3A3D00 E00A4520 240300A0 */  addiu     $v1, $zero, 0xA0
/* 3A3D04 E00A4524 00C30018 */  mult      $a2, $v1
/* 3A3D08 E00A4528 3C048080 */  lui       $a0, (0x80808081 >> 16)
/* 3A3D0C E00A452C 34848081 */  ori       $a0, $a0, (0x80808081 & 0xFFFF)
/* 3A3D10 E00A4530 00001812 */  mflo      $v1
/* 3A3D14 E00A4534 240200B4 */  addiu     $v0, $zero, 0xB4
/* 3A3D18 E00A4538 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3D1C E00A453C 00640018 */  mult      $v1, $a0
/* 3A3D20 E00A4540 240200B2 */  addiu     $v0, $zero, 0xB2
.LE00A4544:
/* 3A3D24 E00A4544 AE020024 */  sw        $v0, 0x24($s0)
/* 3A3D28 E00A4548 240200AE */  addiu     $v0, $zero, 0xAE
.LE00A454C:
/* 3A3D2C E00A454C AE020028 */  sw        $v0, 0x28($s0)
/* 3A3D30 E00A4550 00002810 */  mfhi      $a1
/* 3A3D34 E00A4554 00A31021 */  addu      $v0, $a1, $v1
/* 3A3D38 E00A4558 000211C3 */  sra       $v0, $v0, 7
/* 3A3D3C E00A455C 00031FC3 */  sra       $v1, $v1, 31
/* 3A3D40 E00A4560 00431023 */  subu      $v0, $v0, $v1
/* 3A3D44 E00A4564 46200020 */  cvt.s.d   $f0, $f0
/* 3A3D48 E00A4568 AE02002C */  sw        $v0, 0x2C($s0)
/* 3A3D4C E00A456C 08029172 */  j         .LE00A45C8
/* 3A3D50 E00A4570 E6000030 */   swc1     $f0, 0x30($s0)
.LE00A4574:
/* 3A3D54 E00A4574 240300A0 */  addiu     $v1, $zero, 0xA0
/* 3A3D58 E00A4578 00C30018 */  mult      $a2, $v1
/* 3A3D5C E00A457C C6000030 */  lwc1      $f0, 0x30($s0)
/* 3A3D60 E00A4580 C6020034 */  lwc1      $f2, 0x34($s0)
/* 3A3D64 E00A4584 46020000 */  add.s     $f0, $f0, $f2
/* 3A3D68 E00A4588 3C028080 */  lui       $v0, (0x80808081 >> 16)
/* 3A3D6C E00A458C 00001812 */  mflo      $v1
/* 3A3D70 E00A4590 34428081 */  ori       $v0, $v0, (0x80808081 & 0xFFFF)
/* 3A3D74 E00A4594 E6000030 */  swc1      $f0, 0x30($s0)
/* 3A3D78 E00A4598 00620018 */  mult      $v1, $v0
/* 3A3D7C E00A459C 24020032 */  addiu     $v0, $zero, 0x32
/* 3A3D80 E00A45A0 AE020020 */  sw        $v0, 0x20($s0)
/* 3A3D84 E00A45A4 AE020024 */  sw        $v0, 0x24($s0)
/* 3A3D88 E00A45A8 240200FF */  addiu     $v0, $zero, 0xFF
.LE00A45AC:
/* 3A3D8C E00A45AC AE020028 */  sw        $v0, 0x28($s0)
/* 3A3D90 E00A45B0 00002810 */  mfhi      $a1
/* 3A3D94 E00A45B4 00A31021 */  addu      $v0, $a1, $v1
.LE00A45B8:
/* 3A3D98 E00A45B8 000211C3 */  sra       $v0, $v0, 7
/* 3A3D9C E00A45BC 00031FC3 */  sra       $v1, $v1, 31
/* 3A3DA0 E00A45C0 00431023 */  subu      $v0, $v0, $v1
/* 3A3DA4 E00A45C4 AE02002C */  sw        $v0, 0x2C($s0)
.LE00A45C8:
/* 3A3DA8 E00A45C8 8FBF0018 */  lw        $ra, 0x18($sp)
/* 3A3DAC E00A45CC 8FB10014 */  lw        $s1, 0x14($sp)
/* 3A3DB0 E00A45D0 8FB00010 */  lw        $s0, 0x10($sp)
/* 3A3DB4 E00A45D4 03E00008 */  jr        $ra
/* 3A3DB8 E00A45D8 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void energy_orb_wave_update(EffectInstance* effect) {
    EnergyOrbWaveFXData* data = effect->data.energyOrbWave;
    f32 var_float;
    s32 unk_14;
    s32 var_2;
    s32 var_1;
    s32 unk_1C;
    u16 var_4;
    s32 var_3;

    if (effect->flags & FX_INSTANCE_FLAG_DISMISS) {
        effect->flags &= ~FX_INSTANCE_FLAG_DISMISS;
        data->unk_10 = 30;
    }

    if (data->unk_10 < 100) {
        data->unk_10--;
    }
    data->unk_14++;

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

    unk_14 = data->unk_14;
    unk_1C = data->unk_1C;
    var_1 = 0xFF;
    var_2 = 0xFF;

    if (unk_14 < 16) {
        var_1 = (unk_14 * 16) - 1;
    }
    if (data->unk_10 < 16) {
        var_1 = var_1 * data->unk_10 / 16;
        var_2 = data->unk_10 * 16;
    }

    switch (unk_1C) {
        case 0:
            data->unk_20 = 70;
            data->unk_24 = 180;
            data->unk_28 = 120;
            var_float = shim_sin_deg(unk_14 * 2) * 10.0f + 190.0f;
            data->unk_2C = ((s32) var_float * var_1) / 255;
            break;
        case 1:
            var_3 = 255;
            data->unk_20 = 70;
            data->unk_24 = 255;
            data->unk_28 = 230;
            data->unk_2C = (var_1 * var_3) / 255;
            break;
        case 2:
            data->unk_20 = 170;
            data->unk_24 = 40;
            data->unk_28 = 110;
            var_float = shim_sin_deg(unk_14 * 2) * 10.0f + 190.0f;
            data->unk_2C = ((s32) var_float * var_1) / 255;
            break;
        case 3:
            var_4 = 255;
            data->unk_20 = 220;
            data->unk_24 = 40;
            data->unk_28 = 170;
            data->unk_2C = (var_1 * var_4) / 255;
            break;
        case 4:
            data->unk_20 = 235;
            data->unk_24 = 235;
            data->unk_28 = 200;
            var_float = shim_sin_deg(unk_14 * 2) * 15.0f + 215.0f;
            data->unk_2C = ((s32) var_float * var_1) / 255;
            break;
        case 5:
            var_4 = 255;
            data->unk_20 = 235;
            data->unk_24 = 235;
            data->unk_28 = 200;
            data->unk_2C = (var_1 * var_4) / 255;
            break;
        case 6:
            var_4 = 127;
            data->unk_20 = 70;
            data->unk_24 = 180;
            data->unk_28 = 120;
            data->unk_2C = (var_2 * var_4) / 255;
            data->scale *= 1.1;
            break;
        case 7:
            var_4 = 160;
            data->unk_20 = 162;
            data->unk_24 = 189;
            data->unk_28 = 174;
            data->unk_2C = (var_2 * var_4) / 255;
            data->scale *= 1.1;
            break;
        case 8:
            var_4 = 127;
            data->unk_20 = 170;
            data->unk_24 = 40;
            data->unk_28 = 110;
            data->unk_2C = (var_2 * var_4) / 255;
            data->scale *= 1.1;
            break;
        case 9:
            var_4 = 160;
            data->unk_20 = 180;
            data->unk_24 = 178;
            data->unk_28 = 174;
            data->unk_2C = (var_2 * var_4) / 255;
            data->scale *= 1.1;
            break;
        default:
            var_4 = 160;
            data->unk_20 = 50;
            data->unk_24 = 50;
            data->unk_28 = 255;
            data->unk_2C = (var_2 * var_4) / 255;
            data->scale += data->unk_34;
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel phys_adjust_cam_on_landing
/* 7E9E0 800E5530 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 7E9E4 800E5534 AFB00010 */  sw        $s0, 0x10($sp)
/* 7E9E8 800E5538 AFB10014 */  sw        $s1, 0x14($sp)
/* 7E9EC 800E553C 3C118011 */  lui       $s1, %hi(gPartnerStatus)
/* 7E9F0 800E5540 2631EBB0 */  addiu     $s1, $s1, %lo(gPartnerStatus)
/* 7E9F4 800E5544 3C038007 */  lui       $v1, %hi(gGameStatusPtr)
/* 7E9F8 800E5548 8C63419C */  lw        $v1, %lo(gGameStatusPtr)($v1)
/* 7E9FC 800E554C 3C058011 */  lui       $a1, %hi(gPlayerStatus)
/* 7EA00 800E5550 24A5EFC8 */  addiu     $a1, $a1, %lo(gPlayerStatus)
/* 7EA04 800E5554 AFBF0018 */  sw        $ra, 0x18($sp)
/* 7EA08 800E5558 84640086 */  lh        $a0, 0x86($v1)
/* 7EA0C 800E555C 2402000B */  addiu     $v0, $zero, 0xB
/* 7EA10 800E5560 10820008 */  beq       $a0, $v0, .L800E5584
/* 7EA14 800E5564 24100001 */   addiu    $s0, $zero, 0x1
/* 7EA18 800E5568 2402000D */  addiu     $v0, $zero, 0xD
/* 7EA1C 800E556C 148200B5 */  bne       $a0, $v0, .L800E5844
/* 7EA20 800E5570 24020001 */   addiu    $v0, $zero, 0x1
/* 7EA24 800E5574 8462008C */  lh        $v0, 0x8C($v1)
/* 7EA28 800E5578 38420004 */  xori      $v0, $v0, 0x4
/* 7EA2C 800E557C 08039610 */  j         .L800E5840
/* 7EA30 800E5580 0002802B */   sltu     $s0, $zero, $v0
.L800E5584:
/* 7EA34 800E5584 8463008C */  lh        $v1, 0x8C($v1)
/* 7EA38 800E5588 2C62000C */  sltiu     $v0, $v1, 0xC
/* 7EA3C 800E558C 104000AC */  beqz      $v0, .L800E5840
/* 7EA40 800E5590 00031080 */   sll      $v0, $v1, 2
/* 7EA44 800E5594 3C018011 */  lui       $at, %hi(jtbl_8010BF00)
/* 7EA48 800E5598 00220821 */  addu      $at, $at, $v0
/* 7EA4C 800E559C 8C22BF00 */  lw        $v0, %lo(jtbl_8010BF00)($at)
/* 7EA50 800E55A0 00400008 */  jr        $v0
/* 7EA54 800E55A4 00000000 */   nop
glabel .L800E55A8
/* 7EA58 800E55A8 3C038011 */  lui       $v1, %hi(D_8010C9B0)
/* 7EA5C 800E55AC 2463C9B0 */  addiu     $v1, $v1, %lo(D_8010C9B0)
/* 7EA60 800E55B0 84620000 */  lh        $v0, 0x0($v1)
/* 7EA64 800E55B4 1440000A */  bnez      $v0, .L800E55E0
/* 7EA68 800E55B8 00000000 */   nop
/* 7EA6C 800E55BC C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EA70 800E55C0 44800000 */  mtc1      $zero, $f0
/* 7EA74 800E55C4 00000000 */  nop
/* 7EA78 800E55C8 4600103E */  c.le.s    $f2, $f0
/* 7EA7C 800E55CC 00000000 */  nop
/* 7EA80 800E55D0 4500009A */  bc1f      .L800E583C
/* 7EA84 800E55D4 24020001 */   addiu    $v0, $zero, 0x1
/* 7EA88 800E55D8 0803960F */  j         .L800E583C
/* 7EA8C 800E55DC A4620000 */   sh       $v0, 0x0($v1)
.L800E55E0:
/* 7EA90 800E55E0 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EA94 800E55E4 44800000 */  mtc1      $zero, $f0
/* 7EA98 800E55E8 080395E6 */  j         .L800E5798
/* 7EA9C 800E55EC 00000000 */   nop
glabel .L800E55F0
/* 7EAA0 800E55F0 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EAA4 800E55F4 3C0141C8 */  lui       $at, (0x41C80000 >> 16)
/* 7EAA8 800E55F8 44810000 */  mtc1      $at, $f0
/* 7EAAC 800E55FC 080395E6 */  j         .L800E5798
/* 7EAB0 800E5600 00000000 */   nop
glabel .L800E5604
/* 7EAB4 800E5604 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EAB8 800E5608 3C014248 */  lui       $at, (0x42480000 >> 16)
/* 7EABC 800E560C 44810000 */  mtc1      $at, $f0
/* 7EAC0 800E5610 080395E6 */  j         .L800E5798
/* 7EAC4 800E5614 00000000 */   nop
glabel .L800E5618
/* 7EAC8 800E5618 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EACC 800E561C 3C01C3C3 */  lui       $at, (0xC3C30000 >> 16)
/* 7EAD0 800E5620 44810000 */  mtc1      $at, $f0
/* 7EAD4 800E5624 00000000 */  nop
/* 7EAD8 800E5628 4602003C */  c.lt.s    $f0, $f2
/* 7EADC 800E562C 00000000 */  nop
/* 7EAE0 800E5630 45030083 */  bc1tl     .L800E5840
/* 7EAE4 800E5634 0000802D */   daddu    $s0, $zero, $zero
/* 7EAE8 800E5638 3C01C3F7 */  lui       $at, (0xC3F78000 >> 16)
/* 7EAEC 800E563C 34218000 */  ori       $at, $at, (0xC3F78000 & 0xFFFF)
/* 7EAF0 800E5640 44810000 */  mtc1      $at, $f0
/* 7EAF4 800E5644 00000000 */  nop
/* 7EAF8 800E5648 4600103C */  c.lt.s    $f2, $f0
/* 7EAFC 800E564C 080395E8 */  j         .L800E57A0
/* 7EB00 800E5650 00000000 */   nop
glabel .L800E5654
/* 7EB04 800E5654 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EB08 800E5658 3C01C2B4 */  lui       $at, (0xC2B40000 >> 16)
/* 7EB0C 800E565C 44810000 */  mtc1      $at, $f0
/* 7EB10 800E5660 00000000 */  nop
/* 7EB14 800E5664 4602003C */  c.lt.s    $f0, $f2
/* 7EB18 800E5668 00000000 */  nop
/* 7EB1C 800E566C 45030074 */  bc1tl     .L800E5840
/* 7EB20 800E5670 0000802D */   daddu    $s0, $zero, $zero
/* 7EB24 800E5674 3C01C3B9 */  lui       $at, (0xC3B90000 >> 16)
/* 7EB28 800E5678 44810000 */  mtc1      $at, $f0
/* 7EB2C 800E567C 00000000 */  nop
/* 7EB30 800E5680 4600103C */  c.lt.s    $f2, $f0
/* 7EB34 800E5684 080395E8 */  j         .L800E57A0
/* 7EB38 800E5688 00000000 */   nop
glabel .L800E568C
/* 7EB3C 800E568C 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 7EB40 800E5690 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 7EB44 800E5694 8442008E */  lh        $v0, 0x8E($v0)
/* 7EB48 800E5698 54400069 */  bnel      $v0, $zero, .L800E5840
/* 7EB4C 800E569C 24100002 */   addiu    $s0, $zero, 0x2
/* 7EB50 800E56A0 3C038011 */  lui       $v1, %hi(D_8010C9B0)
/* 7EB54 800E56A4 2463C9B0 */  addiu     $v1, $v1, %lo(D_8010C9B0)
/* 7EB58 800E56A8 84620000 */  lh        $v0, 0x0($v1)
/* 7EB5C 800E56AC 1440000A */  bnez      $v0, .L800E56D8
/* 7EB60 800E56B0 00000000 */   nop
/* 7EB64 800E56B4 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EB68 800E56B8 44800000 */  mtc1      $zero, $f0
/* 7EB6C 800E56BC 00000000 */  nop
/* 7EB70 800E56C0 4602003C */  c.lt.s    $f0, $f2
/* 7EB74 800E56C4 00000000 */  nop
/* 7EB78 800E56C8 4503005D */  bc1tl     .L800E5840
/* 7EB7C 800E56CC 24100002 */   addiu    $s0, $zero, 0x2
/* 7EB80 800E56D0 24020001 */  addiu     $v0, $zero, 0x1
/* 7EB84 800E56D4 A4620000 */  sh        $v0, 0x0($v1)
.L800E56D8:
/* 7EB88 800E56D8 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EB8C 800E56DC 44800000 */  mtc1      $zero, $f0
/* 7EB90 800E56E0 080395E6 */  j         .L800E5798
/* 7EB94 800E56E4 00000000 */   nop
glabel .L800E56E8
/* 7EB98 800E56E8 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 7EB9C 800E56EC 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 7EBA0 800E56F0 8442008E */  lh        $v0, 0x8E($v0)
/* 7EBA4 800E56F4 54400052 */  bnel      $v0, $zero, .L800E5840
/* 7EBA8 800E56F8 24100002 */   addiu    $s0, $zero, 0x2
/* 7EBAC 800E56FC 3C038011 */  lui       $v1, %hi(D_8010C9B0)
/* 7EBB0 800E5700 2463C9B0 */  addiu     $v1, $v1, %lo(D_8010C9B0)
/* 7EBB4 800E5704 84620000 */  lh        $v0, 0x0($v1)
/* 7EBB8 800E5708 1440000B */  bnez      $v0, .L800E5738
/* 7EBBC 800E570C 00000000 */   nop
/* 7EBC0 800E5710 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EBC4 800E5714 3C01C302 */  lui       $at, (0xC3020000 >> 16)
/* 7EBC8 800E5718 44810000 */  mtc1      $at, $f0
/* 7EBCC 800E571C 00000000 */  nop
/* 7EBD0 800E5720 4602003C */  c.lt.s    $f0, $f2
/* 7EBD4 800E5724 00000000 */  nop
/* 7EBD8 800E5728 45030045 */  bc1tl     .L800E5840
/* 7EBDC 800E572C 24100002 */   addiu    $s0, $zero, 0x2
/* 7EBE0 800E5730 24020001 */  addiu     $v0, $zero, 0x1
/* 7EBE4 800E5734 A4620000 */  sh        $v0, 0x0($v1)
.L800E5738:
/* 7EBE8 800E5738 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EBEC 800E573C 3C01C302 */  lui       $at, (0xC3020000 >> 16)
/* 7EBF0 800E5740 44810000 */  mtc1      $at, $f0
/* 7EBF4 800E5744 080395E6 */  j         .L800E5798
/* 7EBF8 800E5748 00000000 */   nop
glabel .L800E574C
/* 7EBFC 800E574C 3C038011 */  lui       $v1, %hi(D_8010C9B0)
/* 7EC00 800E5750 2463C9B0 */  addiu     $v1, $v1, %lo(D_8010C9B0)
/* 7EC04 800E5754 84620000 */  lh        $v0, 0x0($v1)
/* 7EC08 800E5758 1440000B */  bnez      $v0, .L800E5788
/* 7EC0C 800E575C 00000000 */   nop
/* 7EC10 800E5760 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EC14 800E5764 3C01C402 */  lui       $at, (0xC4020000 >> 16)
/* 7EC18 800E5768 44810000 */  mtc1      $at, $f0
/* 7EC1C 800E576C 00000000 */  nop
/* 7EC20 800E5770 4602003C */  c.lt.s    $f0, $f2
/* 7EC24 800E5774 00000000 */  nop
/* 7EC28 800E5778 45030031 */  bc1tl     .L800E5840
/* 7EC2C 800E577C 24100002 */   addiu    $s0, $zero, 0x2
/* 7EC30 800E5780 24020001 */  addiu     $v0, $zero, 0x1
/* 7EC34 800E5784 A4620000 */  sh        $v0, 0x0($v1)
.L800E5788:
/* 7EC38 800E5788 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EC3C 800E578C 3C01C402 */  lui       $at, (0xC4020000 >> 16)
/* 7EC40 800E5790 44810000 */  mtc1      $at, $f0
/* 7EC44 800E5794 00000000 */  nop
.L800E5798:
/* 7EC48 800E5798 4602003C */  c.lt.s    $f0, $f2
/* 7EC4C 800E579C 00000000 */  nop
.L800E57A0:
/* 7EC50 800E57A0 45000028 */  bc1f      .L800E5844
/* 7EC54 800E57A4 24020001 */   addiu    $v0, $zero, 0x1
/* 7EC58 800E57A8 08039611 */  j         .L800E5844
/* 7EC5C 800E57AC 0000802D */   daddu    $s0, $zero, $zero
glabel .L800E57B0
/* 7EC60 800E57B0 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 7EC64 800E57B4 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 7EC68 800E57B8 8442008E */  lh        $v0, 0x8E($v0)
/* 7EC6C 800E57BC 14400019 */  bnez      $v0, .L800E5824
/* 7EC70 800E57C0 0000202D */   daddu    $a0, $zero, $zero
/* 7EC74 800E57C4 3C038011 */  lui       $v1, %hi(D_8010C9B0)
/* 7EC78 800E57C8 2463C9B0 */  addiu     $v1, $v1, %lo(D_8010C9B0)
/* 7EC7C 800E57CC 84620000 */  lh        $v0, 0x0($v1)
/* 7EC80 800E57D0 1440000B */  bnez      $v0, .L800E5800
/* 7EC84 800E57D4 00000000 */   nop
/* 7EC88 800E57D8 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7EC8C 800E57DC 3C01C402 */  lui       $at, (0xC4020000 >> 16)
/* 7EC90 800E57E0 44810000 */  mtc1      $at, $f0
/* 7EC94 800E57E4 00000000 */  nop
/* 7EC98 800E57E8 4602003C */  c.lt.s    $f0, $f2
/* 7EC9C 800E57EC 00000000 */  nop
/* 7ECA0 800E57F0 45030013 */  bc1tl     .L800E5840
/* 7ECA4 800E57F4 24100002 */   addiu    $s0, $zero, 0x2
/* 7ECA8 800E57F8 24020001 */  addiu     $v0, $zero, 0x1
/* 7ECAC 800E57FC A4620000 */  sh        $v0, 0x0($v1)
.L800E5800:
/* 7ECB0 800E5800 C4A2002C */  lwc1      $f2, 0x2C($a1)
/* 7ECB4 800E5804 3C01C402 */  lui       $at, (0xC4020000 >> 16)
/* 7ECB8 800E5808 44810000 */  mtc1      $at, $f0
/* 7ECBC 800E580C 00000000 */  nop
/* 7ECC0 800E5810 4602003C */  c.lt.s    $f0, $f2
/* 7ECC4 800E5814 00000000 */  nop
/* 7ECC8 800E5818 45030001 */  bc1tl     .L800E5820
/* 7ECCC 800E581C 0000802D */   daddu    $s0, $zero, $zero
.L800E5820:
/* 7ECD0 800E5820 0000202D */  daddu     $a0, $zero, $zero
.L800E5824:
/* 7ECD4 800E5824 3C05F5DE */  lui       $a1, (0xF5DE0180 >> 16)
/* 7ECD8 800E5828 0C0B1EAF */  jal       evt_get_variable
/* 7ECDC 800E582C 34A50180 */   ori      $a1, $a1, (0xF5DE0180 & 0xFFFF)
/* 7ECE0 800E5830 2842FFC6 */  slti      $v0, $v0, -0x3A
/* 7ECE4 800E5834 14400003 */  bnez      $v0, .L800E5844
/* 7ECE8 800E5838 24020001 */   addiu    $v0, $zero, 0x1
glabel .L800E583C
/* 7ECEC 800E583C 24100002 */  addiu     $s0, $zero, 0x2
glabel .L800E5840
/* 7ECF0 800E5840 24020001 */  addiu     $v0, $zero, 0x1
.L800E5844:
/* 7ECF4 800E5844 16020014 */  bne       $s0, $v0, .L800E5898
/* 7ECF8 800E5848 00000000 */   nop
/* 7ECFC 800E584C 3C048016 */  lui       $a0, %hi(gCollisionStatus + 0x2)
/* 7ED00 800E5850 8484A552 */  lh        $a0, %lo(gCollisionStatus + 0x2)($a0)
/* 7ED04 800E5854 0C016F6A */  jal       get_collider_flags
/* 7ED08 800E5858 00000000 */   nop
/* 7ED0C 800E585C 304200FF */  andi      $v0, $v0, 0xFF
/* 7ED10 800E5860 24030003 */  addiu     $v1, $zero, 0x3
/* 7ED14 800E5864 14430007 */  bne       $v0, $v1, .L800E5884
/* 7ED18 800E5868 00000000 */   nop
/* 7ED1C 800E586C 3C03800B */  lui       $v1, %hi(gCameras)
/* 7ED20 800E5870 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 7ED24 800E5874 94620002 */  lhu       $v0, 0x2($v1)
/* 7ED28 800E5878 0000802D */  daddu     $s0, $zero, $zero
/* 7ED2C 800E587C 08039635 */  j         .L800E58D4
/* 7ED30 800E5880 34420001 */   ori      $v0, $v0, 0x1
.L800E5884:
/* 7ED34 800E5884 3C03800B */  lui       $v1, %hi(gCameras)
/* 7ED38 800E5888 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 7ED3C 800E588C 94620002 */  lhu       $v0, 0x2($v1)
/* 7ED40 800E5890 08039635 */  j         .L800E58D4
/* 7ED44 800E5894 3042FFFE */   andi     $v0, $v0, 0xFFFE
.L800E5898:
/* 7ED48 800E5898 82220000 */  lb        $v0, 0x0($s1)
/* 7ED4C 800E589C 10400009 */  beqz      $v0, .L800E58C4
/* 7ED50 800E58A0 24020004 */   addiu    $v0, $zero, 0x4
/* 7ED54 800E58A4 82230003 */  lb        $v1, 0x3($s1)
/* 7ED58 800E58A8 14620006 */  bne       $v1, $v0, .L800E58C4
/* 7ED5C 800E58AC 00000000 */   nop
/* 7ED60 800E58B0 3C03800B */  lui       $v1, %hi(gCameras)
/* 7ED64 800E58B4 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 7ED68 800E58B8 94620002 */  lhu       $v0, 0x2($v1)
/* 7ED6C 800E58BC 08039635 */  j         .L800E58D4
/* 7ED70 800E58C0 34420002 */   ori      $v0, $v0, 0x2
.L800E58C4:
/* 7ED74 800E58C4 3C03800B */  lui       $v1, %hi(gCameras)
/* 7ED78 800E58C8 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 7ED7C 800E58CC 94620002 */  lhu       $v0, 0x2($v1)
/* 7ED80 800E58D0 3042FFFD */  andi      $v0, $v0, 0xFFFD
.L800E58D4:
/* 7ED84 800E58D4 A4620002 */  sh        $v0, 0x2($v1)
/* 7ED88 800E58D8 0200102D */  daddu     $v0, $s0, $zero
/* 7ED8C 800E58DC 8FBF0018 */  lw        $ra, 0x18($sp)
/* 7ED90 800E58E0 8FB10014 */  lw        $s1, 0x14($sp)
/* 7ED94 800E58E4 8FB00010 */  lw        $s0, 0x10($sp)
/* 7ED98 800E58E8 03E00008 */  jr        $ra
/* 7ED9C 800E58EC 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

s32 phys_adjust_cam_on_landing(void) {
    PartnerStatus* partnerStatus = &gPartnerStatus;
    GameStatus* gameStatus = gGameStatusPtr;
    PlayerStatus* playerStatus = &gPlayerStatus;
    s32 ret = 1;

    //TODO hardcoded map IDs
    switch (gameStatus->areaID) {
        case AREA_OBK:
            ret = gameStatus->mapID != 4;
            break;
        case AREA_ISK:
            switch (gameStatus->mapID) {
                case 0:
                    ret = 2;
                    break;
                case 1:
                    if (D_8010C9B0 == 0) {
                        if (playerStatus->position.y <= 0.0f) {
                            D_8010C9B0 = 1;
                        }
                        ret = 2;
                    } else if (playerStatus->position.y > 0.0f) {
                        ret = 0;
                    }
                    break;
                case 3:
                    if (playerStatus->position.y > 25.0f) {
                        ret = 0;
                    }
                    break;
                case 4:
                    if (playerStatus->position.y > 50.0f) {
                        ret = 0;
                    }
                    break;
                case 7:
                    if (playerStatus->position.y > -390.0f) {
                        ret = 0;
                    } else if (playerStatus->position.y < -495.0f) {
                        ret = 0;
                    }
                    break;
                case 8:
                    if (playerStatus->position.y > -90.0f) {
                        ret = 0;
                    } else if (playerStatus->position.y < -370.0f) {
                        ret = 0;
                    }
                    break;
                case 2:
                    if (gGameStatusPtr->entryID == 0) {
                        if (D_8010C9B0 == 0) {
                            if (!(playerStatus->position.y > 0.0f)) {
                                D_8010C9B0 = 1;
                            } else {
                                ret = 2;
                                break;
                            }
                        }

                        if (playerStatus->position.y > 0.0f) {
                            ret = 0;
                        }
                    } else {
                        ret = 2;
                    }
                    break;
                case 5:
                    if (gGameStatusPtr->entryID == 0) {
                        if (D_8010C9B0 == 0) {
                            if (!(playerStatus->position.y > -130.0f)) {
                                D_8010C9B0 = 1;
                            } else {
                                ret = 2;
                                break;
                            }

                        }

                        if (playerStatus->position.y > -130.0f) {
                            ret = 0;
                        }
                    } else {
                        ret = 2;
                    }
                    break;
                case 10:
                    if (D_8010C9B0 == 0) {
                        if (!(playerStatus->position.y > -520.0f)) {
                            D_8010C9B0 = 1;
                        } else {
                            ret = 2;
                            break;
                        }
                    }

                    if (playerStatus->position.y > -520.0f) {
                        ret = 0;
                    }
                    break;
                case 11:
                    if (gGameStatusPtr->entryID == 0) {
                        if (D_8010C9B0 == 0) {
                            if (!(playerStatus->position.y > -520.0f)) {
                                D_8010C9B0 = 1;
                            } else {
                                ret = 2;
                                break;
                            }

                        }

                        if (playerStatus->position.y > -520.0f) {
                            ret = 0;
                        }
                    }

                    if (evt_get_variable(NULL, GB_StoryProgress) >= STORY_CH2_DRAINED_THIRD_SAND_ROOM) {
                        ret = 2;
                    }
                    break;
            }
            break;
    }

    if (ret == 1) {
        s32 surfaceType = get_collider_flags(gCollisionStatus.currentFloor) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;

        if (surfaceType == SURFACE_TYPE_LAVA) {
            gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
            ret = 0;
        } else {
            gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_IGNORE_PLAYER_Y;
        }
    } else if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE && partnerStatus->actingPartner == PARTNER_PARAKARRY) {
        gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_FLAG_2;
    } else {
        gCameras[CAM_DEFAULT].moveFlags &= ~CAMERA_MOVE_FLAG_2;
    }

    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel D_8024B9A0
/* 17A280 8024B9A0 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 17A284 8024B9A4 AFB00018 */  sw        $s0, 0x18($sp)
sam_02_Quizmo_AnswerResult:
/* 17A288 8024B9A8 3C10800B */  lui       $s0, %hi(gCameras + 0x558)
/* 17A28C 8024B9AC 261022D8 */  addiu     $s0, $s0, %lo(gCameras + 0x558)
sam_02_Quizmo_StageEffect:
/* 17A290 8024B9B0 AFBF001C */  sw        $ra, 0x1C($sp)
sam_02_Quizmo_AudienceEffect:
/* 17A294 8024B9B4 F7BE0048 */  sdc1      $f30, 0x48($sp)
sam_02_Quizmo_VannaTEffect:
/* 17A298 8024B9B8 F7BC0040 */  sdc1      $f28, 0x40($sp)
/* 17A29C 8024B9BC F7BA0038 */  sdc1      $f26, 0x38($sp)
/* 17A2A0 8024B9C0 F7B80030 */  sdc1      $f24, 0x30($sp)
/* 17A2A4 8024B9C4 F7B60028 */  sdc1      $f22, 0x28($sp)
/* 17A2A8 8024B9C8 F7B40020 */  sdc1      $f20, 0x20($sp)
/* 17A2AC 8024B9CC 10A00046 */  beqz      $a1, .L8024BAE8
/* 17A2B0 8024B9D0 24030008 */   addiu    $v1, $zero, 0x8
/* 17A2B4 8024B9D4 3C014270 */  lui       $at, (0x42700000 >> 16)
/* 17A2B8 8024B9D8 44811000 */  mtc1      $at, $f2
/* 17A2BC 8024B9DC 3C04802A */  lui       $a0, %hi(BattleCam_PosX)
.L8024B9E0:
/* 17A2C0 8024B9E0 2484F270 */  addiu     $a0, $a0, %lo(BattleCam_PosX)
/* 17A2C4 8024B9E4 AC800000 */  sw        $zero, 0x0($a0)
.L8024B9E8:
/* 17A2C8 8024B9E8 3C02802A */  lui       $v0, %hi(BattleCam_SetImmediately)
/* 17A2CC 8024B9EC 8042F2A4 */  lb        $v0, %lo(BattleCam_SetImmediately)($v0)
/* 17A2D0 8024B9F0 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17A2D4 8024B9F4 AC20F278 */  sw        $zero, %lo(BattleCam_PosZ)($at)
/* 17A2D8 8024B9F8 3C01802A */  lui       $at, %hi(BattleCam_BoomYaw)
/* 17A2DC 8024B9FC A420F282 */  sh        $zero, %lo(BattleCam_BoomYaw)($at)
/* 17A2E0 8024BA00 3C01802A */  lui       $at, %hi(BattleCam_BoomPitch)
/* 17A2E4 8024BA04 A423F284 */  sh        $v1, %lo(BattleCam_BoomPitch)($at)
/* 17A2E8 8024BA08 3C01802A */  lui       $at, %hi(BattleCam_BoomZOffset)
/* 17A2EC 8024BA0C A420F286 */  sh        $zero, %lo(BattleCam_BoomZOffset)($at)
.L8024BA10:
/* 17A2F0 8024BA10 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17A2F4 8024BA14 E422F274 */  swc1      $f2, %lo(BattleCam_PosY)($at)
/* 17A2F8 8024BA18 1040000B */  beqz      $v0, .L8024BA48
.L8024BA1C:
/* 17A2FC 8024BA1C 00000000 */   nop
/* 17A300 8024BA20 C4800000 */  lwc1      $f0, 0x0($a0)
/* 17A304 8024BA24 3C02802A */  lui       $v0, %hi(BattleCam_BoomLength)
/* 17A308 8024BA28 9442F280 */  lhu       $v0, %lo(BattleCam_BoomLength)($v0)
/* 17A30C 8024BA2C E6020058 */  swc1      $f2, 0x58($s0)
D_8024BA30:
/* 17A310 8024BA30 A6000026 */  sh        $zero, 0x26($s0)
/* 17A314 8024BA34 A6000024 */  sh        $zero, 0x24($s0)
/* 17A318 8024BA38 A6030022 */  sh        $v1, 0x22($s0)
/* 17A31C 8024BA3C E6000054 */  swc1      $f0, 0x54($s0)
/* 17A320 8024BA40 E600005C */  swc1      $f0, 0x5C($s0)
/* 17A324 8024BA44 A602001E */  sh        $v0, 0x1E($s0)
.L8024BA48:
/* 17A328 8024BA48 8602001E */  lh        $v0, 0x1E($s0)
/* 17A32C 8024BA4C 86040026 */  lh        $a0, 0x26($s0)
D_8024BA50:
/* 17A330 8024BA50 86030024 */  lh        $v1, 0x24($s0)
/* 17A334 8024BA54 44820000 */  mtc1      $v0, $f0
/* 17A338 8024BA58 00000000 */  nop
/* 17A33C 8024BA5C 46800020 */  cvt.s.w   $f0, $f0
D_8024BA60:
/* 17A340 8024BA60 86020022 */  lh        $v0, 0x22($s0)
/* 17A344 8024BA64 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
D_8024BA68:
/* 17A348 8024BA68 E420F28C */  swc1      $f0, %lo(BattleCam_InitialBoomLength)($at)
/* 17A34C 8024BA6C 44820000 */  mtc1      $v0, $f0
/* 17A350 8024BA70 00000000 */  nop
/* 17A354 8024BA74 46800020 */  cvt.s.w   $f0, $f0
/* 17A358 8024BA78 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17A35C 8024BA7C E420F294 */  swc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
D_8024BA80:
/* 17A360 8024BA80 44830000 */  mtc1      $v1, $f0
/* 17A364 8024BA84 00000000 */  nop
/* 17A368 8024BA88 46800020 */  cvt.s.w   $f0, $f0
/* 17A36C 8024BA8C 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
D_8024BA90:
/* 17A370 8024BA90 E420F290 */  swc1      $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 17A374 8024BA94 04820001 */  bltzl     $a0, D_8024BA9C
/* 17A378 8024BA98 248400FF */   addiu    $a0, $a0, 0xFF
D_8024BA9C:
/* 17A37C 8024BA9C 00041203 */  sra       $v0, $a0, 8
D_8024BAA0_C09320:
/* 17A380 8024BAA0 C6020054 */  lwc1      $f2, 0x54($s0)
/* 17A384 8024BAA4 C6040058 */  lwc1      $f4, 0x58($s0)
/* 17A388 8024BAA8 C606005C */  lwc1      $f6, 0x5C($s0)
/* 17A38C 8024BAAC 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeLeft)
/* 17A390 8024BAB0 9463F29E */  lhu       $v1, %lo(BattleCam_MoveTimeLeft)($v1)
/* 17A394 8024BAB4 44820000 */  mtc1      $v0, $f0
/* 17A398 8024BAB8 00000000 */  nop
/* 17A39C 8024BABC 46800020 */  cvt.s.w   $f0, $f0
/* 17A3A0 8024BAC0 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17A3A4 8024BAC4 E420F298 */  swc1      $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17A3A8 8024BAC8 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17A3AC 8024BACC E422F2A8 */  swc1      $f2, %lo(BattleCam_InitialPosX)($at)
D_8024BAD0:
/* 17A3B0 8024BAD0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 17A3B4 8024BAD4 E424F2AC */  swc1      $f4, %lo(BattleCam_InitialPosY)($at)
/* 17A3B8 8024BAD8 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 17A3BC 8024BADC E426F2B0 */  swc1      $f6, %lo(BattleCam_InitialPosZ)($at)
/* 17A3C0 8024BAE0 3C01802A */  lui       $at, %hi(BattleCam_MoveTimeTotal)
/* 17A3C4 8024BAE4 A423F2A0 */  sh        $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L8024BAE8:
/* 17A3C8 8024BAE8 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17A3CC 8024BAEC C43CF274 */  lwc1      $f28, %lo(BattleCam_PosY)($at)
/* 17A3D0 8024BAF0 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17A3D4 8024BAF4 C43AF270 */  lwc1      $f26, %lo(BattleCam_PosX)($at)
/* 17A3D8 8024BAF8 3C02802A */  lui       $v0, %hi(BattleCam_UseLinearInterp)
/* 17A3DC 8024BAFC 8042F2A5 */  lb        $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 17A3E0 8024BB00 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17A3E4 8024BB04 C43EF278 */  lwc1      $f30, %lo(BattleCam_PosZ)($at)
D_8024BB08:
/* 17A3E8 8024BB08 14400022 */  bnez      $v0, .L8024BB94
/* 17A3EC 8024BB0C E7BC0010 */   swc1     $f28, 0x10($sp)
/* 17A3F0 8024BB10 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17A3F4 8024BB14 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17A3F8 8024BB18 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17A3FC 8024BB1C 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17A400 8024BB20 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17A404 8024BB24 4481C000 */  mtc1      $at, $f24
/* 17A408 8024BB28 44822000 */  mtc1      $v0, $f4
/* 17A40C 8024BB2C 00000000 */  nop
/* 17A410 8024BB30 46802120 */  cvt.s.w   $f4, $f4
/* 17A414 8024BB34 44830000 */  mtc1      $v1, $f0
/* 17A418 8024BB38 00000000 */  nop
/* 17A41C 8024BB3C 46800020 */  cvt.s.w   $f0, $f0
D_8024BB40:
/* 17A420 8024BB40 46002103 */  div.s     $f4, $f4, $f0
/* 17A424 8024BB44 4604C301 */  sub.s     $f12, $f24, $f4
/* 17A428 8024BB48 3C014049 */  lui       $at, (0x40490FD0 >> 16)
/* 17A42C 8024BB4C 34210FD0 */  ori       $at, $at, (0x40490FD0 & 0xFFFF)
/* 17A430 8024BB50 4481B000 */  mtc1      $at, $f22
/* 17A434 8024BB54 00000000 */  nop
/* 17A438 8024BB58 46166302 */  mul.s     $f12, $f12, $f22
/* 17A43C 8024BB5C 00000000 */  nop
/* 17A440 8024BB60 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17A444 8024BB64 4481A000 */  mtc1      $at, $f20
.L8024BB68:
/* 17A448 8024BB68 00000000 */  nop
/* 17A44C 8024BB6C 46146302 */  mul.s     $f12, $f12, $f20
/* 17A450 8024BB70 0C00A85B */  jal       sin_rad
/* 17A454 8024BB74 00000000 */   nop
D_8024BB78:
/* 17A458 8024BB78 46160002 */  mul.s     $f0, $f0, $f22
/* 17A45C 8024BB7C 00000000 */  nop
D_8024BB80:
/* 17A460 8024BB80 46140302 */  mul.s     $f12, $f0, $f20
/* 17A464 8024BB84 0C00A85B */  jal       sin_rad
/* 17A468 8024BB88 00000000 */   nop
/* 17A46C 8024BB8C 08092EF0 */  j         .L8024BBC0
/* 17A470 8024BB90 4600C101 */   sub.s    $f4, $f24, $f0
.L8024BB94:
/* 17A474 8024BB94 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17A478 8024BB98 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17A47C 8024BB9C 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17A480 8024BBA0 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17A484 8024BBA4 44822000 */  mtc1      $v0, $f4
/* 17A488 8024BBA8 00000000 */  nop
D_8024BBAC:
/* 17A48C 8024BBAC 46802120 */  cvt.s.w   $f4, $f4
/* 17A490 8024BBB0 44830000 */  mtc1      $v1, $f0
/* 17A494 8024BBB4 00000000 */  nop
D_8024BBB8:
/* 17A498 8024BBB8 46800020 */  cvt.s.w   $f0, $f0
/* 17A49C 8024BBBC 46002103 */  div.s     $f4, $f4, $f0
.L8024BBC0:
/* 17A4A0 8024BBC0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17A4A4 8024BBC4 C434F2A8 */  lwc1      $f20, %lo(BattleCam_InitialPosX)($at)
/* 17A4A8 8024BBC8 4604A502 */  mul.s     $f20, $f20, $f4
/* 17A4AC 8024BBCC 00000000 */  nop
D_8024BBD0:
/* 17A4B0 8024BBD0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 17A4B4 8024BBD4 C432F2AC */  lwc1      $f18, %lo(BattleCam_InitialPosY)($at)
/* 17A4B8 8024BBD8 46049482 */  mul.s     $f18, $f18, $f4
/* 17A4BC 8024BBDC 00000000 */  nop
/* 17A4C0 8024BBE0 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 17A4C4 8024BBE4 C430F2B0 */  lwc1      $f16, %lo(BattleCam_InitialPosZ)($at)
D_8024BBE8:
/* 17A4C8 8024BBE8 46048402 */  mul.s     $f16, $f16, $f4
/* 17A4CC 8024BBEC 00000000 */  nop
/* 17A4D0 8024BBF0 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17A4D4 8024BBF4 C426F298 */  lwc1      $f6, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17A4D8 8024BBF8 46043182 */  mul.s     $f6, $f6, $f4
/* 17A4DC 8024BBFC 00000000 */  nop
/* 17A4E0 8024BC00 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 17A4E4 8024BC04 C42CF28C */  lwc1      $f12, %lo(BattleCam_InitialBoomLength)($at)
/* 17A4E8 8024BC08 46046302 */  mul.s     $f12, $f12, $f4
/* 17A4EC 8024BC0C 00000000 */  nop
/* 17A4F0 8024BC10 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17A4F4 8024BC14 C428F290 */  lwc1      $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 17A4F8 8024BC18 46044202 */  mul.s     $f8, $f8, $f4
/* 17A4FC 8024BC1C 00000000 */  nop
D_8024BC20:
/* 17A500 8024BC20 3C013F80 */  lui       $at, (0x3F800000 >> 16)
D_8024BC24:
/* 17A504 8024BC24 44811000 */  mtc1      $at, $f2
/* 17A508 8024BC28 00000000 */  nop
/* 17A50C 8024BC2C 46041081 */  sub.s     $f2, $f2, $f4
/* 17A510 8024BC30 4602D682 */  mul.s     $f26, $f26, $f2
/* 17A514 8024BC34 00000000 */  nop
/* 17A518 8024BC38 C7BC0010 */  lwc1      $f28, 0x10($sp)
/* 17A51C 8024BC3C 4602E602 */  mul.s     $f24, $f28, $f2
/* 17A520 8024BC40 00000000 */  nop
/* 17A524 8024BC44 3C02802A */  lui       $v0, %hi(BattleCam_BoomZOffset)
D_8024BC48_C094C8:
/* 17A528 8024BC48 8442F286 */  lh        $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 17A52C 8024BC4C 44820000 */  mtc1      $v0, $f0
/* 17A530 8024BC50 00000000 */  nop
D_8024BC54:
/* 17A534 8024BC54 46800020 */  cvt.s.w   $f0, $f0
D_8024BC58:
/* 17A538 8024BC58 46020002 */  mul.s     $f0, $f0, $f2
/* 17A53C 8024BC5C 00000000 */  nop
/* 17A540 8024BC60 4602F582 */  mul.s     $f22, $f30, $f2
/* 17A544 8024BC64 00000000 */  nop
/* 17A548 8024BC68 3C02802A */  lui       $v0, %hi(BattleCam_BoomLength)
/* 17A54C 8024BC6C 8442F280 */  lh        $v0, %lo(BattleCam_BoomLength)($v0)
.L8024BC70:
/* 17A550 8024BC70 44827000 */  mtc1      $v0, $f14
/* 17A554 8024BC74 00000000 */  nop
.L8024BC78:
/* 17A558 8024BC78 468073A0 */  cvt.s.w   $f14, $f14
/* 17A55C 8024BC7C 46027382 */  mul.s     $f14, $f14, $f2
/* 17A560 8024BC80 00000000 */  nop
/* 17A564 8024BC84 3C02802A */  lui       $v0, %hi(BattleCam_BoomYaw)
/* 17A568 8024BC88 8442F282 */  lh        $v0, %lo(BattleCam_BoomYaw)($v0)
/* 17A56C 8024BC8C 44825000 */  mtc1      $v0, $f10
D_8024BC90:
/* 17A570 8024BC90 00000000 */  nop
/* 17A574 8024BC94 468052A0 */  cvt.s.w   $f10, $f10
/* 17A578 8024BC98 46025282 */  mul.s     $f10, $f10, $f2
/* 17A57C 8024BC9C 00000000 */  nop
/* 17A580 8024BCA0 46003180 */  add.s     $f6, $f6, $f0
/* 17A584 8024BCA4 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 17A588 8024BCA8 44810000 */  mtc1      $at, $f0
D_8024BCAC:
/* 17A58C 8024BCAC 00000000 */  nop
/* 17A590 8024BCB0 46003182 */  mul.s     $f6, $f6, $f0
/* 17A594 8024BCB4 00000000 */  nop
/* 17A598 8024BCB8 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17A59C 8024BCBC C420F294 */  lwc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 17A5A0 8024BCC0 46040002 */  mul.s     $f0, $f0, $f4
/* 17A5A4 8024BCC4 00000000 */  nop
D_8024BCC8:
/* 17A5A8 8024BCC8 461AA500 */  add.s     $f20, $f20, $f26
/* 17A5AC 8024BCCC 46189480 */  add.s     $f18, $f18, $f24
.L8024BCD0:
/* 17A5B0 8024BCD0 46168400 */  add.s     $f16, $f16, $f22
D_8024BCD4:
/* 17A5B4 8024BCD4 460E6300 */  add.s     $f12, $f12, $f14
/* 17A5B8 8024BCD8 3C04802A */  lui       $a0, %hi(BattleCam_MoveTimeLeft)
/* 17A5BC 8024BCDC 2484F29E */  addiu     $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 17A5C0 8024BCE0 3C02802A */  lui       $v0, %hi(BattleCam_BoomPitch)
/* 17A5C4 8024BCE4 8442F284 */  lh        $v0, %lo(BattleCam_BoomPitch)($v0)
/* 17A5C8 8024BCE8 460A4200 */  add.s     $f8, $f8, $f10
/* 17A5CC 8024BCEC E6140054 */  swc1      $f20, 0x54($s0)
/* 17A5D0 8024BCF0 44822000 */  mtc1      $v0, $f4
/* 17A5D4 8024BCF4 00000000 */  nop
dgb_01_D_8024BCF8_C09578:
/* 17A5D8 8024BCF8 46802120 */  cvt.s.w   $f4, $f4
D_8024BCFC:
/* 17A5DC 8024BCFC 46022102 */  mul.s     $f4, $f4, $f2
D_8024BD00:
/* 17A5E0 8024BD00 00000000 */  nop
/* 17A5E4 8024BD04 E6120058 */  swc1      $f18, 0x58($s0)
/* 17A5E8 8024BD08 E610005C */  swc1      $f16, 0x5C($s0)
/* 17A5EC 8024BD0C 4600670D */  trunc.w.s $f28, $f12
.L8024BD10:
/* 17A5F0 8024BD10 4402E000 */  mfc1      $v0, $f28
/* 17A5F4 8024BD14 00000000 */  nop
.L8024BD18:
/* 17A5F8 8024BD18 A602001E */  sh        $v0, 0x1E($s0)
/* 17A5FC 8024BD1C 46040000 */  add.s     $f0, $f0, $f4
/* 17A600 8024BD20 4600470D */  trunc.w.s $f28, $f8
/* 17A604 8024BD24 4402E000 */  mfc1      $v0, $f28
D_8024BD28:
/* 17A608 8024BD28 00000000 */  nop
/* 17A60C 8024BD2C A6020024 */  sh        $v0, 0x24($s0)
/* 17A610 8024BD30 4600070D */  trunc.w.s $f28, $f0
/* 17A614 8024BD34 4402E000 */  mfc1      $v0, $f28
glabel func_8024BD38
/* 17A618 8024BD38 00000000 */  nop
/* 17A61C 8024BD3C A6020022 */  sh        $v0, 0x22($s0)
/* 17A620 8024BD40 4600370D */  trunc.w.s $f28, $f6
/* 17A624 8024BD44 4402E000 */  mfc1      $v0, $f28
/* 17A628 8024BD48 00000000 */  nop
D_8024BD4C:
/* 17A62C 8024BD4C A6020026 */  sh        $v0, 0x26($s0)
/* 17A630 8024BD50 84820000 */  lh        $v0, 0x0($a0)
/* 17A634 8024BD54 94830000 */  lhu       $v1, 0x0($a0)
/* 17A638 8024BD58 14400006 */  bnez      $v0, .L8024BD74
/* 17A63C 8024BD5C 2462FFFF */   addiu    $v0, $v1, -0x1
D_8024BD60:
/* 17A640 8024BD60 24020001 */  addiu     $v0, $zero, 0x1
/* 17A644 8024BD64 3C01802A */  lui       $at, %hi(BattleCam_DoneMoving)
/* 17A648 8024BD68 A022F29C */  sb        $v0, %lo(BattleCam_DoneMoving)($at)
/* 17A64C 8024BD6C 08092F5E */  j         D_8024BD78
D_8024BD70:
/* 17A650 8024BD70 00000000 */   nop
.L8024BD74:
/* 17A654 8024BD74 A4820000 */  sh        $v0, 0x0($a0)
D_8024BD78:
/* 17A658 8024BD78 8FBF001C */  lw        $ra, 0x1C($sp)
/* 17A65C 8024BD7C 8FB00018 */  lw        $s0, 0x18($sp)
D_8024BD80_C09600:
/* 17A660 8024BD80 D7BE0048 */  ldc1      $f30, 0x48($sp)
/* 17A664 8024BD84 D7BC0040 */  ldc1      $f28, 0x40($sp)
jtbl_8024BD88:
/* 17A668 8024BD88 D7BA0038 */  ldc1      $f26, 0x38($sp)
/* 17A66C 8024BD8C D7B80030 */  ldc1      $f24, 0x30($sp)
/* 17A670 8024BD90 D7B60028 */  ldc1      $f22, 0x28($sp)
/* 17A674 8024BD94 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 17A678 8024BD98 0000102D */  daddu     $v0, $zero, $zero
D_8024BD9C:
/* 17A67C 8024BD9C 03E00008 */  jr        $ra
/* 17A680 8024BDA0 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(BattleCamImpl_Default) {
    Camera* camera = &gCameras[CAM_BATTLE];
    f32 alpha;
    f32 x, y, z;

    if (isInitialCall) {
        BattleCam_PosX = 0.0f;
        BattleCam_PosY = 60.0f;
        BattleCam_PosZ = 0.0f;
        BattleCam_BoomYaw = 0;
        BattleCam_BoomPitch = 8;
        BattleCam_BoomZOffset = 0;
        if (BattleCam_SetImmediately) {
            camera->lookAt_obj_target.x = BattleCam_PosX;
            camera->lookAt_obj_target.y = BattleCam_PosY;
            camera->lookAt_obj_target.z = BattleCam_PosZ;
            camera->auxBoomZOffset = BattleCam_BoomZOffset;
            camera->auxBoomYaw = BattleCam_BoomYaw;
            camera->auxBoomPitch = BattleCam_BoomPitch;
            camera->auxBoomLength = BattleCam_BoomLength;
        }
        BattleCam_InitialBoomLength = camera->auxBoomLength;
        BattleCam_InitialBoomPitch = camera->auxBoomPitch;
        BattleCam_InitialBoomYaw = camera->auxBoomYaw;
        BattleCam_InitialBoomZOffset = camera->auxBoomZOffset / 256;
        BattleCam_InitialPosX = camera->lookAt_obj_target.x;
        BattleCam_InitialPosY = camera->lookAt_obj_target.y;
        BattleCam_InitialPosZ = camera->lookAt_obj_target.z;
        BattleCam_MoveTimeTotal = BattleCam_MoveTimeLeft;
    }

    x = BattleCam_PosX;
    y = BattleCam_PosY;
    z = BattleCam_PosZ;

    if (!BattleCam_UseLinearInterp) {
        alpha = BattleCam_MoveTimeLeft;
        alpha /= BattleCam_MoveTimeTotal;
        alpha = 1.0f - sin_rad(sin_rad((1.0f - alpha) * PI_S / 2) * PI_S / 2);
    } else {
        alpha = BattleCam_MoveTimeLeft;
        alpha /= BattleCam_MoveTimeTotal;
    }

    camera->lookAt_obj_target.x = LERP(BattleCam_InitialPosX, x, alpha);
    camera->lookAt_obj_target.y = LERP(BattleCam_InitialPosY, y, alpha);
    camera->lookAt_obj_target.z = LERP(BattleCam_InitialPosZ, z, alpha);
    camera->auxBoomZOffset = LERP(BattleCam_InitialBoomZOffset, BattleCam_BoomZOffset, alpha) * 256.0f;
    camera->auxBoomLength = LERP(BattleCam_InitialBoomLength, BattleCam_BoomLength, alpha);
    camera->auxBoomYaw = LERP(BattleCam_InitialBoomYaw, BattleCam_BoomYaw, alpha);
    camera->auxBoomPitch = LERP(BattleCam_InitialBoomPitch, BattleCam_BoomPitch, alpha);

    if (BattleCam_MoveTimeLeft == 0) {
        BattleCam_DoneMoving = TRUE;
    } else {
        BattleCam_MoveTimeLeft--;
    }

    return ApiStatus_BLOCK;
}