### RAW ASSEMBLY INSTRUCTIONS:

glabel attack_result_text_main
/* 38F900 E0090000 27BDFF98 */  addiu     $sp, $sp, -0x68
/* 38F904 E0090004 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 38F908 E0090008 4485C000 */  mtc1      $a1, $f24
/* 38F90C E009000C F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 38F910 E0090010 4486D000 */  mtc1      $a2, $f26
/* 38F914 E0090014 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 38F918 E0090018 4487E000 */  mtc1      $a3, $f28
/* 38F91C E009001C AFB20030 */  sw        $s2, 0x30($sp)
/* 38F920 E0090020 0080902D */  daddu     $s2, $a0, $zero
/* 38F924 E0090024 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 38F928 E0090028 C7B60078 */  lwc1      $f22, 0x78($sp)
/* 38F92C E009002C 27A40010 */  addiu     $a0, $sp, 0x10
/* 38F930 E0090030 AFB30034 */  sw        $s3, 0x34($sp)
/* 38F934 E0090034 8FB3007C */  lw        $s3, 0x7C($sp)
/* 38F938 E0090038 3C02E009 */  lui       $v0, %hi(attack_result_text_init)
/* 38F93C E009003C 244201C0 */  addiu     $v0, $v0, %lo(attack_result_text_init)
/* 38F940 E0090040 AFA20018 */  sw        $v0, 0x18($sp)
/* 38F944 E0090044 3C02E009 */  lui       $v0, %hi(attack_result_text_update)
/* 38F948 E0090048 244201C8 */  addiu     $v0, $v0, %lo(attack_result_text_update)
/* 38F94C E009004C AFA2001C */  sw        $v0, 0x1C($sp)
/* 38F950 E0090050 3C02E009 */  lui       $v0, %hi(attack_result_text_render)
/* 38F954 E0090054 24420420 */  addiu     $v0, $v0, %lo(attack_result_text_render)
/* 38F958 E0090058 AFA20020 */  sw        $v0, 0x20($sp)
/* 38F95C E009005C 3C02E009 */  lui       $v0, %hi(func_E0090428)
/* 38F960 E0090060 24420428 */  addiu     $v0, $v0, %lo(func_E0090428)
/* 38F964 E0090064 AFA20024 */  sw        $v0, 0x24($sp)
/* 38F968 E0090068 24020048 */  addiu     $v0, $zero, 0x48
/* 38F96C E009006C AFBF0038 */  sw        $ra, 0x38($sp)
/* 38F970 E0090070 AFB1002C */  sw        $s1, 0x2C($sp)
/* 38F974 E0090074 AFB00028 */  sw        $s0, 0x28($sp)
/* 38F978 E0090078 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 38F97C E009007C AFA00010 */  sw        $zero, 0x10($sp)
/* 38F980 E0090080 0C080124 */  jal       shim_create_effect_instance
/* 38F984 E0090084 AFA20014 */   sw       $v0, 0x14($sp)
/* 38F988 E0090088 24040038 */  addiu     $a0, $zero, 0x38
/* 38F98C E009008C 24030001 */  addiu     $v1, $zero, 0x1
/* 38F990 E0090090 0040882D */  daddu     $s1, $v0, $zero
/* 38F994 E0090094 0C08012C */  jal       shim_general_heap_malloc
/* 38F998 E0090098 AE230008 */   sw       $v1, 0x8($s1)
/* 38F99C E009009C 0040802D */  daddu     $s0, $v0, $zero
/* 38F9A0 E00900A0 16000003 */  bnez      $s0, .LE00900B0
/* 38F9A4 E00900A4 AE22000C */   sw       $v0, 0xC($s1)
.LE00900A8:
/* 38F9A8 E00900A8 0802402A */  j         .LE00900A8
/* 38F9AC E00900AC 00000000 */   nop
.LE00900B0:
/* 38F9B0 E00900B0 3C036666 */  lui       $v1, (0x66666667 >> 16)
/* 38F9B4 E00900B4 34636667 */  ori       $v1, $v1, (0x66666667 & 0xFFFF)
/* 38F9B8 E00900B8 24020001 */  addiu     $v0, $zero, 0x1
/* 38F9BC E00900BC 02430018 */  mult      $s2, $v1
/* 38F9C0 E00900C0 AE020024 */  sw        $v0, 0x24($s0)
/* 38F9C4 E00900C4 AE000020 */  sw        $zero, 0x20($s0)
/* 38F9C8 E00900C8 AE120000 */  sw        $s2, 0x0($s0)
/* 38F9CC E00900CC AE00001C */  sw        $zero, 0x1C($s0)
/* 38F9D0 E00900D0 00004010 */  mfhi      $t0
/* 38F9D4 E00900D4 00481807 */  srav      $v1, $t0, $v0
/* 38F9D8 E00900D8 001217C3 */  sra       $v0, $s2, 31
/* 38F9DC E00900DC 00621823 */  subu      $v1, $v1, $v0
/* 38F9E0 E00900E0 00031080 */  sll       $v0, $v1, 2
/* 38F9E4 E00900E4 00431021 */  addu      $v0, $v0, $v1
/* 38F9E8 E00900E8 02421023 */  subu      $v0, $s2, $v0
/* 38F9EC E00900EC 1E600004 */  bgtz      $s3, .LE0090100
/* 38F9F0 E00900F0 AE020004 */   sw       $v0, 0x4($s0)
/* 38F9F4 E00900F4 24020064 */  addiu     $v0, $zero, 0x64
/* 38F9F8 E00900F8 08024041 */  j         .LE0090104
/* 38F9FC E00900FC AE020018 */   sw       $v0, 0x18($s0)
.LE0090100:
/* 38FA00 E0090100 AE130018 */  sw        $s3, 0x18($s0)
.LE0090104:
/* 38FA04 E0090104 240200FF */  addiu     $v0, $zero, 0xFF
/* 38FA08 E0090108 AE020014 */  sw        $v0, 0x14($s0)
/* 38FA0C E009010C 2A420005 */  slti      $v0, $s2, 0x5
/* 38FA10 E0090110 50400014 */  beql      $v0, $zero, .LE0090164
/* 38FA14 E0090114 AE000010 */   sw       $zero, 0x10($s0)
/* 38FA18 E0090118 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* 38FA1C E009011C 4481A000 */  mtc1      $at, $f20
/* 38FA20 E0090120 E6180008 */  swc1      $f24, 0x8($s0)
/* 38FA24 E0090124 E61A000C */  swc1      $f26, 0xC($s0)
/* 38FA28 E0090128 E61C0010 */  swc1      $f28, 0x10($s0)
/* 38FA2C E009012C 0C080140 */  jal       shim_sin_deg
/* 38FA30 E0090130 4600A306 */   mov.s    $f12, $f20
/* 38FA34 E0090134 46000007 */  neg.s     $f0, $f0
/* 38FA38 E0090138 46160002 */  mul.s     $f0, $f0, $f22
/* 38FA3C E009013C 00000000 */  nop
/* 38FA40 E0090140 46000000 */  add.s     $f0, $f0, $f0
/* 38FA44 E0090144 4600A306 */  mov.s     $f12, $f20
/* 38FA48 E0090148 0C080144 */  jal       shim_cos_deg
/* 38FA4C E009014C E6000030 */   swc1     $f0, 0x30($s0)
/* 38FA50 E0090150 46160002 */  mul.s     $f0, $f0, $f22
/* 38FA54 E0090154 00000000 */  nop
/* 38FA58 E0090158 46000000 */  add.s     $f0, $f0, $f0
/* 38FA5C E009015C 08024063 */  j         .LE009018C
/* 38FA60 E0090160 E6000034 */   swc1     $f0, 0x34($s0)
.LE0090164:
/* 38FA64 E0090164 3C01C2C8 */  lui       $at, (0xC2C80000 >> 16)
/* 38FA68 E0090168 44810000 */  mtc1      $at, $f0
/* 38FA6C E009016C 3C014220 */  lui       $at, (0x42200000 >> 16)
/* 38FA70 E0090170 44811000 */  mtc1      $at, $f2
/* 38FA74 E0090174 3C0142E6 */  lui       $at, (0x42E60000 >> 16)
/* 38FA78 E0090178 44812000 */  mtc1      $at, $f4
/* 38FA7C E009017C AE000034 */  sw        $zero, 0x34($s0)
/* 38FA80 E0090180 E6000008 */  swc1      $f0, 0x8($s0)
/* 38FA84 E0090184 E602000C */  swc1      $f2, 0xC($s0)
/* 38FA88 E0090188 E6040030 */  swc1      $f4, 0x30($s0)
.LE009018C:
/* 38FA8C E009018C 0220102D */  daddu     $v0, $s1, $zero
/* 38FA90 E0090190 8FBF0038 */  lw        $ra, 0x38($sp)
/* 38FA94 E0090194 8FB30034 */  lw        $s3, 0x34($sp)
/* 38FA98 E0090198 8FB20030 */  lw        $s2, 0x30($sp)
/* 38FA9C E009019C 8FB1002C */  lw        $s1, 0x2C($sp)
/* 38FAA0 E00901A0 8FB00028 */  lw        $s0, 0x28($sp)
/* 38FAA4 E00901A4 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 38FAA8 E00901A8 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 38FAAC E00901AC D7B80050 */  ldc1      $f24, 0x50($sp)
/* 38FAB0 E00901B0 D7B60048 */  ldc1      $f22, 0x48($sp)
/* 38FAB4 E00901B4 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 38FAB8 E00901B8 03E00008 */  jr        $ra
/* 38FABC E00901BC 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

EffectInstance* attack_result_text_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 appearVel, s32 duration) {
    EffectBlueprint bp;
    EffectInstance* effect;
    AttackResultTextFXData* data;
    s32 numParts = 1;

    bp.unk_00 = 0;
    bp.init = attack_result_text_init;
    bp.update = attack_result_text_update;
    bp.renderWorld = attack_result_text_render;
    bp.renderUI = func_E0090428;
    bp.effectID = EFFECT_ATTACK_RESULT_TEXT;

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

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

    ASSERT(data != NULL);

    data->isVisible = TRUE;
    data->unk_20 = 0;
    data->type = type;
    data->lifetime = 0;
    data->unk_04 = type % 5;

    if (duration <= 0) {
        data->timeLeft = 100;
    } else {
        data->timeLeft = duration;
    }

    data->alpha = 0xFF;

    if (type < 5) {
        data->pos.x = posX;
        data->pos.y = posY;
        data->pos.z = posZ;
        data->vel.x = 2.0f * (-shim_sin_deg(30.0f) * appearVel);
        data->vel.y = 2.0f * (shim_cos_deg(30.0f) * appearVel);
    } else {
        data->pos.x = -100.0f;
        data->pos.y = 40.0f;
        data->pos.z = 0.0f;
        data->vel.x = 115.0f;
        data->vel.y = 0.0f;
    }

    return effect;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_800E24F8
/* 7B9A8 800E24F8 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 7B9AC 800E24FC AFB00010 */  sw        $s0, 0x10($sp)
/* 7B9B0 800E2500 3C108011 */  lui       $s0, %hi(gPlayerStatus)
/* 7B9B4 800E2504 2610EFC8 */  addiu     $s0, $s0, %lo(gPlayerStatus)
/* 7B9B8 800E2508 AFBF0014 */  sw        $ra, 0x14($sp)
/* 7B9BC 800E250C 0C044181 */  jal       get_shadow_by_index
/* 7B9C0 800E2510 8E0400CC */   lw       $a0, 0xCC($s0)
/* 7B9C4 800E2514 C4400028 */  lwc1      $f0, 0x28($v0)
/* 7B9C8 800E2518 3C018011 */  lui       $at, %hi(D_8010BD30)
/* 7B9CC 800E251C D424BD30 */  ldc1      $f4, %lo(D_8010BD30)($at)
/* 7B9D0 800E2520 C4420030 */  lwc1      $f2, 0x30($v0)
/* 7B9D4 800E2524 46000021 */  cvt.d.s   $f0, $f0
/* 7B9D8 800E2528 46240000 */  add.d     $f0, $f0, $f4
/* 7B9DC 800E252C 3C05800B */  lui       $a1, %hi(gCameras)
/* 7B9E0 800E2530 24A51D80 */  addiu     $a1, $a1, %lo(gCameras)
/* 7B9E4 800E2534 460010A1 */  cvt.d.s   $f2, $f2
/* 7B9E8 800E2538 46241080 */  add.d     $f2, $f2, $f4
/* 7B9EC 800E253C 44802000 */  mtc1      $zero, $f4
/* 7B9F0 800E2540 46200020 */  cvt.s.d   $f0, $f0
/* 7B9F4 800E2544 46040032 */  c.eq.s    $f0, $f4
/* 7B9F8 800E2548 00000000 */  nop
/* 7B9FC 800E254C 45000005 */  bc1f      .L800E2564
/* 7BA00 800E2550 462010A0 */   cvt.s.d  $f2, $f2
/* 7BA04 800E2554 46041032 */  c.eq.s    $f2, $f4
/* 7BA08 800E2558 00000000 */  nop
/* 7BA0C 800E255C 4501003D */  bc1t      .L800E2654
/* 7BA10 800E2560 00000000 */   nop
.L800E2564:
/* 7BA14 800E2564 920200B4 */  lbu       $v0, 0xB4($s0)
/* 7BA18 800E2568 2442FFFF */  addiu     $v0, $v0, -0x1
/* 7BA1C 800E256C 00021600 */  sll       $v0, $v0, 24
/* 7BA20 800E2570 00021E03 */  sra       $v1, $v0, 24
/* 7BA24 800E2574 2C620011 */  sltiu     $v0, $v1, 0x11
/* 7BA28 800E2578 1040002D */  beqz      $v0, .L800E2630
/* 7BA2C 800E257C 00031080 */   sll      $v0, $v1, 2
/* 7BA30 800E2580 3C018011 */  lui       $at, %hi(jtbl_8010BD38)
/* 7BA34 800E2584 00220821 */  addu      $at, $at, $v0
/* 7BA38 800E2588 8C22BD38 */  lw        $v0, %lo(jtbl_8010BD38)($at)
/* 7BA3C 800E258C 00400008 */  jr        $v0
/* 7BA40 800E2590 00000000 */   nop
glabel .L800E2594
/* 7BA44 800E2594 3C014200 */  lui       $at, (0x42000000 >> 16)
/* 7BA48 800E2598 44812000 */  mtc1      $at, $f4
/* 7BA4C 800E259C 080389A5 */  j         .L800E2694
/* 7BA50 800E25A0 E4A4049C */   swc1     $f4, 0x49C($a1)
glabel .L800E25A4
/* 7BA54 800E25A4 84A20034 */  lh        $v0, 0x34($a1)
/* 7BA58 800E25A8 28420082 */  slti      $v0, $v0, 0x82
/* 7BA5C 800E25AC 10400005 */  beqz      $v0, .L800E25C4
/* 7BA60 800E25B0 00000000 */   nop
/* 7BA64 800E25B4 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 7BA68 800E25B8 44810000 */  mtc1      $at, $f0
/* 7BA6C 800E25BC 080389A5 */  j         .L800E2694
/* 7BA70 800E25C0 E4A0049C */   swc1     $f0, 0x49C($a1)
.L800E25C4:
/* 7BA74 800E25C4 3C048011 */  lui       $a0, %hi(D_8010C9A0)
/* 7BA78 800E25C8 2484C9A0 */  addiu     $a0, $a0, %lo(D_8010C9A0)
/* 7BA7C 800E25CC 8C820000 */  lw        $v0, 0x0($a0)
/* 7BA80 800E25D0 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 7BA84 800E25D4 44812000 */  mtc1      $at, $f4
/* 7BA88 800E25D8 0040182D */  daddu     $v1, $v0, $zero
/* 7BA8C 800E25DC 24420001 */  addiu     $v0, $v0, 0x1
/* 7BA90 800E25E0 2863000B */  slti      $v1, $v1, 0xB
/* 7BA94 800E25E4 1460002B */  bnez      $v1, .L800E2694
/* 7BA98 800E25E8 AC820000 */   sw       $v0, 0x0($a0)
/* 7BA9C 800E25EC C4A0049C */  lwc1      $f0, 0x49C($a1)
/* 7BAA0 800E25F0 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 7BAA4 800E25F4 44811000 */  mtc1      $at, $f2
/* 7BAA8 800E25F8 00000000 */  nop
/* 7BAAC 800E25FC 46020001 */  sub.s     $f0, $f0, $f2
/* 7BAB0 800E2600 2402000A */  addiu     $v0, $zero, 0xA
/* 7BAB4 800E2604 AC820000 */  sw        $v0, 0x0($a0)
.L800E2608:
/* 7BAB8 800E2608 4604003C */  c.lt.s    $f0, $f4
/* 7BABC 800E260C 00000000 */  nop
/* 7BAC0 800E2610 45000020 */  bc1f      .L800E2694
/* 7BAC4 800E2614 E4A0049C */   swc1     $f0, 0x49C($a1)
/* 7BAC8 800E2618 080389A5 */  j         .L800E2694
/* 7BACC 800E261C E4A4049C */   swc1     $f4, 0x49C($a1)
glabel .L800E2620
/* 7BAD0 800E2620 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 7BAD4 800E2624 44812000 */  mtc1      $at, $f4
/* 7BAD8 800E2628 080389A5 */  j         .L800E2694
/* 7BADC 800E262C E4A4049C */   swc1     $f4, 0x49C($a1)
glabel .L800E2630
/* 7BAE0 800E2630 C4A0049C */  lwc1      $f0, 0x49C($a1)
/* 7BAE4 800E2634 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 7BAE8 800E2638 44811000 */  mtc1      $at, $f2
/* 7BAEC 800E263C 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 7BAF0 800E2640 44812000 */  mtc1      $at, $f4
/* 7BAF4 800E2644 3C018011 */  lui       $at, %hi(D_8010C9A0)
/* 7BAF8 800E2648 AC20C9A0 */  sw        $zero, %lo(D_8010C9A0)($at)
/* 7BAFC 800E264C 08038982 */  j         .L800E2608
/* 7BB00 800E2650 46020001 */   sub.s    $f0, $f0, $f2
.L800E2654:
/* 7BB04 800E2654 820300B4 */  lb        $v1, 0xB4($s0)
/* 7BB08 800E2658 1860000A */  blez      $v1, .L800E2684
/* 7BB0C 800E265C 28620004 */   slti     $v0, $v1, 0x4
/* 7BB10 800E2660 14400003 */  bnez      $v0, .L800E2670
/* 7BB14 800E2664 24020011 */   addiu    $v0, $zero, 0x11
/* 7BB18 800E2668 14620006 */  bne       $v1, $v0, .L800E2684
/* 7BB1C 800E266C 00000000 */   nop
.L800E2670:
/* 7BB20 800E2670 3C0140E6 */  lui       $at, (0x40E66666 >> 16)
/* 7BB24 800E2674 34216666 */  ori       $at, $at, (0x40E66666 & 0xFFFF)
/* 7BB28 800E2678 44812000 */  mtc1      $at, $f4
/* 7BB2C 800E267C 080389A5 */  j         .L800E2694
/* 7BB30 800E2680 E4A4049C */   swc1     $f4, 0x49C($a1)
.L800E2684:
/* 7BB34 800E2684 3C0141C0 */  lui       $at, (0x41C00000 >> 16)
/* 7BB38 800E2688 44812000 */  mtc1      $at, $f4
/* 7BB3C 800E268C 00000000 */  nop
/* 7BB40 800E2690 E4A4049C */  swc1      $f4, 0x49C($a1)
.L800E2694:
/* 7BB44 800E2694 8FBF0014 */  lw        $ra, 0x14($sp)
/* 7BB48 800E2698 8FB00010 */  lw        $s0, 0x10($sp)
/* 7BB4C 800E269C 03E00008 */  jr        $ra
/* 7BB50 800E26A0 27BD0018 */   addiu    $sp, $sp, 0x18
/* 7BB54 800E26A4 00000000 */  nop
/* 7BB58 800E26A8 00000000 */  nop
/* 7BB5C 800E26AC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void func_800E24F8(void) {
    Shadow* shadow = get_shadow_by_index(gPlayerStatus.shadowID);
    f32 x = shadow->rotation.x + 180.0;
    f32 z = shadow->rotation.z + 180.0;
    Camera* camera = &gCameras[CAM_DEFAULT];
    f32 temp;

    if (x != 0.0f || z != 0.0f) {
        switch (gPlayerStatus.actionState) {
            case ACTION_STATE_JUMP:
            case ACTION_STATE_FALLING:
                temp = 32.0f;
                camera->unk_49C = temp;
                break;
            case ACTION_STATE_WALK:
            case ACTION_STATE_RUN:
                if (camera->targetScreenCoords.y < 130) {
                    camera->unk_49C = 3.0f;
                    break;
                }
                temp = 3.0f;
                if (D_8010C9A0++ > 10) {
                    D_8010C9A0 = 10;
                    camera->unk_49C -= 2.0f;
                    if (camera->unk_49C < temp) {
                        camera->unk_49C = temp;
                    }
                }
                break;
            case ACTION_STATE_SLIDING:
                temp = 3.0f;
                camera->unk_49C = temp;
                break;
            default:
                temp = 3.0f;
                D_8010C9A0 = 0;
                camera->unk_49C -= 2.0f;
                if (camera->unk_49C < temp) {
                    camera->unk_49C = temp;
                }
                break;
        }
    } else {
        switch (gPlayerStatus.actionState) {
            case ACTION_STATE_WALK:
            case ACTION_STATE_RUN:
            case ACTION_STATE_JUMP:
            case ACTION_STATE_SLIDING:
                temp = 7.2f;
                break;
            default:
                temp = 24.0f;
                break;
        }

        camera->unk_49C = temp;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel disable_x_main
/* 385640 E0082000 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 385644 E0082004 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 385648 E0082008 4485A000 */  mtc1      $a1, $f20
/* 38564C E008200C AFB00028 */  sw        $s0, 0x28($sp)
/* 385650 E0082010 0080802D */  daddu     $s0, $a0, $zero
/* 385654 E0082014 F7B60040 */  sdc1      $f22, 0x40($sp)
/* 385658 E0082018 4486B000 */  mtc1      $a2, $f22
/* 38565C E008201C 27A40010 */  addiu     $a0, $sp, 0x10
/* 385660 E0082020 F7B80048 */  sdc1      $f24, 0x48($sp)
/* 385664 E0082024 4487C000 */  mtc1      $a3, $f24
/* 385668 E0082028 3C02E008 */  lui       $v0, %hi(disable_x_init)
/* 38566C E008202C 244221B0 */  addiu     $v0, $v0, %lo(disable_x_init)
/* 385670 E0082030 AFA20018 */  sw        $v0, 0x18($sp)
/* 385674 E0082034 3C02E008 */  lui       $v0, %hi(disable_x_update)
/* 385678 E0082038 244221B8 */  addiu     $v0, $v0, %lo(disable_x_update)
/* 38567C E008203C AFA2001C */  sw        $v0, 0x1C($sp)
/* 385680 E0082040 3C02E008 */  lui       $v0, %hi(disable_x_render)
/* 385684 E0082044 24422520 */  addiu     $v0, $v0, %lo(disable_x_render)
/* 385688 E0082048 AFA20020 */  sw        $v0, 0x20($sp)
/* 38568C E008204C 3C02E008 */  lui       $v0, %hi(func_E0082528)
/* 385690 E0082050 24422528 */  addiu     $v0, $v0, %lo(func_E0082528)
/* 385694 E0082054 AFA20024 */  sw        $v0, 0x24($sp)
/* 385698 E0082058 24020041 */  addiu     $v0, $zero, 0x41
/* 38569C E008205C AFBF0034 */  sw        $ra, 0x34($sp)
/* 3856A0 E0082060 AFB20030 */  sw        $s2, 0x30($sp)
/* 3856A4 E0082064 AFB1002C */  sw        $s1, 0x2C($sp)
/* 3856A8 E0082068 AFA00010 */  sw        $zero, 0x10($sp)
/* 3856AC E008206C 0C080124 */  jal       shim_create_effect_instance
/* 3856B0 E0082070 AFA20014 */   sw       $v0, 0x14($sp)
/* 3856B4 E0082074 24040090 */  addiu     $a0, $zero, 0x90
/* 3856B8 E0082078 24120002 */  addiu     $s2, $zero, 0x2
/* 3856BC E008207C 0040882D */  daddu     $s1, $v0, $zero
/* 3856C0 E0082080 0C08012C */  jal       shim_general_heap_malloc
/* 3856C4 E0082084 AE320008 */   sw       $s2, 0x8($s1)
/* 3856C8 E0082088 0040182D */  daddu     $v1, $v0, $zero
/* 3856CC E008208C 14600003 */  bnez      $v1, .LE008209C
/* 3856D0 E0082090 AE23000C */   sw       $v1, 0xC($s1)
.LE0082094:
/* 3856D4 E0082094 08020825 */  j         .LE0082094
/* 3856D8 E0082098 00000000 */   nop
.LE008209C:
/* 3856DC E008209C 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3856E0 E00820A0 44810000 */  mtc1      $at, $f0
/* 3856E4 E00820A4 24020001 */  addiu     $v0, $zero, 0x1
/* 3856E8 E00820A8 AC700000 */  sw        $s0, 0x0($v1)
/* 3856EC E00820AC 16020004 */  bne       $s0, $v0, .LE00820C0
/* 3856F0 E00820B0 E4600034 */   swc1     $f0, 0x34($v1)
/* 3856F4 E00820B4 AC700038 */  sw        $s0, 0x38($v1)
/* 3856F8 E00820B8 08020834 */  j         .LE00820D0
/* 3856FC E00820BC AC60003C */   sw       $zero, 0x3C($v1)
.LE00820C0:
/* 385700 E00820C0 AC600038 */  sw        $zero, 0x38($v1)
/* 385704 E00820C4 8FA20060 */  lw        $v0, 0x60($sp)
/* 385708 E00820C8 AC62003C */  sw        $v0, 0x3C($v1)
/* 38570C E00820CC 24020001 */  addiu     $v0, $zero, 0x1
.LE00820D0:
/* 385710 E00820D0 E4740008 */  swc1      $f20, 0x8($v1)
/* 385714 E00820D4 E476000C */  swc1      $f22, 0xC($v1)
/* 385718 E00820D8 1202000E */  beq       $s0, $v0, .LE0082114
/* 38571C E00820DC E4780010 */   swc1     $f24, 0x10($v1)
/* 385720 E00820E0 2A020002 */  slti      $v0, $s0, 0x2
/* 385724 E00820E4 10400005 */  beqz      $v0, .LE00820FC
/* 385728 E00820E8 2402000A */   addiu    $v0, $zero, 0xA
/* 38572C E00820EC 12000007 */  beqz      $s0, .LE008210C
/* 385730 E00820F0 24020001 */   addiu    $v0, $zero, 0x1
/* 385734 E00820F4 0802084B */  j         .LE008212C
/* 385738 E00820F8 AC60002C */   sw       $zero, 0x2C($v1)
.LE00820FC:
/* 38573C E00820FC 12020007 */  beq       $s0, $v0, .LE008211C
/* 385740 E0082100 24020001 */   addiu    $v0, $zero, 0x1
/* 385744 E0082104 0802084B */  j         .LE008212C
/* 385748 E0082108 AC60002C */   sw       $zero, 0x2C($v1)
.LE008210C:
/* 38574C E008210C 08020848 */  j         .LE0082120
/* 385750 E0082110 24020064 */   addiu    $v0, $zero, 0x64
.LE0082114:
/* 385754 E0082114 08020848 */  j         .LE0082120
/* 385758 E0082118 24020064 */   addiu    $v0, $zero, 0x64
.LE008211C:
/* 38575C E008211C 24020015 */  addiu     $v0, $zero, 0x15
.LE0082120:
/* 385760 E0082120 AC620028 */  sw        $v0, 0x28($v1)
/* 385764 E0082124 24020001 */  addiu     $v0, $zero, 0x1
/* 385768 E0082128 AC60002C */  sw        $zero, 0x2C($v1)
.LE008212C:
/* 38576C E008212C AC600044 */  sw        $zero, 0x44($v1)
/* 385770 E0082130 AC620004 */  sw        $v0, 0x4($v1)
/* 385774 E0082134 0040202D */  daddu     $a0, $v0, $zero
/* 385778 E0082138 0092102A */  slt       $v0, $a0, $s2
/* 38577C E008213C 10400012 */  beqz      $v0, .LE0082188
/* 385780 E0082140 24630048 */   addiu    $v1, $v1, 0x48
/* 385784 E0082144 44800000 */  mtc1      $zero, $f0
/* 385788 E0082148 240500FF */  addiu     $a1, $zero, 0xFF
/* 38578C E008214C 24630024 */  addiu     $v1, $v1, 0x24
.LE0082150:
/* 385790 E0082150 24840001 */  addiu     $a0, $a0, 0x1
/* 385794 E0082154 E460FFEC */  swc1      $f0, -0x14($v1)
/* 385798 E0082158 E460FFE8 */  swc1      $f0, -0x18($v1)
/* 38579C E008215C E460FFE4 */  swc1      $f0, -0x1C($v1)
/* 3857A0 E0082160 E460FFFC */  swc1      $f0, -0x4($v1)
/* 3857A4 E0082164 E460FFF8 */  swc1      $f0, -0x8($v1)
/* 3857A8 E0082168 E460FFF4 */  swc1      $f0, -0xC($v1)
/* 3857AC E008216C E460FFF0 */  swc1      $f0, -0x10($v1)
/* 3857B0 E0082170 E460001C */  swc1      $f0, 0x1C($v1)
/* 3857B4 E0082174 AC600004 */  sw        $zero, 0x4($v1)
/* 3857B8 E0082178 AC650000 */  sw        $a1, 0x0($v1)
/* 3857BC E008217C 0092102A */  slt       $v0, $a0, $s2
/* 3857C0 E0082180 1440FFF3 */  bnez      $v0, .LE0082150
/* 3857C4 E0082184 24630048 */   addiu    $v1, $v1, 0x48
.LE0082188:
/* 3857C8 E0082188 0220102D */  daddu     $v0, $s1, $zero
/* 3857CC E008218C 8FBF0034 */  lw        $ra, 0x34($sp)
/* 3857D0 E0082190 8FB20030 */  lw        $s2, 0x30($sp)
/* 3857D4 E0082194 8FB1002C */  lw        $s1, 0x2C($sp)
/* 3857D8 E0082198 8FB00028 */  lw        $s0, 0x28($sp)
/* 3857DC E008219C D7B80048 */  ldc1      $f24, 0x48($sp)
/* 3857E0 E00821A0 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 3857E4 E00821A4 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 3857E8 E00821A8 03E00008 */  jr        $ra
/* 3857EC E00821AC 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

EffectInstance* disable_x_main(s32 type, f32 x, f32 y, f32 z, s32 arg4) {
    EffectBlueprint bp;
    EffectInstance* effect;
    DisableXFXData* data;
    s32 numParts = 2;
    s32 i;

    bp.unk_00 = 0;
    bp.init = disable_x_init;
    bp.update = disable_x_update;
    bp.renderWorld = disable_x_render;
    bp.renderUI = func_E0082528;
    bp.effectID = EFFECT_DISABLE_X;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = numParts;
    data = shim_general_heap_malloc(numParts * sizeof(*data));
    effect->data.disableX = data;
    ASSERT(effect->data.disableX != NULL);

    data->type = type;
    data->scale = 1.0f;
    if (type == 1) {
        data->unk_38 = type;
        data->koDuration = 0;
    } else {
        data->unk_38 = 0;
        data->koDuration = arg4;
    }

    data->pos.x = x;
    data->pos.y = y;
    data->pos.z = z;

    switch (type) {
        case 0:
            data->unk_28 = 100;
            break;
        case 1:
            data->unk_28 = 100;
            break;
        case 10:
            data->unk_28 = 21;
            break;
    }

    data->unk_2C = 0;
    data->unk_44 = 0;
    data->unk_04 = 1;

    data++;
    for (i = 1; i < numParts; i++, data++) {
        data->pos.x = data->pos.y = data->pos.z = 0.0f;
        data->unk_18 = data->unk_1C = data->unk_20 = 0.0f;
        data->unk_14 = 0.0f;
        data->unk_40 = 0.0f;
        data->unk_28 = 0;
        data->alpha = 255;
    }

    return effect;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel clear_entity_data
/* A73B8 80110CB8 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* A73BC 80110CBC 3C058007 */  lui       $a1, %hi(gGameStatusPtr)
/* A73C0 80110CC0 24A5419C */  addiu     $a1, $a1, %lo(gGameStatusPtr)
/* A73C4 80110CC4 AFBF0014 */  sw        $ra, 0x14($sp)
/* A73C8 80110CC8 AFB00010 */  sw        $s0, 0x10($sp)
/* A73CC 80110CCC 8CA20000 */  lw        $v0, 0x0($a1)
/* A73D0 80110CD0 24030001 */  addiu     $v1, $zero, 0x1
/* A73D4 80110CD4 3C018015 */  lui       $at, %hi(D_801516FC)
/* A73D8 80110CD8 AC2316FC */  sw        $v1, %lo(D_801516FC)($at)
/* A73DC 80110CDC 3C018015 */  lui       $at, %hi(entity_numEntities)
/* A73E0 80110CE0 AC2012C0 */  sw        $zero, %lo(entity_numEntities)($at)
/* A73E4 80110CE4 3C018015 */  lui       $at, %hi(D_80151324)
/* A73E8 80110CE8 AC201324 */  sw        $zero, %lo(D_80151324)($at)
/* A73EC 80110CEC 3C018015 */  lui       $at, %hi(entity_updateCounter)
/* A73F0 80110CF0 AC201330 */  sw        $zero, %lo(entity_updateCounter)($at)
/* A73F4 80110CF4 3C018015 */  lui       $at, %hi(D_80151304)
/* A73F8 80110CF8 AC201304 */  sw        $zero, %lo(D_80151304)($at)
/* A73FC 80110CFC 80420070 */  lb        $v0, 0x70($v0)
/* A7400 80110D00 14400003 */  bnez      $v0, .L80110D10
/* A7404 80110D04 00000000 */   nop
/* A7408 80110D08 3C018015 */  lui       $at, %hi(gEntityHideMode)
/* A740C 80110D0C AC201310 */  sw        $zero, %lo(gEntityHideMode)($at)
.L80110D10:
/* A7410 80110D10 3C028016 */  lui       $v0, %hi(gCurrentHiddenPanels)
/* A7414 80110D14 2442A578 */  addiu     $v0, $v0, %lo(gCurrentHiddenPanels)
/* A7418 80110D18 3C018015 */  lui       $at, %hi(D_8015132C)
/* A741C 80110D1C AC20132C */  sw        $zero, %lo(D_8015132C)($at)
/* A7420 80110D20 A0400001 */  sb        $zero, 0x1($v0)
/* A7424 80110D24 14800003 */  bnez      $a0, .L80110D34
/* A7428 80110D28 A0400002 */   sb       $zero, 0x2($v0)
/* A742C 80110D2C 3C018015 */  lui       $at, %hi(D_80151344)
/* A7430 80110D30 AC201344 */  sw        $zero, %lo(D_80151344)($at)
.L80110D34:
/* A7434 80110D34 8CA20000 */  lw        $v0, 0x0($a1)
/* A7438 80110D38 240300FF */  addiu     $v1, $zero, 0xFF
/* A743C 80110D3C 3C018015 */  lui       $at, %hi(D_8014AFB0)
/* A7440 80110D40 AC23AFB0 */  sw        $v1, %lo(D_8014AFB0)($at)
/* A7444 80110D44 80420070 */  lb        $v0, 0x70($v0)
/* A7448 80110D48 1440000C */  bnez      $v0, .L80110D7C
/* A744C 80110D4C 24040003 */   addiu    $a0, $zero, 0x3
/* A7450 80110D50 3C018015 */  lui       $at, %hi(wEntityBlueprintSize)
/* A7454 80110D54 AC20165C */  sw        $zero, %lo(wEntityBlueprintSize)($at)
/* A7458 80110D58 2404001D */  addiu     $a0, $zero, 0x1D
/* A745C 80110D5C 3C028015 */  lui       $v0, %hi(D_801516DC)
/* A7460 80110D60 244216DC */  addiu     $v0, $v0, %lo(D_801516DC)
.L80110D64:
/* A7464 80110D64 AC400000 */  sw        $zero, 0x0($v0)
/* A7468 80110D68 2484FFFF */  addiu     $a0, $a0, -0x1
/* A746C 80110D6C 0481FFFD */  bgez      $a0, .L80110D64
/* A7470 80110D70 2442FFFC */   addiu    $v0, $v0, -0x4
/* A7474 80110D74 08044367 */  j         .L80110D9C
/* A7478 80110D78 00000000 */   nop
.L80110D7C:
/* A747C 80110D7C 3C018015 */  lui       $at, %hi(bEntityBlueprintSize)
/* A7480 80110D80 AC201660 */  sw        $zero, %lo(bEntityBlueprintSize)($at)
/* A7484 80110D84 3C028015 */  lui       $v0, %hi(D_801516F4)
/* A7488 80110D88 244216F4 */  addiu     $v0, $v0, %lo(D_801516F4)
.L80110D8C:
/* A748C 80110D8C AC400000 */  sw        $zero, 0x0($v0)
/* A7490 80110D90 2484FFFF */  addiu     $a0, $a0, -0x1
/* A7494 80110D94 0481FFFD */  bgez      $a0, .L80110D8C
/* A7498 80110D98 2442FFFC */   addiu    $v0, $v0, -0x4
.L80110D9C:
/* A749C 80110D9C 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* A74A0 80110DA0 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* A74A4 80110DA4 80420070 */  lb        $v0, 0x70($v0)
/* A74A8 80110DA8 14400009 */  bnez      $v0, .L80110DD0
/* A74AC 80110DAC 3C028025 */   lui      $v0, (0x80250000 >> 16)
/* A74B0 80110DB0 3C038026 */  lui       $v1, (0x80267FF0 >> 16)
/* A74B4 80110DB4 34637FF0 */  ori       $v1, $v1, (0x80267FF0 & 0xFFFF)
/* A74B8 80110DB8 3C018015 */  lui       $at, %hi(D_80151300)
/* A74BC 80110DBC AC221300 */  sw        $v0, %lo(D_80151300)($at)
/* A74C0 80110DC0 3C018015 */  lui       $at, %hi(gEntityHeapBase)
/* A74C4 80110DC4 AC2312C4 */  sw        $v1, %lo(gEntityHeapBase)($at)
/* A74C8 80110DC8 0804437B */  j         .L80110DEC
/* A74CC 80110DCC 00000000 */   nop
.L80110DD0:
/* A74D0 80110DD0 3C02801A */  lui       $v0, %hi(BattleEntityHeapBottom)
/* A74D4 80110DD4 24427000 */  addiu     $v0, $v0, %lo(BattleEntityHeapBottom)
/* A74D8 80110DD8 3C018015 */  lui       $at, %hi(D_80151300)
/* A74DC 80110DDC AC221300 */  sw        $v0, %lo(D_80151300)($at)
/* A74E0 80110DE0 24423000 */  addiu     $v0, $v0, 0x3000
/* A74E4 80110DE4 3C018015 */  lui       $at, %hi(gEntityHeapBase)
/* A74E8 80110DE8 AC2212C4 */  sw        $v0, %lo(gEntityHeapBase)($at)
.L80110DEC:
/* A74EC 80110DEC 0C044188 */  jal       get_entity_list
/* A74F0 80110DF0 00000000 */   nop
/* A74F4 80110DF4 3C108015 */  lui       $s0, %hi(gCurrentEntityListPtr)
/* A74F8 80110DF8 26101470 */  addiu     $s0, $s0, %lo(gCurrentEntityListPtr)
/* A74FC 80110DFC 0C044193 */  jal       get_shadow_list
/* A7500 80110E00 AE020000 */   sw       $v0, 0x0($s0)
/* A7504 80110E04 8E030000 */  lw        $v1, 0x0($s0)
/* A7508 80110E08 2404001D */  addiu     $a0, $zero, 0x1D
/* A750C 80110E0C 3C018015 */  lui       $at, %hi(gCurrentShadowListPtr)
/* A7510 80110E10 AC221658 */  sw        $v0, %lo(gCurrentShadowListPtr)($at)
/* A7514 80110E14 24630074 */  addiu     $v1, $v1, 0x74
.L80110E18:
/* A7518 80110E18 AC600000 */  sw        $zero, 0x0($v1)
/* A751C 80110E1C 2484FFFF */  addiu     $a0, $a0, -0x1
/* A7520 80110E20 0481FFFD */  bgez      $a0, .L80110E18
/* A7524 80110E24 2463FFFC */   addiu    $v1, $v1, -0x4
/* A7528 80110E28 3C028015 */  lui       $v0, %hi(gCurrentShadowListPtr)
/* A752C 80110E2C 8C421658 */  lw        $v0, %lo(gCurrentShadowListPtr)($v0)
/* A7530 80110E30 2404003B */  addiu     $a0, $zero, 0x3B
/* A7534 80110E34 244200EC */  addiu     $v0, $v0, 0xEC
.L80110E38:
/* A7538 80110E38 AC400000 */  sw        $zero, 0x0($v0)
/* A753C 80110E3C 2484FFFF */  addiu     $a0, $a0, -0x1
/* A7540 80110E40 0481FFFD */  bgez      $a0, .L80110E38
/* A7544 80110E44 2442FFFC */   addiu    $v0, $v0, -0x4
/* A7548 80110E48 8FBF0014 */  lw        $ra, 0x14($sp)
/* A754C 80110E4C 8FB00010 */  lw        $s0, 0x10($sp)
/* A7550 80110E50 03E00008 */  jr        $ra
/* A7554 80110E54 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void clear_entity_data(s32 arg0) {
    s32 i;

    D_801516FC = 1;
    entity_numEntities = 0;
    entity_numShadows = 0;
    entity_updateCounter = 0;
    D_80151304 = 0;

    if (!gGameStatusPtr->isBattle) {
        gEntityHideMode = ENTITY_HIDE_MODE_0;
    }

    entity_area_specific_data_is_loaded = FALSE;
    gCurrentHiddenPanels.panelsCount = 0;
    gCurrentHiddenPanels.activateISpy = FALSE;
    if (!arg0) {
        D_80151344 = 0;
    }
    D_8014AFB0 = 0xFF;

    if (!gGameStatusPtr->isBattle) {
        wEntityDataLoadedSize = 0;
        for (i = 0; i < MAX_ENTITIES; i++) {
            wEntityBlueprint[i] = NULL;
        }
    } else {
        bEntityDataLoadedSize = 0;
        for (i = 0; i < 4; i++) {
            bEntityBlueprint[i] = NULL;
        }
    }

    if (!gGameStatusPtr->isBattle) {
        gEntityHeapBottom = WORLD_ENTITY_HEAP_BOTTOM;
        gEntityHeapBase = WORLD_ENTITY_HEAP_BASE;
    } else {
        gEntityHeapBottom = (s32) BattleEntityHeapBottom;
        gEntityHeapBase = gEntityHeapBottom + 0x3000;
    }

    gCurrentEntityListPtr = get_entity_list();
    gCurrentShadowListPtr = get_shadow_list();

    for (i = 0; i < MAX_ENTITIES; i++) {
        (*gCurrentEntityListPtr)[i] = NULL;
    }

    for (i = 0; i < MAX_SHADOWS; i++) {
        (*gCurrentShadowListPtr)[i] = NULL;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel floating_flower_appendGfx
/* 330270 E001A440 27BDFF40 */  addiu     $sp, $sp, -0xC0
/* 330274 E001A444 0080382D */  daddu     $a3, $a0, $zero
/* 330278 E001A448 3C08DB06 */  lui       $t0, (0xDB060024 >> 16)
/* 33027C E001A44C 35080024 */  ori       $t0, $t0, (0xDB060024 & 0xFFFF)
/* 330280 E001A450 AFB400B8 */  sw        $s4, 0xB8($sp)
/* 330284 E001A454 3C14800A */  lui       $s4, %hi(gMainGfxPos)
/* 330288 E001A458 2694A66C */  addiu     $s4, $s4, %lo(gMainGfxPos)
/* 33028C E001A45C 27A40020 */  addiu     $a0, $sp, 0x20
/* 330290 E001A460 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 330294 E001A464 AFBF00BC */  sw        $ra, 0xBC($sp)
/* 330298 E001A468 AFB300B4 */  sw        $s3, 0xB4($sp)
/* 33029C E001A46C AFB200B0 */  sw        $s2, 0xB0($sp)
/* 3302A0 E001A470 AFB100AC */  sw        $s1, 0xAC($sp)
/* 3302A4 E001A474 AFB000A8 */  sw        $s0, 0xA8($sp)
/* 3302A8 E001A478 8E830000 */  lw        $v1, 0x0($s4)
/* 3302AC E001A47C 8CE6000C */  lw        $a2, 0xC($a3)
/* 3302B0 E001A480 0060282D */  daddu     $a1, $v1, $zero
/* 3302B4 E001A484 24630008 */  addiu     $v1, $v1, 0x8
/* 3302B8 E001A488 ACA20000 */  sw        $v0, 0x0($a1)
/* 3302BC E001A48C ACA00004 */  sw        $zero, 0x4($a1)
/* 3302C0 E001A490 AC680000 */  sw        $t0, 0x0($v1)
/* 3302C4 E001A494 8CE20010 */  lw        $v0, 0x10($a3)
/* 3302C8 E001A498 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 3302CC E001A49C 44810000 */  mtc1      $at, $f0
/* 3302D0 E001A4A0 8C42001C */  lw        $v0, 0x1C($v0)
/* 3302D4 E001A4A4 3C058000 */  lui       $a1, (0x80000000 >> 16)
/* 3302D8 E001A4A8 00451021 */  addu      $v0, $v0, $a1
/* 3302DC E001A4AC AC620004 */  sw        $v0, 0x4($v1)
/* 3302E0 E001A4B0 E7A00010 */  swc1      $f0, 0x10($sp)
/* 3302E4 E001A4B4 C4C00004 */  lwc1      $f0, 0x4($a2)
/* 3302E8 E001A4B8 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3302EC E001A4BC E7A00014 */  swc1      $f0, 0x14($sp)
/* 3302F0 E001A4C0 C4C00008 */  lwc1      $f0, 0x8($a2)
/* 3302F4 E001A4C4 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3302F8 E001A4C8 E7A00018 */  swc1      $f0, 0x18($sp)
/* 3302FC E001A4CC C4C0000C */  lwc1      $f0, 0xC($a2)
/* 330300 E001A4D0 0000382D */  daddu     $a3, $zero, $zero
/* 330304 E001A4D4 AE830000 */  sw        $v1, 0x0($s4)
/* 330308 E001A4D8 E7A0001C */  swc1      $f0, 0x1C($sp)
/* 33030C E001A4DC 8CC50024 */  lw        $a1, 0x24($a2)
/* 330310 E001A4E0 8CC60028 */  lw        $a2, 0x28($a2)
/* 330314 E001A4E4 24630008 */  addiu     $v1, $v1, 0x8
/* 330318 E001A4E8 0C080180 */  jal       shim_guPositionF
/* 33031C E001A4EC AE830000 */   sw       $v1, 0x0($s4)
/* 330320 E001A4F0 27A40020 */  addiu     $a0, $sp, 0x20
/* 330324 E001A4F4 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 330328 E001A4F8 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 33032C E001A4FC 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 330330 E001A500 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 330334 E001A504 96050000 */  lhu       $a1, 0x0($s0)
/* 330338 E001A508 8E220000 */  lw        $v0, 0x0($s1)
/* 33033C E001A50C 00052980 */  sll       $a1, $a1, 6
/* 330340 E001A510 00B22821 */  addu      $a1, $a1, $s2
/* 330344 E001A514 0C080118 */  jal       shim_guMtxF2L
/* 330348 E001A518 00452821 */   addu     $a1, $v0, $a1
/* 33034C E001A51C 8E820000 */  lw        $v0, 0x0($s4)
/* 330350 E001A520 241300FF */  addiu     $s3, $zero, 0xFF
/* 330354 E001A524 A3B300A1 */  sb        $s3, 0xA1($sp)
/* 330358 E001A528 0040282D */  daddu     $a1, $v0, $zero
/* 33035C E001A52C 24420008 */  addiu     $v0, $v0, 0x8
/* 330360 E001A530 AE820000 */  sw        $v0, 0x0($s4)
/* 330364 E001A534 96020000 */  lhu       $v0, 0x0($s0)
/* 330368 E001A538 3C03DA38 */  lui       $v1, (0xDA380000 >> 16)
/* 33036C E001A53C ACA30000 */  sw        $v1, 0x0($a1)
/* 330370 E001A540 24430001 */  addiu     $v1, $v0, 0x1
/* 330374 E001A544 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 330378 E001A548 00021180 */  sll       $v0, $v0, 6
/* 33037C E001A54C 00521021 */  addu      $v0, $v0, $s2
/* 330380 E001A550 A6030000 */  sh        $v1, 0x0($s0)
/* 330384 E001A554 8E230000 */  lw        $v1, 0x0($s1)
/* 330388 E001A558 3C048015 */  lui       $a0, %hi(gBackgroundFogModePtr)
/* 33038C E001A55C 8C8412F0 */  lw        $a0, %lo(gBackgroundFogModePtr)($a0)
/* 330390 E001A560 00621821 */  addu      $v1, $v1, $v0
/* 330394 E001A564 ACA30004 */  sw        $v1, 0x4($a1)
/* 330398 E001A568 90830000 */  lbu       $v1, 0x0($a0)
/* 33039C E001A56C 24020001 */  addiu     $v0, $zero, 0x1
/* 3303A0 E001A570 14620007 */  bne       $v1, $v0, .LE001A590
/* 3303A4 E001A574 27A400A0 */   addiu    $a0, $sp, 0xA0
/* 3303A8 E001A578 0080282D */  daddu     $a1, $a0, $zero
/* 3303AC E001A57C 0080302D */  daddu     $a2, $a0, $zero
/* 3303B0 E001A580 0C08019C */  jal       shim_get_background_color_blend
/* 3303B4 E001A584 27A700A1 */   addiu    $a3, $sp, 0xA1
/* 3303B8 E001A588 93A200A1 */  lbu       $v0, 0xA1($sp)
/* 3303BC E001A58C 02629823 */  subu      $s3, $s3, $v0
.LE001A590:
/* 3303C0 E001A590 12600016 */  beqz      $s3, .LE001A5EC
/* 3303C4 E001A594 3C05D838 */   lui      $a1, (0xD8380002 >> 16)
/* 3303C8 E001A598 34A50002 */  ori       $a1, $a1, (0xD8380002 & 0xFFFF)
/* 3303CC E001A59C 8E830000 */  lw        $v1, 0x0($s4)
/* 3303D0 E001A5A0 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3303D4 E001A5A4 0060202D */  daddu     $a0, $v1, $zero
/* 3303D8 E001A5A8 24630008 */  addiu     $v1, $v1, 0x8
/* 3303DC E001A5AC AE830000 */  sw        $v1, 0x0($s4)
/* 3303E0 E001A5B0 AC820000 */  sw        $v0, 0x0($a0)
/* 3303E4 E001A5B4 326200FF */  andi      $v0, $s3, 0xFF
/* 3303E8 E001A5B8 AC820004 */  sw        $v0, 0x4($a0)
/* 3303EC E001A5BC 24620008 */  addiu     $v0, $v1, 0x8
/* 3303F0 E001A5C0 AE820000 */  sw        $v0, 0x0($s4)
/* 3303F4 E001A5C4 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3303F8 E001A5C8 AC620000 */  sw        $v0, 0x0($v1)
/* 3303FC E001A5CC 3C020900 */  lui       $v0, %hi(D_090002F0_415350)
/* 330400 E001A5D0 244202F0 */  addiu     $v0, $v0, %lo(D_090002F0_415350)
/* 330404 E001A5D4 AC620004 */  sw        $v0, 0x4($v1)
/* 330408 E001A5D8 24620010 */  addiu     $v0, $v1, 0x10
/* 33040C E001A5DC AE820000 */  sw        $v0, 0x0($s4)
/* 330410 E001A5E0 24020040 */  addiu     $v0, $zero, 0x40
/* 330414 E001A5E4 AC650008 */  sw        $a1, 0x8($v1)
/* 330418 E001A5E8 AC62000C */  sw        $v0, 0xC($v1)
.LE001A5EC:
/* 33041C E001A5EC 8FBF00BC */  lw        $ra, 0xBC($sp)
/* 330420 E001A5F0 8FB400B8 */  lw        $s4, 0xB8($sp)
/* 330424 E001A5F4 8FB300B4 */  lw        $s3, 0xB4($sp)
/* 330428 E001A5F8 8FB200B0 */  lw        $s2, 0xB0($sp)
/* 33042C E001A5FC 8FB100AC */  lw        $s1, 0xAC($sp)
/* 330430 E001A600 8FB000A8 */  lw        $s0, 0xA8($sp)
/* 330434 E001A604 03E00008 */  jr        $ra
/* 330438 E001A608 27BD00C0 */   addiu    $sp, $sp, 0xC0
/* 33043C E001A60C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

void floating_flower_appendGfx(void* effect) {
    Matrix4f mtxTransform, mtxUnused;
    EffectInstance* effectTemp = effect;
    FloatingFlowerFXData* part = effectTemp->data.floatingFlower;
    u32 alpha;
    u8 rgb, a;

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

    shim_guPositionF(mtxTransform, part->rot.x, part->rot.y, 0.0f, 1.0f, part->pos.x, part->pos.y, part->pos.z);
    shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);

    a = alpha = 255;

    gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);

    if (*gBackgroundFogModePtr == FOG_MODE_1) {
        shim_get_background_color_blend(&rgb, &rgb, &rgb, &a);
        alpha -= a;
    }

    if (alpha != 0) {
        gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, alpha);
        gSPDisplayList(gMainGfxPos++, D_090002F0_330750);
        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel play_hit_sound
/* 1A58E4 80277004 44850000 */  mtc1      $a1, $f0
/* 1A58E8 80277008 44861000 */  mtc1      $a2, $f2
/* 1A58EC 8027700C 44872000 */  mtc1      $a3, $f4
/* 1A58F0 80277010 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 1A58F4 80277014 AFBF0018 */  sw        $ra, 0x18($sp)
/* 1A58F8 80277018 94820192 */  lhu       $v0, 0x192($a0)
/* 1A58FC 8027701C 8FA40030 */  lw        $a0, 0x30($sp)
/* 1A5900 80277020 30430700 */  andi      $v1, $v0, 0x700
/* 1A5904 80277024 2C820006 */  sltiu     $v0, $a0, 0x6
/* 1A5908 80277028 1040004A */  beqz      $v0, .L80277154
/* 1A590C 8027702C 00041080 */   sll      $v0, $a0, 2
/* 1A5910 80277030 3C01802A */  lui       $at, %hi(jtbl_8029D990)
/* 1A5914 80277034 00220821 */  addu      $at, $at, $v0
/* 1A5918 80277038 8C22D990 */  lw        $v0, %lo(jtbl_8029D990)($at)
/* 1A591C 8027703C 00400008 */  jr        $v0
/* 1A5920 80277040 00000000 */   nop
glabel .L80277044
/* 1A5924 80277044 0809DC50 */  j         .L80277140
/* 1A5928 80277048 2404010C */   addiu    $a0, $zero, 0x10C
glabel .L8027704C
/* 1A592C 8027704C 0809DC50 */  j         .L80277140
/* 1A5930 80277050 2404010D */   addiu    $a0, $zero, 0x10D
glabel .L80277054
/* 1A5934 80277054 24020100 */  addiu     $v0, $zero, 0x100
/* 1A5938 80277058 1062000B */  beq       $v1, $v0, .L80277088
/* 1A593C 8027705C 28620101 */   slti     $v0, $v1, 0x101
/* 1A5940 80277060 50400005 */  beql      $v0, $zero, .L80277078
/* 1A5944 80277064 24020200 */   addiu    $v0, $zero, 0x200
/* 1A5948 80277068 10600035 */  beqz      $v1, .L80277140
/* 1A594C 8027706C 240400E1 */   addiu    $a0, $zero, 0xE1
/* 1A5950 80277070 0809DC55 */  j         .L80277154
/* 1A5954 80277074 00000000 */   nop
.L80277078:
/* 1A5958 80277078 10620031 */  beq       $v1, $v0, .L80277140
/* 1A595C 8027707C 240400E9 */   addiu    $a0, $zero, 0xE9
/* 1A5960 80277080 0809DC55 */  j         .L80277154
/* 1A5964 80277084 00000000 */   nop
.L80277088:
/* 1A5968 80277088 0809DC50 */  j         .L80277140
/* 1A596C 8027708C 240400E9 */   addiu    $a0, $zero, 0xE9
glabel .L80277090
/* 1A5970 80277090 24020100 */  addiu     $v0, $zero, 0x100
/* 1A5974 80277094 1062000B */  beq       $v1, $v0, .L802770C4
/* 1A5978 80277098 28620101 */   slti     $v0, $v1, 0x101
/* 1A597C 8027709C 50400005 */  beql      $v0, $zero, .L802770B4
/* 1A5980 802770A0 24020200 */   addiu    $v0, $zero, 0x200
/* 1A5984 802770A4 10600026 */  beqz      $v1, .L80277140
/* 1A5988 802770A8 240400E2 */   addiu    $a0, $zero, 0xE2
/* 1A598C 802770AC 0809DC55 */  j         .L80277154
/* 1A5990 802770B0 00000000 */   nop
.L802770B4:
/* 1A5994 802770B4 10620022 */  beq       $v1, $v0, .L80277140
/* 1A5998 802770B8 240400EA */   addiu    $a0, $zero, 0xEA
/* 1A599C 802770BC 0809DC55 */  j         .L80277154
/* 1A59A0 802770C0 00000000 */   nop
.L802770C4:
/* 1A59A4 802770C4 0809DC50 */  j         .L80277140
/* 1A59A8 802770C8 240400EA */   addiu    $a0, $zero, 0xEA
glabel .L802770CC
/* 1A59AC 802770CC 24020100 */  addiu     $v0, $zero, 0x100
/* 1A59B0 802770D0 1062000B */  beq       $v1, $v0, .L80277100
/* 1A59B4 802770D4 28620101 */   slti     $v0, $v1, 0x101
/* 1A59B8 802770D8 50400005 */  beql      $v0, $zero, .L802770F0
/* 1A59BC 802770DC 24020200 */   addiu    $v0, $zero, 0x200
/* 1A59C0 802770E0 10600017 */  beqz      $v1, .L80277140
/* 1A59C4 802770E4 240400E3 */   addiu    $a0, $zero, 0xE3
/* 1A59C8 802770E8 0809DC55 */  j         .L80277154
/* 1A59CC 802770EC 00000000 */   nop
.L802770F0:
/* 1A59D0 802770F0 10620013 */  beq       $v1, $v0, .L80277140
/* 1A59D4 802770F4 240400EB */   addiu    $a0, $zero, 0xEB
/* 1A59D8 802770F8 0809DC55 */  j         .L80277154
/* 1A59DC 802770FC 00000000 */   nop
.L80277100:
/* 1A59E0 80277100 0809DC50 */  j         .L80277140
/* 1A59E4 80277104 240400EB */   addiu    $a0, $zero, 0xEB
glabel .L80277108
/* 1A59E8 80277108 24020100 */  addiu     $v0, $zero, 0x100
/* 1A59EC 8027710C 1062000B */  beq       $v1, $v0, .L8027713C
/* 1A59F0 80277110 28620101 */   slti     $v0, $v1, 0x101
/* 1A59F4 80277114 50400005 */  beql      $v0, $zero, .L8027712C
/* 1A59F8 80277118 24020200 */   addiu    $v0, $zero, 0x200
/* 1A59FC 8027711C 10600008 */  beqz      $v1, .L80277140
/* 1A5A00 80277120 2404037A */   addiu    $a0, $zero, 0x37A
/* 1A5A04 80277124 0809DC55 */  j         .L80277154
/* 1A5A08 80277128 00000000 */   nop
.L8027712C:
/* 1A5A0C 8027712C 10620004 */  beq       $v1, $v0, .L80277140
/* 1A5A10 80277130 2404037B */   addiu    $a0, $zero, 0x37B
/* 1A5A14 80277134 0809DC55 */  j         .L80277154
/* 1A5A18 80277138 00000000 */   nop
.L8027713C:
/* 1A5A1C 8027713C 2404037B */  addiu     $a0, $zero, 0x37B
.L80277140:
/* 1A5A20 80277140 44060000 */  mfc1      $a2, $f0
/* 1A5A24 80277144 44071000 */  mfc1      $a3, $f2
/* 1A5A28 80277148 0000282D */  daddu     $a1, $zero, $zero
/* 1A5A2C 8027714C 0C052757 */  jal       sfx_play_sound_at_position
/* 1A5A30 80277150 E7A40010 */   swc1     $f4, 0x10($sp)
.L80277154:
/* 1A5A34 80277154 8FBF0018 */  lw        $ra, 0x18($sp)
/* 1A5A38 80277158 03E00008 */  jr        $ra
/* 1A5A3C 8027715C 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void play_hit_sound(Actor* actor, f32 x, f32 y, f32 z, u32 hitSound) {
    s32 actorClass = actor->actorID & ACTOR_CLASS_MASK;

    switch (hitSound) {
        case HIT_SOUND_MISS:
            sfx_play_sound_at_position(SOUND_IMMUNE, SOUND_SPACE_MODE_0, x, y, z);
            break;
        case HIT_SOUND_BONES:
            sfx_play_sound_at_position(SOUND_HIT_BONES, SOUND_SPACE_MODE_0, x, y, z);
            break;
        case HIT_SOUND_NORMAL:
            switch (actorClass) {
                case ACTOR_CLASS_PLAYER:
                    sfx_play_sound_at_position(SOUND_HIT_PLAYER_NORMAL, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_PARTNER:
                    sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_ENEMY:
                    sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, x, y, z);
                    break;
            }
            break;
        case HIT_SOUND_FIRE:
            switch (actorClass) {
                case ACTOR_CLASS_PLAYER:
                    sfx_play_sound_at_position(SOUND_HIT_PLAYER_FIRE, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_PARTNER:
                    sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_ENEMY:
                    sfx_play_sound_at_position(SOUND_HIT_FIRE, SOUND_SPACE_MODE_0, x, y, z);
                    break;
            }
            break;
        case HIT_SOUND_ICE:
            switch (actorClass) {
                case ACTOR_CLASS_PLAYER:
                    sfx_play_sound_at_position(SOUND_HIT_PLAYER_ICE, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_PARTNER:
                    sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_ENEMY:
                    sfx_play_sound_at_position(SOUND_HIT_ICE, SOUND_SPACE_MODE_0, x, y, z);
                    break;
            }
            break;
        case HIT_SOUND_SHOCK:
            switch (actorClass) {
                case ACTOR_CLASS_PLAYER:
                    sfx_play_sound_at_position(SOUND_HIT_PLAYER_SHOCK, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_PARTNER:
                    sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, x, y, z);
                    break;
                case ACTOR_CLASS_ENEMY:
                    sfx_play_sound_at_position(SOUND_HIT_SHOCK, SOUND_SPACE_MODE_0, x, y, z);
                    break;
            }
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel render_player_model
/* 7A618 800E1168 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 7A61C 800E116C AFB10044 */  sw        $s1, 0x44($sp)
/* 7A620 800E1170 AFB00040 */  sw        $s0, 0x40($sp)
/* 7A624 800E1174 3C108011 */  lui       $s0, %hi(gPlayerStatus)
/* 7A628 800E1178 2610EFC8 */  addiu     $s0, $s0, %lo(gPlayerStatus)
/* 7A62C 800E117C AFBF0048 */  sw        $ra, 0x48($sp)
/* 7A630 800E1180 8E030000 */  lw        $v1, 0x0($s0)
/* 7A634 800E1184 3C024000 */  lui       $v0, (0x40000000 >> 16)
/* 7A638 800E1188 00621024 */  and       $v0, $v1, $v0
/* 7A63C 800E118C 10400054 */  beqz      $v0, .L800E12E0
/* 7A640 800E1190 27B10020 */   addiu    $s1, $sp, 0x20
/* 7A644 800E1194 3C02BFFF */  lui       $v0, (0xBFFFFFFF >> 16)
/* 7A648 800E1198 3442FFFF */  ori       $v0, $v0, (0xBFFFFFFF & 0xFFFF)
/* 7A64C 800E119C 8E050028 */  lw        $a1, 0x28($s0)
/* 7A650 800E11A0 8E06002C */  lw        $a2, 0x2C($s0)
/* 7A654 800E11A4 8E070030 */  lw        $a3, 0x30($s0)
/* 7A658 800E11A8 3C04800A */  lui       $a0, %hi(gCurrentCamID)
/* 7A65C 800E11AC 8484A634 */  lh        $a0, %lo(gCurrentCamID)($a0)
/* 7A660 800E11B0 00621024 */  and       $v0, $v1, $v0
/* 7A664 800E11B4 AE020000 */  sw        $v0, 0x0($s0)
/* 7A668 800E11B8 27A20030 */  addiu     $v0, $sp, 0x30
/* 7A66C 800E11BC AFA20010 */  sw        $v0, 0x10($sp)
/* 7A670 800E11C0 27A20034 */  addiu     $v0, $sp, 0x34
/* 7A674 800E11C4 AFA20014 */  sw        $v0, 0x14($sp)
/* 7A678 800E11C8 27A20038 */  addiu     $v0, $sp, 0x38
/* 7A67C 800E11CC 0C00B94E */  jal       get_screen_coords
/* 7A680 800E11D0 AFA20018 */   sw       $v0, 0x18($sp)
/* 7A684 800E11D4 8E020000 */  lw        $v0, 0x0($s0)
/* 7A688 800E11D8 3C030002 */  lui       $v1, (0x20000 >> 16)
/* 7A68C 800E11DC 00431024 */  and       $v0, $v0, $v1
/* 7A690 800E11E0 14400026 */  bnez      $v0, .L800E127C
/* 7A694 800E11E4 24020011 */   addiu    $v0, $zero, 0x11
/* 7A698 800E11E8 9203000E */  lbu       $v1, 0xE($s0)
/* 7A69C 800E11EC 9202000F */  lbu       $v0, 0xF($s0)
/* 7A6A0 800E11F0 1062001F */  beq       $v1, $v0, .L800E1270
/* 7A6A4 800E11F4 2C6200FE */   sltiu    $v0, $v1, 0xFE
/* 7A6A8 800E11F8 10400011 */  beqz      $v0, .L800E1240
/* 7A6AC 800E11FC 3C030100 */   lui      $v1, (0x1000000 >> 16)
/* 7A6B0 800E1200 8E020004 */  lw        $v0, 0x4($s0)
/* 7A6B4 800E1204 00431024 */  and       $v0, $v0, $v1
/* 7A6B8 800E1208 14400002 */  bnez      $v0, .L800E1214
/* 7A6BC 800E120C 24080016 */   addiu    $t0, $zero, 0x16
/* 7A6C0 800E1210 24080011 */  addiu     $t0, $zero, 0x11
.L800E1214:
/* 7A6C4 800E1214 0000202D */  daddu     $a0, $zero, $zero
/* 7A6C8 800E1218 2405FFFF */  addiu     $a1, $zero, -0x1
/* 7A6CC 800E121C 24060007 */  addiu     $a2, $zero, 0x7
/* 7A6D0 800E1220 9202000E */  lbu       $v0, 0xE($s0)
/* 7A6D4 800E1224 0080382D */  daddu     $a3, $a0, $zero
/* 7A6D8 800E1228 A20800BE */  sb        $t0, 0xBE($s0)
/* 7A6DC 800E122C AFA00010 */  sw        $zero, 0x10($sp)
/* 7A6E0 800E1230 AFA00014 */  sw        $zero, 0x14($sp)
/* 7A6E4 800E1234 AFA0001C */  sw        $zero, 0x1C($sp)
/* 7A6E8 800E1238 0803849A */  j         .L800E1268
/* 7A6EC 800E123C AFA20018 */   sw       $v0, 0x18($sp)
.L800E1240:
/* 7A6F0 800E1240 0000202D */  daddu     $a0, $zero, $zero
/* 7A6F4 800E1244 2405FFFF */  addiu     $a1, $zero, -0x1
/* 7A6F8 800E1248 0080302D */  daddu     $a2, $a0, $zero
/* 7A6FC 800E124C 0080382D */  daddu     $a3, $a0, $zero
/* 7A700 800E1250 2402000D */  addiu     $v0, $zero, 0xD
/* 7A704 800E1254 A20200BE */  sb        $v0, 0xBE($s0)
/* 7A708 800E1258 AFA00010 */  sw        $zero, 0x10($sp)
/* 7A70C 800E125C AFA00014 */  sw        $zero, 0x14($sp)
/* 7A710 800E1260 AFA00018 */  sw        $zero, 0x18($sp)
/* 7A714 800E1264 AFA0001C */  sw        $zero, 0x1C($sp)
.L800E1268:
/* 7A718 800E1268 0C0B77B9 */  jal       set_player_imgfx_comp
/* 7A71C 800E126C 00000000 */   nop
.L800E1270:
/* 7A720 800E1270 9202000E */  lbu       $v0, 0xE($s0)
/* 7A724 800E1274 080384A1 */  j         .L800E1284
/* 7A728 800E1278 A202000F */   sb       $v0, 0xF($s0)
.L800E127C:
/* 7A72C 800E127C A20200BE */  sb        $v0, 0xBE($s0)
/* 7A730 800E1280 A200000F */  sb        $zero, 0xF($s0)
.L800E1284:
/* 7A734 800E1284 8E020004 */  lw        $v0, 0x4($s0)
/* 7A738 800E1288 30422000 */  andi      $v0, $v0, 0x2000
/* 7A73C 800E128C 14400012 */  bnez      $v0, .L800E12D8
/* 7A740 800E1290 3C030002 */   lui      $v1, (0x20000 >> 16)
/* 7A744 800E1294 8FA20038 */  lw        $v0, 0x38($sp)
/* 7A748 800E1298 AE300008 */  sw        $s0, 0x8($s1)
/* 7A74C 800E129C 00021023 */  negu      $v0, $v0
/* 7A750 800E12A0 AE220004 */  sw        $v0, 0x4($s1)
/* 7A754 800E12A4 820200BE */  lb        $v0, 0xBE($s0)
/* 7A758 800E12A8 3C04800E */  lui       $a0, %hi(appendGfx_player_spin)
/* 7A75C 800E12AC 24841704 */  addiu     $a0, $a0, %lo(appendGfx_player_spin)
/* 7A760 800E12B0 AE220000 */  sw        $v0, 0x0($s1)
/* 7A764 800E12B4 8E020000 */  lw        $v0, 0x0($s0)
/* 7A768 800E12B8 00431024 */  and       $v0, $v0, $v1
/* 7A76C 800E12BC 54400004 */  bnel      $v0, $zero, .L800E12D0
/* 7A770 800E12C0 AE24000C */   sw       $a0, 0xC($s1)
/* 7A774 800E12C4 3C04800E */  lui       $a0, %hi(appendGfx_player)
/* 7A778 800E12C8 248412F4 */  addiu     $a0, $a0, %lo(appendGfx_player)
/* 7A77C 800E12CC AE24000C */  sw        $a0, 0xC($s1)
.L800E12D0:
/* 7A780 800E12D0 0C047644 */  jal       queue_render_task
/* 7A784 800E12D4 0220202D */   daddu    $a0, $s1, $zero
.L800E12D8:
/* 7A788 800E12D8 0C03C327 */  jal       func_800F0C9C
/* 7A78C 800E12DC 00000000 */   nop
.L800E12E0:
/* 7A790 800E12E0 8FBF0048 */  lw        $ra, 0x48($sp)
/* 7A794 800E12E4 8FB10044 */  lw        $s1, 0x44($sp)
/* 7A798 800E12E8 8FB00040 */  lw        $s0, 0x40($sp)
/* 7A79C 800E12EC 03E00008 */  jr        $ra
/* 7A7A0 800E12F0 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void render_player_model(void) {
    RenderTask task;
    RenderTask* rtPtr = &task;
    PlayerStatus* playerStatus = &gPlayerStatus;
    s32 x, y, z;
    s8 renderModeTemp;
    void (*appendGfx)(void*);

    if (playerStatus->flags & PS_FLAG_SPRITE_REDRAW) {
        playerStatus->flags &= ~PS_FLAG_SPRITE_REDRAW;
        get_screen_coords(gCurrentCamID, playerStatus->position.x, playerStatus->position.y,
                          playerStatus->position.z, &x, &y, &z);
        if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
            if (playerStatus->alpha1 != playerStatus->alpha2) {
                if (playerStatus->alpha1 < 254) {
                    if (!(playerStatus->animFlags & PA_FLAG_MAP_HAS_SWITCH)) {
                        renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER1;
                    } else {
                        renderModeTemp = RENDER_MODE_SURFACE_XLU_LAYER2;
                    }

                    playerStatus->renderMode = renderModeTemp;
                    set_player_imgfx_comp(PLAYER_SPRITE_MAIN, -1, IMGFX_SET_ALPHA, 0, 0, 0, playerStatus->alpha1, 0);

                } else {
                    playerStatus->renderMode = RENDER_MODE_ALPHATEST;
                    set_player_imgfx_comp(PLAYER_SPRITE_MAIN, -1, IMGFX_CLEAR, 0, 0, 0, 0, 0);
                }
            }

            playerStatus->alpha2 = playerStatus->alpha1;

        } else {
            playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER1;
            playerStatus->alpha2 = 0;
        }

        if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) {
            rtPtr->appendGfxArg = playerStatus;
            rtPtr->distance = -z;
            rtPtr->renderMode = playerStatus->renderMode;

            if (!(playerStatus->flags & PS_FLAG_SPINNING)) {
                appendGfx = appendGfx_player;
            } else {
                appendGfx = appendGfx_player_spin;
            }

            rtPtr->appendGfx = appendGfx;
            queue_render_task(rtPtr);
        }

        func_800F0C9C();
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80242D04
/* 136044 80242D04 27BDFFD8 */  addiu     $sp, $sp, -0x28
.L80242D08:
/* 136048 80242D08 AFB20018 */  sw        $s2, 0x18($sp)
glabel func_80242D0C
/* 13604C 80242D0C 00A0902D */  daddu     $s2, $a1, $zero
/* 136050 80242D10 AFB3001C */  sw        $s3, 0x1C($sp)
glabel func_80242D14
/* 136054 80242D14 00C0982D */  daddu     $s3, $a2, $zero
.L80242D18:
/* 136058 80242D18 AFB40020 */  sw        $s4, 0x20($sp)
glabel func_80242D1C
/* 13605C 80242D1C 3C148016 */  lui       $s4, %hi(gWindows)
glabel func_80242D20
/* 136060 80242D20 26949D50 */  addiu     $s4, $s4, %lo(gWindows)
.L80242D24:
/* 136064 80242D24 00042140 */  sll       $a0, $a0, 5
glabel func_80242D28
/* 136068 80242D28 AFB10014 */  sw        $s1, 0x14($sp)
glabel func_80242D2C
/* 13606C 80242D2C 3C118025 */  lui       $s1, %hi(D_8024EFB4)
.L80242D30:
/* 136070 80242D30 2631EFB4 */  addiu     $s1, $s1, %lo(D_8024EFB4)
D_80242D34:
/* 136074 80242D34 AFBF0024 */  sw        $ra, 0x24($sp)
glabel func_80242D38
/* 136078 80242D38 AFB00010 */  sw        $s0, 0x10($sp)
glabel func_80242D3C
/* 13607C 80242D3C 8E220000 */  lw        $v0, 0x0($s1)
D_80242D40:
/* 136080 80242D40 14400012 */  bnez      $v0, func_80242D8C
.L80242D44:
/* 136084 80242D44 00948021 */   addu     $s0, $a0, $s4
glabel func_80242D48
/* 136088 80242D48 0C00CD4A */  jal       get_game_mode
glabel func_80242D4C
/* 13608C 80242D4C 00000000 */   nop
D_80242D50:
/* 136090 80242D50 00021400 */  sll       $v0, $v0, 16
glabel .L80242D54
/* 136094 80242D54 00021403 */  sra       $v0, $v0, 16
glabel func_80242D58
/* 136098 80242D58 2403000F */  addiu     $v1, $zero, 0xF
.L80242D5C:
/* 13609C 80242D5C 10430008 */  beq       $v0, $v1, D_80242D80
D_80242D60:
/* 1360A0 80242D60 00000000 */   nop
glabel func_80242D64
/* 1360A4 80242D64 0C00CD4A */  jal       get_game_mode
.L80242D68:
/* 1360A8 80242D68 00000000 */   nop
.L80242D6C:
/* 1360AC 80242D6C 00021400 */  sll       $v0, $v0, 16
D_80242D70:
/* 1360B0 80242D70 00021403 */  sra       $v0, $v0, 16
.L80242D74:
/* 1360B4 80242D74 2403000D */  addiu     $v1, $zero, 0xD
.L80242D78:
/* 1360B8 80242D78 14430024 */  bne       $v0, $v1, func_80242E0C
.L80242D7C:
/* 1360BC 80242D7C 00000000 */   nop
D_80242D80:
/* 1360C0 80242D80 8E220000 */  lw        $v0, 0x0($s1)
.L80242D84:
/* 1360C4 80242D84 10400018 */  beqz      $v0, func_80242DE8
.L80242D88:
/* 1360C8 80242D88 00000000 */   nop
glabel func_80242D8C
/* 1360CC 80242D8C 24040016 */  addiu     $a0, $zero, 0x16
glabel func_80242D90
/* 1360D0 80242D90 2406FFFF */  addiu     $a2, $zero, -0x1
glabel func_80242D94
/* 1360D4 80242D94 0080282D */  daddu     $a1, $a0, $zero
glabel func_80242D98
/* 1360D8 80242D98 3C038016 */  lui       $v1, %hi(D_8015A010)
.L80242D9C:
/* 1360DC 80242D9C 2463A010 */  addiu     $v1, $v1, %lo(D_8015A010)
.L80242DA0:
/* 1360E0 80242DA0 80620003 */  lb        $v0, 0x3($v1)
.L80242DA4:
/* 1360E4 80242DA4 10460003 */  beq       $v0, $a2, .L80242DB4
glabel dead_kzn_17_LetterDelivery_RestoreNpcAnim
/* 1360E8 80242DA8 00000000 */   nop
D_80242DAC:
/* 1360EC 80242DAC 54450006 */  bnel      $v0, $a1, D_80242DC8
glabel func_80242DB0
/* 1360F0 80242DB0 24840001 */   addiu    $a0, $a0, 0x1
.L80242DB4:
/* 1360F4 80242DB4 90620000 */  lbu       $v0, 0x0($v1)
glabel func_80242DB8
/* 1360F8 80242DB8 30420008 */  andi      $v0, $v0, 0x8
glabel func_80242DBC
/* 1360FC 80242DBC 14400006 */  bnez      $v0, func_80242DD8
.L80242DC0:
/* 136100 80242DC0 2882002C */   slti     $v0, $a0, 0x2C
D_80242DC4:
/* 136104 80242DC4 24840001 */  addiu     $a0, $a0, 0x1
D_80242DC8:
/* 136108 80242DC8 2882002C */  slti      $v0, $a0, 0x2C
.L80242DCC:
/* 13610C 80242DCC 1440FFF4 */  bnez      $v0, .L80242DA0
.L80242DD0:
/* 136110 80242DD0 24630020 */   addiu    $v1, $v1, 0x20
/* 136114 80242DD4 2882002C */  slti      $v0, $a0, 0x2C
glabel func_80242DD8
/* 136118 80242DD8 14400003 */  bnez      $v0, func_80242DE8
.L80242DDC:
/* 13611C 80242DDC 00000000 */   nop
glabel func_80242DE0
/* 136120 80242DE0 3C018025 */  lui       $at, %hi(D_8024EFB4)
glabel func_80242DE4
/* 136124 80242DE4 AC20EFB4 */  sw        $zero, %lo(D_8024EFB4)($at)
glabel func_80242DE8
/* 136128 80242DE8 3C018025 */  lui       $at, %hi(dro_02_8024EFA8)
glabel func_80242DEC
/* 13612C 80242DEC AC32EFA8 */  sw        $s2, %lo(dro_02_8024EFA8)($at)
glabel func_80242DF0
/* 136130 80242DF0 3C018025 */  lui       $at, %hi(D_8024EF9C)
.L80242DF4:
/* 136134 80242DF4 AC32EF9C */  sw        $s2, %lo(D_8024EF9C)($at)
.L80242DF8:
/* 136138 80242DF8 3C018025 */  lui       $at, %hi(dro_02_pad_D_8024EFAC)
.L80242DFC:
/* 13613C 80242DFC AC33EFAC */  sw        $s3, %lo(dro_02_pad_D_8024EFAC)($at)
glabel dead_kzn_17_GetActingPartner
/* 136140 80242E00 3C018025 */  lui       $at, %hi(dro_02_Quizmo_Worker)
.L80242E04:
/* 136144 80242E04 08090B93 */  j         .L80242E4C
.L80242E08:
/* 136148 80242E08 AC33EFA0 */   sw       $s3, %lo(dro_02_Quizmo_Worker)($at)
glabel func_80242E0C
/* 13614C 80242E0C 92020000 */  lbu       $v0, 0x0($s0)
.L80242E10:
/* 136150 80242E10 30420008 */  andi      $v0, $v0, 0x8
glabel func_80242E14
/* 136154 80242E14 1440000D */  bnez      $v0, .L80242E4C
.L80242E18:
/* 136158 80242E18 2402FFFF */   addiu    $v0, $zero, -0x1
.L80242E1C:
/* 13615C 80242E1C 82040003 */  lb        $a0, 0x3($s0)
glabel func_80242E20
/* 136160 80242E20 10820006 */  beq       $a0, $v0, .L80242E3C
.L80242E24:
/* 136164 80242E24 00041140 */   sll      $v0, $a0, 5
D_80242E28:
/* 136168 80242E28 00541021 */  addu      $v0, $v0, $s4
glabel dead_kzn_17_UnkFunc46
/* 13616C 80242E2C 90420000 */  lbu       $v0, 0x0($v0)
/* 136170 80242E30 30420008 */  andi      $v0, $v0, 0x8
/* 136174 80242E34 14400005 */  bnez      $v0, .L80242E4C
.L80242E38:
/* 136178 80242E38 00000000 */   nop
.L80242E3C:
/* 13617C 80242E3C 3C018025 */  lui       $at, %hi(dro_02_8024EFA8)
.L80242E40:
/* 136180 80242E40 AC32EFA8 */  sw        $s2, %lo(dro_02_8024EFA8)($at)
.L80242E44:
/* 136184 80242E44 3C018025 */  lui       $at, %hi(dro_02_pad_D_8024EFAC)
.L80242E48:
/* 136188 80242E48 AC33EFAC */  sw        $s3, %lo(dro_02_pad_D_8024EFAC)($at)
.L80242E4C:
/* 13618C 80242E4C 8FBF0024 */  lw        $ra, 0x24($sp)
.L80242E50:
/* 136190 80242E50 8FB40020 */  lw        $s4, 0x20($sp)
glabel func_80242E54
/* 136194 80242E54 8FB3001C */  lw        $s3, 0x1C($sp)
.L80242E58:
/* 136198 80242E58 8FB20018 */  lw        $s2, 0x18($sp)
.L80242E5C:
/* 13619C 80242E5C 8FB10014 */  lw        $s1, 0x14($sp)
.L80242E60:
/* 1361A0 80242E60 8FB00010 */  lw        $s0, 0x10($sp)
.L80242E64:
/* 1361A4 80242E64 03E00008 */  jr        $ra
.L80242E68:
/* 1361A8 80242E68 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void pause_set_cursor_pos_immediate(s32 windowID, s32 posX, s32 posY) {
    Window* window = &gWindows[windowID];

    if (D_8024EFB4 != 0
            || get_game_mode() == GAME_MODE_END_FILE_SELECT
            || get_game_mode() == GAME_MODE_END_LANGUAGE_SELECT) {
        if (D_8024EFB4 != 0) {
            s32 i;

            for (i = WINDOW_ID_PAUSE_MAIN; i < WINDOW_ID_PAUSE_CURSOR; i++) {
                Window* window = &gWindows[i];
                s8 parent = window->parent;

                if ((parent == WINDOW_ID_NONE || parent == WINDOW_ID_PAUSE_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) {
                    break;
                }
            }
            if (i >= WINDOW_ID_PAUSE_CURSOR) {
                D_8024EFB4 = 0;
            }
        }
        gPauseCursorTargetPosX = posX;
        gPauseCursorPosX = posX;
        gPauseCursorTargetPosY = posY;
        gPauseCursorPosY = posY;

    } else if ((window->flags & WINDOW_FLAG_INITIAL_ANIMATION) == 0 && (window->parent == -1 || !(gWindows[window->parent].flags & WINDOW_FLAG_INITIAL_ANIMATION))) {
        gPauseCursorTargetPosX = posX;
        gPauseCursorPosX = posX;
        gPauseCursorTargetPosY = posY;
        gPauseCursorPosY = posY;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel action_command_draw
/* 1973D8 80268AF8 3C03802A */  lui       $v1, %hi(D_8029FC2A)
/* 1973DC 80268AFC 8463FC2A */  lh        $v1, %lo(D_8029FC2A)($v1)
/* 1973E0 80268B00 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 1973E4 80268B04 2C620018 */  sltiu     $v0, $v1, 0x18
/* 1973E8 80268B08 10400061 */  beqz      $v0, .L80268C90
/* 1973EC 80268B0C AFBF0010 */   sw       $ra, 0x10($sp)
/* 1973F0 80268B10 00031080 */  sll       $v0, $v1, 2
/* 1973F4 80268B14 3C01802A */  lui       $at, %hi(jtbl_8029D700)
/* 1973F8 80268B18 00220821 */  addu      $at, $at, $v0
/* 1973FC 80268B1C 8C22D700 */  lw        $v0, %lo(jtbl_8029D700)($at)
/* 197400 80268B20 00400008 */  jr        $v0
/* 197404 80268B24 00000000 */   nop
glabel .L80268B28
/* 197408 80268B28 0C0AA551 */  jal       func_802A9544
/* 19740C 80268B2C 00000000 */   nop
/* 197410 80268B30 0809A324 */  j         .L80268C90
/* 197414 80268B34 00000000 */   nop
glabel .L80268B38
/* 197418 80268B38 0C0AA675 */  jal       func_802A99D4
/* 19741C 80268B3C 00000000 */   nop
/* 197420 80268B40 0809A324 */  j         .L80268C90
/* 197424 80268B44 00000000 */   nop
glabel .L80268B48
/* 197428 80268B48 0C0AA5BD */  jal       func_802A96F4
/* 19742C 80268B4C 00000000 */   nop
/* 197430 80268B50 0809A324 */  j         .L80268C90
/* 197434 80268B54 00000000 */   nop
glabel .L80268B58
/* 197438 80268B58 0C0AA5AE */  jal       func_802A96B8
/* 19743C 80268B5C 00000000 */   nop
/* 197440 80268B60 0809A324 */  j         .L80268C90
/* 197444 80268B64 00000000 */   nop
glabel .L80268B68
/* 197448 80268B68 0C0AA5D1 */  jal       func_802A9744
/* 19744C 80268B6C 00000000 */   nop
/* 197450 80268B70 0809A324 */  j         .L80268C90
/* 197454 80268B74 00000000 */   nop
glabel .L80268B78
/* 197458 80268B78 0C0AA529 */  jal       func_802A94A4
/* 19745C 80268B7C 00000000 */   nop
/* 197460 80268B80 0809A324 */  j         .L80268C90
/* 197464 80268B84 00000000 */   nop
glabel .L80268B88
/* 197468 80268B88 0C0AA536 */  jal       func_802A94D8
/* 19746C 80268B8C 00000000 */   nop
/* 197470 80268B90 0809A324 */  j         .L80268C90
/* 197474 80268B94 00000000 */   nop
glabel .L80268B98
/* 197478 80268B98 0C0AA5B7 */  jal       func_802A96DC
/* 19747C 80268B9C 00000000 */   nop
/* 197480 80268BA0 0809A324 */  j         .L80268C90
/* 197484 80268BA4 00000000 */   nop
glabel .L80268BA8
/* 197488 80268BA8 0C0AA60D */  jal       func_802A9834
/* 19748C 80268BAC 00000000 */   nop
/* 197490 80268BB0 0809A324 */  j         .L80268C90
/* 197494 80268BB4 00000000 */   nop
glabel .L80268BB8
/* 197498 80268BB8 0C0AA557 */  jal       func_802A955C
/* 19749C 80268BBC 00000000 */   nop
/* 1974A0 80268BC0 0809A324 */  j         .L80268C90
/* 1974A4 80268BC4 00000000 */   nop
glabel .L80268BC8
/* 1974A8 80268BC8 0C0AA5BB */  jal       func_802A96EC
/* 1974AC 80268BCC 00000000 */   nop
/* 1974B0 80268BD0 0809A324 */  j         .L80268C90
/* 1974B4 80268BD4 00000000 */   nop
glabel .L80268BD8
/* 1974B8 80268BD8 0C0AA599 */  jal       func_802A9664
/* 1974BC 80268BDC 00000000 */   nop
/* 1974C0 80268BE0 0809A324 */  j         .L80268C90
/* 1974C4 80268BE4 00000000 */   nop
glabel .L80268BE8
/* 1974C8 80268BE8 0C0AA5BB */  jal       func_802A96EC
/* 1974CC 80268BEC 00000000 */   nop
/* 1974D0 80268BF0 0809A324 */  j         .L80268C90
/* 1974D4 80268BF4 00000000 */   nop
glabel .L80268BF8
/* 1974D8 80268BF8 0C0AA613 */  jal       func_802A984C
/* 1974DC 80268BFC 00000000 */   nop
/* 1974E0 80268C00 0809A324 */  j         .L80268C90
/* 1974E4 80268C04 00000000 */   nop
glabel .L80268C08
/* 1974E8 80268C08 0C0AA58D */  jal       func_802A9634
/* 1974EC 80268C0C 00000000 */   nop
/* 1974F0 80268C10 0809A324 */  j         .L80268C90
/* 1974F4 80268C14 00000000 */   nop
glabel .L80268C18
/* 1974F8 80268C18 0C0AA634 */  jal       func_802A98D0
/* 1974FC 80268C1C 00000000 */   nop
/* 197500 80268C20 0809A324 */  j         .L80268C90
/* 197504 80268C24 00000000 */   nop
glabel .L80268C28
/* 197508 80268C28 0C0AA5FE */  jal       func_802A97F8
/* 19750C 80268C2C 00000000 */   nop
/* 197510 80268C30 0809A324 */  j         .L80268C90
/* 197514 80268C34 00000000 */   nop
glabel .L80268C38
/* 197518 80268C38 0C0AA62C */  jal       func_802A98B0_7B1250
/* 19751C 80268C3C 00000000 */   nop
/* 197520 80268C40 0809A324 */  j         .L80268C90
/* 197524 80268C44 00000000 */   nop
glabel .L80268C48
/* 197528 80268C48 0C0AA5CF */  jal       func_802A973C
/* 19752C 80268C4C 00000000 */   nop
/* 197530 80268C50 0809A324 */  j         .L80268C90
/* 197534 80268C54 00000000 */   nop
glabel .L80268C58
/* 197538 80268C58 0C0AA5EB */  jal       func_802A97AC
/* 19753C 80268C5C 00000000 */   nop
/* 197540 80268C60 0809A324 */  j         .L80268C90
/* 197544 80268C64 00000000 */   nop
glabel .L80268C68
/* 197548 80268C68 0C0AA5FF */  jal       func_802A97FC
/* 19754C 80268C6C 00000000 */   nop
/* 197550 80268C70 0809A324 */  j         .L80268C90
/* 197554 80268C74 00000000 */   nop
glabel .L80268C78
/* 197558 80268C78 0C0AA805 */  jal       func_802AA014
/* 19755C 80268C7C 00000000 */   nop
/* 197560 80268C80 0809A324 */  j         .L80268C90
/* 197564 80268C84 00000000 */   nop
glabel .L80268C88
/* 197568 80268C88 0C0AA5C6 */  jal       func_802A9718
/* 19756C 80268C8C 00000000 */   nop
glabel .L80268C90
/* 197570 80268C90 8FBF0010 */  lw        $ra, 0x10($sp)
/* 197574 80268C94 03E00008 */  jr        $ra
/* 197578 80268C98 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void action_command_draw(void) {
    switch (gActionCommandStatus.actionCommandID) {
        case ACTION_COMMAND_NONE:
            break;
        case ACTION_COMMAND_JUMP:
            action_command_jump_draw();
            break;
        case ACTION_COMMAND_SMASH:
            action_command_hammer_draw();
            break;
        case ACTION_COMMAND_FLEE:
            action_command_flee_draw();
            break;
        case ACTION_COMMAND_BREAK_FREE:
            action_command_break_free_draw();
            break;
        case ACTION_COMMAND_WHIRLWIND:
            action_command_whirlwind_draw();
            break;
        case ACTION_COMMAND_STOP_LEECH:
            action_command_stop_leech_draw();
            break;
        case ACTION_COMMAND_07:
            action_command_07_draw();
            break;
        case ACTION_COMMAND_DIZZY_SHELL:
            action_command_dizzy_shell_draw();
            break;
        case ACTION_COMMAND_FIRE_SHELL:
            action_command_fire_shell_draw();
            break;
        case ACTION_COMMAND_0A:
            action_command_0A_draw();
            break;
        case ACTION_COMMAND_BOMB:
            action_command_bomb_draw();
            break;
        case ACTION_COMMAND_BODY_SLAM:
            action_command_body_slam_draw();
            break;
        case ACTION_COMMAND_AIR_LIFT:
            action_command_air_lift_draw();
            break;
        case ACTION_COMMAND_AIR_RAID:
            action_command_air_raid_draw();
            break;
        case ACTION_COMMAND_SQUIRT:
            action_command_squirt_draw();
            break;
        case ACTION_COMMAND_POWER_SHOCK:
            action_command_power_shock_draw();
            break;
        case ACTION_COMMAND_MEGA_SHOCK:
            action_command_mega_shock_draw();
            break;
        case ACTION_COMMAND_SMACK:
            action_command_smack_draw();
            break;
        case ACTION_COMMAND_SPINY_SURGE:
            action_command_spiny_surge_draw();
            break;
        case ACTION_COMMAND_HURRICANE:
            action_command_hurricane_draw();
            break;
        case ACTION_COMMAND_SPOOK:
            action_command_spook_draw();
            break;
        case ACTION_COMMAND_WATER_BLOCK:
            action_command_water_block_draw();
            break;
        case ACTION_COMMAND_TIDAL_WAVE:
            action_command_tidal_wave_draw();
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80243570
/* 1368B0 80243570 27BDFFC8 */  addiu     $sp, $sp, -0x38
glabel func_80243574
/* 1368B4 80243574 AFB20020 */  sw        $s2, 0x20($sp)
glabel func_80243578
/* 1368B8 80243578 3C128027 */  lui       $s2, %hi(gPauseShownDescMsg)
.L8024357C:
/* 1368BC 8024357C 8E520108 */  lw        $s2, %lo(gPauseShownDescMsg)($s2)
glabel func_80243580
/* 1368C0 80243580 AFB60030 */  sw        $s6, 0x30($sp)
glabel func_80243584_EE1F44
/* 1368C4 80243584 8FB60048 */  lw        $s6, 0x48($sp)
glabel func_80243588
/* 1368C8 80243588 AFB30024 */  sw        $s3, 0x24($sp)
/* 1368CC 8024358C 00A0982D */  daddu     $s3, $a1, $zero
glabel .L80243590
/* 1368D0 80243590 AFB40028 */  sw        $s4, 0x28($sp)
.L80243594:
/* 1368D4 80243594 00C0A02D */  daddu     $s4, $a2, $zero
glabel func_80243598
/* 1368D8 80243598 AFB5002C */  sw        $s5, 0x2C($sp)
D_8024359C:
/* 1368DC 8024359C 00E0A82D */  daddu     $s5, $a3, $zero
glabel func_802435A0
/* 1368E0 802435A0 AFBF0034 */  sw        $ra, 0x34($sp)
/* 1368E4 802435A4 AFB1001C */  sw        $s1, 0x1C($sp)
D_802435A8:
/* 1368E8 802435A8 12400088 */  beqz      $s2, func_802437CC
/* 1368EC 802435AC AFB00018 */   sw       $s0, 0x18($sp)
D_802435B0:
/* 1368F0 802435B0 3C118027 */  lui       $s1, %hi(gPauseDescTextPos)
D_802435B4:
/* 1368F4 802435B4 26310110 */  addiu     $s1, $s1, %lo(gPauseDescTextPos)
D_802435B8:
/* 1368F8 802435B8 8E220000 */  lw        $v0, 0x0($s1)
.L802435BC:
/* 1368FC 802435BC 1040000B */  beqz      $v0, D_802435EC
D_802435C0:
/* 136900 802435C0 02752821 */   addu     $a1, $s3, $s5
glabel func_802435C4
/* 136904 802435C4 24A5FFFC */  addiu     $a1, $a1, -0x4
D_802435C8:
/* 136908 802435C8 3C108027 */  lui       $s0, %hi(gPauseCommonIconIDs)
glabel func_802435CC
/* 13690C 802435CC 261000E8 */  addiu     $s0, $s0, %lo(gPauseCommonIconIDs)
D_802435D0:
/* 136910 802435D0 8E040004 */  lw        $a0, 0x4($s0)
D_802435D4:
/* 136914 802435D4 0C051261 */  jal       hud_element_set_render_pos
D_802435D8:
/* 136918 802435D8 26860004 */   addiu    $a2, $s4, 0x4
/* 13691C 802435DC 8E040004 */  lw        $a0, 0x4($s0)
D_802435E0:
/* 136920 802435E0 0C0511F8 */  jal       hud_element_draw_without_clipping
D_802435E4:
/* 136924 802435E4 00000000 */   nop
D_802435E8:
/* 136928 802435E8 8E220000 */  lw        $v0, 0x0($s1)
D_802435EC:
/* 13692C 802435EC 3C038027 */  lui       $v1, %hi(gPauseDescTextMaxPos)
D_802435F0:
/* 136930 802435F0 8C63010C */  lw        $v1, %lo(gPauseDescTextMaxPos)($v1)
/* 136934 802435F4 0043102A */  slt       $v0, $v0, $v1
D_802435F8:
/* 136938 802435F8 1040000B */  beqz      $v0, D_80243628
.L802435FC:
/* 13693C 802435FC 02752821 */   addu     $a1, $s3, $s5
D_80243600:
/* 136940 80243600 24A5FFFC */  addiu     $a1, $a1, -0x4
D_80243604:
/* 136944 80243604 3C108027 */  lui       $s0, %hi(gPauseCommonIconIDs)
D_80243608:
/* 136948 80243608 261000E8 */  addiu     $s0, $s0, %lo(gPauseCommonIconIDs)
D_8024360C:
/* 13694C 8024360C 02963021 */  addu      $a2, $s4, $s6
glabel func_80243610
/* 136950 80243610 8E040008 */  lw        $a0, 0x8($s0)
D_80243614:
/* 136954 80243614 0C051261 */  jal       hud_element_set_render_pos
.L80243618:
/* 136958 80243618 24C6FFFC */   addiu    $a2, $a2, -0x4
/* 13695C 8024361C 8E040008 */  lw        $a0, 0x8($s0)
glabel .L80243620
/* 136960 80243620 0C0511F8 */  jal       hud_element_draw_without_clipping
glabel func_80243624
/* 136964 80243624 00000000 */   nop
D_80243628:
/* 136968 80243628 0240202D */  daddu     $a0, $s2, $zero
D_8024362C:
/* 13696C 8024362C 3C11800A */  lui       $s1, %hi(gMainGfxPos)
/* 136970 80243630 2631A66C */  addiu     $s1, $s1, %lo(gMainGfxPos)
.L80243634:
/* 136974 80243634 2665000A */  addiu     $a1, $s3, 0xA
glabel .L80243638
/* 136978 80243638 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 13697C 8024363C 3C10ED00 */  lui       $s0, (0xED000000 >> 16)
glabel func_80243640
/* 136980 80243640 8E280000 */  lw        $t0, 0x0($s1)
D_80243644:
/* 136984 80243644 3C068027 */  lui       $a2, %hi(gPauseDescTextOffset)
/* 136988 80243648 8CC60114 */  lw        $a2, %lo(gPauseDescTextOffset)($a2)
.L8024364C:
/* 13698C 8024364C 3C014080 */  lui       $at, (0x40800000 >> 16)
glabel func_80243650
/* 136990 80243650 44812000 */  mtc1      $at, $f4
arn_04_pad_3654:
/* 136994 80243654 0100182D */  daddu     $v1, $t0, $zero
D_80243658:
/* 136998 80243658 25080008 */  addiu     $t0, $t0, 0x8
dead_flo_09_FlyingAI_JumpVels:
/* 13699C 8024365C 02863023 */  subu      $a2, $s4, $a2
D_80243660:
/* 1369A0 80243660 AE280000 */  sw        $t0, 0x0($s1)
glabel func_80243664
/* 1369A4 80243664 AC620000 */  sw        $v0, 0x0($v1)
/* 1369A8 80243668 26620001 */  addiu     $v0, $s3, 0x1
glabel func_8024366C
/* 1369AC 8024366C 44821000 */  mtc1      $v0, $f2
D_80243670:
/* 1369B0 80243670 00000000 */  nop
D_80243674:
/* 1369B4 80243674 468010A0 */  cvt.s.w   $f2, $f2
.L80243678:
/* 1369B8 80243678 AC600004 */  sw        $zero, 0x4($v1)
D_8024367C:
/* 1369BC 8024367C 25030008 */  addiu     $v1, $t0, 0x8
glabel dead_flo_13_LoadPartyImage
/* 1369C0 80243680 46041082 */  mul.s     $f2, $f2, $f4
D_80243684:
/* 1369C4 80243684 00000000 */  nop
glabel .L80243688
/* 1369C8 80243688 26820001 */  addiu     $v0, $s4, 0x1
D_8024368C:
/* 1369CC 8024368C 44820000 */  mtc1      $v0, $f0
D_80243690:
/* 1369D0 80243690 00000000 */  nop
.L80243694:
/* 1369D4 80243694 46800020 */  cvt.s.w   $f0, $f0
glabel func_80243698
/* 1369D8 80243698 02751021 */  addu      $v0, $s3, $s5
D_8024369C:
/* 1369DC 8024369C 2442FFFF */  addiu     $v0, $v0, -0x1
glabel .L802436A0
/* 1369E0 802436A0 46040002 */  mul.s     $f0, $f0, $f4
/* 1369E4 802436A4 00000000 */  nop
/* 1369E8 802436A8 AE230000 */  sw        $v1, 0x0($s1)
D_802436AC:
/* 1369EC 802436AC 4600118D */  trunc.w.s $f6, $f2
D_802436B0:
/* 1369F0 802436B0 44033000 */  mfc1      $v1, $f6
D_802436B4:
/* 1369F4 802436B4 00000000 */  nop
D_802436B8:
/* 1369F8 802436B8 30630FFF */  andi      $v1, $v1, 0xFFF
D_802436BC:
/* 1369FC 802436BC 00031B00 */  sll       $v1, $v1, 12
glabel func_802436C0
/* 136A00 802436C0 4600018D */  trunc.w.s $f6, $f0
/* 136A04 802436C4 44073000 */  mfc1      $a3, $f6
.L802436C8:
/* 136A08 802436C8 00000000 */  nop
.L802436CC:
/* 136A0C 802436CC 30E70FFF */  andi      $a3, $a3, 0xFFF
D_802436D0:
/* 136A10 802436D0 00F03825 */  or        $a3, $a3, $s0
glabel func_802436D4
/* 136A14 802436D4 44821000 */  mtc1      $v0, $f2

