### RAW ASSEMBLY INSTRUCTIONS:

glabel initialize_status_bar
/* 80DE4 800E7934 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 80DE8 800E7938 AFB10014 */  sw        $s1, 0x14($sp)
/* 80DEC 800E793C 3C118011 */  lui       $s1, %hi(gUIStatus)
/* 80DF0 800E7940 2631EF58 */  addiu     $s1, $s1, %lo(gUIStatus)
/* 80DF4 800E7944 2402000C */  addiu     $v0, $zero, 0xC
/* 80DF8 800E7948 AFBF001C */  sw        $ra, 0x1C($sp)
/* 80DFC 800E794C AFB20018 */  sw        $s2, 0x18($sp)
/* 80E00 800E7950 AFB00010 */  sw        $s0, 0x10($sp)
/* 80E04 800E7954 A6220034 */  sh        $v0, 0x34($s1)
/* 80E08 800E7958 2402FF9C */  addiu     $v0, $zero, -0x64
/* 80E0C 800E795C 3C038011 */  lui       $v1, %hi(gPlayerData)
/* 80E10 800E7960 2463F290 */  addiu     $v1, $v1, %lo(gPlayerData)
/* 80E14 800E7964 3C018011 */  lui       $at, %hi(D_8010CD10)
/* 80E18 800E7968 A420CD10 */  sh        $zero, %lo(D_8010CD10)($at)
/* 80E1C 800E796C 3C018011 */  lui       $at, %hi(D_8010CD12)
/* 80E20 800E7970 A420CD12 */  sh        $zero, %lo(D_8010CD12)($at)
/* 80E24 800E7974 A6220036 */  sh        $v0, 0x36($s1)
/* 80E28 800E7978 A220003A */  sb        $zero, 0x3A($s1)
/* 80E2C 800E797C 90640010 */  lbu       $a0, 0x10($v1)
/* 80E30 800E7980 240200D2 */  addiu     $v0, $zero, 0xD2
/* 80E34 800E7984 A6220038 */  sh        $v0, 0x38($s1)
/* 80E38 800E7988 A220003B */  sb        $zero, 0x3B($s1)
/* 80E3C 800E798C A2200044 */  sb        $zero, 0x44($s1)
/* 80E40 800E7990 A2200045 */  sb        $zero, 0x45($s1)
/* 80E44 800E7994 A2200046 */  sb        $zero, 0x46($s1)
/* 80E48 800E7998 A220004A */  sb        $zero, 0x4A($s1)
/* 80E4C 800E799C A220004B */  sb        $zero, 0x4B($s1)
/* 80E50 800E79A0 A220004C */  sb        $zero, 0x4C($s1)
/* 80E54 800E79A4 A220004D */  sb        $zero, 0x4D($s1)
/* 80E58 800E79A8 A220004E */  sb        $zero, 0x4E($s1)
/* 80E5C 800E79AC A220004F */  sb        $zero, 0x4F($s1)
/* 80E60 800E79B0 A2200050 */  sb        $zero, 0x50($s1)
/* 80E64 800E79B4 A2200051 */  sb        $zero, 0x51($s1)
/* 80E68 800E79B8 A2200054 */  sb        $zero, 0x54($s1)
/* 80E6C 800E79BC A2200055 */  sb        $zero, 0x55($s1)
/* 80E70 800E79C0 A2200056 */  sb        $zero, 0x56($s1)
/* 80E74 800E79C4 A2200047 */  sb        $zero, 0x47($s1)
/* 80E78 800E79C8 A2200052 */  sb        $zero, 0x52($s1)
/* 80E7C 800E79CC 90620002 */  lbu       $v0, 0x2($v1)
/* 80E80 800E79D0 90650005 */  lbu       $a1, 0x5($v1)
/* 80E84 800E79D4 9466000C */  lhu       $a2, 0xC($v1)
/* 80E88 800E79D8 94630290 */  lhu       $v1, 0x290($v1)
/* 80E8C 800E79DC 00042600 */  sll       $a0, $a0, 24
/* 80E90 800E79E0 00042603 */  sra       $a0, $a0, 24
/* 80E94 800E79E4 A222003D */  sb        $v0, 0x3D($s1)
/* 80E98 800E79E8 2402FFFF */  addiu     $v0, $zero, -0x1
/* 80E9C 800E79EC A225003E */  sb        $a1, 0x3E($s1)
/* 80EA0 800E79F0 A6260040 */  sh        $a2, 0x40($s1)
/* 80EA4 800E79F4 A6240042 */  sh        $a0, 0x42($s1)
/* 80EA8 800E79F8 A6230048 */  sh        $v1, 0x48($s1)
/* 80EAC 800E79FC A2200053 */  sb        $zero, 0x53($s1)
/* 80EB0 800E7A00 A222006E */  sb        $v0, 0x6E($s1)
/* 80EB4 800E7A04 2402FFFF */  addiu     $v0, $zero, -0x1
/* 80EB8 800E7A08 A220003C */  sb        $zero, 0x3C($s1)
/* 80EBC 800E7A0C A2200057 */  sb        $zero, 0x57($s1)
/* 80EC0 800E7A10 A2200058 */  sb        $zero, 0x58($s1)
/* 80EC4 800E7A14 A2200059 */  sb        $zero, 0x59($s1)
/* 80EC8 800E7A18 A220005A */  sb        $zero, 0x5A($s1)
/* 80ECC 800E7A1C A220006C */  sb        $zero, 0x6C($s1)
/* 80ED0 800E7A20 A220006D */  sb        $zero, 0x6D($s1)
/* 80ED4 800E7A24 0C03A5EE */  jal       close_status_bar
/* 80ED8 800E7A28 AE220064 */   sw       $v0, 0x64($s1)
/* 80EDC 800E7A2C 3C048011 */  lui       $a0, %hi(HES_StatusHP)
/* 80EE0 800E7A30 24848248 */  addiu     $a0, $a0, %lo(HES_StatusHP)
/* 80EE4 800E7A34 0C050529 */  jal       hud_element_create
/* 80EE8 800E7A38 00000000 */   nop
/* 80EEC 800E7A3C 0040802D */  daddu     $s0, $v0, $zero
/* 80EF0 800E7A40 0200202D */  daddu     $a0, $s0, $zero
/* 80EF4 800E7A44 24050080 */  addiu     $a1, $zero, 0x80
/* 80EF8 800E7A48 0C051280 */  jal       hud_element_set_flags
/* 80EFC 800E7A4C AE300000 */   sw       $s0, 0x0($s1)
/* 80F00 800E7A50 0200202D */  daddu     $a0, $s0, $zero
/* 80F04 800E7A54 0C05128B */  jal       hud_element_clear_flags
/* 80F08 800E7A58 34058000 */   ori      $a1, $zero, 0x8000
/* 80F0C 800E7A5C 3C048011 */  lui       $a0, %hi(HES_StatusHeart)
/* 80F10 800E7A60 24848518 */  addiu     $a0, $a0, %lo(HES_StatusHeart)
/* 80F14 800E7A64 0C050529 */  jal       hud_element_create
/* 80F18 800E7A68 00000000 */   nop
/* 80F1C 800E7A6C 0040802D */  daddu     $s0, $v0, $zero
/* 80F20 800E7A70 0200202D */  daddu     $a0, $s0, $zero
/* 80F24 800E7A74 24050080 */  addiu     $a1, $zero, 0x80
/* 80F28 800E7A78 0C051280 */  jal       hud_element_set_flags
/* 80F2C 800E7A7C AE300004 */   sw       $s0, 0x4($s1)
/* 80F30 800E7A80 0200202D */  daddu     $a0, $s0, $zero
/* 80F34 800E7A84 0C05128B */  jal       hud_element_clear_flags
/* 80F38 800E7A88 34058000 */   ori      $a1, $zero, 0x8000
/* 80F3C 800E7A8C 3C048011 */  lui       $a0, %hi(HES_StatusFP)
/* 80F40 800E7A90 24848270 */  addiu     $a0, $a0, %lo(HES_StatusFP)
/* 80F44 800E7A94 0C050529 */  jal       hud_element_create
/* 80F48 800E7A98 00000000 */   nop
/* 80F4C 800E7A9C 0040802D */  daddu     $s0, $v0, $zero
/* 80F50 800E7AA0 0200202D */  daddu     $a0, $s0, $zero
/* 80F54 800E7AA4 24050080 */  addiu     $a1, $zero, 0x80
/* 80F58 800E7AA8 0C051280 */  jal       hud_element_set_flags
/* 80F5C 800E7AAC AE300008 */   sw       $s0, 0x8($s1)
/* 80F60 800E7AB0 0200202D */  daddu     $a0, $s0, $zero
/* 80F64 800E7AB4 0C05128B */  jal       hud_element_clear_flags
/* 80F68 800E7AB8 34058000 */   ori      $a1, $zero, 0x8000
/* 80F6C 800E7ABC 3C048011 */  lui       $a0, %hi(HES_StatusFlower)
/* 80F70 800E7AC0 24848538 */  addiu     $a0, $a0, %lo(HES_StatusFlower)
/* 80F74 800E7AC4 0C050529 */  jal       hud_element_create
/* 80F78 800E7AC8 00000000 */   nop
/* 80F7C 800E7ACC 0040802D */  daddu     $s0, $v0, $zero
/* 80F80 800E7AD0 0200202D */  daddu     $a0, $s0, $zero
/* 80F84 800E7AD4 24050080 */  addiu     $a1, $zero, 0x80
/* 80F88 800E7AD8 0C051280 */  jal       hud_element_set_flags
/* 80F8C 800E7ADC AE30000C */   sw       $s0, 0xC($s1)
/* 80F90 800E7AE0 0200202D */  daddu     $a0, $s0, $zero
/* 80F94 800E7AE4 0C05128B */  jal       hud_element_clear_flags
/* 80F98 800E7AE8 34058000 */   ori      $a1, $zero, 0x8000
/* 80F9C 800E7AEC 3C048011 */  lui       $a0, %hi(HES_StatusCoin)
/* 80FA0 800E7AF0 24848558 */  addiu     $a0, $a0, %lo(HES_StatusCoin)
/* 80FA4 800E7AF4 0C050529 */  jal       hud_element_create
/* 80FA8 800E7AF8 00000000 */   nop
/* 80FAC 800E7AFC 0040802D */  daddu     $s0, $v0, $zero
/* 80FB0 800E7B00 0200202D */  daddu     $a0, $s0, $zero
/* 80FB4 800E7B04 24050080 */  addiu     $a1, $zero, 0x80
/* 80FB8 800E7B08 0C051280 */  jal       hud_element_set_flags
/* 80FBC 800E7B0C AE300010 */   sw       $s0, 0x10($s1)
/* 80FC0 800E7B10 0200202D */  daddu     $a0, $s0, $zero
/* 80FC4 800E7B14 0C05128B */  jal       hud_element_clear_flags
/* 80FC8 800E7B18 34058000 */   ori      $a1, $zero, 0x8000
/* 80FCC 800E7B1C 3C048008 */  lui       $a0, %hi(HES_Item_CoinSparkleRandom)
/* 80FD0 800E7B20 24840FC4 */  addiu     $a0, $a0, %lo(HES_Item_CoinSparkleRandom)
/* 80FD4 800E7B24 0C050529 */  jal       hud_element_create
/* 80FD8 800E7B28 00000000 */   nop
/* 80FDC 800E7B2C 0040802D */  daddu     $s0, $v0, $zero
/* 80FE0 800E7B30 0200202D */  daddu     $a0, $s0, $zero
/* 80FE4 800E7B34 24050080 */  addiu     $a1, $zero, 0x80
/* 80FE8 800E7B38 0C051280 */  jal       hud_element_set_flags
/* 80FEC 800E7B3C AE300014 */   sw       $s0, 0x14($s1)
/* 80FF0 800E7B40 0200202D */  daddu     $a0, $s0, $zero
/* 80FF4 800E7B44 0C05128B */  jal       hud_element_clear_flags
/* 80FF8 800E7B48 34058000 */   ori      $a1, $zero, 0x8000
/* 80FFC 800E7B4C 3C048011 */  lui       $a0, %hi(HES_StatusStarPoint)
/* 81000 800E7B50 248486AC */  addiu     $a0, $a0, %lo(HES_StatusStarPoint)
/* 81004 800E7B54 0C050529 */  jal       hud_element_create
/* 81008 800E7B58 00000000 */   nop
/* 8100C 800E7B5C 0040802D */  daddu     $s0, $v0, $zero
/* 81010 800E7B60 0200202D */  daddu     $a0, $s0, $zero
/* 81014 800E7B64 24050080 */  addiu     $a1, $zero, 0x80
/* 81018 800E7B68 0C051280 */  jal       hud_element_set_flags
/* 8101C 800E7B6C AE300018 */   sw       $s0, 0x18($s1)
/* 81020 800E7B70 0200202D */  daddu     $a0, $s0, $zero
/* 81024 800E7B74 0C05128B */  jal       hud_element_clear_flags
/* 81028 800E7B78 34058000 */   ori      $a1, $zero, 0x8000
/* 8102C 800E7B7C 3C048010 */  lui       $a0, %hi(HES_StatusSPShine)
/* 81030 800E7B80 24844BEC */  addiu     $a0, $a0, %lo(HES_StatusSPShine)
/* 81034 800E7B84 0C050529 */  jal       hud_element_create
/* 81038 800E7B88 00000000 */   nop
/* 8103C 800E7B8C 0040802D */  daddu     $s0, $v0, $zero
/* 81040 800E7B90 0200202D */  daddu     $a0, $s0, $zero
/* 81044 800E7B94 24050080 */  addiu     $a1, $zero, 0x80
/* 81048 800E7B98 0C051280 */  jal       hud_element_set_flags
/* 8104C 800E7B9C AE30001C */   sw       $s0, 0x1C($s1)
/* 81050 800E7BA0 0200202D */  daddu     $a0, $s0, $zero
/* 81054 800E7BA4 0C05128B */  jal       hud_element_clear_flags
/* 81058 800E7BA8 34058000 */   ori      $a1, $zero, 0x8000
/* 8105C 800E7BAC 3C128011 */  lui       $s2, %hi(HES_StatusTimes)
/* 81060 800E7BB0 26528068 */  addiu     $s2, $s2, %lo(HES_StatusTimes)
/* 81064 800E7BB4 0C050529 */  jal       hud_element_create
/* 81068 800E7BB8 0240202D */   daddu    $a0, $s2, $zero
/* 8106C 800E7BBC 0040802D */  daddu     $s0, $v0, $zero
/* 81070 800E7BC0 0200202D */  daddu     $a0, $s0, $zero
/* 81074 800E7BC4 24050082 */  addiu     $a1, $zero, 0x82
/* 81078 800E7BC8 0C051280 */  jal       hud_element_set_flags
/* 8107C 800E7BCC AE300020 */   sw       $s0, 0x20($s1)
/* 81080 800E7BD0 0200202D */  daddu     $a0, $s0, $zero
/* 81084 800E7BD4 0C05128B */  jal       hud_element_clear_flags
/* 81088 800E7BD8 34058000 */   ori      $a1, $zero, 0x8000
/* 8108C 800E7BDC 0C050529 */  jal       hud_element_create
/* 81090 800E7BE0 0240202D */   daddu    $a0, $s2, $zero
/* 81094 800E7BE4 0040802D */  daddu     $s0, $v0, $zero
/* 81098 800E7BE8 0200202D */  daddu     $a0, $s0, $zero
/* 8109C 800E7BEC 24050082 */  addiu     $a1, $zero, 0x82
/* 810A0 800E7BF0 0C051280 */  jal       hud_element_set_flags
/* 810A4 800E7BF4 AE300024 */   sw       $s0, 0x24($s1)
/* 810A8 800E7BF8 0200202D */  daddu     $a0, $s0, $zero
/* 810AC 800E7BFC 0C05128B */  jal       hud_element_clear_flags
/* 810B0 800E7C00 34058000 */   ori      $a1, $zero, 0x8000
/* 810B4 800E7C04 0C050529 */  jal       hud_element_create
/* 810B8 800E7C08 0240202D */   daddu    $a0, $s2, $zero
/* 810BC 800E7C0C 0040802D */  daddu     $s0, $v0, $zero
/* 810C0 800E7C10 0200202D */  daddu     $a0, $s0, $zero
/* 810C4 800E7C14 24050082 */  addiu     $a1, $zero, 0x82
/* 810C8 800E7C18 0C051280 */  jal       hud_element_set_flags
/* 810CC 800E7C1C AE300028 */   sw       $s0, 0x28($s1)
/* 810D0 800E7C20 0200202D */  daddu     $a0, $s0, $zero
/* 810D4 800E7C24 0C05128B */  jal       hud_element_clear_flags
/* 810D8 800E7C28 34058000 */   ori      $a1, $zero, 0x8000
/* 810DC 800E7C2C 0C050529 */  jal       hud_element_create
/* 810E0 800E7C30 0240202D */   daddu    $a0, $s2, $zero
/* 810E4 800E7C34 0040802D */  daddu     $s0, $v0, $zero
/* 810E8 800E7C38 0200202D */  daddu     $a0, $s0, $zero
/* 810EC 800E7C3C 24050082 */  addiu     $a1, $zero, 0x82
/* 810F0 800E7C40 0C051280 */  jal       hud_element_set_flags
/* 810F4 800E7C44 AE30002C */   sw       $s0, 0x2C($s1)
/* 810F8 800E7C48 0200202D */  daddu     $a0, $s0, $zero
/* 810FC 800E7C4C 0C05128B */  jal       hud_element_clear_flags
/* 81100 800E7C50 34058000 */   ori      $a1, $zero, 0x8000
/* 81104 800E7C54 3C048011 */  lui       $a0, %hi(HES_StatusStar1)
/* 81108 800E7C58 248483D8 */  addiu     $a0, $a0, %lo(HES_StatusStar1)
/* 8110C 800E7C5C 0C050529 */  jal       hud_element_create
/* 81110 800E7C60 00000000 */   nop
/* 81114 800E7C64 0040802D */  daddu     $s0, $v0, $zero
/* 81118 800E7C68 0200202D */  daddu     $a0, $s0, $zero
/* 8111C 800E7C6C 24050080 */  addiu     $a1, $zero, 0x80
/* 81120 800E7C70 0C051280 */  jal       hud_element_set_flags
/* 81124 800E7C74 AE300030 */   sw       $s0, 0x30($s1)
/* 81128 800E7C78 0200202D */  daddu     $a0, $s0, $zero
/* 8112C 800E7C7C 0C05128B */  jal       hud_element_clear_flags
/* 81130 800E7C80 34058000 */   ori      $a1, $zero, 0x8000
/* 81134 800E7C84 0C03C357 */  jal       func_800F0D5C
/* 81138 800E7C88 00000000 */   nop
/* 8113C 800E7C8C 8FBF001C */  lw        $ra, 0x1C($sp)
/* 81140 800E7C90 8FB20018 */  lw        $s2, 0x18($sp)
/* 81144 800E7C94 8FB10014 */  lw        $s1, 0x14($sp)
/* 81148 800E7C98 8FB00010 */  lw        $s0, 0x10($sp)
/* 8114C 800E7C9C 03E00008 */  jr        $ra
/* 81150 800E7CA0 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void initialize_status_bar(void) {
    UiStatus* uiStatus = &gUIStatus;
    PlayerData* playerData = &gPlayerData;
    s32 iconIndex;
    s32 newVar;

    uiStatus->drawPosX = 12;
    D_8010CD10 = 0;
    D_8010CD12 = 0;
    uiStatus->drawPosY = -100;
    uiStatus->hidden = FALSE;
    uiStatus->showTimer = 210;
    uiStatus->unk_3B[0] = 0;
    uiStatus->ignoreChanges = FALSE;
    uiStatus->unk_45[0] = 0;
    uiStatus->unk_45[1] = 0;
    uiStatus->hpBlinking = 0;
    uiStatus->hpBlinkCounter = 0;
    uiStatus->hpBlinkTimer = 0;
    uiStatus->fpBlinking = 0;
    uiStatus->fpBlinkCounter = 0;
    uiStatus->fpBlinkTimer = 0;
    uiStatus->spBlinking = 0;
    uiStatus->spBlinkCounter = 0;
    uiStatus->coinsBlinking = 0;
    uiStatus->coinsBlinkCounter = 0;
    uiStatus->coinsBlinkTimer = 0;
    uiStatus->disabled = 0;
    uiStatus->starpointsBlinking = 0;
    uiStatus->displayHP = playerData->curHP;
    uiStatus->displayFP = playerData->curFP;
    uiStatus->displayCoins = playerData->coins;
    uiStatus->displayStarpoints = playerData->starPoints;
    uiStatus->displaySP = playerData->specialBarsFilled;
    uiStatus->starpointsBlinkCounter = 0;
    uiStatus->unk_6C[2] = -1;
    uiStatus->unk_3B[1] = 0;
    uiStatus->unk_57 = 0;
    uiStatus->unk_58 = 0;
    uiStatus->unk_59 = 0;
    uiStatus->spBarsToBlink = 0;
    uiStatus->unk_6C[0] = 0;
    uiStatus->unk_6C[1] = 0;
    uiStatus->iconIndex12 = -1;

    close_status_bar();

    iconIndex = hud_element_create(&HES_StatusHP);
    uiStatus->hpIconIndices[0] = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusHeart);
    uiStatus->hpIconIndices[1] = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusFP);
    uiStatus->fpIconIndices[0] = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusFlower);
    uiStatus->fpIconIndices[1] = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusCoin);
    uiStatus->coinIconIndex = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_Item_CoinSparkleRandom);
    uiStatus->coinSparkleIconIndex = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusStarPoint);
    uiStatus->starpointsIconIndex = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusSPShine);
    uiStatus->starpointsShineIconIndex = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    newVar = hud_element_create(&HES_StatusTimes);
    iconIndex = newVar;
    uiStatus->iconIndex8 = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusTimes);
    uiStatus->iconIndex9 = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusTimes);
    uiStatus->iconIndexA = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusTimes);
    uiStatus->iconIndexB = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80 | HUD_ELEMENT_FLAG_DISABLED);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    iconIndex = hud_element_create(&HES_StatusStar1);
    uiStatus->starIconIndex = iconIndex;
    hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAG_80);
    hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAG_FILTER_TEX);

    func_800F0D5C();
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel shockwave_update
/* 3587F0 E004A330 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 3587F4 E004A334 AFB40020 */  sw        $s4, 0x20($sp)
/* 3587F8 E004A338 0080A02D */  daddu     $s4, $a0, $zero
/* 3587FC E004A33C AFBF0028 */  sw        $ra, 0x28($sp)
/* 358800 E004A340 AFB50024 */  sw        $s5, 0x24($sp)
/* 358804 E004A344 AFB3001C */  sw        $s3, 0x1C($sp)
/* 358808 E004A348 AFB20018 */  sw        $s2, 0x18($sp)
/* 35880C E004A34C AFB10014 */  sw        $s1, 0x14($sp)
/* 358810 E004A350 AFB00010 */  sw        $s0, 0x10($sp)
/* 358814 E004A354 F7BC0050 */  sdc1      $f28, 0x50($sp)
/* 358818 E004A358 F7BA0048 */  sdc1      $f26, 0x48($sp)
/* 35881C E004A35C F7B80040 */  sdc1      $f24, 0x40($sp)
/* 358820 E004A360 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 358824 E004A364 F7B40030 */  sdc1      $f20, 0x30($sp)
/* 358828 E004A368 8E84000C */  lw        $a0, 0xC($s4)
/* 35882C E004A36C 8C82002C */  lw        $v0, 0x2C($a0)
/* 358830 E004A370 8C830028 */  lw        $v1, 0x28($a0)
/* 358834 E004A374 24420001 */  addiu     $v0, $v0, 0x1
/* 358838 E004A378 2463FFFF */  addiu     $v1, $v1, -0x1
/* 35883C E004A37C AC82002C */  sw        $v0, 0x2C($a0)
/* 358840 E004A380 04610005 */  bgez      $v1, .LE004A398
/* 358844 E004A384 AC830028 */   sw       $v1, 0x28($a0)
/* 358848 E004A388 0C080128 */  jal       shim_remove_effect
/* 35884C E004A38C 0280202D */   daddu    $a0, $s4, $zero
/* 358850 E004A390 080129C4 */  j         .LE004A710
/* 358854 E004A394 00000000 */   nop
.LE004A398:
/* 358858 E004A398 94920000 */  lhu       $s2, 0x0($a0)
/* 35885C E004A39C 8C83002C */  lw        $v1, 0x2C($a0)
/* 358860 E004A3A0 2A420002 */  slti      $v0, $s2, 0x2
/* 358864 E004A3A4 10400008 */  beqz      $v0, .LE004A3C8
/* 358868 E004A3A8 28620008 */   slti     $v0, $v1, 0x8
/* 35886C E004A3AC 06400006 */  bltz      $s2, .LE004A3C8
/* 358870 E004A3B0 00000000 */   nop
/* 358874 E004A3B4 1440000E */  bnez      $v0, .LE004A3F0
/* 358878 E004A3B8 00000000 */   nop
/* 35887C E004A3BC 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358880 E004A3C0 080128F6 */  j         .LE004A3D8
/* 358884 E004A3C4 D422AE98 */   ldc1     $f2, -0x5168($at)
.LE004A3C8:
/* 358888 E004A3C8 14400009 */  bnez      $v0, .LE004A3F0
/* 35888C E004A3CC 00000000 */   nop
/* 358890 E004A3D0 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358894 E004A3D4 D422AEA0 */  ldc1      $f2, -0x5160($at)
.LE004A3D8:
/* 358898 E004A3D8 C4800038 */  lwc1      $f0, 0x38($a0)
/* 35889C E004A3DC 46800021 */  cvt.d.w   $f0, $f0
/* 3588A0 E004A3E0 46220002 */  mul.d     $f0, $f0, $f2
/* 3588A4 E004A3E4 00000000 */  nop
/* 3588A8 E004A3E8 4620018D */  trunc.w.d $f6, $f0
/* 3588AC E004A3EC E4860038 */  swc1      $f6, 0x38($a0)
.LE004A3F0:
/* 3588B0 E004A3F0 8E820008 */  lw        $v0, 0x8($s4)
/* 3588B4 E004A3F4 24110001 */  addiu     $s1, $zero, 0x1
/* 3588B8 E004A3F8 0222102A */  slt       $v0, $s1, $v0
/* 3588BC E004A3FC 104000C4 */  beqz      $v0, .LE004A710
/* 3588C0 E004A400 24840058 */   addiu    $a0, $a0, 0x58
/* 3588C4 E004A404 3C03E005 */  lui       $v1, %hi(jtbl_E004AEB0)
/* 3588C8 E004A408 2463AEB0 */  addiu     $v1, $v1, %lo(jtbl_E004AEB0)
/* 3588CC E004A40C 00121080 */  sll       $v0, $s2, 2
/* 3588D0 E004A410 0043A821 */  addu      $s5, $v0, $v1
/* 3588D4 E004A414 2490003C */  addiu     $s0, $a0, 0x3C
/* 3588D8 E004A418 24130004 */  addiu     $s3, $zero, 0x4
/* 3588DC E004A41C 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 3588E0 E004A420 4481A800 */  mtc1      $at, $f21
/* 3588E4 E004A424 4480A000 */  mtc1      $zero, $f20
/* 3588E8 E004A428 3C014200 */  lui       $at, (0x42000000 >> 16)
/* 3588EC E004A42C 4481C000 */  mtc1      $at, $f24
/* 3588F0 E004A430 3C014180 */  lui       $at, (0x41800000 >> 16)
/* 3588F4 E004A434 4481B000 */  mtc1      $at, $f22
/* 3588F8 E004A438 3C013FE8 */  lui       $at, (0x3FE80000 >> 16)
/* 3588FC E004A43C 4481E800 */  mtc1      $at, $f29
/* 358900 E004A440 4480E000 */  mtc1      $zero, $f28
/* 358904 E004A444 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358908 E004A448 D43AAEA8 */  ldc1      $f26, -0x5158($at)
.LE004A44C:
/* 35890C E004A44C 8E020010 */  lw        $v0, 0x10($s0)
/* 358910 E004A450 24420001 */  addiu     $v0, $v0, 0x1
/* 358914 E004A454 044000A8 */  bltz      $v0, .LE004A6F8
/* 358918 E004A458 AE020010 */   sw       $v0, 0x10($s0)
/* 35891C E004A45C 14400060 */  bnez      $v0, .LE004A5E0
/* 358920 E004A460 00000000 */   nop
/* 358924 E004A464 C60CFFF8 */  lwc1      $f12, -0x8($s0)
/* 358928 E004A468 AE00FFC8 */  sw        $zero, -0x38($s0)
/* 35892C E004A46C AE00FFCC */  sw        $zero, -0x34($s0)
/* 358930 E004A470 0C080140 */  jal       shim_sin_deg
/* 358934 E004A474 AE00FFD0 */   sw       $zero, -0x30($s0)
/* 358938 E004A478 46000007 */  neg.s     $f0, $f0
/* 35893C E004A47C 46000021 */  cvt.d.s   $f0, $f0
/* 358940 E004A480 46340002 */  mul.d     $f0, $f0, $f20
/* 358944 E004A484 00000000 */  nop
/* 358948 E004A488 C60CFFF8 */  lwc1      $f12, -0x8($s0)
/* 35894C E004A48C 46200020 */  cvt.s.d   $f0, $f0
/* 358950 E004A490 0C080144 */  jal       shim_cos_deg
/* 358954 E004A494 E600FFD4 */   swc1     $f0, -0x2C($s0)
/* 358958 E004A498 46000021 */  cvt.d.s   $f0, $f0
/* 35895C E004A49C 46340002 */  mul.d     $f0, $f0, $f20
/* 358960 E004A4A0 00000000 */  nop
/* 358964 E004A4A4 44911000 */  mtc1      $s1, $f2
/* 358968 E004A4A8 00000000 */  nop
/* 35896C E004A4AC 468010A0 */  cvt.s.w   $f2, $f2
/* 358970 E004A4B0 460010A1 */  cvt.d.s   $f2, $f2
/* 358974 E004A4B4 3C014020 */  lui       $at, (0x40200000 >> 16)
/* 358978 E004A4B8 44812800 */  mtc1      $at, $f5
/* 35897C E004A4BC 44802000 */  mtc1      $zero, $f4
/* 358980 E004A4C0 2E420006 */  sltiu     $v0, $s2, 0x6
/* 358984 E004A4C4 AE00FFDC */  sw        $zero, -0x24($s0)
/* 358988 E004A4C8 E6180000 */  swc1      $f24, 0x0($s0)
/* 35898C E004A4CC 46222101 */  sub.d     $f4, $f4, $f2
/* 358990 E004A4D0 E6180004 */  swc1      $f24, 0x4($s0)
/* 358994 E004A4D4 E618000C */  swc1      $f24, 0xC($s0)
/* 358998 E004A4D8 46202120 */  cvt.s.d   $f4, $f4
/* 35899C E004A4DC E604FFE4 */  swc1      $f4, -0x1C($s0)
/* 3589A0 E004A4E0 46200020 */  cvt.s.d   $f0, $f0
/* 3589A4 E004A4E4 10400027 */  beqz      $v0, .LE004A584
/* 3589A8 E004A4E8 E600FFD8 */   swc1     $f0, -0x28($s0)
/* 3589AC E004A4EC 8EA20000 */  lw        $v0, 0x0($s5)
/* 3589B0 E004A4F0 00400008 */  jr        $v0
/* 3589B4 E004A4F4 00000000 */   nop
glabel .LE004A4F8
/* 3589B8 E004A4F8 44910000 */  mtc1      $s1, $f0
/* 3589BC E004A4FC 00000000 */  nop
/* 3589C0 E004A500 46800021 */  cvt.d.w   $f0, $f0
/* 3589C4 E004A504 46340000 */  add.d     $f0, $f0, $f20
/* 3589C8 E004A508 46340082 */  mul.d     $f2, $f0, $f20
/* 3589CC E004A50C 00000000 */  nop
/* 3589D0 E004A510 46200020 */  cvt.s.d   $f0, $f0
/* 3589D4 E004A514 08012975 */  j         .LE004A5D4
/* 3589D8 E004A518 E600FFE0 */   swc1     $f0, -0x20($s0)
glabel .LE004A51C
/* 3589DC E004A51C 26220002 */  addiu     $v0, $s1, 0x2
/* 3589E0 E004A520 44820000 */  mtc1      $v0, $f0
/* 3589E4 E004A524 00000000 */  nop
/* 3589E8 E004A528 46800021 */  cvt.d.w   $f0, $f0
/* 3589EC E004A52C 46340002 */  mul.d     $f0, $f0, $f20
/* 3589F0 E004A530 00000000 */  nop
/* 3589F4 E004A534 44821000 */  mtc1      $v0, $f2
/* 3589F8 E004A538 00000000 */  nop
/* 3589FC E004A53C 468010A0 */  cvt.s.w   $f2, $f2
/* 358A00 E004A540 0801295E */  j         .LE004A578
/* 358A04 E004A544 E602FFE0 */   swc1     $f2, -0x20($s0)
glabel .LE004A548
/* 358A08 E004A548 44930000 */  mtc1      $s3, $f0
/* 358A0C E004A54C 00000000 */  nop
/* 358A10 E004A550 46800021 */  cvt.d.w   $f0, $f0
/* 358A14 E004A554 46340002 */  mul.d     $f0, $f0, $f20
/* 358A18 E004A558 00000000 */  nop
/* 358A1C E004A55C 44931000 */  mtc1      $s3, $f2
/* 358A20 E004A560 00000000 */  nop
/* 358A24 E004A564 468010A0 */  cvt.s.w   $f2, $f2
/* 358A28 E004A568 E602FFE0 */  swc1      $f2, -0x20($s0)
/* 358A2C E004A56C E6160000 */  swc1      $f22, 0x0($s0)
/* 358A30 E004A570 E6160004 */  swc1      $f22, 0x4($s0)
/* 358A34 E004A574 E616000C */  swc1      $f22, 0xC($s0)
.LE004A578:
/* 358A38 E004A578 46200020 */  cvt.s.d   $f0, $f0
/* 358A3C E004A57C 08012977 */  j         .LE004A5DC
/* 358A40 E004A580 E600FFE8 */   swc1     $f0, -0x18($s0)
glabel .LE004A584
/* 358A44 E004A584 44932000 */  mtc1      $s3, $f4
/* 358A48 E004A588 00000000 */  nop
/* 358A4C E004A58C 46802121 */  cvt.d.w   $f4, $f4
/* 358A50 E004A590 46342102 */  mul.d     $f4, $f4, $f20
/* 358A54 E004A594 00000000 */  nop
/* 358A58 E004A598 C600FFE4 */  lwc1      $f0, -0x1C($s0)
/* 358A5C E004A59C 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358A60 E004A5A0 D422AEC8 */  ldc1      $f2, -0x5138($at)
/* 358A64 E004A5A4 46000021 */  cvt.d.s   $f0, $f0
/* 358A68 E004A5A8 46220002 */  mul.d     $f0, $f0, $f2
/* 358A6C E004A5AC 00000000 */  nop
/* 358A70 E004A5B0 46342082 */  mul.d     $f2, $f4, $f20
/* 358A74 E004A5B4 00000000 */  nop
/* 358A78 E004A5B8 E6160000 */  swc1      $f22, 0x0($s0)
/* 358A7C E004A5BC E6160004 */  swc1      $f22, 0x4($s0)
/* 358A80 E004A5C0 E616000C */  swc1      $f22, 0xC($s0)
/* 358A84 E004A5C4 46202120 */  cvt.s.d   $f4, $f4
/* 358A88 E004A5C8 E604FFE0 */  swc1      $f4, -0x20($s0)
/* 358A8C E004A5CC 46200020 */  cvt.s.d   $f0, $f0
/* 358A90 E004A5D0 E600FFE4 */  swc1      $f0, -0x1C($s0)
.LE004A5D4:
/* 358A94 E004A5D4 462010A0 */  cvt.s.d   $f2, $f2
/* 358A98 E004A5D8 E602FFE8 */  swc1      $f2, -0x18($s0)
.LE004A5DC:
/* 358A9C E004A5DC E6180008 */  swc1      $f24, 0x8($s0)
.LE004A5E0:
/* 358AA0 E004A5E0 C6040000 */  lwc1      $f4, 0x0($s0)
/* 358AA4 E004A5E4 C6000004 */  lwc1      $f0, 0x4($s0)
/* 358AA8 E004A5E8 C6020008 */  lwc1      $f2, 0x8($s0)
/* 358AAC E004A5EC 46002100 */  add.s     $f4, $f4, $f0
/* 358AB0 E004A5F0 C600000C */  lwc1      $f0, 0xC($s0)
/* 358AB4 E004A5F4 46001080 */  add.s     $f2, $f2, $f0
/* 358AB8 E004A5F8 24020002 */  addiu     $v0, $zero, 0x2
/* 358ABC E004A5FC E6040000 */  swc1      $f4, 0x0($s0)
/* 358AC0 E004A600 12420013 */  beq       $s2, $v0, .LE004A650
/* 358AC4 E004A604 E6020008 */   swc1     $f2, 0x8($s0)
/* 358AC8 E004A608 2A420003 */  slti      $v0, $s2, 0x3
/* 358ACC E004A60C 14400005 */  bnez      $v0, .LE004A624
/* 358AD0 E004A610 24020005 */   addiu    $v0, $zero, 0x5
/* 358AD4 E004A614 1242000E */  beq       $s2, $v0, .LE004A650
/* 358AD8 E004A618 00000000 */   nop
/* 358ADC E004A61C 0801299D */  j         .LE004A674
/* 358AE0 E004A620 00000000 */   nop
.LE004A624:
/* 358AE4 E004A624 06400013 */  bltz      $s2, .LE004A674
/* 358AE8 E004A628 00000000 */   nop
/* 358AEC E004A62C C6000004 */  lwc1      $f0, 0x4($s0)
/* 358AF0 E004A630 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358AF4 E004A634 D422AED0 */  ldc1      $f2, -0x5130($at)
/* 358AF8 E004A638 46000021 */  cvt.d.s   $f0, $f0
/* 358AFC E004A63C 46220002 */  mul.d     $f0, $f0, $f2
/* 358B00 E004A640 00000000 */  nop
/* 358B04 E004A644 46200020 */  cvt.s.d   $f0, $f0
/* 358B08 E004A648 080129AB */  j         .LE004A6AC
/* 358B0C E004A64C E6000004 */   swc1     $f0, 0x4($s0)
.LE004A650:
/* 358B10 E004A650 C6000004 */  lwc1      $f0, 0x4($s0)
/* 358B14 E004A654 46000021 */  cvt.d.s   $f0, $f0
/* 358B18 E004A658 463C0002 */  mul.d     $f0, $f0, $f28
/* 358B1C E004A65C 00000000 */  nop
/* 358B20 E004A660 C602000C */  lwc1      $f2, 0xC($s0)
/* 358B24 E004A664 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358B28 E004A668 D424AED8 */  ldc1      $f4, -0x5128($at)
/* 358B2C E004A66C 080129A5 */  j         .LE004A694
/* 358B30 E004A670 460010A1 */   cvt.d.s  $f2, $f2
.LE004A674:
/* 358B34 E004A674 C6000004 */  lwc1      $f0, 0x4($s0)
/* 358B38 E004A678 46000021 */  cvt.d.s   $f0, $f0
/* 358B3C E004A67C 463C0002 */  mul.d     $f0, $f0, $f28
/* 358B40 E004A680 00000000 */  nop
/* 358B44 E004A684 C602000C */  lwc1      $f2, 0xC($s0)
/* 358B48 E004A688 3C01E005 */  lui       $at, (0xE0050000 >> 16)
/* 358B4C E004A68C D424AEE0 */  ldc1      $f4, -0x5120($at)
/* 358B50 E004A690 460010A1 */  cvt.d.s   $f2, $f2
.LE004A694:
/* 358B54 E004A694 46241082 */  mul.d     $f2, $f2, $f4
/* 358B58 E004A698 00000000 */  nop
/* 358B5C E004A69C 46200020 */  cvt.s.d   $f0, $f0
/* 358B60 E004A6A0 462010A0 */  cvt.s.d   $f2, $f2
/* 358B64 E004A6A4 E6000004 */  swc1      $f0, 0x4($s0)
/* 358B68 E004A6A8 E602000C */  swc1      $f2, 0xC($s0)
.LE004A6AC:
/* 358B6C E004A6AC C600FFE0 */  lwc1      $f0, -0x20($s0)
/* 358B70 E004A6B0 46000021 */  cvt.d.s   $f0, $f0
/* 358B74 E004A6B4 463A0002 */  mul.d     $f0, $f0, $f26
/* 358B78 E004A6B8 00000000 */  nop
/* 358B7C E004A6BC C602FFE8 */  lwc1      $f2, -0x18($s0)
/* 358B80 E004A6C0 460010A1 */  cvt.d.s   $f2, $f2
/* 358B84 E004A6C4 463A1082 */  mul.d     $f2, $f2, $f26
/* 358B88 E004A6C8 00000000 */  nop
/* 358B8C E004A6CC 3C014300 */  lui       $at, (0x43000000 >> 16)
/* 358B90 E004A6D0 44812000 */  mtc1      $at, $f4
/* 358B94 E004A6D4 46200020 */  cvt.s.d   $f0, $f0
/* 358B98 E004A6D8 E600FFE0 */  swc1      $f0, -0x20($s0)
/* 358B9C E004A6DC C6000000 */  lwc1      $f0, 0x0($s0)
/* 358BA0 E004A6E0 462010A0 */  cvt.s.d   $f2, $f2
/* 358BA4 E004A6E4 4600203C */  c.lt.s    $f4, $f0
/* 358BA8 E004A6E8 00000000 */  nop
/* 358BAC E004A6EC 45000002 */  bc1f      .LE004A6F8
/* 358BB0 E004A6F0 E602FFE8 */   swc1     $f2, -0x18($s0)
/* 358BB4 E004A6F4 E6040000 */  swc1      $f4, 0x0($s0)
.LE004A6F8:
/* 358BB8 E004A6F8 26730001 */  addiu     $s3, $s3, 0x1
/* 358BBC E004A6FC 26310001 */  addiu     $s1, $s1, 0x1
/* 358BC0 E004A700 8E820008 */  lw        $v0, 0x8($s4)
/* 358BC4 E004A704 0222102A */  slt       $v0, $s1, $v0
/* 358BC8 E004A708 1440FF50 */  bnez      $v0, .LE004A44C
/* 358BCC E004A70C 26100058 */   addiu    $s0, $s0, 0x58
.LE004A710:
/* 358BD0 E004A710 8FBF0028 */  lw        $ra, 0x28($sp)
/* 358BD4 E004A714 8FB50024 */  lw        $s5, 0x24($sp)
/* 358BD8 E004A718 8FB40020 */  lw        $s4, 0x20($sp)
/* 358BDC E004A71C 8FB3001C */  lw        $s3, 0x1C($sp)
/* 358BE0 E004A720 8FB20018 */  lw        $s2, 0x18($sp)
/* 358BE4 E004A724 8FB10014 */  lw        $s1, 0x14($sp)
/* 358BE8 E004A728 8FB00010 */  lw        $s0, 0x10($sp)
/* 358BEC E004A72C D7BC0050 */  ldc1      $f28, 0x50($sp)
/* 358BF0 E004A730 D7BA0048 */  ldc1      $f26, 0x48($sp)
/* 358BF4 E004A734 D7B80040 */  ldc1      $f24, 0x40($sp)
/* 358BF8 E004A738 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 358BFC E004A73C D7B40030 */  ldc1      $f20, 0x30($sp)
/* 358C00 E004A740 03E00008 */  jr        $ra
/* 358C04 E004A744 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void shockwave_update(EffectInstance* effect) {
    ShockwaveFXData* part = effect->data.shockwave;
    s32 unk_00;
    s32 unk_2C;
    s32 i;

    part->unk_2C++;
    part->unk_28--;

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

    unk_00 = part->unk_00;
    unk_2C = part->unk_2C;

    switch (unk_00) {
        case 0:
        case 1:
            if (unk_2C >= 8) {
                part->alpha *= 0.8;
            }
            break;
        default:
            if (unk_2C >= 8) {
                part->alpha *= 0.94;
            }
            break;
    }

    part++;
    for (i = 1; i < effect->numParts; i++, part++) {
        part->unk_4C++;
        if (part->unk_4C >= 0) {
            if (part->unk_4C == 0) {
                part->pos.x = 0.0f;
                part->pos.y = 0.0f;
                part->pos.z = 0.0f;
                part->unk_10 = -shim_sin_deg(part->unk_34) * 0.5;
                part->unk_14 = shim_cos_deg(part->unk_34) * 0.5;
                part->unk_18 = 0;
                part->unk_3C = 32.0f;
                part->unk_40 = 32.0f;
                part->unk_48 = 32.0f;
                part->unk_20 = 8.0 - (f32) i;

                switch (unk_00) {
                    case 0:
                    case 1:
                        part->unk_1C = i + 0.5;
                        part->unk_24 = (i + 0.5) * 0.5;
                        break;
                    case 2:
                    case 5:
                        part->unk_1C = i + 2;
                        part->unk_24 = (i + 2) * 0.5;
                        break;
                    case 3:
                        part->unk_1C = i + 3;
                        part->unk_24 = (i + 3) * 0.5;
                        part->unk_3C = 16.0f;
                        part->unk_40 = 16.0f;
                        part->unk_48 = 16.0f;
                        break;
                    case 4:
                    default:
                        part->unk_1C = (i + 3) * 0.5;
                        part->unk_24 = (i + 3) * 0.5 * 0.5;
                        part->unk_3C = 16.0f;
                        part->unk_40 = 16.0f;
                        part->unk_48 = 16.0f;
                        part->unk_20 *= 0.8;
                        break;
                }

                part->unk_44 = 32.0f;
            }

            part->unk_3C += part->unk_40;
            part->unk_44 += part->unk_48;

            switch (unk_00) {
                case 0:
                case 1:
                    part->unk_40 *= 0.9;
                    break;
                case 2:
                case 5:
                    part->unk_40 *= 0.75;
                    part->unk_48 *= 0.99;
                    break;
                default:
                    part->unk_40 *= 0.75;
                    part->unk_48 *= 0.95;
                    break;
            }

            part->unk_1C *= 1.002;
            part->unk_24 *= 1.002;
            if (part->unk_3C > 128.0f) {
                part->unk_3C = 128.0f;
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel stars_shimmer_main
/* 354F60 E0044000 27BDFF80 */  addiu     $sp, $sp, -0x80
/* 354F64 E0044004 F7B40050 */  sdc1      $f20, 0x50($sp)
/* 354F68 E0044008 4485A000 */  mtc1      $a1, $f20
/* 354F6C E004400C F7B60058 */  sdc1      $f22, 0x58($sp)
/* 354F70 E0044010 4486B000 */  mtc1      $a2, $f22
/* 354F74 E0044014 AFB3003C */  sw        $s3, 0x3C($sp)
/* 354F78 E0044018 0080982D */  daddu     $s3, $a0, $zero
/* 354F7C E004401C F7B80060 */  sdc1      $f24, 0x60($sp)
/* 354F80 E0044020 4487C000 */  mtc1      $a3, $f24
/* 354F84 E0044024 27A40010 */  addiu     $a0, $sp, 0x10
/* 354F88 E0044028 AFB20038 */  sw        $s2, 0x38($sp)
/* 354F8C E004402C 8FB20098 */  lw        $s2, 0x98($sp)
/* 354F90 E0044030 3C02E004 */  lui       $v0, %hi(stars_shimmer_init)
/* 354F94 E0044034 2442441C */  addiu     $v0, $v0, %lo(stars_shimmer_init)
/* 354F98 E0044038 AFA20018 */  sw        $v0, 0x18($sp)
/* 354F9C E004403C 3C02E004 */  lui       $v0, %hi(stars_shimmer_update)
/* 354FA0 E0044040 24424424 */  addiu     $v0, $v0, %lo(stars_shimmer_update)
/* 354FA4 E0044044 AFA2001C */  sw        $v0, 0x1C($sp)
/* 354FA8 E0044048 3C02E004 */  lui       $v0, %hi(stars_shimmer_render)
/* 354FAC E004404C 244248E4 */  addiu     $v0, $v0, %lo(stars_shimmer_render)
/* 354FB0 E0044050 AFA20020 */  sw        $v0, 0x20($sp)
/* 354FB4 E0044054 24020022 */  addiu     $v0, $zero, 0x22
/* 354FB8 E0044058 AFBF0048 */  sw        $ra, 0x48($sp)
/* 354FBC E004405C AFB50044 */  sw        $s5, 0x44($sp)
/* 354FC0 E0044060 AFB40040 */  sw        $s4, 0x40($sp)
/* 354FC4 E0044064 AFB10034 */  sw        $s1, 0x34($sp)
/* 354FC8 E0044068 AFB00030 */  sw        $s0, 0x30($sp)
/* 354FCC E004406C F7BE0078 */  sdc1      $f30, 0x78($sp)
/* 354FD0 E0044070 F7BC0070 */  sdc1      $f28, 0x70($sp)
/* 354FD4 E0044074 F7BA0068 */  sdc1      $f26, 0x68($sp)
/* 354FD8 E0044078 AFA00010 */  sw        $zero, 0x10($sp)
/* 354FDC E004407C AFA00024 */  sw        $zero, 0x24($sp)
/* 354FE0 E0044080 AFA20014 */  sw        $v0, 0x14($sp)
/* 354FE4 E0044084 0C080124 */  jal       shim_create_effect_instance
/* 354FE8 E0044088 26520001 */   addiu    $s2, $s2, 0x1
/* 354FEC E004408C 00122040 */  sll       $a0, $s2, 1
/* 354FF0 E0044090 00922021 */  addu      $a0, $a0, $s2
/* 354FF4 E0044094 00042080 */  sll       $a0, $a0, 2
/* 354FF8 E0044098 00922023 */  subu      $a0, $a0, $s2
/* 354FFC E004409C 00042080 */  sll       $a0, $a0, 2
/* 355000 E00440A0 0040802D */  daddu     $s0, $v0, $zero
/* 355004 E00440A4 0C08012C */  jal       shim_general_heap_malloc
/* 355008 E00440A8 AE120008 */   sw       $s2, 0x8($s0)
/* 35500C E00440AC 0040182D */  daddu     $v1, $v0, $zero
/* 355010 E00440B0 14600003 */  bnez      $v1, .LE00440C0
/* 355014 E00440B4 AE03000C */   sw       $v1, 0xC($s0)
.LE00440B8:
/* 355018 E00440B8 0801102E */  j         .LE00440B8
/* 35501C E00440BC 00000000 */   nop
.LE00440C0:
/* 355020 E00440C0 24020006 */  addiu     $v0, $zero, 0x6
/* 355024 E00440C4 56620004 */  bnel      $s3, $v0, .LE00440D8
/* 355028 E00440C8 A4600000 */   sh       $zero, 0x0($v1)
/* 35502C E00440CC 24020001 */  addiu     $v0, $zero, 0x1
/* 355030 E00440D0 A4620000 */  sh        $v0, 0x0($v1)
/* 355034 E00440D4 24130003 */  addiu     $s3, $zero, 0x3
.LE00440D8:
/* 355038 E00440D8 E4740004 */  swc1      $f20, 0x4($v1)
/* 35503C E00440DC E4760008 */  swc1      $f22, 0x8($v1)
/* 355040 E00440E0 E478000C */  swc1      $f24, 0xC($v1)
/* 355044 E00440E4 AC600020 */  sw        $zero, 0x20($v1)
/* 355048 E00440E8 A4730002 */  sh        $s3, 0x2($v1)
/* 35504C E00440EC 8FA2009C */  lw        $v0, 0x9C($sp)
/* 355050 E00440F0 24110001 */  addiu     $s1, $zero, 0x1
/* 355054 E00440F4 AC620024 */  sw        $v0, 0x24($v1)
/* 355058 E00440F8 0232102A */  slt       $v0, $s1, $s2
/* 35505C E00440FC 104000B8 */  beqz      $v0, .LE00443E0
/* 355060 E0044100 2463002C */   addiu    $v1, $v1, 0x2C
/* 355064 E0044104 3C15E004 */  lui       $s5, %hi(jtbl_E0044E40)
/* 355068 E0044108 26B54E40 */  addiu     $s5, $s5, %lo(jtbl_E0044E40)
/* 35506C E004410C 24700018 */  addiu     $s0, $v1, 0x18
/* 355070 E0044110 2654FFFF */  addiu     $s4, $s2, -0x1
/* 355074 E0044114 44940000 */  mtc1      $s4, $f0
/* 355078 E0044118 00000000 */  nop
/* 35507C E004411C 46800020 */  cvt.s.w   $f0, $f0
/* 355080 E0044120 4480D000 */  mtc1      $zero, $f26
/* 355084 E0044124 3C01E004 */  lui       $at, (0xE0044E20 >> 16)
/* 355088 E0044128 D43E4E20 */  ldc1      $f30, (0xE0044E20 & 0xFFFF)($at)
/* 35508C E004412C 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 355090 E0044130 44811000 */  mtc1      $at, $f2
/* 355094 E0044134 3C01E004 */  lui       $at, (0xE0044E28 >> 16)
/* 355098 E0044138 D43C4E28 */  ldc1      $f28, (0xE0044E28 & 0xFFFF)($at)
/* 35509C E004413C 46001083 */  div.s     $f2, $f2, $f0
/* 3550A0 E0044140 E7A20028 */  swc1      $f2, 0x28($sp)
.LE0044144:
/* 3550A4 E0044144 44910000 */  mtc1      $s1, $f0
/* 3550A8 E0044148 00000000 */  nop
/* 3550AC E004414C 46800020 */  cvt.s.w   $f0, $f0
/* 3550B0 E0044150 C7AA0028 */  lwc1      $f10, 0x28($sp)
/* 3550B4 E0044154 2A620002 */  slti      $v0, $s3, 0x2
/* 3550B8 E0044158 46005582 */  mul.s     $f22, $f10, $f0
/* 3550BC E004415C 00000000 */  nop
/* 3550C0 E0044160 54400007 */  bnel      $v0, $zero, .LE0044180
/* 3550C4 E0044164 461AB600 */   add.s    $f24, $f22, $f26
/* 3550C8 E0044168 0C080138 */  jal       shim_rand_int
/* 3550CC E004416C 24040167 */   addiu    $a0, $zero, 0x167
/* 3550D0 E0044170 44820000 */  mtc1      $v0, $f0
/* 3550D4 E0044174 00000000 */  nop
/* 3550D8 E0044178 46800020 */  cvt.s.w   $f0, $f0
/* 3550DC E004417C 4600B600 */  add.s     $f24, $f22, $f0
.LE0044180:
/* 3550E0 E0044180 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 3550E4 E0044184 4481A000 */  mtc1      $at, $f20
/* 3550E8 E0044188 00000000 */  nop
/* 3550EC E004418C 4614B502 */  mul.s     $f20, $f22, $f20
/* 3550F0 E0044190 00000000 */  nop
/* 3550F4 E0044194 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 3550F8 E0044198 44810000 */  mtc1      $at, $f0
/* 3550FC E004419C 4600C306 */  mov.s     $f12, $f24
/* 355100 E00441A0 0C080140 */  jal       shim_sin_deg
/* 355104 E00441A4 4600A501 */   sub.s    $f20, $f20, $f0
/* 355108 E00441A8 4600C306 */  mov.s     $f12, $f24
/* 35510C E00441AC 0C080144 */  jal       shim_cos_deg
/* 355110 E00441B0 46000586 */   mov.s    $f22, $f0
/* 355114 E00441B4 4600A306 */  mov.s     $f12, $f20
/* 355118 E00441B8 0C080140 */  jal       shim_sin_deg
/* 35511C E00441BC 46000506 */   mov.s    $f20, $f0
/* 355120 E00441C0 C7AA0090 */  lwc1      $f10, 0x90($sp)
/* 355124 E00441C4 460050A1 */  cvt.d.s   $f2, $f10
/* 355128 E00441C8 3C01E004 */  lui       $at, (0xE0044E30 >> 16)
/* 35512C E00441CC D42A4E30 */  ldc1      $f10, (0xE0044E30 & 0xFFFF)($at)
/* 355130 E00441D0 462A1202 */  mul.d     $f8, $f2, $f10
/* 355134 E00441D4 00000000 */  nop
/* 355138 E00441D8 463E1082 */  mul.d     $f2, $f2, $f30
/* 35513C E00441DC 00000000 */  nop
/* 355140 E00441E0 C7AA0094 */  lwc1      $f10, 0x94($sp)
/* 355144 E00441E4 46005121 */  cvt.d.s   $f4, $f10
/* 355148 E00441E8 463E2182 */  mul.d     $f6, $f4, $f30
/* 35514C E00441EC 00000000 */  nop
/* 355150 E00441F0 3C01E004 */  lui       $at, (0xE0044E38 >> 16)
/* 355154 E00441F4 D42A4E38 */  ldc1      $f10, (0xE0044E38 & 0xFFFF)($at)
/* 355158 E00441F8 462A2102 */  mul.d     $f4, $f4, $f10
/* 35515C E00441FC 00000000 */  nop
/* 355160 E0044200 46000021 */  cvt.d.s   $f0, $f0
/* 355164 E0044204 46201082 */  mul.d     $f2, $f2, $f0
/* 355168 E0044208 00000000 */  nop
/* 35516C E004420C 46203182 */  mul.d     $f6, $f6, $f0
/* 355170 E0044210 00000000 */  nop
/* 355174 E0044214 2622001E */  addiu     $v0, $s1, 0x1E
/* 355178 E0044218 AE02000C */  sw        $v0, 0xC($s0)
/* 35517C E004421C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 355180 E0044220 44810000 */  mtc1      $at, $f0
/* 355184 E0044224 2622FFFF */  addiu     $v0, $s1, -0x1
/* 355188 E0044228 AE000008 */  sw        $zero, 0x8($s0)
/* 35518C E004422C E6000004 */  swc1      $f0, 0x4($s0)
/* 355190 E0044230 C7AA0094 */  lwc1      $f10, 0x94($sp)
/* 355194 E0044234 46224201 */  sub.d     $f8, $f8, $f2
/* 355198 E0044238 44940000 */  mtc1      $s4, $f0
/* 35519C E004423C 00000000 */  nop
/* 3551A0 E0044240 46800020 */  cvt.s.w   $f0, $f0
/* 3551A4 E0044244 46005003 */  div.s     $f0, $f10, $f0
/* 3551A8 E0044248 46262101 */  sub.d     $f4, $f4, $f6
/* 3551AC E004424C 44821000 */  mtc1      $v0, $f2
/* 3551B0 E0044250 00000000 */  nop
/* 3551B4 E0044254 468010A0 */  cvt.s.w   $f2, $f2
/* 3551B8 E0044258 2E620006 */  sltiu     $v0, $s3, 0x6
/* 3551BC E004425C 46020182 */  mul.s     $f6, $f0, $f2
/* 3551C0 E0044260 00000000 */  nop
/* 3551C4 E0044264 46204220 */  cvt.s.d   $f8, $f8
/* 3551C8 E0044268 10400036 */  beqz      $v0, .LE0044344
/* 3551CC E004426C 46202120 */   cvt.s.d  $f4, $f4
/* 3551D0 E0044270 00131080 */  sll       $v0, $s3, 2
/* 3551D4 E0044274 00551021 */  addu      $v0, $v0, $s5
/* 3551D8 E0044278 8C420000 */  lw        $v0, 0x0($v0)
/* 3551DC E004427C 00400008 */  jr        $v0
/* 3551E0 E0044280 00000000 */   nop
glabel .LE0044284
/* 3551E4 E0044284 4608B002 */  mul.s     $f0, $f22, $f8
/* 3551E8 E0044288 00000000 */  nop
/* 3551EC E004428C 4604A082 */  mul.s     $f2, $f20, $f4
/* 3551F0 E0044290 00000000 */  nop
/* 3551F4 E0044294 AE000000 */  sw        $zero, 0x0($s0)
/* 3551F8 E0044298 AE00FFF4 */  sw        $zero, -0xC($s0)
/* 3551FC E004429C E600FFF8 */  swc1      $f0, -0x8($s0)
/* 355200 E00442A0 080110F4 */  j         .LE00443D0
/* 355204 E00442A4 E602FFFC */   swc1     $f2, -0x4($s0)
glabel .LE00442A8
/* 355208 E00442A8 0C080138 */  jal       shim_rand_int
/* 35520C E00442AC 24040064 */   addiu    $a0, $zero, 0x64
/* 355210 E00442B0 C7AA0090 */  lwc1      $f10, 0x90($sp)
/* 355214 E00442B4 460AB002 */  mul.s     $f0, $f22, $f10
/* 355218 E00442B8 00000000 */  nop
/* 35521C E00442BC 44821000 */  mtc1      $v0, $f2
/* 355220 E00442C0 00000000 */  nop
/* 355224 E00442C4 468010A0 */  cvt.s.w   $f2, $f2
/* 355228 E00442C8 46020002 */  mul.s     $f0, $f0, $f2
/* 35522C E00442CC 00000000 */  nop
/* 355230 E00442D0 46000021 */  cvt.d.s   $f0, $f0
/* 355234 E00442D4 463C0002 */  mul.d     $f0, $f0, $f28
/* 355238 E00442D8 00000000 */  nop
/* 35523C E00442DC 24040064 */  addiu     $a0, $zero, 0x64
/* 355240 E00442E0 46200020 */  cvt.s.d   $f0, $f0
/* 355244 E00442E4 0C080138 */  jal       shim_rand_int
/* 355248 E00442E8 E600FFEC */   swc1     $f0, -0x14($s0)
/* 35524C E00442EC C7AA0094 */  lwc1      $f10, 0x94($sp)
/* 355250 E00442F0 460AA002 */  mul.s     $f0, $f20, $f10
/* 355254 E00442F4 00000000 */  nop
/* 355258 E00442F8 44821000 */  mtc1      $v0, $f2
/* 35525C E00442FC 00000000 */  nop
/* 355260 E0044300 468010A0 */  cvt.s.w   $f2, $f2
/* 355264 E0044304 46020002 */  mul.s     $f0, $f0, $f2
/* 355268 E0044308 00000000 */  nop
/* 35526C E004430C 8E02000C */  lw        $v0, 0xC($s0)
/* 355270 E0044310 46000021 */  cvt.d.s   $f0, $f0
/* 355274 E0044314 463C0002 */  mul.d     $f0, $f0, $f28
/* 355278 E0044318 00000000 */  nop
/* 35527C E004431C 00111840 */  sll       $v1, $s1, 1
/* 355280 E0044320 AE00FFF4 */  sw        $zero, -0xC($s0)
/* 355284 E0044324 E61AFFFC */  swc1      $f26, -0x4($s0)
/* 355288 E0044328 E61AFFF8 */  swc1      $f26, -0x8($s0)
/* 35528C E004432C E61A0000 */  swc1      $f26, 0x0($s0)
/* 355290 E0044330 00431021 */  addu      $v0, $v0, $v1
/* 355294 E0044334 AE02000C */  sw        $v0, 0xC($s0)
/* 355298 E0044338 46200020 */  cvt.s.d   $f0, $f0
/* 35529C E004433C 080110F4 */  j         .LE00443D0
/* 3552A0 E0044340 E600FFF0 */   swc1     $f0, -0x10($s0)
glabel .LE0044344
/* 3552A4 E0044344 4608B002 */  mul.s     $f0, $f22, $f8
/* 3552A8 E0044348 00000000 */  nop
/* 3552AC E004434C 4608A082 */  mul.s     $f2, $f20, $f8
/* 3552B0 E0044350 00000000 */  nop
/* 3552B4 E0044354 2404000A */  addiu     $a0, $zero, 0xA
/* 3552B8 E0044358 E606FFF0 */  swc1      $f6, -0x10($s0)
/* 3552BC E004435C E600FFF8 */  swc1      $f0, -0x8($s0)
/* 3552C0 E0044360 0C080138 */  jal       shim_rand_int
/* 3552C4 E0044364 E602FFF4 */   swc1     $f2, -0xC($s0)
/* 3552C8 E0044368 00021023 */  negu      $v0, $v0
/* 3552CC E004436C 3C013CF5 */  lui       $at, (0x3CF5C28F >> 16)
/* 3552D0 E0044370 3421C28F */  ori       $at, $at, (0x3CF5C28F & 0xFFFF)
/* 3552D4 E0044374 44811000 */  mtc1      $at, $f2
/* 3552D8 E0044378 44820000 */  mtc1      $v0, $f0
/* 3552DC E004437C 00000000 */  nop
/* 3552E0 E0044380 46800020 */  cvt.s.w   $f0, $f0
/* 3552E4 E0044384 46020002 */  mul.s     $f0, $f0, $f2
/* 3552E8 E0044388 00000000 */  nop
/* 3552EC E004438C 2404000A */  addiu     $a0, $zero, 0xA
/* 3552F0 E0044390 0C080138 */  jal       shim_rand_int
/* 3552F4 E0044394 E600FFFC */   swc1     $f0, -0x4($s0)
/* 3552F8 E0044398 3C013D23 */  lui       $at, (0x3D23D70A >> 16)
/* 3552FC E004439C 3421D70A */  ori       $at, $at, (0x3D23D70A & 0xFFFF)
/* 355300 E00443A0 44811000 */  mtc1      $at, $f2
/* 355304 E00443A4 44820000 */  mtc1      $v0, $f0
/* 355308 E00443A8 00000000 */  nop
/* 35530C E00443AC 46800020 */  cvt.s.w   $f0, $f0
/* 355310 E00443B0 46020002 */  mul.s     $f0, $f0, $f2
/* 355314 E00443B4 00000000 */  nop
/* 355318 E00443B8 3C01E004 */  lui       $at, (0xE0044E58 >> 16)
/* 35531C E00443BC D4224E58 */  ldc1      $f2, (0xE0044E58 & 0xFFFF)($at)
/* 355320 E00443C0 46000021 */  cvt.d.s   $f0, $f0
/* 355324 E00443C4 46220000 */  add.d     $f0, $f0, $f2
/* 355328 E00443C8 46200020 */  cvt.s.d   $f0, $f0
/* 35532C E00443CC E6000000 */  swc1      $f0, 0x0($s0)
.LE00443D0:
/* 355330 E00443D0 26310001 */  addiu     $s1, $s1, 0x1
/* 355334 E00443D4 0232102A */  slt       $v0, $s1, $s2
/* 355338 E00443D8 1440FF5A */  bnez      $v0, .LE0044144
/* 35533C E00443DC 2610002C */   addiu    $s0, $s0, 0x2C
.LE00443E0:
/* 355340 E00443E0 8FBF0048 */  lw        $ra, 0x48($sp)
/* 355344 E00443E4 8FB50044 */  lw        $s5, 0x44($sp)
/* 355348 E00443E8 8FB40040 */  lw        $s4, 0x40($sp)
/* 35534C E00443EC 8FB3003C */  lw        $s3, 0x3C($sp)
/* 355350 E00443F0 8FB20038 */  lw        $s2, 0x38($sp)
/* 355354 E00443F4 8FB10034 */  lw        $s1, 0x34($sp)
/* 355358 E00443F8 8FB00030 */  lw        $s0, 0x30($sp)
/* 35535C E00443FC D7BE0078 */  ldc1      $f30, 0x78($sp)
/* 355360 E0044400 D7BC0070 */  ldc1      $f28, 0x70($sp)
/* 355364 E0044404 D7BA0068 */  ldc1      $f26, 0x68($sp)
/* 355368 E0044408 D7B80060 */  ldc1      $f24, 0x60($sp)
/* 35536C E004440C D7B60058 */  ldc1      $f22, 0x58($sp)
/* 355370 E0044410 D7B40050 */  ldc1      $f20, 0x50($sp)
/* 355374 E0044414 03E00008 */  jr        $ra
/* 355378 E0044418 27BD0080 */   addiu    $sp, $sp, 0x80

