### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80260BF4
/* 18F4D4 80260BF4 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 18F4D8 80260BF8 AFB20018 */  sw        $s2, 0x18($sp)
/* 18F4DC 80260BFC 0080902D */  daddu     $s2, $a0, $zero
/* 18F4E0 80260C00 AFB00010 */  sw        $s0, 0x10($sp)
/* 18F4E4 80260C04 3C108028 */  lui       $s0, %hi(D_80280FC0)
/* 18F4E8 80260C08 26100FC0 */  addiu     $s0, $s0, %lo(D_80280FC0)
/* 18F4EC 80260C0C AFBF001C */  sw        $ra, 0x1C($sp)
/* 18F4F0 80260C10 AFB10014 */  sw        $s1, 0x14($sp)
/* 18F4F4 80260C14 86020000 */  lh        $v0, 0x0($s0)
/* 18F4F8 80260C18 86040002 */  lh        $a0, 0x2($s0)
/* 18F4FC 80260C1C 0C00A67F */  jal       rand_int
/* 18F500 80260C20 00442021 */   addu     $a0, $v0, $a0
/* 18F504 80260C24 86030000 */  lh        $v1, 0x0($s0)
/* 18F508 80260C28 3C118011 */  lui       $s1, %hi(gPlayerData)
/* 18F50C 80260C2C 2631F290 */  addiu     $s1, $s1, %lo(gPlayerData)
/* 18F510 80260C30 0043102A */  slt       $v0, $v0, $v1
/* 18F514 80260C34 10400019 */  beqz      $v0, .L80260C9C
/* 18F518 80260C38 0000202D */   daddu    $a0, $zero, $zero
/* 18F51C 80260C3C 0080182D */  daddu     $v1, $a0, $zero
/* 18F520 80260C40 0200282D */  daddu     $a1, $s0, $zero
.L80260C44:
/* 18F524 80260C44 8CA20004 */  lw        $v0, 0x4($a1)
/* 18F528 80260C48 24630001 */  addiu     $v1, $v1, 0x1
/* 18F52C 80260C4C 00822021 */  addu      $a0, $a0, $v0
/* 18F530 80260C50 28620008 */  slti      $v0, $v1, 0x8
/* 18F534 80260C54 1440FFFB */  bnez      $v0, .L80260C44
/* 18F538 80260C58 24A50008 */   addiu    $a1, $a1, 0x8
/* 18F53C 80260C5C 0C00A67F */  jal       rand_int
/* 18F540 80260C60 00000000 */   nop
/* 18F544 80260C64 0040202D */  daddu     $a0, $v0, $zero
/* 18F548 80260C68 0000182D */  daddu     $v1, $zero, $zero
/* 18F54C 80260C6C 0200282D */  daddu     $a1, $s0, $zero
.L80260C70:
/* 18F550 80260C70 8CA20004 */  lw        $v0, 0x4($a1)
/* 18F554 80260C74 00822023 */  subu      $a0, $a0, $v0
/* 18F558 80260C78 18800006 */  blez      $a0, .L80260C94
/* 18F55C 80260C7C 000310C0 */   sll      $v0, $v1, 3
/* 18F560 80260C80 24630001 */  addiu     $v1, $v1, 0x1
/* 18F564 80260C84 28620008 */  slti      $v0, $v1, 0x8
/* 18F568 80260C88 1440FFF9 */  bnez      $v0, .L80260C70
/* 18F56C 80260C8C 24A50008 */   addiu    $a1, $a1, 0x8
/* 18F570 80260C90 000310C0 */  sll       $v0, $v1, 3
.L80260C94:
/* 18F574 80260C94 08098364 */  j         .L80260D90
/* 18F578 80260C98 34420004 */   ori      $v0, $v0, 0x4
.L80260C9C:
/* 18F57C 80260C9C 82220002 */  lb        $v0, 0x2($s1)
/* 18F580 80260CA0 82230003 */  lb        $v1, 0x3($s1)
/* 18F584 80260CA4 44820000 */  mtc1      $v0, $f0
/* 18F588 80260CA8 00000000 */  nop
/* 18F58C 80260CAC 46800020 */  cvt.s.w   $f0, $f0
/* 18F590 80260CB0 44831000 */  mtc1      $v1, $f2
/* 18F594 80260CB4 00000000 */  nop
/* 18F598 80260CB8 468010A0 */  cvt.s.w   $f2, $f2
/* 18F59C 80260CBC 46020003 */  div.s     $f0, $f0, $f2
/* 18F5A0 80260CC0 3C013FD0 */  lui       $at, (0x3FD00000 >> 16)
/* 18F5A4 80260CC4 44811800 */  mtc1      $at, $f3
/* 18F5A8 80260CC8 44801000 */  mtc1      $zero, $f2
/* 18F5AC 80260CCC 46000121 */  cvt.d.s   $f4, $f0
/* 18F5B0 80260CD0 4622203E */  c.le.d    $f4, $f2
/* 18F5B4 80260CD4 00000000 */  nop
/* 18F5B8 80260CD8 45000003 */  bc1f      .L80260CE8
/* 18F5BC 80260CDC 00000000 */   nop
/* 18F5C0 80260CE0 0809834D */  j         .L80260D34
/* 18F5C4 80260CE4 26100044 */   addiu    $s0, $s0, 0x44
.L80260CE8:
/* 18F5C8 80260CE8 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 18F5CC 80260CEC 44810800 */  mtc1      $at, $f1
/* 18F5D0 80260CF0 44800000 */  mtc1      $zero, $f0
/* 18F5D4 80260CF4 00000000 */  nop
/* 18F5D8 80260CF8 4620203E */  c.le.d    $f4, $f0
/* 18F5DC 80260CFC 00000000 */  nop
/* 18F5E0 80260D00 45000003 */  bc1f      .L80260D10
/* 18F5E4 80260D04 00000000 */   nop
/* 18F5E8 80260D08 0809834D */  j         .L80260D34
/* 18F5EC 80260D0C 26100084 */   addiu    $s0, $s0, 0x84
.L80260D10:
/* 18F5F0 80260D10 3C013FE8 */  lui       $at, (0x3FE80000 >> 16)
/* 18F5F4 80260D14 44810800 */  mtc1      $at, $f1
/* 18F5F8 80260D18 44800000 */  mtc1      $zero, $f0
/* 18F5FC 80260D1C 00000000 */  nop
/* 18F600 80260D20 4620203E */  c.le.d    $f4, $f0
/* 18F604 80260D24 00000000 */  nop
/* 18F608 80260D28 45020002 */  bc1fl     .L80260D34
/* 18F60C 80260D2C 26100104 */   addiu    $s0, $s0, 0x104
/* 18F610 80260D30 261000C4 */  addiu     $s0, $s0, 0xC4
.L80260D34:
/* 18F614 80260D34 0000202D */  daddu     $a0, $zero, $zero
/* 18F618 80260D38 0080182D */  daddu     $v1, $a0, $zero
/* 18F61C 80260D3C 0200282D */  daddu     $a1, $s0, $zero
.L80260D40:
/* 18F620 80260D40 8CA20000 */  lw        $v0, 0x0($a1)
/* 18F624 80260D44 24630001 */  addiu     $v1, $v1, 0x1
/* 18F628 80260D48 00822021 */  addu      $a0, $a0, $v0
/* 18F62C 80260D4C 28620008 */  slti      $v0, $v1, 0x8
/* 18F630 80260D50 1440FFFB */  bnez      $v0, .L80260D40
/* 18F634 80260D54 24A50008 */   addiu    $a1, $a1, 0x8
/* 18F638 80260D58 0C00A67F */  jal       rand_int
/* 18F63C 80260D5C 00000000 */   nop
/* 18F640 80260D60 0040202D */  daddu     $a0, $v0, $zero
/* 18F644 80260D64 0000182D */  daddu     $v1, $zero, $zero
/* 18F648 80260D68 0200282D */  daddu     $a1, $s0, $zero
.L80260D6C:
/* 18F64C 80260D6C 8CA20000 */  lw        $v0, 0x0($a1)
/* 18F650 80260D70 00822023 */  subu      $a0, $a0, $v0
/* 18F654 80260D74 18800006 */  blez      $a0, .L80260D90
/* 18F658 80260D78 000310C0 */   sll      $v0, $v1, 3
/* 18F65C 80260D7C 24630001 */  addiu     $v1, $v1, 0x1
/* 18F660 80260D80 28620008 */  slti      $v0, $v1, 0x8
/* 18F664 80260D84 1440FFF9 */  bnez      $v0, .L80260D6C
/* 18F668 80260D88 24A50008 */   addiu    $a1, $a1, 0x8
/* 18F66C 80260D8C 000310C0 */  sll       $v0, $v1, 3
.L80260D90:
/* 18F670 80260D90 00501021 */  addu      $v0, $v0, $s0
/* 18F674 80260D94 8C420004 */  lw        $v0, 0x4($v0)
/* 18F678 80260D98 AE420084 */  sw        $v0, 0x84($s2)
/* 18F67C 80260D9C 8FBF001C */  lw        $ra, 0x1C($sp)
/* 18F680 80260DA0 8FB20018 */  lw        $s2, 0x18($sp)
/* 18F684 80260DA4 8FB10014 */  lw        $s1, 0x14($sp)
/* 18F688 80260DA8 8FB00010 */  lw        $s0, 0x10($sp)
/* 18F68C 80260DAC 24020002 */  addiu     $v0, $zero, 0x2
/* 18F690 80260DB0 03E00008 */  jr        $ra
/* 18F694 80260DB4 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(ChoosePlayerCelebrationAnim) {
    PlayerCelebrationAnimOptions* pcao = &D_80280FC0;
    PlayerData* playerData = &gPlayerData;
    s32 temp;
    s32 i;

    if (rand_int(pcao->randomChance + pcao->hpBasedChance) < pcao->randomChance) {
        temp = 0;
        for (i = 0; i < 8; i++) {
            temp += pcao->options[i * 2];
        }
        temp = rand_int(temp);
        for (i = 0; i < 8; i++) {
            temp -= pcao->options[i * 2];
            if (temp <= 0) {
                break;
            }
        }

        script->varTable[0] = pcao->options[i * 2 + 1];
    } else {
        s32* opts;
        f32 healthRatio = playerData->curHP / (f32) playerData->curMaxHP;

        if (healthRatio <= 0.25) {
            opts = &pcao->options[16];
        } else if (healthRatio <= 0.5) {
            opts = &pcao->options[32];
        } else if (healthRatio <= 0.75) {
            opts = &pcao->options[48];
        } else {
            opts = &pcao->options[64];
        }

        temp = 0;
        for (i = 0; i < 8; i++) {
            temp += opts[i * 2];
        }
        temp = rand_int(temp);
        for (i = 0; i < 8; i++) {
            temp -= opts[i * 2];
            if (temp <= 0) {
                break;
            }
        }
        script->varTable[0] = opts[i * 2 + 1];
    }
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel start_battle
/* 1FAB4 800446B4 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 1FAB8 800446B8 AFB00010 */  sw        $s0, 0x10($sp)
/* 1FABC 800446BC 00A0802D */  daddu     $s0, $a1, $zero
/* 1FAC0 800446C0 AFBF0028 */  sw        $ra, 0x28($sp)
/* 1FAC4 800446C4 AFB50024 */  sw        $s5, 0x24($sp)
/* 1FAC8 800446C8 AFB40020 */  sw        $s4, 0x20($sp)
/* 1FACC 800446CC AFB3001C */  sw        $s3, 0x1C($sp)
/* 1FAD0 800446D0 AFB20018 */  sw        $s2, 0x18($sp)
/* 1FAD4 800446D4 AFB10014 */  sw        $s1, 0x14($sp)
/* 1FAD8 800446D8 8C910148 */  lw        $s1, 0x148($a0)
/* 1FADC 800446DC 0C0B1192 */  jal       resume_all_group
/* 1FAE0 800446E0 24040001 */   addiu    $a0, $zero, 0x1
/* 1FAE4 800446E4 3C13800B */  lui       $s3, %hi(gCurrentEncounter)
/* 1FAE8 800446E8 26730F10 */  addiu     $s3, $s3, %lo(gCurrentEncounter)
/* 1FAEC 800446EC 24020001 */  addiu     $v0, $zero, 0x1
/* 1FAF0 800446F0 A2620005 */  sb        $v0, 0x5($s3)
/* 1FAF4 800446F4 A2220005 */  sb        $v0, 0x5($s1)
/* 1FAF8 800446F8 AE71008C */  sw        $s1, 0x8C($s3)
/* 1FAFC 800446FC 82220004 */  lb        $v0, 0x4($s1)
/* 1FB00 80044700 00021080 */  sll       $v0, $v0, 2
/* 1FB04 80044704 00531021 */  addu      $v0, $v0, $s3
/* 1FB08 80044708 8C430028 */  lw        $v1, 0x28($v0)
/* 1FB0C 8004470C 2402FFFF */  addiu     $v0, $zero, -0x1
/* 1FB10 80044710 A2600004 */  sb        $zero, 0x4($s3)
/* 1FB14 80044714 A2600011 */  sb        $zero, 0x11($s3)
/* 1FB18 80044718 AE700014 */  sw        $s0, 0x14($s3)
/* 1FB1C 8004471C AE620018 */  sw        $v0, 0x18($s3)
/* 1FB20 80044720 AE630088 */  sw        $v1, 0x88($s3)
/* 1FB24 80044724 8E22003C */  lw        $v0, 0x3C($s1)
/* 1FB28 80044728 10400003 */  beqz      $v0, .L80044738
/* 1FB2C 8004472C 00000000 */   nop
/* 1FB30 80044730 0C0B1108 */  jal       suspend_all_script
/* 1FB34 80044734 8E240054 */   lw       $a0, 0x54($s1)
.L80044738:
/* 1FB38 80044738 8E220044 */  lw        $v0, 0x44($s1)
/* 1FB3C 8004473C 10400003 */  beqz      $v0, .L8004474C
/* 1FB40 80044740 00000000 */   nop
/* 1FB44 80044744 0C0B1108 */  jal       suspend_all_script
/* 1FB48 80044748 8E24005C */   lw       $a0, 0x5C($s1)
.L8004474C:
/* 1FB4C 8004474C 0C03805E */  jal       disable_player_input
/* 1FB50 80044750 0000802D */   daddu    $s0, $zero, $zero
/* 1FB54 80044754 0C03BD8A */  jal       partner_disable_input
/* 1FB58 80044758 00000000 */   nop
/* 1FB5C 8004475C 8E740088 */  lw        $s4, 0x88($s3)
/* 1FB60 80044760 8E820000 */  lw        $v0, 0x0($s4)
/* 1FB64 80044764 18400021 */  blez      $v0, .L800447EC
/* 1FB68 80044768 24150001 */   addiu    $s5, $zero, 0x1
/* 1FB6C 8004476C 0280902D */  daddu     $s2, $s4, $zero
.L80044770:
/* 1FB70 80044770 8E510004 */  lw        $s1, 0x4($s2)
/* 1FB74 80044774 12200018 */  beqz      $s1, .L800447D8
/* 1FB78 80044778 00000000 */   nop
/* 1FB7C 8004477C 8E220000 */  lw        $v0, 0x0($s1)
/* 1FB80 80044780 30420008 */  andi      $v0, $v0, 0x8
/* 1FB84 80044784 10400004 */  beqz      $v0, .L80044798
/* 1FB88 80044788 00000000 */   nop
/* 1FB8C 8004478C 8E62008C */  lw        $v0, 0x8C($s3)
/* 1FB90 80044790 16220011 */  bne       $s1, $v0, .L800447D8
/* 1FB94 80044794 00000000 */   nop
.L80044798:
/* 1FB98 80044798 8E220028 */  lw        $v0, 0x28($s1)
/* 1FB9C 8004479C 1040000E */  beqz      $v0, .L800447D8
/* 1FBA0 800447A0 0040202D */   daddu    $a0, $v0, $zero
/* 1FBA4 800447A4 2405000A */  addiu     $a1, $zero, 0xA
/* 1FBA8 800447A8 0000302D */  daddu     $a2, $zero, $zero
/* 1FBAC 800447AC 0C0B0CF8 */  jal       start_script
/* 1FBB0 800447B0 A2350005 */   sb       $s5, 0x5($s1)
/* 1FBB4 800447B4 0040182D */  daddu     $v1, $v0, $zero
/* 1FBB8 800447B8 AE230040 */  sw        $v1, 0x40($s1)
/* 1FBBC 800447BC 8C620144 */  lw        $v0, 0x144($v1)
/* 1FBC0 800447C0 AE220058 */  sw        $v0, 0x58($s1)
/* 1FBC4 800447C4 AC710148 */  sw        $s1, 0x148($v1)
/* 1FBC8 800447C8 86220008 */  lh        $v0, 0x8($s1)
/* 1FBCC 800447CC AC62014C */  sw        $v0, 0x14C($v1)
/* 1FBD0 800447D0 92220006 */  lbu       $v0, 0x6($s1)
/* 1FBD4 800447D4 A0620004 */  sb        $v0, 0x4($v1)
.L800447D8:
/* 1FBD8 800447D8 8E820000 */  lw        $v0, 0x0($s4)
/* 1FBDC 800447DC 26100001 */  addiu     $s0, $s0, 0x1
/* 1FBE0 800447E0 0202102A */  slt       $v0, $s0, $v0
/* 1FBE4 800447E4 1440FFE2 */  bnez      $v0, .L80044770
/* 1FBE8 800447E8 26520004 */   addiu    $s2, $s2, 0x4
.L800447EC:
/* 1FBEC 800447EC 24020001 */  addiu     $v0, $zero, 0x1
/* 1FBF0 800447F0 AE600090 */  sw        $zero, 0x90($s3)
/* 1FBF4 800447F4 AE600094 */  sw        $zero, 0x94($s3)
/* 1FBF8 800447F8 A2620012 */  sb        $v0, 0x12($s3)
/* 1FBFC 800447FC 8FBF0028 */  lw        $ra, 0x28($sp)
/* 1FC00 80044800 8FB50024 */  lw        $s5, 0x24($sp)
/* 1FC04 80044804 8FB40020 */  lw        $s4, 0x20($sp)
/* 1FC08 80044808 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1FC0C 8004480C 8FB20018 */  lw        $s2, 0x18($sp)
/* 1FC10 80044810 8FB10014 */  lw        $s1, 0x14($sp)
/* 1FC14 80044814 8FB00010 */  lw        $s0, 0x10($sp)
/* 1FC18 80044818 24020003 */  addiu     $v0, $zero, 0x3
/* 1FC1C 8004481C 3C01800A */  lui       $at, %hi(gEncounterState)
/* 1FC20 80044820 AC22A600 */  sw        $v0, %lo(gEncounterState)($at)
/* 1FC24 80044824 24020001 */  addiu     $v0, $zero, 0x1
/* 1FC28 80044828 3C01800A */  lui       $at, %hi(D_8009A678)
/* 1FC2C 8004482C AC22A678 */  sw        $v0, %lo(D_8009A678)($at)
/* 1FC30 80044830 3C01800A */  lui       $at, %hi(gEncounterSubState)
/* 1FC34 80044834 AC20A5D0 */  sw        $zero, %lo(gEncounterSubState)($at)
/* 1FC38 80044838 03E00008 */  jr        $ra
/* 1FC3C 8004483C 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void start_battle(Evt* script, s32 songID) {
    EncounterStatus* currentEncounter = &gCurrentEncounter;
    Enemy* enemy = script->owner1.enemy;
    Encounter* encounter;
    s32 i;

    resume_all_group(EVT_GROUP_01);

    currentEncounter->hitType = ENCOUNTER_TRIGGER_NONE;
    enemy->encountered = TRUE;
    currentEncounter->currentEnemy = enemy;
    currentEncounter->currentEncounter = currentEncounter->encounterList[enemy->encounterIndex];
    currentEncounter->firstStrikeType = FIRST_STRIKE_NONE;
    currentEncounter->allowFleeing = FALSE;
    currentEncounter->songID = songID;
    currentEncounter->unk_18 = -1;

    if (enemy->aiScript != NULL) {
        suspend_all_script(enemy->aiScriptID);
    }

    if (enemy->auxScript != NULL) {
        suspend_all_script(enemy->auxScriptID);
    }

    disable_player_input();
    partner_disable_input();

    encounter = currentEncounter->currentEncounter;
    for (i = 0; i < encounter->count; i++) {
        enemy = encounter->enemy[i];
        if (enemy != NULL && (!(enemy->flags & ENEMY_FLAG_ENABLE_HIT_SCRIPT) || enemy == currentEncounter->currentEnemy)) {
            if (enemy->hitBytecode != NULL) {
                Evt* hitEvtInstance;
                enemy->encountered = TRUE;

                hitEvtInstance = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);

                enemy->hitScript = hitEvtInstance;
                enemy->hitScriptID = hitEvtInstance->id;

                hitEvtInstance = enemy->hitScript;
                hitEvtInstance->owner1.enemy = enemy;
                hitEvtInstance->owner2.npcID = enemy->npcID;
                hitEvtInstance->groupFlags = enemy->scriptGroup;
            }
        }
    }

    currentEncounter->fadeOutAmount = 0;
    currentEncounter->unk_94 = 0;
    currentEncounter->scriptedBattle = TRUE;
    gEncounterState = ENCOUNTER_STATE_PRE_BATTLE;
    D_8009A678 = 1;
    gEncounterSubState = ENCOUNTER_SUBSTATE_PRE_BATTLE_INIT;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel virtual_entity_list_render_world
/* F79D8 802D3028 27BDFD68 */  addiu     $sp, $sp, -0x298
/* F79DC 802D302C F7B60290 */  sdc1      $f22, 0x290($sp)
/* F79E0 802D3030 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* F79E4 802D3034 4481B000 */  mtc1      $at, $f22
/* F79E8 802D3038 AFB20268 */  sw        $s2, 0x268($sp)
/* F79EC 802D303C 0000902D */  daddu     $s2, $zero, $zero
/* F79F0 802D3040 F7B40288 */  sdc1      $f20, 0x288($sp)
/* F79F4 802D3044 4480A000 */  mtc1      $zero, $f20
/* F79F8 802D3048 27A80058 */  addiu     $t0, $sp, 0x58
/* F79FC 802D304C AFBE0280 */  sw        $fp, 0x280($sp)
/* F7A00 802D3050 27BE0098 */  addiu     $fp, $sp, 0x98
/* F7A04 802D3054 AFB7027C */  sw        $s7, 0x27C($sp)
/* F7A08 802D3058 27B700D8 */  addiu     $s7, $sp, 0xD8
/* F7A0C 802D305C AFB60278 */  sw        $s6, 0x278($sp)
/* F7A10 802D3060 27B601D8 */  addiu     $s6, $sp, 0x1D8
/* F7A14 802D3064 AFB10264 */  sw        $s1, 0x264($sp)
/* F7A18 802D3068 27B10158 */  addiu     $s1, $sp, 0x158
/* F7A1C 802D306C AFB50274 */  sw        $s5, 0x274($sp)
/* F7A20 802D3070 27B50118 */  addiu     $s5, $sp, 0x118
/* F7A24 802D3074 AFB40270 */  sw        $s4, 0x270($sp)
/* F7A28 802D3078 27B40198 */  addiu     $s4, $sp, 0x198
/* F7A2C 802D307C AFB3026C */  sw        $s3, 0x26C($sp)
/* F7A30 802D3080 27B30218 */  addiu     $s3, $sp, 0x218
/* F7A34 802D3084 AFBF0284 */  sw        $ra, 0x284($sp)
/* F7A38 802D3088 AFB00260 */  sw        $s0, 0x260($sp)
/* F7A3C 802D308C AFA80258 */  sw        $t0, 0x258($sp)
.L802D3090:
/* F7A40 802D3090 3C03802E */  lui       $v1, %hi(gCurrentVirtualEntityListPtr)
/* F7A44 802D3094 8C63B7C0 */  lw        $v1, %lo(gCurrentVirtualEntityListPtr)($v1)
/* F7A48 802D3098 00121080 */  sll       $v0, $s2, 2
/* F7A4C 802D309C 00431021 */  addu      $v0, $v0, $v1
/* F7A50 802D30A0 8C500000 */  lw        $s0, 0x0($v0)
/* F7A54 802D30A4 5200003D */  beql      $s0, $zero, .L802D319C
/* F7A58 802D30A8 26520001 */   addiu    $s2, $s2, 0x1
/* F7A5C 802D30AC 8E040000 */  lw        $a0, 0x0($s0)
/* F7A60 802D30B0 0482003A */  bltzl     $a0, .L802D319C
/* F7A64 802D30B4 26520001 */   addiu    $s2, $s2, 0x1
/* F7A68 802D30B8 0C048B77 */  jal       get_entity_model
/* F7A6C 802D30BC 00000000 */   nop
/* F7A70 802D30C0 8C420000 */  lw        $v0, 0x0($v0)
/* F7A74 802D30C4 30420008 */  andi      $v0, $v0, 0x8
/* F7A78 802D30C8 54400034 */  bnel      $v0, $zero, .L802D319C
/* F7A7C 802D30CC 26520001 */   addiu    $s2, $s2, 0x1
/* F7A80 802D30D0 8E050004 */  lw        $a1, 0x4($s0)
/* F7A84 802D30D4 8E060008 */  lw        $a2, 0x8($s0)
/* F7A88 802D30D8 8E07000C */  lw        $a3, 0xC($s0)
/* F7A8C 802D30DC 0C019E40 */  jal       guTranslateF
/* F7A90 802D30E0 27A40018 */   addiu    $a0, $sp, 0x18
/* F7A94 802D30E4 E7B40010 */  swc1      $f20, 0x10($sp)
/* F7A98 802D30E8 8E050010 */  lw        $a1, 0x10($s0)
/* F7A9C 802D30EC 4406B000 */  mfc1      $a2, $f22
/* F7AA0 802D30F0 4407A000 */  mfc1      $a3, $f20
/* F7AA4 802D30F4 8FA40258 */  lw        $a0, 0x258($sp)
/* F7AA8 802D30F8 0C019EC8 */  jal       guRotateF
/* F7AAC 802D30FC 26520001 */   addiu    $s2, $s2, 0x1
/* F7AB0 802D3100 E7B40010 */  swc1      $f20, 0x10($sp)
/* F7AB4 802D3104 8E050014 */  lw        $a1, 0x14($s0)
/* F7AB8 802D3108 4406A000 */  mfc1      $a2, $f20
/* F7ABC 802D310C 4407B000 */  mfc1      $a3, $f22
/* F7AC0 802D3110 0C019EC8 */  jal       guRotateF
/* F7AC4 802D3114 03C0202D */   daddu    $a0, $fp, $zero
/* F7AC8 802D3118 E7B60010 */  swc1      $f22, 0x10($sp)
/* F7ACC 802D311C 8E050018 */  lw        $a1, 0x18($s0)
/* F7AD0 802D3120 4406A000 */  mfc1      $a2, $f20
/* F7AD4 802D3124 4407A000 */  mfc1      $a3, $f20
/* F7AD8 802D3128 0C019EC8 */  jal       guRotateF
/* F7ADC 802D312C 02E0202D */   daddu    $a0, $s7, $zero
/* F7AE0 802D3130 8E05001C */  lw        $a1, 0x1C($s0)
/* F7AE4 802D3134 8E060020 */  lw        $a2, 0x20($s0)
/* F7AE8 802D3138 8E070024 */  lw        $a3, 0x24($s0)
/* F7AEC 802D313C 0C019DF0 */  jal       guScaleF
/* F7AF0 802D3140 02C0202D */   daddu    $a0, $s6, $zero
/* F7AF4 802D3144 02E0202D */  daddu     $a0, $s7, $zero
/* F7AF8 802D3148 8FA50258 */  lw        $a1, 0x258($sp)
/* F7AFC 802D314C 0C019D80 */  jal       guMtxCatF
/* F7B00 802D3150 0220302D */   daddu    $a2, $s1, $zero
/* F7B04 802D3154 0220202D */  daddu     $a0, $s1, $zero
/* F7B08 802D3158 03C0282D */  daddu     $a1, $fp, $zero
/* F7B0C 802D315C 0C019D80 */  jal       guMtxCatF
/* F7B10 802D3160 02A0302D */   daddu    $a2, $s5, $zero
/* F7B14 802D3164 02C0202D */  daddu     $a0, $s6, $zero
/* F7B18 802D3168 02A0282D */  daddu     $a1, $s5, $zero
/* F7B1C 802D316C 0C019D80 */  jal       guMtxCatF
/* F7B20 802D3170 0220302D */   daddu    $a2, $s1, $zero
/* F7B24 802D3174 0220202D */  daddu     $a0, $s1, $zero
/* F7B28 802D3178 27A50018 */  addiu     $a1, $sp, 0x18
/* F7B2C 802D317C 0C019D80 */  jal       guMtxCatF
/* F7B30 802D3180 0280302D */   daddu    $a2, $s4, $zero
/* F7B34 802D3184 0280202D */  daddu     $a0, $s4, $zero
/* F7B38 802D3188 0C019D40 */  jal       guMtxF2L
/* F7B3C 802D318C 0260282D */   daddu    $a1, $s3, $zero
/* F7B40 802D3190 8E040000 */  lw        $a0, 0x0($s0)
/* F7B44 802D3194 0C04873A */  jal       draw_entity_model_A
/* F7B48 802D3198 0260282D */   daddu    $a1, $s3, $zero
.L802D319C:
/* F7B4C 802D319C 2A420040 */  slti      $v0, $s2, 0x40
/* F7B50 802D31A0 1440FFBB */  bnez      $v0, .L802D3090
/* F7B54 802D31A4 00000000 */   nop
/* F7B58 802D31A8 8FBF0284 */  lw        $ra, 0x284($sp)
/* F7B5C 802D31AC 8FBE0280 */  lw        $fp, 0x280($sp)
/* F7B60 802D31B0 8FB7027C */  lw        $s7, 0x27C($sp)
/* F7B64 802D31B4 8FB60278 */  lw        $s6, 0x278($sp)
/* F7B68 802D31B8 8FB50274 */  lw        $s5, 0x274($sp)
/* F7B6C 802D31BC 8FB40270 */  lw        $s4, 0x270($sp)
/* F7B70 802D31C0 8FB3026C */  lw        $s3, 0x26C($sp)
/* F7B74 802D31C4 8FB20268 */  lw        $s2, 0x268($sp)
/* F7B78 802D31C8 8FB10264 */  lw        $s1, 0x264($sp)
/* F7B7C 802D31CC 8FB00260 */  lw        $s0, 0x260($sp)
/* F7B80 802D31D0 D7B60290 */  ldc1      $f22, 0x290($sp)
/* F7B84 802D31D4 D7B40288 */  ldc1      $f20, 0x288($sp)
/* F7B88 802D31D8 03E00008 */  jr        $ra
/* F7B8C 802D31DC 27BD0298 */   addiu    $sp, $sp, 0x298