### DECOMPILED C INSTRUCTIONS:

void pause_textbox_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
    s32 msgID = gPauseShownDescMsg;

    if (msgID == MSG_NONE) {
        return;
    }

    if (gPauseDescTextPos != 0) {
        hud_element_set_render_pos(gPauseCommonIconIDs[1], baseX + width - 4, baseY + 4);
        hud_element_draw_without_clipping(gPauseCommonIconIDs[1]);
    }

    if (gPauseDescTextPos < gPauseDescTextMaxPos) {
        hud_element_set_render_pos(gPauseCommonIconIDs[2], baseX + width - 4, baseY + height - 4);
        hud_element_draw_without_clipping(gPauseCommonIconIDs[2]);
    }

    gDPPipeSync(gMainGfxPos++);
    gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX + 1, baseY + 1, baseX + width - 1, baseY + height - 1);
    draw_msg(msgID, baseX + 10, baseY - gPauseDescTextOffset, 255, MSG_PAL_STANDARD, 0);
    if (gPauseShownDescIconScript != 0) {
        gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
        hud_element_set_render_pos(gPauseCommonIconIDs[3], baseX - 4, baseY + 16);
        hud_element_set_script(gPauseCommonIconIDs[3], gPauseShownDescIconScript);
        hud_element_set_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAG_DROP_SHADOW);
        hud_element_clear_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAG_FILTER_TEX);
        hud_element_set_scale(gPauseCommonIconIDs[3], 1.0f);
        hud_element_draw_without_clipping(gPauseCommonIconIDs[3]);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel StartBossBattle
