### RAW ASSEMBLY INSTRUCTIONS:

glabel parent_collider_to_model
/* 36B80 8005B780 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 36B84 8005B784 00042400 */  sll       $a0, $a0, 16
/* 36B88 8005B788 00042403 */  sra       $a0, $a0, 16
/* 36B8C 8005B78C 000410C0 */  sll       $v0, $a0, 3
/* 36B90 8005B790 00441023 */  subu      $v0, $v0, $a0
/* 36B94 8005B794 3C03800B */  lui       $v1, %hi(D_800B42E4)
/* 36B98 8005B798 8C6342E4 */  lw        $v1, %lo(D_800B42E4)($v1)
/* 36B9C 8005B79C 00021080 */  sll       $v0, $v0, 2
/* 36BA0 8005B7A0 AFB30024 */  sw        $s3, 0x24($sp)
/* 36BA4 8005B7A4 0000982D */  daddu     $s3, $zero, $zero
/* 36BA8 8005B7A8 AFBF0034 */  sw        $ra, 0x34($sp)
/* 36BAC 8005B7AC AFB60030 */  sw        $s6, 0x30($sp)
/* 36BB0 8005B7B0 AFB5002C */  sw        $s5, 0x2C($sp)
/* 36BB4 8005B7B4 AFB40028 */  sw        $s4, 0x28($sp)
/* 36BB8 8005B7B8 AFB20020 */  sw        $s2, 0x20($sp)
/* 36BBC 8005B7BC AFB1001C */  sw        $s1, 0x1C($sp)
/* 36BC0 8005B7C0 AFB00018 */  sw        $s0, 0x18($sp)
/* 36BC4 8005B7C4 0062A021 */  addu      $s4, $v1, $v0
/* 36BC8 8005B7C8 8682000A */  lh        $v0, 0xA($s4)
/* 36BCC 8005B7CC 3C038000 */  lui       $v1, (0x80000000 >> 16)
/* 36BD0 8005B7D0 A6850008 */  sh        $a1, 0x8($s4)
/* 36BD4 8005B7D4 00022040 */  sll       $a0, $v0, 1
/* 36BD8 8005B7D8 00822021 */  addu      $a0, $a0, $v0
/* 36BDC 8005B7DC 8E820000 */  lw        $v0, 0x0($s4)
/* 36BE0 8005B7E0 00042080 */  sll       $a0, $a0, 2
/* 36BE4 8005B7E4 00431025 */  or        $v0, $v0, $v1
/* 36BE8 8005B7E8 0C00AB6C */  jal       collision_heap_malloc
/* 36BEC 8005B7EC AE820000 */   sw       $v0, 0x0($s4)
/* 36BF0 8005B7F0 0040A82D */  daddu     $s5, $v0, $zero
/* 36BF4 8005B7F4 8E91000C */  lw        $s1, 0xC($s4)
/* 36BF8 8005B7F8 8682000A */  lh        $v0, 0xA($s4)
/* 36BFC 8005B7FC 02A0B02D */  daddu     $s6, $s5, $zero
/* 36C00 8005B800 18400015 */  blez      $v0, .L8005B858
/* 36C04 8005B804 AFA00010 */   sw       $zero, 0x10($sp)
/* 36C08 8005B808 27B20010 */  addiu     $s2, $sp, 0x10
/* 36C0C 8005B80C 26300008 */  addiu     $s0, $s1, 0x8
.L8005B810:
/* 36C10 8005B810 02A0202D */  daddu     $a0, $s5, $zero
/* 36C14 8005B814 0240302D */  daddu     $a2, $s2, $zero
/* 36C18 8005B818 26730001 */  addiu     $s3, $s3, 0x1
/* 36C1C 8005B81C 8E250000 */  lw        $a1, 0x0($s1)
/* 36C20 8005B820 0C016E68 */  jal       _add_hit_vert_to_buffer
/* 36C24 8005B824 26310040 */   addiu    $s1, $s1, 0x40
/* 36C28 8005B828 02A0202D */  daddu     $a0, $s5, $zero
/* 36C2C 8005B82C 8E05FFFC */  lw        $a1, -0x4($s0)
/* 36C30 8005B830 0C016E68 */  jal       _add_hit_vert_to_buffer
/* 36C34 8005B834 0240302D */   daddu    $a2, $s2, $zero
/* 36C38 8005B838 02A0202D */  daddu     $a0, $s5, $zero
/* 36C3C 8005B83C 8E050000 */  lw        $a1, 0x0($s0)
/* 36C40 8005B840 0C016E68 */  jal       _add_hit_vert_to_buffer
/* 36C44 8005B844 0240302D */   daddu    $a2, $s2, $zero
/* 36C48 8005B848 8682000A */  lh        $v0, 0xA($s4)
/* 36C4C 8005B84C 0262102A */  slt       $v0, $s3, $v0
/* 36C50 8005B850 1440FFEF */  bnez      $v0, .L8005B810
/* 36C54 8005B854 26100040 */   addiu    $s0, $s0, 0x40
.L8005B858:
/* 36C58 8005B858 8FA20010 */  lw        $v0, 0x10($sp)
/* 36C5C 8005B85C 0000982D */  daddu     $s3, $zero, $zero
/* 36C60 8005B860 00022040 */  sll       $a0, $v0, 1
/* 36C64 8005B864 00822021 */  addu      $a0, $a0, $v0
/* 36C68 8005B868 97A20012 */  lhu       $v0, 0x12($sp)
/* 36C6C 8005B86C 000420C0 */  sll       $a0, $a0, 3
/* 36C70 8005B870 0C00AB6C */  jal       collision_heap_malloc
/* 36C74 8005B874 A6820014 */   sh       $v0, 0x14($s4)
/* 36C78 8005B878 8FA30010 */  lw        $v1, 0x10($sp)
/* 36C7C 8005B87C 0040902D */  daddu     $s2, $v0, $zero
/* 36C80 8005B880 18600013 */  blez      $v1, .L8005B8D0
/* 36C84 8005B884 AE920018 */   sw       $s2, 0x18($s4)
/* 36C88 8005B888 0060202D */  daddu     $a0, $v1, $zero
/* 36C8C 8005B88C 26430008 */  addiu     $v1, $s2, 0x8
.L8005B890:
/* 36C90 8005B890 8EC20000 */  lw        $v0, 0x0($s6)
/* 36C94 8005B894 26D60004 */  addiu     $s6, $s6, 0x4
/* 36C98 8005B898 C4400000 */  lwc1      $f0, 0x0($v0)
/* 36C9C 8005B89C 26730001 */  addiu     $s3, $s3, 0x1
/* 36CA0 8005B8A0 E4600004 */  swc1      $f0, 0x4($v1)
/* 36CA4 8005B8A4 E6400000 */  swc1      $f0, 0x0($s2)
/* 36CA8 8005B8A8 C4400004 */  lwc1      $f0, 0x4($v0)
/* 36CAC 8005B8AC 26520018 */  addiu     $s2, $s2, 0x18
/* 36CB0 8005B8B0 E4600008 */  swc1      $f0, 0x8($v1)
/* 36CB4 8005B8B4 E460FFFC */  swc1      $f0, -0x4($v1)
/* 36CB8 8005B8B8 C4400008 */  lwc1      $f0, 0x8($v0)
/* 36CBC 8005B8BC 0264102A */  slt       $v0, $s3, $a0
/* 36CC0 8005B8C0 E460000C */  swc1      $f0, 0xC($v1)
/* 36CC4 8005B8C4 E4600000 */  swc1      $f0, 0x0($v1)
/* 36CC8 8005B8C8 1440FFF1 */  bnez      $v0, .L8005B890
/* 36CCC 8005B8CC 24630018 */   addiu    $v1, $v1, 0x18
.L8005B8D0:
/* 36CD0 8005B8D0 8E920018 */  lw        $s2, 0x18($s4)
/* 36CD4 8005B8D4 8682000A */  lh        $v0, 0xA($s4)
/* 36CD8 8005B8D8 8E91000C */  lw        $s1, 0xC($s4)
/* 36CDC 8005B8DC 18400024 */  blez      $v0, .L8005B970
/* 36CE0 8005B8E0 0000982D */   daddu    $s3, $zero, $zero
/* 36CE4 8005B8E4 27B60010 */  addiu     $s6, $sp, 0x10
/* 36CE8 8005B8E8 26300008 */  addiu     $s0, $s1, 0x8
.L8005B8EC:
/* 36CEC 8005B8EC 02A0202D */  daddu     $a0, $s5, $zero
/* 36CF0 8005B8F0 02C0302D */  daddu     $a2, $s6, $zero
/* 36CF4 8005B8F4 8E250000 */  lw        $a1, 0x0($s1)
/* 36CF8 8005B8F8 0C016E7D */  jal       _get_hit_vert_index_from_buffer
/* 36CFC 8005B8FC 26730001 */   addiu    $s3, $s3, 0x1
/* 36D00 8005B900 02A0202D */  daddu     $a0, $s5, $zero
/* 36D04 8005B904 02C0302D */  daddu     $a2, $s6, $zero
/* 36D08 8005B908 00021840 */  sll       $v1, $v0, 1
/* 36D0C 8005B90C 00621821 */  addu      $v1, $v1, $v0
/* 36D10 8005B910 000318C0 */  sll       $v1, $v1, 3
/* 36D14 8005B914 02431821 */  addu      $v1, $s2, $v1
/* 36D18 8005B918 AE230000 */  sw        $v1, 0x0($s1)
/* 36D1C 8005B91C 8E05FFFC */  lw        $a1, -0x4($s0)
/* 36D20 8005B920 0C016E7D */  jal       _get_hit_vert_index_from_buffer
/* 36D24 8005B924 26310040 */   addiu    $s1, $s1, 0x40
/* 36D28 8005B928 02A0202D */  daddu     $a0, $s5, $zero
/* 36D2C 8005B92C 02C0302D */  daddu     $a2, $s6, $zero
/* 36D30 8005B930 00021840 */  sll       $v1, $v0, 1
/* 36D34 8005B934 00621821 */  addu      $v1, $v1, $v0
/* 36D38 8005B938 000318C0 */  sll       $v1, $v1, 3
/* 36D3C 8005B93C 8E050000 */  lw        $a1, 0x0($s0)
/* 36D40 8005B940 02431821 */  addu      $v1, $s2, $v1
/* 36D44 8005B944 0C016E7D */  jal       _get_hit_vert_index_from_buffer
/* 36D48 8005B948 AE03FFFC */   sw       $v1, -0x4($s0)
/* 36D4C 8005B94C 00021840 */  sll       $v1, $v0, 1
/* 36D50 8005B950 00621821 */  addu      $v1, $v1, $v0
/* 36D54 8005B954 000318C0 */  sll       $v1, $v1, 3
/* 36D58 8005B958 02431821 */  addu      $v1, $s2, $v1
/* 36D5C 8005B95C AE030000 */  sw        $v1, 0x0($s0)
/* 36D60 8005B960 8682000A */  lh        $v0, 0xA($s4)
/* 36D64 8005B964 0262102A */  slt       $v0, $s3, $v0
/* 36D68 8005B968 1440FFE0 */  bnez      $v0, .L8005B8EC
/* 36D6C 8005B96C 26100040 */   addiu    $s0, $s0, 0x40
.L8005B970:
/* 36D70 8005B970 0C00AB7D */  jal       collision_heap_free
/* 36D74 8005B974 02A0202D */   daddu    $a0, $s5, $zero
/* 36D78 8005B978 8FBF0034 */  lw        $ra, 0x34($sp)
/* 36D7C 8005B97C 8FB60030 */  lw        $s6, 0x30($sp)
/* 36D80 8005B980 8FB5002C */  lw        $s5, 0x2C($sp)
/* 36D84 8005B984 8FB40028 */  lw        $s4, 0x28($sp)
/* 36D88 8005B988 8FB30024 */  lw        $s3, 0x24($sp)
/* 36D8C 8005B98C 8FB20020 */  lw        $s2, 0x20($sp)
/* 36D90 8005B990 8FB1001C */  lw        $s1, 0x1C($sp)
/* 36D94 8005B994 8FB00018 */  lw        $s0, 0x18($sp)
/* 36D98 8005B998 03E00008 */  jr        $ra
/* 36D9C 8005B99C 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void parent_collider_to_model(s16 colliderID, s16 modelIndex) {
    Collider* collider;
    ColliderTriangle* triangle;
    s32 i;
    Vec3f** vertexBuffer;
    Vec3f** vertexPtr;
    s32 vertexBufferSize;
    Vec3f* vertexTable;
    Vec3f* vertex;

    collider = &gCollisionData.colliderList[colliderID];
    collider->parentModelIndex = modelIndex;
    collider->flags |= COLLIDER_FLAG_HAS_MODEL_PARENT;

    vertexBuffer = collision_heap_malloc(collider->numTriangles * sizeof(Vec3f));
    vertexBufferSize = 0;
    vertexPtr = vertexBuffer;

    for (i = 0, triangle = collider->triangleTable; i < collider->numTriangles; i++, triangle++) {
        _add_hit_vert_to_buffer(vertexBuffer, triangle->v1, &vertexBufferSize);
        _add_hit_vert_to_buffer(vertexBuffer, triangle->v2, &vertexBufferSize);
        _add_hit_vert_to_buffer(vertexBuffer, triangle->v3, &vertexBufferSize);
    }

    collider->numVertices = vertexBufferSize;
    collider->vertexTable = collision_heap_malloc(vertexBufferSize * 2 * sizeof(Vec3f));
    for (i = 0, vertexTable = collider->vertexTable; i < vertexBufferSize; vertexPtr++, vertexTable += 2, i++) {
        vertex = *vertexPtr;
        vertexTable[0].x = vertexTable[1].x = vertex->x;
        vertexTable[0].y = vertexTable[1].y = vertex->y;
        vertexTable[0].z = vertexTable[1].z = vertex->z;
    }

    vertexTable = collider->vertexTable;
    for (i = 0, triangle = collider->triangleTable; i < collider->numTriangles; triangle++, i++) {
        triangle->v1 = &vertexTable[_get_hit_vert_index_from_buffer(vertexBuffer, triangle->v1, &vertexBufferSize) * 2];
        triangle->v2 = &vertexTable[_get_hit_vert_index_from_buffer(vertexBuffer, triangle->v2, &vertexBufferSize) * 2];
        triangle->v3 = &vertexTable[_get_hit_vert_index_from_buffer(vertexBuffer, triangle->v3, &vertexBufferSize) * 2];
    }

    collision_heap_free(vertexBuffer);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel ShowEmote
/* FC250 802D78A0 27BDFF90 */  addiu     $sp, $sp, -0x70
/* FC254 802D78A4 AFB10034 */  sw        $s1, 0x34($sp)
/* FC258 802D78A8 0080882D */  daddu     $s1, $a0, $zero
/* FC25C 802D78AC AFBF0048 */  sw        $ra, 0x48($sp)
/* FC260 802D78B0 AFB50044 */  sw        $s5, 0x44($sp)
/* FC264 802D78B4 AFB40040 */  sw        $s4, 0x40($sp)
/* FC268 802D78B8 AFB3003C */  sw        $s3, 0x3C($sp)
/* FC26C 802D78BC AFB20038 */  sw        $s2, 0x38($sp)
/* FC270 802D78C0 AFB00030 */  sw        $s0, 0x30($sp)
/* FC274 802D78C4 F7BA0068 */  sdc1      $f26, 0x68($sp)
/* FC278 802D78C8 F7B80060 */  sdc1      $f24, 0x60($sp)
/* FC27C 802D78CC F7B60058 */  sdc1      $f22, 0x58($sp)
/* FC280 802D78D0 F7B40050 */  sdc1      $f20, 0x50($sp)
/* FC284 802D78D4 8E30000C */  lw        $s0, 0xC($s1)
/* FC288 802D78D8 8E050000 */  lw        $a1, 0x0($s0)
/* FC28C 802D78DC 0C0B1EAF */  jal       evt_get_variable
/* FC290 802D78E0 26100004 */   addiu    $s0, $s0, 0x4
/* FC294 802D78E4 8E050000 */  lw        $a1, 0x0($s0)
/* FC298 802D78E8 26100004 */  addiu     $s0, $s0, 0x4
/* FC29C 802D78EC 0220202D */  daddu     $a0, $s1, $zero
/* FC2A0 802D78F0 0C0B1EAF */  jal       evt_get_variable
/* FC2A4 802D78F4 0040982D */   daddu    $s3, $v0, $zero
/* FC2A8 802D78F8 8E050000 */  lw        $a1, 0x0($s0)
/* FC2AC 802D78FC 26100004 */  addiu     $s0, $s0, 0x4
/* FC2B0 802D7900 0220202D */  daddu     $a0, $s1, $zero
/* FC2B4 802D7904 0C0B210B */  jal       evt_get_float_variable
/* FC2B8 802D7908 0040A82D */   daddu    $s5, $v0, $zero
/* FC2BC 802D790C 8E050000 */  lw        $a1, 0x0($s0)
/* FC2C0 802D7910 26100004 */  addiu     $s0, $s0, 0x4
/* FC2C4 802D7914 0220202D */  daddu     $a0, $s1, $zero
/* FC2C8 802D7918 0C0B1EAF */  jal       evt_get_variable
/* FC2CC 802D791C 46000686 */   mov.s    $f26, $f0
/* FC2D0 802D7920 8E050000 */  lw        $a1, 0x0($s0)
/* FC2D4 802D7924 26100004 */  addiu     $s0, $s0, 0x4
/* FC2D8 802D7928 0220202D */  daddu     $a0, $s1, $zero
/* FC2DC 802D792C 0C0B1EAF */  jal       evt_get_variable
/* FC2E0 802D7930 0040A02D */   daddu    $s4, $v0, $zero
/* FC2E4 802D7934 8E050000 */  lw        $a1, 0x0($s0)
/* FC2E8 802D7938 26100004 */  addiu     $s0, $s0, 0x4
/* FC2EC 802D793C 0220202D */  daddu     $a0, $s1, $zero
/* FC2F0 802D7940 0C0B210B */  jal       evt_get_float_variable
/* FC2F4 802D7944 0040902D */   daddu    $s2, $v0, $zero
/* FC2F8 802D7948 8E050000 */  lw        $a1, 0x0($s0)
/* FC2FC 802D794C 26100004 */  addiu     $s0, $s0, 0x4
/* FC300 802D7950 0220202D */  daddu     $a0, $s1, $zero
/* FC304 802D7954 0C0B210B */  jal       evt_get_float_variable
/* FC308 802D7958 46000606 */   mov.s    $f24, $f0
/* FC30C 802D795C 8E050000 */  lw        $a1, 0x0($s0)
/* FC310 802D7960 26100004 */  addiu     $s0, $s0, 0x4
/* FC314 802D7964 0220202D */  daddu     $a0, $s1, $zero
/* FC318 802D7968 0C0B210B */  jal       evt_get_float_variable
/* FC31C 802D796C 46000586 */   mov.s    $f22, $f0
/* FC320 802D7970 0220202D */  daddu     $a0, $s1, $zero
/* FC324 802D7974 8E050000 */  lw        $a1, 0x0($s0)
/* FC328 802D7978 0C0B210B */  jal       evt_get_float_variable
/* FC32C 802D797C 46000506 */   mov.s    $f20, $f0
/* FC330 802D7980 12400006 */  beqz      $s2, .L802D799C
/* FC334 802D7984 3C055555 */   lui      $a1, (0x55555556 >> 16)
/* FC338 802D7988 24020001 */  addiu     $v0, $zero, 0x1
/* FC33C 802D798C 12420018 */  beq       $s2, $v0, .L802D79F0
/* FC340 802D7990 4600C086 */   mov.s    $f2, $f24
/* FC344 802D7994 080B5E9E */  j         .L802D7A78
/* FC348 802D7998 4600B106 */   mov.s    $f4, $f22
.L802D799C:
/* FC34C 802D799C 3C028011 */  lui       $v0, %hi(gPlayerStatus + 0xB0)
/* FC350 802D79A0 9442F078 */  lhu       $v0, %lo(gPlayerStatus + 0xB0)($v0)
/* FC354 802D79A4 34A55556 */  ori       $a1, $a1, (0x55555556 & 0xFFFF)
/* FC358 802D79A8 00021400 */  sll       $v0, $v0, 16
/* FC35C 802D79AC 00022403 */  sra       $a0, $v0, 16
/* FC360 802D79B0 00041840 */  sll       $v1, $a0, 1
/* FC364 802D79B4 00650018 */  mult      $v1, $a1
/* FC368 802D79B8 44801000 */  mtc1      $zero, $f2
/* FC36C 802D79BC 00003010 */  mfhi      $a2
/* FC370 802D79C0 2407FFFF */  addiu     $a3, $zero, -0x1
/* FC374 802D79C4 46001186 */  mov.s     $f6, $f2
/* FC378 802D79C8 00850018 */  mult      $a0, $a1
/* FC37C 802D79CC 00031FC3 */  sra       $v1, $v1, 31
/* FC380 802D79D0 000217C3 */  sra       $v0, $v0, 31
/* FC384 802D79D4 00C31823 */  subu      $v1, $a2, $v1
/* FC388 802D79D8 44832000 */  mtc1      $v1, $f4
/* FC38C 802D79DC 00000000 */  nop
/* FC390 802D79E0 46802120 */  cvt.s.w   $f4, $f4
/* FC394 802D79E4 00004810 */  mfhi      $t1
/* FC398 802D79E8 080B5E97 */  j         .L802D7A5C
/* FC39C 802D79EC 01221023 */   subu     $v0, $t1, $v0
.L802D79F0:
/* FC3A0 802D79F0 0220202D */  daddu     $a0, $s1, $zero
/* FC3A4 802D79F4 0C0B36B0 */  jal       resolve_npc
/* FC3A8 802D79F8 0260282D */   daddu    $a1, $s3, $zero
/* FC3AC 802D79FC 0040382D */  daddu     $a3, $v0, $zero
/* FC3B0 802D7A00 10E0002A */  beqz      $a3, .L802D7AAC
/* FC3B4 802D7A04 3C036666 */   lui      $v1, (0x66666667 >> 16)
/* FC3B8 802D7A08 94E200A8 */  lhu       $v0, 0xA8($a3)
/* FC3BC 802D7A0C 34636667 */  ori       $v1, $v1, (0x66666667 & 0xFFFF)
/* FC3C0 802D7A10 00021400 */  sll       $v0, $v0, 16
/* FC3C4 802D7A14 00023403 */  sra       $a2, $v0, 16
/* FC3C8 802D7A18 00062080 */  sll       $a0, $a2, 2
/* FC3CC 802D7A1C 00830018 */  mult      $a0, $v1
/* FC3D0 802D7A20 3C055555 */  lui       $a1, (0x55555556 >> 16)
/* FC3D4 802D7A24 34A55556 */  ori       $a1, $a1, (0x55555556 & 0xFFFF)
/* FC3D8 802D7A28 44801000 */  mtc1      $zero, $f2
/* FC3DC 802D7A2C 00004010 */  mfhi      $t0
/* FC3E0 802D7A30 46001186 */  mov.s     $f6, $f2
/* FC3E4 802D7A34 00081843 */  sra       $v1, $t0, 1
/* FC3E8 802D7A38 00C50018 */  mult      $a2, $a1
/* FC3EC 802D7A3C 000427C3 */  sra       $a0, $a0, 31
/* FC3F0 802D7A40 000217C3 */  sra       $v0, $v0, 31
/* FC3F4 802D7A44 00641823 */  subu      $v1, $v1, $a0
/* FC3F8 802D7A48 44832000 */  mtc1      $v1, $f4
/* FC3FC 802D7A4C 00000000 */  nop
/* FC400 802D7A50 46802120 */  cvt.s.w   $f4, $f4
/* FC404 802D7A54 00004010 */  mfhi      $t0
/* FC408 802D7A58 01021023 */  subu      $v0, $t0, $v0
.L802D7A5C:
/* FC40C 802D7A5C 00021400 */  sll       $v0, $v0, 16
/* FC410 802D7A60 00021403 */  sra       $v0, $v0, 16
/* FC414 802D7A64 44820000 */  mtc1      $v0, $f0
/* FC418 802D7A68 00000000 */  nop
/* FC41C 802D7A6C 46800020 */  cvt.s.w   $f0, $f0
/* FC420 802D7A70 080B5EA1 */  j         .L802D7A84
/* FC424 802D7A74 02A0202D */   daddu    $a0, $s5, $zero
.L802D7A78:
/* FC428 802D7A78 4600A186 */  mov.s     $f6, $f20
/* FC42C 802D7A7C 0000382D */  daddu     $a3, $zero, $zero
/* FC430 802D7A80 02A0202D */  daddu     $a0, $s5, $zero
.L802D7A84:
/* FC434 802D7A84 00E0282D */  daddu     $a1, $a3, $zero
/* FC438 802D7A88 44061000 */  mfc1      $a2, $f2
/* FC43C 802D7A8C 44072000 */  mfc1      $a3, $f4
/* FC440 802D7A90 27A20028 */  addiu     $v0, $sp, 0x28
/* FC444 802D7A94 E7A60010 */  swc1      $f6, 0x10($sp)
/* FC448 802D7A98 E7A00014 */  swc1      $f0, 0x14($sp)
/* FC44C 802D7A9C E7BA0018 */  swc1      $f26, 0x18($sp)
/* FC450 802D7AA0 AFB4001C */  sw        $s4, 0x1C($sp)
/* FC454 802D7AA4 0C01BFA4 */  jal       fx_emote
/* FC458 802D7AA8 AFA20020 */   sw       $v0, 0x20($sp)
.L802D7AAC:
/* FC45C 802D7AAC 24020002 */  addiu     $v0, $zero, 0x2
/* FC460 802D7AB0 8FBF0048 */  lw        $ra, 0x48($sp)
/* FC464 802D7AB4 8FB50044 */  lw        $s5, 0x44($sp)
/* FC468 802D7AB8 8FB40040 */  lw        $s4, 0x40($sp)
/* FC46C 802D7ABC 8FB3003C */  lw        $s3, 0x3C($sp)
/* FC470 802D7AC0 8FB20038 */  lw        $s2, 0x38($sp)
/* FC474 802D7AC4 8FB10034 */  lw        $s1, 0x34($sp)
/* FC478 802D7AC8 8FB00030 */  lw        $s0, 0x30($sp)
/* FC47C 802D7ACC D7BA0068 */  ldc1      $f26, 0x68($sp)
/* FC480 802D7AD0 D7B80060 */  ldc1      $f24, 0x60($sp)
/* FC484 802D7AD4 D7B60058 */  ldc1      $f22, 0x58($sp)
/* FC488 802D7AD8 D7B40050 */  ldc1      $f20, 0x50($sp)
/* FC48C 802D7ADC 03E00008 */  jr        $ra
/* FC490 802D7AE0 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

ApiStatus ShowEmote(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    s32 npcID = evt_get_variable(script, *args++);
    s32 emoteType = evt_get_variable(script, *args++);
    f32 pitch = evt_get_float_variable(script, *args++);
    s32 duration = evt_get_variable(script, *args++);
    s32 emoterType = evt_get_variable(script, *args++);
    f32 dX = evt_get_float_variable(script, *args++);
    f32 dY = evt_get_float_variable(script, *args++);
    f32 dZ = evt_get_float_variable(script, *args++);
    f32 radius = evt_get_float_variable(script, *args++);

    Npc* npc;
    s32 emoteHandle;
    f32 x, y, z, r;

    switch (emoterType) {
        case EMOTER_PLAYER:
            // show emote from player
            npc = (Npc*)-1;
            x = 0.0f;
            y = (gPlayerStatus.colliderHeight * 2) / 3;
            z = 0.0f;
            r = gPlayerStatus.colliderHeight / 3;
            break;
        case EMOTER_NPC:
            // show emote from NPC
            npc = resolve_npc(script, npcID);
            if (npc == NULL) {
                return ApiStatus_DONE2;
            }
            x = 0.0f;
            y = (npc->collisionHeight * 4) / 5;
            z = 0.0f;
            r = npc->collisionHeight / 3;
            break;
        default:
            // show emote at arbitrary position
            x = dX;
            y = dY;
            z = dZ;
            r = radius;
            npc = NULL;
            break;
    }

    fx_emote(emoteType, npc, x, y, z, r, pitch, duration, &emoteHandle);
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel drop_leaves_main
/* 33CDF0 E0028000 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 33CDF4 E0028004 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 33CDF8 E0028008 4485A000 */  mtc1      $a1, $f20
/* 33CDFC E002800C AFB30034 */  sw        $s3, 0x34($sp)
/* 33CE00 E0028010 0080982D */  daddu     $s3, $a0, $zero
/* 33CE04 E0028014 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 33CE08 E0028018 4486B000 */  mtc1      $a2, $f22
/* 33CE0C E002801C 27A40010 */  addiu     $a0, $sp, 0x10
/* 33CE10 E0028020 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 33CE14 E0028024 4487C000 */  mtc1      $a3, $f24
/* 33CE18 E0028028 3C02E003 */  lui       $v0, %hi(drop_leaves_init)
/* 33CE1C E002802C 24428240 */  addiu     $v0, $v0, %lo(drop_leaves_init)
/* 33CE20 E0028030 AFA20018 */  sw        $v0, 0x18($sp)
/* 33CE24 E0028034 3C02E003 */  lui       $v0, %hi(drop_leaves_update)
/* 33CE28 E0028038 24428248 */  addiu     $v0, $v0, %lo(drop_leaves_update)
/* 33CE2C E002803C AFA2001C */  sw        $v0, 0x1C($sp)
/* 33CE30 E0028040 3C02E003 */  lui       $v0, %hi(drop_leaves_render)
/* 33CE34 E0028044 244284E8 */  addiu     $v0, $v0, %lo(drop_leaves_render)
/* 33CE38 E0028048 AFA20020 */  sw        $v0, 0x20($sp)
/* 33CE3C E002804C 24020014 */  addiu     $v0, $zero, 0x14
/* 33CE40 E0028050 AFBF0038 */  sw        $ra, 0x38($sp)
/* 33CE44 E0028054 AFB20030 */  sw        $s2, 0x30($sp)
/* 33CE48 E0028058 AFB1002C */  sw        $s1, 0x2C($sp)
/* 33CE4C E002805C AFB00028 */  sw        $s0, 0x28($sp)
/* 33CE50 E0028060 AFA00010 */  sw        $zero, 0x10($sp)
/* 33CE54 E0028064 AFA00024 */  sw        $zero, 0x24($sp)
/* 33CE58 E0028068 0C080124 */  jal       shim_create_effect_instance
/* 33CE5C E002806C AFA20014 */   sw       $v0, 0x14($sp)
/* 33CE60 E0028070 240400F0 */  addiu     $a0, $zero, 0xF0
/* 33CE64 E0028074 24120005 */  addiu     $s2, $zero, 0x5
/* 33CE68 E0028078 0040802D */  daddu     $s0, $v0, $zero
/* 33CE6C E002807C 0C08012C */  jal       shim_general_heap_malloc
/* 33CE70 E0028080 AE120008 */   sw       $s2, 0x8($s0)
/* 33CE74 E0028084 0040182D */  daddu     $v1, $v0, $zero
/* 33CE78 E0028088 14600003 */  bnez      $v1, .LE0028098
/* 33CE7C E002808C AE03000C */   sw       $v1, 0xC($s0)
.LE0028090:
/* 33CE80 E0028090 0800A024 */  j         .LE0028090
/* 33CE84 E0028094 00000000 */   nop
.LE0028098:
/* 33CE88 E0028098 AC730000 */  sw        $s3, 0x0($v1)
/* 33CE8C E002809C E4740004 */  swc1      $f20, 0x4($v1)
/* 33CE90 E00280A0 E4760008 */  swc1      $f22, 0x8($v1)
/* 33CE94 E00280A4 E478000C */  swc1      $f24, 0xC($v1)
/* 33CE98 E00280A8 8FA20068 */  lw        $v0, 0x68($sp)
/* 33CE9C E00280AC 24110001 */  addiu     $s1, $zero, 0x1
/* 33CEA0 E00280B0 AC60002C */  sw        $zero, 0x2C($v1)
/* 33CEA4 E00280B4 AC600024 */  sw        $zero, 0x24($v1)
/* 33CEA8 E00280B8 AC620028 */  sw        $v0, 0x28($v1)
/* 33CEAC E00280BC 0232102A */  slt       $v0, $s1, $s2
/* 33CEB0 E00280C0 10400055 */  beqz      $v0, .LE0028218
/* 33CEB4 E00280C4 24630030 */   addiu    $v1, $v1, 0x30
/* 33CEB8 E00280C8 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 33CEBC E00280CC 4481A000 */  mtc1      $at, $f20
/* 33CEC0 E00280D0 24700014 */  addiu     $s0, $v1, 0x14
.LE00280D4:
/* 33CEC4 E00280D4 16600026 */  bnez      $s3, .LE0028170
/* 33CEC8 E00280D8 00000000 */   nop
/* 33CECC E00280DC 0C080000 */  jal       effect_rand_int
/* 33CED0 E00280E0 24040032 */   addiu    $a0, $zero, 0x32
/* 33CED4 E00280E4 24040032 */  addiu     $a0, $zero, 0x32
/* 33CED8 E00280E8 2442FFE7 */  addiu     $v0, $v0, -0x19
/* 33CEDC E00280EC 44820000 */  mtc1      $v0, $f0
/* 33CEE0 E00280F0 00000000 */  nop
/* 33CEE4 E00280F4 46800020 */  cvt.s.w   $f0, $f0
/* 33CEE8 E00280F8 0C080000 */  jal       effect_rand_int
/* 33CEEC E00280FC E600FFF0 */   swc1     $f0, -0x10($s0)
/* 33CEF0 E0028100 24040168 */  addiu     $a0, $zero, 0x168
/* 33CEF4 E0028104 2442FFE7 */  addiu     $v0, $v0, -0x19
/* 33CEF8 E0028108 44820000 */  mtc1      $v0, $f0
/* 33CEFC E002810C 00000000 */  nop
/* 33CF00 E0028110 46800020 */  cvt.s.w   $f0, $f0
/* 33CF04 E0028114 E600FFF4 */  swc1      $f0, -0xC($s0)
/* 33CF08 E0028118 0C080000 */  jal       effect_rand_int
/* 33CF0C E002811C AE00FFF8 */   sw       $zero, -0x8($s0)
/* 33CF10 E0028120 24040168 */  addiu     $a0, $zero, 0x168
/* 33CF14 E0028124 44820000 */  mtc1      $v0, $f0
/* 33CF18 E0028128 00000000 */  nop
/* 33CF1C E002812C 46800020 */  cvt.s.w   $f0, $f0
/* 33CF20 E0028130 0C080000 */  jal       effect_rand_int
/* 33CF24 E0028134 E6000004 */   swc1     $f0, 0x4($s0)
/* 33CF28 E0028138 24040064 */  addiu     $a0, $zero, 0x64
/* 33CF2C E002813C 44820000 */  mtc1      $v0, $f0
/* 33CF30 E0028140 00000000 */  nop
/* 33CF34 E0028144 46800020 */  cvt.s.w   $f0, $f0
/* 33CF38 E0028148 0C080000 */  jal       effect_rand_int
/* 33CF3C E002814C E600000C */   swc1     $f0, 0xC($s0)
/* 33CF40 E0028150 44820000 */  mtc1      $v0, $f0
/* 33CF44 E0028154 00000000 */  nop
/* 33CF48 E0028158 46800020 */  cvt.s.w   $f0, $f0
/* 33CF4C E002815C 46140003 */  div.s     $f0, $f0, $f20
/* 33CF50 E0028160 E6000008 */  swc1      $f0, 0x8($s0)
/* 33CF54 E0028164 AE00FFFC */  sw        $zero, -0x4($s0)
/* 33CF58 E0028168 0800A082 */  j         .LE0028208
/* 33CF5C E002816C AE000000 */   sw       $zero, 0x0($s0)
.LE0028170:
/* 33CF60 E0028170 0C080000 */  jal       effect_rand_int
/* 33CF64 E0028174 2404000A */   addiu    $a0, $zero, 0xA
/* 33CF68 E0028178 2404000A */  addiu     $a0, $zero, 0xA
/* 33CF6C E002817C 2442FFFB */  addiu     $v0, $v0, -0x5
/* 33CF70 E0028180 44820000 */  mtc1      $v0, $f0
/* 33CF74 E0028184 00000000 */  nop
/* 33CF78 E0028188 46800020 */  cvt.s.w   $f0, $f0
/* 33CF7C E002818C 0C080000 */  jal       effect_rand_int
/* 33CF80 E0028190 E600FFF0 */   swc1     $f0, -0x10($s0)
/* 33CF84 E0028194 24040168 */  addiu     $a0, $zero, 0x168
/* 33CF88 E0028198 24420005 */  addiu     $v0, $v0, 0x5
/* 33CF8C E002819C 44820000 */  mtc1      $v0, $f0
/* 33CF90 E00281A0 00000000 */  nop
/* 33CF94 E00281A4 46800020 */  cvt.s.w   $f0, $f0
/* 33CF98 E00281A8 E600FFF4 */  swc1      $f0, -0xC($s0)
/* 33CF9C E00281AC 0C080000 */  jal       effect_rand_int
/* 33CFA0 E00281B0 E614FFF8 */   swc1     $f20, -0x8($s0)
/* 33CFA4 E00281B4 24040168 */  addiu     $a0, $zero, 0x168
/* 33CFA8 E00281B8 44820000 */  mtc1      $v0, $f0
/* 33CFAC E00281BC 00000000 */  nop
/* 33CFB0 E00281C0 46800020 */  cvt.s.w   $f0, $f0
/* 33CFB4 E00281C4 0C080000 */  jal       effect_rand_int
/* 33CFB8 E00281C8 E6000004 */   swc1     $f0, 0x4($s0)
/* 33CFBC E00281CC 24040064 */  addiu     $a0, $zero, 0x64
/* 33CFC0 E00281D0 44820000 */  mtc1      $v0, $f0
/* 33CFC4 E00281D4 00000000 */  nop
/* 33CFC8 E00281D8 46800020 */  cvt.s.w   $f0, $f0
/* 33CFCC E00281DC 0C080000 */  jal       effect_rand_int
/* 33CFD0 E00281E0 E600000C */   swc1     $f0, 0xC($s0)
/* 33CFD4 E00281E4 44820000 */  mtc1      $v0, $f0
/* 33CFD8 E00281E8 00000000 */  nop
/* 33CFDC E00281EC 46800020 */  cvt.s.w   $f0, $f0
/* 33CFE0 E00281F0 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 33CFE4 E00281F4 44811000 */  mtc1      $at, $f2
/* 33CFE8 E00281F8 46140003 */  div.s     $f0, $f0, $f20
/* 33CFEC E00281FC E6000008 */  swc1      $f0, 0x8($s0)
/* 33CFF0 E0028200 AE00FFFC */  sw        $zero, -0x4($s0)
/* 33CFF4 E0028204 E6020000 */  swc1      $f2, 0x0($s0)
.LE0028208:
/* 33CFF8 E0028208 26310001 */  addiu     $s1, $s1, 0x1
/* 33CFFC E002820C 0232102A */  slt       $v0, $s1, $s2
/* 33D000 E0028210 1440FFB0 */  bnez      $v0, .LE00280D4
/* 33D004 E0028214 26100030 */   addiu    $s0, $s0, 0x30
.LE0028218:
/* 33D008 E0028218 8FBF0038 */  lw        $ra, 0x38($sp)
/* 33D00C E002821C 8FB30034 */  lw        $s3, 0x34($sp)
/* 33D010 E0028220 8FB20030 */  lw        $s2, 0x30($sp)
/* 33D014 E0028224 8FB1002C */  lw        $s1, 0x2C($sp)
/* 33D018 E0028228 8FB00028 */  lw        $s0, 0x28($sp)
/* 33D01C E002822C D7B80050 */  ldc1      $f24, 0x50($sp)
/* 33D020 E0028230 D7B60048 */  ldc1      $f22, 0x48($sp)
/* 33D024 E0028234 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 33D028 E0028238 03E00008 */  jr        $ra
/* 33D02C E002823C 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

void drop_leaves_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) {
    EffectBlueprint bp;
    EffectInstance* effect;
    DropLeavesFXData* part;
    s32 numParts = 5;
    s32 i;

    bp.init = drop_leaves_init;
    bp.update = drop_leaves_update;
    bp.renderWorld = drop_leaves_render;
    bp.unk_00 = 0;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_DROP_LEAVES;

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

    part->unk_00 = arg0;
    part->unk_04 = arg1;
    part->unk_08 = arg2;
    part->unk_0C = arg3;
    part->unk_28 = arg4;
    part->unk_2C = 0;
    part->unk_24 = 0;

    part++;
    for (i = 1; i < numParts; i++, part++) {
        if (arg0 == 0) {
            part->unk_04 = effect_rand_int(50) - 25;
            part->unk_08 = effect_rand_int(50) - 25;
            part->unk_0C = 0.0f;
            part->unk_18 = effect_rand_int(360);
            part->unk_20 = effect_rand_int(360);
            part->unk_1C = effect_rand_int(100) / 10.0f;
            part->unk_10 = 0;
            part->unk_14 = 0;
        } else {
            part->unk_04 = effect_rand_int(10) - 5;
            part->unk_08 = effect_rand_int(10) + 5;
            part->unk_0C = 10.0f;
            part->unk_18 = effect_rand_int(360);
            part->unk_20 = effect_rand_int(360);
            part->unk_1C = effect_rand_int(100) / 10.0f;
            part->unk_10 = 0;
            part->unk_14 = 2.0f;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel npc_get_render_yaw
/* 151A4 80039DA4 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* 151A8 80039DA8 AFB10014 */  sw        $s1, 0x14($sp)
/* 151AC 80039DAC 0080882D */  daddu     $s1, $a0, $zero
/* 151B0 80039DB0 3C03800A */  lui       $v1, %hi(gCurrentCamID)
/* 151B4 80039DB4 8463A634 */  lh        $v1, %lo(gCurrentCamID)($v1)
/* 151B8 80039DB8 3C04800B */  lui       $a0, %hi(gCameras)
/* 151BC 80039DBC 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 151C0 80039DC0 AFBF0018 */  sw        $ra, 0x18($sp)
/* 151C4 80039DC4 AFB00010 */  sw        $s0, 0x10($sp)
/* 151C8 80039DC8 F7B60028 */  sdc1      $f22, 0x28($sp)
/* 151CC 80039DCC F7B40020 */  sdc1      $f20, 0x20($sp)
/* 151D0 80039DD0 00031080 */  sll       $v0, $v1, 2
/* 151D4 80039DD4 00431021 */  addu      $v0, $v0, $v1
/* 151D8 80039DD8 00021080 */  sll       $v0, $v0, 2
/* 151DC 80039DDC 00431023 */  subu      $v0, $v0, $v1
/* 151E0 80039DE0 000218C0 */  sll       $v1, $v0, 3
/* 151E4 80039DE4 00431021 */  addu      $v0, $v0, $v1
/* 151E8 80039DE8 000210C0 */  sll       $v0, $v0, 3
/* 151EC 80039DEC 3C03800A */  lui       $v1, %hi(gOverrideFlags)
/* 151F0 80039DF0 8C63A650 */  lw        $v1, %lo(gOverrideFlags)($v1)
/* 151F4 80039DF4 3063C000 */  andi      $v1, $v1, 0xC000
/* 151F8 80039DF8 1460006C */  bnez      $v1, .L80039FAC
/* 151FC 80039DFC 00441021 */   addu     $v0, $v0, $a0
/* 15200 80039E00 C456006C */  lwc1      $f22, 0x6C($v0)
/* 15204 80039E04 C62E000C */  lwc1      $f14, 0xC($s1)
/* 15208 80039E08 0C00A70A */  jal       get_clamped_angle_diff
/* 1520C 80039E0C 4600B306 */   mov.s    $f12, $f22
/* 15210 80039E10 3C01C0A0 */  lui       $at, (0xC0A00000 >> 16)
/* 15214 80039E14 44811000 */  mtc1      $at, $f2
/* 15218 80039E18 46000306 */  mov.s     $f12, $f0
/* 1521C 80039E1C 4602603C */  c.lt.s    $f12, $f2
/* 15220 80039E20 00000000 */  nop
/* 15224 80039E24 4500000B */  bc1f      .L80039E54
/* 15228 80039E28 00000000 */   nop
/* 1522C 80039E2C 3C01C32F */  lui       $at, (0xC32F0000 >> 16)
/* 15230 80039E30 44810000 */  mtc1      $at, $f0
/* 15234 80039E34 00000000 */  nop
/* 15238 80039E38 460C003C */  c.lt.s    $f0, $f12
/* 1523C 80039E3C 00000000 */  nop
/* 15240 80039E40 45000004 */  bc1f      .L80039E54
/* 15244 80039E44 0000802D */   daddu    $s0, $zero, $zero
/* 15248 80039E48 44806000 */  mtc1      $zero, $f12
/* 1524C 80039E4C 0800E7AC */  j         .L80039EB0
/* 15250 80039E50 00000000 */   nop
.L80039E54:
/* 15254 80039E54 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 15258 80039E58 44810000 */  mtc1      $at, $f0
/* 1525C 80039E5C 00000000 */  nop
/* 15260 80039E60 460C003C */  c.lt.s    $f0, $f12
/* 15264 80039E64 00000000 */  nop
/* 15268 80039E68 4500000C */  bc1f      .L80039E9C
/* 1526C 80039E6C 00000000 */   nop
/* 15270 80039E70 3C01432F */  lui       $at, (0x432F0000 >> 16)
/* 15274 80039E74 44810000 */  mtc1      $at, $f0
/* 15278 80039E78 00000000 */  nop
/* 1527C 80039E7C 4600603C */  c.lt.s    $f12, $f0
/* 15280 80039E80 00000000 */  nop
/* 15284 80039E84 45000005 */  bc1f      .L80039E9C
/* 15288 80039E88 24100001 */   addiu    $s0, $zero, 0x1
/* 1528C 80039E8C 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 15290 80039E90 44816000 */  mtc1      $at, $f12
/* 15294 80039E94 0800E7AC */  j         .L80039EB0
/* 15298 80039E98 00000000 */   nop
.L80039E9C:
/* 1529C 80039E9C 8622008A */  lh        $v0, 0x8A($s1)
/* 152A0 80039EA0 24100002 */  addiu     $s0, $zero, 0x2
/* 152A4 80039EA4 44826000 */  mtc1      $v0, $f12
/* 152A8 80039EA8 00000000 */  nop
/* 152AC 80039EAC 46806320 */  cvt.s.w   $f12, $f12
.L80039EB0:
/* 152B0 80039EB0 0C00A6C9 */  jal       clamp_angle
/* 152B4 80039EB4 00000000 */   nop
/* 152B8 80039EB8 46000506 */  mov.s     $f20, $f0
/* 152BC 80039EBC 4600A10D */  trunc.w.s $f4, $f20
/* 152C0 80039EC0 44022000 */  mfc1      $v0, $f4
/* 152C4 80039EC4 00000000 */  nop
/* 152C8 80039EC8 A622008A */  sh        $v0, 0x8A($s1)
/* 152CC 80039ECC 8E220000 */  lw        $v0, 0x0($s1)
/* 152D0 80039ED0 3C030004 */  lui       $v1, (0x40000 >> 16)
/* 152D4 80039ED4 00431024 */  and       $v0, $v0, $v1
/* 152D8 80039ED8 14400034 */  bnez      $v0, .L80039FAC
/* 152DC 80039EDC 00000000 */   nop
/* 152E0 80039EE0 86220088 */  lh        $v0, 0x88($s1)
/* 152E4 80039EE4 10500016 */  beq       $v0, $s0, .L80039F40
/* 152E8 80039EE8 24020002 */   addiu    $v0, $zero, 0x2
/* 152EC 80039EEC 12020014 */  beq       $s0, $v0, .L80039F40
/* 152F0 80039EF0 00000000 */   nop
/* 152F4 80039EF4 12000003 */  beqz      $s0, .L80039F04
/* 152F8 80039EF8 A6300088 */   sh       $s0, 0x88($s1)
/* 152FC 80039EFC 0800E7C2 */  j         .L80039F08
/* 15300 80039F00 240200B4 */   addiu    $v0, $zero, 0xB4
.L80039F04:
/* 15304 80039F04 2402FF4C */  addiu     $v0, $zero, -0xB4
.L80039F08:
/* 15308 80039F08 A622008C */  sh        $v0, 0x8C($s1)
/* 1530C 80039F0C C62E000C */  lwc1      $f14, 0xC($s1)
/* 15310 80039F10 0C00A70A */  jal       get_clamped_angle_diff
/* 15314 80039F14 4600B306 */   mov.s    $f12, $f22
/* 15318 80039F18 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 1531C 80039F1C 44811000 */  mtc1      $at, $f2
/* 15320 80039F20 46000005 */  abs.s     $f0, $f0
/* 15324 80039F24 4600103E */  c.le.s    $f2, $f0
/* 15328 80039F28 00000000 */  nop
/* 1532C 80039F2C 45000004 */  bc1f      .L80039F40
/* 15330 80039F30 00000000 */   nop
/* 15334 80039F34 9622008C */  lhu       $v0, 0x8C($s1)
/* 15338 80039F38 00021023 */  negu      $v0, $v0
/* 1533C 80039F3C A622008C */  sh        $v0, 0x8C($s1)
.L80039F40:
/* 15340 80039F40 8623008C */  lh        $v1, 0x8C($s1)
/* 15344 80039F44 10600009 */  beqz      $v1, .L80039F6C
/* 15348 80039F48 9622008C */   lhu      $v0, 0x8C($s1)
/* 1534C 80039F4C 04610002 */  bgez      $v1, .L80039F58
/* 15350 80039F50 24420014 */   addiu    $v0, $v0, 0x14
/* 15354 80039F54 A622008C */  sh        $v0, 0x8C($s1)
.L80039F58:
/* 15358 80039F58 8622008C */  lh        $v0, 0x8C($s1)
/* 1535C 80039F5C 9623008C */  lhu       $v1, 0x8C($s1)
/* 15360 80039F60 18400002 */  blez      $v0, .L80039F6C
/* 15364 80039F64 2462FFEC */   addiu    $v0, $v1, -0x14
/* 15368 80039F68 A622008C */  sh        $v0, 0x8C($s1)
.L80039F6C:
/* 1536C 80039F6C 8E220000 */  lw        $v0, 0x0($s1)
/* 15370 80039F70 3C030020 */  lui       $v1, (0x200000 >> 16)
/* 15374 80039F74 00431024 */  and       $v0, $v0, $v1
/* 15378 80039F78 54400001 */  bnel      $v0, $zero, .L80039F80
/* 1537C 80039F7C A620008C */   sh       $zero, 0x8C($s1)
.L80039F80:
/* 15380 80039F80 8622008C */  lh        $v0, 0x8C($s1)
/* 15384 80039F84 44826000 */  mtc1      $v0, $f12
/* 15388 80039F88 00000000 */  nop
/* 1538C 80039F8C 46806320 */  cvt.s.w   $f12, $f12
/* 15390 80039F90 0C00A6C9 */  jal       clamp_angle
/* 15394 80039F94 46146300 */   add.s    $f12, $f12, $f20
/* 15398 80039F98 0C00A6C9 */  jal       clamp_angle
/* 1539C 80039F9C 46160301 */   sub.s    $f12, $f0, $f22
/* 153A0 80039FA0 46000506 */  mov.s     $f20, $f0
/* 153A4 80039FA4 0800E7EC */  j         .L80039FB0
/* 153A8 80039FA8 E6340034 */   swc1     $f20, 0x34($s1)
.L80039FAC:
/* 153AC 80039FAC C6340034 */  lwc1      $f20, 0x34($s1)
.L80039FB0:
/* 153B0 80039FB0 4600A006 */  mov.s     $f0, $f20
/* 153B4 80039FB4 8FBF0018 */  lw        $ra, 0x18($sp)
/* 153B8 80039FB8 8FB10014 */  lw        $s1, 0x14($sp)
/* 153BC 80039FBC 8FB00010 */  lw        $s0, 0x10($sp)
/* 153C0 80039FC0 D7B60028 */  ldc1      $f22, 0x28($sp)
/* 153C4 80039FC4 D7B40020 */  ldc1      $f20, 0x20($sp)
/* 153C8 80039FC8 03E00008 */  jr        $ra
/* 153CC 80039FCC 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

f32 npc_get_render_yaw(Npc* npc) {
    Camera* camera = &gCameras[gCurrentCamID];
    f32 cameraYaw;
    f32 camRelativeYaw;
    f32 yaw;
    s32 direction;

    if (!(gOverrideFlags & (GLOBAL_OVERRIDES_8000 | GLOBAL_OVERRIDES_4000))) {
        cameraYaw = camera->currentYaw;
        camRelativeYaw = get_clamped_angle_diff(cameraYaw, npc->yaw);

        if (camRelativeYaw < -5.0f && camRelativeYaw > -175.0f) {
            direction = 0;
            camRelativeYaw = 0.0f;
        } else if (camRelativeYaw > 5.0f && camRelativeYaw < 175.0f) {
            direction = 1;
            camRelativeYaw = 180.0f;
        } else {
            // direction is close to flipping, use saved value
            direction = 2;
            camRelativeYaw = npc->yawCamOffset;
        }

        npc->yawCamOffset = yaw = clamp_angle(camRelativeYaw);

        if (!(npc->flags & NPC_FLAG_IGNORE_CAMERA_FOR_YAW)) {
            if (npc->isFacingAway != direction && direction != 2) {
                npc->isFacingAway = direction;

                if (npc->isFacingAway) {
                    npc->turnAroundYawAdjustment = 180;
                } else {
                    npc->turnAroundYawAdjustment = -180;
                }

                if (fabsf(get_clamped_angle_diff(cameraYaw, npc->yaw)) >= 90.0f) {
                    npc->turnAroundYawAdjustment = -npc->turnAroundYawAdjustment;
                }
            }

            if (npc->turnAroundYawAdjustment != 0) {
                if (npc->turnAroundYawAdjustment < 0) {
                    npc->turnAroundYawAdjustment += 20;
                }
                if (npc->turnAroundYawAdjustment > 0) {
                    npc->turnAroundYawAdjustment -= 20;
                }
            }

            if (npc->flags & NPC_FLAG_200000) {
                npc->turnAroundYawAdjustment = 0;
            }

            npc->renderYaw = clamp_angle(clamp_angle(npc->turnAroundYawAdjustment + yaw) - cameraYaw);
            yaw = npc->renderYaw;
        } else {
            yaw = npc->renderYaw;
        }
    } else {
        yaw = npc->renderYaw;
    }
    return yaw;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel recover_update
/* 381490 E00801D0 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 381494 E00801D4 AFB50024 */  sw        $s5, 0x24($sp)
/* 381498 E00801D8 0080A82D */  daddu     $s5, $a0, $zero
/* 38149C E00801DC AFBF0030 */  sw        $ra, 0x30($sp)
/* 3814A0 E00801E0 AFB7002C */  sw        $s7, 0x2C($sp)
/* 3814A4 E00801E4 AFB60028 */  sw        $s6, 0x28($sp)
/* 3814A8 E00801E8 AFB40020 */  sw        $s4, 0x20($sp)
/* 3814AC E00801EC AFB3001C */  sw        $s3, 0x1C($sp)
/* 3814B0 E00801F0 AFB20018 */  sw        $s2, 0x18($sp)
/* 3814B4 E00801F4 AFB10014 */  sw        $s1, 0x14($sp)
/* 3814B8 E00801F8 AFB00010 */  sw        $s0, 0x10($sp)
/* 3814BC E00801FC F7B60040 */  sdc1      $f22, 0x40($sp)
/* 3814C0 E0080200 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 3814C4 E0080204 8EA3000C */  lw        $v1, 0xC($s5)
/* 3814C8 E0080208 8C62002C */  lw        $v0, 0x2C($v1)
/* 3814CC E008020C 2442FFFF */  addiu     $v0, $v0, -0x1
/* 3814D0 E0080210 AC62002C */  sw        $v0, 0x2C($v1)
/* 3814D4 E0080214 8C620030 */  lw        $v0, 0x30($v1)
/* 3814D8 E0080218 8C64002C */  lw        $a0, 0x2C($v1)
/* 3814DC E008021C 24420001 */  addiu     $v0, $v0, 0x1
/* 3814E0 E0080220 04810005 */  bgez      $a0, .LE0080238
/* 3814E4 E0080224 AC620030 */   sw       $v0, 0x30($v1)
/* 3814E8 E0080228 0C080128 */  jal       shim_remove_effect
/* 3814EC E008022C 02A0202D */   daddu    $a0, $s5, $zero
/* 3814F0 E0080230 080200FC */  j         .LE00803F0
/* 3814F4 E0080234 00000000 */   nop
.LE0080238:
/* 3814F8 E0080238 24630048 */  addiu     $v1, $v1, 0x48
/* 3814FC E008023C 24120001 */  addiu     $s2, $zero, 0x1
/* 381500 E0080240 8EA20008 */  lw        $v0, 0x8($s5)
/* 381504 E0080244 0242102A */  slt       $v0, $s2, $v0
/* 381508 E0080248 10400069 */  beqz      $v0, .LE00803F0
/* 38150C E008024C 0080882D */   daddu    $s1, $a0, $zero
/* 381510 E0080250 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 381514 E0080254 4481B000 */  mtc1      $at, $f22
/* 381518 E0080258 3C17E008 */  lui       $s7, %hi(D_E0080AF0)
/* 38151C E008025C 26F70AF0 */  addiu     $s7, $s7, %lo(D_E0080AF0)
/* 381520 E0080260 02511004 */  sllv      $v0, $s1, $s2
/* 381524 E0080264 0051A021 */  addu      $s4, $v0, $s1
/* 381528 E0080268 001410C0 */  sll       $v0, $s4, 3
/* 38152C E008026C 0051B021 */  addu      $s6, $v0, $s1
/* 381530 E0080270 2470002C */  addiu     $s0, $v1, 0x2C
/* 381534 E0080274 24130026 */  addiu     $s3, $zero, 0x26
.LE0080278:
/* 381538 E0080278 8E020008 */  lw        $v0, 0x8($s0)
/* 38153C E008027C 8E030000 */  lw        $v1, 0x0($s0)
/* 381540 E0080280 18400003 */  blez      $v0, .LE0080290
/* 381544 E0080284 2442FFFF */   addiu    $v0, $v0, -0x1
/* 381548 E0080288 1C400053 */  bgtz      $v0, .LE00803D8
/* 38154C E008028C AE020008 */   sw       $v0, 0x8($s0)
.LE0080290:
/* 381550 E0080290 28620007 */  slti      $v0, $v1, 0x7
/* 381554 E0080294 14400004 */  bnez      $v0, .LE00802A8
/* 381558 E0080298 00031880 */   sll      $v1, $v1, 2
/* 38155C E008029C E6160010 */  swc1      $f22, 0x10($s0)
/* 381560 E00802A0 080200B1 */  j         .LE00802C4
/* 381564 E00802A4 E616000C */   swc1     $f22, 0xC($s0)
.LE00802A8:
/* 381568 E00802A8 00771021 */  addu      $v0, $v1, $s7
/* 38156C E00802AC C4400000 */  lwc1      $f0, 0x0($v0)
/* 381570 E00802B0 E600000C */  swc1      $f0, 0xC($s0)
/* 381574 E00802B4 3C01E008 */  lui       $at, (0xE0080B0C >> 16)
/* 381578 E00802B8 00230821 */  addu      $at, $at, $v1
/* 38157C E00802BC C4200B0C */  lwc1      $f0, (0xE0080B0C & 0xFFFF)($at)
/* 381580 E00802C0 E6000010 */  swc1      $f0, 0x10($s0)
.LE00802C4:
/* 381584 E00802C4 00141080 */  sll       $v0, $s4, 2
/* 381588 E00802C8 02621021 */  addu      $v0, $s3, $v0
/* 38158C E00802CC 4482A000 */  mtc1      $v0, $f20
/* 381590 E00802D0 00000000 */  nop
/* 381594 E00802D4 4680A520 */  cvt.s.w   $f20, $f20
/* 381598 E00802D8 C606FFD8 */  lwc1      $f6, -0x28($s0)
/* 38159C E00802DC C600FFE4 */  lwc1      $f0, -0x1C($s0)
/* 3815A0 E00802E0 C604FFDC */  lwc1      $f4, -0x24($s0)
/* 3815A4 E00802E4 46003180 */  add.s     $f6, $f6, $f0
/* 3815A8 E00802E8 C600FFE8 */  lwc1      $f0, -0x18($s0)
/* 3815AC E00802EC C602FFEC */  lwc1      $f2, -0x14($s0)
/* 3815B0 E00802F0 46002100 */  add.s     $f4, $f4, $f0
/* 3815B4 E00802F4 C600FFE0 */  lwc1      $f0, -0x20($s0)
/* 3815B8 E00802F8 4600A306 */  mov.s     $f12, $f20
/* 3815BC E00802FC 46020000 */  add.s     $f0, $f0, $f2
/* 3815C0 E0080300 E606FFD8 */  swc1      $f6, -0x28($s0)
/* 3815C4 E0080304 E604FFDC */  swc1      $f4, -0x24($s0)
/* 3815C8 E0080308 0C080140 */  jal       shim_sin_deg
/* 3815CC E008030C E600FFE0 */   swc1     $f0, -0x20($s0)
/* 3815D0 E0080310 3C01C1F0 */  lui       $at, (0xC1F00000 >> 16)
/* 3815D4 E0080314 44811000 */  mtc1      $at, $f2
/* 3815D8 E0080318 00000000 */  nop
/* 3815DC E008031C 46020002 */  mul.s     $f0, $f0, $f2
/* 3815E0 E0080320 00000000 */  nop
/* 3815E4 E0080324 4600A306 */  mov.s     $f12, $f20
/* 3815E8 E0080328 0C080144 */  jal       shim_cos_deg
/* 3815EC E008032C E600FFF0 */   swc1     $f0, -0x10($s0)
/* 3815F0 E0080330 3C014100 */  lui       $at, (0x41000000 >> 16)
/* 3815F4 E0080334 44811000 */  mtc1      $at, $f2
/* 3815F8 E0080338 00000000 */  nop
/* 3815FC E008033C 46020082 */  mul.s     $f2, $f0, $f2
/* 381600 E0080340 00000000 */  nop
/* 381604 E0080344 2A220014 */  slti      $v0, $s1, 0x14
/* 381608 E0080348 10400014 */  beqz      $v0, .LE008039C
/* 38160C E008034C E602FFF8 */   swc1     $f2, -0x8($s0)
/* 381610 E0080350 44912000 */  mtc1      $s1, $f4
/* 381614 E0080354 00000000 */  nop
/* 381618 E0080358 46802120 */  cvt.s.w   $f4, $f4
/* 38161C E008035C 3C01E008 */  lui       $at, (0xE0080B30 >> 16)
/* 381620 E0080360 D4200B30 */  ldc1      $f0, (0xE0080B30 & 0xFFFF)($at)
/* 381624 E0080364 46002121 */  cvt.d.s   $f4, $f4
/* 381628 E0080368 46202102 */  mul.d     $f4, $f4, $f0
/* 38162C E008036C 00000000 */  nop
/* 381630 E0080370 460010A1 */  cvt.d.s   $f2, $f2
/* 381634 E0080374 46241082 */  mul.d     $f2, $f2, $f4
/* 381638 E0080378 00000000 */  nop
/* 38163C E008037C C600FFF0 */  lwc1      $f0, -0x10($s0)
/* 381640 E0080380 46000021 */  cvt.d.s   $f0, $f0
/* 381644 E0080384 46240002 */  mul.d     $f0, $f0, $f4
/* 381648 E0080388 00000000 */  nop
/* 38164C E008038C 462010A0 */  cvt.s.d   $f2, $f2
/* 381650 E0080390 46200020 */  cvt.s.d   $f0, $f0
/* 381654 E0080394 E602FFF8 */  swc1      $f2, -0x8($s0)
/* 381658 E0080398 E600FFF0 */  swc1      $f0, -0x10($s0)
.LE008039C:
/* 38165C E008039C 2A22000A */  slti      $v0, $s1, 0xA
/* 381660 E00803A0 1040000A */  beqz      $v0, .LE00803CC
/* 381664 E00803A4 00000000 */   nop
/* 381668 E00803A8 C600FFE8 */  lwc1      $f0, -0x18($s0)
/* 38166C E00803AC 3C01E008 */  lui       $at, (0xE0080B38 >> 16)
/* 381670 E00803B0 D4220B38 */  ldc1      $f2, (0xE0080B38 & 0xFFFF)($at)
/* 381674 E00803B4 46000021 */  cvt.d.s   $f0, $f0
/* 381678 E00803B8 46220002 */  mul.d     $f0, $f0, $f2
/* 38167C E00803BC 00000000 */  nop
/* 381680 E00803C0 AE16FFFC */  sw        $s6, -0x4($s0)
/* 381684 E00803C4 46200020 */  cvt.s.d   $f0, $f0
/* 381688 E00803C8 E600FFE8 */  swc1      $f0, -0x18($s0)
.LE00803CC:
/* 38168C E00803CC 8E020000 */  lw        $v0, 0x0($s0)
/* 381690 E00803D0 24420001 */  addiu     $v0, $v0, 0x1
/* 381694 E00803D4 AE020000 */  sw        $v0, 0x0($s0)
.LE00803D8:
/* 381698 E00803D8 26730026 */  addiu     $s3, $s3, 0x26
/* 38169C E00803DC 26520001 */  addiu     $s2, $s2, 0x1
/* 3816A0 E00803E0 8EA20008 */  lw        $v0, 0x8($s5)
/* 3816A4 E00803E4 0242102A */  slt       $v0, $s2, $v0
/* 3816A8 E00803E8 1440FFA3 */  bnez      $v0, .LE0080278
/* 3816AC E00803EC 26100048 */   addiu    $s0, $s0, 0x48
.LE00803F0:
/* 3816B0 E00803F0 8FBF0030 */  lw        $ra, 0x30($sp)
/* 3816B4 E00803F4 8FB7002C */  lw        $s7, 0x2C($sp)
/* 3816B8 E00803F8 8FB60028 */  lw        $s6, 0x28($sp)
/* 3816BC E00803FC 8FB50024 */  lw        $s5, 0x24($sp)
/* 3816C0 E0080400 8FB40020 */  lw        $s4, 0x20($sp)
/* 3816C4 E0080404 8FB3001C */  lw        $s3, 0x1C($sp)
/* 3816C8 E0080408 8FB20018 */  lw        $s2, 0x18($sp)
/* 3816CC E008040C 8FB10014 */  lw        $s1, 0x14($sp)
/* 3816D0 E0080410 8FB00010 */  lw        $s0, 0x10($sp)
/* 3816D4 E0080414 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 3816D8 E0080418 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 3816DC E008041C 03E00008 */  jr        $ra
/* 3816E0 E0080420 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

void recover_update(EffectInstance* effect) {
    RecoverFXData* part = effect->data.recover;
    s32 unk_2C;
    s32 i;

    part->unk_2C--;
    part->unk_30++;

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

    unk_2C = part->unk_2C;

    part++;
    for (i = 1; i < effect->numParts; i++, part++) {
        s32 unk_2C_2 = part->unk_2C;

        if (part->unk_34 <= 0 || --part->unk_34 <= 0) {
            if (unk_2C_2 >= 7) {
                part->unk_3C = 1.0f;
                part->unk_38 = 1.0f;
            } else {
                part->unk_38 = D_E0080AF0[unk_2C_2];
                part->unk_3C = D_E0080B0C[unk_2C_2];
            }

            part->unk_04 += part->unk_10;
            part->unk_08 += part->unk_14;
            part->unk_0C += part->unk_18;
            part->unk_1C = shim_sin_deg(i * 38 + unk_2C * 12) * -30.0f;
            part->unk_24 = shim_cos_deg(i * 38 + unk_2C * 12) * 8.0f;

            if (unk_2C < 20) {
                part->unk_24 *= (f32) unk_2C * 0.05;
                part->unk_1C *= (f32) unk_2C * 0.05;
            }

            if (unk_2C < 10) {
                part->unk_28 = unk_2C * 25;
                part->unk_14 *= 0.9;
            }

            part->unk_2C++;
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel floating_flower_main
/* 32FE30 E001A000 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 32FE34 E001A004 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 32FE38 E001A008 4485A000 */  mtc1      $a1, $f20
/* 32FE3C E001A00C F7B80048 */  sdc1      $f24, 0x48($sp)
/* 32FE40 E001A010 4486C000 */  mtc1      $a2, $f24
/* 32FE44 E001A014 AFB1002C */  sw        $s1, 0x2C($sp)
/* 32FE48 E001A018 0080882D */  daddu     $s1, $a0, $zero
/* 32FE4C E001A01C F7B60040 */  sdc1      $f22, 0x40($sp)
/* 32FE50 E001A020 4487B000 */  mtc1      $a3, $f22
/* 32FE54 E001A024 27A40010 */  addiu     $a0, $sp, 0x10
/* 32FE58 E001A028 AFB20030 */  sw        $s2, 0x30($sp)
/* 32FE5C E001A02C 8FB20060 */  lw        $s2, 0x60($sp)
/* 32FE60 E001A030 3C02E002 */  lui       $v0, %hi(floating_flower_init)
/* 32FE64 E001A034 2442A21C */  addiu     $v0, $v0, %lo(floating_flower_init)
/* 32FE68 E001A038 AFA20018 */  sw        $v0, 0x18($sp)
/* 32FE6C E001A03C 3C02E002 */  lui       $v0, %hi(floating_flower_update)
/* 32FE70 E001A040 2442A224 */  addiu     $v0, $v0, %lo(floating_flower_update)
/* 32FE74 E001A044 AFA2001C */  sw        $v0, 0x1C($sp)
/* 32FE78 E001A048 3C02E002 */  lui       $v0, %hi(floating_flower_render)
/* 32FE7C E001A04C 2442A3FC */  addiu     $v0, $v0, %lo(floating_flower_render)
/* 32FE80 E001A050 AFA20020 */  sw        $v0, 0x20($sp)
/* 32FE84 E001A054 2402000D */  addiu     $v0, $zero, 0xD
/* 32FE88 E001A058 AFBF0034 */  sw        $ra, 0x34($sp)
/* 32FE8C E001A05C AFB00028 */  sw        $s0, 0x28($sp)
/* 32FE90 E001A060 AFA00010 */  sw        $zero, 0x10($sp)
/* 32FE94 E001A064 AFA00024 */  sw        $zero, 0x24($sp)
/* 32FE98 E001A068 0C080124 */  jal       shim_create_effect_instance
/* 32FE9C E001A06C AFA20014 */   sw       $v0, 0x14($sp)
/* 32FEA0 E001A070 24040048 */  addiu     $a0, $zero, 0x48
/* 32FEA4 E001A074 24030001 */  addiu     $v1, $zero, 0x1
/* 32FEA8 E001A078 0040802D */  daddu     $s0, $v0, $zero
/* 32FEAC E001A07C 0C08012C */  jal       shim_general_heap_malloc
/* 32FEB0 E001A080 AE030008 */   sw       $v1, 0x8($s0)
/* 32FEB4 E001A084 AE02000C */  sw        $v0, 0xC($s0)
/* 32FEB8 E001A088 0040802D */  daddu     $s0, $v0, $zero
/* 32FEBC E001A08C 56000003 */  bnel      $s0, $zero, .LE001A09C
/* 32FEC0 E001A090 AE110000 */   sw       $s1, 0x0($s0)
.LE001A094:
/* 32FEC4 E001A094 08006825 */  j         .LE001A094
/* 32FEC8 E001A098 00000000 */   nop
.LE001A09C:
/* 32FECC E001A09C 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 32FED0 E001A0A0 44813000 */  mtc1      $at, $f6
/* 32FED4 E001A0A4 E6140004 */  swc1      $f20, 0x4($s0)
/* 32FED8 E001A0A8 E616000C */  swc1      $f22, 0xC($s0)
/* 32FEDC E001A0AC AE000010 */  sw        $zero, 0x10($s0)
/* 32FEE0 E001A0B0 4606C000 */  add.s     $f0, $f24, $f6
/* 32FEE4 E001A0B4 AE000014 */  sw        $zero, 0x14($s0)
/* 32FEE8 E001A0B8 AE000018 */  sw        $zero, 0x18($s0)
/* 32FEEC E001A0BC 16200018 */  bnez      $s1, .LE001A120
/* 32FEF0 E001A0C0 E6000008 */   swc1     $f0, 0x8($s0)
/* 32FEF4 E001A0C4 3C013DF5 */  lui       $at, (0x3DF5C28F >> 16)
/* 32FEF8 E001A0C8 3421C28F */  ori       $at, $at, (0x3DF5C28F & 0xFFFF)
/* 32FEFC E001A0CC 44810000 */  mtc1      $at, $f0
/* 32FF00 E001A0D0 3C01BC79 */  lui       $at, (0xBC79096C >> 16)
/* 32FF04 E001A0D4 3421096C */  ori       $at, $at, (0xBC79096C & 0xFFFF)
/* 32FF08 E001A0D8 44811000 */  mtc1      $at, $f2
/* 32FF0C E001A0DC 3C014040 */  lui       $at, (0x40400000 >> 16)
/* 32FF10 E001A0E0 44812000 */  mtc1      $at, $f4
/* 32FF14 E001A0E4 3C02E002 */  lui       $v0, (0xE0020000 >> 16)
/* 32FF18 E001A0E8 8C42A610 */  lw        $v0, -0x59F0($v0)
/* 32FF1C E001A0EC AE000018 */  sw        $zero, 0x18($s0)
/* 32FF20 E001A0F0 AE000024 */  sw        $zero, 0x24($s0)
/* 32FF24 E001A0F4 AE000028 */  sw        $zero, 0x28($s0)
/* 32FF28 E001A0F8 E600001C */  swc1      $f0, 0x1C($s0)
/* 32FF2C E001A0FC E6020020 */  swc1      $f2, 0x20($s0)
/* 32FF30 E001A100 10400004 */  beqz      $v0, .LE001A114
/* 32FF34 E001A104 E604002C */   swc1     $f4, 0x2C($s0)
/* 32FF38 E001A108 3C01C120 */  lui       $at, (0xC1200000 >> 16)
/* 32FF3C E001A10C 44813000 */  mtc1      $at, $f6
/* 32FF40 E001A110 00000000 */  nop
.LE001A114:
/* 32FF44 E001A114 E6060030 */  swc1      $f6, 0x30($s0)
/* 32FF48 E001A118 08006876 */  j         .LE001A1D8
/* 32FF4C E001A11C AE120034 */   sw       $s2, 0x34($s0)
.LE001A120:
/* 32FF50 E001A120 3C013DF5 */  lui       $at, (0x3DF5C28F >> 16)
/* 32FF54 E001A124 3421C28F */  ori       $at, $at, (0x3DF5C28F & 0xFFFF)
/* 32FF58 E001A128 44810000 */  mtc1      $at, $f0
/* 32FF5C E001A12C 3C01BC79 */  lui       $at, (0xBC79096C >> 16)
/* 32FF60 E001A130 3421096C */  ori       $at, $at, (0xBC79096C & 0xFFFF)
/* 32FF64 E001A134 44811000 */  mtc1      $at, $f2
/* 32FF68 E001A138 24040001 */  addiu     $a0, $zero, 0x1
/* 32FF6C E001A13C E600001C */  swc1      $f0, 0x1C($s0)
/* 32FF70 E001A140 0C080138 */  jal       shim_rand_int
/* 32FF74 E001A144 E6020020 */   swc1     $f2, 0x20($s0)
/* 32FF78 E001A148 24040168 */  addiu     $a0, $zero, 0x168
/* 32FF7C E001A14C 00021900 */  sll       $v1, $v0, 4
/* 32FF80 E001A150 00621823 */  subu      $v1, $v1, $v0
/* 32FF84 E001A154 00031840 */  sll       $v1, $v1, 1
/* 32FF88 E001A158 2463FFF1 */  addiu     $v1, $v1, -0xF
/* 32FF8C E001A15C 44830000 */  mtc1      $v1, $f0
/* 32FF90 E001A160 00000000 */  nop
/* 32FF94 E001A164 46800020 */  cvt.s.w   $f0, $f0
/* 32FF98 E001A168 0C080138 */  jal       shim_rand_int
/* 32FF9C E001A16C E6000024 */   swc1     $f0, 0x24($s0)
/* 32FFA0 E001A170 24040001 */  addiu     $a0, $zero, 0x1
/* 32FFA4 E001A174 44820000 */  mtc1      $v0, $f0
/* 32FFA8 E001A178 00000000 */  nop
/* 32FFAC E001A17C 46800020 */  cvt.s.w   $f0, $f0
/* 32FFB0 E001A180 E6000028 */  swc1      $f0, 0x28($s0)
/* 32FFB4 E001A184 0C080138 */  jal       shim_rand_int
/* 32FFB8 E001A188 AE00002C */   sw       $zero, 0x2C($s0)
/* 32FFBC E001A18C 2404000A */  addiu     $a0, $zero, 0xA
/* 32FFC0 E001A190 000210C0 */  sll       $v0, $v0, 3
/* 32FFC4 E001A194 2442FFFC */  addiu     $v0, $v0, -0x4
/* 32FFC8 E001A198 44820000 */  mtc1      $v0, $f0
/* 32FFCC E001A19C 00000000 */  nop
/* 32FFD0 E001A1A0 46800020 */  cvt.s.w   $f0, $f0
/* 32FFD4 E001A1A4 E6000030 */  swc1      $f0, 0x30($s0)
/* 32FFD8 E001A1A8 AE120034 */  sw        $s2, 0x34($s0)
/* 32FFDC E001A1AC 0C080138 */  jal       shim_rand_int
/* 32FFE0 E001A1B0 AE000038 */   sw       $zero, 0x38($s0)
/* 32FFE4 E001A1B4 24040014 */  addiu     $a0, $zero, 0x14
/* 32FFE8 E001A1B8 0C080138 */  jal       shim_rand_int
/* 32FFEC E001A1BC AE020044 */   sw       $v0, 0x44($s0)
/* 32FFF0 E001A1C0 24040001 */  addiu     $a0, $zero, 0x1
/* 32FFF4 E001A1C4 0C080138 */  jal       shim_rand_int
/* 32FFF8 E001A1C8 AE020040 */   sw       $v0, 0x40($s0)
/* 32FFFC E001A1CC 00021040 */  sll       $v0, $v0, 1
/* 330000 E001A1D0 2442FFFF */  addiu     $v0, $v0, -0x1
/* 330004 E001A1D4 AE02003C */  sw        $v0, 0x3C($s0)
.LE001A1D8:
/* 330008 E001A1D8 3C03E002 */  lui       $v1, %hi(D_E001A610)
/* 33000C E001A1DC 2463A610 */  addiu     $v1, $v1, %lo(D_E001A610)
/* 330010 E001A1E0 8C620000 */  lw        $v0, 0x0($v1)
/* 330014 E001A1E4 24420001 */  addiu     $v0, $v0, 0x1
/* 330018 E001A1E8 AC620000 */  sw        $v0, 0x0($v1)
/* 33001C E001A1EC 28420002 */  slti      $v0, $v0, 0x2
/* 330020 E001A1F0 50400001 */  beql      $v0, $zero, .LE001A1F8
/* 330024 E001A1F4 AC600000 */   sw       $zero, 0x0($v1)
.LE001A1F8:
/* 330028 E001A1F8 8FBF0034 */  lw        $ra, 0x34($sp)
/* 33002C E001A1FC 8FB20030 */  lw        $s2, 0x30($sp)
/* 330030 E001A200 8FB1002C */  lw        $s1, 0x2C($sp)
/* 330034 E001A204 8FB00028 */  lw        $s0, 0x28($sp)
/* 330038 E001A208 D7B80048 */  ldc1      $f24, 0x48($sp)
/* 33003C E001A20C D7B60040 */  ldc1      $f22, 0x40($sp)
/* 330040 E001A210 D7B40038 */  ldc1      $f20, 0x38($sp)
/* 330044 E001A214 03E00008 */  jr        $ra
/* 330048 E001A218 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void floating_flower_main(s32 type, f32 posX, f32 posY, f32 posZ, s32 duration) {
    EffectBlueprint bp;
    EffectInstance* effect;
    FloatingFlowerFXData* part;
    s32 numParts = 1;
    f32 phi_f6;

    bp.unk_00 = 0;
    bp.init = floating_flower_init;
    bp.update = floating_flower_update;
    bp.renderWorld = floating_flower_render;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_FLOATING_FLOWER;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = 1;
    part = effect->data.floatingFlower = shim_general_heap_malloc(numParts * sizeof(*part));

    ASSERT(effect->data.floatingFlower != NULL);

    part->type = type;
    part->pos.x = posX;
    part->pos.y = posY + 10.0f;
    part->pos.z = posZ;
    part->vel.x = 0.0f;
    part->vel.y = 0.0f;
    part->vel.z = 0.0f;

    if (type == 0) {
        part->vel.z = 0;
        part->rot.x = 0.0f;
        part->rot.y = 0.0f;
        part->accelY = 0.12f;
        part->jerkY = -0.0152f;
        part->angularVel.x = 3.0f;
        if (D_E001A610 != 0) {
            phi_f6 = -10.0f;
        } else {
            phi_f6 = 10.0f;
        }
        part->angularVel.y = phi_f6;
        part->timeLeft = duration;
    } else {
        part->accelY = 0.12f;
        part->jerkY = -0.0152f;
        part->rot.x = (shim_rand_int(1) * 30) - 15;
        part->rot.y = shim_rand_int(360);
        part->angularVel.x = 0;
        part->angularVel.y = (shim_rand_int(1) * 8) - 4;
        part->timeLeft = duration;
        part->lifetime = 0;
        part->unk_44 = shim_rand_int(10);
        part->unk_40 = shim_rand_int(20);
        part->unk_3C = (shim_rand_int(1) * 2) - 1;
    }

    D_E001A610++;
    if (D_E001A610 > 1) {
        D_E001A610 = 0;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel title_screen_draw_logo
/* 12D94 80037994 27BDFFF8 */  addiu     $sp, $sp, -0x8
/* 12D98 80037998 0000602D */  daddu     $t4, $zero, $zero
/* 12D9C 8003799C 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 12DA0 800379A0 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 12DA4 800379A4 0040402D */  daddu     $t0, $v0, $zero
/* 12DA8 800379A8 3C19800A */  lui       $t9, %hi(TitleScreen_ImgList_Logo)
/* 12DAC 800379AC 27390978 */  addiu     $t9, $t9, %lo(TitleScreen_ImgList_Logo)
/* 12DB0 800379B0 3C0DF518 */  lui       $t5, (0xF5186400 >> 16)
/* 12DB4 800379B4 35AD6400 */  ori       $t5, $t5, (0xF5186400 & 0xFFFF)
/* 12DB8 800379B8 3C18E441 */  lui       $t8, (0xE4410000 >> 16)
/* 12DBC 800379BC 3C0F000F */  lui       $t7, (0xF0000 >> 16)
/* 12DC0 800379C0 0180582D */  daddu     $t3, $t4, $zero
/* 12DC4 800379C4 0180502D */  daddu     $t2, $t4, $zero
/* 12DC8 800379C8 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 12DCC 800379CC AFB00000 */  sw        $s0, 0x0($sp)
/* 12DD0 800379D0 8D030000 */  lw        $v1, 0x0($t0)
/* 12DD4 800379D4 3C01C2C8 */  lui       $at, (0xC2C80000 >> 16)
/* 12DD8 800379D8 44810000 */  mtc1      $at, $f0
/* 12DDC 800379DC 0060202D */  daddu     $a0, $v1, $zero
/* 12DE0 800379E0 24630008 */  addiu     $v1, $v1, 0x8
/* 12DE4 800379E4 AD030000 */  sw        $v1, 0x0($t0)
/* 12DE8 800379E8 AC820000 */  sw        $v0, 0x0($a0)
/* 12DEC 800379EC 3C028007 */  lui       $v0, %hi(D_80077A50)
/* 12DF0 800379F0 24427A50 */  addiu     $v0, $v0, %lo(D_80077A50)
/* 12DF4 800379F4 AC820004 */  sw        $v0, 0x4($a0)
/* 12DF8 800379F8 24620008 */  addiu     $v0, $v1, 0x8
/* 12DFC 800379FC 46006302 */  mul.s     $f12, $f12, $f0
/* 12E00 80037A00 00000000 */  nop
/* 12E04 80037A04 AD020000 */  sw        $v0, 0x0($t0)
/* 12E08 80037A08 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 12E0C 80037A0C AC620000 */  sw        $v0, 0x0($v1)
/* 12E10 80037A10 AC600004 */  sw        $zero, 0x4($v1)
/* 12E14 80037A14 4600608D */  trunc.w.s $f2, $f12
/* 12E18 80037A18 440E1000 */  mfc1      $t6, $f2
/* 12E1C 80037A1C 00000000 */  nop
/* 12E20 80037A20 25C9000F */  addiu     $t1, $t6, 0xF
.L80037A24:
/* 12E24 80037A24 3C04FD18 */  lui       $a0, (0xFD1800C7 >> 16)
/* 12E28 80037A28 348400C7 */  ori       $a0, $a0, (0xFD1800C7 & 0xFFFF)
/* 12E2C 80037A2C 3C050731 */  lui       $a1, (0x731C004 >> 16)
/* 12E30 80037A30 34A5C004 */  ori       $a1, $a1, (0x731C004 & 0xFFFF)
/* 12E34 80037A34 3C060031 */  lui       $a2, (0x31C004 >> 16)
/* 12E38 80037A38 34C6C004 */  ori       $a2, $a2, (0x31C004 & 0xFFFF)
/* 12E3C 80037A3C 8D070000 */  lw        $a3, 0x0($t0)
/* 12E40 80037A40 8F220000 */  lw        $v0, 0x0($t9)
/* 12E44 80037A44 00E0182D */  daddu     $v1, $a3, $zero
/* 12E48 80037A48 24E70008 */  addiu     $a3, $a3, 0x8
/* 12E4C 80037A4C 004A1021 */  addu      $v0, $v0, $t2
/* 12E50 80037A50 AD070000 */  sw        $a3, 0x0($t0)
/* 12E54 80037A54 AC620004 */  sw        $v0, 0x4($v1)
/* 12E58 80037A58 24E20008 */  addiu     $v0, $a3, 0x8
/* 12E5C 80037A5C AC640000 */  sw        $a0, 0x0($v1)
/* 12E60 80037A60 AD020000 */  sw        $v0, 0x0($t0)
/* 12E64 80037A64 3C020700 */  lui       $v0, (0x7000000 >> 16)
/* 12E68 80037A68 ACE20004 */  sw        $v0, 0x4($a3)
/* 12E6C 80037A6C 24E20010 */  addiu     $v0, $a3, 0x10
/* 12E70 80037A70 ACED0000 */  sw        $t5, 0x0($a3)
/* 12E74 80037A74 AD020000 */  sw        $v0, 0x0($t0)
/* 12E78 80037A78 3C02E600 */  lui       $v0, (0xE6000000 >> 16)
/* 12E7C 80037A7C ACE20008 */  sw        $v0, 0x8($a3)
/* 12E80 80037A80 24E20018 */  addiu     $v0, $a3, 0x18
/* 12E84 80037A84 ACE0000C */  sw        $zero, 0xC($a3)
/* 12E88 80037A88 AD020000 */  sw        $v0, 0x0($t0)
/* 12E8C 80037A8C 3C02F400 */  lui       $v0, (0xF4000000 >> 16)
/* 12E90 80037A90 ACE20010 */  sw        $v0, 0x10($a3)
/* 12E94 80037A94 24E20020 */  addiu     $v0, $a3, 0x20
/* 12E98 80037A98 ACE50014 */  sw        $a1, 0x14($a3)
/* 12E9C 80037A9C AD020000 */  sw        $v0, 0x0($t0)
/* 12EA0 80037AA0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 12EA4 80037AA4 ACE20018 */  sw        $v0, 0x18($a3)
/* 12EA8 80037AA8 24E20028 */  addiu     $v0, $a3, 0x28
/* 12EAC 80037AAC 24E30030 */  addiu     $v1, $a3, 0x30
/* 12EB0 80037AB0 ACE0001C */  sw        $zero, 0x1C($a3)
/* 12EB4 80037AB4 AD020000 */  sw        $v0, 0x0($t0)
/* 12EB8 80037AB8 3C02F200 */  lui       $v0, (0xF2000000 >> 16)
/* 12EBC 80037ABC ACED0020 */  sw        $t5, 0x20($a3)
/* 12EC0 80037AC0 ACE00024 */  sw        $zero, 0x24($a3)
/* 12EC4 80037AC4 AD030000 */  sw        $v1, 0x0($t0)
/* 12EC8 80037AC8 ACE20028 */  sw        $v0, 0x28($a3)
/* 12ECC 80037ACC 24E20038 */  addiu     $v0, $a3, 0x38
/* 12ED0 80037AD0 ACE6002C */  sw        $a2, 0x2C($a3)
/* 12ED4 80037AD4 AD020000 */  sw        $v0, 0x0($t0)
/* 12ED8 80037AD8 25C20011 */  addiu     $v0, $t6, 0x11
/* 12EDC 80037ADC 01621021 */  addu      $v0, $t3, $v0
/* 12EE0 80037AE0 00021480 */  sll       $v0, $v0, 18
/* 12EE4 80037AE4 00021403 */  sra       $v0, $v0, 16
/* 12EE8 80037AE8 18400004 */  blez      $v0, .L80037AFC
/* 12EEC 80037AEC 30420FFF */   andi     $v0, $v0, 0xFFF
/* 12EF0 80037AF0 00581025 */  or        $v0, $v0, $t8
/* 12EF4 80037AF4 0800DEC0 */  j         .L80037B00
/* 12EF8 80037AF8 ACE20030 */   sw       $v0, 0x30($a3)
.L80037AFC:
/* 12EFC 80037AFC ACF80030 */  sw        $t8, 0x30($a3)
.L80037B00:
/* 12F00 80037B00 00091480 */  sll       $v0, $t1, 18
/* 12F04 80037B04 00021403 */  sra       $v0, $v0, 16
/* 12F08 80037B08 18400004 */  blez      $v0, .L80037B1C
/* 12F0C 80037B0C 30420FFF */   andi     $v0, $v0, 0xFFF
/* 12F10 80037B10 004F1025 */  or        $v0, $v0, $t7
/* 12F14 80037B14 0800DEC8 */  j         .L80037B20
/* 12F18 80037B18 AC620004 */   sw       $v0, 0x4($v1)
.L80037B1C:
/* 12F1C 80037B1C AC6F0004 */  sw        $t7, 0x4($v1)
.L80037B20:
/* 12F20 80037B20 8D030000 */  lw        $v1, 0x0($t0)
/* 12F24 80037B24 24620008 */  addiu     $v0, $v1, 0x8
/* 12F28 80037B28 AD020000 */  sw        $v0, 0x0($t0)
/* 12F2C 80037B2C 3C02E100 */  lui       $v0, (0xE1000000 >> 16)
/* 12F30 80037B30 AC620000 */  sw        $v0, 0x0($v1)
/* 12F34 80037B34 00091080 */  sll       $v0, $t1, 2
/* 12F38 80037B38 04430008 */  bgezl     $v0, .L80037B5C
/* 12F3C 80037B3C AC600004 */   sw       $zero, 0x4($v1)
/* 12F40 80037B40 00091480 */  sll       $v0, $t1, 18
/* 12F44 80037B44 00021343 */  sra       $v0, $v0, 13
/* 12F48 80037B48 5C400001 */  bgtzl     $v0, .L80037B50
/* 12F4C 80037B4C 0000102D */   daddu    $v0, $zero, $zero
.L80037B50:
/* 12F50 80037B50 00021023 */  negu      $v0, $v0
/* 12F54 80037B54 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 12F58 80037B58 AC620004 */  sw        $v0, 0x4($v1)
.L80037B5C:
/* 12F5C 80037B5C 3C040400 */  lui       $a0, (0x4000400 >> 16)
/* 12F60 80037B60 34840400 */  ori       $a0, $a0, (0x4000400 & 0xFFFF)
/* 12F64 80037B64 25290002 */  addiu     $t1, $t1, 0x2
/* 12F68 80037B68 256B0002 */  addiu     $t3, $t3, 0x2
/* 12F6C 80037B6C 254A0640 */  addiu     $t2, $t2, 0x640
/* 12F70 80037B70 8D020000 */  lw        $v0, 0x0($t0)
/* 12F74 80037B74 258C0001 */  addiu     $t4, $t4, 0x1
/* 12F78 80037B78 0040182D */  daddu     $v1, $v0, $zero
/* 12F7C 80037B7C 24420008 */  addiu     $v0, $v0, 0x8
/* 12F80 80037B80 AD020000 */  sw        $v0, 0x0($t0)
/* 12F84 80037B84 3C02F100 */  lui       $v0, (0xF1000000 >> 16)
/* 12F88 80037B88 AC620000 */  sw        $v0, 0x0($v1)
/* 12F8C 80037B8C 29820038 */  slti      $v0, $t4, 0x38
/* 12F90 80037B90 1440FFA4 */  bnez      $v0, .L80037A24
/* 12F94 80037B94 AC640004 */   sw       $a0, 0x4($v1)
/* 12F98 80037B98 3C03800A */  lui       $v1, %hi(gMainGfxPos)
/* 12F9C 80037B9C 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
/* 12FA0 80037BA0 8C620000 */  lw        $v0, 0x0($v1)
/* 12FA4 80037BA4 0040202D */  daddu     $a0, $v0, $zero
/* 12FA8 80037BA8 24420008 */  addiu     $v0, $v0, 0x8
/* 12FAC 80037BAC AC620000 */  sw        $v0, 0x0($v1)
/* 12FB0 80037BB0 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 12FB4 80037BB4 AC820000 */  sw        $v0, 0x0($a0)
/* 12FB8 80037BB8 AC800004 */  sw        $zero, 0x4($a0)
/* 12FBC 80037BBC 8FB00000 */  lw        $s0, 0x0($sp)
/* 12FC0 80037BC0 03E00008 */  jr        $ra
/* 12FC4 80037BC4 27BD0008 */   addiu    $sp, $sp, 0x8