### DECOMPILED C INSTRUCTIONS:

void stars_shimmer_main(s32 type, f32 x, f32 y, f32 z, f32 arg4, f32 arg5, s32 numParts, s32 arg7) {
    EffectBlueprint bp;
    EffectBlueprint* bpPtr = &bp;
    EffectInstance* effect;
    StarsShimmerFXData* part;
    f32 cosTheta;
    f32 sinTheta;
    f32 temp_f22;
    f32 temp_f8;
    f32 temp_ft;
    f32 theta;
    f32 temp5;
    f32 t3;
    f32 new_var;
    s32 i;

    numParts++;

    bpPtr->init = stars_shimmer_init;
    bpPtr->update = stars_shimmer_update;
    bpPtr->renderWorld = stars_shimmer_render;
    bpPtr->unk_00 = 0;
    bpPtr->renderUI = NULL;
    bpPtr->effectID = EFFECT_STARS_SHIMMER;

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

    if (type == 6) {
        part->unk_00 = 1;
        type = 3;
    } else {
        part->unk_00 = 0;
    }
    part->pos.x = x;
    part->pos.y = y;
    part->pos.z = z;
    part->lifeTime = 0;
    part->state = type;
    part->timeLeft = arg7;

    part++;
    for (i = 1; i < numParts; i++, part++) {
        temp_f22 = (360.0f / (numParts - 1)) * i;
        if (type > 1) {
            theta = temp_f22 + shim_rand_int(359);
        } else {
            theta = temp_f22 + 0.0f;
        }
        t3 = (temp_f22 * 10.0f) - 90.0f;
        sinTheta = shim_sin_deg(theta);
        cosTheta = shim_cos_deg(theta);
        temp_f22 = shim_sin_deg(t3);
        temp_f8 = (arg4 * 0.4) - (arg4 * 0.1 * temp_f22);
        temp_ft = (arg5 * 0.4) - (arg5 * 0.1 * temp_f22);
        new_var = 1.0f; // TODO dumb temp and cast later required to match
        temp5 = (arg5 / (numParts - 1)) * (i - 1);

        part->unk_1C = (u8) new_var;
        part->lifeTime = 0;
        part->timeLeft = i + 30;

        switch (type) {
            case 0:
            case 1:
                part->unk_18 = 0;
                part->pos.z = 0.0f;
                part->unk_10 = sinTheta * temp_f8;
                part->unk_14 = cosTheta * temp_ft;
                break;
            case 3:
                part->pos.x = (sinTheta * arg4 * shim_rand_int(100)) * 0.005;
                part->pos.y = (cosTheta * arg5 * shim_rand_int(100)) * 0.005;
                part->pos.z = 0.0f;

                part->unk_18 = part->unk_10 = part->unk_14 = 0.0f;

                part->timeLeft += i * 2;
                break;
            case 2:
            case 4:
            case 5:
            default:
                part->unk_10 = sinTheta * temp_f8;
                part->pos.y = temp5;
                part->pos.z = cosTheta * temp_f8;
                part->unk_14 = -shim_rand_int(10) * 0.03f;
                part->unk_18 = (shim_rand_int(10) * 0.04f) + 0.01;
                break;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_8024C180
/* 17AA60 8024C180 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 17AA64 8024C184 AFB00018 */  sw        $s0, 0x18($sp)
/* 17AA68 8024C188 3C10800B */  lui       $s0, %hi(gCameras + 0x558)
/* 17AA6C 8024C18C 261022D8 */  addiu     $s0, $s0, %lo(gCameras + 0x558)
D_8024C190:
/* 17AA70 8024C190 AFBF001C */  sw        $ra, 0x1C($sp)
/* 17AA74 8024C194 F7BE0048 */  sdc1      $f30, 0x48($sp)
/* 17AA78 8024C198 F7BC0040 */  sdc1      $f28, 0x40($sp)
/* 17AA7C 8024C19C F7BA0038 */  sdc1      $f26, 0x38($sp)
.L8024C1A0:
/* 17AA80 8024C1A0 F7B80030 */  sdc1      $f24, 0x30($sp)
/* 17AA84 8024C1A4 F7B60028 */  sdc1      $f22, 0x28($sp)
/* 17AA88 8024C1A8 10A0003D */  beqz      $a1, .L8024C2A0
/* 17AA8C 8024C1AC F7B40020 */   sdc1     $f20, 0x20($sp)
.L8024C1B0:
/* 17AA90 8024C1B0 3C01420C */  lui       $at, (0x420C0000 >> 16)
/* 17AA94 8024C1B4 44810000 */  mtc1      $at, $f0
/* 17AA98 8024C1B8 C6060058 */  lwc1      $f6, 0x58($s0)
/* 17AA9C 8024C1BC 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17AAA0 8024C1C0 E420F270 */  swc1      $f0, %lo(BattleCam_PosX)($at)
/* 17AAA4 8024C1C4 3C014270 */  lui       $at, (0x42700000 >> 16)
/* 17AAA8 8024C1C8 44810000 */  mtc1      $at, $f0
/* 17AAAC 8024C1CC 3C02802A */  lui       $v0, %hi(BattleCam_PosY)
/* 17AAB0 8024C1D0 2442F274 */  addiu     $v0, $v0, %lo(BattleCam_PosY)
/* 17AAB4 8024C1D4 4600303C */  c.lt.s    $f6, $f0
D_8024C1D8:
/* 17AAB8 8024C1D8 00000000 */  nop
/* 17AABC 8024C1DC 45000002 */  bc1f      .L8024C1E8
/* 17AAC0 8024C1E0 E4460000 */   swc1     $f6, 0x0($v0)
/* 17AAC4 8024C1E4 E4400000 */  swc1      $f0, 0x0($v0)
.L8024C1E8:
/* 17AAC8 8024C1E8 86040026 */  lh        $a0, 0x26($s0)
/* 17AACC 8024C1EC 8603001E */  lh        $v1, 0x1E($s0)
D_8024C1F0_C09A70:
/* 17AAD0 8024C1F0 24020008 */  addiu     $v0, $zero, 0x8
/* 17AAD4 8024C1F4 3C01802A */  lui       $at, %hi(BattleCam_BoomPitch)
D_8024C1F8:
/* 17AAD8 8024C1F8 A422F284 */  sh        $v0, %lo(BattleCam_BoomPitch)($at)
/* 17AADC 8024C1FC 86020022 */  lh        $v0, 0x22($s0)
D_8024C200:
/* 17AAE0 8024C200 44830000 */  mtc1      $v1, $f0
/* 17AAE4 8024C204 00000000 */  nop
D_8024C208:
/* 17AAE8 8024C208 46800020 */  cvt.s.w   $f0, $f0
/* 17AAEC 8024C20C 86030024 */  lh        $v1, 0x24($s0)
D_8024C210:
/* 17AAF0 8024C210 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17AAF4 8024C214 AC20F278 */  sw        $zero, %lo(BattleCam_PosZ)($at)
/* 17AAF8 8024C218 3C01802A */  lui       $at, %hi(BattleCam_BoomYaw)
/* 17AAFC 8024C21C A420F282 */  sh        $zero, %lo(BattleCam_BoomYaw)($at)
.L8024C220:
/* 17AB00 8024C220 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
/* 17AB04 8024C224 E420F28C */  swc1      $f0, %lo(BattleCam_InitialBoomLength)($at)
/* 17AB08 8024C228 44820000 */  mtc1      $v0, $f0
/* 17AB0C 8024C22C 00000000 */  nop
/* 17AB10 8024C230 46800020 */  cvt.s.w   $f0, $f0
/* 17AB14 8024C234 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17AB18 8024C238 E420F294 */  swc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 17AB1C 8024C23C 44830000 */  mtc1      $v1, $f0
/* 17AB20 8024C240 00000000 */  nop
/* 17AB24 8024C244 46800020 */  cvt.s.w   $f0, $f0
D_8024C248:
/* 17AB28 8024C248 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17AB2C 8024C24C E420F290 */  swc1      $f0, %lo(BattleCam_InitialBoomYaw)($at)
/* 17AB30 8024C250 04820001 */  bltzl     $a0, .L8024C258
/* 17AB34 8024C254 248400FF */   addiu    $a0, $a0, 0xFF
.L8024C258:
/* 17AB38 8024C258 00041203 */  sra       $v0, $a0, 8
/* 17AB3C 8024C25C C6020054 */  lwc1      $f2, 0x54($s0)
/* 17AB40 8024C260 C604005C */  lwc1      $f4, 0x5C($s0)
/* 17AB44 8024C264 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeLeft)
/* 17AB48 8024C268 9463F29E */  lhu       $v1, %lo(BattleCam_MoveTimeLeft)($v1)
/* 17AB4C 8024C26C 44820000 */  mtc1      $v0, $f0
.L8024C270:
/* 17AB50 8024C270 00000000 */  nop
/* 17AB54 8024C274 46800020 */  cvt.s.w   $f0, $f0
/* 17AB58 8024C278 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17AB5C 8024C27C E420F298 */  swc1      $f0, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17AB60 8024C280 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
/* 17AB64 8024C284 E426F2AC */  swc1      $f6, %lo(BattleCam_InitialPosY)($at)
/* 17AB68 8024C288 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17AB6C 8024C28C E422F2A8 */  swc1      $f2, %lo(BattleCam_InitialPosX)($at)
/* 17AB70 8024C290 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
/* 17AB74 8024C294 E424F2B0 */  swc1      $f4, %lo(BattleCam_InitialPosZ)($at)
.L8024C298:
/* 17AB78 8024C298 3C01802A */  lui       $at, %hi(BattleCam_MoveTimeTotal)
/* 17AB7C 8024C29C A423F2A0 */  sh        $v1, %lo(BattleCam_MoveTimeTotal)($at)
.L8024C2A0:
/* 17AB80 8024C2A0 3C01802A */  lui       $at, %hi(BattleCam_PosY)
/* 17AB84 8024C2A4 C43CF274 */  lwc1      $f28, %lo(BattleCam_PosY)($at)
/* 17AB88 8024C2A8 3C01802A */  lui       $at, %hi(BattleCam_PosX)
/* 17AB8C 8024C2AC C43AF270 */  lwc1      $f26, %lo(BattleCam_PosX)($at)
/* 17AB90 8024C2B0 3C02802A */  lui       $v0, %hi(BattleCam_UseLinearInterp)
/* 17AB94 8024C2B4 8042F2A5 */  lb        $v0, %lo(BattleCam_UseLinearInterp)($v0)
/* 17AB98 8024C2B8 3C01802A */  lui       $at, %hi(BattleCam_PosZ)
/* 17AB9C 8024C2BC C43EF278 */  lwc1      $f30, %lo(BattleCam_PosZ)($at)
/* 17ABA0 8024C2C0 14400027 */  bnez      $v0, .L8024C360
/* 17ABA4 8024C2C4 E7BC0010 */   swc1     $f28, 0x10($sp)
.L8024C2C8:
/* 17ABA8 8024C2C8 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17ABAC 8024C2CC 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17ABB0 8024C2D0 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17ABB4 8024C2D4 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17ABB8 8024C2D8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17ABBC 8024C2DC 4481C000 */  mtc1      $at, $f24
D_8024C2E0_C09B60:
/* 17ABC0 8024C2E0 44822000 */  mtc1      $v0, $f4
/* 17ABC4 8024C2E4 00000000 */  nop
/* 17ABC8 8024C2E8 46802120 */  cvt.s.w   $f4, $f4
D_8024C2EC:
/* 17ABCC 8024C2EC 44830000 */  mtc1      $v1, $f0
/* 17ABD0 8024C2F0 00000000 */  nop
/* 17ABD4 8024C2F4 46800020 */  cvt.s.w   $f0, $f0
/* 17ABD8 8024C2F8 46002103 */  div.s     $f4, $f4, $f0
/* 17ABDC 8024C2FC 4604C301 */  sub.s     $f12, $f24, $f4
/* 17ABE0 8024C300 3C014049 */  lui       $at, (0x40490FD0 >> 16)
/* 17ABE4 8024C304 34210FD0 */  ori       $at, $at, (0x40490FD0 & 0xFFFF)
/* 17ABE8 8024C308 4481B000 */  mtc1      $at, $f22
/* 17ABEC 8024C30C 00000000 */  nop
/* 17ABF0 8024C310 46166302 */  mul.s     $f12, $f12, $f22
/* 17ABF4 8024C314 00000000 */  nop
.L8024C318:
/* 17ABF8 8024C318 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 17ABFC 8024C31C 4481A000 */  mtc1      $at, $f20
/* 17AC00 8024C320 00000000 */  nop
/* 17AC04 8024C324 46146302 */  mul.s     $f12, $f12, $f20
/* 17AC08 8024C328 0C00A85B */  jal       sin_rad
/* 17AC0C 8024C32C 00000000 */   nop
/* 17AC10 8024C330 46160002 */  mul.s     $f0, $f0, $f22
/* 17AC14 8024C334 00000000 */  nop
glabel func_8024C338
/* 17AC18 8024C338 46140302 */  mul.s     $f12, $f0, $f20
/* 17AC1C 8024C33C 0C00A85B */  jal       sin_rad
/* 17AC20 8024C340 00000000 */   nop
/* 17AC24 8024C344 46160002 */  mul.s     $f0, $f0, $f22
/* 17AC28 8024C348 00000000 */  nop
/* 17AC2C 8024C34C 46140302 */  mul.s     $f12, $f0, $f20
/* 17AC30 8024C350 0C00A85B */  jal       sin_rad
/* 17AC34 8024C354 00000000 */   nop
/* 17AC38 8024C358 080930E3 */  j         .L8024C38C
/* 17AC3C 8024C35C 4600C101 */   sub.s    $f4, $f24, $f0
.L8024C360:
/* 17AC40 8024C360 3C02802A */  lui       $v0, %hi(BattleCam_MoveTimeLeft)
/* 17AC44 8024C364 8442F29E */  lh        $v0, %lo(BattleCam_MoveTimeLeft)($v0)
/* 17AC48 8024C368 3C03802A */  lui       $v1, %hi(BattleCam_MoveTimeTotal)
/* 17AC4C 8024C36C 8463F2A0 */  lh        $v1, %lo(BattleCam_MoveTimeTotal)($v1)
/* 17AC50 8024C370 44822000 */  mtc1      $v0, $f4
/* 17AC54 8024C374 00000000 */  nop
/* 17AC58 8024C378 46802120 */  cvt.s.w   $f4, $f4
/* 17AC5C 8024C37C 44830000 */  mtc1      $v1, $f0
/* 17AC60 8024C380 00000000 */  nop
.L8024C384:
/* 17AC64 8024C384 46800020 */  cvt.s.w   $f0, $f0
/* 17AC68 8024C388 46002103 */  div.s     $f4, $f4, $f0
.L8024C38C:
/* 17AC6C 8024C38C 3C01802A */  lui       $at, %hi(BattleCam_InitialPosX)
/* 17AC70 8024C390 C434F2A8 */  lwc1      $f20, %lo(BattleCam_InitialPosX)($at)
/* 17AC74 8024C394 4604A502 */  mul.s     $f20, $f20, $f4
/* 17AC78 8024C398 00000000 */  nop
/* 17AC7C 8024C39C 3C01802A */  lui       $at, %hi(BattleCam_InitialPosY)
.L8024C3A0:
/* 17AC80 8024C3A0 C432F2AC */  lwc1      $f18, %lo(BattleCam_InitialPosY)($at)
/* 17AC84 8024C3A4 46049482 */  mul.s     $f18, $f18, $f4
/* 17AC88 8024C3A8 00000000 */  nop
/* 17AC8C 8024C3AC 3C01802A */  lui       $at, %hi(BattleCam_InitialPosZ)
.L8024C3B0:
/* 17AC90 8024C3B0 C430F2B0 */  lwc1      $f16, %lo(BattleCam_InitialPosZ)($at)
/* 17AC94 8024C3B4 46048402 */  mul.s     $f16, $f16, $f4
/* 17AC98 8024C3B8 00000000 */  nop
.L8024C3BC:
/* 17AC9C 8024C3BC 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomZOffset)
/* 17ACA0 8024C3C0 C426F298 */  lwc1      $f6, %lo(BattleCam_InitialBoomZOffset)($at)
/* 17ACA4 8024C3C4 46043182 */  mul.s     $f6, $f6, $f4
.L8024C3C8:
/* 17ACA8 8024C3C8 00000000 */  nop
/* 17ACAC 8024C3CC 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomLength)
D_8024C3D0_C09C50:
/* 17ACB0 8024C3D0 C42CF28C */  lwc1      $f12, %lo(BattleCam_InitialBoomLength)($at)
/* 17ACB4 8024C3D4 46046302 */  mul.s     $f12, $f12, $f4
/* 17ACB8 8024C3D8 00000000 */  nop
/* 17ACBC 8024C3DC 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomYaw)
/* 17ACC0 8024C3E0 C428F290 */  lwc1      $f8, %lo(BattleCam_InitialBoomYaw)($at)
/* 17ACC4 8024C3E4 46044202 */  mul.s     $f8, $f8, $f4
/* 17ACC8 8024C3E8 00000000 */  nop
/* 17ACCC 8024C3EC 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 17ACD0 8024C3F0 44811000 */  mtc1      $at, $f2
/* 17ACD4 8024C3F4 00000000 */  nop
/* 17ACD8 8024C3F8 46041081 */  sub.s     $f2, $f2, $f4
/* 17ACDC 8024C3FC 4602D682 */  mul.s     $f26, $f26, $f2
/* 17ACE0 8024C400 00000000 */  nop
/* 17ACE4 8024C404 C7BC0010 */  lwc1      $f28, 0x10($sp)
/* 17ACE8 8024C408 4602E602 */  mul.s     $f24, $f28, $f2
/* 17ACEC 8024C40C 00000000 */  nop
/* 17ACF0 8024C410 3C02802A */  lui       $v0, %hi(BattleCam_BoomZOffset)
/* 17ACF4 8024C414 8442F286 */  lh        $v0, %lo(BattleCam_BoomZOffset)($v0)
/* 17ACF8 8024C418 44820000 */  mtc1      $v0, $f0
D_8024C41C:
/* 17ACFC 8024C41C 00000000 */  nop
D_8024C420_C09CA0:
/* 17AD00 8024C420 46800020 */  cvt.s.w   $f0, $f0
/* 17AD04 8024C424 46020002 */  mul.s     $f0, $f0, $f2
.L8024C428:
/* 17AD08 8024C428 00000000 */  nop
/* 17AD0C 8024C42C 4602F582 */  mul.s     $f22, $f30, $f2
/* 17AD10 8024C430 00000000 */  nop
/* 17AD14 8024C434 3C02802A */  lui       $v0, %hi(BattleCam_BoomLength)
/* 17AD18 8024C438 8442F280 */  lh        $v0, %lo(BattleCam_BoomLength)($v0)
/* 17AD1C 8024C43C 44827000 */  mtc1      $v0, $f14
/* 17AD20 8024C440 00000000 */  nop
/* 17AD24 8024C444 468073A0 */  cvt.s.w   $f14, $f14
/* 17AD28 8024C448 46027382 */  mul.s     $f14, $f14, $f2
/* 17AD2C 8024C44C 00000000 */  nop
D_8024C450:
/* 17AD30 8024C450 3C02802A */  lui       $v0, %hi(BattleCam_BoomYaw)
/* 17AD34 8024C454 8442F282 */  lh        $v0, %lo(BattleCam_BoomYaw)($v0)
/* 17AD38 8024C458 44825000 */  mtc1      $v0, $f10
/* 17AD3C 8024C45C 00000000 */  nop
/* 17AD40 8024C460 468052A0 */  cvt.s.w   $f10, $f10
/* 17AD44 8024C464 46025282 */  mul.s     $f10, $f10, $f2
/* 17AD48 8024C468 00000000 */  nop
/* 17AD4C 8024C46C 46003180 */  add.s     $f6, $f6, $f0
.L8024C470:
/* 17AD50 8024C470 3C014380 */  lui       $at, (0x43800000 >> 16)
/* 17AD54 8024C474 44810000 */  mtc1      $at, $f0
.L8024C478:
/* 17AD58 8024C478 00000000 */  nop
/* 17AD5C 8024C47C 46003182 */  mul.s     $f6, $f6, $f0
/* 17AD60 8024C480 00000000 */  nop
/* 17AD64 8024C484 3C01802A */  lui       $at, %hi(BattleCam_InitialBoomPitch)
/* 17AD68 8024C488 C420F294 */  lwc1      $f0, %lo(BattleCam_InitialBoomPitch)($at)
/* 17AD6C 8024C48C 46040002 */  mul.s     $f0, $f0, $f4
/* 17AD70 8024C490 00000000 */  nop
/* 17AD74 8024C494 461AA500 */  add.s     $f20, $f20, $f26
/* 17AD78 8024C498 46189480 */  add.s     $f18, $f18, $f24
/* 17AD7C 8024C49C 46168400 */  add.s     $f16, $f16, $f22
/* 17AD80 8024C4A0 460E6300 */  add.s     $f12, $f12, $f14
/* 17AD84 8024C4A4 3C04802A */  lui       $a0, %hi(BattleCam_MoveTimeLeft)
/* 17AD88 8024C4A8 2484F29E */  addiu     $a0, $a0, %lo(BattleCam_MoveTimeLeft)
/* 17AD8C 8024C4AC 3C02802A */  lui       $v0, %hi(BattleCam_BoomPitch)
/* 17AD90 8024C4B0 8442F284 */  lh        $v0, %lo(BattleCam_BoomPitch)($v0)
/* 17AD94 8024C4B4 460A4200 */  add.s     $f8, $f8, $f10
/* 17AD98 8024C4B8 E6140054 */  swc1      $f20, 0x54($s0)
/* 17AD9C 8024C4BC 44822000 */  mtc1      $v0, $f4
D_8024C4C0_C09D40:
/* 17ADA0 8024C4C0 00000000 */  nop
/* 17ADA4 8024C4C4 46802120 */  cvt.s.w   $f4, $f4
D_8024C4C8:
/* 17ADA8 8024C4C8 46022102 */  mul.s     $f4, $f4, $f2
/* 17ADAC 8024C4CC 00000000 */  nop
/* 17ADB0 8024C4D0 E6120058 */  swc1      $f18, 0x58($s0)
/* 17ADB4 8024C4D4 E610005C */  swc1      $f16, 0x5C($s0)
.L8024C4D8:
/* 17ADB8 8024C4D8 4600670D */  trunc.w.s $f28, $f12
/* 17ADBC 8024C4DC 4402E000 */  mfc1      $v0, $f28
.L8024C4E0:
/* 17ADC0 8024C4E0 00000000 */  nop
/* 17ADC4 8024C4E4 A602001E */  sh        $v0, 0x1E($s0)
/* 17ADC8 8024C4E8 46040000 */  add.s     $f0, $f0, $f4
D_8024C4EC:
/* 17ADCC 8024C4EC 4600470D */  trunc.w.s $f28, $f8
/* 17ADD0 8024C4F0 4402E000 */  mfc1      $v0, $f28
/* 17ADD4 8024C4F4 00000000 */  nop
/* 17ADD8 8024C4F8 A6020024 */  sh        $v0, 0x24($s0)
/* 17ADDC 8024C4FC 4600070D */  trunc.w.s $f28, $f0
/* 17ADE0 8024C500 4402E000 */  mfc1      $v0, $f28
/* 17ADE4 8024C504 00000000 */  nop
/* 17ADE8 8024C508 A6020022 */  sh        $v0, 0x22($s0)
/* 17ADEC 8024C50C 4600370D */  trunc.w.s $f28, $f6
/* 17ADF0 8024C510 4402E000 */  mfc1      $v0, $f28
/* 17ADF4 8024C514 00000000 */  nop
/* 17ADF8 8024C518 A6020026 */  sh        $v0, 0x26($s0)
/* 17ADFC 8024C51C 84820000 */  lh        $v0, 0x0($a0)
/* 17AE00 8024C520 94830000 */  lhu       $v1, 0x0($a0)
/* 17AE04 8024C524 14400006 */  bnez      $v0, .L8024C540
/* 17AE08 8024C528 2462FFFF */   addiu    $v0, $v1, -0x1
/* 17AE0C 8024C52C 24020001 */  addiu     $v0, $zero, 0x1
/* 17AE10 8024C530 3C01802A */  lui       $at, %hi(BattleCam_DoneMoving)
/* 17AE14 8024C534 A022F29C */  sb        $v0, %lo(BattleCam_DoneMoving)($at)
/* 17AE18 8024C538 08093151 */  j         .L8024C544
/* 17AE1C 8024C53C 00000000 */   nop
.L8024C540:
/* 17AE20 8024C540 A4820000 */  sh        $v0, 0x0($a0)
.L8024C544:
/* 17AE24 8024C544 8FBF001C */  lw        $ra, 0x1C($sp)
/* 17AE28 8024C548 8FB00018 */  lw        $s0, 0x18($sp)
/* 17AE2C 8024C54C D7BE0048 */  ldc1      $f30, 0x48($sp)
/* 17AE30 8024C550 D7BC0040 */  ldc1      $f28, 0x40($sp)
D_8024C554:
/* 17AE34 8024C554 D7BA0038 */  ldc1      $f26, 0x38($sp)
/* 17AE38 8024C558 D7B80030 */  ldc1      $f24, 0x30($sp)
/* 17AE3C 8024C55C D7B60028 */  ldc1      $f22, 0x28($sp)
D_8024C560_C09DE0:
/* 17AE40 8024C560 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 17AE44 8024C564 0000102D */  daddu     $v0, $zero, $zero
.L8024C568:
/* 17AE48 8024C568 03E00008 */  jr        $ra
/* 17AE4C 8024C56C 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

ApiStatus CamPresetUpdate_E(Evt* script, s32 isInitialCall) {
    Camera* camera = &gCameras[CAM_BATTLE];
    f32 alpha;
    f32 x, y, z;

    if (isInitialCall) {
        BattleCam_PosX = 35.0f;
        BattleCam_PosY = camera->lookAt_obj_target.y;
        if (BattleCam_PosY < 60.0f) {
            BattleCam_PosY = 60.0f;
        }
        BattleCam_PosZ = 0.0f;
        BattleCam_BoomPitch = 8;
        BattleCam_BoomYaw = 0;
        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(sin_rad((1.0f - alpha) * PI_S / 2) * 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;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel load_split_entity_data
/* A7B08 80111408 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* A7B0C 8011140C AFB40028 */  sw        $s4, 0x28($sp)
/* A7B10 80111410 0080A02D */  daddu     $s4, $a0, $zero
/* A7B14 80111414 AFB60030 */  sw        $s6, 0x30($sp)
/* A7B18 80111418 00A0B02D */  daddu     $s6, $a1, $zero
/* A7B1C 8011141C AFBF0034 */  sw        $ra, 0x34($sp)
/* A7B20 80111420 AFB5002C */  sw        $s5, 0x2C($sp)
/* A7B24 80111424 AFB30024 */  sw        $s3, 0x24($sp)
/* A7B28 80111428 AFB20020 */  sw        $s2, 0x20($sp)
/* A7B2C 8011142C AFB1001C */  sw        $s1, 0x1C($sp)
/* A7B30 80111430 AFB00018 */  sw        $s0, 0x18($sp)
/* A7B34 80111434 96C20000 */  lhu       $v0, 0x0($s6)
/* A7B38 80111438 30420008 */  andi      $v0, $v0, 0x8
/* A7B3C 8011143C 104000A8 */  beqz      $v0, .L801116E0
/* A7B40 80111440 0000A82D */   daddu    $s5, $zero, $zero
/* A7B44 80111444 8ED30018 */  lw        $s3, 0x18($s6)
/* A7B48 80111448 2402000A */  addiu     $v0, $zero, 0xA
/* A7B4C 8011144C A6820012 */  sh        $v0, 0x12($s4)
/* A7B50 80111450 92C20020 */  lbu       $v0, 0x20($s6)
/* A7B54 80111454 2443FFBD */  addiu     $v1, $v0, -0x43
/* A7B58 80111458 2C620008 */  sltiu     $v0, $v1, 0x8
/* A7B5C 8011145C 1040000A */  beqz      $v0, .L80111488
/* A7B60 80111460 00031080 */   sll      $v0, $v1, 2
/* A7B64 80111464 3C018015 */  lui       $at, %hi(jtbl_8014F858)
/* A7B68 80111468 00220821 */  addu      $at, $at, $v0
/* A7B6C 8011146C 8C22F858 */  lw        $v0, %lo(jtbl_8014F858)($at)
/* A7B70 80111470 00400008 */  jr        $v0
/* A7B74 80111474 00000000 */   nop
glabel .L80111478
/* A7B78 80111478 08044523 */  j         .L8011148C
/* A7B7C 8011147C 24121000 */   addiu    $s2, $zero, 0x1000
glabel .L80111480
/* A7B80 80111480 08044523 */  j         .L8011148C
/* A7B84 80111484 24122BC0 */   addiu    $s2, $zero, 0x2BC0
.L80111488:
/* A7B88 80111488 0000902D */  daddu     $s2, $zero, $zero
.L8011148C:
/* A7B8C 8011148C 12400020 */  beqz      $s2, .L80111510
/* A7B90 80111490 24020043 */   addiu    $v0, $zero, 0x43
/* A7B94 80111494 92C30020 */  lbu       $v1, 0x20($s6)
/* A7B98 80111498 54620007 */  bnel      $v1, $v0, .L801114B8
/* A7B9C 8011149C 2652F000 */   addiu    $s2, $s2, -0x1000
/* A7BA0 801114A0 0280202D */  daddu     $a0, $s4, $zero
/* A7BA4 801114A4 02C0282D */  daddu     $a1, $s6, $zero
/* A7BA8 801114A8 27A60010 */  addiu     $a2, $sp, 0x10
/* A7BAC 801114AC 0C044457 */  jal       is_entity_data_loaded
/* A7BB0 801114B0 27A70014 */   addiu    $a3, $sp, 0x14
/* A7BB4 801114B4 2652F000 */  addiu     $s2, $s2, -0x1000
.L801114B8:
/* A7BB8 801114B8 3C118015 */  lui       $s1, %hi(D_80151300)
/* A7BBC 801114BC 26311300 */  addiu     $s1, $s1, %lo(D_80151300)
/* A7BC0 801114C0 00129080 */  sll       $s2, $s2, 2
/* A7BC4 801114C4 8E640000 */  lw        $a0, 0x0($s3)
/* A7BC8 801114C8 8E260000 */  lw        $a2, 0x0($s1)
/* A7BCC 801114CC 8E650004 */  lw        $a1, 0x4($s3)
/* A7BD0 801114D0 0C00A5CF */  jal       dma_copy
/* A7BD4 801114D4 00D23021 */   addu     $a2, $a2, $s2
/* A7BD8 801114D8 00028082 */  srl       $s0, $v0, 2
/* A7BDC 801114DC 8E260000 */  lw        $a2, 0x0($s1)
/* A7BE0 801114E0 00108080 */  sll       $s0, $s0, 2
/* A7BE4 801114E4 00D23021 */  addu      $a2, $a2, $s2
/* A7BE8 801114E8 AE860044 */  sw        $a2, 0x44($s4)
/* A7BEC 801114EC 8E640008 */  lw        $a0, 0x8($s3)
/* A7BF0 801114F0 8E65000C */  lw        $a1, 0xC($s3)
/* A7BF4 801114F4 0C00A5CF */  jal       dma_copy
/* A7BF8 801114F8 00D03021 */   addu     $a2, $a2, $s0
/* A7BFC 801114FC 8E220000 */  lw        $v0, 0x0($s1)
/* A7C00 80111500 24150001 */  addiu     $s5, $zero, 0x1
/* A7C04 80111504 00521021 */  addu      $v0, $v0, $s2
/* A7C08 80111508 080445C4 */  j         .L80111710
/* A7C0C 8011150C 00508021 */   addu     $s0, $v0, $s0
.L80111510:
/* A7C10 80111510 0280202D */  daddu     $a0, $s4, $zero
/* A7C14 80111514 02C0282D */  daddu     $a1, $s6, $zero
/* A7C18 80111518 27A60010 */  addiu     $a2, $sp, 0x10
/* A7C1C 8011151C 0C044457 */  jal       is_entity_data_loaded
/* A7C20 80111520 27A70014 */   addiu    $a3, $sp, 0x14
/* A7C24 80111524 10400055 */  beqz      $v0, .L8011167C
/* A7C28 80111528 00000000 */   nop
/* A7C2C 8011152C 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* A7C30 80111530 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* A7C34 80111534 80420070 */  lb        $v0, 0x70($v0)
/* A7C38 80111538 14400005 */  bnez      $v0, .L80111550
/* A7C3C 8011153C 00000000 */   nop
/* A7C40 80111540 3C128015 */  lui       $s2, %hi(wEntityBlueprintSize)
/* A7C44 80111544 8E52165C */  lw        $s2, %lo(wEntityBlueprintSize)($s2)
/* A7C48 80111548 08044556 */  j         .L80111558
/* A7C4C 8011154C 00000000 */   nop
.L80111550:
/* A7C50 80111550 3C128015 */  lui       $s2, %hi(bEntityBlueprintSize)
/* A7C54 80111554 8E521660 */  lw        $s2, %lo(bEntityBlueprintSize)($s2)
.L80111558:
/* A7C58 80111558 8E620004 */  lw        $v0, 0x4($s3)
/* A7C5C 8011155C 8E630000 */  lw        $v1, 0x0($s3)
/* A7C60 80111560 00431023 */  subu      $v0, $v0, $v1
/* A7C64 80111564 00021083 */  sra       $v0, $v0, 2
/* A7C68 80111568 02421021 */  addu      $v0, $s2, $v0
/* A7C6C 8011156C 2C425FFD */  sltiu     $v0, $v0, 0x5FFD
/* A7C70 80111570 14400005 */  bnez      $v0, .L80111588
/* A7C74 80111574 00000000 */   nop
/* A7C78 80111578 0C0441A9 */  jal       get_entity_type
/* A7C7C 8011157C 92840004 */   lbu      $a0, 0x4($s4)
.L80111580:
/* A7C80 80111580 08044560 */  j         .L80111580
/* A7C84 80111584 00000000 */   nop
.L80111588:
/* A7C88 80111588 8E62000C */  lw        $v0, 0xC($s3)
/* A7C8C 8011158C 8E630008 */  lw        $v1, 0x8($s3)
/* A7C90 80111590 00431023 */  subu      $v0, $v0, $v1
/* A7C94 80111594 00021083 */  sra       $v0, $v0, 2
/* A7C98 80111598 02421021 */  addu      $v0, $s2, $v0
/* A7C9C 8011159C 2C425FFD */  sltiu     $v0, $v0, 0x5FFD
/* A7CA0 801115A0 14400006 */  bnez      $v0, .L801115BC
/* A7CA4 801115A4 00128080 */   sll      $s0, $s2, 2
/* A7CA8 801115A8 92840004 */  lbu       $a0, 0x4($s4)
/* A7CAC 801115AC 0C0441A9 */  jal       get_entity_type
/* A7CB0 801115B0 00000000 */   nop
.L801115B4:
/* A7CB4 801115B4 0804456D */  j         .L801115B4
/* A7CB8 801115B8 00000000 */   nop
.L801115BC:
/* A7CBC 801115BC 3C118015 */  lui       $s1, %hi(gEntityHeapBase)
/* A7CC0 801115C0 263112C4 */  addiu     $s1, $s1, %lo(gEntityHeapBase)
/* A7CC4 801115C4 8E640000 */  lw        $a0, 0x0($s3)
/* A7CC8 801115C8 8E260000 */  lw        $a2, 0x0($s1)
/* A7CCC 801115CC 8E650004 */  lw        $a1, 0x4($s3)
/* A7CD0 801115D0 00D03023 */  subu      $a2, $a2, $s0
/* A7CD4 801115D4 00C53023 */  subu      $a2, $a2, $a1
/* A7CD8 801115D8 00063083 */  sra       $a2, $a2, 2
/* A7CDC 801115DC 00063080 */  sll       $a2, $a2, 2
/* A7CE0 801115E0 0C00A5CF */  jal       dma_copy
/* A7CE4 801115E4 00863021 */   addu     $a2, $a0, $a2
/* A7CE8 801115E8 00021082 */  srl       $v0, $v0, 2
/* A7CEC 801115EC 02429021 */  addu      $s2, $s2, $v0
/* A7CF0 801115F0 8E260000 */  lw        $a2, 0x0($s1)
/* A7CF4 801115F4 00021080 */  sll       $v0, $v0, 2
/* A7CF8 801115F8 00D08023 */  subu      $s0, $a2, $s0
/* A7CFC 801115FC 02028023 */  subu      $s0, $s0, $v0
/* A7D00 80111600 AE900044 */  sw        $s0, 0x44($s4)
/* A7D04 80111604 00128080 */  sll       $s0, $s2, 2
/* A7D08 80111608 00D03023 */  subu      $a2, $a2, $s0
/* A7D0C 8011160C 8E65000C */  lw        $a1, 0xC($s3)
/* A7D10 80111610 8E640008 */  lw        $a0, 0x8($s3)
/* A7D14 80111614 00C53023 */  subu      $a2, $a2, $a1
/* A7D18 80111618 00063083 */  sra       $a2, $a2, 2
/* A7D1C 8011161C 00063080 */  sll       $a2, $a2, 2
/* A7D20 80111620 0C00A5CF */  jal       dma_copy
/* A7D24 80111624 00863021 */   addu     $a2, $a0, $a2
/* A7D28 80111628 00021082 */  srl       $v0, $v0, 2
/* A7D2C 8011162C 02429021 */  addu      $s2, $s2, $v0
/* A7D30 80111630 00021080 */  sll       $v0, $v0, 2
/* A7D34 80111634 8E230000 */  lw        $v1, 0x0($s1)
/* A7D38 80111638 92840004 */  lbu       $a0, 0x4($s4)
/* A7D3C 8011163C 00701823 */  subu      $v1, $v1, $s0
/* A7D40 80111640 0C0441A9 */  jal       get_entity_type
/* A7D44 80111644 00628023 */   subu     $s0, $v1, $v0
/* A7D48 80111648 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* A7D4C 8011164C 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* A7D50 80111650 80420070 */  lb        $v0, 0x70($v0)
/* A7D54 80111654 14400005 */  bnez      $v0, .L8011166C
/* A7D58 80111658 24150001 */   addiu    $s5, $zero, 0x1
/* A7D5C 8011165C 3C018015 */  lui       $at, %hi(wEntityBlueprintSize)
/* A7D60 80111660 AC32165C */  sw        $s2, %lo(wEntityBlueprintSize)($at)
/* A7D64 80111664 080445C4 */  j         .L80111710
/* A7D68 80111668 00000000 */   nop
.L8011166C:
/* A7D6C 8011166C 3C018015 */  lui       $at, %hi(bEntityBlueprintSize)
/* A7D70 80111670 AC321660 */  sw        $s2, %lo(bEntityBlueprintSize)($at)
/* A7D74 80111674 080445C4 */  j         .L80111710
/* A7D78 80111678 00000000 */   nop
.L8011167C:
/* A7D7C 8011167C 8E620004 */  lw        $v0, 0x4($s3)
/* A7D80 80111680 8E630000 */  lw        $v1, 0x0($s3)
/* A7D84 80111684 3C058015 */  lui       $a1, %hi(gEntityHeapBase)
/* A7D88 80111688 8CA512C4 */  lw        $a1, %lo(gEntityHeapBase)($a1)
/* A7D8C 8011168C 00431023 */  subu      $v0, $v0, $v1
/* A7D90 80111690 00021883 */  sra       $v1, $v0, 2
/* A7D94 80111694 8FA20010 */  lw        $v0, 0x10($sp)
/* A7D98 80111698 00031880 */  sll       $v1, $v1, 2
/* A7D9C 8011169C 00021080 */  sll       $v0, $v0, 2
/* A7DA0 801116A0 00A21023 */  subu      $v0, $a1, $v0
/* A7DA4 801116A4 00431023 */  subu      $v0, $v0, $v1
/* A7DA8 801116A8 AE820044 */  sw        $v0, 0x44($s4)
/* A7DAC 801116AC 8E63000C */  lw        $v1, 0xC($s3)
/* A7DB0 801116B0 8E620008 */  lw        $v0, 0x8($s3)
/* A7DB4 801116B4 92840004 */  lbu       $a0, 0x4($s4)
/* A7DB8 801116B8 00621823 */  subu      $v1, $v1, $v0
/* A7DBC 801116BC 8FA20014 */  lw        $v0, 0x14($sp)
/* A7DC0 801116C0 00031883 */  sra       $v1, $v1, 2
/* A7DC4 801116C4 00021080 */  sll       $v0, $v0, 2
/* A7DC8 801116C8 00A22823 */  subu      $a1, $a1, $v0
/* A7DCC 801116CC 00031080 */  sll       $v0, $v1, 2
/* A7DD0 801116D0 0C0441A9 */  jal       get_entity_type
/* A7DD4 801116D4 00A28023 */   subu     $s0, $a1, $v0
/* A7DD8 801116D8 080445C4 */  j         .L80111710
/* A7DDC 801116DC 00000000 */   nop
.L801116E0:
/* A7DE0 801116E0 0C04792E */  jal       create_model_animator
/* A7DE4 801116E4 8EC40004 */   lw       $a0, 0x4($s6)
/* A7DE8 801116E8 A6820014 */  sh        $v0, 0x14($s4)
/* A7DEC 801116EC 00021400 */  sll       $v0, $v0, 16
/* A7DF0 801116F0 8EC50008 */  lw        $a1, 0x8($s6)
/* A7DF4 801116F4 0C0480EB */  jal       load_model_animator_tree
/* A7DF8 801116F8 00022403 */   sra      $a0, $v0, 16
/* A7DFC 801116FC 86840014 */  lh        $a0, 0x14($s4)
/* A7E00 80111700 0C047A2F */  jal       update_model_animator
/* A7E04 80111704 00000000 */   nop
/* A7E08 80111708 080445DA */  j         .L80111768
/* A7E0C 8011170C 00000000 */   nop
.L80111710:
/* A7E10 80111710 8EC20008 */  lw        $v0, 0x8($s6)
/* A7E14 80111714 8ED10004 */  lw        $s1, 0x4($s6)
/* A7E18 80111718 12A00005 */  beqz      $s5, .L80111730
/* A7E1C 8011171C 02029021 */   addu     $s2, $s0, $v0
/* A7E20 80111720 02C0202D */  daddu     $a0, $s6, $zero
/* A7E24 80111724 8E860044 */  lw        $a2, 0x44($s4)
/* A7E28 80111728 0C04442D */  jal       entity_anim_make_vertex_pointers
/* A7E2C 8011172C 0200282D */   daddu    $a1, $s0, $zero
.L80111730:
/* A7E30 80111730 0220202D */  daddu     $a0, $s1, $zero
/* A7E34 80111734 0C047978 */  jal       create_mesh_animator
/* A7E38 80111738 0200282D */   daddu    $a1, $s0, $zero
/* A7E3C 8011173C 00022400 */  sll       $a0, $v0, 16
/* A7E40 80111740 00042403 */  sra       $a0, $a0, 16
/* A7E44 80111744 0240282D */  daddu     $a1, $s2, $zero
/* A7E48 80111748 0C04811D */  jal       load_mesh_animator_tree
/* A7E4C 8011174C A6820014 */   sh       $v0, 0x14($s4)
/* A7E50 80111750 86840014 */  lh        $a0, 0x14($s4)
/* A7E54 80111754 0C047A2F */  jal       update_model_animator
/* A7E58 80111758 00000000 */   nop
/* A7E5C 8011175C 8E820000 */  lw        $v0, 0x0($s4)
/* A7E60 80111760 34420008 */  ori       $v0, $v0, 0x8
/* A7E64 80111764 AE820000 */  sw        $v0, 0x0($s4)
.L80111768:
/* A7E68 80111768 8FBF0034 */  lw        $ra, 0x34($sp)
/* A7E6C 8011176C 8FB60030 */  lw        $s6, 0x30($sp)
/* A7E70 80111770 8FB5002C */  lw        $s5, 0x2C($sp)
/* A7E74 80111774 8FB40028 */  lw        $s4, 0x28($sp)
/* A7E78 80111778 8FB30024 */  lw        $s3, 0x24($sp)
/* A7E7C 8011177C 8FB20020 */  lw        $s2, 0x20($sp)
/* A7E80 80111780 8FB1001C */  lw        $s1, 0x1C($sp)
/* A7E84 80111784 8FB00018 */  lw        $s0, 0x18($sp)
/* A7E88 80111788 03E00008 */  jr        $ra
/* A7E8C 8011178C 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void load_split_entity_data(Entity* entity, EntityBlueprint* entityData, s32 listIndex) {
    s32 swizzlePointers = FALSE;
    s32 loadedStart, loadedEnd;
    void* animBaseAddr;
    s16* animationScript;
    StaticAnimatorNode** animationNodes;
    s32 specialSize;
    s32 dma1size;
    s32 dma2size_1;
    s32 dma2size_2;
    s32 totalLoaded;

    if (entityData->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) {
        DmaEntry* dmaList = entityData->dmaList;
        entity->vertexSegment = 0xA;

        switch (entityData->entityType) {
            case ENTITY_TYPE_RESET_MUNCHLESIA:
            case ENTITY_TYPE_MUNCHLESIA_ENVELOP:
            case ENTITY_TYPE_MUNCHLESIA_CHEWING:
            case ENTITY_TYPE_MUNCHLESIA_RESET1:
                specialSize = 0x1000;
                break;
            case ENTITY_TYPE_MUNCHLESIA_GRAB:
            case ENTITY_TYPE_MUNCHLESIA_BEGIN_CHEW:
            case ENTITY_TYPE_MUNCHLESIA_SPIT_OUT:
            case ENTITY_TYPE_MUNCHLESIA_RESET2:
                specialSize = 0x2BC0;
                break;
            default:
                specialSize = 0;
                break;
        }

        if (specialSize != 0) {
            if (entityData->entityType == ENTITY_TYPE_RESET_MUNCHLESIA) {
                is_entity_data_loaded(entity, entityData, &loadedStart, &loadedEnd);
            }
            specialSize -= 0x1000;

            dma1size = dma_copy(dmaList[0].start, dmaList[0].end, (void*)(gEntityHeapBottom + specialSize * 4)) / 4;
            entity->gfxBaseAddr = (void*)(gEntityHeapBottom + specialSize * 4);
            dma_copy(dmaList[1].start, dmaList[1].end, (void*)(gEntityHeapBottom + specialSize * 4 + dma1size * 4));
            animBaseAddr = (void*)(gEntityHeapBottom + specialSize * 4 + dma1size * 4);
            swizzlePointers = TRUE;
        } else if (is_entity_data_loaded(entity, entityData, &loadedStart, &loadedEnd)) {
            if (!gGameStatusPtr->isBattle) {
                totalLoaded = wEntityDataLoadedSize;
            } else {
                totalLoaded = bEntityDataLoadedSize;
            }

            if ((totalLoaded + ((dmaList[0].end - dmaList[0].start) >> 2)) > 0x5FFCU) {
                get_entity_type(entity->listIndex);
                PANIC();
            }

            if ((totalLoaded + ((dmaList[1].end - dmaList[1].start) >> 2)) > 0x5FFCU) {
                get_entity_type(entity->listIndex);
                PANIC();
            }

            dma2size_1 = dma_copy(dmaList[0].start, dmaList[0].end, dmaList[0].start + ((gEntityHeapBase - totalLoaded * 4 - (s32)dmaList[0].end) >> 2) * 4) >> 2;
            entity->gfxBaseAddr = (void*)(gEntityHeapBase - totalLoaded * 4 - dma2size_1 * 4);
            totalLoaded += dma2size_1;

            dma2size_2 = dma_copy(dmaList[1].start, dmaList[1].end, dmaList[1].start + ((gEntityHeapBase - totalLoaded * 4 - (s32)dmaList[1].end) >> 2) * 4) >> 2;
            animBaseAddr = (void*)(gEntityHeapBase - totalLoaded * 4 - dma2size_2 * 4);
            totalLoaded += dma2size_2;
            get_entity_type(entity->listIndex);

            if (!gGameStatusPtr->isBattle) {
                wEntityDataLoadedSize = totalLoaded;
            } else {
                bEntityDataLoadedSize = totalLoaded;
            }
            swizzlePointers = TRUE;
        } else {
            u32 temp = (dmaList[0].end - dmaList[0].start) >> 2;
            entity->gfxBaseAddr = (void*)(gEntityHeapBase - loadedStart * 4 - temp * 4);
            temp = (dmaList[1].end - dmaList[1].start) >> 2;
            animBaseAddr = (void*)(gEntityHeapBase - loadedEnd * 4 - temp * 4);
            get_entity_type(entity->listIndex);
        }
    } else {
        entity->virtualModelIndex = create_model_animator(entityData->renderCommandList);
        load_model_animator_tree(entity->virtualModelIndex, entityData->modelAnimationNodes);
        update_model_animator(entity->virtualModelIndex);
        return;
    }
    animationScript = entityData->renderCommandList;
    animationNodes = (StaticAnimatorNode**)((s32)animBaseAddr + (s32)entityData->modelAnimationNodes);
    if (swizzlePointers) {
        entity_swizzle_anim_pointers(entityData, animBaseAddr, entity->gfxBaseAddr);
    }
    entity->virtualModelIndex = create_mesh_animator(animationScript, animBaseAddr);
    load_mesh_animator_tree(entity->virtualModelIndex, animationNodes);
    update_model_animator(entity->virtualModelIndex);
    entity->flags |= ENTITY_FLAG_HAS_ANIMATED_MODEL;
}