### RAW ASSEMBLY INSTRUCTIONS:

glabel check_for_interactables
/* 79CC8 800E0818 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 79CCC 800E081C AFB10014 */  sw        $s1, 0x14($sp)
/* 79CD0 800E0820 3C118011 */  lui       $s1, %hi(gPlayerStatus)
/* 79CD4 800E0824 2631EFC8 */  addiu     $s1, $s1, %lo(gPlayerStatus)
/* 79CD8 800E0828 AFBF0020 */  sw        $ra, 0x20($sp)
/* 79CDC 800E082C AFB3001C */  sw        $s3, 0x1C($sp)
/* 79CE0 800E0830 AFB20018 */  sw        $s2, 0x18($sp)
/* 79CE4 800E0834 AFB00010 */  sw        $s0, 0x10($sp)
/* 79CE8 800E0838 8E220004 */  lw        $v0, 0x4($s1)
/* 79CEC 800E083C 8E2500C8 */  lw        $a1, 0xC8($s1)
/* 79CF0 800E0840 30420100 */  andi      $v0, $v0, 0x100
/* 79CF4 800E0844 1440009B */  bnez      $v0, .L800E0AB4
/* 79CF8 800E0848 00000000 */   nop
/* 79CFC 800E084C 3C028011 */  lui       $v0, %hi(TalkNotificationCallback)
/* 79D00 800E0850 8C42C940 */  lw        $v0, %lo(TalkNotificationCallback)($v0)
/* 79D04 800E0854 14400097 */  bnez      $v0, .L800E0AB4
/* 79D08 800E0858 00000000 */   nop
/* 79D0C 800E085C 3C028011 */  lui       $v0, %hi(PulseStoneNotificationCallback)
/* 79D10 800E0860 8C42C920 */  lw        $v0, %lo(PulseStoneNotificationCallback)($v0)
/* 79D14 800E0864 14400093 */  bnez      $v0, .L800E0AB4
/* 79D18 800E0868 00000000 */   nop
/* 79D1C 800E086C 3C028011 */  lui       $v0, %hi(InteractNotificationCallback)
/* 79D20 800E0870 8C42C958 */  lw        $v0, %lo(InteractNotificationCallback)($v0)
/* 79D24 800E0874 14400073 */  bnez      $v0, .L800E0A44
/* 79D28 800E0878 00000000 */   nop
/* 79D2C 800E087C 3C038016 */  lui       $v1, %hi(gCollisionStatus)
/* 79D30 800E0880 2463A550 */  addiu     $v1, $v1, %lo(gCollisionStatus)
/* 79D34 800E0884 82220015 */  lb        $v0, 0x15($s1)
/* 79D38 800E0888 10400006 */  beqz      $v0, .L800E08A4
/* 79D3C 800E088C 84700012 */   lh       $s0, 0x12($v1)
/* 79D40 800E0890 862200C6 */  lh        $v0, 0xC6($s1)
/* 79D44 800E0894 54500087 */  bnel      $v0, $s0, .L800E0AB4
/* 79D48 800E0898 A63000C6 */   sh       $s0, 0xC6($s1)
/* 79D4C 800E089C 080382AD */  j         .L800E0AB4
/* 79D50 800E08A0 00000000 */   nop
.L800E08A4:
/* 79D54 800E08A4 862200C0 */  lh        $v0, 0xC0($s1)
/* 79D58 800E08A8 14400082 */  bnez      $v0, .L800E0AB4
/* 79D5C 800E08AC 2413FFFF */   addiu    $s3, $zero, -0x1
/* 79D60 800E08B0 1613002E */  bne       $s0, $s3, .L800E096C
/* 79D64 800E08B4 32024000 */   andi     $v0, $s0, 0x4000
/* 79D68 800E08B8 84640002 */  lh        $a0, 0x2($v1)
/* 79D6C 800E08BC 04800010 */  bltz      $a0, .L800E0900
/* 79D70 800E08C0 30824000 */   andi     $v0, $a0, 0x4000
/* 79D74 800E08C4 1040000E */  beqz      $v0, .L800E0900
/* 79D78 800E08C8 24120001 */   addiu    $s2, $zero, 0x1
/* 79D7C 800E08CC 0C0441A9 */  jal       get_entity_type
/* 79D80 800E08D0 0080802D */   daddu    $s0, $a0, $zero
/* 79D84 800E08D4 2443FFFD */  addiu     $v1, $v0, -0x3
/* 79D88 800E08D8 2C620031 */  sltiu     $v0, $v1, 0x31
/* 79D8C 800E08DC 10400038 */  beqz      $v0, .L800E09C0
/* 79D90 800E08E0 00031080 */   sll      $v0, $v1, 2
/* 79D94 800E08E4 3C018011 */  lui       $at, %hi(jtbl_8010BC60)
/* 79D98 800E08E8 00220821 */  addu      $at, $at, $v0
/* 79D9C 800E08EC 8C22BC60 */  lw        $v0, %lo(jtbl_8010BC60)($at)
/* 79DA0 800E08F0 00400008 */  jr        $v0
/* 79DA4 800E08F4 00000000 */   nop
glabel .L800E08F8
/* 79DA8 800E08F8 08038270 */  j         .L800E09C0
/* 79DAC 800E08FC 2410FFFF */   addiu    $s0, $zero, -0x1
.L800E0900:
/* 79DB0 800E0900 3C020200 */  lui       $v0, (0x2002000 >> 16)
/* 79DB4 800E0904 8E230000 */  lw        $v1, 0x0($s1)
/* 79DB8 800E0908 34422000 */  ori       $v0, $v0, (0x2002000 & 0xFFFF)
/* 79DBC 800E090C 00621824 */  and       $v1, $v1, $v0
/* 79DC0 800E0910 3C020200 */  lui       $v0, (0x2000000 >> 16)
/* 79DC4 800E0914 1462000E */  bne       $v1, $v0, .L800E0950
/* 79DC8 800E0918 3C02F7FF */   lui      $v0, (0xF7FFFFFF >> 16)
/* 79DCC 800E091C 10A0000C */  beqz      $a1, .L800E0950
/* 79DD0 800E0920 3C031000 */   lui      $v1, (0x10000000 >> 16)
/* 79DD4 800E0924 8CA20000 */  lw        $v0, 0x0($a1)
/* 79DD8 800E0928 00431024 */  and       $v0, $v0, $v1
/* 79DDC 800E092C 10400008 */  beqz      $v0, .L800E0950
/* 79DE0 800E0930 3C02F7FF */   lui      $v0, (0xF7FFFFFF >> 16)
/* 79DE4 800E0934 80A200A4 */  lb        $v0, 0xA4($a1)
/* 79DE8 800E0938 862300C6 */  lh        $v1, 0xC6($s1)
/* 79DEC 800E093C 34502000 */  ori       $s0, $v0, 0x2000
/* 79DF0 800E0940 1070005C */  beq       $v1, $s0, .L800E0AB4
/* 79DF4 800E0944 0000902D */   daddu    $s2, $zero, $zero
/* 79DF8 800E0948 08038270 */  j         .L800E09C0
/* 79DFC 800E094C 00000000 */   nop
.L800E0950:
/* 79E00 800E0950 3442FFFF */  ori       $v0, $v0, (0xF7FFFFFF & 0xFFFF)
/* 79E04 800E0954 8E230000 */  lw        $v1, 0x0($s1)
/* 79E08 800E0958 2404FFFF */  addiu     $a0, $zero, -0x1
/* 79E0C 800E095C A62400C6 */  sh        $a0, 0xC6($s1)
/* 79E10 800E0960 00621824 */  and       $v1, $v1, $v0
/* 79E14 800E0964 080382AD */  j         .L800E0AB4
/* 79E18 800E0968 AE230000 */   sw       $v1, 0x0($s1)
.L800E096C:
/* 79E1C 800E096C 14400009 */  bnez      $v0, .L800E0994
/* 79E20 800E0970 32022000 */   andi     $v0, $s0, 0x2000
/* 79E24 800E0974 14400012 */  bnez      $v0, .L800E09C0
/* 79E28 800E0978 0000902D */   daddu    $s2, $zero, $zero
/* 79E2C 800E097C 0C05173A */  jal       should_collider_allow_interact
/* 79E30 800E0980 0200202D */   daddu    $a0, $s0, $zero
/* 79E34 800E0984 1440000E */  bnez      $v0, .L800E09C0
/* 79E38 800E0988 3C03F7FF */   lui      $v1, (0xF7FFFFFF >> 16)
/* 79E3C 800E098C 0803826A */  j         .L800E09A8
/* 79E40 800E0990 00000000 */   nop
.L800E0994:
/* 79E44 800E0994 0C0394BE */  jal       phys_can_player_interact
/* 79E48 800E0998 00000000 */   nop
/* 79E4C 800E099C 14400008 */  bnez      $v0, .L800E09C0
/* 79E50 800E09A0 24120001 */   addiu    $s2, $zero, 0x1
/* 79E54 800E09A4 3C03F7FF */  lui       $v1, (0xF7FFFFFF >> 16)
.L800E09A8:
/* 79E58 800E09A8 8E220000 */  lw        $v0, 0x0($s1)
/* 79E5C 800E09AC 3463FFFF */  ori       $v1, $v1, (0xF7FFFFFF & 0xFFFF)
/* 79E60 800E09B0 A63300C6 */  sh        $s3, 0xC6($s1)
/* 79E64 800E09B4 00431024 */  and       $v0, $v0, $v1
/* 79E68 800E09B8 080382AD */  j         .L800E0AB4
/* 79E6C 800E09BC AE220000 */   sw       $v0, 0x0($s1)
glabel .L800E09C0
/* 79E70 800E09C0 862200C6 */  lh        $v0, 0xC6($s1)
/* 79E74 800E09C4 14500008 */  bne       $v0, $s0, .L800E09E8
/* 79E78 800E09C8 3C03F7FF */   lui      $v1, (0xF7FFFFFF >> 16)
/* 79E7C 800E09CC 8E220000 */  lw        $v0, 0x0($s1)
/* 79E80 800E09D0 3C030800 */  lui       $v1, (0x800FFFF >> 16)
/* 79E84 800E09D4 00431024 */  and       $v0, $v0, $v1
/* 79E88 800E09D8 14400036 */  bnez      $v0, .L800E0AB4
/* 79E8C 800E09DC 00000000 */   nop
/* 79E90 800E09E0 0803827F */  j         .L800E09FC
/* 79E94 800E09E4 A63000C6 */   sh       $s0, 0xC6($s1)
.L800E09E8:
/* 79E98 800E09E8 8E220000 */  lw        $v0, 0x0($s1)
/* 79E9C 800E09EC 3463FFFF */  ori       $v1, $v1, (0x800FFFF & 0xFFFF)
/* 79EA0 800E09F0 00431024 */  and       $v0, $v0, $v1
/* 79EA4 800E09F4 AE220000 */  sw        $v0, 0x0($s1)
/* 79EA8 800E09F8 A63000C6 */  sh        $s0, 0xC6($s1)
.L800E09FC:
/* 79EAC 800E09FC 12400009 */  beqz      $s2, .L800E0A24
/* 79EB0 800E0A00 00000000 */   nop
/* 79EB4 800E0A04 0600000F */  bltz      $s0, .L800E0A44
/* 79EB8 800E0A08 00000000 */   nop
/* 79EBC 800E0A0C 0C04417A */  jal       get_entity_by_index
/* 79EC0 800E0A10 0200202D */   daddu    $a0, $s0, $zero
/* 79EC4 800E0A14 8C420000 */  lw        $v0, 0x0($v0)
/* 79EC8 800E0A18 30421000 */  andi      $v0, $v0, 0x1000
/* 79ECC 800E0A1C 10400009 */  beqz      $v0, .L800E0A44
/* 79ED0 800E0A20 00000000 */   nop
.L800E0A24:
/* 79ED4 800E0A24 922200B4 */  lbu       $v0, 0xB4($s1)
/* 79ED8 800E0A28 2C420003 */  sltiu     $v0, $v0, 0x3
/* 79EDC 800E0A2C 10400005 */  beqz      $v0, .L800E0A44
/* 79EE0 800E0A30 24040002 */   addiu    $a0, $zero, 0x2
/* 79EE4 800E0A34 8E220004 */  lw        $v0, 0x4($s1)
/* 79EE8 800E0A38 34420010 */  ori       $v0, $v0, 0x10
/* 79EEC 800E0A3C 0C03BCF5 */  jal       func_800EF3D4
/* 79EF0 800E0A40 AE220004 */   sw       $v0, 0x4($s1)
.L800E0A44:
/* 79EF4 800E0A44 8E220004 */  lw        $v0, 0x4($s1)
/* 79EF8 800E0A48 30420010 */  andi      $v0, $v0, 0x10
/* 79EFC 800E0A4C 14400007 */  bnez      $v0, .L800E0A6C
/* 79F00 800E0A50 00000000 */   nop
/* 79F04 800E0A54 0C03BCF5 */  jal       func_800EF3D4
/* 79F08 800E0A58 0000202D */   daddu    $a0, $zero, $zero
/* 79F0C 800E0A5C 0C03BCE9 */  jal       partner_reset_tether_distance
/* 79F10 800E0A60 00000000 */   nop
/* 79F14 800E0A64 080382AD */  j         .L800E0AB4
/* 79F18 800E0A68 00000000 */   nop
.L800E0A6C:
/* 79F1C 800E0A6C 3C108011 */  lui       $s0, %hi(InteractNotificationCallback)
/* 79F20 800E0A70 2610C958 */  addiu     $s0, $s0, %lo(InteractNotificationCallback)
/* 79F24 800E0A74 8E020000 */  lw        $v0, 0x0($s0)
/* 79F28 800E0A78 1440000C */  bnez      $v0, .L800E0AAC
/* 79F2C 800E0A7C 3C06802B */   lui      $a2, (0x802B7000 >> 16)
/* 79F30 800E0A80 3C0400E2 */  lui       $a0, %hi(D_E20110)
/* 79F34 800E0A84 24840110 */  addiu     $a0, $a0, %lo(D_E20110)
/* 79F38 800E0A88 3C0500E2 */  lui       $a1, %hi(D_E20EB0)
/* 79F3C 800E0A8C 24A50EB0 */  addiu     $a1, $a1, %lo(D_E20EB0)
/* 79F40 800E0A90 0C00A5CF */  jal       dma_copy
/* 79F44 800E0A94 34C67000 */   ori      $a2, $a2, (0x802B7000 & 0xFFFF)
/* 79F48 800E0A98 3C02802B */  lui       $v0, %hi(interact_speech_setup)
/* 79F4C 800E0A9C 244270B4 */  addiu     $v0, $v0, %lo(interact_speech_setup)
/* 79F50 800E0AA0 10400004 */  beqz      $v0, .L800E0AB4
/* 79F54 800E0AA4 AE020000 */   sw       $v0, 0x0($s0)
/* 79F58 800E0AA8 8E020000 */  lw        $v0, 0x0($s0)
.L800E0AAC:
/* 79F5C 800E0AAC 0040F809 */  jalr      $v0
/* 79F60 800E0AB0 00000000 */   nop
.L800E0AB4:
/* 79F64 800E0AB4 8FBF0020 */  lw        $ra, 0x20($sp)
/* 79F68 800E0AB8 8FB3001C */  lw        $s3, 0x1C($sp)
/* 79F6C 800E0ABC 8FB20018 */  lw        $s2, 0x18($sp)
/* 79F70 800E0AC0 8FB10014 */  lw        $s1, 0x14($sp)
/* 79F74 800E0AC4 8FB00010 */  lw        $s0, 0x10($sp)
/* 79F78 800E0AC8 03E00008 */  jr        $ra
/* 79F7C 800E0ACC 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void check_for_interactables(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    Npc* npc = gPlayerStatus.encounteredNPC;
    s32 phi_s2;

    if ((playerStatus->animFlags & PA_FLAG_ISPY_VISIBLE) || TalkNotificationCallback || PulseStoneNotificationCallback != NULL) {
        return;
    }

    if (InteractNotificationCallback == NULL) {
        s32 curInteraction = gCollisionStatus.currentWall;

        if (playerStatus->inputDisabledCount != 0) {
            if (gPlayerStatus.interactingWithID != curInteraction) {
                gPlayerStatus.interactingWithID = curInteraction;
            }
            return;
        }

        if (playerStatus->timeInAir != 0) {
            return;
        }

        if (curInteraction == NO_COLLIDER) {
            s32 floor = gCollisionStatus.currentFloor;

            if ((floor >= 0) && (floor & COLLISION_WITH_ENTITY_BIT)) {
                phi_s2 = 1;
                curInteraction = floor;
                switch (get_entity_type(floor)) {
                    case ENTITY_TYPE_PADLOCK:
                    case ENTITY_TYPE_PADLOCK_RED_FRAME:
                    case ENTITY_TYPE_PADLOCK_RED_FACE:
                    case ENTITY_TYPE_PADLOCK_BLUE_FACE:
                    case ENTITY_TYPE_PUSH_BLOCK:
                    case ENTITY_TYPE_CHEST:
                    case ENTITY_TYPE_SIGNPOST:
                        curInteraction = NO_COLLIDER;
                        break;
                }
            } else if (
                ((playerStatus->flags & (PS_FLAG_HAS_CONVERSATION_NPC | PS_FLAG_INPUT_DISABLED)) == PS_FLAG_HAS_CONVERSATION_NPC)
                && (npc != NULL)
                && (npc->flags & NPC_FLAG_10000000)
            ) {
                curInteraction = npc->npcID | COLLISION_WITH_NPC_BIT;
                if (playerStatus->interactingWithID == curInteraction) {
                    return;
                }
                phi_s2 = 0;
            } else {
                playerStatus->interactingWithID = NO_COLLIDER;
                playerStatus->flags &= ~PS_FLAG_INTERACTED;
                return;
            }
        } else {
            if (!(curInteraction & COLLISION_WITH_ENTITY_BIT)) {
                phi_s2 = 0;
                if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
                    if (!should_collider_allow_interact(curInteraction)) {
                        playerStatus->interactingWithID = NO_COLLIDER;
                        playerStatus->flags &= ~PS_FLAG_INTERACTED;
                        return;
                    }
                }
            } else {
                if (!phys_can_player_interact()) {
                    phi_s2 = 1;
                    playerStatus->interactingWithID = NO_COLLIDER;
                    playerStatus->flags &= ~PS_FLAG_INTERACTED;
                    return;
                }
                phi_s2 = 1;
            }
        }
        if (playerStatus->interactingWithID == curInteraction) {
            if ((playerStatus->flags & PS_FLAG_INTERACTED)) {
                return;
            }
        } else {
            playerStatus->flags &= ~PS_FLAG_INTERACTED;
        }

        playerStatus->interactingWithID = curInteraction;
        if ((phi_s2 == 0) || curInteraction >= 0 && get_entity_by_index(curInteraction)->flags & ENTITY_FLAG_SHOWS_INSPECT_PROMPT) {
            if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) {
                playerStatus->animFlags |= PA_FLAG_INTERACT_PROMPT_AVAILABLE;
                func_800EF3D4(2);
            }
        }
    }

    if (!(playerStatus->animFlags & PA_FLAG_INTERACT_PROMPT_AVAILABLE)) {
        func_800EF3D4(0);
        partner_reset_tether_distance();
        return;
    }

    if (InteractNotificationCallback == NULL) {
        dma_copy(inspect_icon_ROM_START, inspect_icon_ROM_END, inspect_icon_VRAM_DEF);
        InteractNotificationCallback = interact_inspect_setup;

    }

    if (InteractNotificationCallback != NULL) {
        InteractNotificationCallback();
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel SetSpriteShading
/* FE0B0 802D9700 27BDFF98 */  addiu     $sp, $sp, -0x68
/* FE0B4 802D9704 AFBF0064 */  sw        $ra, 0x64($sp)
/* FE0B8 802D9708 AFBE0060 */  sw        $fp, 0x60($sp)
/* FE0BC 802D970C AFB7005C */  sw        $s7, 0x5C($sp)
/* FE0C0 802D9710 AFB60058 */  sw        $s6, 0x58($sp)
/* FE0C4 802D9714 AFB50054 */  sw        $s5, 0x54($sp)
/* FE0C8 802D9718 AFB40050 */  sw        $s4, 0x50($sp)
/* FE0CC 802D971C AFB3004C */  sw        $s3, 0x4C($sp)
/* FE0D0 802D9720 AFB20048 */  sw        $s2, 0x48($sp)
/* FE0D4 802D9724 AFB10044 */  sw        $s1, 0x44($sp)
/* FE0D8 802D9728 AFB00040 */  sw        $s0, 0x40($sp)
/* FE0DC 802D972C 8C82000C */  lw        $v0, 0xC($a0)
/* FE0E0 802D9730 0C0B1EAF */  jal       evt_get_variable
/* FE0E4 802D9734 8C450000 */   lw       $a1, 0x0($v0)
/* FE0E8 802D9738 00021C03 */  sra       $v1, $v0, 16
/* FE0EC 802D973C 000330C0 */  sll       $a2, $v1, 3
/* FE0F0 802D9740 3043FFFF */  andi      $v1, $v0, 0xFFFF
/* FE0F4 802D9744 00039080 */  sll       $s2, $v1, 2
/* FE0F8 802D9748 2403FFFF */  addiu     $v1, $zero, -0x1
/* FE0FC 802D974C 104300AF */  beq       $v0, $v1, .L802D9A0C
/* FE100 802D9750 24020002 */   addiu    $v0, $zero, 0x2
/* FE104 802D9754 3C100031 */  lui       $s0, %hi(D_315B80)
/* FE108 802D9758 26105B80 */  addiu     $s0, $s0, %lo(D_315B80)
/* FE10C 802D975C 00D02021 */  addu      $a0, $a2, $s0
/* FE110 802D9760 26050008 */  addiu     $a1, $s0, 0x8
/* FE114 802D9764 00C52821 */  addu      $a1, $a2, $a1
/* FE118 802D9768 3C11802E */  lui       $s1, %hi(gSpriteShadingHeader)
/* FE11C 802D976C 2631BB60 */  addiu     $s1, $s1, %lo(gSpriteShadingHeader)
/* FE120 802D9770 0C00A5CF */  jal       dma_copy
/* FE124 802D9774 0220302D */   daddu    $a2, $s1, $zero
/* FE128 802D9778 0220302D */  daddu     $a2, $s1, $zero
/* FE12C 802D977C 8E240004 */  lw        $a0, 0x4($s1)
/* FE130 802D9780 02508021 */  addu      $s0, $s2, $s0
/* FE134 802D9784 00902021 */  addu      $a0, $a0, $s0
/* FE138 802D9788 8E300000 */  lw        $s0, 0x0($s1)
/* FE13C 802D978C 0C00A5CF */  jal       dma_copy
/* FE140 802D9790 24850004 */   addiu    $a1, $a0, 0x4
/* FE144 802D9794 3C12802E */  lui       $s2, %hi(gSpriteShadingData)
/* FE148 802D9798 2652BB68 */  addiu     $s2, $s2, %lo(gSpriteShadingData)
/* FE14C 802D979C 0240302D */  daddu     $a2, $s2, $zero
/* FE150 802D97A0 8E220000 */  lw        $v0, 0x0($s1)
/* FE154 802D97A4 3C030031 */  lui       $v1, %hi(D_315D50)
/* FE158 802D97A8 24635D50 */  addiu     $v1, $v1, %lo(D_315D50)
/* FE15C 802D97AC 00431021 */  addu      $v0, $v0, $v1
/* FE160 802D97B0 02028021 */  addu      $s0, $s0, $v0
/* FE164 802D97B4 0200202D */  daddu     $a0, $s0, $zero
/* FE168 802D97B8 0C00A5CF */  jal       dma_copy
/* FE16C 802D97BC 24850100 */   addiu    $a1, $a0, 0x100
/* FE170 802D97C0 3C058015 */  lui       $a1, %hi(gSpriteShadingProfile)
/* FE174 802D97C4 24A51328 */  addiu     $a1, $a1, %lo(gSpriteShadingProfile)
/* FE178 802D97C8 92470000 */  lbu       $a3, 0x0($s2)
/* FE17C 802D97CC 8CA30000 */  lw        $v1, 0x0($a1)
/* FE180 802D97D0 92420002 */  lbu       $v0, 0x2($s2)
/* FE184 802D97D4 AFA70014 */  sw        $a3, 0x14($sp)
/* FE188 802D97D8 A06200AC */  sb        $v0, 0xAC($v1)
/* FE18C 802D97DC 92420003 */  lbu       $v0, 0x3($s2)
/* FE190 802D97E0 A06200AD */  sb        $v0, 0xAD($v1)
/* FE194 802D97E4 92420004 */  lbu       $v0, 0x4($s2)
/* FE198 802D97E8 A06200AE */  sb        $v0, 0xAE($v1)
/* FE19C 802D97EC 92420005 */  lbu       $v0, 0x5($s2)
/* FE1A0 802D97F0 0000882D */  daddu     $s1, $zero, $zero
/* FE1A4 802D97F4 10E0007F */  beqz      $a3, .L802D99F4
/* FE1A8 802D97F8 A06200AF */   sb       $v0, 0xAF($v1)
/* FE1AC 802D97FC 0240802D */  daddu     $s0, $s2, $zero
/* FE1B0 802D9800 24070014 */  addiu     $a3, $zero, 0x14
/* FE1B4 802D9804 AFA7002C */  sw        $a3, 0x2C($sp)
/* FE1B8 802D9808 24070010 */  addiu     $a3, $zero, 0x10
/* FE1BC 802D980C 240B0011 */  addiu     $t3, $zero, 0x11
/* FE1C0 802D9810 240C0012 */  addiu     $t4, $zero, 0x12
/* FE1C4 802D9814 240D0013 */  addiu     $t5, $zero, 0x13
/* FE1C8 802D9818 240E000F */  addiu     $t6, $zero, 0xF
/* FE1CC 802D981C 240F000E */  addiu     $t7, $zero, 0xE
/* FE1D0 802D9820 241E000D */  addiu     $fp, $zero, 0xD
/* FE1D4 802D9824 2417000C */  addiu     $s7, $zero, 0xC
/* FE1D8 802D9828 2416000B */  addiu     $s6, $zero, 0xB
/* FE1DC 802D982C 2415000A */  addiu     $s5, $zero, 0xA
/* FE1E0 802D9830 24140009 */  addiu     $s4, $zero, 0x9
/* FE1E4 802D9834 24130008 */  addiu     $s3, $zero, 0x8
/* FE1E8 802D9838 24190007 */  addiu     $t9, $zero, 0x7
/* FE1EC 802D983C 24180006 */  addiu     $t8, $zero, 0x6
/* FE1F0 802D9840 24120004 */  addiu     $s2, $zero, 0x4
/* FE1F4 802D9844 AFA70030 */  sw        $a3, 0x30($sp)
.L802D9848:
/* FE1F8 802D9848 01D05021 */  addu      $t2, $t6, $s0
/* FE1FC 802D984C 25CE0010 */  addiu     $t6, $t6, 0x10
/* FE200 802D9850 01F04821 */  addu      $t1, $t7, $s0
/* FE204 802D9854 25EF0010 */  addiu     $t7, $t7, 0x10
/* FE208 802D9858 03D04021 */  addu      $t0, $fp, $s0
/* FE20C 802D985C 27DE0010 */  addiu     $fp, $fp, 0x10
/* FE210 802D9860 02D03021 */  addu      $a2, $s6, $s0
/* FE214 802D9864 26D60010 */  addiu     $s6, $s6, 0x10
/* FE218 802D9868 02B02021 */  addu      $a0, $s5, $s0
/* FE21C 802D986C 26B50010 */  addiu     $s5, $s5, 0x10
/* FE220 802D9870 03101021 */  addu      $v0, $t8, $s0
/* FE224 802D9874 02901821 */  addu      $v1, $s4, $s0
/* FE228 802D9878 8FA7002C */  lw        $a3, 0x2C($sp)
/* FE22C 802D987C 26940010 */  addiu     $s4, $s4, 0x10
/* FE230 802D9880 00F03821 */  addu      $a3, $a3, $s0
/* FE234 802D9884 AFA70028 */  sw        $a3, 0x28($sp)
/* FE238 802D9888 8FA7002C */  lw        $a3, 0x2C($sp)
/* FE23C 802D988C 27180010 */  addiu     $t8, $t8, 0x10
/* FE240 802D9890 24E70010 */  addiu     $a3, $a3, 0x10
/* FE244 802D9894 AFA7002C */  sw        $a3, 0x2C($sp)
/* FE248 802D9898 8FA70030 */  lw        $a3, 0x30($sp)
/* FE24C 802D989C 26310001 */  addiu     $s1, $s1, 0x1
/* FE250 802D98A0 00F03821 */  addu      $a3, $a3, $s0
/* FE254 802D98A4 AFA70024 */  sw        $a3, 0x24($sp)
/* FE258 802D98A8 8FA70030 */  lw        $a3, 0x30($sp)
/* FE25C 802D98AC 3C058015 */  lui       $a1, %hi(gSpriteShadingProfile)
/* FE260 802D98B0 8CA51328 */  lw        $a1, %lo(gSpriteShadingProfile)($a1)
/* FE264 802D98B4 24E70010 */  addiu     $a3, $a3, 0x10
/* FE268 802D98B8 AFA70030 */  sw        $a3, 0x30($sp)
/* FE26C 802D98BC 01703821 */  addu      $a3, $t3, $s0
/* FE270 802D98C0 AFA70020 */  sw        $a3, 0x20($sp)
/* FE274 802D98C4 01903821 */  addu      $a3, $t4, $s0
/* FE278 802D98C8 AFA7001C */  sw        $a3, 0x1C($sp)
/* FE27C 802D98CC 01B03821 */  addu      $a3, $t5, $s0
/* FE280 802D98D0 AFA70018 */  sw        $a3, 0x18($sp)
/* FE284 802D98D4 90420000 */  lbu       $v0, 0x0($v0)
/* FE288 802D98D8 00B22821 */  addu      $a1, $a1, $s2
/* FE28C 802D98DC A0A20000 */  sb        $v0, 0x0($a1)
/* FE290 802D98E0 03301021 */  addu      $v0, $t9, $s0
/* FE294 802D98E4 90420000 */  lbu       $v0, 0x0($v0)
/* FE298 802D98E8 26520018 */  addiu     $s2, $s2, 0x18
/* FE29C 802D98EC A0A20001 */  sb        $v0, 0x1($a1)
/* FE2A0 802D98F0 02701021 */  addu      $v0, $s3, $s0
/* FE2A4 802D98F4 90420000 */  lbu       $v0, 0x0($v0)
/* FE2A8 802D98F8 256B0010 */  addiu     $t3, $t3, 0x10
/* FE2AC 802D98FC A0A20002 */  sb        $v0, 0x2($a1)
/* FE2B0 802D9900 90620000 */  lbu       $v0, 0x0($v1)
/* FE2B4 802D9904 02F03821 */  addu      $a3, $s7, $s0
/* FE2B8 802D9908 A0A20003 */  sb        $v0, 0x3($a1)
/* FE2BC 802D990C 90830000 */  lbu       $v1, 0x0($a0)
/* FE2C0 802D9910 90C20000 */  lbu       $v0, 0x0($a2)
/* FE2C4 802D9914 00031A00 */  sll       $v1, $v1, 8
/* FE2C8 802D9918 00431021 */  addu      $v0, $v0, $v1
/* FE2CC 802D991C 00021400 */  sll       $v0, $v0, 16
/* FE2D0 802D9920 00021403 */  sra       $v0, $v0, 16
/* FE2D4 802D9924 44820000 */  mtc1      $v0, $f0
/* FE2D8 802D9928 00000000 */  nop
/* FE2DC 802D992C 46800020 */  cvt.s.w   $f0, $f0
/* FE2E0 802D9930 E4A00004 */  swc1      $f0, 0x4($a1)
/* FE2E4 802D9934 90E30000 */  lbu       $v1, 0x0($a3)
/* FE2E8 802D9938 91020000 */  lbu       $v0, 0x0($t0)
/* FE2EC 802D993C 00031A00 */  sll       $v1, $v1, 8
/* FE2F0 802D9940 00431021 */  addu      $v0, $v0, $v1
/* FE2F4 802D9944 00021400 */  sll       $v0, $v0, 16
/* FE2F8 802D9948 00021403 */  sra       $v0, $v0, 16
/* FE2FC 802D994C 44820000 */  mtc1      $v0, $f0
/* FE300 802D9950 00000000 */  nop
/* FE304 802D9954 46800020 */  cvt.s.w   $f0, $f0
/* FE308 802D9958 E4A00008 */  swc1      $f0, 0x8($a1)
/* FE30C 802D995C 91230000 */  lbu       $v1, 0x0($t1)
/* FE310 802D9960 91420000 */  lbu       $v0, 0x0($t2)
/* FE314 802D9964 00031A00 */  sll       $v1, $v1, 8
/* FE318 802D9968 00431021 */  addu      $v0, $v0, $v1
/* FE31C 802D996C 00021400 */  sll       $v0, $v0, 16
/* FE320 802D9970 00021403 */  sra       $v0, $v0, 16
/* FE324 802D9974 44820000 */  mtc1      $v0, $f0
/* FE328 802D9978 00000000 */  nop
/* FE32C 802D997C 46800020 */  cvt.s.w   $f0, $f0
/* FE330 802D9980 E4A0000C */  swc1      $f0, 0xC($a1)
/* FE334 802D9984 8FA7001C */  lw        $a3, 0x1C($sp)
/* FE338 802D9988 258C0010 */  addiu     $t4, $t4, 0x10
/* FE33C 802D998C 90E30000 */  lbu       $v1, 0x0($a3)
/* FE340 802D9990 8FA70018 */  lw        $a3, 0x18($sp)
/* FE344 802D9994 00031A00 */  sll       $v1, $v1, 8
/* FE348 802D9998 90E20000 */  lbu       $v0, 0x0($a3)
/* FE34C 802D999C 8FA70020 */  lw        $a3, 0x20($sp)
/* FE350 802D99A0 00431021 */  addu      $v0, $v0, $v1
/* FE354 802D99A4 90E40000 */  lbu       $a0, 0x0($a3)
/* FE358 802D99A8 8FA70024 */  lw        $a3, 0x24($sp)
/* FE35C 802D99AC 00042400 */  sll       $a0, $a0, 16
/* FE360 802D99B0 90E30000 */  lbu       $v1, 0x0($a3)
/* FE364 802D99B4 00441021 */  addu      $v0, $v0, $a0
/* FE368 802D99B8 00031E00 */  sll       $v1, $v1, 24
/* FE36C 802D99BC 00431021 */  addu      $v0, $v0, $v1
/* FE370 802D99C0 AFA20010 */  sw        $v0, 0x10($sp)
/* FE374 802D99C4 C7A00010 */  lwc1      $f0, 0x10($sp)
/* FE378 802D99C8 25AD0010 */  addiu     $t5, $t5, 0x10
/* FE37C 802D99CC E4A00010 */  swc1      $f0, 0x10($a1)
/* FE380 802D99D0 8FA70028 */  lw        $a3, 0x28($sp)
/* FE384 802D99D4 26F70010 */  addiu     $s7, $s7, 0x10
/* FE388 802D99D8 90E20000 */  lbu       $v0, 0x0($a3)
/* FE38C 802D99DC 27390010 */  addiu     $t9, $t9, 0x10
/* FE390 802D99E0 A0A20014 */  sb        $v0, 0x14($a1)
/* FE394 802D99E4 8FA70014 */  lw        $a3, 0x14($sp)
/* FE398 802D99E8 0227102A */  slt       $v0, $s1, $a3
/* FE39C 802D99EC 1440FF96 */  bnez      $v0, .L802D9848
/* FE3A0 802D99F0 26730010 */   addiu    $s3, $s3, 0x10
.L802D99F4:
/* FE3A4 802D99F4 3C048015 */  lui       $a0, %hi(gSpriteShadingProfile)
/* FE3A8 802D99F8 8C841328 */  lw        $a0, %lo(gSpriteShadingProfile)($a0)
/* FE3AC 802D99FC 94830000 */  lhu       $v1, 0x0($a0)
/* FE3B0 802D9A00 24020002 */  addiu     $v0, $zero, 0x2
/* FE3B4 802D9A04 34630001 */  ori       $v1, $v1, 0x1
/* FE3B8 802D9A08 A4830000 */  sh        $v1, 0x0($a0)
.L802D9A0C:
/* FE3BC 802D9A0C 8FBF0064 */  lw        $ra, 0x64($sp)
/* FE3C0 802D9A10 8FBE0060 */  lw        $fp, 0x60($sp)
/* FE3C4 802D9A14 8FB7005C */  lw        $s7, 0x5C($sp)
/* FE3C8 802D9A18 8FB60058 */  lw        $s6, 0x58($sp)
/* FE3CC 802D9A1C 8FB50054 */  lw        $s5, 0x54($sp)
/* FE3D0 802D9A20 8FB40050 */  lw        $s4, 0x50($sp)
/* FE3D4 802D9A24 8FB3004C */  lw        $s3, 0x4C($sp)
/* FE3D8 802D9A28 8FB20048 */  lw        $s2, 0x48($sp)
/* FE3DC 802D9A2C 8FB10044 */  lw        $s1, 0x44($sp)
/* FE3E0 802D9A30 8FB00040 */  lw        $s0, 0x40($sp)
/* FE3E4 802D9A34 03E00008 */  jr        $ra
/* FE3E8 802D9A38 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

s32 SetSpriteShading(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    s32 profileID = evt_get_variable(script, *args++);
    s32 shadingGroupOffset = (profileID >> 0x10) * 8;
    s32 shadingProfileOffset = (profileID & 0xFFFF) * 4;
    s32 dataOffset;
    s32 i;
    s32 romStart;
    s32 romEnd;
    s32 count;
    s32 falloff;
    s32 data;
    SpriteShadingProfile* profile;

    if (profileID == SHADING_NONE) {
        return ApiStatus_DONE2;
    }

    // load shading group data
    romStart = (s32)sprite_shading_profiles_ROM_START;
    romEnd = romStart + 8;
    dma_copy((u8*) shadingGroupOffset + romStart, (u8*) shadingGroupOffset + romEnd, gSpriteShadingHeader);

    // load offset to shading data
    romStart = shadingProfileOffset + (s32)sprite_shading_profiles_ROM_START;
    data = gSpriteShadingHeader[0];
    dma_copy((u8*)gSpriteShadingHeader[1] + romStart, (u8*)gSpriteShadingHeader[1] + romStart + 4, gSpriteShadingHeader);

    // load shading data
    dataOffset = (s32)sprite_shading_profiles_data_ROM_START + data + gSpriteShadingHeader[0];
    dma_copy((u8*) dataOffset, (u8*) dataOffset + sizeof(gSpriteShadingData), &gSpriteShadingData);

    profile = gSpriteShadingProfile;
    count = gSpriteShadingData[0];
    profile->ambientColor.r = gSpriteShadingData[2];
    profile->ambientColor.g = gSpriteShadingData[3];
    profile->ambientColor.b = gSpriteShadingData[4];
    profile->ambientPower = gSpriteShadingData[5];

    for (i = 0; i < count; i++) {
        SpriteShadingLightSource* source = &gSpriteShadingProfile->sources[i];
        source->flags = gSpriteShadingData[6 + 16 * i + 0];
        source->rgb.r = gSpriteShadingData[6 + 16 * i + 1];
        source->rgb.g = gSpriteShadingData[6 + 16 * i + 2];
        source->rgb.b = gSpriteShadingData[6 + 16 * i + 3];
        source->pos.x = (s16) ((gSpriteShadingData[6 + 16 * i + 4] << 8) + gSpriteShadingData[6 + 16 * i + 5]);
        source->pos.y = (s16) ((gSpriteShadingData[6 + 16 * i + 6] << 8) + gSpriteShadingData[6 + 16 * i + 7]);
        source->pos.z = (s16) ((gSpriteShadingData[6 + 16 * i + 8] << 8) + gSpriteShadingData[6 + 16 * i + 9]);
        falloff = gSpriteShadingData[6 + 16 * i + 13]
            + (gSpriteShadingData[6 + 16 * i + 12] << 8)
            + (gSpriteShadingData[6 + 16 * i + 11] << 16)
            + (gSpriteShadingData[6 + 16 * i + 10] << 24);
        source->falloff = *(f32*)&falloff;
        source->unk_14 = gSpriteShadingData[6 + 16 * i + 14];
    }
    gSpriteShadingProfile->flags |= 1;
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel static_status_appendGfx
/* 3E0E54 E00E6524 27BDFF28 */  addiu     $sp, $sp, -0xD8
/* 3E0E58 E00E6528 AFBE00C8 */  sw        $fp, 0xC8($sp)
/* 3E0E5C E00E652C 0080F02D */  daddu     $fp, $a0, $zero
/* 3E0E60 E00E6530 3C06DB06 */  lui       $a2, (0xDB060024 >> 16)
/* 3E0E64 E00E6534 34C60024 */  ori       $a2, $a2, (0xDB060024 & 0xFFFF)
/* 3E0E68 E00E6538 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E0E6C E00E653C AFB200B0 */  sw        $s2, 0xB0($sp)
/* 3E0E70 E00E6540 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3E0E74 E00E6544 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3E0E78 E00E6548 AFB600C0 */  sw        $s6, 0xC0($sp)
/* 3E0E7C E00E654C 3C16800A */  lui       $s6, %hi(gMainGfxPos)
/* 3E0E80 E00E6550 26D6A66C */  addiu     $s6, $s6, %lo(gMainGfxPos)
/* 3E0E84 E00E6554 AFBF00CC */  sw        $ra, 0xCC($sp)
/* 3E0E88 E00E6558 AFB700C4 */  sw        $s7, 0xC4($sp)
/* 3E0E8C E00E655C AFB500BC */  sw        $s5, 0xBC($sp)
/* 3E0E90 E00E6560 AFB400B8 */  sw        $s4, 0xB8($sp)
/* 3E0E94 E00E6564 AFB300B4 */  sw        $s3, 0xB4($sp)
/* 3E0E98 E00E6568 AFB100AC */  sw        $s1, 0xAC($sp)
/* 3E0E9C E00E656C AFB000A8 */  sw        $s0, 0xA8($sp)
/* 3E0EA0 E00E6570 F7B400D0 */  sdc1      $f20, 0xD0($sp)
/* 3E0EA4 E00E6574 8EC50000 */  lw        $a1, 0x0($s6)
/* 3E0EA8 E00E6578 8FD4000C */  lw        $s4, 0xC($fp)
/* 3E0EAC E00E657C 00A0182D */  daddu     $v1, $a1, $zero
/* 3E0EB0 E00E6580 24A50008 */  addiu     $a1, $a1, 0x8
/* 3E0EB4 E00E6584 AEC50000 */  sw        $a1, 0x0($s6)
/* 3E0EB8 E00E6588 8E880030 */  lw        $t0, 0x30($s4)
/* 3E0EBC E00E658C 24150001 */  addiu     $s5, $zero, 0x1
/* 3E0EC0 E00E6590 AFA800A0 */  sw        $t0, 0xA0($sp)
/* 3E0EC4 E00E6594 8E930000 */  lw        $s3, 0x0($s4)
/* 3E0EC8 E00E6598 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3E0ECC E00E659C AC620000 */  sw        $v0, 0x0($v1)
/* 3E0ED0 E00E65A0 AC600004 */  sw        $zero, 0x4($v1)
/* 3E0ED4 E00E65A4 ACA60000 */  sw        $a2, 0x0($a1)
/* 3E0ED8 E00E65A8 8FC30010 */  lw        $v1, 0x10($fp)
/* 3E0EDC E00E65AC 24A20008 */  addiu     $v0, $a1, 0x8
/* 3E0EE0 E00E65B0 AEC20000 */  sw        $v0, 0x0($s6)
/* 3E0EE4 E00E65B4 8C62001C */  lw        $v0, 0x1C($v1)
/* 3E0EE8 E00E65B8 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3E0EEC E00E65BC 00431021 */  addu      $v0, $v0, $v1
/* 3E0EF0 E00E65C0 3C03800B */  lui       $v1, %hi(gCameras)
/* 3E0EF4 E00E65C4 24631D80 */  addiu     $v1, $v1, %lo(gCameras)
/* 3E0EF8 E00E65C8 ACA20004 */  sw        $v0, 0x4($a1)
/* 3E0EFC E00E65CC 8E850004 */  lw        $a1, 0x4($s4)
/* 3E0F00 E00E65D0 8E860008 */  lw        $a2, 0x8($s4)
/* 3E0F04 E00E65D4 3C028007 */  lui       $v0, %hi(gCurrentCameraID)
/* 3E0F08 E00E65D8 8C427410 */  lw        $v0, %lo(gCurrentCameraID)($v0)
/* 3E0F0C E00E65DC 8E87000C */  lw        $a3, 0xC($s4)
/* 3E0F10 E00E65E0 00028080 */  sll       $s0, $v0, 2
/* 3E0F14 E00E65E4 02028021 */  addu      $s0, $s0, $v0
/* 3E0F18 E00E65E8 00108080 */  sll       $s0, $s0, 2
/* 3E0F1C E00E65EC 02028023 */  subu      $s0, $s0, $v0
/* 3E0F20 E00E65F0 001010C0 */  sll       $v0, $s0, 3
/* 3E0F24 E00E65F4 02028021 */  addu      $s0, $s0, $v0
/* 3E0F28 E00E65F8 001080C0 */  sll       $s0, $s0, 3
/* 3E0F2C E00E65FC 0C080108 */  jal       shim_guTranslateF
/* 3E0F30 E00E6600 02038021 */   addu     $s0, $s0, $v1
/* 3E0F34 E00E6604 27B10060 */  addiu     $s1, $sp, 0x60
/* 3E0F38 E00E6608 0220202D */  daddu     $a0, $s1, $zero
/* 3E0F3C E00E660C 8E850034 */  lw        $a1, 0x34($s4)
/* 3E0F40 E00E6610 26940038 */  addiu     $s4, $s4, 0x38
/* 3E0F44 E00E6614 00A0302D */  daddu     $a2, $a1, $zero
/* 3E0F48 E00E6618 0C080110 */  jal       shim_guScaleF
/* 3E0F4C E00E661C 00A0382D */   daddu    $a3, $a1, $zero
/* 3E0F50 E00E6620 0220202D */  daddu     $a0, $s1, $zero
/* 3E0F54 E00E6624 27A50020 */  addiu     $a1, $sp, 0x20
/* 3E0F58 E00E6628 0C080114 */  jal       shim_guMtxCatF
/* 3E0F5C E00E662C 00A0302D */   daddu    $a2, $a1, $zero
/* 3E0F60 E00E6630 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E0F64 E00E6634 3C118007 */  lui       $s1, %hi(gMatrixListPos)
/* 3E0F68 E00E6638 263141F0 */  addiu     $s1, $s1, %lo(gMatrixListPos)
/* 3E0F6C E00E663C 3C17800A */  lui       $s7, %hi(gDisplayContext)
/* 3E0F70 E00E6640 26F7A674 */  addiu     $s7, $s7, %lo(gDisplayContext)
/* 3E0F74 E00E6644 96250000 */  lhu       $a1, 0x0($s1)
/* 3E0F78 E00E6648 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E0F7C E00E664C 00052980 */  sll       $a1, $a1, 6
/* 3E0F80 E00E6650 00B22821 */  addu      $a1, $a1, $s2
/* 3E0F84 E00E6654 0C080118 */  jal       shim_guMtxF2L
/* 3E0F88 E00E6658 00452821 */   addu     $a1, $v0, $a1
/* 3E0F8C E00E665C 3C03DA38 */  lui       $v1, (0xDA380002 >> 16)
/* 3E0F90 E00E6660 34630002 */  ori       $v1, $v1, (0xDA380002 & 0xFFFF)
/* 3E0F94 E00E6664 3C06DA38 */  lui       $a2, (0xDA380000 >> 16)
/* 3E0F98 E00E6668 00D53025 */  or        $a2, $a2, $s5
/* 3E0F9C E00E666C 00139880 */  sll       $s3, $s3, 2
/* 3E0FA0 E00E6670 8EC40000 */  lw        $a0, 0x0($s6)
/* 3E0FA4 E00E6674 96220000 */  lhu       $v0, 0x0($s1)
/* 3E0FA8 E00E6678 0080282D */  daddu     $a1, $a0, $zero
/* 3E0FAC E00E667C 24840008 */  addiu     $a0, $a0, 0x8
/* 3E0FB0 E00E6680 AEC40000 */  sw        $a0, 0x0($s6)
/* 3E0FB4 E00E6684 ACA30000 */  sw        $v1, 0x0($a1)
/* 3E0FB8 E00E6688 00551821 */  addu      $v1, $v0, $s5
/* 3E0FBC E00E668C 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3E0FC0 E00E6690 00021180 */  sll       $v0, $v0, 6
/* 3E0FC4 E00E6694 A6230000 */  sh        $v1, 0x0($s1)
/* 3E0FC8 E00E6698 8EE30000 */  lw        $v1, 0x0($s7)
/* 3E0FCC E00E669C 00521021 */  addu      $v0, $v0, $s2
/* 3E0FD0 E00E66A0 00621821 */  addu      $v1, $v1, $v0
/* 3E0FD4 E00E66A4 ACA30004 */  sw        $v1, 0x4($a1)
/* 3E0FD8 E00E66A8 AC860000 */  sw        $a2, 0x0($a0)
/* 3E0FDC E00E66AC 8E030204 */  lw        $v1, 0x204($s0)
/* 3E0FE0 E00E66B0 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3E0FE4 E00E66B4 AC820008 */  sw        $v0, 0x8($a0)
/* 3E0FE8 E00E66B8 AC830004 */  sw        $v1, 0x4($a0)
/* 3E0FEC E00E66BC 3C03E00E */  lui       $v1, (0xE00E6888 >> 16)
/* 3E0FF0 E00E66C0 00731821 */  addu      $v1, $v1, $s3
/* 3E0FF4 E00E66C4 8C636888 */  lw        $v1, (0xE00E6888 & 0xFFFF)($v1)
/* 3E0FF8 E00E66C8 24820008 */  addiu     $v0, $a0, 0x8
/* 3E0FFC E00E66CC AEC20000 */  sw        $v0, 0x0($s6)
/* 3E1000 E00E66D0 AC83000C */  sw        $v1, 0xC($a0)
/* 3E1004 E00E66D4 8FC20008 */  lw        $v0, 0x8($fp)
/* 3E1008 E00E66D8 24840010 */  addiu     $a0, $a0, 0x10
/* 3E100C E00E66DC 02A2102A */  slt       $v0, $s5, $v0
/* 3E1010 E00E66E0 1040004C */  beqz      $v0, .LE00E6814
/* 3E1014 E00E66E4 AEC40000 */   sw       $a0, 0x0($s6)
/* 3E1018 E00E66E8 4480A000 */  mtc1      $zero, $f20
/* 3E101C E00E66EC 0220902D */  daddu     $s2, $s1, $zero
/* 3E1020 E00E66F0 3C110001 */  lui       $s1, (0x11630 >> 16)
/* 3E1024 E00E66F4 36311630 */  ori       $s1, $s1, (0x11630 & 0xFFFF)
/* 3E1028 E00E66F8 02C0802D */  daddu     $s0, $s6, $zero
/* 3E102C E00E66FC 3C02E00E */  lui       $v0, %hi(D_E00E6880)
/* 3E1030 E00E6700 24426880 */  addiu     $v0, $v0, %lo(D_E00E6880)
/* 3E1034 E00E6704 0262B021 */  addu      $s6, $s3, $v0
/* 3E1038 E00E6708 26930030 */  addiu     $s3, $s4, 0x30
.LE00E670C:
/* 3E103C E00E670C 8E62FFF0 */  lw        $v0, -0x10($s3)
/* 3E1040 E00E6710 0442003C */  bltzl     $v0, .LE00E6804
/* 3E1044 E00E6714 26B50001 */   addiu    $s5, $s5, 0x1
/* 3E1048 E00E6718 C6600004 */  lwc1      $f0, 0x4($s3)
/* 3E104C E00E671C 4405A000 */  mfc1      $a1, $f20
/* 3E1050 E00E6720 4406A000 */  mfc1      $a2, $f20
/* 3E1054 E00E6724 E7A00010 */  swc1      $f0, 0x10($sp)
/* 3E1058 E00E6728 C660FFD4 */  lwc1      $f0, -0x2C($s3)
/* 3E105C E00E672C E7A00014 */  swc1      $f0, 0x14($sp)
/* 3E1060 E00E6730 C660FFD8 */  lwc1      $f0, -0x28($s3)
/* 3E1064 E00E6734 E7B4001C */  swc1      $f20, 0x1C($sp)
/* 3E1068 E00E6738 E7A00018 */  swc1      $f0, 0x18($sp)
/* 3E106C E00E673C 8E67FFF4 */  lw        $a3, -0xC($s3)
/* 3E1070 E00E6740 0C080180 */  jal       shim_guPositionF
/* 3E1074 E00E6744 27A40020 */   addiu    $a0, $sp, 0x20
/* 3E1078 E00E6748 27A40020 */  addiu     $a0, $sp, 0x20
/* 3E107C E00E674C 96450000 */  lhu       $a1, 0x0($s2)
/* 3E1080 E00E6750 8EE20000 */  lw        $v0, 0x0($s7)
/* 3E1084 E00E6754 00052980 */  sll       $a1, $a1, 6
/* 3E1088 E00E6758 00B12821 */  addu      $a1, $a1, $s1
/* 3E108C E00E675C 0C080118 */  jal       shim_guMtxF2L
/* 3E1090 E00E6760 00452821 */   addu     $a1, $v0, $a1
/* 3E1094 E00E6764 8E040000 */  lw        $a0, 0x0($s0)
/* 3E1098 E00E6768 3C06D838 */  lui       $a2, (0xD8380002 >> 16)
/* 3E109C E00E676C 0080282D */  daddu     $a1, $a0, $zero
/* 3E10A0 E00E6770 24840008 */  addiu     $a0, $a0, 0x8
/* 3E10A4 E00E6774 AE040000 */  sw        $a0, 0x0($s0)
/* 3E10A8 E00E6778 96420000 */  lhu       $v0, 0x0($s2)
/* 3E10AC E00E677C 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 3E10B0 E00E6780 ACA30000 */  sw        $v1, 0x0($a1)
/* 3E10B4 E00E6784 24430001 */  addiu     $v1, $v0, 0x1
/* 3E10B8 E00E6788 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3E10BC E00E678C 00021180 */  sll       $v0, $v0, 6
/* 3E10C0 E00E6790 A6430000 */  sh        $v1, 0x0($s2)
/* 3E10C4 E00E6794 8EE30000 */  lw        $v1, 0x0($s7)
/* 3E10C8 E00E6798 00511021 */  addu      $v0, $v0, $s1
/* 3E10CC E00E679C 00621821 */  addu      $v1, $v1, $v0
/* 3E10D0 E00E67A0 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3E10D4 E00E67A4 ACA30004 */  sw        $v1, 0x4($a1)
/* 3E10D8 E00E67A8 AC820000 */  sw        $v0, 0x0($a0)
/* 3E10DC E00E67AC 8E630000 */  lw        $v1, 0x0($s3)
/* 3E10E0 E00E67B0 24820008 */  addiu     $v0, $a0, 0x8
/* 3E10E4 E00E67B4 AE020000 */  sw        $v0, 0x0($s0)
/* 3E10E8 E00E67B8 8FA800A0 */  lw        $t0, 0xA0($sp)
/* 3E10EC E00E67BC 34C60002 */  ori       $a2, $a2, (0xD8380002 & 0xFFFF)
/* 3E10F0 E00E67C0 01030018 */  mult      $t0, $v1
/* 3E10F4 E00E67C4 24820010 */  addiu     $v0, $a0, 0x10
/* 3E10F8 E00E67C8 AE020000 */  sw        $v0, 0x0($s0)
/* 3E10FC E00E67CC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3E1100 E00E67D0 AC820008 */  sw        $v0, 0x8($a0)
/* 3E1104 E00E67D4 00004012 */  mflo      $t0
/* 3E1108 E00E67D8 00081203 */  sra       $v0, $t0, 8
/* 3E110C E00E67DC 304200FF */  andi      $v0, $v0, 0xFF
/* 3E1110 E00E67E0 AC820004 */  sw        $v0, 0x4($a0)
/* 3E1114 E00E67E4 8EC30000 */  lw        $v1, 0x0($s6)
/* 3E1118 E00E67E8 24820018 */  addiu     $v0, $a0, 0x18
/* 3E111C E00E67EC AE020000 */  sw        $v0, 0x0($s0)
/* 3E1120 E00E67F0 24020040 */  addiu     $v0, $zero, 0x40
/* 3E1124 E00E67F4 AC860010 */  sw        $a2, 0x10($a0)
/* 3E1128 E00E67F8 AC820014 */  sw        $v0, 0x14($a0)
/* 3E112C E00E67FC AC83000C */  sw        $v1, 0xC($a0)
/* 3E1130 E00E6800 26B50001 */  addiu     $s5, $s5, 0x1
.LE00E6804:
/* 3E1134 E00E6804 8FC20008 */  lw        $v0, 0x8($fp)
/* 3E1138 E00E6808 02A2102A */  slt       $v0, $s5, $v0
/* 3E113C E00E680C 1440FFBF */  bnez      $v0, .LE00E670C
/* 3E1140 E00E6810 26730038 */   addiu    $s3, $s3, 0x38
.LE00E6814:
/* 3E1144 E00E6814 3C05D838 */  lui       $a1, (0xD8380002 >> 16)
/* 3E1148 E00E6818 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 3E114C E00E681C 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 3E1150 E00E6820 8C620000 */  lw        $v0, 0x0($v1)
/* 3E1154 E00E6824 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3E1158 E00E6828 0040202D */  daddu     $a0, $v0, $zero
/* 3E115C E00E682C 24420008 */  addiu     $v0, $v0, 0x8
/* 3E1160 E00E6830 AC620000 */  sw        $v0, 0x0($v1)
/* 3E1164 E00E6834 24020040 */  addiu     $v0, $zero, 0x40
/* 3E1168 E00E6838 AC850000 */  sw        $a1, 0x0($a0)
/* 3E116C E00E683C AC820004 */  sw        $v0, 0x4($a0)
/* 3E1170 E00E6840 8FBF00CC */  lw        $ra, 0xCC($sp)
/* 3E1174 E00E6844 8FBE00C8 */  lw        $fp, 0xC8($sp)
/* 3E1178 E00E6848 8FB700C4 */  lw        $s7, 0xC4($sp)
/* 3E117C E00E684C 8FB600C0 */  lw        $s6, 0xC0($sp)
/* 3E1180 E00E6850 8FB500BC */  lw        $s5, 0xBC($sp)
/* 3E1184 E00E6854 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 3E1188 E00E6858 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 3E118C E00E685C 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 3E1190 E00E6860 8FB100AC */  lw        $s1, 0xAC($sp)
/* 3E1194 E00E6864 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 3E1198 E00E6868 D7B400D0 */  ldc1      $f20, 0xD0($sp)
/* 3E119C E00E686C 03E00008 */  jr        $ra
/* 3E11A0 E00E6870 27BD00D8 */   addiu    $sp, $sp, 0xD8
/* 3E11A4 E00E6874 00000000 */  nop
/* 3E11A8 E00E6878 00000000 */  nop
/* 3E11AC E00E687C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void static_status_appendGfx(void* effect) {
    StaticStatusFXData* part = ((EffectInstance*)effect)->data.staticStatus;
    Camera* camera = &gCameras[gCurrentCameraID];
    s32 unk_30 = part->alpha;
    s32 unk_00 = part->type;
    Matrix4f mtxTransform;
    Matrix4f mtxTemp;
    s32 i;

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

    shim_guTranslateF(mtxTransform, part->pos.x, part->pos.y, part->pos.z);
    shim_guScaleF(mtxTemp, part->scale, part->scale, part->scale);
    shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
    shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
    gSPMatrix(gMainGfxPos++, camera->unkMatrix, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
    gSPDisplayList(gMainGfxPos++, D_E00E6888[unk_00]);

    part++;
    for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, part++) {
        if (part->frame >= 0) {
            shim_guPositionF(mtxTransform, 0.0f, 0.0f, part->rotation, part->scale, part->pos.x, part->pos.y, 0.0f);
            shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);

            gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, (unk_30 * part->alpha) >> 8);
            gSPDisplayList(gMainGfxPos++, D_E00E6880[unk_00]);
            gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        }
    }

    gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel btl_draw_enemy_health_bars
/* 16E880 8023FFA0 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 16E884 8023FFA4 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 16E888 8023FFA8 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 16E88C 8023FFAC AFBF0054 */  sw        $ra, 0x54($sp)
/* 16E890 8023FFB0 AFBE0050 */  sw        $fp, 0x50($sp)
/* 16E894 8023FFB4 AFB7004C */  sw        $s7, 0x4C($sp)
/* 16E898 8023FFB8 AFB60048 */  sw        $s6, 0x48($sp)
/* 16E89C 8023FFBC AFB50044 */  sw        $s5, 0x44($sp)
/* 16E8A0 8023FFC0 AFB40040 */  sw        $s4, 0x40($sp)
/* 16E8A4 8023FFC4 AFB3003C */  sw        $s3, 0x3C($sp)
/* 16E8A8 8023FFC8 AFB20038 */  sw        $s2, 0x38($sp)
/* 16E8AC 8023FFCC AFB10034 */  sw        $s1, 0x34($sp)
/* 16E8B0 8023FFD0 AFB00030 */  sw        $s0, 0x30($sp)
/* 16E8B4 8023FFD4 8042007C */  lb        $v0, 0x7C($v0)
/* 16E8B8 8023FFD8 104000EC */  beqz      $v0, func_8024038C
/* 16E8BC 8023FFDC 00000000 */   nop
/* 16E8C0 8023FFE0 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* 16E8C4 8023FFE4 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
/* 16E8C8 8023FFE8 30420001 */  andi      $v0, $v0, 0x1
/* 16E8CC 8023FFEC 104000E7 */  beqz      $v0, func_8024038C
/* 16E8D0 8023FFF0 0000B82D */   daddu    $s7, $zero, $zero
/* 16E8D4 8023FFF4 27B60020 */  addiu     $s6, $sp, 0x20
/* 16E8D8 8023FFF8 27B50024 */  addiu     $s5, $sp, 0x24
/* 16E8DC 8023FFFC 241E0008 */  addiu     $fp, $zero, 0x8
EFEB00_UpdateTexturePanSmooth:
/* 16E8E0 80240000 00171080 */  sll       $v0, $s7, 2
.L80240004:
/* 16E8E4 80240004 3C08800E */  lui       $t0, %hi(gBattleStatus)
glabel func_80240008
/* 16E8E8 80240008 2508C070 */  addiu     $t0, $t0, %lo(gBattleStatus)
glabel obk_02_UpdateTrafficBooMotion
/* 16E8EC 8024000C 01021021 */  addu      $v0, $t0, $v0
glabel end_01_WidenCameraFOV
/* 16E8F0 80240010 8C5300E0 */  lw        $s3, 0xE0($v0)
glabel func_80240014
/* 16E8F4 80240014 526000DA */  beql      $s3, $zero, D_80240380
glabel func_80240018
/* 16E8F8 80240018 26F70001 */   addiu    $s7, $s7, 0x1
glabel dead_flo_08_SuperBlock_ClearOverride40
/* 16E8FC 8024001C 827401B8 */  lb        $s4, 0x1B8($s3)
glabel dead_flo_11_Pipe_GetCurrentFloor
/* 16E900 80240020 826301B9 */  lb        $v1, 0x1B9($s3)
/* 16E904 80240024 00141040 */  sll       $v0, $s4, 1
glabel func_80240028
/* 16E908 80240028 00541021 */  addu      $v0, $v0, $s4
glabel func_8024002C
/* 16E90C 8024002C 000210C0 */  sll       $v0, $v0, 3
glabel func_80240030
/* 16E910 80240030 00541021 */  addu      $v0, $v0, $s4
glabel func_80240034
/* 16E914 80240034 14600002 */  bnez      $v1, func_80240040
glabel func_80240038
/* 16E918 80240038 0043001A */   div      $zero, $v0, $v1
glabel func_8024003C
/* 16E91C 8024003C 0007000D */  break     7
glabel func_80240040
/* 16E920 80240040 2401FFFF */  addiu     $at, $zero, -0x1
glabel func_80240044
/* 16E924 80240044 14610004 */  bne       $v1, $at, func_80240058
glabel func_80240048
/* 16E928 80240048 3C018000 */   lui      $at, (0x80000000 >> 16)
glabel omo_15_StarSpiritEffectFunc2
/* 16E92C 8024004C 14410002 */  bne       $v0, $at, func_80240058
glabel func_80240050
/* 16E930 80240050 00000000 */   nop
glabel omo_09_WaitWhileConveyorPaused
/* 16E934 80240054 0006000D */  break     6
glabel func_80240058
/* 16E938 80240058 00008812 */  mflo      $s1
glabel func_8024005C
/* 16E93C 8024005C 826201BC */  lb        $v0, 0x1BC($s3)
D_80240060:
/* 16E940 80240060 926301BC */  lbu       $v1, 0x1BC($s3)
glabel func_80240064
/* 16E944 80240064 0222102A */  slt       $v0, $s1, $v0
glabel dead_flo_08_SuperBlock_GetPartnerRank
/* 16E948 80240068 10400008 */  beqz      $v0, arn_08_func_8024008C_BF482C
glabel func_8024006C
/* 16E94C 8024006C 2462FFFE */   addiu    $v0, $v1, -0x2
glabel dead_11_FlyingAI_WanderInit
/* 16E950 80240070 A26201BC */  sb        $v0, 0x1BC($s3)
glabel func_80240074
/* 16E954 80240074 00021600 */  sll       $v0, $v0, 24
glabel func_80240078
/* 16E958 80240078 00021603 */  sra       $v0, $v0, 24
glabel func_8024007C
/* 16E95C 8024007C 0051102A */  slt       $v0, $v0, $s1
glabel dead_flo_10_StashVars
/* 16E960 80240080 1040000E */  beqz      $v0, func_802400BC
glabel func_80240084
/* 16E964 80240084 3C020004 */   lui      $v0, (0x44000 >> 16)
glabel func_80240088
/* 16E968 80240088 A27101BC */  sb        $s1, 0x1BC($s3)
glabel arn_08_func_8024008C_BF482C
/* 16E96C 8024008C 826201BC */  lb        $v0, 0x1BC($s3)
glabel func_80240090
/* 16E970 80240090 926301BC */  lbu       $v1, 0x1BC($s3)
.L80240094:
/* 16E974 80240094 0051102A */  slt       $v0, $v0, $s1
glabel func_80240098
/* 16E978 80240098 10400007 */  beqz      $v0, func_802400B8
glabel func_8024009C
/* 16E97C 8024009C 24620002 */   addiu    $v0, $v1, 0x2
glabel func_802400A0
/* 16E980 802400A0 A26201BC */  sb        $v0, 0x1BC($s3)
glabel func_802400A4
/* 16E984 802400A4 00021600 */  sll       $v0, $v0, 24
glabel func_802400A8
/* 16E988 802400A8 00021603 */  sra       $v0, $v0, 24
glabel func_802400AC
/* 16E98C 802400AC 0222102A */  slt       $v0, $s1, $v0
glabel dead_flo_12_TransformFoliage
/* 16E990 802400B0 54400001 */  bnel      $v0, $zero, func_802400B8
glabel func_802400B4
/* 16E994 802400B4 A27101BC */   sb       $s1, 0x1BC($s3)
glabel func_802400B8
/* 16E998 802400B8 3C020004 */  lui       $v0, (0x44000 >> 16)
glabel func_802400BC
/* 16E99C 802400BC 8E630000 */  lw        $v1, 0x0($s3)
glabel func_802400C0
/* 16E9A0 802400C0 34424000 */  ori       $v0, $v0, (0x44000 & 0xFFFF)
glabel obk_03_GetEntityPosition
/* 16E9A4 802400C4 00621024 */  and       $v0, $v1, $v0
glabel func_802400C8
/* 16E9A8 802400C8 544000AD */  bnel      $v0, $zero, D_80240380
glabel func_802400CC
/* 16E9AC 802400CC 26F70001 */   addiu    $s7, $s7, 0x1
D_802400D0:
/* 16E9B0 802400D0 3C02800E */  lui       $v0, %hi(gBattleStatus)
glabel func_802400D4
/* 16E9B4 802400D4 8C42C070 */  lw        $v0, %lo(gBattleStatus)($v0)
glabel func_802400D8
/* 16E9B8 802400D8 30420002 */  andi      $v0, $v0, 0x2
glabel func_802400DC
/* 16E9BC 802400DC 14400004 */  bnez      $v0, dead_flo_11_Pipe_GetEntryPos
glabel func_802400E0
/* 16E9C0 802400E0 3C020008 */   lui      $v0, (0x80000 >> 16)
glabel omo_17_CompareFloats
/* 16E9C4 802400E4 00621024 */  and       $v0, $v1, $v0
glabel dgb_13_pad_E8
/* 16E9C8 802400E8 504000A5 */  beql      $v0, $zero, D_80240380
glabel func_802400EC
/* 16E9CC 802400EC 26F70001 */   addiu    $s7, $s7, 0x1
glabel dead_flo_11_Pipe_GetEntryPos
/* 16E9D0 802400F0 0C094F08 */  jal       func_80253C20
glabel func_802400F4
/* 16E9D4 802400F4 0260202D */   daddu    $a0, $s3, $zero
dgb_14_pad_F8:
/* 16E9D8 802400F8 504000A1 */  beql      $v0, $zero, D_80240380
glabel dead_flo_16_SuperBlock_ClearOverride40
/* 16E9DC 802400FC 26F70001 */   addiu    $s7, $s7, 0x1
D_80240100:
/* 16E9E0 80240100 86620156 */  lh        $v0, 0x156($s3)
glabel omo_03_CompareFloats
/* 16E9E4 80240104 8663015A */  lh        $v1, 0x15A($s3)
glabel .L80240108
/* 16E9E8 80240108 44822000 */  mtc1      $v0, $f4
glabel func_8024010C
/* 16E9EC 8024010C 00000000 */  nop
D_80240110:
/* 16E9F0 80240110 46802120 */  cvt.s.w   $f4, $f4
glabel func_80240114
/* 16E9F4 80240114 86620158 */  lh        $v0, 0x158($s3)
glabel func_80240118
/* 16E9F8 80240118 44831000 */  mtc1      $v1, $f2
dead_flo_16_SuperBlock_HideBlockContent:
/* 16E9FC 8024011C 00000000 */  nop
glabel dead_flo_08_SuperBlock_CountEligiblePartners
/* 16EA00 80240120 468010A0 */  cvt.s.w   $f2, $f2
glabel EFEB00_UpdateTexturePanStepped
/* 16EA04 80240124 44820000 */  mtc1      $v0, $f0
glabel func_80240128
/* 16EA08 80240128 00000000 */  nop
glabel func_8024012C
/* 16EA0C 8024012C 46800020 */  cvt.s.w   $f0, $f0
glabel func_80240130
/* 16EA10 80240130 2842FE0C */  slti      $v0, $v0, -0x1F4
glabel dead_flo_10_GetItemName
/* 16EA14 80240134 54400092 */  bnel      $v0, $zero, D_80240380
glabel func_80240138_D547C8
/* 16EA18 80240138 26F70001 */   addiu    $s7, $s7, 0x1
glabel func_8024013C
/* 16EA1C 8024013C 24040001 */  addiu     $a0, $zero, 0x1
glabel omo_07_ShyGuyWanderAI_16
/* 16EA20 80240140 44052000 */  mfc1      $a1, $f4
glabel func_80240144
/* 16EA24 80240144 44060000 */  mfc1      $a2, $f0
glabel func_80240148
/* 16EA28 80240148 44071000 */  mfc1      $a3, $f2
D_8024014C:
/* 16EA2C 8024014C 27A20028 */  addiu     $v0, $sp, 0x28
glabel dead_flo_09_TransformFoliage
/* 16EA30 80240150 AFB60010 */  sw        $s6, 0x10($sp)
glabel func_80240154
/* 16EA34 80240154 AFB50014 */  sw        $s5, 0x14($sp)
glabel func_80240158_EC2358
/* 16EA38 80240158 0C00B94E */  jal       get_screen_coords
glabel func_8024015C
/* 16EA3C 8024015C AFA20018 */   sw       $v0, 0x18($sp)
glabel func_80240160
/* 16EA40 80240160 2405000A */  addiu     $a1, $zero, 0xA
glabel dead_kzn_18_UpdateTexturePanStepped
/* 16EA44 80240164 3C10802A */  lui       $s0, %hi(D_8029EFBC)
omo_17_AdvanceBuffer:
/* 16EA48 80240168 8E10EFBC */  lw        $s0, %lo(D_8029EFBC)($s0)
glabel func_8024016C
/* 16EA4C 8024016C 8FA20024 */  lw        $v0, 0x24($sp)
D_80240170:
/* 16EA50 80240170 0200202D */  daddu     $a0, $s0, $zero
glabel func_80240174
/* 16EA54 80240174 24420010 */  addiu     $v0, $v0, 0x10
D_80240178:
/* 16EA58 80240178 0C051277 */  jal       hud_element_set_render_depth
D_8024017C:
/* 16EA5C 8024017C AFA20024 */   sw       $v0, 0x24($sp)
glabel nok_14_SetCamera0Flag1000
/* 16EA60 80240180 3C058029 */  lui       $a1, %hi(HES_HPBar)
glabel func_80240184
/* 16EA64 80240184 24A51F80 */  addiu     $a1, $a1, %lo(HES_HPBar)
glabel func_80240188
/* 16EA68 80240188 0C0511FF */  jal       hud_element_set_script
glabel func_8024018C
/* 16EA6C 8024018C 0200202D */   daddu    $a0, $s0, $zero
glabel func_80240190
/* 16EA70 80240190 8FA50020 */  lw        $a1, 0x20($sp)
glabel sam_12_PlayRisingBubble
/* 16EA74 80240194 8FA60024 */  lw        $a2, 0x24($sp)
glabel dead_flo_10_UpdateTexturePanSmooth
/* 16EA78 80240198 0C051261 */  jal       hud_element_set_render_pos
glabel func_8024019C
/* 16EA7C 8024019C 0200202D */   daddu    $a0, $s0, $zero
glabel func_802401A0
/* 16EA80 802401A0 0C0511EA */  jal       hud_element_draw_clipped
glabel func_802401A4
/* 16EA84 802401A4 0200202D */   daddu    $a0, $s0, $zero
D_802401A8:
/* 16EA88 802401A8 3C026666 */  lui       $v0, (0x66666667 >> 16)
glabel omo_15_StarSpiritEffectFunc3
/* 16EA8C 802401AC 34426667 */  ori       $v0, $v0, (0x66666667 & 0xFFFF)
glabel func_802401B0
/* 16EA90 802401B0 02820018 */  mult      $s4, $v0
glabel func_802401B4
/* 16EA94 802401B4 001417C3 */  sra       $v0, $s4, 31