### DECOMPILED C INSTRUCTIONS:

void title_screen_draw_logo(f32 arg0) {
    s32 yOffset;
    s32 i;

    gSPDisplayList(gMainGfxPos++, D_80077A50);
    gDPPipeSync(gMainGfxPos++);
    yOffset = -100 * arg0;

    for (i = 0; i < TITLE_NUM_TILES; i++) {
        // Load a tile from the logo texture
        gDPLoadTextureTile(gMainGfxPos++, &TitleScreen_ImgList_Logo[i * TITLE_TILE_PIXELS], G_IM_FMT_RGBA, G_IM_SIZ_32b,
                           TITLE_WIDTH, TITLE_TILE_HEIGHT, // width, height
                           0, 0, (TITLE_WIDTH - 1), (TITLE_TILE_HEIGHT - 1), // uls, ult, lrs, lrt
                           0, // pal
                           G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, // cms, cmt
                           G_TX_NOMASK, G_TX_NOMASK, // masks, maskt
                           G_TX_NOLOD, G_TX_NOLOD); // shifts, shiftt
        // Draw a scissored texture rectangle with the loaded tile
        gSPScisTextureRectangle(gMainGfxPos++,
            (TITLE_POS_LEFT)                                                      << 2, // ulx
            (TITLE_POS_TOP + TITLE_TILE_HEIGHT * i + yOffset)                     << 2, // uly
            (TITLE_POS_LEFT + TITLE_WIDTH)                                        << 2, // lrx
            (TITLE_POS_TOP + TITLE_TILE_HEIGHT + TITLE_TILE_HEIGHT * i + yOffset) << 2, // lry
            G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
    }

    gDPPipeSync(gMainGfxPos++);
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel footprint_main
/* 32F5F8 E0018078 27BDFF90 */  addiu     $sp, $sp, -0x70
/* 32F5FC E001807C F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 32F600 E0018080 4487E000 */  mtc1      $a3, $f28
/* 32F604 E0018084 27A40010 */  addiu     $a0, $sp, 0x10
/* 32F608 E0018088 F7BE0068 */  sdc1      $f30, 0x68($sp)
/* 32F60C E001808C C7BE0080 */  lwc1      $f30, 0x80($sp)
/* 32F610 E0018090 3C02E002 */  lui       $v0, %hi(footprint_init)
/* 32F614 E0018094 244282AC */  addiu     $v0, $v0, %lo(footprint_init)
/* 32F618 E0018098 AFA20018 */  sw        $v0, 0x18($sp)
/* 32F61C E001809C 3C02E002 */  lui       $v0, %hi(footprint_update)
/* 32F620 E00180A0 244282B4 */  addiu     $v0, $v0, %lo(footprint_update)
/* 32F624 E00180A4 AFA2001C */  sw        $v0, 0x1C($sp)
/* 32F628 E00180A8 3C02E002 */  lui       $v0, %hi(footprint_render)
/* 32F62C E00180AC 24428378 */  addiu     $v0, $v0, %lo(footprint_render)
/* 32F630 E00180B0 AFA20020 */  sw        $v0, 0x20($sp)
/* 32F634 E00180B4 2402000C */  addiu     $v0, $zero, 0xC
/* 32F638 E00180B8 AFBF0038 */  sw        $ra, 0x38($sp)
/* 32F63C E00180BC AFB30034 */  sw        $s3, 0x34($sp)
/* 32F640 E00180C0 AFB20030 */  sw        $s2, 0x30($sp)
/* 32F644 E00180C4 AFB1002C */  sw        $s1, 0x2C($sp)
/* 32F648 E00180C8 AFB00028 */  sw        $s0, 0x28($sp)
/* 32F64C E00180CC F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 32F650 E00180D0 F7B80050 */  sdc1      $f24, 0x50($sp)
/* 32F654 E00180D4 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 32F658 E00180D8 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 32F65C E00180DC E7AC0070 */  swc1      $f12, 0x70($sp)
/* 32F660 E00180E0 E7AE0074 */  swc1      $f14, 0x74($sp)
/* 32F664 E00180E4 AFA60078 */  sw        $a2, 0x78($sp)
/* 32F668 E00180E8 AFA00010 */  sw        $zero, 0x10($sp)
/* 32F66C E00180EC AFA00024 */  sw        $zero, 0x24($sp)
/* 32F670 E00180F0 0C080124 */  jal       shim_create_effect_instance
/* 32F674 E00180F4 AFA20014 */   sw       $v0, 0x14($sp)
/* 32F678 E00180F8 24040098 */  addiu     $a0, $zero, 0x98
/* 32F67C E00180FC 24130001 */  addiu     $s3, $zero, 0x1
/* 32F680 E0018100 0040802D */  daddu     $s0, $v0, $zero
/* 32F684 E0018104 0C08012C */  jal       shim_general_heap_malloc
/* 32F688 E0018108 AE130008 */   sw       $s3, 0x8($s0)
/* 32F68C E001810C 0040882D */  daddu     $s1, $v0, $zero
/* 32F690 E0018110 16200003 */  bnez      $s1, .LE0018120
/* 32F694 E0018114 AE11000C */   sw       $s1, 0xC($s0)
.LE0018118:
/* 32F698 E0018118 08006046 */  j         .LE0018118
/* 32F69C E001811C 00000000 */   nop
.LE0018120:
/* 32F6A0 E0018120 0220202D */  daddu     $a0, $s1, $zero
/* 32F6A4 E0018124 00132880 */  sll       $a1, $s3, 2
/* 32F6A8 E0018128 00B32821 */  addu      $a1, $a1, $s3
/* 32F6AC E001812C 00052880 */  sll       $a1, $a1, 2
/* 32F6B0 E0018130 00B32823 */  subu      $a1, $a1, $s3
/* 32F6B4 E0018134 0C080130 */  jal       shim_mem_clear
/* 32F6B8 E0018138 000528C0 */   sll      $a1, $a1, 3
/* 32F6BC E001813C 0000902D */  daddu     $s2, $zero, $zero
/* 32F6C0 E0018140 0253102A */  slt       $v0, $s2, $s3
/* 32F6C4 E0018144 1040004C */  beqz      $v0, .LE0018278
/* 32F6C8 E0018148 26300008 */   addiu    $s0, $s1, 0x8
/* 32F6CC E001814C 3C0141F0 */  lui       $at, (0x41F00000 >> 16)
/* 32F6D0 E0018150 44810000 */  mtc1      $at, $f0
/* 32F6D4 E0018154 00000000 */  nop
/* 32F6D8 E0018158 4600F002 */  mul.s     $f0, $f30, $f0
/* 32F6DC E001815C 00000000 */  nop
/* 32F6E0 E0018160 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 32F6E4 E0018164 4481B000 */  mtc1      $at, $f22
/* 32F6E8 E0018168 4600E000 */  add.s     $f0, $f28, $f0
/* 32F6EC E001816C 3C014170 */  lui       $at, (0x41700000 >> 16)
/* 32F6F0 E0018170 44811000 */  mtc1      $at, $f2
/* 32F6F4 E0018174 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 32F6F8 E0018178 4481C000 */  mtc1      $at, $f24
/* 32F6FC E001817C 46020681 */  sub.s     $f26, $f0, $f2
.LE0018180:
/* 32F700 E0018180 24020001 */  addiu     $v0, $zero, 0x1
/* 32F704 E0018184 AE220000 */  sw        $v0, 0x0($s1)
/* 32F708 E0018188 AE000074 */  sw        $zero, 0x74($s0)
/* 32F70C E001818C C7A60070 */  lwc1      $f6, 0x70($sp)
/* 32F710 E0018190 E6060004 */  swc1      $f6, 0x4($s0)
/* 32F714 E0018194 C7A60074 */  lwc1      $f6, 0x74($sp)
/* 32F718 E0018198 4600E306 */  mov.s     $f12, $f28
/* 32F71C E001819C E6060008 */  swc1      $f6, 0x8($s0)
/* 32F720 E00181A0 C7A60078 */  lwc1      $f6, 0x78($sp)
/* 32F724 E00181A4 240200FF */  addiu     $v0, $zero, 0xFF
/* 32F728 E00181A8 A2020000 */  sb        $v0, 0x0($s0)
/* 32F72C E00181AC 24020064 */  addiu     $v0, $zero, 0x64
/* 32F730 E00181B0 E6160010 */  swc1      $f22, 0x10($s0)
/* 32F734 E00181B4 E6160014 */  swc1      $f22, 0x14($s0)
/* 32F738 E00181B8 E6160018 */  swc1      $f22, 0x18($s0)
/* 32F73C E00181BC AE000068 */  sw        $zero, 0x68($s0)
/* 32F740 E00181C0 AE000078 */  sw        $zero, 0x78($s0)
/* 32F744 E00181C4 AE00007C */  sw        $zero, 0x7C($s0)
/* 32F748 E00181C8 A602FFFE */  sh        $v0, -0x2($s0)
/* 32F74C E00181CC AE00001C */  sw        $zero, 0x1C($s0)
/* 32F750 E00181D0 E61A0020 */  swc1      $f26, 0x20($s0)
/* 32F754 E00181D4 AE000024 */  sw        $zero, 0x24($s0)
/* 32F758 E00181D8 0C08013C */  jal       shim_clamp_angle
/* 32F75C E00181DC E606000C */   swc1     $f6, 0xC($s0)
/* 32F760 E00181E0 46000506 */  mov.s     $f20, $f0
/* 32F764 E00181E4 0C080140 */  jal       shim_sin_deg
/* 32F768 E00181E8 4600A306 */   mov.s    $f12, $f20
/* 32F76C E00181EC 4600A306 */  mov.s     $f12, $f20
/* 32F770 E00181F0 0C080144 */  jal       shim_cos_deg
/* 32F774 E00181F4 E6000088 */   swc1     $f0, 0x88($s0)
/* 32F778 E00181F8 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 32F77C E00181FC 44812000 */  mtc1      $at, $f4
/* 32F780 E0018200 00000000 */  nop
/* 32F784 E0018204 4604F102 */  mul.s     $f4, $f30, $f4
/* 32F788 E0018208 00000000 */  nop
/* 32F78C E001820C 3C014234 */  lui       $at, (0x42340000 >> 16)
/* 32F790 E0018210 44811000 */  mtc1      $at, $f2
/* 32F794 E0018214 00000000 */  nop
/* 32F798 E0018218 4602A500 */  add.s     $f20, $f20, $f2
/* 32F79C E001821C 4604A501 */  sub.s     $f20, $f20, $f4
/* 32F7A0 E0018220 E600008C */  swc1      $f0, 0x8C($s0)
/* 32F7A4 E0018224 0C080140 */  jal       shim_sin_deg
/* 32F7A8 E0018228 4600A306 */   mov.s    $f12, $f20
/* 32F7AC E001822C 46180002 */  mul.s     $f0, $f0, $f24
/* 32F7B0 E0018230 00000000 */  nop
/* 32F7B4 E0018234 C6020004 */  lwc1      $f2, 0x4($s0)
/* 32F7B8 E0018238 46001080 */  add.s     $f2, $f2, $f0
/* 32F7BC E001823C 4600A306 */  mov.s     $f12, $f20
/* 32F7C0 E0018240 0C080144 */  jal       shim_cos_deg
/* 32F7C4 E0018244 E6020004 */   swc1     $f2, 0x4($s0)
/* 32F7C8 E0018248 46180002 */  mul.s     $f0, $f0, $f24
/* 32F7CC E001824C 00000000 */  nop
/* 32F7D0 E0018250 26520001 */  addiu     $s2, $s2, 0x1
/* 32F7D4 E0018254 26310098 */  addiu     $s1, $s1, 0x98
/* 32F7D8 E0018258 C602000C */  lwc1      $f2, 0xC($s0)
/* 32F7DC E001825C 240200C8 */  addiu     $v0, $zero, 0xC8
/* 32F7E0 E0018260 46001080 */  add.s     $f2, $f2, $f0
/* 32F7E4 E0018264 A2020000 */  sb        $v0, 0x0($s0)
/* 32F7E8 E0018268 0253102A */  slt       $v0, $s2, $s3
/* 32F7EC E001826C E602000C */  swc1      $f2, 0xC($s0)
/* 32F7F0 E0018270 1440FFC3 */  bnez      $v0, .LE0018180
/* 32F7F4 E0018274 26100098 */   addiu    $s0, $s0, 0x98
.LE0018278:
/* 32F7F8 E0018278 8FBF0038 */  lw        $ra, 0x38($sp)
/* 32F7FC E001827C 8FB30034 */  lw        $s3, 0x34($sp)
/* 32F800 E0018280 8FB20030 */  lw        $s2, 0x30($sp)
/* 32F804 E0018284 8FB1002C */  lw        $s1, 0x2C($sp)
/* 32F808 E0018288 8FB00028 */  lw        $s0, 0x28($sp)
/* 32F80C E001828C D7BE0068 */  ldc1      $f30, 0x68($sp)
/* 32F810 E0018290 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 32F814 E0018294 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 32F818 E0018298 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 32F81C E001829C D7B60048 */  ldc1      $f22, 0x48($sp)
/* 32F820 E00182A0 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 32F824 E00182A4 03E00008 */  jr        $ra
/* 32F828 E00182A8 27BD0070 */   addiu    $sp, $sp, 0x70

### DECOMPILED C INSTRUCTIONS:

void footprint_main(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) {
    EffectBlueprint bp;
    EffectInstance* effect;
    FootprintFXData* part;
    s32 numParts = 1;
    s32 i;
    f32 temp_f20;
    f32 temp_f20_2;

    bp.unk_00 = 0;
    bp.init = footprint_init;
    bp.update = footprint_update;
    bp.renderWorld = footprint_render;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_FOOTPRINT;

    effect = shim_create_effect_instance(&bp);
    effect->numParts = 1;
    part = shim_general_heap_malloc(numParts * sizeof(*part));
    effect->data.footprint = part;

    ASSERT(effect->data.footprint != NULL);

    shim_mem_clear(part, numParts * sizeof(*part));

    for (i = 0; i < numParts; i++, part++) {
        part->alive = TRUE;
        part->unk_7C = 0;
        part->unk_0C = arg0;
        part->unk_10 = arg1;
        part->unk_14 = arg2;
        part->alpha = 255;
        part->unk_18 = 1.0f;
        part->unk_1C = 1.0f;
        part->unk_20 = 1.0f;
        part->unk_70 = 0;
        part->unk_80 = 0;
        part->unk_84 = 0;
        part->lifetime = 100;
        part->unk_24 = 0.0f;
        part->unk_28 = (arg3 + (arg4 * 30.0f)) - 15.0f;
        part->unk_2C = 0.0f;
        temp_f20 = shim_clamp_angle(arg3);
        part->unk_90 = shim_sin_deg(temp_f20);
        part->unk_94 = shim_cos_deg(temp_f20);
        temp_f20_2 = (temp_f20 + 45.0f) - (arg4 * 180.0f);
        part->unk_0C += shim_sin_deg(temp_f20_2) * 5.0f;
        part->unk_14 += shim_cos_deg(temp_f20_2) * 5.0f;
        part->alpha = 200;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel osMotorInit
/* 43344 80067F44 27BDFF88 */  addiu     $sp, $sp, -0x78
/* 43348 80067F48 AFB00060 */  sw        $s0, 0x60($sp)
/* 4334C 80067F4C 00808021 */  addu      $s0, $a0, $zero
/* 43350 80067F50 AFB20068 */  sw        $s2, 0x68($sp)
/* 43354 80067F54 00A09021 */  addu      $s2, $a1, $zero
/* 43358 80067F58 AFB10064 */  sw        $s1, 0x64($sp)
/* 4335C 80067F5C 00C08821 */  addu      $s1, $a2, $zero
/* 43360 80067F60 02402021 */  addu      $a0, $s2, $zero
/* 43364 80067F64 240500FE */  addiu     $a1, $zero, 0xFE
/* 43368 80067F68 240200FF */  addiu     $v0, $zero, 0xFF
/* 4336C 80067F6C AFBF0070 */  sw        $ra, 0x70($sp)
/* 43370 80067F70 AFB3006C */  sw        $s3, 0x6C($sp)
/* 43374 80067F74 AE500004 */  sw        $s0, 0x4($s2)
/* 43378 80067F78 AE510008 */  sw        $s1, 0x8($s2)
/* 4337C 80067F7C A2420065 */  sb        $v0, 0x65($s2)
/* 43380 80067F80 0C01A5B4 */  jal       __osPfsSelectBank
/* 43384 80067F84 AE400000 */   sw       $zero, 0x0($s2)
/* 43388 80067F88 24130002 */  addiu     $s3, $zero, 0x2
/* 4338C 80067F8C 14530003 */  bne       $v0, $s3, .L80067F9C
/* 43390 80067F90 02402021 */   addu     $a0, $s2, $zero
/* 43394 80067F94 0C01A5B4 */  jal       __osPfsSelectBank
/* 43398 80067F98 24050080 */   addiu    $a1, $zero, 0x80
.L80067F9C:
/* 4339C 80067F9C 14400074 */  bnez      $v0, .L80068170
/* 433A0 80067FA0 02002021 */   addu     $a0, $s0, $zero
/* 433A4 80067FA4 02202821 */  addu      $a1, $s1, $zero
/* 433A8 80067FA8 24060400 */  addiu     $a2, $zero, 0x400
/* 433AC 80067FAC 0C01A874 */  jal       __osContRamRead
/* 433B0 80067FB0 27A70010 */   addiu    $a3, $sp, 0x10
/* 433B4 80067FB4 50530001 */  beql      $v0, $s3, .L80067FBC
/* 433B8 80067FB8 24020004 */   addiu    $v0, $zero, 0x4
.L80067FBC:
/* 433BC 80067FBC 1440006C */  bnez      $v0, .L80068170
/* 433C0 80067FC0 00000000 */   nop
/* 433C4 80067FC4 93A3002F */  lbu       $v1, 0x2F($sp)
/* 433C8 80067FC8 240200FE */  addiu     $v0, $zero, 0xFE
/* 433CC 80067FCC 10620013 */  beq       $v1, $v0, .L8006801C
/* 433D0 80067FD0 02402021 */   addu     $a0, $s2, $zero
/* 433D4 80067FD4 0C01A5B4 */  jal       __osPfsSelectBank
/* 433D8 80067FD8 24050080 */   addiu    $a1, $zero, 0x80
/* 433DC 80067FDC 50530001 */  beql      $v0, $s3, .L80067FE4
/* 433E0 80067FE0 24020004 */   addiu    $v0, $zero, 0x4
.L80067FE4:
/* 433E4 80067FE4 14400062 */  bnez      $v0, .L80068170
/* 433E8 80067FE8 02002021 */   addu     $a0, $s0, $zero
/* 433EC 80067FEC 02202821 */  addu      $a1, $s1, $zero
/* 433F0 80067FF0 24060400 */  addiu     $a2, $zero, 0x400
/* 433F4 80067FF4 0C01A874 */  jal       __osContRamRead
/* 433F8 80067FF8 27A70010 */   addiu    $a3, $sp, 0x10
/* 433FC 80067FFC 50530001 */  beql      $v0, $s3, .L80068004
/* 43400 80068000 24020004 */   addiu    $v0, $zero, 0x4
.L80068004:
/* 43404 80068004 1440005A */  bnez      $v0, .L80068170
/* 43408 80068008 00000000 */   nop
/* 4340C 8006800C 93A3002F */  lbu       $v1, 0x2F($sp)
/* 43410 80068010 24020080 */  addiu     $v0, $zero, 0x80
/* 43414 80068014 10620003 */  beq       $v1, $v0, .L80068024
/* 43418 80068018 00000000 */   nop
.L8006801C:
/* 4341C 8006801C 0801A05C */  j         .L80068170
/* 43420 80068020 2402000B */   addiu    $v0, $zero, 0xB
.L80068024:
/* 43424 80068024 8E420000 */  lw        $v0, 0x0($s2)
/* 43428 80068028 30420008 */  andi      $v0, $v0, 0x8
/* 4342C 8006802C 1440004E */  bnez      $v0, .L80068168
/* 43430 80068030 24020008 */   addiu    $v0, $zero, 0x8
/* 43434 80068034 00111980 */  sll       $v1, $s1, 6
/* 43438 80068038 3C02800B */  lui       $v0, %hi(__MotorDataBuf)
/* 4343C 8006803C 24420B30 */  addiu     $v0, $v0, %lo(__MotorDataBuf)
/* 43440 80068040 00628021 */  addu      $s0, $v1, $v0
/* 43444 80068044 24040600 */  addiu     $a0, $zero, 0x600
/* 43448 80068048 240200FF */  addiu     $v0, $zero, 0xFF
/* 4344C 8006804C A3A20030 */  sb        $v0, 0x30($sp)
/* 43450 80068050 24020023 */  addiu     $v0, $zero, 0x23
/* 43454 80068054 A3A20031 */  sb        $v0, 0x31($sp)
/* 43458 80068058 24020001 */  addiu     $v0, $zero, 0x1
/* 4345C 8006805C A3A20032 */  sb        $v0, 0x32($sp)
/* 43460 80068060 24020003 */  addiu     $v0, $zero, 0x3
/* 43464 80068064 A3A20033 */  sb        $v0, 0x33($sp)
/* 43468 80068068 240200C0 */  addiu     $v0, $zero, 0xC0
/* 4346C 8006806C 0C01B218 */  jal       __osContAddressCrc
/* 43470 80068070 A3A20034 */   sb       $v0, 0x34($sp)
/* 43474 80068074 12200008 */  beqz      $s1, .L80068098
/* 43478 80068078 A3A20035 */   sb       $v0, 0x35($sp)
/* 4347C 8006807C 1A200006 */  blez      $s1, .L80068098
/* 43480 80068080 00001821 */   addu     $v1, $zero, $zero
.L80068084:
/* 43484 80068084 A2000000 */  sb        $zero, 0x0($s0)
/* 43488 80068088 24630001 */  addiu     $v1, $v1, 0x1
/* 4348C 8006808C 0071102A */  slt       $v0, $v1, $s1
/* 43490 80068090 1440FFFC */  bnez      $v0, .L80068084
/* 43494 80068094 26100001 */   addiu    $s0, $s0, 0x1
.L80068098:
/* 43498 80068098 27A60030 */  addiu     $a2, $sp, 0x30
/* 4349C 8006809C 00D01025 */  or        $v0, $a2, $s0
/* 434A0 800680A0 30420003 */  andi      $v0, $v0, 0x3
/* 434A4 800680A4 10400017 */  beqz      $v0, .L80068104
/* 434A8 800680A8 02003821 */   addu     $a3, $s0, $zero
/* 434AC 800680AC 27A80050 */  addiu     $t0, $sp, 0x50
.L800680B0:
/* 434B0 800680B0 88C20000 */  lwl       $v0, 0x0($a2)
/* 434B4 800680B4 98C20003 */  lwr       $v0, 0x3($a2)
/* 434B8 800680B8 88C30004 */  lwl       $v1, 0x4($a2)
/* 434BC 800680BC 98C30007 */  lwr       $v1, 0x7($a2)
/* 434C0 800680C0 88C40008 */  lwl       $a0, 0x8($a2)
/* 434C4 800680C4 98C4000B */  lwr       $a0, 0xB($a2)
/* 434C8 800680C8 88C5000C */  lwl       $a1, 0xC($a2)
/* 434CC 800680CC 98C5000F */  lwr       $a1, 0xF($a2)
/* 434D0 800680D0 A8E20000 */  swl       $v0, 0x0($a3)
/* 434D4 800680D4 B8E20003 */  swr       $v0, 0x3($a3)
/* 434D8 800680D8 A8E30004 */  swl       $v1, 0x4($a3)
/* 434DC 800680DC B8E30007 */  swr       $v1, 0x7($a3)
/* 434E0 800680E0 A8E40008 */  swl       $a0, 0x8($a3)
/* 434E4 800680E4 B8E4000B */  swr       $a0, 0xB($a3)
/* 434E8 800680E8 A8E5000C */  swl       $a1, 0xC($a3)
/* 434EC 800680EC B8E5000F */  swr       $a1, 0xF($a3)
/* 434F0 800680F0 24C60010 */  addiu     $a2, $a2, 0x10
/* 434F4 800680F4 14C8FFEE */  bne       $a2, $t0, .L800680B0
/* 434F8 800680F8 24E70010 */   addiu    $a3, $a3, 0x10
/* 434FC 800680FC 0801A04D */  j         .L80068134
/* 43500 80068100 00000000 */   nop
.L80068104:
/* 43504 80068104 27A80050 */  addiu     $t0, $sp, 0x50
.L80068108:
/* 43508 80068108 8CC20000 */  lw        $v0, 0x0($a2)
/* 4350C 8006810C 8CC30004 */  lw        $v1, 0x4($a2)
/* 43510 80068110 8CC40008 */  lw        $a0, 0x8($a2)
/* 43514 80068114 8CC5000C */  lw        $a1, 0xC($a2)
/* 43518 80068118 ACE20000 */  sw        $v0, 0x0($a3)
/* 4351C 8006811C ACE30004 */  sw        $v1, 0x4($a3)
/* 43520 80068120 ACE40008 */  sw        $a0, 0x8($a3)
/* 43524 80068124 ACE5000C */  sw        $a1, 0xC($a3)
/* 43528 80068128 24C60010 */  addiu     $a2, $a2, 0x10
/* 4352C 8006812C 14C8FFF6 */  bne       $a2, $t0, .L80068108
/* 43530 80068130 24E70010 */   addiu    $a3, $a3, 0x10
.L80068134:
/* 43534 80068134 88C20000 */  lwl       $v0, 0x0($a2)
/* 43538 80068138 98C20003 */  lwr       $v0, 0x3($a2)
/* 4353C 8006813C 80C30004 */  lb        $v1, 0x4($a2)
/* 43540 80068140 80C40005 */  lb        $a0, 0x5($a2)
/* 43544 80068144 80C50006 */  lb        $a1, 0x6($a2)
/* 43548 80068148 A8E20000 */  swl       $v0, 0x0($a3)
/* 4354C 8006814C B8E20003 */  swr       $v0, 0x3($a3)
/* 43550 80068150 A0E30004 */  sb        $v1, 0x4($a3)
/* 43554 80068154 A0E40005 */  sb        $a0, 0x5($a3)
/* 43558 80068158 A0E50006 */  sb        $a1, 0x6($a3)
/* 4355C 8006815C 240200FE */  addiu     $v0, $zero, 0xFE
/* 43560 80068160 A2020027 */  sb        $v0, 0x27($s0)
/* 43564 80068164 24020008 */  addiu     $v0, $zero, 0x8
.L80068168:
/* 43568 80068168 AE420000 */  sw        $v0, 0x0($s2)
/* 4356C 8006816C 00001021 */  addu      $v0, $zero, $zero
.L80068170:
/* 43570 80068170 8FBF0070 */  lw        $ra, 0x70($sp)
/* 43574 80068174 8FB3006C */  lw        $s3, 0x6C($sp)
/* 43578 80068178 8FB20068 */  lw        $s2, 0x68($sp)
/* 4357C 8006817C 8FB10064 */  lw        $s1, 0x64($sp)
/* 43580 80068180 8FB00060 */  lw        $s0, 0x60($sp)
/* 43584 80068184 03E00008 */  jr        $ra
/* 43588 80068188 27BD0078 */   addiu    $sp, $sp, 0x78
/* 4358C 8006818C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

s32 osMotorInit(OSMesgQueue *mq, OSPfs *pfs, int channel) {
    s32 ret;
    u8 temp[32];

    pfs->queue = mq;
    pfs->channel = channel;
    pfs->activebank = 0xFF;
    pfs->status = 0;

    ret = __osPfsSelectBank(pfs, 0xFE);

    if (ret == PFS_ERR_NEW_PACK) {
        ret = __osPfsSelectBank(pfs, 0x80);
    }

    if (ret != 0) {
        return ret;
    }

    ret = __osContRamRead(mq, channel, CONT_BLOCK_DETECT, temp);

    if (ret == PFS_ERR_NEW_PACK) {
        ret = PFS_ERR_CONTRFAIL;
    }

    if (ret != 0) {
        return ret;
    }

    if (temp[31] == 254) {
        return PFS_ERR_DEVICE;
    }

    ret = __osPfsSelectBank(pfs, 0x80);
    if (ret == PFS_ERR_NEW_PACK) {
        ret = PFS_ERR_CONTRFAIL;
    }

    if (ret != 0) {
        return ret;
    }

    ret = __osContRamRead(mq, channel, CONT_BLOCK_DETECT, temp);
    if (ret == PFS_ERR_NEW_PACK) {
        ret = PFS_ERR_CONTRFAIL;
    }

    if (ret != 0) {
        return ret;
    }

    if (temp[31] != 0x80) {
        return PFS_ERR_DEVICE;
    }

    if (!(pfs->status & PFS_MOTOR_INITIALIZED)) {
        _MakeMotorData(channel, &__MotorDataBuf[channel]);
    }

    pfs->status = PFS_MOTOR_INITIALIZED;
    return 0;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel clear_player_data
/* 80850 800E73A0 0000182D */  daddu     $v1, $zero, $zero
/* 80854 800E73A4 3C048011 */  lui       $a0, %hi(gPlayerData)
/* 80858 800E73A8 2484F290 */  addiu     $a0, $a0, %lo(gPlayerData)
/* 8085C 800E73AC 0080282D */  daddu     $a1, $a0, $zero
/* 80860 800E73B0 2402FFFF */  addiu     $v0, $zero, -0x1
/* 80864 800E73B4 3C018011 */  lui       $at, %hi(D_8010CD10)
/* 80868 800E73B8 A420CD10 */  sh        $zero, %lo(D_8010CD10)($at)
/* 8086C 800E73BC 3C018011 */  lui       $at, %hi(D_8010CD12)
/* 80870 800E73C0 A420CD12 */  sh        $zero, %lo(D_8010CD12)($at)
/* 80874 800E73C4 A0820001 */  sb        $v0, 0x1($a0)
/* 80878 800E73C8 2402000A */  addiu     $v0, $zero, 0xA
/* 8087C 800E73CC A0820002 */  sb        $v0, 0x2($a0)
/* 80880 800E73D0 A0820003 */  sb        $v0, 0x3($a0)
/* 80884 800E73D4 A0820004 */  sb        $v0, 0x4($a0)
/* 80888 800E73D8 24020005 */  addiu     $v0, $zero, 0x5
/* 8088C 800E73DC A0820005 */  sb        $v0, 0x5($a0)
/* 80890 800E73E0 A0820006 */  sb        $v0, 0x6($a0)
/* 80894 800E73E4 A0820007 */  sb        $v0, 0x7($a0)
/* 80898 800E73E8 24020003 */  addiu     $v0, $zero, 0x3
/* 8089C 800E73EC A0820008 */  sb        $v0, 0x8($a0)
/* 808A0 800E73F0 24020001 */  addiu     $v0, $zero, 0x1
/* 808A4 800E73F4 A0820009 */  sb        $v0, 0x9($a0)
/* 808A8 800E73F8 2402FFFF */  addiu     $v0, $zero, -0x1
/* 808AC 800E73FC A0800000 */  sb        $zero, 0x0($a0)
/* 808B0 800E7400 A080000A */  sb        $zero, 0xA($a0)
/* 808B4 800E7404 A480000C */  sh        $zero, 0xC($a0)
/* 808B8 800E7408 A080000E */  sb        $zero, 0xE($a0)
/* 808BC 800E740C A080000F */  sb        $zero, 0xF($a0)
/* 808C0 800E7410 A0800010 */  sb        $zero, 0x10($a0)
/* 808C4 800E7414 A0800011 */  sb        $zero, 0x11($a0)
/* 808C8 800E7418 A0800288 */  sb        $zero, 0x288($a0)
/* 808CC 800E741C A0800289 */  sb        $zero, 0x289($a0)
/* 808D0 800E7420 A080028A */  sb        $zero, 0x28A($a0)
/* 808D4 800E7424 A482028C */  sh        $v0, 0x28C($a0)
/* 808D8 800E7428 A080028E */  sb        $zero, 0x28E($a0)
/* 808DC 800E742C A4800290 */  sh        $zero, 0x290($a0)
/* 808E0 800E7430 A0800292 */  sb        $zero, 0x292($a0)
/* 808E4 800E7434 A0800012 */  sb        $zero, 0x12($a0)
.L800E7438:
/* 808E8 800E7438 A0A00014 */  sb        $zero, 0x14($a1)
/* 808EC 800E743C A0A00015 */  sb        $zero, 0x15($a1)
/* 808F0 800E7440 A4A00016 */  sh        $zero, 0x16($a1)
/* 808F4 800E7444 A4A00018 */  sh        $zero, 0x18($a1)
/* 808F8 800E7448 A4A0001A */  sh        $zero, 0x1A($a1)
/* 808FC 800E744C 24630001 */  addiu     $v1, $v1, 0x1
/* 80900 800E7450 2862000C */  slti      $v0, $v1, 0xC
/* 80904 800E7454 1440FFF8 */  bnez      $v0, .L800E7438
/* 80908 800E7458 24A50008 */   addiu    $a1, $a1, 0x8
/* 8090C 800E745C 2403001F */  addiu     $v1, $zero, 0x1F
/* 80910 800E7460 2482003E */  addiu     $v0, $a0, 0x3E
.L800E7464:
/* 80914 800E7464 A4400074 */  sh        $zero, 0x74($v0)
/* 80918 800E7468 2463FFFF */  addiu     $v1, $v1, -0x1
/* 8091C 800E746C 0461FFFD */  bgez      $v1, .L800E7464
/* 80920 800E7470 2442FFFE */   addiu    $v0, $v0, -0x2
/* 80924 800E7474 2403007F */  addiu     $v1, $zero, 0x7F
/* 80928 800E7478 248200FE */  addiu     $v0, $a0, 0xFE
.L800E747C:
/* 8092C 800E747C A44000B4 */  sh        $zero, 0xB4($v0)
/* 80930 800E7480 2463FFFF */  addiu     $v1, $v1, -0x1
/* 80934 800E7484 0461FFFD */  bgez      $v1, .L800E747C
/* 80938 800E7488 2442FFFE */   addiu    $v0, $v0, -0x2
/* 8093C 800E748C 24030009 */  addiu     $v1, $zero, 0x9
/* 80940 800E7490 24820012 */  addiu     $v0, $a0, 0x12
.L800E7494:
/* 80944 800E7494 A44001B4 */  sh        $zero, 0x1B4($v0)
/* 80948 800E7498 2463FFFF */  addiu     $v1, $v1, -0x1
/* 8094C 800E749C 0461FFFD */  bgez      $v1, .L800E7494
/* 80950 800E74A0 2442FFFE */   addiu    $v0, $v0, -0x2
/* 80954 800E74A4 2403003F */  addiu     $v1, $zero, 0x3F
/* 80958 800E74A8 2482007E */  addiu     $v0, $a0, 0x7E
.L800E74AC:
/* 8095C 800E74AC A4400208 */  sh        $zero, 0x208($v0)
/* 80960 800E74B0 2463FFFF */  addiu     $v1, $v1, -0x1
/* 80964 800E74B4 0461FFFD */  bgez      $v1, .L800E74AC
/* 80968 800E74B8 2442FFFE */   addiu    $v0, $v0, -0x2
/* 8096C 800E74BC 2403001F */  addiu     $v1, $zero, 0x1F
/* 80970 800E74C0 2482003E */  addiu     $v0, $a0, 0x3E
.L800E74C4:
/* 80974 800E74C4 A44001C8 */  sh        $zero, 0x1C8($v0)
/* 80978 800E74C8 2463FFFF */  addiu     $v1, $v1, -0x1
/* 8097C 800E74CC 0461FFFD */  bgez      $v1, .L800E74C4
/* 80980 800E74D0 2442FFFE */   addiu    $v0, $v0, -0x2
/* 80984 800E74D4 0000182D */  daddu     $v1, $zero, $zero
/* 80988 800E74D8 0080282D */  daddu     $a1, $a0, $zero
/* 8098C 800E74DC A4800294 */  sh        $zero, 0x294($a0)
/* 80990 800E74E0 A4800296 */  sh        $zero, 0x296($a0)
/* 80994 800E74E4 A4800298 */  sh        $zero, 0x298($a0)
/* 80998 800E74E8 A480029A */  sh        $zero, 0x29A($a0)
/* 8099C 800E74EC A480029C */  sh        $zero, 0x29C($a0)
/* 809A0 800E74F0 A480029E */  sh        $zero, 0x29E($a0)
/* 809A4 800E74F4 A48002A0 */  sh        $zero, 0x2A0($a0)
/* 809A8 800E74F8 A48002A2 */  sh        $zero, 0x2A2($a0)
/* 809AC 800E74FC A48002A4 */  sh        $zero, 0x2A4($a0)
/* 809B0 800E7500 A48002A6 */  sh        $zero, 0x2A6($a0)
/* 809B4 800E7504 A48002A8 */  sh        $zero, 0x2A8($a0)
/* 809B8 800E7508 A48002AA */  sh        $zero, 0x2AA($a0)
/* 809BC 800E750C AC8002AC */  sw        $zero, 0x2AC($a0)
/* 809C0 800E7510 AC8002B0 */  sw        $zero, 0x2B0($a0)
/* 809C4 800E7514 A48002B8 */  sh        $zero, 0x2B8($a0)
/* 809C8 800E7518 AC8002B4 */  sw        $zero, 0x2B4($a0)
/* 809CC 800E751C AC8002BC */  sw        $zero, 0x2BC($a0)
/* 809D0 800E7520 A48002C0 */  sh        $zero, 0x2C0($a0)
/* 809D4 800E7524 A48002C2 */  sh        $zero, 0x2C2($a0)
.L800E7528:
/* 809D8 800E7528 ACA002C4 */  sw        $zero, 0x2C4($a1)
/* 809DC 800E752C ACA002F4 */  sw        $zero, 0x2F4($a1)
/* 809E0 800E7530 24630001 */  addiu     $v1, $v1, 0x1
/* 809E4 800E7534 2862000C */  slti      $v0, $v1, 0xC
/* 809E8 800E7538 1440FFFB */  bnez      $v0, .L800E7528
/* 809EC 800E753C 24A50004 */   addiu    $a1, $a1, 0x4
/* 809F0 800E7540 AC800328 */  sw        $zero, 0x328($a0)
/* 809F4 800E7544 A480032C */  sh        $zero, 0x32C($a0)
/* 809F8 800E7548 A480032E */  sh        $zero, 0x32E($a0)
/* 809FC 800E754C AC800330 */  sw        $zero, 0x330($a0)
/* 80A00 800E7550 A4800334 */  sh        $zero, 0x334($a0)
/* 80A04 800E7554 A4800336 */  sh        $zero, 0x336($a0)
/* 80A08 800E7558 AC800338 */  sw        $zero, 0x338($a0)
/* 80A0C 800E755C 03E00008 */  jr        $ra
/* 80A10 800E7560 A480033C */   sh       $zero, 0x33C($a0)

### DECOMPILED C INSTRUCTIONS:

void clear_player_data(void) {
    PlayerData* playerData = &gPlayerData;
    s32 i;

    D_8010CD10 = 0;
    D_8010CD12 = 0;

    playerData->hammerLevel = -1;
    playerData->curHP = 10;
    playerData->curMaxHP = 10;
    playerData->hardMaxHP = 10;
    playerData->curFP = 5;
    playerData->curMaxFP = 5;
    playerData->hardMaxFP = 5;
    playerData->maxBP = 3;
    playerData->level = 1;
    playerData->bootsLevel = 0;
    playerData->hasActionCommands = FALSE;
    playerData->coins = 0;
    playerData->fortressKeyCount = 0;
    playerData->starPieces = 0;
    playerData->starPoints = 0;
    playerData->unk_11 = 0;
    playerData->unk_288 = 0;
    playerData->merleeSpellType = MERLEE_SPELL_0;
    playerData->merleeCastsLeft = 0;
    playerData->merleeTurnCount = -1;
    playerData->maxStarPower = 0;
    playerData->specialBarsFilled = 0;
    playerData->starBeamLevel = 0;
    playerData->currentPartner = 0;

    for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) {
        playerData->partners[i].enabled = FALSE;
        playerData->partners[i].level = 0;
        playerData->partners[i].unk_02[0] = 0;
        playerData->partners[i].unk_02[1] = 0;
        playerData->partners[i].unk_02[2] = 0;
    }

    for (i = 0; i < ARRAY_COUNT(playerData->keyItems); i++) {
        playerData->keyItems[i] = ITEM_NONE;
    }

    for (i = 0; i < ARRAY_COUNT(playerData->badges); i++) {
        playerData->badges[i] = ITEM_NONE;
    }

    for (i = 0; i < ARRAY_COUNT(playerData->invItems); i++) {
        playerData->invItems[i] = ITEM_NONE;
    }

    for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) {
        playerData->equippedBadges[i] = ITEM_NONE;
    }

    for (i = 0; i < ARRAY_COUNT(playerData->storedItems); i++) {
        playerData->storedItems[i] = ITEM_NONE;
    }

    playerData->actionCommandAttempts = 0;
    playerData->actionCommandSuccesses = 0;
    playerData->hitsTaken = 0;
    playerData->hitsBlocked = 0;
    playerData->playerFirstStrikes = 0;
    playerData->enemyFirstStrikes = 0;
    playerData->powerBounces = 0;
    playerData->battlesCount = 0;
    playerData->battlesWon = 0;
    playerData->unk_2A6 = 0;
    playerData->battlesFled = 0;
    playerData->trainingsDone = 0;
    playerData->walkingStepsTaken = 0;
    playerData->runningStepsTaken = 0;
    playerData->idleFrameCounter = 0;
    playerData->totalCoinsEarned = 0;
    playerData->frameCounter = 0;
    playerData->quizzesAnswered = 0;
    playerData->quizzesCorrect = 0;

    for (i = 0; i < ARRAY_COUNT(playerData->partnerUnlockedTime); i++) {
        playerData->partnerUnlockedTime[i] = 0;
        playerData->partnerUsedTime[i] = 0;
    }

    playerData->droTreeHintTime = 0;
    playerData->starPiecesCollected = 0;
    playerData->jumpGamePlays = 0;
    playerData->jumpGameTotal = 0;
    playerData->jumpGameRecord = 0;
    playerData->smashGamePlays = 0;
    playerData->smashGameTotal = 0;
    playerData->smashGameRecord = 0;
}