### DECOMPILED C INSTRUCTIONS:

void virtual_entity_list_render_world(void) {
    Matrix4f translation;
    Matrix4f xRot;
    Matrix4f yRot;
    Matrix4f zRot;
    Matrix4f rotation;
    Matrix4f temp;
    Matrix4f transform;
    Matrix4f scale;
    Mtx transformMtxL;
    VirtualEntity* virtualEntity;
    s32 i;

    for (i = 0; i < ARRAY_COUNT(*gCurrentVirtualEntityListPtr); i++) {
        virtualEntity = (*gCurrentVirtualEntityListPtr)[i];
        if (virtualEntity != NULL) {
            if (!(virtualEntity->entityModelIndex < 0 || get_entity_model(virtualEntity->entityModelIndex)->flags & ENTITY_MODEL_FLAG_CAM3)) {
                guTranslateF(translation, virtualEntity->pos.x, virtualEntity->pos.y, virtualEntity->pos.z);
                guRotateF(xRot, virtualEntity->rot.x, 1.0f, 0.0f, 0.0f);
                guRotateF(yRot, virtualEntity->rot.y, 0.0f, 1.0f, 0.0f);
                guRotateF(zRot, virtualEntity->rot.z, 0.0f, 0.0f, 1.0f);
                guScaleF(scale, virtualEntity->scale.x, virtualEntity->scale.y, virtualEntity->scale.z);
                guMtxCatF(zRot, xRot, temp);
                guMtxCatF(temp, yRot, rotation);
                guMtxCatF(scale, rotation, temp);
                guMtxCatF(temp, translation, transform);
                guMtxF2L(transform, &transformMtxL);
                draw_entity_model_A(virtualEntity->entityModelIndex, &transformMtxL);
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel big_smoke_puff_main
/* 3278F0 E0002000 27BDFF88 */  addiu     $sp, $sp, -0x78
/* 3278F4 E0002004 F7BA0060 */  sdc1      $f26, 0x60($sp)
/* 3278F8 E0002008 46006686 */  mov.s     $f26, $f12
/* 3278FC E000200C F7BC0068 */  sdc1      $f28, 0x68($sp)
/* 327900 E0002010 46007706 */  mov.s     $f28, $f14
/* 327904 E0002014 27A40010 */  addiu     $a0, $sp, 0x10
/* 327908 E0002018 F7BE0070 */  sdc1      $f30, 0x70($sp)
/* 32790C E000201C 4486F000 */  mtc1      $a2, $f30
/* 327910 E0002020 3C02E000 */  lui       $v0, %hi(big_smoke_puff_init)
/* 327914 E0002024 244221B4 */  addiu     $v0, $v0, %lo(big_smoke_puff_init)
/* 327918 E0002028 AFA20018 */  sw        $v0, 0x18($sp)
/* 32791C E000202C 3C02E000 */  lui       $v0, %hi(big_smoke_puff_update)
/* 327920 E0002030 244221BC */  addiu     $v0, $v0, %lo(big_smoke_puff_update)
/* 327924 E0002034 AFA2001C */  sw        $v0, 0x1C($sp)
/* 327928 E0002038 3C02E000 */  lui       $v0, %hi(big_smoke_puff_render)
/* 32792C E000203C 244222BC */  addiu     $v0, $v0, %lo(big_smoke_puff_render)
/* 327930 E0002040 AFA20020 */  sw        $v0, 0x20($sp)
/* 327934 E0002044 24020001 */  addiu     $v0, $zero, 0x1
/* 327938 E0002048 AFBF0044 */  sw        $ra, 0x44($sp)
/* 32793C E000204C AFB60040 */  sw        $s6, 0x40($sp)
/* 327940 E0002050 AFB5003C */  sw        $s5, 0x3C($sp)
/* 327944 E0002054 AFB40038 */  sw        $s4, 0x38($sp)
/* 327948 E0002058 AFB30034 */  sw        $s3, 0x34($sp)
/* 32794C E000205C AFB20030 */  sw        $s2, 0x30($sp)
/* 327950 E0002060 AFB1002C */  sw        $s1, 0x2C($sp)
/* 327954 E0002064 AFB00028 */  sw        $s0, 0x28($sp)
/* 327958 E0002068 F7B80058 */  sdc1      $f24, 0x58($sp)
/* 32795C E000206C F7B60050 */  sdc1      $f22, 0x50($sp)
/* 327960 E0002070 F7B40048 */  sdc1      $f20, 0x48($sp)
/* 327964 E0002074 AFA00010 */  sw        $zero, 0x10($sp)
/* 327968 E0002078 AFA00024 */  sw        $zero, 0x24($sp)
/* 32796C E000207C 0C080124 */  jal       shim_create_effect_instance
/* 327970 E0002080 AFA20014 */   sw       $v0, 0x14($sp)
/* 327974 E0002084 240401B8 */  addiu     $a0, $zero, 0x1B8
/* 327978 E0002088 2403000A */  addiu     $v1, $zero, 0xA
/* 32797C E000208C 0040A82D */  daddu     $s5, $v0, $zero
/* 327980 E0002090 0C08012C */  jal       shim_general_heap_malloc
/* 327984 E0002094 AEA30008 */   sw       $v1, 0x8($s5)
/* 327988 E0002098 0040882D */  daddu     $s1, $v0, $zero
/* 32798C E000209C 16200003 */  bnez      $s1, .LE00020AC
/* 327990 E00020A0 AEB1000C */   sw       $s1, 0xC($s5)
.LE00020A4:
/* 327994 E00020A4 08000829 */  j         .LE00020A4
/* 327998 E00020A8 00000000 */   nop
.LE00020AC:
/* 32799C E00020AC 8EA20008 */  lw        $v0, 0x8($s5)
/* 3279A0 E00020B0 18400030 */  blez      $v0, .LE0002174
/* 3279A4 E00020B4 0000902D */   daddu    $s2, $zero, $zero
/* 3279A8 E00020B8 24160004 */  addiu     $s6, $zero, 0x4
/* 3279AC E00020BC 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 3279B0 E00020C0 4481C000 */  mtc1      $at, $f24
/* 3279B4 E00020C4 26300024 */  addiu     $s0, $s1, 0x24
/* 3279B8 E00020C8 3C14E000 */  lui       $s4, %hi(D_E0002788)
/* 3279BC E00020CC 26942788 */  addiu     $s4, $s4, %lo(D_E0002788)
/* 3279C0 E00020D0 3C13E000 */  lui       $s3, %hi(D_E0002760)
/* 3279C4 E00020D4 26732760 */  addiu     $s3, $s3, %lo(D_E0002760)
.LE00020D8:
/* 3279C8 E00020D8 24040006 */  addiu     $a0, $zero, 0x6
/* 3279CC E00020DC 0C080000 */  jal       effect_rand_int
/* 3279D0 E00020E0 A6200000 */   sh       $zero, 0x0($s1)
/* 3279D4 E00020E4 24420010 */  addiu     $v0, $v0, 0x10
/* 3279D8 E00020E8 A602FFE0 */  sh        $v0, -0x20($s0)
/* 3279DC E00020EC A602FFDE */  sh        $v0, -0x22($s0)
/* 3279E0 E00020F0 A616FFE2 */  sh        $s6, -0x1E($s0)
/* 3279E4 E00020F4 AE00FFE4 */  sw        $zero, -0x1C($s0)
/* 3279E8 E00020F8 E61AFFE8 */  swc1      $f26, -0x18($s0)
/* 3279EC E00020FC E61CFFEC */  swc1      $f28, -0x14($s0)
/* 3279F0 E0002100 E61EFFF0 */  swc1      $f30, -0x10($s0)
/* 3279F4 E0002104 AE00FFF4 */  sw        $zero, -0xC($s0)
/* 3279F8 E0002108 AE00FFF8 */  sw        $zero, -0x8($s0)
/* 3279FC E000210C C6760000 */  lwc1      $f22, 0x0($s3)
/* 327A00 E0002110 C6940000 */  lwc1      $f20, 0x0($s4)
/* 327A04 E0002114 4618B580 */  add.s     $f22, $f22, $f24
/* 327A08 E0002118 4600A521 */  cvt.d.s   $f20, $f20
/* 327A0C E000211C 4634A500 */  add.d     $f20, $f20, $f20
/* 327A10 E0002120 4600B306 */  mov.s     $f12, $f22
/* 327A14 E0002124 0C080140 */  jal       shim_sin_deg
/* 327A18 E0002128 4620A520 */   cvt.s.d  $f20, $f20
/* 327A1C E000212C 4600B306 */  mov.s     $f12, $f22
/* 327A20 E0002130 0C080144 */  jal       shim_cos_deg
/* 327A24 E0002134 46000586 */   mov.s    $f22, $f0
/* 327A28 E0002138 4616A582 */  mul.s     $f22, $f20, $f22
/* 327A2C E000213C 00000000 */  nop
/* 327A30 E0002140 26940004 */  addiu     $s4, $s4, 0x4
/* 327A34 E0002144 4600A507 */  neg.s     $f20, $f20
/* 327A38 E0002148 4600A502 */  mul.s     $f20, $f20, $f0
/* 327A3C E000214C 00000000 */  nop
/* 327A40 E0002150 26730004 */  addiu     $s3, $s3, 0x4
/* 327A44 E0002154 26520001 */  addiu     $s2, $s2, 0x1
/* 327A48 E0002158 2631002C */  addiu     $s1, $s1, 0x2C
/* 327A4C E000215C E616FFFC */  swc1      $f22, -0x4($s0)
/* 327A50 E0002160 E6140000 */  swc1      $f20, 0x0($s0)
/* 327A54 E0002164 8EA20008 */  lw        $v0, 0x8($s5)
/* 327A58 E0002168 0242102A */  slt       $v0, $s2, $v0
/* 327A5C E000216C 1440FFDA */  bnez      $v0, .LE00020D8
/* 327A60 E0002170 2610002C */   addiu    $s0, $s0, 0x2C
.LE0002174:
/* 327A64 E0002174 8FBF0044 */  lw        $ra, 0x44($sp)
/* 327A68 E0002178 8FB60040 */  lw        $s6, 0x40($sp)
/* 327A6C E000217C 8FB5003C */  lw        $s5, 0x3C($sp)
/* 327A70 E0002180 8FB40038 */  lw        $s4, 0x38($sp)
/* 327A74 E0002184 8FB30034 */  lw        $s3, 0x34($sp)
/* 327A78 E0002188 8FB20030 */  lw        $s2, 0x30($sp)
/* 327A7C E000218C 8FB1002C */  lw        $s1, 0x2C($sp)
/* 327A80 E0002190 8FB00028 */  lw        $s0, 0x28($sp)
/* 327A84 E0002194 D7BE0070 */  ldc1      $f30, 0x70($sp)
/* 327A88 E0002198 D7BC0068 */  ldc1      $f28, 0x68($sp)
/* 327A8C E000219C D7BA0060 */  ldc1      $f26, 0x60($sp)
/* 327A90 E00021A0 D7B80058 */  ldc1      $f24, 0x58($sp)
/* 327A94 E00021A4 D7B60050 */  ldc1      $f22, 0x50($sp)
/* 327A98 E00021A8 D7B40048 */  ldc1      $f20, 0x48($sp)
/* 327A9C E00021AC 03E00008 */  jr        $ra
/* 327AA0 E00021B0 27BD0078 */   addiu    $sp, $sp, 0x78

### DECOMPILED C INSTRUCTIONS:

void big_smoke_puff_main(f32 x, f32 y, f32 z) {
    EffectBlueprint bp;
    EffectInstance* effect;
    BigSmokePuffFXData* data;
    f32 theta;
    f32 temp_f20;
    f32 cosTheta;
    f32 sinTheta;
    s32 numParts = 10;
    s32 i;

    bp.unk_00 = 0;
    bp.init = big_smoke_puff_init;
    bp.update = big_smoke_puff_update;
    bp.renderWorld = big_smoke_puff_render;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_BIG_SMOKE_PUFF;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = numParts;

    data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
    effect->data.bigSmokePuff = data;

    ASSERT(data != NULL);

    for (i = 0; i < effect->numParts; i++, data++) {
        data->unk_00 = 0;
        data->unk_02 = data->unk_04 = effect_rand_int(6) + 0x10;
        data->unk_06 = 4;
        data->unk_08 = 0;
        data->x = x;
        data->y = y;
        data->z = z;
        data->partX = 0;
        data->partY = 0;

        theta = D_E0002760[i] + 90.0f;
        temp_f20 = 2.0 * D_E0002788[i];
        sinTheta = shim_sin_deg(theta);
        cosTheta = shim_cos_deg(theta);

        data->unk_20 = temp_f20 * sinTheta;
        data->unk_24 = -temp_f20 * cosTheta;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel virtual_entity_list_render_UI
/* F7B90 802D31E0 27BDFD68 */  addiu     $sp, $sp, -0x298
/* F7B94 802D31E4 F7B60290 */  sdc1      $f22, 0x290($sp)
/* F7B98 802D31E8 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* F7B9C 802D31EC 4481B000 */  mtc1      $at, $f22
/* F7BA0 802D31F0 AFB20268 */  sw        $s2, 0x268($sp)
/* F7BA4 802D31F4 0000902D */  daddu     $s2, $zero, $zero
/* F7BA8 802D31F8 F7B40288 */  sdc1      $f20, 0x288($sp)
/* F7BAC 802D31FC 4480A000 */  mtc1      $zero, $f20
/* F7BB0 802D3200 27A80058 */  addiu     $t0, $sp, 0x58
/* F7BB4 802D3204 AFBE0280 */  sw        $fp, 0x280($sp)
/* F7BB8 802D3208 27BE0098 */  addiu     $fp, $sp, 0x98
/* F7BBC 802D320C AFB7027C */  sw        $s7, 0x27C($sp)
/* F7BC0 802D3210 27B700D8 */  addiu     $s7, $sp, 0xD8
/* F7BC4 802D3214 AFB60278 */  sw        $s6, 0x278($sp)
/* F7BC8 802D3218 27B601D8 */  addiu     $s6, $sp, 0x1D8
/* F7BCC 802D321C AFB10264 */  sw        $s1, 0x264($sp)
/* F7BD0 802D3220 27B10158 */  addiu     $s1, $sp, 0x158
/* F7BD4 802D3224 AFB50274 */  sw        $s5, 0x274($sp)
/* F7BD8 802D3228 27B50118 */  addiu     $s5, $sp, 0x118
/* F7BDC 802D322C AFB40270 */  sw        $s4, 0x270($sp)
/* F7BE0 802D3230 27B40198 */  addiu     $s4, $sp, 0x198
/* F7BE4 802D3234 AFB3026C */  sw        $s3, 0x26C($sp)
/* F7BE8 802D3238 27B30218 */  addiu     $s3, $sp, 0x218
/* F7BEC 802D323C AFBF0284 */  sw        $ra, 0x284($sp)
/* F7BF0 802D3240 AFB00260 */  sw        $s0, 0x260($sp)
/* F7BF4 802D3244 AFA80258 */  sw        $t0, 0x258($sp)
.L802D3248:
/* F7BF8 802D3248 3C03802E */  lui       $v1, %hi(gCurrentVirtualEntityListPtr)
/* F7BFC 802D324C 8C63B7C0 */  lw        $v1, %lo(gCurrentVirtualEntityListPtr)($v1)
/* F7C00 802D3250 00121080 */  sll       $v0, $s2, 2
/* F7C04 802D3254 00431021 */  addu      $v0, $v0, $v1
/* F7C08 802D3258 8C500000 */  lw        $s0, 0x0($v0)
/* F7C0C 802D325C 5200003D */  beql      $s0, $zero, .L802D3354
/* F7C10 802D3260 26520001 */   addiu    $s2, $s2, 0x1
/* F7C14 802D3264 8E040000 */  lw        $a0, 0x0($s0)
/* F7C18 802D3268 0482003A */  bltzl     $a0, .L802D3354
/* F7C1C 802D326C 26520001 */   addiu    $s2, $s2, 0x1
/* F7C20 802D3270 0C048B77 */  jal       get_entity_model
/* F7C24 802D3274 00000000 */   nop
/* F7C28 802D3278 8C420000 */  lw        $v0, 0x0($v0)
/* F7C2C 802D327C 30420008 */  andi      $v0, $v0, 0x8
/* F7C30 802D3280 50400034 */  beql      $v0, $zero, .L802D3354
/* F7C34 802D3284 26520001 */   addiu    $s2, $s2, 0x1
/* F7C38 802D3288 8E050004 */  lw        $a1, 0x4($s0)
/* F7C3C 802D328C 8E060008 */  lw        $a2, 0x8($s0)
/* F7C40 802D3290 8E07000C */  lw        $a3, 0xC($s0)
/* F7C44 802D3294 0C019E40 */  jal       guTranslateF
/* F7C48 802D3298 27A40018 */   addiu    $a0, $sp, 0x18
/* F7C4C 802D329C E7B40010 */  swc1      $f20, 0x10($sp)
/* F7C50 802D32A0 8E050010 */  lw        $a1, 0x10($s0)
/* F7C54 802D32A4 4406B000 */  mfc1      $a2, $f22
/* F7C58 802D32A8 4407A000 */  mfc1      $a3, $f20
/* F7C5C 802D32AC 8FA40258 */  lw        $a0, 0x258($sp)
/* F7C60 802D32B0 0C019EC8 */  jal       guRotateF
/* F7C64 802D32B4 26520001 */   addiu    $s2, $s2, 0x1
/* F7C68 802D32B8 E7B40010 */  swc1      $f20, 0x10($sp)
/* F7C6C 802D32BC 8E050014 */  lw        $a1, 0x14($s0)
/* F7C70 802D32C0 4406A000 */  mfc1      $a2, $f20
/* F7C74 802D32C4 4407B000 */  mfc1      $a3, $f22
/* F7C78 802D32C8 0C019EC8 */  jal       guRotateF
/* F7C7C 802D32CC 03C0202D */   daddu    $a0, $fp, $zero
/* F7C80 802D32D0 E7B60010 */  swc1      $f22, 0x10($sp)
/* F7C84 802D32D4 8E050018 */  lw        $a1, 0x18($s0)
/* F7C88 802D32D8 4406A000 */  mfc1      $a2, $f20
/* F7C8C 802D32DC 4407A000 */  mfc1      $a3, $f20
/* F7C90 802D32E0 0C019EC8 */  jal       guRotateF
/* F7C94 802D32E4 02E0202D */   daddu    $a0, $s7, $zero
/* F7C98 802D32E8 8E05001C */  lw        $a1, 0x1C($s0)
/* F7C9C 802D32EC 8E060020 */  lw        $a2, 0x20($s0)
/* F7CA0 802D32F0 8E070024 */  lw        $a3, 0x24($s0)
/* F7CA4 802D32F4 0C019DF0 */  jal       guScaleF
/* F7CA8 802D32F8 02C0202D */   daddu    $a0, $s6, $zero
/* F7CAC 802D32FC 02E0202D */  daddu     $a0, $s7, $zero
/* F7CB0 802D3300 8FA50258 */  lw        $a1, 0x258($sp)
/* F7CB4 802D3304 0C019D80 */  jal       guMtxCatF
/* F7CB8 802D3308 0220302D */   daddu    $a2, $s1, $zero
/* F7CBC 802D330C 0220202D */  daddu     $a0, $s1, $zero
/* F7CC0 802D3310 03C0282D */  daddu     $a1, $fp, $zero
/* F7CC4 802D3314 0C019D80 */  jal       guMtxCatF
/* F7CC8 802D3318 02A0302D */   daddu    $a2, $s5, $zero
/* F7CCC 802D331C 02C0202D */  daddu     $a0, $s6, $zero
/* F7CD0 802D3320 02A0282D */  daddu     $a1, $s5, $zero
/* F7CD4 802D3324 0C019D80 */  jal       guMtxCatF
/* F7CD8 802D3328 0220302D */   daddu    $a2, $s1, $zero
/* F7CDC 802D332C 0220202D */  daddu     $a0, $s1, $zero
/* F7CE0 802D3330 27A50018 */  addiu     $a1, $sp, 0x18
/* F7CE4 802D3334 0C019D80 */  jal       guMtxCatF
/* F7CE8 802D3338 0280302D */   daddu    $a2, $s4, $zero
/* F7CEC 802D333C 0280202D */  daddu     $a0, $s4, $zero
/* F7CF0 802D3340 0C019D40 */  jal       guMtxF2L
/* F7CF4 802D3344 0260282D */   daddu    $a1, $s3, $zero
/* F7CF8 802D3348 8E040000 */  lw        $a0, 0x0($s0)
/* F7CFC 802D334C 0C0488A2 */  jal       draw_entity_model_E
/* F7D00 802D3350 0260282D */   daddu    $a1, $s3, $zero
.L802D3354:
/* F7D04 802D3354 2A420040 */  slti      $v0, $s2, 0x40
/* F7D08 802D3358 1440FFBB */  bnez      $v0, .L802D3248
/* F7D0C 802D335C 00000000 */   nop
/* F7D10 802D3360 8FBF0284 */  lw        $ra, 0x284($sp)
/* F7D14 802D3364 8FBE0280 */  lw        $fp, 0x280($sp)
/* F7D18 802D3368 8FB7027C */  lw        $s7, 0x27C($sp)
/* F7D1C 802D336C 8FB60278 */  lw        $s6, 0x278($sp)
/* F7D20 802D3370 8FB50274 */  lw        $s5, 0x274($sp)
/* F7D24 802D3374 8FB40270 */  lw        $s4, 0x270($sp)
/* F7D28 802D3378 8FB3026C */  lw        $s3, 0x26C($sp)
/* F7D2C 802D337C 8FB20268 */  lw        $s2, 0x268($sp)
/* F7D30 802D3380 8FB10264 */  lw        $s1, 0x264($sp)
/* F7D34 802D3384 8FB00260 */  lw        $s0, 0x260($sp)
/* F7D38 802D3388 D7B60290 */  ldc1      $f22, 0x290($sp)
/* F7D3C 802D338C D7B40288 */  ldc1      $f20, 0x288($sp)
/* F7D40 802D3390 03E00008 */  jr        $ra
/* F7D44 802D3394 27BD0298 */   addiu    $sp, $sp, 0x298

### DECOMPILED C INSTRUCTIONS:

void virtual_entity_list_render_UI(void) {
    Matrix4f translation;
    Matrix4f xRot;
    Matrix4f yRot;
    Matrix4f zRot;
    Matrix4f rotation;
    Matrix4f temp;
    Matrix4f transform;
    Matrix4f scale;
    Mtx transformMtxL;
    VirtualEntity* virtualEntity;
    s32 i;

    for (i = 0; i < ARRAY_COUNT(*gCurrentVirtualEntityListPtr); i++) {
        virtualEntity = (*gCurrentVirtualEntityListPtr)[i];
        if (virtualEntity != NULL) {
            if (!(virtualEntity->entityModelIndex < 0 || !(get_entity_model(virtualEntity->entityModelIndex)->flags & ENTITY_MODEL_FLAG_CAM3))) {
                guTranslateF(translation, virtualEntity->pos.x, virtualEntity->pos.y, virtualEntity->pos.z);
                guRotateF(xRot, virtualEntity->rot.x, 1.0f, 0.0f, 0.0f);
                guRotateF(yRot, virtualEntity->rot.y, 0.0f, 1.0f, 0.0f);
                guRotateF(zRot, virtualEntity->rot.z, 0.0f, 0.0f, 1.0f);
                guScaleF(scale, virtualEntity->scale.x, virtualEntity->scale.y, virtualEntity->scale.z);
                guMtxCatF(zRot, xRot, temp);
                guMtxCatF(temp, yRot, rotation);
                guMtxCatF(scale, rotation, temp);
                guMtxCatF(temp, translation, transform);
                guMtxF2L(transform, &transformMtxL);
                draw_entity_model_E(virtualEntity->entityModelIndex, &transformMtxL);
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel quizmo_answer_main
/* 3A2290 E00A0000 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 3A2294 E00A0004 AFB00028 */  sw        $s0, 0x28($sp)
/* 3A2298 E00A0008 0080802D */  daddu     $s0, $a0, $zero
/* 3A229C E00A000C 27A40010 */  addiu     $a0, $sp, 0x10
/* 3A22A0 E00A0010 24020050 */  addiu     $v0, $zero, 0x50
/* 3A22A4 E00A0014 AFBF002C */  sw        $ra, 0x2C($sp)
/* 3A22A8 E00A0018 AFA00010 */  sw        $zero, 0x10($sp)
/* 3A22AC E00A001C AFA00018 */  sw        $zero, 0x18($sp)
/* 3A22B0 E00A0020 AFA0001C */  sw        $zero, 0x1C($sp)
/* 3A22B4 E00A0024 AFA00020 */  sw        $zero, 0x20($sp)
/* 3A22B8 E00A0028 AFA00024 */  sw        $zero, 0x24($sp)
/* 3A22BC E00A002C 0C080124 */  jal       shim_create_effect_instance
/* 3A22C0 E00A0030 AFA20014 */   sw       $v0, 0x14($sp)
/* 3A22C4 E00A0034 3C04DB06 */  lui       $a0, (0xDB060024 >> 16)
/* 3A22C8 E00A0038 34840024 */  ori       $a0, $a0, (0xDB060024 & 0xFFFF)
/* 3A22CC E00A003C 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 3A22D0 E00A0040 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 3A22D4 E00A0044 0040582D */  daddu     $t3, $v0, $zero
/* 3A22D8 E00A0048 8CC50000 */  lw        $a1, 0x0($a2)
/* 3A22DC E00A004C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 3A22E0 E00A0050 AD60000C */  sw        $zero, 0xC($t3)
/* 3A22E4 E00A0054 00A0182D */  daddu     $v1, $a1, $zero
/* 3A22E8 E00A0058 24A50008 */  addiu     $a1, $a1, 0x8
/* 3A22EC E00A005C ACC50000 */  sw        $a1, 0x0($a2)
/* 3A22F0 E00A0060 AC620000 */  sw        $v0, 0x0($v1)
/* 3A22F4 E00A0064 AC600004 */  sw        $zero, 0x4($v1)
/* 3A22F8 E00A0068 ACA40000 */  sw        $a0, 0x0($a1)
/* 3A22FC E00A006C 8D630010 */  lw        $v1, 0x10($t3)
/* 3A2300 E00A0070 24A20008 */  addiu     $v0, $a1, 0x8
/* 3A2304 E00A0074 ACC20000 */  sw        $v0, 0x0($a2)
/* 3A2308 E00A0078 8C62001C */  lw        $v0, 0x1C($v1)
/* 3A230C E00A007C 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 3A2310 E00A0080 00431021 */  addu      $v0, $v0, $v1
/* 3A2314 E00A0084 1600000A */  bnez      $s0, .LE00A00B0
/* 3A2318 E00A0088 ACA20004 */   sw       $v0, 0x4($a1)
/* 3A231C E00A008C 3C03FF40 */  lui       $v1, (0xFF4040E6 >> 16)
/* 3A2320 E00A0090 24A20010 */  addiu     $v0, $a1, 0x10
/* 3A2324 E00A0094 ACC20000 */  sw        $v0, 0x0($a2)
/* 3A2328 E00A0098 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3A232C E00A009C ACA20008 */  sw        $v0, 0x8($a1)
/* 3A2330 E00A00A0 3C020900 */  lui       $v0, %hi(D_09000400_415460)
/* 3A2334 E00A00A4 24420400 */  addiu     $v0, $v0, %lo(D_09000400_415460)
/* 3A2338 E00A00A8 08028034 */  j         .LE00A00D0
/* 3A233C E00A00AC 346340E6 */   ori      $v1, $v1, (0xFF4040E6 & 0xFFFF)
.LE00A00B0:
/* 3A2340 E00A00B0 3C035050 */  lui       $v1, (0x5050FFE6 >> 16)
/* 3A2344 E00A00B4 3463FFE6 */  ori       $v1, $v1, (0x5050FFE6 & 0xFFFF)
/* 3A2348 E00A00B8 24A20010 */  addiu     $v0, $a1, 0x10
/* 3A234C E00A00BC ACC20000 */  sw        $v0, 0x0($a2)
/* 3A2350 E00A00C0 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3A2354 E00A00C4 ACA20008 */  sw        $v0, 0x8($a1)
/* 3A2358 E00A00C8 3C020900 */  lui       $v0, %hi(D_090004A8_415508)
/* 3A235C E00A00CC 244204A8 */  addiu     $v0, $v0, %lo(D_090004A8_415508)
.LE00A00D0:
/* 3A2360 E00A00D0 ACA2000C */  sw        $v0, 0xC($a1)
/* 3A2364 E00A00D4 24A20018 */  addiu     $v0, $a1, 0x18
/* 3A2368 E00A00D8 ACC20000 */  sw        $v0, 0x0($a2)
/* 3A236C E00A00DC 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3A2370 E00A00E0 ACA20010 */  sw        $v0, 0x10($a1)
/* 3A2374 E00A00E4 ACA30014 */  sw        $v1, 0x14($a1)
/* 3A2378 E00A00E8 3C070050 */  lui       $a3, (0x5003C0 >> 16)
/* 3A237C E00A00EC 34E703C0 */  ori       $a3, $a3, (0x5003C0 & 0xFFFF)
/* 3A2380 E00A00F0 3C09E430 */  lui       $t1, (0xE4300230 >> 16)
/* 3A2384 E00A00F4 35290230 */  ori       $t1, $t1, (0xE4300230 & 0xFFFF)
/* 3A2388 E00A00F8 3C080020 */  lui       $t0, (0x200130 >> 16)
/* 3A238C E00A00FC 35080130 */  ori       $t0, $t0, (0x200130 & 0xFFFF)
/* 3A2390 E00A0100 3C0A0400 */  lui       $t2, (0x4000400 >> 16)
/* 3A2394 E00A0104 354A0400 */  ori       $t2, $t2, (0x4000400 & 0xFFFF)
/* 3A2398 E00A0108 3C05800A */  lui       $a1, %hi(gMainGfxPos)
/* 3A239C E00A010C 24A5A66C */  addiu     $a1, $a1, %lo(gMainGfxPos)
/* 3A23A0 E00A0110 0160202D */  daddu     $a0, $t3, $zero
/* 3A23A4 E00A0114 8CA20000 */  lw        $v0, 0x0($a1)
/* 3A23A8 E00A0118 3C03ED00 */  lui       $v1, (0xED000000 >> 16)
/* 3A23AC E00A011C 0040302D */  daddu     $a2, $v0, $zero
/* 3A23B0 E00A0120 24420008 */  addiu     $v0, $v0, 0x8
/* 3A23B4 E00A0124 ACA20000 */  sw        $v0, 0x0($a1)
/* 3A23B8 E00A0128 ACC30000 */  sw        $v1, 0x0($a2)
/* 3A23BC E00A012C 24430008 */  addiu     $v1, $v0, 0x8
/* 3A23C0 E00A0130 ACC70004 */  sw        $a3, 0x4($a2)
/* 3A23C4 E00A0134 ACA30000 */  sw        $v1, 0x0($a1)
/* 3A23C8 E00A0138 24430010 */  addiu     $v1, $v0, 0x10
/* 3A23CC E00A013C AC490000 */  sw        $t1, 0x0($v0)
/* 3A23D0 E00A0140 AC480004 */  sw        $t0, 0x4($v0)
/* 3A23D4 E00A0144 ACA30000 */  sw        $v1, 0x0($a1)
/* 3A23D8 E00A0148 3C03E100 */  lui       $v1, (0xE1000000 >> 16)
/* 3A23DC E00A014C AC430008 */  sw        $v1, 0x8($v0)
/* 3A23E0 E00A0150 24030400 */  addiu     $v1, $zero, 0x400
/* 3A23E4 E00A0154 AC43000C */  sw        $v1, 0xC($v0)
/* 3A23E8 E00A0158 24430018 */  addiu     $v1, $v0, 0x18
/* 3A23EC E00A015C ACA30000 */  sw        $v1, 0x0($a1)
/* 3A23F0 E00A0160 3C03F100 */  lui       $v1, (0xF1000000 >> 16)
/* 3A23F4 E00A0164 AC430010 */  sw        $v1, 0x10($v0)
/* 3A23F8 E00A0168 24430020 */  addiu     $v1, $v0, 0x20
/* 3A23FC E00A016C AC4A0014 */  sw        $t2, 0x14($v0)
/* 3A2400 E00A0170 ACA30000 */  sw        $v1, 0x0($a1)
/* 3A2404 E00A0174 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 3A2408 E00A0178 AC430018 */  sw        $v1, 0x18($v0)
/* 3A240C E00A017C 24430028 */  addiu     $v1, $v0, 0x28
/* 3A2410 E00A0180 AC40001C */  sw        $zero, 0x1C($v0)
/* 3A2414 E00A0184 ACA30000 */  sw        $v1, 0x0($a1)
/* 3A2418 E00A0188 3C03DB06 */  lui       $v1, (0xDB060000 >> 16)
/* 3A241C E00A018C AC430020 */  sw        $v1, 0x20($v0)
/* 3A2420 E00A0190 0C080128 */  jal       shim_remove_effect
/* 3A2424 E00A0194 AC400024 */   sw       $zero, 0x24($v0)
/* 3A2428 E00A0198 8FBF002C */  lw        $ra, 0x2C($sp)
/* 3A242C E00A019C 8FB00028 */  lw        $s0, 0x28($sp)
/* 3A2430 E00A01A0 0000102D */  daddu     $v0, $zero, $zero
/* 3A2434 E00A01A4 03E00008 */  jr        $ra
/* 3A2438 E00A01A8 27BD0030 */   addiu    $sp, $sp, 0x30
/* 3A243C E00A01AC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

EffectInstance* quizmo_answer_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
    EffectBlueprint bp;
    EffectInstance* effect;

    bp.unk_00 = 0;
    bp.init = NULL;
    bp.update = NULL;
    bp.renderWorld = NULL;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_QUIZMO_ANSWER;

    effect = shim_create_effect_instance(&bp);
    effect->data.quizmoAnswer = NULL;

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

    if (arg0 == 0) {
        gSPDisplayList(gMainGfxPos++, D_09000400_3A2840);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 64, 64, 230);
    } else {
        gSPDisplayList(gMainGfxPos++, D_090004A8_3A28E8);
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 80, 80, 255, 230);
    }

    gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, 320, 240);
    gSPTextureRectangle(gMainGfxPos++, 512, 304, 768, 560, G_TX_RENDERTILE, 0, 1024, 1024, 1024);
    gDPPipeSync(gMainGfxPos++);
    gSPSegment(gMainGfxPos++, 0x00, NULL);

    shim_remove_effect(effect);
    return NULL;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel action_update_peach_land
/* E24BEC 802B62CC 27BDFFD8 */  addiu     $sp, $sp, -0x28
Munchlesia_LaunchVelocity:
/* E24BF0 802B62D0 AFB1001C */  sw        $s1, 0x1C($sp)
Munchlesia_LateralVelocity:
/* E24BF4 802B62D4 3C118016 */  lui       $s1, %hi(gCollisionStatus)
Munchlesia_LaunchAccel:
/* E24BF8 802B62D8 2631A550 */  addiu     $s1, $s1, %lo(gCollisionStatus)
Munchlesia_LaunchYaw:
/* E24BFC 802B62DC AFB00018 */  sw        $s0, 0x18($sp)
D_802B62E0:
/* E24C00 802B62E0 3C108011 */  lui       $s0, %hi(gPlayerStatus)
.L802B62E4:
/* E24C04 802B62E4 2610EFC8 */  addiu     $s0, $s0, %lo(gPlayerStatus)
/* E24C08 802B62E8 AFBF0024 */  sw        $ra, 0x24($sp)
/* E24C0C 802B62EC AFB20020 */  sw        $s2, 0x20($sp)
/* E24C10 802B62F0 8E030000 */  lw        $v1, 0x0($s0)
/* E24C14 802B62F4 0461001A */  bgez      $v1, D_802B6360
glabel func_802B62F8
/* E24C18 802B62F8 0220902D */   daddu    $s2, $s1, $zero
.L802B62FC:
/* E24C1C 802B62FC 3C027FFF */  lui       $v0, (0x7FFFFFFF >> 16)
D_802B6300:
/* E24C20 802B6300 3442FFFF */  ori       $v0, $v0, (0x7FFFFFFF & 0xFFFF)
/* E24C24 802B6304 24040148 */  addiu     $a0, $zero, 0x148
.L802B6308:
/* E24C28 802B6308 0000282D */  daddu     $a1, $zero, $zero
.L802B630C:
/* E24C2C 802B630C 00621024 */  and       $v0, $v1, $v0
.L802B6310:
/* E24C30 802B6310 C6000028 */  lwc1      $f0, 0x28($s0)
/* E24C34 802B6314 C6020030 */  lwc1      $f2, 0x30($s0)
/* E24C38 802B6318 2403FFF1 */  addiu     $v1, $zero, -0xF
glabel .L802B631C
/* E24C3C 802B631C AE020000 */  sw        $v0, 0x0($s0)
.L802B6320:
/* E24C40 802B6320 00431024 */  and       $v0, $v0, $v1
glabel .L802B6324
/* E24C44 802B6324 A20000B6 */  sb        $zero, 0xB6($s0)
.L802B6328:
/* E24C48 802B6328 A60000C0 */  sh        $zero, 0xC0($s0)
glabel .L802B632C
/* E24C4C 802B632C A60000C2 */  sh        $zero, 0xC2($s0)
.L802B6330:
/* E24C50 802B6330 AE020000 */  sw        $v0, 0x0($s0)
/* E24C54 802B6334 E6000044 */  swc1      $f0, 0x44($s0)
.L802B6338:
/* E24C58 802B6338 0C052736 */  jal       sfx_play_sound_at_player
/* E24C5C 802B633C E6020048 */   swc1     $f2, 0x48($s0)
.L802B6340:
/* E24C60 802B6340 96220002 */  lhu       $v0, 0x2($s1)
/* E24C64 802B6344 30424000 */  andi      $v0, $v0, 0x4000
glabel func_802B6348
/* E24C68 802B6348 14400004 */  bnez      $v0, .L802B635C
/* E24C6C 802B634C 2402FFFF */   addiu    $v0, $zero, -0x1
PlayerTweesterPhysicsPtr:
/* E24C70 802B6350 0C03954C */  jal       phys_adjust_cam_on_landing
glabel .L802B6354
/* E24C74 802B6354 00000000 */   nop
/* E24C78 802B6358 2402FFFF */  addiu     $v0, $zero, -0x1
.L802B635C:
/* E24C7C 802B635C A6420004 */  sh        $v0, 0x4($s2)
D_802B6360:
/* E24C80 802B6360 C6000054 */  lwc1      $f0, 0x54($s0)
.L802B6364:
/* E24C84 802B6364 3C013F19 */  lui       $at, (0x3F19999A >> 16)
/* E24C88 802B6368 3421999A */  ori       $at, $at, (0x3F19999A & 0xFFFF)
.L802B636C:
/* E24C8C 802B636C 44811000 */  mtc1      $at, $f2
glabel .L802B6370
/* E24C90 802B6370 27A40010 */  addiu     $a0, $sp, 0x10
.L802B6374:
/* E24C94 802B6374 46020002 */  mul.s     $f0, $f0, $f2
/* E24C98 802B6378 00000000 */  nop
glabel .L802B637C
/* E24C9C 802B637C 920200B6 */  lbu       $v0, 0xB6($s0)
/* E24CA0 802B6380 27A50014 */  addiu     $a1, $sp, 0x14
/* E24CA4 802B6384 24420001 */  addiu     $v0, $v0, 0x1
/* E24CA8 802B6388 A20200B6 */  sb        $v0, 0xB6($s0)
/* E24CAC 802B638C 0C0388C1 */  jal       player_input_to_move_vector
/* E24CB0 802B6390 E6000054 */   swc1     $f0, 0x54($s0)
glabel .L802B6394
/* E24CB4 802B6394 C7A00014 */  lwc1      $f0, 0x14($sp)
.L802B6398:
/* E24CB8 802B6398 44801000 */  mtc1      $zero, $f2
.L802B639C:
/* E24CBC 802B639C 00000000 */  nop
/* E24CC0 802B63A0 46020032 */  c.eq.s    $f0, $f2
/* E24CC4 802B63A4 00000000 */  nop
.L802B63A8:
/* E24CC8 802B63A8 45010020 */  bc1t      .L802B642C
.L802B63AC:
/* E24CCC 802B63AC 0000202D */   daddu    $a0, $zero, $zero
glabel .L802B63B0
/* E24CD0 802B63B0 45010003 */  bc1t      .L802B63C0
/* E24CD4 802B63B4 00000000 */   nop
/* E24CD8 802B63B8 C7A00010 */  lwc1      $f0, 0x10($sp)
/* E24CDC 802B63BC E6000080 */  swc1      $f0, 0x80($s0)
.L802B63C0:
/* E24CE0 802B63C0 8E0200E8 */  lw        $v0, 0xE8($s0)
.L802B63C4:
/* E24CE4 802B63C4 00420018 */  mult      $v0, $v0
.L802B63C8:
/* E24CE8 802B63C8 00001812 */  mflo      $v1
.L802B63CC:
/* E24CEC 802B63CC 8E0200EC */  lw        $v0, 0xEC($s0)
.L802B63D0:
/* E24CF0 802B63D0 00000000 */  nop
glabel action_update_first_strike
/* E24CF4 802B63D4 00420018 */  mult      $v0, $v0
.L802B63D8:
/* E24CF8 802B63D8 00003812 */  mflo      $a3
glabel .L802B63DC
/* E24CFC 802B63DC 00671021 */  addu      $v0, $v1, $a3
.L802B63E0:
/* E24D00 802B63E0 44826000 */  mtc1      $v0, $f12
.L802B63E4:
/* E24D04 802B63E4 00000000 */  nop
/* E24D08 802B63E8 46806320 */  cvt.s.w   $f12, $f12
/* E24D0C 802B63EC 46006084 */  sqrt.s    $f2, $f12
.L802B63F0:
/* E24D10 802B63F0 46021032 */  c.eq.s    $f2, $f2
.L802B63F4:
/* E24D14 802B63F4 00000000 */  nop
/* E24D18 802B63F8 45010004 */  bc1t      .L802B640C
/* E24D1C 802B63FC 00000000 */   nop
.L802B6400:
/* E24D20 802B6400 0C0187BC */  jal       sqrtf
/* E24D24 802B6404 00000000 */   nop
/* E24D28 802B6408 46000086 */  mov.s     $f2, $f0
.L802B640C:
/* E24D2C 802B640C 3C01425C */  lui       $at, (0x425C0000 >> 16)
/* E24D30 802B6410 44810000 */  mtc1      $at, $f0
.L802B6414:
/* E24D34 802B6414 00000000 */  nop
.L802B6418:
/* E24D38 802B6418 4602003C */  c.lt.s    $f0, $f2
/* E24D3C 802B641C 00000000 */  nop
.L802B6420:
/* E24D40 802B6420 45000002 */  bc1f      .L802B642C
.L802B6424:
/* E24D44 802B6424 24040001 */   addiu    $a0, $zero, 0x1
.L802B6428:
/* E24D48 802B6428 24040002 */  addiu     $a0, $zero, 0x2
.L802B642C:
/* E24D4C 802B642C 0C039769 */  jal       set_action_state
D_802B6430:
/* E24D50 802B6430 00000000 */   nop
/* E24D54 802B6434 8FBF0024 */  lw        $ra, 0x24($sp)
/* E24D58 802B6438 8FB20020 */  lw        $s2, 0x20($sp)
/* E24D5C 802B643C 8FB1001C */  lw        $s1, 0x1C($sp)
/* E24D60 802B6440 8FB00018 */  lw        $s0, 0x18($sp)
/* E24D64 802B6444 03E00008 */  jr        $ra
.L802B6448:
/* E24D68 802B6448 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void action_update_peach_land(void) {
    CollisionStatus* collisionStatus = &gCollisionStatus;
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 inputMoveMagnitude;
    f32 inputMoveAngle;

    if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
        playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED;
        playerStatus->actionSubstate = SUBSTATE_INIT;
        playerStatus->timeInAir = 0;
        playerStatus->peakJumpTime = 0;
        playerStatus->flags &= ~PS_FLAG_AIRBORNE;
        playerStatus->landPos.x = playerStatus->position.x;
        playerStatus->landPos.z = playerStatus->position.z;

        sfx_play_sound_at_player(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0);

        if (!(collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT)) {
            phys_adjust_cam_on_landing();
        }

        collisionStatus->lastTouchedFloor = -1;
    }

    playerStatus->actionSubstate++; // SUBSTATE_DONE
    playerStatus->currentSpeed *= 0.6f;

    player_input_to_move_vector(&inputMoveAngle, &inputMoveMagnitude);

    if (inputMoveMagnitude == 0.0f) {
        set_action_state(ACTION_STATE_IDLE);
    } else {
        if (inputMoveMagnitude != 0.0f) {
            playerStatus->targetYaw = inputMoveAngle;
        }

        if (sqrtf(SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1])) > 55.0f) {
            set_action_state(ACTION_STATE_RUN);
        } else {
            set_action_state(ACTION_STATE_WALK);
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel create_battle_popup_menu
/* 8E5EC 800F513C 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 8E5F0 800F5140 AFB00010 */  sw        $s0, 0x10($sp)
/* 8E5F4 800F5144 3C108011 */  lui       $s0, %hi(gPopupMenu)
/* 8E5F8 800F5148 2610D69C */  addiu     $s0, $s0, %lo(gPopupMenu)
/* 8E5FC 800F514C AFBF0014 */  sw        $ra, 0x14($sp)
/* 8E600 800F5150 AE040000 */  sw        $a0, 0x0($s0)
/* 8E604 800F5154 90820323 */  lbu       $v0, 0x323($a0)
/* 8E608 800F5158 A480032C */  sh        $zero, 0x32C($a0)
/* 8E60C 800F515C 3C018011 */  lui       $at, %hi(D_8010D693)
/* 8E610 800F5160 A022D693 */  sb        $v0, %lo(D_8010D693)($at)
/* 8E614 800F5164 0C03A635 */  jal       func_800E98D4
/* 8E618 800F5168 00000000 */   nop
/* 8E61C 800F516C 3C048011 */  lui       $a0, %hi(PopupDipMode)
/* 8E620 800F5170 2484D699 */  addiu     $a0, $a0, %lo(PopupDipMode)
/* 8E624 800F5174 3C018011 */  lui       $at, %hi(D_8010D69A)
/* 8E628 800F5178 A022D69A */  sb        $v0, %lo(D_8010D69A)($at)
/* 8E62C 800F517C A0800000 */  sb        $zero, 0x0($a0)
/* 8E630 800F5180 8E100000 */  lw        $s0, 0x0($s0)
/* 8E634 800F5184 3C068011 */  lui       $a2, %hi(PopupNotDipping)
/* 8E638 800F5188 24C6D698 */  addiu     $a2, $a2, %lo(PopupNotDipping)
/* 8E63C 800F518C 8E030318 */  lw        $v1, 0x318($s0)
/* 8E640 800F5190 24050001 */  addiu     $a1, $zero, 0x1
/* 8E644 800F5194 28620064 */  slti      $v0, $v1, 0x64
/* 8E648 800F5198 1440000C */  bnez      $v0, .L800F51CC
/* 8E64C 800F519C A0C50000 */   sb       $a1, 0x0($a2)
/* 8E650 800F51A0 2462FF9C */  addiu     $v0, $v1, -0x64
/* 8E654 800F51A4 AE020318 */  sw        $v0, 0x318($s0)
/* 8E658 800F51A8 0040182D */  daddu     $v1, $v0, $zero
/* 8E65C 800F51AC 28620064 */  slti      $v0, $v1, 0x64
/* 8E660 800F51B0 14400005 */  bnez      $v0, .L800F51C8
/* 8E664 800F51B4 A0850000 */   sb       $a1, 0x0($a0)
/* 8E668 800F51B8 2462FF9C */  addiu     $v0, $v1, -0x64
/* 8E66C 800F51BC AE020318 */  sw        $v0, 0x318($s0)
/* 8E670 800F51C0 24020002 */  addiu     $v0, $zero, 0x2
/* 8E674 800F51C4 A0820000 */  sb        $v0, 0x0($a0)
.L800F51C8:
/* 8E678 800F51C8 A0C00000 */  sb        $zero, 0x0($a2)
.L800F51CC:
/* 8E67C 800F51CC 3C058011 */  lui       $a1, %hi(gPopupMenu)
/* 8E680 800F51D0 8CA5D69C */  lw        $a1, %lo(gPopupMenu)($a1)
/* 8E684 800F51D4 24020006 */  addiu     $v0, $zero, 0x6
/* 8E688 800F51D8 3C018011 */  lui       $at, %hi(PopupMenu_MaxDisplayableEntryCount)
/* 8E68C 800F51DC A022D68F */  sb        $v0, %lo(PopupMenu_MaxDisplayableEntryCount)($at)
/* 8E690 800F51E0 8CA20328 */  lw        $v0, 0x328($a1)
/* 8E694 800F51E4 8CA40324 */  lw        $a0, 0x324($a1)
/* 8E698 800F51E8 3C038011 */  lui       $v1, %hi(PopupMenu_SelectedIndex)
/* 8E69C 800F51EC 2463D648 */  addiu     $v1, $v1, %lo(PopupMenu_SelectedIndex)
/* 8E6A0 800F51F0 3C018011 */  lui       $at, %hi(PopupNotBattle)
/* 8E6A4 800F51F4 A020D68E */  sb        $zero, %lo(PopupNotBattle)($at)
/* 8E6A8 800F51F8 3C018011 */  lui       $at, %hi(gPopupState)
/* 8E6AC 800F51FC AC20D640 */  sw        $zero, %lo(gPopupState)($at)
/* 8E6B0 800F5200 AC620000 */  sw        $v0, 0x0($v1)
/* 8E6B4 800F5204 0044102A */  slt       $v0, $v0, $a0
/* 8E6B8 800F5208 14400002 */  bnez      $v0, .L800F5214
/* 8E6BC 800F520C 2482FFFF */   addiu    $v0, $a0, -0x1
/* 8E6C0 800F5210 AC620000 */  sw        $v0, 0x0($v1)
.L800F5214:
/* 8E6C4 800F5214 8C620000 */  lw        $v0, 0x0($v1)
/* 8E6C8 800F5218 3C048011 */  lui       $a0, %hi(PopupMenu_DisplayedEntryCount)
/* 8E6CC 800F521C 2484D656 */  addiu     $a0, $a0, %lo(PopupMenu_DisplayedEntryCount)
/* 8E6D0 800F5220 3C018011 */  lui       $at, %hi(PopupMenu_FirstDisplayIndex)
/* 8E6D4 800F5224 A020D654 */  sb        $zero, %lo(PopupMenu_FirstDisplayIndex)($at)
/* 8E6D8 800F5228 3C018011 */  lui       $at, %hi(PopupMenu_PrevSelectedIndex)
/* 8E6DC 800F522C AC22D64C */  sw        $v0, %lo(PopupMenu_PrevSelectedIndex)($at)
/* 8E6E0 800F5230 90A20327 */  lbu       $v0, 0x327($a1)
/* 8E6E4 800F5234 24030006 */  addiu     $v1, $zero, 0x6
/* 8E6E8 800F5238 A0820000 */  sb        $v0, 0x0($a0)
/* 8E6EC 800F523C 00021600 */  sll       $v0, $v0, 24
/* 8E6F0 800F5240 00021603 */  sra       $v0, $v0, 24
/* 8E6F4 800F5244 0062102A */  slt       $v0, $v1, $v0
/* 8E6F8 800F5248 54400001 */  bnel      $v0, $zero, .L800F5250
/* 8E6FC 800F524C A0830000 */   sb       $v1, 0x0($a0)
.L800F5250:
/* 8E700 800F5250 8CA20324 */  lw        $v0, 0x324($a1)
/* 8E704 800F5254 3C048011 */  lui       $a0, %hi(PopupMenu_LastDisplayIndex)
/* 8E708 800F5258 2484D655 */  addiu     $a0, $a0, %lo(PopupMenu_LastDisplayIndex)
/* 8E70C 800F525C 28420006 */  slti      $v0, $v0, 0x6
/* 8E710 800F5260 10400003 */  beqz      $v0, .L800F5270
/* 8E714 800F5264 A0830000 */   sb       $v1, 0x0($a0)
/* 8E718 800F5268 90A20327 */  lbu       $v0, 0x327($a1)
/* 8E71C 800F526C A0820000 */  sb        $v0, 0x0($a0)
.L800F5270:
/* 8E720 800F5270 240200FF */  addiu     $v0, $zero, 0xFF
/* 8E724 800F5274 3C018011 */  lui       $at, %hi(PopupMenu_Alpha)
/* 8E728 800F5278 AC22D650 */  sw        $v0, %lo(PopupMenu_Alpha)($at)
/* 8E72C 800F527C 24020009 */  addiu     $v0, $zero, 0x9
/* 8E730 800F5280 3C018011 */  lui       $at, %hi(D_8010D691)
/* 8E734 800F5284 A022D691 */  sb        $v0, %lo(D_8010D691)($at)
/* 8E738 800F5288 24020002 */  addiu     $v0, $zero, 0x2
/* 8E73C 800F528C 3C04800F */  lui       $a0, %hi(popup_menu_update)
/* 8E740 800F5290 24841A10 */  addiu     $a0, $a0, %lo(popup_menu_update)
/* 8E744 800F5294 3C018011 */  lui       $at, %hi(D_8010D692)
/* 8E748 800F5298 A022D692 */  sb        $v0, %lo(D_8010D692)($at)
/* 8E74C 800F529C 0C048C8F */  jal       create_worker_frontUI
/* 8E750 800F52A0 0000282D */   daddu    $a1, $zero, $zero
/* 8E754 800F52A4 8FBF0014 */  lw        $ra, 0x14($sp)
/* 8E758 800F52A8 8FB00010 */  lw        $s0, 0x10($sp)
/* 8E75C 800F52AC 3C018011 */  lui       $at, %hi(gPopupWorker)
/* 8E760 800F52B0 AC22D694 */  sw        $v0, %lo(gPopupWorker)($at)
/* 8E764 800F52B4 03E00008 */  jr        $ra
/* 8E768 800F52B8 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void create_battle_popup_menu(PopupMenu* popup) {
    gPopupMenu = popup;

    popup->result = POPUP_RESULT_CHOOSING;
    D_8010D693 = popup->titleNumber;
    D_8010D69A = func_800E98D4();
    PopupDipMode = 0;
    PopupNotDipping = TRUE;
    if (gPopupMenu->popupType >= POPUP_MENU_DOUBLE_DIP) {
        gPopupMenu->popupType -= POPUP_MENU_DOUBLE_DIP;
        PopupDipMode = 1;
        if (gPopupMenu->popupType >= POPUP_MENU_DOUBLE_DIP) {
            gPopupMenu->popupType -= POPUP_MENU_DOUBLE_DIP;
            PopupDipMode = 2;
        }
        PopupNotDipping = FALSE;
    }

    PopupNotBattle = FALSE;
    PopupMenu_MaxDisplayableEntryCount = 6;
    gPopupState = POPUP_STATE_INIT;
    PopupMenu_SelectedIndex = gPopupMenu->initialPos;
    if (PopupMenu_SelectedIndex >= gPopupMenu->numEntries) {
        PopupMenu_SelectedIndex = gPopupMenu->numEntries - 1;
    }
    PopupMenu_FirstDisplayIndex = 0;
    PopupMenu_PrevSelectedIndex = PopupMenu_SelectedIndex;
    PopupMenu_DisplayedEntryCount = gPopupMenu->numEntries;

    if (PopupMenu_DisplayedEntryCount > PopupMenu_MaxDisplayableEntryCount) {
        PopupMenu_DisplayedEntryCount = PopupMenu_MaxDisplayableEntryCount;
    }

    PopupMenu_LastDisplayIndex = PopupMenu_MaxDisplayableEntryCount;
    if (gPopupMenu->numEntries < PopupMenu_MaxDisplayableEntryCount) {
        PopupMenu_LastDisplayIndex = gPopupMenu->numEntries;
    }

    PopupMenu_Alpha = 255;
    D_8010D691 = 9;
    D_8010D692 = 2;
    gPopupWorker = create_worker_frontUI((void (*) (void)) popup_menu_update, NULL);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel partner_walking_enable
/* 84D58 800EB8A8 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 84D5C 800EB8AC AFB00010 */  sw        $s0, 0x10($sp)
/* 84D60 800EB8B0 0080802D */  daddu     $s0, $a0, $zero
/* 84D64 800EB8B4 3C078011 */  lui       $a3, %hi(gPlayerStatus)
/* 84D68 800EB8B8 24E7EFC8 */  addiu     $a3, $a3, %lo(gPlayerStatus)
/* 84D6C 800EB8BC 3C048011 */  lui       $a0, %hi(D_8010CD38)
/* 84D70 800EB8C0 2484CD38 */  addiu     $a0, $a0, %lo(D_8010CD38)
/* 84D74 800EB8C4 0000302D */  daddu     $a2, $zero, $zero
/* 84D78 800EB8C8 3C018010 */  lui       $at, %hi(wSavedPartnerPosX)
/* 84D7C 800EB8CC C420833C */  lwc1      $f0, %lo(wSavedPartnerPosX)($at)
/* 84D80 800EB8D0 3C018010 */  lui       $at, %hi(wSavedPartnerPosY)
/* 84D84 800EB8D4 C4228340 */  lwc1      $f2, %lo(wSavedPartnerPosY)($at)
/* 84D88 800EB8D8 3C018010 */  lui       $at, %hi(wSavedPartnerPosZ)
/* 84D8C 800EB8DC C4248344 */  lwc1      $f4, %lo(wSavedPartnerPosZ)($at)
/* 84D90 800EB8E0 2483000C */  addiu     $v1, $a0, 0xC
/* 84D94 800EB8E4 AFBF0014 */  sw        $ra, 0x14($sp)
/* 84D98 800EB8E8 E6000038 */  swc1      $f0, 0x38($s0)
/* 84D9C 800EB8EC E602003C */  swc1      $f2, 0x3C($s0)
/* 84DA0 800EB8F0 E6040040 */  swc1      $f4, 0x40($s0)
.L800EB8F4:
/* 84DA4 800EB8F4 C4E00028 */  lwc1      $f0, 0x28($a3)
/* 84DA8 800EB8F8 E460FFF8 */  swc1      $f0, -0x8($v1)
/* 84DAC 800EB8FC C4E0002C */  lwc1      $f0, 0x2C($a3)
/* 84DB0 800EB900 24C60001 */  addiu     $a2, $a2, 0x1
/* 84DB4 800EB904 E460FFFC */  swc1      $f0, -0x4($v1)
/* 84DB8 800EB908 C4E00030 */  lwc1      $f0, 0x30($a3)
/* 84DBC 800EB90C 28C20028 */  slti      $v0, $a2, 0x28
/* 84DC0 800EB910 E4600000 */  swc1      $f0, 0x0($v1)
/* 84DC4 800EB914 24630010 */  addiu     $v1, $v1, 0x10
/* 84DC8 800EB918 A0800000 */  sb        $zero, 0x0($a0)
/* 84DCC 800EB91C 1440FFF5 */  bnez      $v0, .L800EB8F4
/* 84DD0 800EB920 24840010 */   addiu    $a0, $a0, 0x10
/* 84DD4 800EB924 3C038011 */  lui       $v1, %hi(D_8010CFCA)
/* 84DD8 800EB928 2463CFCA */  addiu     $v1, $v1, %lo(D_8010CFCA)
/* 84DDC 800EB92C 3C018011 */  lui       $at, %hi(gPlayerMoveHistoryIndex)
/* 84DE0 800EB930 AC20CFB8 */  sw        $zero, %lo(gPlayerMoveHistoryIndex)($at)
/* 84DE4 800EB934 3C018011 */  lui       $at, %hi(D_8010CFBC)
/* 84DE8 800EB938 AC20CFBC */  sw        $zero, %lo(D_8010CFBC)($at)
/* 84DEC 800EB93C 10A00003 */  beqz      $a1, .L800EB94C
/* 84DF0 800EB940 24020002 */   addiu    $v0, $zero, 0x2
/* 84DF4 800EB944 0803AE54 */  j         .L800EB950
/* 84DF8 800EB948 A4620000 */   sh       $v0, 0x0($v1)
.L800EB94C:
/* 84DFC 800EB94C A4600000 */  sh        $zero, 0x0($v1)
.L800EB950:
/* 84E00 800EB950 3C048011 */  lui       $a0, %hi(wPartnerFollowState)
/* 84E04 800EB954 2484CFC8 */  addiu     $a0, $a0, %lo(wPartnerFollowState)
/* 84E08 800EB958 3C058011 */  lui       $a1, %hi(D_8010CFC4)
/* 84E0C 800EB95C 24A5CFC4 */  addiu     $a1, $a1, %lo(D_8010CFC4)
/* 84E10 800EB960 A4800000 */  sh        $zero, 0x0($a0)
/* 84E14 800EB964 8CA30000 */  lw        $v1, 0x0($a1)
/* 84E18 800EB968 24020001 */  addiu     $v0, $zero, 0x1
/* 84E1C 800EB96C 10620003 */  beq       $v1, $v0, .L800EB97C
/* 84E20 800EB970 24020003 */   addiu    $v0, $zero, 0x3
/* 84E24 800EB974 14620006 */  bne       $v1, $v0, .L800EB990
/* 84E28 800EB978 24020002 */   addiu    $v0, $zero, 0x2
.L800EB97C:
/* 84E2C 800EB97C ACA00000 */  sw        $zero, 0x0($a1)
/* 84E30 800EB980 3C018011 */  lui       $at, %hi(D_8010CFCA)
/* 84E34 800EB984 A420CFCA */  sh        $zero, %lo(D_8010CFCA)($at)
/* 84E38 800EB988 0803AE69 */  j         .L800EB9A4
/* 84E3C 800EB98C A4800000 */   sh       $zero, 0x0($a0)
.L800EB990:
/* 84E40 800EB990 14620004 */  bne       $v1, $v0, .L800EB9A4
/* 84E44 800EB994 24020032 */   addiu    $v0, $zero, 0x32
/* 84E48 800EB998 3C018011 */  lui       $at, %hi(D_8010CFCA)
/* 84E4C 800EB99C A420CFCA */  sh        $zero, %lo(D_8010CFCA)($at)
/* 84E50 800EB9A0 A4820000 */  sh        $v0, 0x0($a0)
.L800EB9A4:
/* 84E54 800EB9A4 3C038011 */  lui       $v1, %hi(wCurrentPartnerId)
/* 84E58 800EB9A8 8C63CFD8 */  lw        $v1, %lo(wCurrentPartnerId)($v1)
/* 84E5C 800EB9AC 3C014220 */  lui       $at, (0x42200000 >> 16)
/* 84E60 800EB9B0 44810000 */  mtc1      $at, $f0
/* 84E64 800EB9B4 0200202D */  daddu     $a0, $s0, $zero
/* 84E68 800EB9B8 3C018011 */  lui       $at, %hi(D_8010CFCE)
/* 84E6C 800EB9BC A420CFCE */  sh        $zero, %lo(D_8010CFCE)($at)
/* 84E70 800EB9C0 3C018011 */  lui       $at, %hi(D_8010CFCC)
/* 84E74 800EB9C4 A420CFCC */  sh        $zero, %lo(D_8010CFCC)($at)
/* 84E78 800EB9C8 000310C0 */  sll       $v0, $v1, 3
/* 84E7C 800EB9CC 00431021 */  addu      $v0, $v0, $v1
/* 84E80 800EB9D0 00021080 */  sll       $v0, $v0, 2
/* 84E84 800EB9D4 3C038010 */  lui       $v1, %hi(gPartnerAnimations + 0x14)
/* 84E88 800EB9D8 00621821 */  addu      $v1, $v1, $v0
/* 84E8C 800EB9DC 8C63835C */  lw        $v1, %lo(gPartnerAnimations + 0x14)($v1)
/* 84E90 800EB9E0 24020010 */  addiu     $v0, $zero, 0x10
/* 84E94 800EB9E4 3C018010 */  lui       $at, %hi(wPartnerMoveTime)
/* 84E98 800EB9E8 AC22802C */  sw        $v0, %lo(wPartnerMoveTime)($at)
/* 84E9C 800EB9EC 3C018011 */  lui       $at, %hi(wPartnerTetherDistance)
/* 84EA0 800EB9F0 E420CFC0 */  swc1      $f0, %lo(wPartnerTetherDistance)($at)
/* 84EA4 800EB9F4 0C03A96E */  jal       func_800EA5B8
/* 84EA8 800EB9F8 AE030028 */   sw       $v1, 0x28($s0)
/* 84EAC 800EB9FC 3C030040 */  lui       $v1, (0x400300 >> 16)
/* 84EB0 800EBA00 3C020001 */  lui       $v0, (0x10000 >> 16)
/* 84EB4 800EBA04 AE020080 */  sw        $v0, 0x80($s0)
/* 84EB8 800EBA08 8E020000 */  lw        $v0, 0x0($s0)
/* 84EBC 800EBA0C 3C013FE6 */  lui       $at, (0x3FE66666 >> 16)
/* 84EC0 800EBA10 34216666 */  ori       $at, $at, (0x3FE66666 & 0xFFFF)
/* 84EC4 800EBA14 44810000 */  mtc1      $at, $f0
/* 84EC8 800EBA18 34630300 */  ori       $v1, $v1, (0x400300 & 0xFFFF)
/* 84ECC 800EBA1C AE00001C */  sw        $zero, 0x1C($s0)
/* 84ED0 800EBA20 00431025 */  or        $v0, $v0, $v1
/* 84ED4 800EBA24 AE020000 */  sw        $v0, 0x0($s0)
/* 84ED8 800EBA28 E6000014 */  swc1      $f0, 0x14($s0)
/* 84EDC 800EBA2C 8FBF0014 */  lw        $ra, 0x14($sp)
/* 84EE0 800EBA30 8FB00010 */  lw        $s0, 0x10($sp)
/* 84EE4 800EBA34 03E00008 */  jr        $ra
/* 84EE8 800EBA38 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void partner_walking_enable(Npc* partner, s32 val) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    PlayerPathElement* it = gPlayerMoveHistory;
    s32 i;

    partner->pos.x = wSavedPartnerPosX;
    partner->pos.y = wSavedPartnerPosY;
    partner->pos.z = wSavedPartnerPosZ;

    for (i = 0; i < ARRAY_COUNT(gPlayerMoveHistory); i++, it++) {
        it->pos.x = playerStatus->position.x;
        it->pos.y = playerStatus->position.y;
        it->pos.z = playerStatus->position.z;
        it->isJumping = FALSE;
    }

    gPlayerMoveHistoryIndex = 0;
    D_8010CFBC = 0;
    D_8010CFCA = val ? 2 : 0;
    wPartnerFollowState = 0;

    if (D_8010CFC4 == 1 || D_8010CFC4 == 3) {
        D_8010CFC4 = 0;
        D_8010CFCA = 0;
        wPartnerFollowState = 0;
    } else if (D_8010CFC4 == 2) {
        D_8010CFCA = 0;
        wPartnerFollowState = 50;
    }

    D_8010CFCE = 0;
    D_8010CFCC = 0;
    wPartnerMoveTime = 16;
    wPartnerTetherDistance = 40.0f;
    partner->currentAnim = gPartnerAnimations[wCurrentPartnerId].idle;
    func_800EA5B8(partner);
    partner->collisionChannel = COLLISION_CHANNEL_10000;
    partner->jumpVelocity = 0.0f;
    partner->flags |= NPC_FLAG_TOUCHES_GROUND | NPC_FLAG_GRAVITY | NPC_FLAG_IGNORE_PLAYER_COLLISION;
    partner->jumpScale = 1.8f;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel btl_appendGfx_prim_quad
/* 19615C 8026787C 27BDFFF8 */  addiu     $sp, $sp, -0x8
/* 196160 80267880 0080602D */  daddu     $t4, $a0, $zero
/* 196164 80267884 00A0682D */  daddu     $t5, $a1, $zero
/* 196168 80267888 00E0582D */  daddu     $t3, $a3, $zero
/* 19616C 8026788C 3C08800A */  lui       $t0, %hi(gMainGfxPos)
/* 196170 80267890 2508A66C */  addiu     $t0, $t0, %lo(gMainGfxPos)
/* 196174 80267894 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 196178 80267898 AFB00000 */  sw        $s0, 0x0($sp)
/* 19617C 8026789C 8D070000 */  lw        $a3, 0x0($t0)
/* 196180 802678A0 97B9001A */  lhu       $t9, 0x1A($sp)
/* 196184 802678A4 97B0001E */  lhu       $s0, 0x1E($sp)
/* 196188 802678A8 97AF0022 */  lhu       $t7, 0x22($sp)
/* 19618C 802678AC 97B80026 */  lhu       $t8, 0x26($sp)
/* 196190 802678B0 00E0182D */  daddu     $v1, $a3, $zero
/* 196194 802678B4 24E70008 */  addiu     $a3, $a3, 0x8
/* 196198 802678B8 AD070000 */  sw        $a3, 0x0($t0)
/* 19619C 802678BC AC620000 */  sw        $v0, 0x0($v1)
/* 1961A0 802678C0 24E20008 */  addiu     $v0, $a3, 0x8
/* 1961A4 802678C4 AC600004 */  sw        $zero, 0x4($v1)
/* 1961A8 802678C8 AD020000 */  sw        $v0, 0x0($t0)
/* 1961AC 802678CC 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 1961B0 802678D0 ACE20000 */  sw        $v0, 0x0($a3)
/* 1961B4 802678D4 3C028029 */  lui       $v0, %hi(D_80293970)
/* 1961B8 802678D8 24423970 */  addiu     $v0, $v0, %lo(D_80293970)
/* 1961BC 802678DC 316300FF */  andi      $v1, $t3, 0xFF
/* 1961C0 802678E0 ACE20004 */  sw        $v0, 0x4($a3)
/* 1961C4 802678E4 240200FF */  addiu     $v0, $zero, 0xFF
/* 1961C8 802678E8 1462000A */  bne       $v1, $v0, .L80267914
/* 1961CC 802678EC 00C0702D */   daddu    $t6, $a2, $zero
/* 1961D0 802678F0 3C05E200 */  lui       $a1, (0xE200001C >> 16)
/* 1961D4 802678F4 34A5001C */  ori       $a1, $a1, (0xE200001C & 0xFFFF)
/* 1961D8 802678F8 3C030F0A */  lui       $v1, (0xF0A4000 >> 16)
/* 1961DC 802678FC 34634000 */  ori       $v1, $v1, (0xF0A4000 & 0xFFFF)
/* 1961E0 80267900 3C06FCFF */  lui       $a2, (0xFCFFFFFF >> 16)
/* 1961E4 80267904 34C6FFFF */  ori       $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* 1961E8 80267908 3C04FFFD */  lui       $a0, (0xFFFDFCFE >> 16)
/* 1961EC 8026790C 08099E4D */  j         .L80267934
/* 1961F0 80267910 3484FCFE */   ori      $a0, $a0, (0xFFFDFCFE & 0xFFFF)
.L80267914:
/* 1961F4 80267914 3C05E200 */  lui       $a1, (0xE200001C >> 16)
/* 1961F8 80267918 34A5001C */  ori       $a1, $a1, (0xE200001C & 0xFFFF)
/* 1961FC 8026791C 3C030050 */  lui       $v1, (0x504240 >> 16)
/* 196200 80267920 34634240 */  ori       $v1, $v1, (0x504240 & 0xFFFF)
/* 196204 80267924 3C06FCFF */  lui       $a2, (0xFCFFFFFF >> 16)
/* 196208 80267928 34C6FFFF */  ori       $a2, $a2, (0xFCFFFFFF & 0xFFFF)
/* 19620C 8026792C 3C04FFFD */  lui       $a0, (0xFFFDF6FB >> 16)
/* 196210 80267930 3484F6FB */  ori       $a0, $a0, (0xFFFDF6FB & 0xFFFF)
.L80267934:
/* 196214 80267934 24E20010 */  addiu     $v0, $a3, 0x10
/* 196218 80267938 AD020000 */  sw        $v0, 0x0($t0)
/* 19621C 8026793C 24E20018 */  addiu     $v0, $a3, 0x18
/* 196220 80267940 ACE50008 */  sw        $a1, 0x8($a3)
/* 196224 80267944 ACE3000C */  sw        $v1, 0xC($a3)
/* 196228 80267948 AD020000 */  sw        $v0, 0x0($t0)
/* 19622C 8026794C ACE60010 */  sw        $a2, 0x10($a3)
/* 196230 80267950 ACE40014 */  sw        $a0, 0x14($a3)
/* 196234 80267954 3C09E200 */  lui       $t1, (0xE200001C >> 16)
/* 196238 80267958 3529001C */  ori       $t1, $t1, (0xE200001C & 0xFFFF)
/* 19623C 8026795C 3C070F0A */  lui       $a3, (0xF0A7008 >> 16)
/* 196240 80267960 34E77008 */  ori       $a3, $a3, (0xF0A7008 & 0xFFFF)
/* 196244 80267964 3C0AFCFF */  lui       $t2, (0xFCFFFFFF >> 16)
/* 196248 80267968 354AFFFF */  ori       $t2, $t2, (0xFCFFFFFF & 0xFFFF)
/* 19624C 8026796C 3C08FFFC */  lui       $t0, (0xFFFCF279 >> 16)
/* 196250 80267970 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 196254 80267974 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 196258 80267978 3508F279 */  ori       $t0, $t0, (0xFFFCF279 & 0xFFFF)
/* 19625C 8026797C 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 196260 80267980 8CC50000 */  lw        $a1, 0x0($a2)
/* 196264 80267984 000C1E00 */  sll       $v1, $t4, 24
/* 196268 80267988 00A0202D */  daddu     $a0, $a1, $zero
/* 19626C 8026798C 24A50008 */  addiu     $a1, $a1, 0x8
/* 196270 80267990 ACC50000 */  sw        $a1, 0x0($a2)
/* 196274 80267994 AC820000 */  sw        $v0, 0x0($a0)
/* 196278 80267998 31A200FF */  andi      $v0, $t5, 0xFF
/* 19627C 8026799C 00021400 */  sll       $v0, $v0, 16
/* 196280 802679A0 00621825 */  or        $v1, $v1, $v0
/* 196284 802679A4 31C200FF */  andi      $v0, $t6, 0xFF
/* 196288 802679A8 00021200 */  sll       $v0, $v0, 8
/* 19628C 802679AC 00621825 */  or        $v1, $v1, $v0
/* 196290 802679B0 316200FF */  andi      $v0, $t3, 0xFF
/* 196294 802679B4 00621825 */  or        $v1, $v1, $v0
/* 196298 802679B8 24A20008 */  addiu     $v0, $a1, 0x8
/* 19629C 802679BC AC830004 */  sw        $v1, 0x4($a0)
/* 1962A0 802679C0 31E403FF */  andi      $a0, $t7, 0x3FF
/* 1962A4 802679C4 00042380 */  sll       $a0, $a0, 14
/* 1962A8 802679C8 ACC20000 */  sw        $v0, 0x0($a2)
/* 1962AC 802679CC 330203FF */  andi      $v0, $t8, 0x3FF
/* 1962B0 802679D0 00021080 */  sll       $v0, $v0, 2
/* 1962B4 802679D4 3C03F600 */  lui       $v1, (0xF6000000 >> 16)
/* 1962B8 802679D8 00431025 */  or        $v0, $v0, $v1
/* 1962BC 802679DC 00822025 */  or        $a0, $a0, $v0
/* 1962C0 802679E0 332303FF */  andi      $v1, $t9, 0x3FF
/* 1962C4 802679E4 00031B80 */  sll       $v1, $v1, 14
/* 1962C8 802679E8 320203FF */  andi      $v0, $s0, 0x3FF
/* 1962CC 802679EC 00021080 */  sll       $v0, $v0, 2
/* 1962D0 802679F0 00621825 */  or        $v1, $v1, $v0
/* 1962D4 802679F4 24A20010 */  addiu     $v0, $a1, 0x10
/* 1962D8 802679F8 ACA40000 */  sw        $a0, 0x0($a1)
/* 1962DC 802679FC ACA30004 */  sw        $v1, 0x4($a1)
/* 1962E0 80267A00 ACC20000 */  sw        $v0, 0x0($a2)
/* 1962E4 80267A04 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 1962E8 80267A08 ACA20008 */  sw        $v0, 0x8($a1)
/* 1962EC 80267A0C 24A20018 */  addiu     $v0, $a1, 0x18
/* 1962F0 80267A10 ACA0000C */  sw        $zero, 0xC($a1)
/* 1962F4 80267A14 ACC20000 */  sw        $v0, 0x0($a2)
/* 1962F8 80267A18 24A20020 */  addiu     $v0, $a1, 0x20
/* 1962FC 80267A1C ACA90010 */  sw        $t1, 0x10($a1)
/* 196300 80267A20 ACA70014 */  sw        $a3, 0x14($a1)
/* 196304 80267A24 ACC20000 */  sw        $v0, 0x0($a2)
/* 196308 80267A28 ACAA0018 */  sw        $t2, 0x18($a1)
/* 19630C 80267A2C ACA8001C */  sw        $t0, 0x1C($a1)
/* 196310 80267A30 8FB00000 */  lw        $s0, 0x0($sp)
/* 196314 80267A34 03E00008 */  jr        $ra
/* 196318 80267A38 27BD0008 */   addiu    $sp, $sp, 0x8

### DECOMPILED C INSTRUCTIONS:

void btl_appendGfx_prim_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
    gDPPipeSync(gMainGfxPos++);
    gSPDisplayList(gMainGfxPos++, D_80293970);

    if (a == 255) {
        gDPSetRenderMode(gMainGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
        gDPSetCombineMode(gMainGfxPos++, PM_CC_08, PM_CC_08);
    } else {
        gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
        gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
    }

    gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, a);
    gDPFillRectangle(gMainGfxPos++, left, top, right, bottom);

    gDPPipeSync(gMainGfxPos++);
    gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
    gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel render_transform_group_node
/* AE574 80117E74 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* AE578 80117E78 AFB20018 */  sw        $s2, 0x18($sp)
/* AE57C 80117E7C 0080902D */  daddu     $s2, $a0, $zero
/* AE580 80117E80 AFB3001C */  sw        $s3, 0x1C($sp)
/* AE584 80117E84 3C13800A */  lui       $s3, %hi(gMainGfxPos)
/* AE588 80117E88 2673A66C */  addiu     $s3, $s3, %lo(gMainGfxPos)
/* AE58C 80117E8C AFBF0020 */  sw        $ra, 0x20($sp)
/* AE590 80117E90 AFB10014 */  sw        $s1, 0x14($sp)
/* AE594 80117E94 12400056 */  beqz      $s2, .L80117FF0
/* AE598 80117E98 AFB00010 */   sw       $s0, 0x10($sp)
/* AE59C 80117E9C 8E430000 */  lw        $v1, 0x0($s2)
/* AE5A0 80117EA0 24020005 */  addiu     $v0, $zero, 0x5
/* AE5A4 80117EA4 14620017 */  bne       $v1, $v0, .L80117F04
/* AE5A8 80117EA8 24020002 */   addiu    $v0, $zero, 0x2
/* AE5AC 80117EAC 0C0456C3 */  jal       get_model_property
/* AE5B0 80117EB0 24050060 */   addiu    $a1, $zero, 0x60
/* AE5B4 80117EB4 10400011 */  beqz      $v0, .L80117EFC
/* AE5B8 80117EB8 00000000 */   nop
/* AE5BC 80117EBC 8C420008 */  lw        $v0, 0x8($v0)
/* AE5C0 80117EC0 1040000E */  beqz      $v0, .L80117EFC
/* AE5C4 80117EC4 00000000 */   nop
/* AE5C8 80117EC8 3C108015 */  lui       $s0, %hi(mdl_currentTransformGroupChildIndex)
/* AE5CC 80117ECC 2610336C */  addiu     $s0, $s0, %lo(mdl_currentTransformGroupChildIndex)
/* AE5D0 80117ED0 0C046B4C */  jal       get_model_from_list_index
/* AE5D4 80117ED4 96040000 */   lhu      $a0, 0x0($s0)
/* AE5D8 80117ED8 0040202D */  daddu     $a0, $v0, $zero
/* AE5DC 80117EDC 94820000 */  lhu       $v0, 0x0($a0)
/* AE5E0 80117EE0 30420002 */  andi      $v0, $v0, 0x2
/* AE5E4 80117EE4 1440003F */  bnez      $v0, .L80117FE4
/* AE5E8 80117EE8 00000000 */   nop
/* AE5EC 80117EEC 0C045F25 */  jal       appendGfx_model_group
/* AE5F0 80117EF0 00000000 */   nop
/* AE5F4 80117EF4 08045FF9 */  j         .L80117FE4
/* AE5F8 80117EF8 00000000 */   nop
.L80117EFC:
/* AE5FC 80117EFC 8E430000 */  lw        $v1, 0x0($s2)
/* AE600 80117F00 24020002 */  addiu     $v0, $zero, 0x2
.L80117F04:
/* AE604 80117F04 1062002C */  beq       $v1, $v0, .L80117FB8
/* AE608 80117F08 00000000 */   nop
/* AE60C 80117F0C 8E420010 */  lw        $v0, 0x10($s2)
/* AE610 80117F10 10400037 */  beqz      $v0, .L80117FF0
/* AE614 80117F14 00000000 */   nop
/* AE618 80117F18 8C420000 */  lw        $v0, 0x0($v0)
/* AE61C 80117F1C 10400009 */  beqz      $v0, .L80117F44
/* AE620 80117F20 3C02DA38 */   lui      $v0, (0xDA380000 >> 16)
/* AE624 80117F24 8E630000 */  lw        $v1, 0x0($s3)
/* AE628 80117F28 0060202D */  daddu     $a0, $v1, $zero
/* AE62C 80117F2C AC820000 */  sw        $v0, 0x0($a0)
/* AE630 80117F30 8E420010 */  lw        $v0, 0x10($s2)
/* AE634 80117F34 8C420000 */  lw        $v0, 0x0($v0)
/* AE638 80117F38 24630008 */  addiu     $v1, $v1, 0x8
/* AE63C 80117F3C AE630000 */  sw        $v1, 0x0($s3)
/* AE640 80117F40 AC820004 */  sw        $v0, 0x4($a0)
.L80117F44:
/* AE644 80117F44 8E420010 */  lw        $v0, 0x10($s2)
/* AE648 80117F48 8C51000C */  lw        $s1, 0xC($v0)
/* AE64C 80117F4C 1220000E */  beqz      $s1, .L80117F88
/* AE650 80117F50 00000000 */   nop
/* AE654 80117F54 1A20000C */  blez      $s1, .L80117F88
/* AE658 80117F58 0000802D */   daddu    $s0, $zero, $zero
.L80117F5C:
/* AE65C 80117F5C 8E420010 */  lw        $v0, 0x10($s2)
/* AE660 80117F60 8C430010 */  lw        $v1, 0x10($v0)
/* AE664 80117F64 00101080 */  sll       $v0, $s0, 2
/* AE668 80117F68 00431021 */  addu      $v0, $v0, $v1
/* AE66C 80117F6C 8C440000 */  lw        $a0, 0x0($v0)
/* AE670 80117F70 0C045F9D */  jal       render_transform_group_node
/* AE674 80117F74 26100001 */   addiu    $s0, $s0, 0x1
/* AE678 80117F78 0211102A */  slt       $v0, $s0, $s1
/* AE67C 80117F7C 1440FFF7 */  bnez      $v0, .L80117F5C
/* AE680 80117F80 00000000 */   nop
/* AE684 80117F84 8E420010 */  lw        $v0, 0x10($s2)
.L80117F88:
/* AE688 80117F88 8C420000 */  lw        $v0, 0x0($v0)
/* AE68C 80117F8C 10400018 */  beqz      $v0, .L80117FF0
/* AE690 80117F90 3C04D838 */   lui      $a0, (0xD8380002 >> 16)
/* AE694 80117F94 8E620000 */  lw        $v0, 0x0($s3)
/* AE698 80117F98 34840002 */  ori       $a0, $a0, (0xD8380002 & 0xFFFF)
/* AE69C 80117F9C 0040182D */  daddu     $v1, $v0, $zero
/* AE6A0 80117FA0 24420008 */  addiu     $v0, $v0, 0x8
/* AE6A4 80117FA4 AE620000 */  sw        $v0, 0x0($s3)
/* AE6A8 80117FA8 24020040 */  addiu     $v0, $zero, 0x40
/* AE6AC 80117FAC AC640000 */  sw        $a0, 0x0($v1)
/* AE6B0 80117FB0 08045FFC */  j         .L80117FF0
/* AE6B4 80117FB4 AC620004 */   sw       $v0, 0x4($v1)
.L80117FB8:
/* AE6B8 80117FB8 3C108015 */  lui       $s0, %hi(mdl_currentTransformGroupChildIndex)
/* AE6BC 80117FBC 2610336C */  addiu     $s0, $s0, %lo(mdl_currentTransformGroupChildIndex)
/* AE6C0 80117FC0 0C046B4C */  jal       get_model_from_list_index
/* AE6C4 80117FC4 96040000 */   lhu      $a0, 0x0($s0)
/* AE6C8 80117FC8 0040202D */  daddu     $a0, $v0, $zero
/* AE6CC 80117FCC 94820000 */  lhu       $v0, 0x0($a0)
/* AE6D0 80117FD0 30420002 */  andi      $v0, $v0, 0x2
/* AE6D4 80117FD4 14400003 */  bnez      $v0, .L80117FE4
/* AE6D8 80117FD8 00000000 */   nop
/* AE6DC 80117FDC 0C044C24 */  jal       appendGfx_model
/* AE6E0 80117FE0 00000000 */   nop
.L80117FE4:
/* AE6E4 80117FE4 96020000 */  lhu       $v0, 0x0($s0)
/* AE6E8 80117FE8 24420001 */  addiu     $v0, $v0, 0x1
/* AE6EC 80117FEC A6020000 */  sh        $v0, 0x0($s0)
.L80117FF0:
/* AE6F0 80117FF0 8FBF0020 */  lw        $ra, 0x20($sp)
/* AE6F4 80117FF4 8FB3001C */  lw        $s3, 0x1C($sp)
/* AE6F8 80117FF8 8FB20018 */  lw        $s2, 0x18($sp)
/* AE6FC 80117FFC 8FB10014 */  lw        $s1, 0x14($sp)
/* AE700 80118000 8FB00010 */  lw        $s0, 0x10($sp)
/* AE704 80118004 03E00008 */  jr        $ra
/* AE708 80118008 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void render_transform_group_node(ModelNode* node) {
    Gfx** gfx = &gMainGfxPos;
    Model* model;

    if (node != NULL) {
        if (node->type == SHAPE_TYPE_GROUP) {
            ModelNodeProperty* groupTypeProp = get_model_property(node, MODEL_PROP_KEY_GROUP_TYPE);

            if (groupTypeProp != NULL && groupTypeProp->data.s != 0) {
                model = get_model_from_list_index(mdl_currentTransformGroupChildIndex);
                if (!(model->flags & MODEL_FLAG_HIDDEN)) {
                    appendGfx_model_group(model);
                }
                mdl_currentTransformGroupChildIndex++;
                return;
            }
        }
        if (node->type != SHAPE_TYPE_MODEL) {
            if (node->groupData != NULL) {
                s32 numChildren;
                s32 i;

                if (node->groupData->transformMatrix != NULL) {
                    gSPMatrix((*gfx)++, node->groupData->transformMatrix,
                              G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
                }

                numChildren = node->groupData->numChildren;
                if (numChildren != 0) {
                    for (i = 0; i < numChildren; i++) {
                        render_transform_group_node(node->groupData->childList[i]);
                    }
                }

                if (node->groupData->transformMatrix != NULL) {
                    gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
                }
            }
            return;
        }

        model = get_model_from_list_index(mdl_currentTransformGroupChildIndex);
        if (!(model->flags & MODEL_FLAG_HIDDEN)) {
            appendGfx_model(model);
        }
        mdl_currentTransformGroupChildIndex++;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel initialize_printer
/* BBDA4 801256A4 0000182D */  daddu     $v1, $zero, $zero
/* BBDA8 801256A8 2406FFFF */  addiu     $a2, $zero, -0x1
/* BBDAC 801256AC 0080282D */  daddu     $a1, $a0, $zero
/* BBDB0 801256B0 24020440 */  addiu     $v0, $zero, 0x440
/* BBDB4 801256B4 A4820450 */  sh        $v0, 0x450($a0)
/* BBDB8 801256B8 240200FB */  addiu     $v0, $zero, 0xFB
/* BBDBC 801256BC A0820010 */  sb        $v0, 0x10($a0)
/* BBDC0 801256C0 24020001 */  addiu     $v0, $zero, 0x1
/* BBDC4 801256C4 A082045E */  sb        $v0, 0x45E($a0)
/* BBDC8 801256C8 A082045F */  sb        $v0, 0x45F($a0)
/* BBDCC 801256CC 24020006 */  addiu     $v0, $zero, 0x6
/* BBDD0 801256D0 A0820464 */  sb        $v0, 0x464($a0)
/* BBDD4 801256D4 240200FF */  addiu     $v0, $zero, 0xFF
/* BBDD8 801256D8 AC800000 */  sw        $zero, 0x0($a0)
/* BBDDC 801256DC AC800008 */  sw        $zero, 0x8($a0)
/* BBDE0 801256E0 A480000E */  sh        $zero, 0xE($a0)
/* BBDE4 801256E4 A4800456 */  sh        $zero, 0x456($a0)
/* BBDE8 801256E8 A4800458 */  sh        $zero, 0x458($a0)
/* BBDEC 801256EC A480045A */  sh        $zero, 0x45A($a0)
/* BBDF0 801256F0 A480045C */  sh        $zero, 0x45C($a0)
/* BBDF4 801256F4 A080047C */  sb        $zero, 0x47C($a0)
/* BBDF8 801256F8 A480047E */  sh        $zero, 0x47E($a0)
/* BBDFC 801256FC A4800482 */  sh        $zero, 0x482($a0)
/* BBE00 80125700 A4800484 */  sh        $zero, 0x484($a0)
/* BBE04 80125704 A0800486 */  sb        $zero, 0x486($a0)
/* BBE08 80125708 A0800487 */  sb        $zero, 0x487($a0)
/* BBE0C 8012570C A08004CE */  sb        $zero, 0x4CE($a0)
/* BBE10 80125710 A08004E9 */  sb        $zero, 0x4E9($a0)
/* BBE14 80125714 A08004E8 */  sb        $zero, 0x4E8($a0)
/* BBE18 80125718 A08004EE */  sb        $zero, 0x4EE($a0)
/* BBE1C 8012571C A08204EA */  sb        $v0, 0x4EA($a0)
/* BBE20 80125720 A08004F8 */  sb        $zero, 0x4F8($a0)
/* BBE24 80125724 AC8004FC */  sw        $zero, 0x4FC($a0)
/* BBE28 80125728 A4800500 */  sh        $zero, 0x500($a0)
/* BBE2C 8012572C AC800504 */  sw        $zero, 0x504($a0)
/* BBE30 80125730 A4800004 */  sh        $zero, 0x4($a0)
/* BBE34 80125734 A480000C */  sh        $zero, 0xC($a0)
/* BBE38 80125738 A0800454 */  sb        $zero, 0x454($a0)
/* BBE3C 8012573C A0800455 */  sb        $zero, 0x455($a0)
/* BBE40 80125740 A4800452 */  sh        $zero, 0x452($a0)
/* BBE44 80125744 AC800460 */  sw        $zero, 0x460($a0)
/* BBE48 80125748 AC80046C */  sw        $zero, 0x46C($a0)
/* BBE4C 8012574C A0800468 */  sb        $zero, 0x468($a0)
.L80125750:
/* BBE50 80125750 00831021 */  addu      $v0, $a0, $v1
/* BBE54 80125754 A0400470 */  sb        $zero, 0x470($v0)
/* BBE58 80125758 A4A60474 */  sh        $a2, 0x474($a1)
/* BBE5C 8012575C 24630001 */  addiu     $v1, $v1, 0x1
/* BBE60 80125760 28620004 */  slti      $v0, $v1, 0x4
/* BBE64 80125764 1440FFFA */  bnez      $v0, .L80125750
/* BBE68 80125768 24A50002 */   addiu    $a1, $a1, 0x2
/* BBE6C 8012576C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* BBE70 80125770 44810000 */  mtc1      $at, $f0
/* BBE74 80125774 240200A0 */  addiu     $v0, $zero, 0xA0
/* BBE78 80125778 A482050A */  sh        $v0, 0x50A($a0)
/* BBE7C 8012577C 24020028 */  addiu     $v0, $zero, 0x28
/* BBE80 80125780 A482050C */  sh        $v0, 0x50C($a0)
/* BBE84 80125784 2402FFFF */  addiu     $v0, $zero, -0x1
/* BBE88 80125788 A0820518 */  sb        $v0, 0x518($a0)
/* BBE8C 8012578C 24020040 */  addiu     $v0, $zero, 0x40
/* BBE90 80125790 A082051A */  sb        $v0, 0x51A($a0)
/* BBE94 80125794 2402004B */  addiu     $v0, $zero, 0x4B
/* BBE98 80125798 A0820519 */  sb        $v0, 0x519($a0)
/* BBE9C 8012579C 240200FF */  addiu     $v0, $zero, 0xFF
/* BBEA0 801257A0 A480047E */  sh        $zero, 0x47E($a0)
/* BBEA4 801257A4 A0800508 */  sb        $zero, 0x508($a0)
/* BBEA8 801257A8 A0800509 */  sb        $zero, 0x509($a0)
/* BBEAC 801257AC A480050E */  sh        $zero, 0x50E($a0)
/* BBEB0 801257B0 A4800510 */  sh        $zero, 0x510($a0)
/* BBEB4 801257B4 A0800512 */  sb        $zero, 0x512($a0)
/* BBEB8 801257B8 A4800516 */  sh        $zero, 0x516($a0)
/* BBEBC 801257BC A4800514 */  sh        $zero, 0x514($a0)
/* BBEC0 801257C0 A480051C */  sh        $zero, 0x51C($a0)
/* BBEC4 801257C4 AC800520 */  sw        $zero, 0x520($a0)
/* BBEC8 801257C8 AC800524 */  sw        $zero, 0x524($a0)
/* BBECC 801257CC A4800528 */  sh        $zero, 0x528($a0)
/* BBED0 801257D0 A080052B */  sb        $zero, 0x52B($a0)
/* BBED4 801257D4 A480052C */  sh        $zero, 0x52C($a0)
/* BBED8 801257D8 A480052E */  sh        $zero, 0x52E($a0)
/* BBEDC 801257DC A0800530 */  sb        $zero, 0x530($a0)
/* BBEE0 801257E0 A0820531 */  sb        $v0, 0x531($a0)
/* BBEE4 801257E4 A0800533 */  sb        $zero, 0x533($a0)
/* BBEE8 801257E8 A4800534 */  sh        $zero, 0x534($a0)
/* BBEEC 801257EC AC800544 */  sw        $zero, 0x544($a0)
/* BBEF0 801257F0 AC800548 */  sw        $zero, 0x548($a0)
/* BBEF4 801257F4 AC80054C */  sw        $zero, 0x54C($a0)
/* BBEF8 801257F8 AC800550 */  sw        $zero, 0x550($a0)
/* BBEFC 801257FC 03E00008 */  jr        $ra
/* BBF00 80125800 E4800540 */   swc1     $f0, 0x540($a0)

### DECOMPILED C INSTRUCTIONS:

void initialize_printer(MessagePrintState* printer, s32 arg1, s32 arg2) {
    s32 i;

    printer->printBufferSize = ARRAY_COUNT(printer->printBuffer);
    printer->printBuffer[0] = MSG_CHAR_PRINT_END;
    printer->printDelayTime = 1;
    printer->charsPerChunk = 1;
    printer->unk_464 = 6;
    printer->srcBuffer = NULL;
    printer->msgID = 0;
    printer->currentPrintDelay = 0;
    printer->windowOffsetPos.x = 0;
    printer->windowOffsetPos.y = 0;
    printer->windowBasePos.x = 0;
    printer->windowBasePos.y = 0;
    printer->rewindArrowAnimState = REWIND_ARROW_STATE_INIT;
    printer->rewindArrowCounter = 0;
    printer->rewindArrowPos.x = 0;
    printer->rewindArrowPos.y = 0;
    printer->currentLine = 0;
    printer->unkArraySize = 0;
    printer->maxOption = 0;
    printer->madeChoice = 0;
    printer->currentOption = 0;
    printer->selectedOption = 0;
    printer->cancelOption = -1;
    printer->windowState = MSG_WINDOW_STATE_DONE;
    printer->stateFlags = 0;
    printer->delayFlags = 0;
    printer->closedWritebackBool = NULL;
    printer->printBufferPos = 0;
    printer->srcBufferPos = 0;
    printer->font = 0;
    printer->fontVariant = 0;
    printer->effectFrameCounter = 0;
    printer->curLinePos = 0;
    printer->unk_46C = 0;
    printer->lineCount = 0;

    for (i = 0; i < ARRAY_COUNT(printer->animTimers); i++) {
        printer->currentAnimFrame[i] = 0;
        printer->animTimers[i] = -1;
    }

    printer->initOpenPos.x = 160;
    printer->initOpenPos.y = 40;
    printer->speechSoundType = -1;
    printer->speechPan = 64;
    printer->volume = 75;
    printer->rewindArrowCounter = 0;
    printer->style = 0;
    printer->fadeInCounter = 0;
    printer->openStartPos.x = 0;
    printer->openStartPos.y = 0;
    printer->fadeOutCounter = 0;
    printer->windowSize.y = 0;
    printer->windowSize.x = 0;
    printer->speechVolumePitch = 0;
    printer->speedSoundIDA = 0;
    printer->speedSoundIDB = 0;
    printer->varBufferReadPos = 0;
    printer->currentImageIndex = 0;
    printer->varImageScreenPos.x = 0;
    printer->varImageScreenPos.y = 0;
    printer->varImgHasBorder = 0;
    printer->varImgFinalAlpha = 255;
    printer->varImageDisplayState = 0;
    printer->varImageFadeTimer = 0;
    printer->letterBackgroundImg = NULL;
    printer->letterBackgroundPal = NULL;
    printer->letterContentImg = NULL;
    printer->letterContentPal = NULL;
    printer->sizeScale = 1.0f;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel small_gold_sparkle_main
/* 391D30 E0092000 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 391D34 E0092004 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 391D38 E0092008 4485A000 */  mtc1      $a1, $f20
/* 391D3C E009200C F7B60040 */  sdc1      $f22, 0x40($sp)
/* 391D40 E0092010 4486B000 */  mtc1      $a2, $f22
/* 391D44 E0092014 AFB20030 */  sw        $s2, 0x30($sp)
/* 391D48 E0092018 0080902D */  daddu     $s2, $a0, $zero
/* 391D4C E009201C F7B80048 */  sdc1      $f24, 0x48($sp)
/* 391D50 E0092020 4487C000 */  mtc1      $a3, $f24
/* 391D54 E0092024 27A40010 */  addiu     $a0, $sp, 0x10
/* 391D58 E0092028 F7BA0050 */  sdc1      $f26, 0x50($sp)
/* 391D5C E009202C C7BA0068 */  lwc1      $f26, 0x68($sp)
/* 391D60 E0092030 3C02E009 */  lui       $v0, %hi(small_gold_sparkle_init)
/* 391D64 E0092034 244221AC */  addiu     $v0, $v0, %lo(small_gold_sparkle_init)
/* 391D68 E0092038 AFA20018 */  sw        $v0, 0x18($sp)
/* 391D6C E009203C 3C02E009 */  lui       $v0, %hi(small_gold_sparkle_update)
/* 391D70 E0092040 244221B4 */  addiu     $v0, $v0, %lo(small_gold_sparkle_update)
/* 391D74 E0092044 AFA2001C */  sw        $v0, 0x1C($sp)
/* 391D78 E0092048 3C02E009 */  lui       $v0, %hi(small_gold_sparkle_render)
/* 391D7C E009204C 24422258 */  addiu     $v0, $v0, %lo(small_gold_sparkle_render)
/* 391D80 E0092050 AFA20020 */  sw        $v0, 0x20($sp)
/* 391D84 E0092054 24020049 */  addiu     $v0, $zero, 0x49
/* 391D88 E0092058 AFBF0034 */  sw        $ra, 0x34($sp)
/* 391D8C E009205C AFB1002C */  sw        $s1, 0x2C($sp)
/* 391D90 E0092060 AFB00028 */  sw        $s0, 0x28($sp)
/* 391D94 E0092064 AFA00010 */  sw        $zero, 0x10($sp)
/* 391D98 E0092068 AFA00024 */  sw        $zero, 0x24($sp)
/* 391D9C E009206C 0C080124 */  jal       shim_create_effect_instance
/* 391DA0 E0092070 AFA20014 */   sw       $v0, 0x14($sp)
/* 391DA4 E0092074 240400B4 */  addiu     $a0, $zero, 0xB4
/* 391DA8 E0092078 24110005 */  addiu     $s1, $zero, 0x5
/* 391DAC E009207C 0040802D */  daddu     $s0, $v0, $zero
/* 391DB0 E0092080 0C08012C */  jal       shim_general_heap_malloc
/* 391DB4 E0092084 AE110008 */   sw       $s1, 0x8($s0)
/* 391DB8 E0092088 0040182D */  daddu     $v1, $v0, $zero
/* 391DBC E009208C 14600003 */  bnez      $v1, .LE009209C
/* 391DC0 E0092090 AE03000C */   sw       $v1, 0xC($s0)
.LE0092094:
/* 391DC4 E0092094 08024825 */  j         .LE0092094
/* 391DC8 E0092098 00000000 */   nop
.LE009209C:
/* 391DCC E009209C 2402000E */  addiu     $v0, $zero, 0xE
/* 391DD0 E00920A0 AC720000 */  sw        $s2, 0x0($v1)
/* 391DD4 E00920A4 AC600018 */  sw        $zero, 0x18($v1)
/* 391DD8 E00920A8 AC620014 */  sw        $v0, 0x14($v1)
/* 391DDC E00920AC E4740008 */  swc1      $f20, 0x8($v1)
/* 391DE0 E00920B0 E476000C */  swc1      $f22, 0xC($v1)
/* 391DE4 E00920B4 E4780010 */  swc1      $f24, 0x10($v1)
/* 391DE8 E00920B8 24040001 */  addiu     $a0, $zero, 0x1
/* 391DEC E00920BC 0091102A */  slt       $v0, $a0, $s1
/* 391DF0 E00920C0 1040002F */  beqz      $v0, .LE0092180
/* 391DF4 E00920C4 24630024 */   addiu    $v1, $v1, 0x24
/* 391DF8 E00920C8 3C08E009 */  lui       $t0, %hi(D_E00926A4)
/* 391DFC E00920CC 250826A4 */  addiu     $t0, $t0, %lo(D_E00926A4)
/* 391E00 E00920D0 240BFFFF */  addiu     $t3, $zero, -0x1
/* 391E04 E00920D4 3C01E009 */  lui       $at, (0xE0092700 >> 16)
/* 391E08 E00920D8 D4222700 */  ldc1      $f2, (0xE0092700 & 0xFFFF)($at)
/* 391E0C E00920DC 2463001C */  addiu     $v1, $v1, 0x1C
/* 391E10 E00920E0 240A0010 */  addiu     $t2, $zero, 0x10
/* 391E14 E00920E4 0000482D */  daddu     $t1, $zero, $zero
/* 391E18 E00920E8 2407000C */  addiu     $a3, $zero, 0xC
/* 391E1C E00920EC 24060008 */  addiu     $a2, $zero, 0x8
/* 391E20 E00920F0 24050004 */  addiu     $a1, $zero, 0x4
.LE00920F4:
/* 391E24 E00920F4 00A81021 */  addu      $v0, $a1, $t0
/* 391E28 E00920F8 C4400000 */  lwc1      $f0, 0x0($v0)
/* 391E2C E00920FC 46800020 */  cvt.s.w   $f0, $f0
/* 391E30 E0092100 00C81021 */  addu      $v0, $a2, $t0
/* 391E34 E0092104 E460FFEC */  swc1      $f0, -0x14($v1)
/* 391E38 E0092108 C4400000 */  lwc1      $f0, 0x0($v0)
/* 391E3C E009210C 46800020 */  cvt.s.w   $f0, $f0
/* 391E40 E0092110 00E81021 */  addu      $v0, $a3, $t0
/* 391E44 E0092114 E460FFF0 */  swc1      $f0, -0x10($v1)
/* 391E48 E0092118 C4400000 */  lwc1      $f0, 0x0($v0)
/* 391E4C E009211C 46800020 */  cvt.s.w   $f0, $f0
/* 391E50 E0092120 01281021 */  addu      $v0, $t1, $t0
/* 391E54 E0092124 E460FFF4 */  swc1      $f0, -0xC($v1)
/* 391E58 E0092128 AC6BFFE8 */  sw        $t3, -0x18($v1)
/* 391E5C E009212C 8C420000 */  lw        $v0, 0x0($v0)
/* 391E60 E0092130 AC620004 */  sw        $v0, 0x4($v1)
/* 391E64 E0092134 01481021 */  addu      $v0, $t2, $t0
/* 391E68 E0092138 C4400000 */  lwc1      $f0, 0x0($v0)
/* 391E6C E009213C 46800020 */  cvt.s.w   $f0, $f0
/* 391E70 E0092140 4600D002 */  mul.s     $f0, $f26, $f0
/* 391E74 E0092144 00000000 */  nop
/* 391E78 E0092148 46000021 */  cvt.d.s   $f0, $f0
/* 391E7C E009214C 46220002 */  mul.d     $f0, $f0, $f2
/* 391E80 E0092150 00000000 */  nop
/* 391E84 E0092154 25290014 */  addiu     $t1, $t1, 0x14
/* 391E88 E0092158 24E70014 */  addiu     $a3, $a3, 0x14
/* 391E8C E009215C 24C60014 */  addiu     $a2, $a2, 0x14
/* 391E90 E0092160 24A50014 */  addiu     $a1, $a1, 0x14
/* 391E94 E0092164 24840001 */  addiu     $a0, $a0, 0x1
/* 391E98 E0092168 254A0014 */  addiu     $t2, $t2, 0x14
/* 391E9C E009216C 0091102A */  slt       $v0, $a0, $s1
/* 391EA0 E0092170 46200020 */  cvt.s.d   $f0, $f0
/* 391EA4 E0092174 E4600000 */  swc1      $f0, 0x0($v1)
/* 391EA8 E0092178 1440FFDE */  bnez      $v0, .LE00920F4
/* 391EAC E009217C 24630024 */   addiu    $v1, $v1, 0x24
.LE0092180:
/* 391EB0 E0092180 0200102D */  daddu     $v0, $s0, $zero
/* 391EB4 E0092184 8FBF0034 */  lw        $ra, 0x34($sp)
/* 391EB8 E0092188 8FB20030 */  lw        $s2, 0x30($sp)
/* 391EBC E009218C 8FB1002C */  lw        $s1, 0x2C($sp)
/* 391EC0 E0092190 8FB00028 */  lw        $s0, 0x28($sp)
/* 391EC4 E0092194 D7BA0050 */  ldc1      $f26, 0x50($sp)
/* 391EC8 E0092198 D7B80048 */  ldc1      $f24, 0x48($sp)
/* 391ECC E009219C D7B60040 */  ldc1      $f22, 0x40($sp)
/* 391ED0 E00921A0 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 391ED4 E00921A4 03E00008 */  jr        $ra
/* 391ED8 E00921A8 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

EffectInstance* small_gold_sparkle_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
    EffectBlueprint bp;
    EffectInstance* effect;
    SmallGoldSparkleFXData* data;
    SmallGoldSparkleFXData* part;
    s32 numParts = 5;
    s32 i;

    bp.init = small_gold_sparkle_init;
    bp.update = small_gold_sparkle_update;
    bp.renderWorld = small_gold_sparkle_render;
    bp.unk_00 = 0;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_SMALL_GOLD_SPARKLE;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = numParts;

    data = shim_general_heap_malloc(numParts * sizeof(*data));
    effect->data.smallGoldSparkle = data;
    part = data;

    ASSERT(data != NULL);

    part->unk_00 = arg0;
    part->unk_18 = 0;
    part->unk_14 = 14;
    part->unk_08 = arg1;
    part->unk_0C = arg2;
    part->unk_10 = arg3;

    part++;
    for (i = 1; i < numParts; i++, part++) {
            part->unk_08 = sPartParams[1 + (i - 1) * 5];
            part->unk_0C = sPartParams[2 + (i - 1) * 5];
            part->unk_10 = sPartParams[3 + (i - 1) * 5];
            part->unk_04 = -1;
            part->unk_20 = sPartParams[0 + (i - 1) * 5];
            part->unk_1C = (arg4 * sPartParams[4 + (i - 1) * 5]) * 0.01;
    }
    return effect;
}