### DECOMPILED C INSTRUCTIONS:

void btl_draw_enemy_health_bars(void) {
    BattleStatus* battleStatus = &gBattleStatus;

    if (gGameStatusPtr->unk_7C != 0) {
        if (gBattleStatus.flags1 & BS_FLAGS1_ACTORS_VISIBLE) {
            s32 i;

            for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
                Actor* enemy = battleStatus->enemyActors[i];

                if (enemy != NULL) {
                    s32 currentHP;
                    s32 temp;
                    s32 ones;

                    currentHP = enemy->currentHP;
                    temp = (currentHP * 25) / enemy->maxHP;

                    if (temp < enemy->healthFraction) {
                        enemy->healthFraction -= 2;
                        if (enemy->healthFraction < temp) {
                            enemy->healthFraction = temp;
                        }
                    }

                    if (enemy->healthFraction < temp) {
                        enemy->healthFraction += 2;
                        if (enemy->healthFraction > temp) {
                            enemy->healthFraction = temp;
                        }
                    }

                    if (!(enemy->flags & (ACTOR_FLAG_NO_HEALTH_BAR | ACTOR_FLAG_TARGET_ONLY))
                        && ((gBattleStatus.flags1 & BS_FLAGS1_MENU_OPEN) || (enemy->flags & ACTOR_FLAG_HEALTH_BAR_HIDDEN))
                        && is_actor_health_bar_visible(enemy)
                    ) {
                        f32 x = enemy->healthBarPos.x;
                        f32 y = enemy->healthBarPos.y;
                        f32 z = enemy->healthBarPos.z;

                        if (enemy->healthBarPos.y >= -500) {
                            s32 screenX, screenY, screenZ;
                            s32 id;

                            get_screen_coords(1, x, y, z, &screenX, &screenY, &screenZ);
                            screenY += 16;
                            id = D_8029EFBC;
                            hud_element_set_render_depth(id, 10);
                            hud_element_set_script(id, &HES_HPBar);
                            hud_element_set_render_pos(id, screenX, screenY);
                            hud_element_draw_clipped(id);

                            temp = currentHP / 10;
                            ones = currentHP % 10;

                            // tens digit
                            if (temp > 0) {
                                id = D_8029EFBC;
                                hud_element_set_render_depth(id, 10);
                                hud_element_set_script(id, bHPDigitHudScripts[temp]);
                                btl_draw_prim_quad(0, 0, 0, 0, screenX, screenY + 2, 8, 8);
                                hud_element_set_render_pos(id, screenX + 4, screenY + 6);
                                hud_element_draw_next(id);
                            }

                            // ones digit
                            id = D_8029EFBC;
                            hud_element_set_render_depth(id, 10);
                            hud_element_set_script(id, bHPDigitHudScripts[ones]);
                            btl_draw_prim_quad(0, 0, 0, 0, screenX + 6, screenY + 2, 8, 8);
                            hud_element_set_render_pos(id, screenX + 10, screenY + 6);
                            hud_element_draw_next(id);

                            temp = enemy->healthFraction;
                            temp = 25 - temp;
                            btl_draw_prim_quad(168, 0, 0, 255, screenX + 11 - temp, screenY - 7, temp, 1);
                            btl_draw_prim_quad(255, 0, 0, 255, screenX + 11 - temp, screenY - 6, temp, 4);
                        }
                    }
                }
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel update_camera_mode_6
/* AD90 8002F990 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* AD94 8002F994 AFB00010 */  sw        $s0, 0x10($sp)
/* AD98 8002F998 0080802D */  daddu     $s0, $a0, $zero
/* AD9C 8002F99C AFBF0014 */  sw        $ra, 0x14($sp)
/* ADA0 8002F9A0 F7BE0040 */  sdc1      $f30, 0x40($sp)
/* ADA4 8002F9A4 F7BC0038 */  sdc1      $f28, 0x38($sp)
/* ADA8 8002F9A8 F7BA0030 */  sdc1      $f26, 0x30($sp)
/* ADAC 8002F9AC F7B80028 */  sdc1      $f24, 0x28($sp)
/* ADB0 8002F9B0 F7B60020 */  sdc1      $f22, 0x20($sp)
/* ADB4 8002F9B4 F7B40018 */  sdc1      $f20, 0x18($sp)
/* ADB8 8002F9B8 86020006 */  lh        $v0, 0x6($s0)
/* ADBC 8002F9BC 14400004 */  bnez      $v0, .L8002F9D0
/* ADC0 8002F9C0 00000000 */   nop
/* ADC4 8002F9C4 86020008 */  lh        $v0, 0x8($s0)
/* ADC8 8002F9C8 10400013 */  beqz      $v0, .L8002FA18
/* ADCC 8002F9CC 00000000 */   nop
.L8002F9D0:
/* ADD0 8002F9D0 C6000054 */  lwc1      $f0, 0x54($s0)
/* ADD4 8002F9D4 C6020058 */  lwc1      $f2, 0x58($s0)
/* ADD8 8002F9D8 C604005C */  lwc1      $f4, 0x5C($s0)
/* ADDC 8002F9DC 24020064 */  addiu     $v0, $zero, 0x64
/* ADE0 8002F9E0 A6000006 */  sh        $zero, 0x6($s0)
/* ADE4 8002F9E4 A6000008 */  sh        $zero, 0x8($s0)
/* ADE8 8002F9E8 A600001C */  sh        $zero, 0x1C($s0)
/* ADEC 8002F9EC A602001E */  sh        $v0, 0x1E($s0)
/* ADF0 8002F9F0 A6020020 */  sh        $v0, 0x20($s0)
/* ADF4 8002F9F4 A6000022 */  sh        $zero, 0x22($s0)
/* ADF8 8002F9F8 A6000024 */  sh        $zero, 0x24($s0)
/* ADFC 8002F9FC A6000026 */  sh        $zero, 0x26($s0)
/* AE00 8002FA00 AE000060 */  sw        $zero, 0x60($s0)
/* AE04 8002FA04 AE000064 */  sw        $zero, 0x64($s0)
/* AE08 8002FA08 AE000068 */  sw        $zero, 0x68($s0)
/* AE0C 8002FA0C E6000048 */  swc1      $f0, 0x48($s0)
/* AE10 8002FA10 E602004C */  swc1      $f2, 0x4C($s0)
/* AE14 8002FA14 E6040050 */  swc1      $f4, 0x50($s0)
.L8002FA18:
/* AE18 8002FA18 8602001C */  lh        $v0, 0x1C($s0)
/* AE1C 8002FA1C 14400073 */  bnez      $v0, .L8002FBEC
/* AE20 8002FA20 24022710 */   addiu    $v0, $zero, 0x2710
/* AE24 8002FA24 86030020 */  lh        $v1, 0x20($s0)
/* AE28 8002FA28 14600002 */  bnez      $v1, .L8002FA34
/* AE2C 8002FA2C 0043001A */   div      $zero, $v0, $v1
/* AE30 8002FA30 0007000D */  break     7
.L8002FA34:
/* AE34 8002FA34 2401FFFF */  addiu     $at, $zero, -0x1
/* AE38 8002FA38 14610004 */  bne       $v1, $at, .L8002FA4C
/* AE3C 8002FA3C 3C018000 */   lui      $at, (0x80000000 >> 16)
/* AE40 8002FA40 14410002 */  bne       $v0, $at, .L8002FA4C
/* AE44 8002FA44 00000000 */   nop
/* AE48 8002FA48 0006000D */  break     6
.L8002FA4C:
/* AE4C 8002FA4C 00001812 */  mflo      $v1
/* AE50 8002FA50 3C013F70 */  lui       $at, (0x3F700000 >> 16)
/* AE54 8002FA54 44810800 */  mtc1      $at, $f1
/* AE58 8002FA58 44800000 */  mtc1      $zero, $f0
/* AE5C 8002FA5C C60A0054 */  lwc1      $f10, 0x54($s0)
/* AE60 8002FA60 C6020060 */  lwc1      $f2, 0x60($s0)
/* AE64 8002FA64 C6040064 */  lwc1      $f4, 0x64($s0)
/* AE68 8002FA68 C606005C */  lwc1      $f6, 0x5C($s0)
/* AE6C 8002FA6C 86020026 */  lh        $v0, 0x26($s0)
/* AE70 8002FA70 46025280 */  add.s     $f10, $f10, $f2
/* AE74 8002FA74 44824000 */  mtc1      $v0, $f8
/* AE78 8002FA78 00000000 */  nop
/* AE7C 8002FA7C 46804221 */  cvt.d.w   $f8, $f8
/* AE80 8002FA80 86020024 */  lh        $v0, 0x24($s0)
/* AE84 8002FA84 46204202 */  mul.d     $f8, $f8, $f0
/* AE88 8002FA88 00000000 */  nop
/* AE8C 8002FA8C 44820000 */  mtc1      $v0, $f0
/* AE90 8002FA90 00000000 */  nop
/* AE94 8002FA94 46800020 */  cvt.s.w   $f0, $f0
/* AE98 8002FA98 E6000084 */  swc1      $f0, 0x84($s0)
/* AE9C 8002FA9C C6000058 */  lwc1      $f0, 0x58($s0)
/* AEA0 8002FAA0 86020022 */  lh        $v0, 0x22($s0)
/* AEA4 8002FAA4 E60A0048 */  swc1      $f10, 0x48($s0)
/* AEA8 8002FAA8 44821000 */  mtc1      $v0, $f2
/* AEAC 8002FAAC 00000000 */  nop
/* AEB0 8002FAB0 468010A0 */  cvt.s.w   $f2, $f2
/* AEB4 8002FAB4 46040000 */  add.s     $f0, $f0, $f4
/* AEB8 8002FAB8 E6020074 */  swc1      $f2, 0x74($s0)
/* AEBC 8002FABC C6020068 */  lwc1      $f2, 0x68($s0)
/* AEC0 8002FAC0 8602001E */  lh        $v0, 0x1E($s0)
/* AEC4 8002FAC4 46023180 */  add.s     $f6, $f6, $f2
/* AEC8 8002FAC8 44822000 */  mtc1      $v0, $f4
/* AECC 8002FACC 00000000 */  nop
/* AED0 8002FAD0 46802120 */  cvt.s.w   $f4, $f4
/* AED4 8002FAD4 46000021 */  cvt.d.s   $f0, $f0
/* AED8 8002FAD8 46280000 */  add.d     $f0, $f0, $f8
/* AEDC 8002FADC E6040078 */  swc1      $f4, 0x78($s0)
/* AEE0 8002FAE0 E6060050 */  swc1      $f6, 0x50($s0)
/* AEE4 8002FAE4 46200020 */  cvt.s.d   $f0, $f0
/* AEE8 8002FAE8 04610002 */  bgez      $v1, .L8002FAF4
/* AEEC 8002FAEC E600004C */   swc1     $f0, 0x4C($s0)
/* AEF0 8002FAF0 24630003 */  addiu     $v1, $v1, 0x3
.L8002FAF4:
/* AEF4 8002FAF4 C6020074 */  lwc1      $f2, 0x74($s0)
/* AEF8 8002FAF8 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* AEFC 8002FAFC 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* AF00 8002FB00 4481A000 */  mtc1      $at, $f20
/* AF04 8002FB04 00031083 */  sra       $v0, $v1, 2
/* AF08 8002FB08 46141082 */  mul.s     $f2, $f2, $f20
/* AF0C 8002FB0C 00000000 */  nop
/* AF10 8002FB10 4480F000 */  mtc1      $zero, $f30
/* AF14 8002FB14 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* AF18 8002FB18 4481B000 */  mtc1      $at, $f22
/* AF1C 8002FB1C 44820000 */  mtc1      $v0, $f0
/* AF20 8002FB20 00000000 */  nop
/* AF24 8002FB24 46800020 */  cvt.s.w   $f0, $f0
/* AF28 8002FB28 E6000018 */  swc1      $f0, 0x18($s0)
/* AF2C 8002FB2C 46161683 */  div.s     $f26, $f2, $f22
/* AF30 8002FB30 0C00A85B */  jal       sin_rad
/* AF34 8002FB34 4600D306 */   mov.s    $f12, $f26
/* AF38 8002FB38 46000706 */  mov.s     $f28, $f0
/* AF3C 8002FB3C 0C00A874 */  jal       cos_rad
/* AF40 8002FB40 4600D306 */   mov.s    $f12, $f26
/* AF44 8002FB44 461E0202 */  mul.s     $f8, $f0, $f30
/* AF48 8002FB48 00000000 */  nop
/* AF4C 8002FB4C 4600F087 */  neg.s     $f2, $f30
/* AF50 8002FB50 4602E082 */  mul.s     $f2, $f28, $f2
/* AF54 8002FB54 00000000 */  nop
/* AF58 8002FB58 C6180078 */  lwc1      $f24, 0x78($s0)
/* AF5C 8002FB5C 461CC102 */  mul.s     $f4, $f24, $f28
/* AF60 8002FB60 00000000 */  nop
/* AF64 8002FB64 4600C182 */  mul.s     $f6, $f24, $f0
/* AF68 8002FB68 00000000 */  nop
/* AF6C 8002FB6C C6000084 */  lwc1      $f0, 0x84($s0)
/* AF70 8002FB70 46140002 */  mul.s     $f0, $f0, $f20
/* AF74 8002FB74 00000000 */  nop
/* AF78 8002FB78 4600F286 */  mov.s     $f10, $f30
/* AF7C 8002FB7C 46005506 */  mov.s     $f20, $f10
/* AF80 8002FB80 46044780 */  add.s     $f30, $f8, $f4
/* AF84 8002FB84 46061600 */  add.s     $f24, $f2, $f6
/* AF88 8002FB88 46160683 */  div.s     $f26, $f0, $f22
/* AF8C 8002FB8C 0C00A85B */  jal       sin_rad
/* AF90 8002FB90 4600D306 */   mov.s    $f12, $f26
/* AF94 8002FB94 46000706 */  mov.s     $f28, $f0
/* AF98 8002FB98 0C00A874 */  jal       cos_rad
/* AF9C 8002FB9C 4600D306 */   mov.s    $f12, $f26
/* AFA0 8002FBA0 46140182 */  mul.s     $f6, $f0, $f20
/* AFA4 8002FBA4 00000000 */  nop
/* AFA8 8002FBA8 4614E102 */  mul.s     $f4, $f28, $f20
/* AFAC 8002FBAC 00000000 */  nop
/* AFB0 8002FBB0 461CC082 */  mul.s     $f2, $f24, $f28
/* AFB4 8002FBB4 00000000 */  nop
/* AFB8 8002FBB8 4600C002 */  mul.s     $f0, $f24, $f0
/* AFBC 8002FBBC 00000000 */  nop
/* AFC0 8002FBC0 46023281 */  sub.s     $f10, $f6, $f2
/* AFC4 8002FBC4 46002100 */  add.s     $f4, $f4, $f0
/* AFC8 8002FBC8 C600004C */  lwc1      $f0, 0x4C($s0)
/* AFCC 8002FBCC 461E0000 */  add.s     $f0, $f0, $f30
/* AFD0 8002FBD0 C6060048 */  lwc1      $f6, 0x48($s0)
/* AFD4 8002FBD4 460A3180 */  add.s     $f6, $f6, $f10
/* AFD8 8002FBD8 C6020050 */  lwc1      $f2, 0x50($s0)
/* AFDC 8002FBDC 46041080 */  add.s     $f2, $f2, $f4
/* AFE0 8002FBE0 E6000040 */  swc1      $f0, 0x40($s0)
/* AFE4 8002FBE4 E606003C */  swc1      $f6, 0x3C($s0)
/* AFE8 8002FBE8 E6020044 */  swc1      $f2, 0x44($s0)
.L8002FBEC:
/* AFEC 8002FBEC C60C003C */  lwc1      $f12, 0x3C($s0)
/* AFF0 8002FBF0 C60E0044 */  lwc1      $f14, 0x44($s0)
/* AFF4 8002FBF4 8E060048 */  lw        $a2, 0x48($s0)
/* AFF8 8002FBF8 0C00A720 */  jal       atan2
/* AFFC 8002FBFC 8E070050 */   lw       $a3, 0x50($s0)
/* B000 8002FC00 C6040048 */  lwc1      $f4, 0x48($s0)
/* B004 8002FC04 4480B000 */  mtc1      $zero, $f22
/* B008 8002FC08 C602003C */  lwc1      $f2, 0x3C($s0)
/* B00C 8002FC0C E600006C */  swc1      $f0, 0x6C($s0)
/* B010 8002FC10 46022501 */  sub.s     $f20, $f4, $f2
/* B014 8002FC14 C6040050 */  lwc1      $f4, 0x50($s0)
/* B018 8002FC18 C6020044 */  lwc1      $f2, 0x44($s0)
/* B01C 8002FC1C 4600B306 */  mov.s     $f12, $f22
/* B020 8002FC20 46022601 */  sub.s     $f24, $f4, $f2
/* B024 8002FC24 C604004C */  lwc1      $f4, 0x4C($s0)
/* B028 8002FC28 C6020040 */  lwc1      $f2, 0x40($s0)
/* B02C 8002FC2C 4406A000 */  mfc1      $a2, $f20
/* B030 8002FC30 46022781 */  sub.s     $f30, $f4, $f2
/* B034 8002FC34 4407C000 */  mfc1      $a3, $f24
/* B038 8002FC38 0C00A720 */  jal       atan2
/* B03C 8002FC3C 4600B386 */   mov.s    $f14, $f22
/* B040 8002FC40 4614A102 */  mul.s     $f4, $f20, $f20
/* B044 8002FC44 00000000 */  nop
/* B048 8002FC48 4618C082 */  mul.s     $f2, $f24, $f24
/* B04C 8002FC4C 00000000 */  nop
/* B050 8002FC50 46022300 */  add.s     $f12, $f4, $f2
/* B054 8002FC54 46000007 */  neg.s     $f0, $f0
/* B058 8002FC58 E6000090 */  swc1      $f0, 0x90($s0)
/* B05C 8002FC5C 46006004 */  sqrt.s    $f0, $f12
/* B060 8002FC60 46000032 */  c.eq.s    $f0, $f0
/* B064 8002FC64 00000000 */  nop
/* B068 8002FC68 45030004 */  bc1tl     .L8002FC7C
/* B06C 8002FC6C 4600B306 */   mov.s    $f12, $f22
/* B070 8002FC70 0C0187BC */  jal       sqrtf
/* B074 8002FC74 00000000 */   nop
/* B078 8002FC78 4600B306 */  mov.s     $f12, $f22
.L8002FC7C:
/* B07C 8002FC7C 46000007 */  neg.s     $f0, $f0
/* B080 8002FC80 4406F000 */  mfc1      $a2, $f30
/* B084 8002FC84 44070000 */  mfc1      $a3, $f0
/* B088 8002FC88 0C00A720 */  jal       atan2
/* B08C 8002FC8C 46006386 */   mov.s    $f14, $f12
/* B090 8002FC90 E6000094 */  swc1      $f0, 0x94($s0)
/* B094 8002FC94 C6000048 */  lwc1      $f0, 0x48($s0)
/* B098 8002FC98 3C02800E */  lui       $v0, %hi(gBattleStatus)
/* B09C 8002FC9C 2442C070 */  addiu     $v0, $v0, %lo(gBattleStatus)
/* B0A0 8002FCA0 E44000CC */  swc1      $f0, 0xCC($v0)
/* B0A4 8002FCA4 C600004C */  lwc1      $f0, 0x4C($s0)
/* B0A8 8002FCA8 E44000D0 */  swc1      $f0, 0xD0($v0)
/* B0AC 8002FCAC C6000050 */  lwc1      $f0, 0x50($s0)
/* B0B0 8002FCB0 E44000D4 */  swc1      $f0, 0xD4($v0)
/* B0B4 8002FCB4 8FBF0014 */  lw        $ra, 0x14($sp)
/* B0B8 8002FCB8 8FB00010 */  lw        $s0, 0x10($sp)
glabel func_8002FCBC
/* B0BC 8002FCBC D7BE0040 */  ldc1      $f30, 0x40($sp)
/* B0C0 8002FCC0 D7BC0038 */  ldc1      $f28, 0x38($sp)
/* B0C4 8002FCC4 D7BA0030 */  ldc1      $f26, 0x30($sp)
/* B0C8 8002FCC8 D7B80028 */  ldc1      $f24, 0x28($sp)
/* B0CC 8002FCCC D7B60020 */  ldc1      $f22, 0x20($sp)
/* B0D0 8002FCD0 D7B40018 */  ldc1      $f20, 0x18($sp)
/* B0D4 8002FCD4 03E00008 */  jr        $ra
/* B0D8 8002FCD8 27BD0048 */   addiu    $sp, $sp, 0x48
/* B0DC 8002FCDC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void update_camera_mode_6(Camera* camera) {
    f32 sinBoom;
    f32 cosBoom;
    f32 deltaX;
    f32 deltaY;
    f32 deltaZ;
    f32 deltaX2;
    f32 deltaY2;
    f32 deltaZ2;
    f32 boomYaw;
    f32 new_var;
    f32 planarDist;

    if (camera->needsInit || camera->isChangingMap) {
        camera->needsInit = FALSE;
        camera->isChangingMap = FALSE;
        camera->auxPitch = 0;
        camera->auxBoomLength = 100;
        camera->lookAt_dist = 100;
        camera->auxBoomPitch = 0;
        camera->auxBoomYaw = 0;
        camera->auxBoomZOffset = 0;
        camera->targetPos.x = 0.0f;
        camera->targetPos.y = 0.0f;
        camera->targetPos.z = 0.0f;
        camera->lookAt_obj.x = camera->lookAt_obj_target.x;
        camera->lookAt_obj.y = camera->lookAt_obj_target.y;
        camera->lookAt_obj.z = camera->lookAt_obj_target.z;
    }
    if (camera->auxPitch == 0) {
        camera->lookAt_obj.x = camera->lookAt_obj_target.x + camera->targetPos.x;
        camera->lookAt_obj.y = camera->lookAt_obj_target.y + camera->targetPos.y + camera->auxBoomZOffset / 256.0;
        camera->lookAt_obj.z = camera->lookAt_obj_target.z + camera->targetPos.z;
        camera->trueRotation.x = camera->auxBoomYaw;
        camera->currentBoomYaw = camera->auxBoomPitch;
        camera->currentBoomLength = camera->auxBoomLength;
        camera->vfov = (10000 / camera->lookAt_dist) / 4;
        boomYaw = DEG_TO_RAD(camera->currentBoomYaw);
        sinBoom = sin_rad(boomYaw);
        cosBoom = cos_rad(boomYaw);
        deltaX = 0.0f;
        deltaY = 0.0f;
        deltaZ = camera->currentBoomLength;
        deltaX2 = 0.0f;
        deltaY2 = 0.0f;
        boomYaw = deltaX = -deltaY2;
        deltaZ2 = camera->currentBoomLength;
        new_var = boomYaw;
        deltaX = deltaX2;
        deltaY = cosBoom * deltaY2 + deltaZ2 * sinBoom;
        deltaZ = sinBoom * new_var + deltaZ2 * cosBoom;
        boomYaw = DEG_TO_RAD(camera->trueRotation.x);
        sinBoom = sin_rad(boomYaw);
        cosBoom = cos_rad(boomYaw);
        deltaZ2 = cosBoom * deltaX - deltaZ * sinBoom;
        deltaX2 = cosBoom * deltaX - deltaZ * sinBoom;
        deltaY2 = deltaY;
        deltaZ2 = sinBoom * deltaX + deltaZ * cosBoom;
        camera->lookAt_eye.x = camera->lookAt_obj.x + deltaX2;
        camera->lookAt_eye.y = camera->lookAt_obj.y + deltaY2;
        camera->lookAt_eye.z = camera->lookAt_obj.z + deltaZ2;
    }
    camera->currentYaw = atan2(camera->lookAt_eye.x, camera->lookAt_eye.z, camera->lookAt_obj.x, camera->lookAt_obj.z);
    deltaX = camera->lookAt_obj.x - camera->lookAt_eye.x;
    deltaY = camera->lookAt_obj.y - camera->lookAt_eye.y;
    deltaZ = camera->lookAt_obj.z - camera->lookAt_eye.z;
    camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, deltaX, deltaZ);
    planarDist = sqrtf(SQ(deltaX) + SQ(deltaZ));
    camera->currentPitch = atan2(0.0f, 0.0f, deltaY, -planarDist);
    gBattleStatus.camLookatObjPos.x = camera->lookAt_obj.x;
    gBattleStatus.camLookatObjPos.y = camera->lookAt_obj.y;
    gBattleStatus.camLookatObjPos.z = camera->lookAt_obj.z;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_802A1518_7A8EB8
/* 78BB18 802A1518 27BDFFD8 */  addiu     $sp, $sp, -0x28
.L802A151C_7A8EBC:
/* 78BB1C 802A151C AFB1001C */  sw        $s1, 0x1C($sp)
D_802A1520_7A8EC0:
/* 78BB20 802A1520 0080882D */  daddu     $s1, $a0, $zero
.L802A1524_7A8EC4:
/* 78BB24 802A1524 AFBF0024 */  sw        $ra, 0x24($sp)
glabel func_802A1528_7A8EC8
/* 78BB28 802A1528 AFB20020 */  sw        $s2, 0x20($sp)
.L802A152C_7A8ECC:
/* 78BB2C 802A152C AFB00018 */  sw        $s0, 0x18($sp)
D_802A1530_7A8ED0:
/* 78BB30 802A1530 8E24000C */  lw        $a0, 0xC($s1)
.L802A1534_7A8ED4:
/* 78BB34 802A1534 54A00001 */  bnel      $a1, $zero, func_802A153C_7A8EDC
/* 78BB38 802A1538 AE200070 */   sw       $zero, 0x70($s1)
glabel func_802A153C_7A8EDC
/* 78BB3C 802A153C 24120001 */  addiu     $s2, $zero, 0x1
D_802A1540_7A8EE0:
/* 78BB40 802A1540 8E230070 */  lw        $v1, 0x70($s1)
D_802A1544_7A8EE4:
/* 78BB44 802A1544 8E300074 */  lw        $s0, 0x74($s1)
D_802A1548_7A8EE8:
/* 78BB48 802A1548 10720027 */  beq       $v1, $s2, .L802A15E8_7A8F88
glabel func_802A154C_7A8EEC
/* 78BB4C 802A154C 28620002 */   slti     $v0, $v1, 0x2
D_802A1550_7A8EF0:
/* 78BB50 802A1550 10400005 */  beqz      $v0, .L802A1568_7A8F08
.L802A1554_7A8EF4:
/* 78BB54 802A1554 24020002 */   addiu    $v0, $zero, 0x2
/* 78BB58 802A1558 10600007 */  beqz      $v1, .L802A1578_7A8F18
/* 78BB5C 802A155C 0000102D */   daddu    $v0, $zero, $zero
.L802A1560_7A8F00:
/* 78BB60 802A1560 080A85EF */  j         .L802A17BC_7A915C
.L802A1564_7A8F04:
/* 78BB64 802A1564 00000000 */   nop
.L802A1568_7A8F08:
/* 78BB68 802A1568 10620091 */  beq       $v1, $v0, .L802A17B0_7A9150
glabel func_802A156C_7A8F0C
/* 78BB6C 802A156C 0000102D */   daddu    $v0, $zero, $zero
/* 78BB70 802A1570 080A85EF */  j         .L802A17BC_7A915C
/* 78BB74 802A1574 00000000 */   nop
.L802A1578_7A8F18:
/* 78BB78 802A1578 8C850000 */  lw        $a1, 0x0($a0)
/* 78BB7C 802A157C 0C0B1EAF */  jal       evt_get_variable
/* 78BB80 802A1580 0220202D */   daddu    $a0, $s1, $zero
D_802A1584_7A8F24:
/* 78BB84 802A1584 0C00EABB */  jal       get_npc_unsafe
.L802A1588_7A8F28:
/* 78BB88 802A1588 0040202D */   daddu    $a0, $v0, $zero
.L802A158C_7A8F2C:
/* 78BB8C 802A158C 3C01BFC0 */  lui       $at, (0xBFC00000 >> 16)
.L802A1590_7A8F30:
/* 78BB90 802A1590 44810000 */  mtc1      $at, $f0
.L802A1594_7A8F34:
/* 78BB94 802A1594 3C013CA3 */  lui       $at, (0x3CA3D70A >> 16)
.L802A1598_7A8F38:
/* 78BB98 802A1598 3421D70A */  ori       $at, $at, (0x3CA3D70A & 0xFFFF)
/* 78BB9C 802A159C 44811000 */  mtc1      $at, $f2
glabel func_802A15A0_7A8F40
/* 78BBA0 802A15A0 3C013F80 */  lui       $at, (0x3F800000 >> 16)
D_802A15A4_7A8F44:
/* 78BBA4 802A15A4 44812000 */  mtc1      $at, $f4
/* 78BBA8 802A15A8 0040802D */  daddu     $s0, $v0, $zero
glabel func_802A15AC_7A8F4C
/* 78BBAC 802A15AC AE300074 */  sw        $s0, 0x74($s1)
D_802A15B0_7A8F50:
/* 78BBB0 802A15B0 C6060038 */  lwc1      $f6, 0x38($s0)
glabel func_802A15B4_7A8F54
/* 78BBB4 802A15B4 C608003C */  lwc1      $f8, 0x3C($s0)
.L802A15B8_7A8F58:
/* 78BBB8 802A15B8 C60A0040 */  lwc1      $f10, 0x40($s0)
/* 78BBBC 802A15BC AE000010 */  sw        $zero, 0x10($s0)
.L802A15C0_7A8F60:
/* 78BBC0 802A15C0 AE00000C */  sw        $zero, 0xC($s0)
/* 78BBC4 802A15C4 A600008E */  sh        $zero, 0x8E($s0)
/* 78BBC8 802A15C8 E600001C */  swc1      $f0, 0x1C($s0)
/* 78BBCC 802A15CC E6020014 */  swc1      $f2, 0x14($s0)
.L802A15D0_7A8F70:
/* 78BBD0 802A15D0 E6040018 */  swc1      $f4, 0x18($s0)
/* 78BBD4 802A15D4 E6060060 */  swc1      $f6, 0x60($s0)
D_802A15D8_7A8F78:
/* 78BBD8 802A15D8 E6080064 */  swc1      $f8, 0x64($s0)
.L802A15DC_7A8F7C:
/* 78BBDC 802A15DC E60A0068 */  swc1      $f10, 0x68($s0)
/* 78BBE0 802A15E0 080A85EE */  j         .L802A17B8_7A9158
D_802A15E4_7A8F84:
/* 78BBE4 802A15E4 AE320070 */   sw       $s2, 0x70($s1)
.L802A15E8_7A8F88:
/* 78BBE8 802A15E8 C602001C */  lwc1      $f2, 0x1C($s0)
/* 78BBEC 802A15EC 44800000 */  mtc1      $zero, $f0
.L802A15F0_7A8F90:
/* 78BBF0 802A15F0 00000000 */  nop
.L802A15F4_7A8F94:
/* 78BBF4 802A15F4 4600103C */  c.lt.s    $f2, $f0
/* 78BBF8 802A15F8 00000000 */  nop
/* 78BBFC 802A15FC 4500000D */  bc1f      .L802A1634_7A8FD4
D_802A1600_7A8FA0:
/* 78BC00 802A1600 00000000 */   nop
.L802A1604_7A8FA4:
/* 78BC04 802A1604 C6000010 */  lwc1      $f0, 0x10($s0)
.L802A1608_7A8FA8:
/* 78BC08 802A1608 3C014008 */  lui       $at, (0x40080000 >> 16)
/* 78BC0C 802A160C 44811800 */  mtc1      $at, $f3
.L802A1610_7A8FB0:
/* 78BC10 802A1610 44801000 */  mtc1      $zero, $f2
D_802A1614_7A8FB4:
/* 78BC14 802A1614 46000021 */  cvt.d.s   $f0, $f0
.L802A1618_7A8FB8:
/* 78BC18 802A1618 46220000 */  add.d     $f0, $f0, $f2
D_802A161C_7A8FBC:
/* 78BC1C 802A161C 3C014220 */  lui       $at, (0x42200000 >> 16)
D_802A1620_7A8FC0:
/* 78BC20 802A1620 44811000 */  mtc1      $at, $f2
/* 78BC24 802A1624 46200020 */  cvt.s.d   $f0, $f0
glabel func_802A1628_7A8FC8
/* 78BC28 802A1628 4600103C */  c.lt.s    $f2, $f0
/* 78BC2C 802A162C 080A8598 */  j         .L802A1660_7A9000
D_802A1630_7A8FD0:
/* 78BC30 802A1630 E6000010 */   swc1     $f0, 0x10($s0)
.L802A1634_7A8FD4:
/* 78BC34 802A1634 C6000010 */  lwc1      $f0, 0x10($s0)
/* 78BC38 802A1638 3C014000 */  lui       $at, (0x40000000 >> 16)
glabel func_802A163C_7A8FDC
/* 78BC3C 802A163C 44811800 */  mtc1      $at, $f3
/* 78BC40 802A1640 44801000 */  mtc1      $zero, $f2
D_802A1644_7A8FE4:
/* 78BC44 802A1644 46000021 */  cvt.d.s   $f0, $f0
/* 78BC48 802A1648 46220001 */  sub.d     $f0, $f0, $f2
.L802A164C_7A8FEC:
/* 78BC4C 802A164C 3C0141A0 */  lui       $at, (0x41A00000 >> 16)
/* 78BC50 802A1650 44811000 */  mtc1      $at, $f2
.L802A1654_7A8FF4:
/* 78BC54 802A1654 46200020 */  cvt.s.d   $f0, $f0
/* 78BC58 802A1658 4602003C */  c.lt.s    $f0, $f2
/* 78BC5C 802A165C E6000010 */  swc1      $f0, 0x10($s0)
.L802A1660_7A9000:
/* 78BC60 802A1660 45030001 */  bc1tl     .L802A1668_7A9008
D_802A1664_7A9004:
/* 78BC64 802A1664 E6020010 */   swc1     $f2, 0x10($s0)
.L802A1668_7A9008:
/* 78BC68 802A1668 C6000018 */  lwc1      $f0, 0x18($s0)
/* 78BC6C 802A166C 3C013FE8 */  lui       $at, (0x3FE80000 >> 16)
D_802A1670_7A9010:
/* 78BC70 802A1670 44811800 */  mtc1      $at, $f3
/* 78BC74 802A1674 44801000 */  mtc1      $zero, $f2
.L802A1678_7A9018:
/* 78BC78 802A1678 C604001C */  lwc1      $f4, 0x1C($s0)
.L802A167C_7A901C:
/* 78BC7C 802A167C 46000021 */  cvt.d.s   $f0, $f0
/* 78BC80 802A1680 46220000 */  add.d     $f0, $f0, $f2
/* 78BC84 802A1684 C6020014 */  lwc1      $f2, 0x14($s0)
/* 78BC88 802A1688 3C014204 */  lui       $at, (0x42040000 >> 16)
D_802A168C_7A902C:
/* 78BC8C 802A168C 44813000 */  mtc1      $at, $f6
D_802A1690_7A9030:
/* 78BC90 802A1690 46022100 */  add.s     $f4, $f4, $f2
/* 78BC94 802A1694 C602003C */  lwc1      $f2, 0x3C($s0)
glabel .L802A1698_7A9038
/* 78BC98 802A1698 46200020 */  cvt.s.d   $f0, $f0
/* 78BC9C 802A169C 4600303C */  c.lt.s    $f6, $f0
.L802A16A0_7A9040:
/* 78BCA0 802A16A0 46041080 */  add.s     $f2, $f2, $f4
D_802A16A4_7A9044:
/* 78BCA4 802A16A4 E6000018 */  swc1      $f0, 0x18($s0)
/* 78BCA8 802A16A8 E604001C */  swc1      $f4, 0x1C($s0)
.L802A16AC_7A904C:
/* 78BCAC 802A16AC 45000002 */  bc1f      .L802A16B8_7A9058
D_802A16B0_7A9050:
/* 78BCB0 802A16B0 E602003C */   swc1     $f2, 0x3C($s0)
/* 78BCB4 802A16B4 E6060018 */  swc1      $f6, 0x18($s0)
.L802A16B8_7A9058:
/* 78BCB8 802A16B8 C602000C */  lwc1      $f2, 0xC($s0)
/* 78BCBC 802A16BC C6000018 */  lwc1      $f0, 0x18($s0)
/* 78BCC0 802A16C0 8E060010 */  lw        $a2, 0x10($s0)
/* 78BCC4 802A16C4 46001080 */  add.s     $f2, $f2, $f0
/* 78BCC8 802A16C8 C6000060 */  lwc1      $f0, 0x60($s0)
glabel func_802A16CC_7A906C
/* 78BCCC 802A16CC 26040038 */  addiu     $a0, $s0, 0x38
D_802A16D0_7A9070:
/* 78BCD0 802A16D0 E602000C */  swc1      $f2, 0xC($s0)
D_802A16D4_7A9074:
/* 78BCD4 802A16D4 44071000 */  mfc1      $a3, $f2
.L802A16D8_7A9078:
/* 78BCD8 802A16D8 C6020068 */  lwc1      $f2, 0x68($s0)
.L802A16DC_7A907C:
/* 78BCDC 802A16DC 26050040 */  addiu     $a1, $s0, 0x40
/* 78BCE0 802A16E0 E6000038 */  swc1      $f0, 0x38($s0)
glabel func_802A16E4_7A9084
/* 78BCE4 802A16E4 0C00A7E7 */  jal       add_vec2D_polar
/* 78BCE8 802A16E8 E6020040 */   swc1     $f2, 0x40($s0)
/* 78BCEC 802A16EC 3C039249 */  lui       $v1, (0x92492493 >> 16)
D_802A16F0_7A9090:
/* 78BCF0 802A16F0 9602008E */  lhu       $v0, 0x8E($s0)
glabel func_802A16F4_7A9094
/* 78BCF4 802A16F4 34632493 */  ori       $v1, $v1, (0x92492493 & 0xFFFF)
/* 78BCF8 802A16F8 00021400 */  sll       $v0, $v0, 16
.L802A16FC_7A909C:
/* 78BCFC 802A16FC 00022403 */  sra       $a0, $v0, 16
.L802A1700_7A90A0:
/* 78BD00 802A1700 00830018 */  mult      $a0, $v1
D_802A1704_7A90A4:
/* 78BD04 802A1704 000217C3 */  sra       $v0, $v0, 31
.L802A1708_7A90A8:
/* 78BD08 802A1708 00004010 */  mfhi      $t0
D_802A170C_7A90AC:
/* 78BD0C 802A170C 01041821 */  addu      $v1, $t0, $a0
D_802A1710_7A90B0:
/* 78BD10 802A1710 000318C3 */  sra       $v1, $v1, 3
/* 78BD14 802A1714 00621823 */  subu      $v1, $v1, $v0
/* 78BD18 802A1718 000310C0 */  sll       $v0, $v1, 3
.L802A171C_7A90BC:
/* 78BD1C 802A171C 00431023 */  subu      $v0, $v0, $v1
/* 78BD20 802A1720 00021040 */  sll       $v0, $v0, 1
D_802A1724_7A90C4:
/* 78BD24 802A1724 00822023 */  subu      $a0, $a0, $v0
/* 78BD28 802A1728 00042400 */  sll       $a0, $a0, 16
/* 78BD2C 802A172C 1480000A */  bnez      $a0, .L802A1758_7A90F8
/* 78BD30 802A1730 00000000 */   nop
glabel .L802A1734_7A90D4
/* 78BD34 802A1734 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
.L802A1738_7A90D8:
/* 78BD38 802A1738 44810000 */  mtc1      $at, $f0
/* 78BD3C 802A173C 00000000 */  nop
D_802A1740_7A90E0:
/* 78BD40 802A1740 E7A00010 */  swc1      $f0, 0x10($sp)
D_802A1744_7A90E4:
/* 78BD44 802A1744 8E050038 */  lw        $a1, 0x38($s0)
/* 78BD48 802A1748 8E06003C */  lw        $a2, 0x3C($s0)
D_802A174C_7A90EC:
/* 78BD4C 802A174C 8E070040 */  lw        $a3, 0x40($s0)
.L802A1750_7A90F0:
/* 78BD50 802A1750 0C01BFBC */  jal       fx_sparkles
glabel .L802A1754_7A90F4
/* 78BD54 802A1754 0000202D */   daddu    $a0, $zero, $zero
.L802A1758_7A90F8:
/* 78BD58 802A1758 9602008E */  lhu       $v0, 0x8E($s0)
.L802A175C_7A90FC:
/* 78BD5C 802A175C 24420001 */  addiu     $v0, $v0, 0x1
/* 78BD60 802A1760 A602008E */  sh        $v0, 0x8E($s0)
/* 78BD64 802A1764 00021400 */  sll       $v0, $v0, 16
/* 78BD68 802A1768 00021403 */  sra       $v0, $v0, 16
D_802A176C_7A910C:
/* 78BD6C 802A176C 28420029 */  slti      $v0, $v0, 0x29
D_802A1770_7A9110:
/* 78BD70 802A1770 14400005 */  bnez      $v0, .L802A1788_7A9128
.L802A1774_7A9114:
/* 78BD74 802A1774 00000000 */   nop
/* 78BD78 802A1778 3C013F00 */  lui       $at, (0x3F000000 >> 16)
.L802A177C_7A911C:
/* 78BD7C 802A177C 44810000 */  mtc1      $at, $f0
/* 78BD80 802A1780 00000000 */  nop
D_802A1784_7A9124:
/* 78BD84 802A1784 E6000014 */  swc1      $f0, 0x14($s0)
.L802A1788_7A9128:
/* 78BD88 802A1788 C602003C */  lwc1      $f2, 0x3C($s0)
/* 78BD8C 802A178C 3C014348 */  lui       $at, (0x43480000 >> 16)
D_802A1790_7A9130:
/* 78BD90 802A1790 44810000 */  mtc1      $at, $f0
.L802A1794_7A9134:
/* 78BD94 802A1794 00000000 */  nop
.L802A1798_7A9138:
/* 78BD98 802A1798 4602003C */  c.lt.s    $f0, $f2
.L802A179C_7A913C:
/* 78BD9C 802A179C 00000000 */  nop
D_802A17A0_7A9140:
/* 78BDA0 802A17A0 45000005 */  bc1f      .L802A17B8_7A9158
D_802A17A4_7A9144:
/* 78BDA4 802A17A4 24020002 */   addiu    $v0, $zero, 0x2
/* 78BDA8 802A17A8 080A85EE */  j         .L802A17B8_7A9158
D_802A17AC_7A914C:
/* 78BDAC 802A17AC AE220070 */   sw       $v0, 0x70($s1)
.L802A17B0_7A9150:
/* 78BDB0 802A17B0 080A85EF */  j         .L802A17BC_7A915C
.L802A17B4_7A9154:
/* 78BDB4 802A17B4 24020002 */   addiu    $v0, $zero, 0x2
.L802A17B8_7A9158:
/* 78BDB8 802A17B8 0000102D */  daddu     $v0, $zero, $zero
.L802A17BC_7A915C:
/* 78BDBC 802A17BC 8FBF0024 */  lw        $ra, 0x24($sp)
/* 78BDC0 802A17C0 8FB20020 */  lw        $s2, 0x20($sp)
D_802A17C4_7A9164:
/* 78BDC4 802A17C4 8FB1001C */  lw        $s1, 0x1C($sp)
/* 78BDC8 802A17C8 8FB00018 */  lw        $s0, 0x18($sp)
D_802A17CC_7A916C:
/* 78BDCC 802A17CC 03E00008 */  jr        $ra
D_802A17D0_7A9170:
/* 78BDD0 802A17D0 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(func_802A1518_78BB18) {
    Bytecode* args = script->ptrReadPos;
    Npc* npc;

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

    npc = script->functionTempPtr[1];

    switch (script->functionTemp[0]) {
        case 0:
            script->functionTempPtr[1] = npc = get_npc_unsafe(evt_get_variable(script, *args++));
            npc->planarFlyDist = 0;
            npc->yaw = 0;
            npc->duration = 0;
            npc->jumpVelocity = -1.5f;
            npc->jumpScale = 0.02f;
            npc->moveSpeed = 1.0f;
            npc->moveToPos.x = npc->pos.x;
            npc->moveToPos.y = npc->pos.y;
            npc->moveToPos.z = npc->pos.z;
            script->functionTemp[0] = 1;
            break;
        case 1:
            if (npc->jumpVelocity < 0.0f) {
                npc->planarFlyDist += 3.0;
                if (npc->planarFlyDist > 40.0f) {
                    npc->planarFlyDist = 40.0f;
                }
            } else {
                npc->planarFlyDist -= 2.0;
                if (npc->planarFlyDist < 20.0f) {
                    npc->planarFlyDist = 20.0f;
                }
            }

            npc->moveSpeed += 0.75;
            npc->jumpVelocity += npc->jumpScale;
            npc->pos.y += npc->jumpVelocity;
            if (npc->moveSpeed > 33.0f) {
                npc->moveSpeed = 33.0f;
            }

            npc->yaw += npc->moveSpeed;
            npc->pos.x = npc->moveToPos.x;
            npc->pos.z = npc->moveToPos.z;
            add_vec2D_polar(&npc->pos.x, &npc->pos.z, npc->planarFlyDist, npc->yaw);
            if ((npc->duration % 14) == 0) {
                fx_sparkles(0, npc->pos.x, npc->pos.y, npc->pos.z, 30.0f);
            }

            npc->duration++;
            if (npc->duration > 40) {
                npc->jumpScale = 0.5f;
            }
            if (npc->pos.y > 200.0f) {
                script->functionTemp[0] = 2;
            }
            break;
        case 2:
            return ApiStatus_DONE2;
    }

    return ApiStatus_BLOCK;
}