/* 1FC9C 8004489C 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 1FCA0 800448A0 AFBF0028 */  sw        $ra, 0x28($sp)
/* 1FCA4 800448A4 AFB50024 */  sw        $s5, 0x24($sp)
/* 1FCA8 800448A8 AFB40020 */  sw        $s4, 0x20($sp)
/* 1FCAC 800448AC AFB3001C */  sw        $s3, 0x1C($sp)
/* 1FCB0 800448B0 AFB20018 */  sw        $s2, 0x18($sp)
/* 1FCB4 800448B4 AFB10014 */  sw        $s1, 0x14($sp)
/* 1FCB8 800448B8 AFB00010 */  sw        $s0, 0x10($sp)
/* 1FCBC 800448BC 8C82000C */  lw        $v0, 0xC($a0)
/* 1FCC0 800448C0 8C450000 */  lw        $a1, 0x0($v0)
/* 1FCC4 800448C4 0C0B1EAF */  jal       evt_get_variable
/* 1FCC8 800448C8 8C910148 */   lw       $s1, 0x148($a0)
/* 1FCCC 800448CC 24040001 */  addiu     $a0, $zero, 0x1
/* 1FCD0 800448D0 0C0B1192 */  jal       resume_all_group
/* 1FCD4 800448D4 0040802D */   daddu    $s0, $v0, $zero
/* 1FCD8 800448D8 3C13800B */  lui       $s3, %hi(gCurrentEncounter)
/* 1FCDC 800448DC 26730F10 */  addiu     $s3, $s3, %lo(gCurrentEncounter)
/* 1FCE0 800448E0 24030001 */  addiu     $v1, $zero, 0x1
/* 1FCE4 800448E4 A2630005 */  sb        $v1, 0x5($s3)
/* 1FCE8 800448E8 A2230005 */  sb        $v1, 0x5($s1)
/* 1FCEC 800448EC AE71008C */  sw        $s1, 0x8C($s3)
/* 1FCF0 800448F0 82220004 */  lb        $v0, 0x4($s1)
/* 1FCF4 800448F4 00021080 */  sll       $v0, $v0, 2
/* 1FCF8 800448F8 00531021 */  addu      $v0, $v0, $s3
/* 1FCFC 800448FC 8C440028 */  lw        $a0, 0x28($v0)
/* 1FD00 80044900 2402FFFF */  addiu     $v0, $zero, -0x1
/* 1FD04 80044904 A2600004 */  sb        $zero, 0x4($s3)
/* 1FD08 80044908 A2630011 */  sb        $v1, 0x11($s3)
/* 1FD0C 8004490C AE700014 */  sw        $s0, 0x14($s3)
/* 1FD10 80044910 AE620018 */  sw        $v0, 0x18($s3)
/* 1FD14 80044914 AE640088 */  sw        $a0, 0x88($s3)
/* 1FD18 80044918 8E22003C */  lw        $v0, 0x3C($s1)
/* 1FD1C 8004491C 10400003 */  beqz      $v0, .L8004492C
/* 1FD20 80044920 00000000 */   nop
/* 1FD24 80044924 0C0B1108 */  jal       suspend_all_script
/* 1FD28 80044928 8E240054 */   lw       $a0, 0x54($s1)
.L8004492C:
/* 1FD2C 8004492C 8E220044 */  lw        $v0, 0x44($s1)
/* 1FD30 80044930 10400003 */  beqz      $v0, .L80044940
/* 1FD34 80044934 00000000 */   nop
/* 1FD38 80044938 0C0B1108 */  jal       suspend_all_script
/* 1FD3C 8004493C 8E24005C */   lw       $a0, 0x5C($s1)
.L80044940:
/* 1FD40 80044940 0C03805E */  jal       disable_player_input
/* 1FD44 80044944 0000802D */   daddu    $s0, $zero, $zero
/* 1FD48 80044948 0C03BD8A */  jal       partner_disable_input
/* 1FD4C 8004494C 00000000 */   nop
/* 1FD50 80044950 8E740088 */  lw        $s4, 0x88($s3)
/* 1FD54 80044954 8E820000 */  lw        $v0, 0x0($s4)
/* 1FD58 80044958 18400021 */  blez      $v0, .L800449E0
/* 1FD5C 8004495C 24150001 */   addiu    $s5, $zero, 0x1
/* 1FD60 80044960 0280902D */  daddu     $s2, $s4, $zero
.L80044964:
/* 1FD64 80044964 8E510004 */  lw        $s1, 0x4($s2)
/* 1FD68 80044968 12200018 */  beqz      $s1, .L800449CC
/* 1FD6C 8004496C 00000000 */   nop
/* 1FD70 80044970 8E220000 */  lw        $v0, 0x0($s1)
/* 1FD74 80044974 30420008 */  andi      $v0, $v0, 0x8
/* 1FD78 80044978 10400004 */  beqz      $v0, .L8004498C
/* 1FD7C 8004497C 00000000 */   nop
/* 1FD80 80044980 8E62008C */  lw        $v0, 0x8C($s3)
/* 1FD84 80044984 16220011 */  bne       $s1, $v0, .L800449CC
/* 1FD88 80044988 00000000 */   nop
.L8004498C:
/* 1FD8C 8004498C 8E220028 */  lw        $v0, 0x28($s1)
/* 1FD90 80044990 1040000E */  beqz      $v0, .L800449CC
/* 1FD94 80044994 0040202D */   daddu    $a0, $v0, $zero
/* 1FD98 80044998 2405000A */  addiu     $a1, $zero, 0xA
/* 1FD9C 8004499C 0000302D */  daddu     $a2, $zero, $zero
/* 1FDA0 800449A0 0C0B0CF8 */  jal       start_script
/* 1FDA4 800449A4 A2350005 */   sb       $s5, 0x5($s1)
/* 1FDA8 800449A8 0040202D */  daddu     $a0, $v0, $zero
/* 1FDAC 800449AC AE240040 */  sw        $a0, 0x40($s1)
/* 1FDB0 800449B0 8C820144 */  lw        $v0, 0x144($a0)
/* 1FDB4 800449B4 AE220058 */  sw        $v0, 0x58($s1)
/* 1FDB8 800449B8 AC910148 */  sw        $s1, 0x148($a0)
/* 1FDBC 800449BC 86220008 */  lh        $v0, 0x8($s1)
/* 1FDC0 800449C0 AC82014C */  sw        $v0, 0x14C($a0)
/* 1FDC4 800449C4 92220006 */  lbu       $v0, 0x6($s1)
/* 1FDC8 800449C8 A0820004 */  sb        $v0, 0x4($a0)
.L800449CC:
/* 1FDCC 800449CC 8E820000 */  lw        $v0, 0x0($s4)
/* 1FDD0 800449D0 26100001 */  addiu     $s0, $s0, 0x1
/* 1FDD4 800449D4 0202102A */  slt       $v0, $s0, $v0
/* 1FDD8 800449D8 1440FFE2 */  bnez      $v0, .L80044964
/* 1FDDC 800449DC 26520004 */   addiu    $s2, $s2, 0x4
.L800449E0:
/* 1FDE0 800449E0 24020001 */  addiu     $v0, $zero, 0x1
/* 1FDE4 800449E4 0040182D */  daddu     $v1, $v0, $zero
/* 1FDE8 800449E8 AE600090 */  sw        $zero, 0x90($s3)
/* 1FDEC 800449EC AE600094 */  sw        $zero, 0x94($s3)
/* 1FDF0 800449F0 A2630012 */  sb        $v1, 0x12($s3)
/* 1FDF4 800449F4 8FBF0028 */  lw        $ra, 0x28($sp)
/* 1FDF8 800449F8 8FB50024 */  lw        $s5, 0x24($sp)
/* 1FDFC 800449FC 8FB40020 */  lw        $s4, 0x20($sp)
/* 1FE00 80044A00 8FB3001C */  lw        $s3, 0x1C($sp)
/* 1FE04 80044A04 8FB20018 */  lw        $s2, 0x18($sp)
/* 1FE08 80044A08 8FB10014 */  lw        $s1, 0x14($sp)
/* 1FE0C 80044A0C 8FB00010 */  lw        $s0, 0x10($sp)
/* 1FE10 80044A10 24030003 */  addiu     $v1, $zero, 0x3
/* 1FE14 80044A14 3C01800A */  lui       $at, %hi(gEncounterState)
/* 1FE18 80044A18 AC23A600 */  sw        $v1, %lo(gEncounterState)($at)
/* 1FE1C 80044A1C 0040182D */  daddu     $v1, $v0, $zero
/* 1FE20 80044A20 3C01800A */  lui       $at, %hi(D_8009A678)
/* 1FE24 80044A24 AC23A678 */  sw        $v1, %lo(D_8009A678)($at)
/* 1FE28 80044A28 3C01800A */  lui       $at, %hi(gEncounterSubState)
/* 1FE2C 80044A2C AC20A5D0 */  sw        $zero, %lo(gEncounterSubState)($at)
/* 1FE30 80044A30 03E00008 */  jr        $ra
/* 1FE34 80044A34 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

ApiStatus StartBossBattle(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    EncounterStatus* currentEncounter = &gCurrentEncounter;
    Enemy* enemy = script->owner1.enemy;
    s32 songID = evt_get_variable(script, *args++);
    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 = TRUE;
    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)
            ) && enemy->hitBytecode != NULL) {
            enemy->encountered = TRUE;

            script = start_script(enemy->hitBytecode, EVT_PRIORITY_A, 0);
            enemy->hitScript = script;
            enemy->hitScriptID = script->id;

            script = enemy->hitScript;
            script->owner1.enemy = enemy;
            script->owner2.npcID = enemy->npcID;
            script->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;

    return ApiStatus_DONE1;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel partner_flying_enable
/* 867C0 800ED310 27BDFFE8 */  addiu     $sp, $sp, -0x18
/* 867C4 800ED314 AFB00010 */  sw        $s0, 0x10($sp)
/* 867C8 800ED318 0080802D */  daddu     $s0, $a0, $zero
/* 867CC 800ED31C 3C048011 */  lui       $a0, %hi(D_8010CD38)
/* 867D0 800ED320 2484CD38 */  addiu     $a0, $a0, %lo(D_8010CD38)
/* 867D4 800ED324 0000302D */  daddu     $a2, $zero, $zero
/* 867D8 800ED328 3C028010 */  lui       $v0, %hi(wSavedPartnerPosX)
/* 867DC 800ED32C 2442833C */  addiu     $v0, $v0, %lo(wSavedPartnerPosX)
/* 867E0 800ED330 0040482D */  daddu     $t1, $v0, $zero
/* 867E4 800ED334 3C028010 */  lui       $v0, %hi(wSavedPartnerPosY)
/* 867E8 800ED338 24428340 */  addiu     $v0, $v0, %lo(wSavedPartnerPosY)
/* 867EC 800ED33C 0040402D */  daddu     $t0, $v0, $zero
/* 867F0 800ED340 3C028010 */  lui       $v0, %hi(wSavedPartnerPosZ)
/* 867F4 800ED344 24428344 */  addiu     $v0, $v0, %lo(wSavedPartnerPosZ)
/* 867F8 800ED348 0040382D */  daddu     $a3, $v0, $zero
/* 867FC 800ED34C AFBF0014 */  sw        $ra, 0x14($sp)
/* 86800 800ED350 C5200000 */  lwc1      $f0, 0x0($t1)
/* 86804 800ED354 C5020000 */  lwc1      $f2, 0x0($t0)
/* 86808 800ED358 C4E40000 */  lwc1      $f4, 0x0($a3)
/* 8680C 800ED35C 2483000C */  addiu     $v1, $a0, 0xC
/* 86810 800ED360 E6000038 */  swc1      $f0, 0x38($s0)
/* 86814 800ED364 E602003C */  swc1      $f2, 0x3C($s0)
/* 86818 800ED368 E6040040 */  swc1      $f4, 0x40($s0)
.L800ED36C:
/* 8681C 800ED36C 24C60001 */  addiu     $a2, $a2, 0x1
/* 86820 800ED370 C5200000 */  lwc1      $f0, 0x0($t1)
/* 86824 800ED374 C5020000 */  lwc1      $f2, 0x0($t0)
/* 86828 800ED378 C4E40000 */  lwc1      $f4, 0x0($a3)
/* 8682C 800ED37C 28C20028 */  slti      $v0, $a2, 0x28
/* 86830 800ED380 E460FFF8 */  swc1      $f0, -0x8($v1)
/* 86834 800ED384 E462FFFC */  swc1      $f2, -0x4($v1)
/* 86838 800ED388 E4640000 */  swc1      $f4, 0x0($v1)
/* 8683C 800ED38C 24630010 */  addiu     $v1, $v1, 0x10
/* 86840 800ED390 A0800000 */  sb        $zero, 0x0($a0)
/* 86844 800ED394 1440FFF5 */  bnez      $v0, .L800ED36C
/* 86848 800ED398 24840010 */   addiu    $a0, $a0, 0x10
/* 8684C 800ED39C 3C018011 */  lui       $at, %hi(gPlayerMoveHistoryIndex)
/* 86850 800ED3A0 AC20CFB8 */  sw        $zero, %lo(gPlayerMoveHistoryIndex)($at)
/* 86854 800ED3A4 3C018011 */  lui       $at, %hi(D_8010CFBC)
/* 86858 800ED3A8 AC20CFBC */  sw        $zero, %lo(D_8010CFBC)($at)
/* 8685C 800ED3AC 14A00005 */  bnez      $a1, .L800ED3C4
/* 86860 800ED3B0 00000000 */   nop
/* 86864 800ED3B4 3C018011 */  lui       $at, %hi(wPartnerFollowState)
/* 86868 800ED3B8 A420CFC8 */  sh        $zero, %lo(wPartnerFollowState)($at)
/* 8686C 800ED3BC 0803B50B */  j         .L800ED42C
/* 86870 800ED3C0 00000000 */   nop
.L800ED3C4:
/* 86874 800ED3C4 3C048011 */  lui       $a0, %hi(D_8010CFC4)
/* 86878 800ED3C8 2484CFC4 */  addiu     $a0, $a0, %lo(D_8010CFC4)
/* 8687C 800ED3CC 8C830000 */  lw        $v1, 0x0($a0)
/* 86880 800ED3D0 14600009 */  bnez      $v1, .L800ED3F8
/* 86884 800ED3D4 24020001 */   addiu    $v0, $zero, 0x1
/* 86888 800ED3D8 2402000F */  addiu     $v0, $zero, 0xF
/* 8688C 800ED3DC 3C018011 */  lui       $at, %hi(wPartnerFollowState)
/* 86890 800ED3E0 A422CFC8 */  sh        $v0, %lo(wPartnerFollowState)($at)
/* 86894 800ED3E4 24020002 */  addiu     $v0, $zero, 0x2
/* 86898 800ED3E8 3C018011 */  lui       $at, %hi(D_8010CFCA)
/* 8689C 800ED3EC A422CFCA */  sh        $v0, %lo(D_8010CFCA)($at)
/* 868A0 800ED3F0 0803B50D */  j         .L800ED434
/* 868A4 800ED3F4 00000000 */   nop
.L800ED3F8:
/* 868A8 800ED3F8 10620003 */  beq       $v1, $v0, .L800ED408
/* 868AC 800ED3FC 24020003 */   addiu    $v0, $zero, 0x3
/* 868B0 800ED400 14620006 */  bne       $v1, $v0, .L800ED41C
/* 868B4 800ED404 24020002 */   addiu    $v0, $zero, 0x2
.L800ED408:
/* 868B8 800ED408 AC800000 */  sw        $zero, 0x0($a0)
/* 868BC 800ED40C 3C018011 */  lui       $at, %hi(wPartnerFollowState)
/* 868C0 800ED410 A420CFC8 */  sh        $zero, %lo(wPartnerFollowState)($at)
/* 868C4 800ED414 0803B50B */  j         .L800ED42C
/* 868C8 800ED418 00000000 */   nop
.L800ED41C:
/* 868CC 800ED41C 14620005 */  bne       $v1, $v0, .L800ED434
/* 868D0 800ED420 24020032 */   addiu    $v0, $zero, 0x32
/* 868D4 800ED424 3C018011 */  lui       $at, %hi(wPartnerFollowState)
/* 868D8 800ED428 A422CFC8 */  sh        $v0, %lo(wPartnerFollowState)($at)
.L800ED42C:
/* 868DC 800ED42C 3C018011 */  lui       $at, %hi(D_8010CFCA)
/* 868E0 800ED430 A420CFCA */  sh        $zero, %lo(D_8010CFCA)($at)
.L800ED434:
/* 868E4 800ED434 3C038011 */  lui       $v1, %hi(wCurrentPartnerId)
/* 868E8 800ED438 8C63CFD8 */  lw        $v1, %lo(wCurrentPartnerId)($v1)
/* 868EC 800ED43C 3C014220 */  lui       $at, (0x42200000 >> 16)
/* 868F0 800ED440 44810000 */  mtc1      $at, $f0
/* 868F4 800ED444 0200202D */  daddu     $a0, $s0, $zero
/* 868F8 800ED448 3C018011 */  lui       $at, %hi(D_8010CFCE)
/* 868FC 800ED44C A420CFCE */  sh        $zero, %lo(D_8010CFCE)($at)
/* 86900 800ED450 3C018011 */  lui       $at, %hi(D_8010CFCC)
/* 86904 800ED454 A420CFCC */  sh        $zero, %lo(D_8010CFCC)($at)
/* 86908 800ED458 000310C0 */  sll       $v0, $v1, 3
/* 8690C 800ED45C 00431021 */  addu      $v0, $v0, $v1
/* 86910 800ED460 00021080 */  sll       $v0, $v0, 2
/* 86914 800ED464 3C038010 */  lui       $v1, %hi(gPartnerAnimations + 0x14)
/* 86918 800ED468 00621821 */  addu      $v1, $v1, $v0
/* 8691C 800ED46C 8C63835C */  lw        $v1, %lo(gPartnerAnimations + 0x14)($v1)
/* 86920 800ED470 24020010 */  addiu     $v0, $zero, 0x10
/* 86924 800ED474 3C018010 */  lui       $at, %hi(wPartnerMoveTime)
/* 86928 800ED478 AC22802C */  sw        $v0, %lo(wPartnerMoveTime)($at)
/* 8692C 800ED47C 3C018011 */  lui       $at, %hi(wPartnerTetherDistance)
/* 86930 800ED480 E420CFC0 */  swc1      $f0, %lo(wPartnerTetherDistance)($at)
/* 86934 800ED484 0C03A96E */  jal       func_800EA5B8
/* 86938 800ED488 AE030028 */   sw       $v1, 0x28($s0)
/* 8693C 800ED48C 8E020000 */  lw        $v0, 0x0($s0)
/* 86940 800ED490 3C030001 */  lui       $v1, (0x10000 >> 16)
/* 86944 800ED494 AE030080 */  sw        $v1, 0x80($s0)
/* 86948 800ED498 2403FDFF */  addiu     $v1, $zero, -0x201
/* 8694C 800ED49C 34420100 */  ori       $v0, $v0, 0x100
/* 86950 800ED4A0 00431024 */  and       $v0, $v0, $v1
/* 86954 800ED4A4 AE020000 */  sw        $v0, 0x0($s0)
/* 86958 800ED4A8 8FBF0014 */  lw        $ra, 0x14($sp)
/* 8695C 800ED4AC 8FB00010 */  lw        $s0, 0x10($sp)
/* 86960 800ED4B0 03E00008 */  jr        $ra
/* 86964 800ED4B4 27BD0018 */   addiu    $sp, $sp, 0x18

### DECOMPILED C INSTRUCTIONS:

void partner_flying_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 = wSavedPartnerPosX;
        it->pos.y = wSavedPartnerPosY;
        it->pos.z = wSavedPartnerPosZ;
        it->isJumping = FALSE;
    }

    gPlayerMoveHistoryIndex = 0;
    D_8010CFBC = 0;

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

    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->flags |= NPC_FLAG_IGNORE_PLAYER_COLLISION;
    partner->flags &= ~NPC_FLAG_GRAVITY;
}