### RAW ASSEMBLY INSTRUCTIONS:

glabel peach_disguise_check_overlaps
/* 7FB74 800E66C4 27BDFFA0 */  addiu     $sp, $sp, -0x60
/* 7FB78 800E66C8 AFB20040 */  sw        $s2, 0x40($sp)
/* 7FB7C 800E66CC 3C128011 */  lui       $s2, %hi(gPlayerStatus)
/* 7FB80 800E66D0 2652EFC8 */  addiu     $s2, $s2, %lo(gPlayerStatus)
/* 7FB84 800E66D4 3C04800B */  lui       $a0, %hi(gCameras)
/* 7FB88 800E66D8 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
/* 7FB8C 800E66DC AFBF0048 */  sw        $ra, 0x48($sp)
/* 7FB90 800E66E0 AFB30044 */  sw        $s3, 0x44($sp)
/* 7FB94 800E66E4 AFB1003C */  sw        $s1, 0x3C($sp)
/* 7FB98 800E66E8 AFB00038 */  sw        $s0, 0x38($sp)
/* 7FB9C 800E66EC F7B60058 */  sdc1      $f22, 0x58($sp)
/* 7FBA0 800E66F0 F7B40050 */  sdc1      $f20, 0x50($sp)
/* 7FBA4 800E66F4 C64400A8 */  lwc1      $f4, 0xA8($s2)
/* 7FBA8 800E66F8 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 7FBAC 800E66FC 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 7FBB0 800E6700 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 7FBB4 800E6704 44810000 */  mtc1      $at, $f0
/* 7FBB8 800E6708 00031080 */  sll       $v0, $v1, 2
/* 7FBBC 800E670C 00431021 */  addu      $v0, $v0, $v1
/* 7FBC0 800E6710 00021080 */  sll       $v0, $v0, 2
/* 7FBC4 800E6714 00431023 */  subu      $v0, $v0, $v1
/* 7FBC8 800E6718 000218C0 */  sll       $v1, $v0, 3
/* 7FBCC 800E671C 00431021 */  addu      $v0, $v0, $v1
/* 7FBD0 800E6720 000210C0 */  sll       $v0, $v0, 3
/* 7FBD4 800E6724 4604003E */  c.le.s    $f0, $f4
/* 7FBD8 800E6728 00000000 */  nop
/* 7FBDC 800E672C 4500000B */  bc1f      .L800E675C
/* 7FBE0 800E6730 00441021 */   addu     $v0, $v0, $a0
/* 7FBE4 800E6734 3C014387 */  lui       $at, (0x43870000 >> 16)
/* 7FBE8 800E6738 44811000 */  mtc1      $at, $f2
/* 7FBEC 800E673C 00000000 */  nop
/* 7FBF0 800E6740 4602203C */  c.lt.s    $f4, $f2
/* 7FBF4 800E6744 00000000 */  nop
/* 7FBF8 800E6748 45000004 */  bc1f      .L800E675C
/* 7FBFC 800E674C 00000000 */   nop
/* 7FC00 800E6750 C440006C */  lwc1      $f0, 0x6C($v0)
/* 7FC04 800E6754 080399DC */  j         .L800E6770
/* 7FC08 800E6758 46020501 */   sub.s    $f20, $f0, $f2
.L800E675C:
/* 7FC0C 800E675C C442006C */  lwc1      $f2, 0x6C($v0)
/* 7FC10 800E6760 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 7FC14 800E6764 44810000 */  mtc1      $at, $f0
/* 7FC18 800E6768 00000000 */  nop
/* 7FC1C 800E676C 46001501 */  sub.s     $f20, $f2, $f0
.L800E6770:
/* 7FC20 800E6770 0C00A6C9 */  jal       clamp_angle
/* 7FC24 800E6774 4600A306 */   mov.s    $f12, $f20
/* 7FC28 800E6778 27A50020 */  addiu     $a1, $sp, 0x20
/* 7FC2C 800E677C 27A60024 */  addiu     $a2, $sp, 0x24
/* 7FC30 800E6780 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 7FC34 800E6784 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 7FC38 800E6788 44811000 */  mtc1      $at, $f2
/* 7FC3C 800E678C 24110002 */  addiu     $s1, $zero, 0x2
/* 7FC40 800E6790 46020002 */  mul.s     $f0, $f0, $f2
/* 7FC44 800E6794 00000000 */  nop
/* 7FC48 800E6798 0220802D */  daddu     $s0, $s1, $zero
/* 7FC4C 800E679C 27B30030 */  addiu     $s3, $sp, 0x30
/* 7FC50 800E67A0 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 7FC54 800E67A4 44816000 */  mtc1      $at, $f12
/* 7FC58 800E67A8 3C014080 */  lui       $at, (0x40800000 >> 16)
/* 7FC5C 800E67AC 4481B000 */  mtc1      $at, $f22
/* 7FC60 800E67B0 0C00A82D */  jal       sin_cos_rad
/* 7FC64 800E67B4 460C0303 */   div.s    $f12, $f0, $f12
.L800E67B8:
/* 7FC68 800E67B8 C7A00020 */  lwc1      $f0, 0x20($sp)
/* 7FC6C 800E67BC 44911000 */  mtc1      $s1, $f2
/* 7FC70 800E67C0 00000000 */  nop
/* 7FC74 800E67C4 468010A0 */  cvt.s.w   $f2, $f2
/* 7FC78 800E67C8 46020002 */  mul.s     $f0, $f0, $f2
/* 7FC7C 800E67CC 00000000 */  nop
/* 7FC80 800E67D0 C7A40024 */  lwc1      $f4, 0x24($sp)
/* 7FC84 800E67D4 46022102 */  mul.s     $f4, $f4, $f2
/* 7FC88 800E67D8 00000000 */  nop
/* 7FC8C 800E67DC 0240282D */  daddu     $a1, $s2, $zero
/* 7FC90 800E67E0 C642002C */  lwc1      $f2, 0x2C($s2)
/* 7FC94 800E67E4 27A60028 */  addiu     $a2, $sp, 0x28
/* 7FC98 800E67E8 46161080 */  add.s     $f2, $f2, $f22
/* 7FC9C 800E67EC C6460028 */  lwc1      $f6, 0x28($s2)
/* 7FCA0 800E67F0 24040003 */  addiu     $a0, $zero, 0x3
/* 7FCA4 800E67F4 46003180 */  add.s     $f6, $f6, $f0
/* 7FCA8 800E67F8 C6400030 */  lwc1      $f0, 0x30($s2)
/* 7FCAC 800E67FC 27A7002C */  addiu     $a3, $sp, 0x2C
/* 7FCB0 800E6800 46040001 */  sub.s     $f0, $f0, $f4
/* 7FCB4 800E6804 E7A2002C */  swc1      $f2, 0x2C($sp)
/* 7FCB8 800E6808 E7A60028 */  swc1      $f6, 0x28($sp)
/* 7FCBC 800E680C E7A00030 */  swc1      $f0, 0x30($sp)
/* 7FCC0 800E6810 AFB30010 */  sw        $s3, 0x10($sp)
/* 7FCC4 800E6814 E7B60014 */  swc1      $f22, 0x14($sp)
/* 7FCC8 800E6818 0C037B01 */  jal       player_test_lateral_overlap
/* 7FCCC 800E681C E7B40018 */   swc1     $f20, 0x18($sp)
/* 7FCD0 800E6820 04410003 */  bgez      $v0, .L800E6830
/* 7FCD4 800E6824 2610FFFF */   addiu    $s0, $s0, -0x1
/* 7FCD8 800E6828 1E00FFE3 */  bgtz      $s0, .L800E67B8
/* 7FCDC 800E682C 26310012 */   addiu    $s1, $s1, 0x12
.L800E6830:
/* 7FCE0 800E6830 8FBF0048 */  lw        $ra, 0x48($sp)
/* 7FCE4 800E6834 8FB30044 */  lw        $s3, 0x44($sp)
/* 7FCE8 800E6838 8FB20040 */  lw        $s2, 0x40($sp)
/* 7FCEC 800E683C 8FB1003C */  lw        $s1, 0x3C($sp)
/* 7FCF0 800E6840 8FB00038 */  lw        $s0, 0x38($sp)
/* 7FCF4 800E6844 D7B60058 */  ldc1      $f22, 0x58($sp)
/* 7FCF8 800E6848 D7B40050 */  ldc1      $f20, 0x50($sp)
/* 7FCFC 800E684C 03E00008 */  jr        $ra
/* 7FD00 800E6850 27BD0060 */   addiu    $sp, $sp, 0x60
/* 7FD04 800E6854 00000000 */  nop
/* 7FD08 800E6858 00000000 */  nop
/* 7FD0C 800E685C 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

s32 peach_disguise_check_overlaps(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    Camera* camera = &gCameras[gCurrentCameraID];
    f32 yaw, dx, dy;
    s32 radius;
    s32 hitID;
    s32 i;

    if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) {
        yaw = camera->currentYaw - 270.0f;
    } else {
        yaw = camera->currentYaw - 90.0f;
    }
    sin_cos_rad(DEG_TO_RAD(clamp_angle(yaw)), &dx, &dy);

    for (radius = 2, i = 2; i > 0; radius += 18, i--) {
        f32 x = playerStatus->position.x + (dx * radius);
        f32 y = playerStatus->position.y + 4.0f;
        f32 z = playerStatus->position.z - (dy * radius);
        hitID = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw);
        if (hitID >= 0) {
            break;
        }
    }

    return hitID;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel test_item_entity_position
/* CA6C8 80133FC8 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* CA6CC 80133FCC F7B80038 */  sdc1      $f24, 0x38($sp)
/* CA6D0 80133FD0 4486C000 */  mtc1      $a2, $f24
/* CA6D4 80133FD4 F7BA0040 */  sdc1      $f26, 0x40($sp)
/* CA6D8 80133FD8 4487D000 */  mtc1      $a3, $f26
/* CA6DC 80133FDC F7B40028 */  sdc1      $f20, 0x28($sp)
/* CA6E0 80133FE0 46006506 */  mov.s     $f20, $f12
/* CA6E4 80133FE4 F7B60030 */  sdc1      $f22, 0x30($sp)
/* CA6E8 80133FE8 46007586 */  mov.s     $f22, $f14
/* CA6EC 80133FEC AFBF0020 */  sw        $ra, 0x20($sp)
/* CA6F0 80133FF0 AFB3001C */  sw        $s3, 0x1C($sp)
/* CA6F4 80133FF4 AFB20018 */  sw        $s2, 0x18($sp)
/* CA6F8 80133FF8 AFB10014 */  sw        $s1, 0x14($sp)
/* CA6FC 80133FFC 0C011052 */  jal       is_starting_conversation
/* CA700 80134000 AFB00010 */   sw       $s0, 0x10($sp)
/* CA704 80134004 14400045 */  bnez      $v0, .L8013411C
/* CA708 80134008 2402FFFF */   addiu    $v0, $zero, -0x1
/* CA70C 8013400C 3C028015 */  lui       $v0, %hi(isPickingUpItem)
/* CA710 80134010 844265A4 */  lh        $v0, %lo(isPickingUpItem)($v0)
/* CA714 80134014 14400041 */  bnez      $v0, .L8013411C
/* CA718 80134018 2402FFFF */   addiu    $v0, $zero, -0x1
/* CA71C 8013401C 0C009C64 */  jal       get_time_freeze_mode
/* CA720 80134020 00000000 */   nop
/* CA724 80134024 1440003D */  bnez      $v0, .L8013411C
/* CA728 80134028 2402FFFF */   addiu    $v0, $zero, -0x1
/* CA72C 8013402C 3C02800A */  lui       $v0, %hi(gOverrideFlags)
/* CA730 80134030 8C42A650 */  lw        $v0, %lo(gOverrideFlags)($v0)
/* CA734 80134034 3C030020 */  lui       $v1, (0x200000 >> 16)
/* CA738 80134038 00431024 */  and       $v0, $v0, $v1
/* CA73C 8013403C 14400037 */  bnez      $v0, .L8013411C
/* CA740 80134040 2402FFFF */   addiu    $v0, $zero, -0x1
/* CA744 80134044 0000802D */  daddu     $s0, $zero, $zero
/* CA748 80134048 24130001 */  addiu     $s3, $zero, 0x1
/* CA74C 8013404C 24120002 */  addiu     $s2, $zero, 0x2
/* CA750 80134050 3C110020 */  lui       $s1, (0x200000 >> 16)
.L80134054:
/* CA754 80134054 3C038015 */  lui       $v1, %hi(gCurrentItemEntities)
/* CA758 80134058 8C6365A0 */  lw        $v1, %lo(gCurrentItemEntities)($v1)
/* CA75C 8013405C 00101080 */  sll       $v0, $s0, 2
/* CA760 80134060 00431021 */  addu      $v0, $v0, $v1
/* CA764 80134064 8C440000 */  lw        $a0, 0x0($v0)
/* CA768 80134068 50800029 */  beql      $a0, $zero, .L80134110
/* CA76C 8013406C 26100001 */   addiu    $s0, $s0, 0x1
/* CA770 80134070 8C830000 */  lw        $v1, 0x0($a0)
/* CA774 80134074 50600026 */  beql      $v1, $zero, .L80134110
/* CA778 80134078 26100001 */   addiu    $s0, $s0, 0x1
/* CA77C 8013407C 8082001B */  lb        $v0, 0x1B($a0)
/* CA780 80134080 50530023 */  beql      $v0, $s3, .L80134110
/* CA784 80134084 26100001 */   addiu    $s0, $s0, 0x1
/* CA788 80134088 50520021 */  beql      $v0, $s2, .L80134110
/* CA78C 8013408C 26100001 */   addiu    $s0, $s0, 0x1
/* CA790 80134090 30620040 */  andi      $v0, $v1, 0x40
/* CA794 80134094 5440001E */  bnel      $v0, $zero, .L80134110
/* CA798 80134098 26100001 */   addiu    $s0, $s0, 0x1
/* CA79C 8013409C 00711024 */  and       $v0, $v1, $s1
/* CA7A0 801340A0 5440001B */  bnel      $v0, $zero, .L80134110
/* CA7A4 801340A4 26100001 */   addiu    $s0, $s0, 0x1
/* CA7A8 801340A8 C4800008 */  lwc1      $f0, 0x8($a0)
/* CA7AC 801340AC 46140001 */  sub.s     $f0, $f0, $f20
/* CA7B0 801340B0 46000002 */  mul.s     $f0, $f0, $f0
/* CA7B4 801340B4 00000000 */  nop
/* CA7B8 801340B8 C484000C */  lwc1      $f4, 0xC($a0)
/* CA7BC 801340BC 46162101 */  sub.s     $f4, $f4, $f22
/* CA7C0 801340C0 46042102 */  mul.s     $f4, $f4, $f4
/* CA7C4 801340C4 00000000 */  nop
/* CA7C8 801340C8 C4820010 */  lwc1      $f2, 0x10($a0)
/* CA7CC 801340CC 46181081 */  sub.s     $f2, $f2, $f24
/* CA7D0 801340D0 46021082 */  mul.s     $f2, $f2, $f2
/* CA7D4 801340D4 00000000 */  nop
/* CA7D8 801340D8 46040000 */  add.s     $f0, $f0, $f4
/* CA7DC 801340DC 46020300 */  add.s     $f12, $f0, $f2
/* CA7E0 801340E0 46006004 */  sqrt.s    $f0, $f12
/* CA7E4 801340E4 46000032 */  c.eq.s    $f0, $f0
/* CA7E8 801340E8 00000000 */  nop
/* CA7EC 801340EC 45010003 */  bc1t      .L801340FC
/* CA7F0 801340F0 00000000 */   nop
/* CA7F4 801340F4 0C0187BC */  jal       sqrtf
/* CA7F8 801340F8 00000000 */   nop
.L801340FC:
/* CA7FC 801340FC 461A003C */  c.lt.s    $f0, $f26
/* CA800 80134100 00000000 */  nop
/* CA804 80134104 45010005 */  bc1t      .L8013411C
/* CA808 80134108 0200102D */   daddu    $v0, $s0, $zero
/* CA80C 8013410C 26100001 */  addiu     $s0, $s0, 0x1
.L80134110:
/* CA810 80134110 2A020100 */  slti      $v0, $s0, 0x100
/* CA814 80134114 1440FFCF */  bnez      $v0, .L80134054
/* CA818 80134118 2402FFFF */   addiu    $v0, $zero, -0x1
.L8013411C:
/* CA81C 8013411C 8FBF0020 */  lw        $ra, 0x20($sp)
/* CA820 80134120 8FB3001C */  lw        $s3, 0x1C($sp)
/* CA824 80134124 8FB20018 */  lw        $s2, 0x18($sp)
/* CA828 80134128 8FB10014 */  lw        $s1, 0x14($sp)
/* CA82C 8013412C 8FB00010 */  lw        $s0, 0x10($sp)
/* CA830 80134130 D7BA0040 */  ldc1      $f26, 0x40($sp)
/* CA834 80134134 D7B80038 */  ldc1      $f24, 0x38($sp)
/* CA838 80134138 D7B60030 */  ldc1      $f22, 0x30($sp)
/* CA83C 8013413C D7B40028 */  ldc1      $f20, 0x28($sp)
/* CA840 80134140 03E00008 */  jr        $ra
/* CA844 80134144 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

s32 test_item_entity_position(f32 x, f32 y, f32 z, f32 dist) {
    ItemEntity* item;
    f32 dx, dy, dz;
    s32 i;

    if (is_starting_conversation() || isPickingUpItem || get_time_freeze_mode() != 0 ||
        gOverrideFlags & GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS)
    {
        return -1;
    }

    for (i = 0; i < MAX_ITEM_ENTITIES; i++){
        item = gCurrentItemEntities[i];

        if (item == NULL) {
            continue;
        }

        if (item->flags == 0) {
            continue;
        }

        if (item->spawnType == ITEM_SPAWN_MODE_DECORATION) {
            continue;
        }

        if (item->spawnType == ITEM_SPAWN_MODE_INVISIBLE) {
            continue;
        }

        if (item->flags & ITEM_ENTITY_FLAG_HIDDEN) {
            continue;
        }

        if (item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT) {
            continue;
        }

        dx = item->position.x - x;
        dz = item->position.y - y;
        dy = item->position.z - z;
        if (sqrtf(SQ(dx) + SQ(dz) + SQ(dy)) < dist) {
            return i;
        }
    }
    return -1;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel floating_rock_main
/* 395BB0 E0098000 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 395BB4 E0098004 F7B40038 */  sdc1      $f20, 0x38($sp)
/* 395BB8 E0098008 4485A000 */  mtc1      $a1, $f20
/* 395BBC E009800C F7B60040 */  sdc1      $f22, 0x40($sp)
/* 395BC0 E0098010 4486B000 */  mtc1      $a2, $f22
/* 395BC4 E0098014 AFB20030 */  sw        $s2, 0x30($sp)
/* 395BC8 E0098018 0080902D */  daddu     $s2, $a0, $zero
/* 395BCC E009801C F7B80048 */  sdc1      $f24, 0x48($sp)
/* 395BD0 E0098020 4487C000 */  mtc1      $a3, $f24
/* 395BD4 E0098024 27A40010 */  addiu     $a0, $sp, 0x10
/* 395BD8 E0098028 F7BA0050 */  sdc1      $f26, 0x50($sp)
/* 395BDC E009802C C7BA0074 */  lwc1      $f26, 0x74($sp)
/* 395BE0 E0098030 3C02E00A */  lui       $v0, %hi(floating_rock_init)
/* 395BE4 E0098034 24428168 */  addiu     $v0, $v0, %lo(floating_rock_init)
/* 395BE8 E0098038 AFA20018 */  sw        $v0, 0x18($sp)
/* 395BEC E009803C 3C02E00A */  lui       $v0, %hi(floating_rock_update)
/* 395BF0 E0098040 24428170 */  addiu     $v0, $v0, %lo(floating_rock_update)
/* 395BF4 E0098044 AFA2001C */  sw        $v0, 0x1C($sp)
/* 395BF8 E0098048 3C02E00A */  lui       $v0, %hi(floating_rock_render)
/* 395BFC E009804C 2442829C */  addiu     $v0, $v0, %lo(floating_rock_render)
/* 395C00 E0098050 AFA20020 */  sw        $v0, 0x20($sp)
/* 395C04 E0098054 2402004C */  addiu     $v0, $zero, 0x4C
/* 395C08 E0098058 AFBF0034 */  sw        $ra, 0x34($sp)
/* 395C0C E009805C AFB1002C */  sw        $s1, 0x2C($sp)
/* 395C10 E0098060 AFB00028 */  sw        $s0, 0x28($sp)
/* 395C14 E0098064 AFA00010 */  sw        $zero, 0x10($sp)
/* 395C18 E0098068 AFA00024 */  sw        $zero, 0x24($sp)
/* 395C1C E009806C 0C080124 */  jal       shim_create_effect_instance
/* 395C20 E0098070 AFA20014 */   sw       $v0, 0x14($sp)
/* 395C24 E0098074 24040050 */  addiu     $a0, $zero, 0x50
/* 395C28 E0098078 24030001 */  addiu     $v1, $zero, 0x1
/* 395C2C E009807C 0040882D */  daddu     $s1, $v0, $zero
/* 395C30 E0098080 0C08012C */  jal       shim_general_heap_malloc
/* 395C34 E0098084 AE230008 */   sw       $v1, 0x8($s1)
/* 395C38 E0098088 0040802D */  daddu     $s0, $v0, $zero
/* 395C3C E009808C 16000003 */  bnez      $s0, .LE009809C
/* 395C40 E0098090 AE22000C */   sw       $v0, 0xC($s1)
.LE0098094:
/* 395C44 E0098094 08026025 */  j         .LE0098094
/* 395C48 E0098098 00000000 */   nop
.LE009809C:
/* 395C4C E009809C AE120000 */  sw        $s2, 0x0($s0)
/* 395C50 E00980A0 E6140004 */  swc1      $f20, 0x4($s0)
/* 395C54 E00980A4 E6160008 */  swc1      $f22, 0x8($s0)
/* 395C58 E00980A8 E618000C */  swc1      $f24, 0xC($s0)
/* 395C5C E00980AC C7A00068 */  lwc1      $f0, 0x68($sp)
/* 395C60 E00980B0 E6000010 */  swc1      $f0, 0x10($s0)
/* 395C64 E00980B4 C7A0006C */  lwc1      $f0, 0x6C($sp)
/* 395C68 E00980B8 E6000018 */  swc1      $f0, 0x18($s0)
/* 395C6C E00980BC C7A00070 */  lwc1      $f0, 0x70($sp)
/* 395C70 E00980C0 E6000020 */  swc1      $f0, 0x20($s0)
/* 395C74 E00980C4 8FA20078 */  lw        $v0, 0x78($sp)
/* 395C78 E00980C8 24040168 */  addiu     $a0, $zero, 0x168
/* 395C7C E00980CC AE00004C */  sw        $zero, 0x4C($s0)
/* 395C80 E00980D0 AE000014 */  sw        $zero, 0x14($s0)
/* 395C84 E00980D4 AE00001C */  sw        $zero, 0x1C($s0)
/* 395C88 E00980D8 AE000024 */  sw        $zero, 0x24($s0)
/* 395C8C E00980DC 0C080138 */  jal       shim_rand_int
/* 395C90 E00980E0 AE020048 */   sw       $v0, 0x48($s0)
/* 395C94 E00980E4 24040168 */  addiu     $a0, $zero, 0x168
/* 395C98 E00980E8 44820000 */  mtc1      $v0, $f0
/* 395C9C E00980EC 00000000 */  nop
/* 395CA0 E00980F0 46800020 */  cvt.s.w   $f0, $f0
/* 395CA4 E00980F4 0C080138 */  jal       shim_rand_int
/* 395CA8 E00980F8 E6000028 */   swc1     $f0, 0x28($s0)
/* 395CAC E00980FC 44820000 */  mtc1      $v0, $f0
/* 395CB0 E0098100 00000000 */  nop
/* 395CB4 E0098104 46800020 */  cvt.s.w   $f0, $f0
/* 395CB8 E0098108 0220102D */  daddu     $v0, $s1, $zero
/* 395CBC E009810C 240300FF */  addiu     $v1, $zero, 0xFF
/* 395CC0 E0098110 E600002C */  swc1      $f0, 0x2C($s0)
/* 395CC4 E0098114 3C0141A0 */  lui       $at, (0x41A00000 >> 16)
/* 395CC8 E0098118 44810000 */  mtc1      $at, $f0
/* 395CCC E009811C 3C01C1A0 */  lui       $at, (0xC1A00000 >> 16)
/* 395CD0 E0098120 44811000 */  mtc1      $at, $f2
/* 395CD4 E0098124 461AD100 */  add.s     $f4, $f26, $f26
/* 395CD8 E0098128 AE000030 */  sw        $zero, 0x30($s0)
/* 395CDC E009812C AE030044 */  sw        $v1, 0x44($s0)
/* 395CE0 E0098130 AE000040 */  sw        $zero, 0x40($s0)
/* 395CE4 E0098134 E6000038 */  swc1      $f0, 0x38($s0)
/* 395CE8 E0098138 E6020034 */  swc1      $f2, 0x34($s0)
/* 395CEC E009813C E604003C */  swc1      $f4, 0x3C($s0)
/* 395CF0 E0098140 8FBF0034 */  lw        $ra, 0x34($sp)
/* 395CF4 E0098144 8FB20030 */  lw        $s2, 0x30($sp)
/* 395CF8 E0098148 8FB1002C */  lw        $s1, 0x2C($sp)
/* 395CFC E009814C 8FB00028 */  lw        $s0, 0x28($sp)
/* 395D00 E0098150 D7BA0050 */  ldc1      $f26, 0x50($sp)
/* 395D04 E0098154 D7B80048 */  ldc1      $f24, 0x48($sp)
/* 395D08 E0098158 D7B60040 */  ldc1      $f22, 0x40($sp)
/* 395D0C E009815C D7B40038 */  ldc1      $f20, 0x38($sp)
/* 395D10 E0098160 03E00008 */  jr        $ra
/* 395D14 E0098164 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

EffectInstance* floating_rock_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 floorY, f32 fallVelocity, f32 fallAccel, f32 scale, s32 duration) {
    EffectBlueprint bp;
    EffectInstance* effect;
    FloatingRockFXData* data;
    s32 numParts = 1;

    bp.init = floating_rock_init;
    bp.update = floating_rock_update;
    bp.renderWorld = floating_rock_render;
    bp.unk_00 = 0;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_FLOATING_ROCK;

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

    data->type = type;
    data->pos.x = posX;
    data->pos.y = posY;
    data->pos.z = posZ;
    data->floorY = floorY;
    data->vel.y = fallVelocity;
    data->fallAccel = fallAccel;
    data->timeLeft = duration;
    data->lifetime = 0;
    data->vel.x = 0;
    data->vel.z = 0;
    data->rot.x = 0;
    data->rot.y = shim_rand_int(360);
    data->rot.z = shim_rand_int(360);
    data->rotVel.x = 0.0f;
    data->rotVel.z = 20.0f;
    data->rotVel.y = -20.0f;

    data->scale = 2.0f * scale;
    data->alpha = 255;
    data->unk_40 = 0;

    return effect;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel LandJumpPart
/* 1A943C 8027AB5C 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* 1A9440 8027AB60 AFB20020 */  sw        $s2, 0x20($sp)
/* 1A9444 8027AB64 0080902D */  daddu     $s2, $a0, $zero
/* 1A9448 8027AB68 AFBF0024 */  sw        $ra, 0x24($sp)
/* 1A944C 8027AB6C AFB1001C */  sw        $s1, 0x1C($sp)
/* 1A9450 8027AB70 AFB00018 */  sw        $s0, 0x18($sp)
/* 1A9454 8027AB74 8E51000C */  lw        $s1, 0xC($s2)
/* 1A9458 8027AB78 54A00001 */  bnel      $a1, $zero, .L8027AB80
/* 1A945C 8027AB7C AE400070 */   sw       $zero, 0x70($s2)
.L8027AB80:
/* 1A9460 8027AB80 8E420070 */  lw        $v0, 0x70($s2)
/* 1A9464 8027AB84 14400020 */  bnez      $v0, .L8027AC08
/* 1A9468 8027AB88 00000000 */   nop
/* 1A946C 8027AB8C 8E250000 */  lw        $a1, 0x0($s1)
/* 1A9470 8027AB90 26310004 */  addiu     $s1, $s1, 0x4
/* 1A9474 8027AB94 0C0B1EAF */  jal       evt_get_variable
/* 1A9478 8027AB98 0240202D */   daddu    $a0, $s2, $zero
/* 1A947C 8027AB9C 0040802D */  daddu     $s0, $v0, $zero
/* 1A9480 8027ABA0 8E250000 */  lw        $a1, 0x0($s1)
/* 1A9484 8027ABA4 0C0B1EAF */  jal       evt_get_variable
/* 1A9488 8027ABA8 0240202D */   daddu    $a0, $s2, $zero
/* 1A948C 8027ABAC 0040882D */  daddu     $s1, $v0, $zero
/* 1A9490 8027ABB0 2402FF81 */  addiu     $v0, $zero, -0x7F
/* 1A9494 8027ABB4 16020002 */  bne       $s0, $v0, .L8027ABC0
/* 1A9498 8027ABB8 00000000 */   nop
/* 1A949C 8027ABBC 8E500148 */  lw        $s0, 0x148($s2)
.L8027ABC0:
/* 1A94A0 8027ABC0 0C09A75B */  jal       get_actor
/* 1A94A4 8027ABC4 0200202D */   daddu    $a0, $s0, $zero
/* 1A94A8 8027ABC8 0040802D */  daddu     $s0, $v0, $zero
/* 1A94AC 8027ABCC 0200202D */  daddu     $a0, $s0, $zero
/* 1A94B0 8027ABD0 0C099117 */  jal       get_actor_part
/* 1A94B4 8027ABD4 0220282D */   daddu    $a1, $s1, $zero
/* 1A94B8 8027ABD8 0040882D */  daddu     $s1, $v0, $zero
/* 1A94BC 8027ABDC AE500074 */  sw        $s0, 0x74($s2)
/* 1A94C0 8027ABE0 AE510078 */  sw        $s1, 0x78($s2)
/* 1A94C4 8027ABE4 8E300010 */  lw        $s0, 0x10($s1)
/* 1A94C8 8027ABE8 C620002C */  lwc1      $f0, 0x2C($s1)
/* 1A94CC 8027ABEC E6000000 */  swc1      $f0, 0x0($s0)
/* 1A94D0 8027ABF0 C6200030 */  lwc1      $f0, 0x30($s1)
/* 1A94D4 8027ABF4 E6000004 */  swc1      $f0, 0x4($s0)
/* 1A94D8 8027ABF8 C6200034 */  lwc1      $f0, 0x34($s1)
/* 1A94DC 8027ABFC 24020001 */  addiu     $v0, $zero, 0x1
/* 1A94E0 8027AC00 E6000008 */  swc1      $f0, 0x8($s0)
/* 1A94E4 8027AC04 AE420070 */  sw        $v0, 0x70($s2)
.L8027AC08:
/* 1A94E8 8027AC08 8E510078 */  lw        $s1, 0x78($s2)
/* 1A94EC 8027AC0C 8E300010 */  lw        $s0, 0x10($s1)
/* 1A94F0 8027AC10 C6040004 */  lwc1      $f4, 0x4($s0)
/* 1A94F4 8027AC14 C600002C */  lwc1      $f0, 0x2C($s0)
/* 1A94F8 8027AC18 8E050028 */  lw        $a1, 0x28($s0)
/* 1A94FC 8027AC1C 46002100 */  add.s     $f4, $f4, $f0
/* 1A9500 8027AC20 C6020024 */  lwc1      $f2, 0x24($s0)
/* 1A9504 8027AC24 8E060030 */  lw        $a2, 0x30($s0)
/* 1A9508 8027AC28 46020001 */  sub.s     $f0, $f0, $f2
/* 1A950C 8027AC2C 0200202D */  daddu     $a0, $s0, $zero
/* 1A9510 8027AC30 E6040004 */  swc1      $f4, 0x4($s0)
/* 1A9514 8027AC34 0C099070 */  jal       add_xz_vec3f_copy1
/* 1A9518 8027AC38 E600002C */   swc1     $f0, 0x2C($s0)
/* 1A951C 8027AC3C C6000000 */  lwc1      $f0, 0x0($s0)
/* 1A9520 8027AC40 44802000 */  mtc1      $zero, $f4
/* 1A9524 8027AC44 E620002C */  swc1      $f0, 0x2C($s1)
/* 1A9528 8027AC48 C6000004 */  lwc1      $f0, 0x4($s0)
/* 1A952C 8027AC4C E6200030 */  swc1      $f0, 0x30($s1)
/* 1A9530 8027AC50 C6220030 */  lwc1      $f2, 0x30($s1)
/* 1A9534 8027AC54 C6000008 */  lwc1      $f0, 0x8($s0)
/* 1A9538 8027AC58 4604103C */  c.lt.s    $f2, $f4
/* 1A953C 8027AC5C 00000000 */  nop
/* 1A9540 8027AC60 45010003 */  bc1t      .L8027AC70
/* 1A9544 8027AC64 E6200034 */   swc1     $f0, 0x34($s1)
/* 1A9548 8027AC68 0809EB25 */  j         .L8027AC94
/* 1A954C 8027AC6C 0000102D */   daddu    $v0, $zero, $zero
.L8027AC70:
/* 1A9550 8027AC70 C6200064 */  lwc1      $f0, 0x64($s1)
/* 1A9554 8027AC74 E6240030 */  swc1      $f4, 0x30($s1)
/* 1A9558 8027AC78 E7A00010 */  swc1      $f0, 0x10($sp)
/* 1A955C 8027AC7C 8E25002C */  lw        $a1, 0x2C($s1)
/* 1A9560 8027AC80 8E260030 */  lw        $a2, 0x30($s1)
/* 1A9564 8027AC84 8E270034 */  lw        $a3, 0x34($s1)
/* 1A9568 8027AC88 0C0990BC */  jal       play_movement_dust_effects
/* 1A956C 8027AC8C 24040002 */   addiu    $a0, $zero, 0x2
/* 1A9570 8027AC90 24020001 */  addiu     $v0, $zero, 0x1
.L8027AC94:
/* 1A9574 8027AC94 8FBF0024 */  lw        $ra, 0x24($sp)
/* 1A9578 8027AC98 8FB20020 */  lw        $s2, 0x20($sp)
/* 1A957C 8027AC9C 8FB1001C */  lw        $s1, 0x1C($sp)
/* 1A9580 8027ACA0 8FB00018 */  lw        $s0, 0x18($sp)
/* 1A9584 8027ACA4 03E00008 */  jr        $ra
/* 1A9588 8027ACA8 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

ApiStatus LandJumpPart(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    Actor* actor;
    ActorPart* part;
    ActorPartMovement* movement;

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

    if (script->functionTemp[0] == 0) {
        s32 actorID = evt_get_variable(script, *args++);
        s32 partID = evt_get_variable(script, *args++);

        if (actorID == ACTOR_SELF) {
            actorID = script->owner1.actorID;
        }

        actor = get_actor(actorID);
        part = get_actor_part(actor, partID);
        script->functionTempPtr[1] = actor;
        script->functionTempPtr[2] = part;
        movement = part->movement;
        movement->absolutePosition.x = part->absolutePosition.x;
        movement->absolutePosition.y = part->absolutePosition.y;
        movement->absolutePosition.z = part->absolutePosition.z;
        script->functionTemp[0] = 1;
    }

    part = script->functionTempPtr[2];
    movement = part->movement;
    movement->absolutePosition.y += movement->unk_2C;
    movement->unk_2C -= movement->jumpScale;
    add_xz_vec3f_copy1(&movement->absolutePosition, movement->moveSpeed, movement->angle);
    part->absolutePosition.x = movement->absolutePosition.x;
    part->absolutePosition.y = movement->absolutePosition.y;
    part->absolutePosition.z = movement->absolutePosition.z;

    if (part->absolutePosition.y < 0.0f) {
        part->absolutePosition.y = 0.0f;
        play_movement_dust_effects(2, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z, part->yaw);
        return ApiStatus_DONE1;
    }

    return ApiStatus_BLOCK;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel walking_dust_main
/* 32C110 E000E000 27BDFF98 */  addiu     $sp, $sp, -0x68
/* 32C114 E000E004 F7B60048 */  sdc1      $f22, 0x48($sp)
/* 32C118 E000E008 4485B000 */  mtc1      $a1, $f22
/* 32C11C E000E00C F7B80050 */  sdc1      $f24, 0x50($sp)
/* 32C120 E000E010 4486C000 */  mtc1      $a2, $f24
/* 32C124 E000E014 F7BA0058 */  sdc1      $f26, 0x58($sp)
/* 32C128 E000E018 4487D000 */  mtc1      $a3, $f26
/* 32C12C E000E01C AFB30034 */  sw        $s3, 0x34($sp)
/* 32C130 E000E020 0080982D */  daddu     $s3, $a0, $zero
/* 32C134 E000E024 F7BC0060 */  sdc1      $f28, 0x60($sp)
/* 32C138 E000E028 C7BC0078 */  lwc1      $f28, 0x78($sp)
/* 32C13C E000E02C 27A40010 */  addiu     $a0, $sp, 0x10
/* 32C140 E000E030 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 32C144 E000E034 C7B4007C */  lwc1      $f20, 0x7C($sp)
/* 32C148 E000E038 3C02E001 */  lui       $v0, %hi(walking_dust_init)
/* 32C14C E000E03C 2442E16C */  addiu     $v0, $v0, %lo(walking_dust_init)
/* 32C150 E000E040 AFA20018 */  sw        $v0, 0x18($sp)
/* 32C154 E000E044 3C02E001 */  lui       $v0, %hi(walking_dust_update)
/* 32C158 E000E048 2442E174 */  addiu     $v0, $v0, %lo(walking_dust_update)
/* 32C15C E000E04C AFA2001C */  sw        $v0, 0x1C($sp)
/* 32C160 E000E050 3C02E001 */  lui       $v0, %hi(walking_dust_render)
/* 32C164 E000E054 2442E244 */  addiu     $v0, $v0, %lo(walking_dust_render)
/* 32C168 E000E058 AFA20020 */  sw        $v0, 0x20($sp)
/* 32C16C E000E05C 24020007 */  addiu     $v0, $zero, 0x7
/* 32C170 E000E060 AFBF0038 */  sw        $ra, 0x38($sp)
/* 32C174 E000E064 AFB20030 */  sw        $s2, 0x30($sp)
/* 32C178 E000E068 AFB1002C */  sw        $s1, 0x2C($sp)
/* 32C17C E000E06C AFB00028 */  sw        $s0, 0x28($sp)
/* 32C180 E000E070 AFA00010 */  sw        $zero, 0x10($sp)
/* 32C184 E000E074 AFA00024 */  sw        $zero, 0x24($sp)
/* 32C188 E000E078 0C080124 */  jal       shim_create_effect_instance
/* 32C18C E000E07C AFA20014 */   sw       $v0, 0x14($sp)
/* 32C190 E000E080 24040078 */  addiu     $a0, $zero, 0x78
/* 32C194 E000E084 24120001 */  addiu     $s2, $zero, 0x1
/* 32C198 E000E088 0040802D */  daddu     $s0, $v0, $zero
/* 32C19C E000E08C 0C08012C */  jal       shim_general_heap_malloc
/* 32C1A0 E000E090 AE120008 */   sw       $s2, 0x8($s0)
/* 32C1A4 E000E094 0040882D */  daddu     $s1, $v0, $zero
/* 32C1A8 E000E098 16200003 */  bnez      $s1, .LE000E0A8
/* 32C1AC E000E09C AE11000C */   sw       $s1, 0xC($s0)
.LE000E0A0:
/* 32C1B0 E000E0A0 08003828 */  j         .LE000E0A0
/* 32C1B4 E000E0A4 00000000 */   nop
.LE000E0A8:
/* 32C1B8 E000E0A8 0220202D */  daddu     $a0, $s1, $zero
/* 32C1BC E000E0AC 00122900 */  sll       $a1, $s2, 4
/* 32C1C0 E000E0B0 00B22823 */  subu      $a1, $a1, $s2
/* 32C1C4 E000E0B4 0C080130 */  jal       shim_mem_clear
/* 32C1C8 E000E0B8 000528C0 */   sll      $a1, $a1, 3
/* 32C1CC E000E0BC 0000202D */  daddu     $a0, $zero, $zero
/* 32C1D0 E000E0C0 3A620002 */  xori      $v0, $s3, 0x2
/* 32C1D4 E000E0C4 2C420001 */  sltiu     $v0, $v0, 0x1
/* 32C1D8 E000E0C8 AE22006C */  sw        $v0, 0x6C($s1)
/* 32C1DC E000E0CC 0092102A */  slt       $v0, $a0, $s2
/* 32C1E0 E000E0D0 AE200070 */  sw        $zero, 0x70($s1)
/* 32C1E4 E000E0D4 10400019 */  beqz      $v0, .LE000E13C
/* 32C1E8 E000E0D8 A6330004 */   sh       $s3, 0x4($s1)
/* 32C1EC E000E0DC 24050001 */  addiu     $a1, $zero, 0x1
/* 32C1F0 E000E0E0 26230060 */  addiu     $v1, $s1, 0x60
/* 32C1F4 E000E0E4 3C013EAA */  lui       $at, (0x3EAAAAAB >> 16)
/* 32C1F8 E000E0E8 3421AAAB */  ori       $at, $at, (0x3EAAAAAB & 0xFFFF)
/* 32C1FC E000E0EC 44812000 */  mtc1      $at, $f4
/* 32C200 E000E0F0 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
/* 32C204 E000E0F4 44811000 */  mtc1      $at, $f2
/* 32C208 E000E0F8 3C01BE23 */  lui       $at, (0xBE23D70A >> 16)
/* 32C20C E000E0FC 3421D70A */  ori       $at, $at, (0xBE23D70A & 0xFFFF)
/* 32C210 E000E100 44810000 */  mtc1      $at, $f0
.LE000E104:
/* 32C214 E000E104 24840001 */  addiu     $a0, $a0, 0x1
/* 32C218 E000E108 AE250000 */  sw        $a1, 0x0($s1)
/* 32C21C E000E10C E47C0004 */  swc1      $f28, 0x4($v1)
/* 32C220 E000E110 E4740008 */  swc1      $f20, 0x8($v1)
/* 32C224 E000E114 E476FFA8 */  swc1      $f22, -0x58($v1)
/* 32C228 E000E118 E478FFAC */  swc1      $f24, -0x54($v1)
/* 32C22C E000E11C E47AFFB0 */  swc1      $f26, -0x50($v1)
/* 32C230 E000E120 E464FFF8 */  swc1      $f4, -0x8($v1)
/* 32C234 E000E124 E462FFFC */  swc1      $f2, -0x4($v1)
/* 32C238 E000E128 E4600000 */  swc1      $f0, 0x0($v1)
/* 32C23C E000E12C 24630078 */  addiu     $v1, $v1, 0x78
/* 32C240 E000E130 0092102A */  slt       $v0, $a0, $s2
/* 32C244 E000E134 1440FFF3 */  bnez      $v0, .LE000E104
/* 32C248 E000E138 26310078 */   addiu    $s1, $s1, 0x78
.LE000E13C:
/* 32C24C E000E13C 8FBF0038 */  lw        $ra, 0x38($sp)
/* 32C250 E000E140 8FB30034 */  lw        $s3, 0x34($sp)
/* 32C254 E000E144 8FB20030 */  lw        $s2, 0x30($sp)
/* 32C258 E000E148 8FB1002C */  lw        $s1, 0x2C($sp)
/* 32C25C E000E14C 8FB00028 */  lw        $s0, 0x28($sp)
/* 32C260 E000E150 D7BC0060 */  ldc1      $f28, 0x60($sp)
/* 32C264 E000E154 D7BA0058 */  ldc1      $f26, 0x58($sp)
/* 32C268 E000E158 D7B80050 */  ldc1      $f24, 0x50($sp)
/* 32C26C E000E15C D7B60048 */  ldc1      $f22, 0x48($sp)
/* 32C270 E000E160 D7B40040 */  ldc1      $f20, 0x40($sp)
/* 32C274 E000E164 03E00008 */  jr        $ra
/* 32C278 E000E168 27BD0068 */   addiu    $sp, $sp, 0x68

### DECOMPILED C INSTRUCTIONS:

void walking_dust_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
    EffectBlueprint bp;
    EffectInstance* effect;
    WalkingDustFXData* data;
    s32 numParts = 1;
    s32 i;

    bp.unk_00 = 0;
    bp.init = walking_dust_init;
    bp.update = walking_dust_update;
    bp.renderWorld = walking_dust_render;
    bp.renderUI = NULL;
    bp.effectID = EFFECT_WALKING_DUST;

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

    data = shim_general_heap_malloc(numParts * sizeof(*data));
    effect->data.walkingDust = data;
    ASSERT(effect->data.walkingDust != NULL);

    shim_mem_clear(data, numParts * sizeof(*data));
    data->unk_6C = arg0 == 2;
    data->unk_70 = 0;
    data->unk_04 = arg0;

    for (i = 0; i < numParts; i++, data++) {
        data->unk_00 = 1;
        data->unk_64 = arg4;
        data->unk_68 = arg5;
        data->unk_08 = arg1;
        data->unk_0C = arg2;
        data->unk_10 = arg3;
        data->unk_58 = 0.33333334f;
        data->unk_5C = 1.75f;
        data->unk_60 = -0.16f;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_8021848C
/* 660BDC 8021848C 27BDFFE0 */  addiu     $sp, $sp, -0x20
glabel func_80218490_557870
/* 660BE0 80218490 AFB20018 */  sw        $s2, 0x18($sp)
D_80218494:
/* 660BE4 80218494 0080902D */  daddu     $s2, $a0, $zero
/* 660BE8 80218498 AFBF001C */  sw        $ra, 0x1C($sp)
glabel func_8021849C_6DC23C
/* 660BEC 8021849C AFB10014 */  sw        $s1, 0x14($sp)
glabel b_area_jan2_white_magikoopa_StartRumbleWithParams
/* 660BF0 802184A0 AFB00010 */  sw        $s0, 0x10($sp)
.L802184A4:
/* 660BF4 802184A4 8E50000C */  lw        $s0, 0xC($s2)
.L802184A8:
/* 660BF8 802184A8 8E050000 */  lw        $a1, 0x0($s0)
D_802184AC:
/* 660BFC 802184AC 0C0B1EAF */  jal       evt_get_variable
D_802184B0:
/* 660C00 802184B0 26100004 */   addiu    $s0, $s0, 0x4
D_802184B4:
/* 660C04 802184B4 8E050000 */  lw        $a1, 0x0($s0)
.L802184B8_59EB98:
/* 660C08 802184B8 26100004 */  addiu     $s0, $s0, 0x4
/* 660C0C 802184BC 0240202D */  daddu     $a0, $s2, $zero
func_802184C0_47F570:
/* 660C10 802184C0 0C0B1EAF */  jal       evt_get_variable
glabel func_802184C4
/* 660C14 802184C4 0040882D */   daddu    $s1, $v0, $zero
/* 660C18 802184C8 44820000 */  mtc1      $v0, $f0
glabel b_area_isk_part_1_ChompChainUpdate
/* 660C1C 802184CC 00000000 */  nop
.L802184D0_59EBB0:
/* 660C20 802184D0 46800020 */  cvt.s.w   $f0, $f0
glabel b_area_sam2_monstar_StartRumbleWithParams
/* 660C24 802184D4 E6200000 */  swc1      $f0, 0x0($s1)
.L802184D8:
/* 660C28 802184D8 8E050000 */  lw        $a1, 0x0($s0)
glabel func_802184DC
/* 660C2C 802184DC 26100004 */  addiu     $s0, $s0, 0x4
glabel func_802184E0
/* 660C30 802184E0 0C0B1EAF */  jal       evt_get_variable
glabel dup_b_area_tik2_SpitInk
/* 660C34 802184E4 0240202D */   daddu    $a0, $s2, $zero
glabel b_area_kpa_GetSelectedMoveID
/* 660C38 802184E8 44820000 */  mtc1      $v0, $f0
D_802184EC:
/* 660C3C 802184EC 00000000 */  nop
glabel func_802184F0
/* 660C40 802184F0 46800020 */  cvt.s.w   $f0, $f0
.L802184F4:
/* 660C44 802184F4 E6200004 */  swc1      $f0, 0x4($s1)
glabel b_area_jan2_white_magikoopa_UnkFunc52
/* 660C48 802184F8 8E050000 */  lw        $a1, 0x0($s0)
D_802184FC:
/* 660C4C 802184FC 26100004 */  addiu     $s0, $s0, 0x4
glabel func_80218500
/* 660C50 80218500 0C0B1EAF */  jal       evt_get_variable
.L80218504:
/* 660C54 80218504 0240202D */   daddu    $a0, $s2, $zero
/* 660C58 80218508 24040014 */  addiu     $a0, $zero, 0x14
.L8021850C:
/* 660C5C 8021850C 44820000 */  mtc1      $v0, $f0
b_area_trd_part_2_green_ninja_koopa_GetKoopaBrosWithState:
/* 660C60 80218510 00000000 */  nop
glabel dup2_b_area_kpa_SetAbsoluteStatusOffsets
/* 660C64 80218514 46800020 */  cvt.s.w   $f0, $f0
.L80218518_59EBF8:
/* 660C68 80218518 0C00A67F */  jal       rand_int
glabel b_area_kzn_medi_guy_MediGuySpriteRotationFunc
/* 660C6C 8021851C E6200008 */   swc1     $f0, 0x8($s1)
/* 660C70 80218520 24040028 */  addiu     $a0, $zero, 0x28
.L80218524:
/* 660C74 80218524 00021023 */  negu      $v0, $v0
D_80218528:
/* 660C78 80218528 44820000 */  mtc1      $v0, $f0
glabel func_8021852C
/* 660C7C 8021852C 00000000 */  nop
glabel b_area_kpa4_StartRumbleWithParams
/* 660C80 80218530 46800020 */  cvt.s.w   $f0, $f0
b_area_sbk_pokey_init_80218534:
/* 660C84 80218534 0C00A67F */  jal       rand_int
b_area_trd_part_1_Formation_03:
/* 660C88 80218538 E620000C */   swc1     $f0, 0xC($s1)
D_8021853C:
/* 660C8C 8021853C 24420028 */  addiu     $v0, $v0, 0x28
.L80218540:
/* 660C90 80218540 44820000 */  mtc1      $v0, $f0
.L80218544:
/* 660C94 80218544 00000000 */  nop
D_80218548:
/* 660C98 80218548 46800020 */  cvt.s.w   $f0, $f0
/* 660C9C 8021854C E6200010 */  swc1      $f0, 0x10($s1)
glabel b_area_kkj_SetLightningBoltPurple
/* 660CA0 80218550 AE200014 */  sw        $zero, 0x14($s1)
/* 660CA4 80218554 8E050000 */  lw        $a1, 0x0($s0)
glabel func_80218558
/* 660CA8 80218558 26100004 */  addiu     $s0, $s0, 0x4
glabel func_8021855C
/* 660CAC 8021855C 0C0B1EAF */  jal       evt_get_variable
glabel b_area_flo_ShrinkActor
/* 660CB0 80218560 0240202D */   daddu    $a0, $s2, $zero
D_80218564:
/* 660CB4 80218564 44820000 */  mtc1      $v0, $f0
/* 660CB8 80218568 00000000 */  nop
.L8021856C:
/* 660CBC 8021856C 46800020 */  cvt.s.w   $f0, $f0
D_80218570:
/* 660CC0 80218570 E6200018 */  swc1      $f0, 0x18($s1)
D_80218574:
/* 660CC4 80218574 8E050000 */  lw        $a1, 0x0($s0)
/* 660CC8 80218578 26100004 */  addiu     $s0, $s0, 0x4
.L8021857C:
/* 660CCC 8021857C 0C0B1EAF */  jal       evt_get_variable
glabel b_area_dig_GetModelPos
/* 660CD0 80218580 0240202D */   daddu    $a0, $s2, $zero
b_area_mim_forest_fuzzy_handleEvent_80218584:
/* 660CD4 80218584 44820000 */  mtc1      $v0, $f0
glabel b_area_kpa4_UnkFunc52
/* 660CD8 80218588 00000000 */  nop
b_area_omo2_general_guy_init:
/* 660CDC 8021858C 46800020 */  cvt.s.w   $f0, $f0
.L80218590:
/* 660CE0 80218590 E620001C */  swc1      $f0, 0x1C($s1)
.L80218594:
/* 660CE4 80218594 8E050000 */  lw        $a1, 0x0($s0)
/* 660CE8 80218598 0C0B1EAF */  jal       evt_get_variable
.L8021859C:
/* 660CEC 8021859C 0240202D */   daddu    $a0, $s2, $zero
.L802185A0:
/* 660CF0 802185A0 44820000 */  mtc1      $v0, $f0
/* 660CF4 802185A4 00000000 */  nop
glabel b_area_pra_UnkFunc52
/* 660CF8 802185A8 46800020 */  cvt.s.w   $f0, $f0
glabel b_area_omo_medi_guy_MediGuySpriteRotationFunc
/* 660CFC 802185AC E6200020 */  swc1      $f0, 0x20($s1)
glabel func_802185B0
/* 660D00 802185B0 8FBF001C */  lw        $ra, 0x1C($sp)
.L802185B4:
/* 660D04 802185B4 8FB20018 */  lw        $s2, 0x18($sp)
D_802185B8:
/* 660D08 802185B8 8FB10014 */  lw        $s1, 0x14($sp)
glabel b_area_jan2_white_magikoopa_GetBootsHammerLevel
/* 660D0C 802185BC 8FB00010 */  lw        $s0, 0x10($sp)
D_802185C0:
/* 660D10 802185C0 24020002 */  addiu     $v0, $zero, 0x2
D_802185C4:
/* 660D14 802185C4 03E00008 */  jr        $ra
.L802185C8:
/* 660D18 802185C8 27BD0020 */   addiu    $sp, $sp, 0x20
/* 660D1C 802185CC 00000000 */  nop

### DECOMPILED C INSTRUCTIONS:

API_CALLABLE(func_8021848C_660BDC) {
    Bytecode* args = script->ptrReadPos;
    Vec3f* path = (Vec3f*)evt_get_variable(script, *args++);

    path[0].x = evt_get_variable(script, *args++);
    path[0].y = evt_get_variable(script, *args++);
    path[0].z = evt_get_variable(script, *args++);
    path[1].x = -rand_int(20);
    path[1].y = rand_int(40) + 40;
    path[1].z = 0;
    path[2].x = evt_get_variable(script, *args++);
    path[2].y = evt_get_variable(script, *args++);
    path[2].z = evt_get_variable(script, *args++);
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel load_simple_entity_data
/* A79A4 801112A4 27BDFFD8 */  addiu     $sp, $sp, -0x28
/* A79A8 801112A8 AFB20020 */  sw        $s2, 0x20($sp)
/* A79AC 801112AC 0080902D */  daddu     $s2, $a0, $zero
/* A79B0 801112B0 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* A79B4 801112B4 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* A79B8 801112B8 2403000A */  addiu     $v1, $zero, 0xA
/* A79BC 801112BC AFBF0024 */  sw        $ra, 0x24($sp)
/* A79C0 801112C0 AFB1001C */  sw        $s1, 0x1C($sp)
/* A79C4 801112C4 AFB00018 */  sw        $s0, 0x18($sp)
/* A79C8 801112C8 A6430012 */  sh        $v1, 0x12($s2)
/* A79CC 801112CC 80420070 */  lb        $v0, 0x70($v0)
/* A79D0 801112D0 14400005 */  bnez      $v0, .L801112E8
/* A79D4 801112D4 00A0882D */   daddu    $s1, $a1, $zero
/* A79D8 801112D8 3C108015 */  lui       $s0, %hi(wEntityBlueprintSize)
/* A79DC 801112DC 8E10165C */  lw        $s0, %lo(wEntityBlueprintSize)($s0)
/* A79E0 801112E0 080444BD */  j         .L801112F4
/* A79E4 801112E4 0240202D */   daddu    $a0, $s2, $zero
.L801112E8:
/* A79E8 801112E8 3C108015 */  lui       $s0, %hi(bEntityBlueprintSize)
/* A79EC 801112EC 8E101660 */  lw        $s0, %lo(bEntityBlueprintSize)($s0)
/* A79F0 801112F0 0240202D */  daddu     $a0, $s2, $zero
.L801112F4:
/* A79F4 801112F4 0220282D */  daddu     $a1, $s1, $zero
/* A79F8 801112F8 27A60010 */  addiu     $a2, $sp, 0x10
/* A79FC 801112FC 0C044457 */  jal       is_entity_data_loaded
/* A7A00 80111300 27A70014 */   addiu    $a3, $sp, 0x14
/* A7A04 80111304 10400020 */  beqz      $v0, .L80111388
/* A7A08 80111308 00000000 */   nop
/* A7A0C 8011130C 8E22001C */  lw        $v0, 0x1C($s1)
/* A7A10 80111310 8E230018 */  lw        $v1, 0x18($s1)
/* A7A14 80111314 00431023 */  subu      $v0, $v0, $v1
/* A7A18 80111318 00021083 */  sra       $v0, $v0, 2
/* A7A1C 8011131C 02021021 */  addu      $v0, $s0, $v0
/* A7A20 80111320 2C425FFD */  sltiu     $v0, $v0, 0x5FFD
/* A7A24 80111324 14400007 */  bnez      $v0, .L80111344
/* A7A28 80111328 00000000 */   nop
/* A7A2C 8011132C 0C0441A9 */  jal       get_entity_type
/* A7A30 80111330 92440004 */   lbu      $a0, 0x4($s2)
/* A7A34 80111334 0C0441A9 */  jal       get_entity_type
/* A7A38 80111338 92440004 */   lbu      $a0, 0x4($s2)
.L8011133C:
/* A7A3C 8011133C 080444CF */  j         .L8011133C
/* A7A40 80111340 00000000 */   nop
.L80111344:
/* A7A44 80111344 8E22001C */  lw        $v0, 0x1C($s1)
/* A7A48 80111348 3C068015 */  lui       $a2, %hi(gEntityHeapBase)
/* A7A4C 8011134C 8CC612C4 */  lw        $a2, %lo(gEntityHeapBase)($a2)
/* A7A50 80111350 00431023 */  subu      $v0, $v0, $v1
/* A7A54 80111354 00022883 */  sra       $a1, $v0, 2
/* A7A58 80111358 00101080 */  sll       $v0, $s0, 2
/* A7A5C 8011135C 00C23023 */  subu      $a2, $a2, $v0
/* A7A60 80111360 00051080 */  sll       $v0, $a1, 2
/* A7A64 80111364 00C23023 */  subu      $a2, $a2, $v0
/* A7A68 80111368 AE460044 */  sw        $a2, 0x44($s2)
/* A7A6C 8011136C 8E240018 */  lw        $a0, 0x18($s1)
/* A7A70 80111370 0C00A5CF */  jal       dma_copy
/* A7A74 80111374 8E25001C */   lw       $a1, 0x1C($s1)
/* A7A78 80111378 00021082 */  srl       $v0, $v0, 2
/* A7A7C 8011137C 92440004 */  lbu       $a0, 0x4($s2)
/* A7A80 80111380 080444EF */  j         .L801113BC
/* A7A84 80111384 02028021 */   addu     $s0, $s0, $v0
.L80111388:
/* A7A88 80111388 8E22001C */  lw        $v0, 0x1C($s1)
/* A7A8C 8011138C 8E230018 */  lw        $v1, 0x18($s1)
/* A7A90 80111390 92440004 */  lbu       $a0, 0x4($s2)
/* A7A94 80111394 00431023 */  subu      $v0, $v0, $v1
/* A7A98 80111398 00022883 */  sra       $a1, $v0, 2
/* A7A9C 8011139C 8FA20010 */  lw        $v0, 0x10($sp)
/* A7AA0 801113A0 3C038015 */  lui       $v1, %hi(gEntityHeapBase)
/* A7AA4 801113A4 8C6312C4 */  lw        $v1, %lo(gEntityHeapBase)($v1)
/* A7AA8 801113A8 00021080 */  sll       $v0, $v0, 2
/* A7AAC 801113AC 00621823 */  subu      $v1, $v1, $v0
/* A7AB0 801113B0 00051080 */  sll       $v0, $a1, 2
/* A7AB4 801113B4 00621823 */  subu      $v1, $v1, $v0
/* A7AB8 801113B8 AE430044 */  sw        $v1, 0x44($s2)
.L801113BC:
/* A7ABC 801113BC 0C0441A9 */  jal       get_entity_type
/* A7AC0 801113C0 00000000 */   nop
/* A7AC4 801113C4 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* A7AC8 801113C8 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* A7ACC 801113CC 80420070 */  lb        $v0, 0x70($v0)
/* A7AD0 801113D0 14400005 */  bnez      $v0, .L801113E8
/* A7AD4 801113D4 00000000 */   nop
/* A7AD8 801113D8 3C018015 */  lui       $at, %hi(wEntityBlueprintSize)
/* A7ADC 801113DC AC30165C */  sw        $s0, %lo(wEntityBlueprintSize)($at)
/* A7AE0 801113E0 080444FC */  j         .L801113F0
/* A7AE4 801113E4 00000000 */   nop
.L801113E8:
/* A7AE8 801113E8 3C018015 */  lui       $at, %hi(bEntityBlueprintSize)
/* A7AEC 801113EC AC301660 */  sw        $s0, %lo(bEntityBlueprintSize)($at)
.L801113F0:
/* A7AF0 801113F0 8FBF0024 */  lw        $ra, 0x24($sp)
/* A7AF4 801113F4 8FB20020 */  lw        $s2, 0x20($sp)
/* A7AF8 801113F8 8FB1001C */  lw        $s1, 0x1C($sp)
/* A7AFC 801113FC 8FB00018 */  lw        $s0, 0x18($sp)
/* A7B00 80111400 03E00008 */  jr        $ra
/* A7B04 80111404 27BD0028 */   addiu    $sp, $sp, 0x28

### DECOMPILED C INSTRUCTIONS:

void load_simple_entity_data(Entity* entity, EntityBlueprint* bp, s32 listIndex) {
    s32 loadedStart;
    s32 loadedEnd;
    s32 entitySize;
    u32 temp;
    s32 totalSize;

    entity->vertexSegment = 0xA;
    if (!gGameStatusPtr->isBattle) {
        totalSize = wEntityDataLoadedSize;
    } else {
        totalSize = bEntityDataLoadedSize;
    }

    if (is_entity_data_loaded(entity, bp, &loadedStart, &loadedEnd)) {
        if (totalSize + ((bp->dma.end - bp->dma.start) >> 2) > 0x5FFCU) {
            get_entity_type(entity->listIndex);
            get_entity_type(entity->listIndex);
            PANIC();
        }
        entitySize = (bp->dma.end - bp->dma.start) >> 2;
        entity->gfxBaseAddr = (void*)(gEntityHeapBase - totalSize * 4 - entitySize * 4);
        totalSize += dma_copy(bp->dma.start, bp->dma.end, entity->gfxBaseAddr) >> 2;
        get_entity_type(entity->listIndex);
    } else {
        entitySize = (bp->dma.end - bp->dma.start) >> 2;
        entity->gfxBaseAddr = (void*)(gEntityHeapBase - loadedStart * 4 - entitySize * 4);
        get_entity_type(entity->listIndex);
    }

    if (!gGameStatusPtr->isBattle) {
        wEntityDataLoadedSize = totalSize;
    } else {
        bEntityDataLoadedSize = totalSize;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel atan2
/* 5080 80029C80 44863000 */  mtc1      $a2, $f6
/* 5084 80029C84 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 5088 80029C88 F7BA0030 */  sdc1      $f26, 0x30($sp)
/* 508C 80029C8C 460C3681 */  sub.s     $f26, $f6, $f12
/* 5090 80029C90 44873000 */  mtc1      $a3, $f6
/* 5094 80029C94 AFBF0010 */  sw        $ra, 0x10($sp)
/* 5098 80029C98 F7B80028 */  sdc1      $f24, 0x28($sp)
/* 509C 80029C9C 460E3601 */  sub.s     $f24, $f6, $f14
/* 50A0 80029CA0 F7B60020 */  sdc1      $f22, 0x20($sp)
/* 50A4 80029CA4 F7B40018 */  sdc1      $f20, 0x18($sp)
/* 50A8 80029CA8 4600D105 */  abs.s     $f4, $f26
/* 50AC 80029CAC 4600C005 */  abs.s     $f0, $f24
/* 50B0 80029CB0 4604003C */  c.lt.s    $f0, $f4
/* 50B4 80029CB4 00000000 */  nop
/* 50B8 80029CB8 45000029 */  bc1f      .L80029D60
/* 50BC 80029CBC 00000000 */   nop
/* 50C0 80029CC0 3C014234 */  lui       $at, (0x42340000 >> 16)
/* 50C4 80029CC4 44811000 */  mtc1      $at, $f2
/* 50C8 80029CC8 46040003 */  div.s     $f0, $f0, $f4
/* 50CC 80029CCC 46020502 */  mul.s     $f20, $f0, $f2
/* 50D0 80029CD0 00000000 */  nop
/* 50D4 80029CD4 0C00A6B1 */  jal       round
/* 50D8 80029CD8 4614A300 */   add.s    $f12, $f20, $f20
/* 50DC 80029CDC 00021080 */  sll       $v0, $v0, 2
/* 50E0 80029CE0 3C018007 */  lui       $at, %hi(D_80074414)
/* 50E4 80029CE4 00220821 */  addu      $at, $at, $v0
/* 50E8 80029CE8 C4204414 */  lwc1      $f0, %lo(D_80074414)($at)
/* 50EC 80029CEC 4600A502 */  mul.s     $f20, $f20, $f0
/* 50F0 80029CF0 00000000 */  nop
/* 50F4 80029CF4 44800000 */  mtc1      $zero, $f0
/* 50F8 80029CF8 00000000 */  nop
/* 50FC 80029CFC 461A003E */  c.le.s    $f0, $f26
/* 5100 80029D00 00000000 */  nop
/* 5104 80029D04 4500000D */  bc1f      .L80029D3C
/* 5108 80029D08 00000000 */   nop
/* 510C 80029D0C 4618003E */  c.le.s    $f0, $f24
/* 5110 80029D10 00000000 */  nop
/* 5114 80029D14 45000005 */  bc1f      .L80029D2C
/* 5118 80029D18 00000000 */   nop
/* 511C 80029D1C 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 5120 80029D20 44810000 */  mtc1      $at, $f0
/* 5124 80029D24 0800A781 */  j         .L80029E04
/* 5128 80029D28 4600A000 */   add.s    $f0, $f20, $f0
.L80029D2C:
/* 512C 80029D2C 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 5130 80029D30 44810000 */  mtc1      $at, $f0
/* 5134 80029D34 0800A781 */  j         .L80029E04
/* 5138 80029D38 46140001 */   sub.s    $f0, $f0, $f20
.L80029D3C:
/* 513C 80029D3C 4618003E */  c.le.s    $f0, $f24
/* 5140 80029D40 3C014387 */  lui       $at, (0x43870000 >> 16)
/* 5144 80029D44 44810000 */  mtc1      $at, $f0
/* 5148 80029D48 4503002E */  bc1tl     .L80029E04
/* 514C 80029D4C 46140001 */   sub.s    $f0, $f0, $f20
/* 5150 80029D50 3C014387 */  lui       $at, (0x43870000 >> 16)
/* 5154 80029D54 44810000 */  mtc1      $at, $f0
/* 5158 80029D58 0800A781 */  j         .L80029E04
/* 515C 80029D5C 4600A000 */   add.s    $f0, $f20, $f0
.L80029D60:
/* 5160 80029D60 4480B000 */  mtc1      $zero, $f22
/* 5164 80029D64 00000000 */  nop
/* 5168 80029D68 46160032 */  c.eq.s    $f0, $f22
/* 516C 80029D6C 00000000 */  nop
/* 5170 80029D70 45020003 */  bc1fl     .L80029D80
/* 5174 80029D74 46002003 */   div.s    $f0, $f4, $f0
/* 5178 80029D78 0800A781 */  j         .L80029E04
/* 517C 80029D7C 4600B006 */   mov.s    $f0, $f22
.L80029D80:
/* 5180 80029D80 3C014234 */  lui       $at, (0x42340000 >> 16)
/* 5184 80029D84 44811000 */  mtc1      $at, $f2
/* 5188 80029D88 00000000 */  nop
/* 518C 80029D8C 46020502 */  mul.s     $f20, $f0, $f2
/* 5190 80029D90 00000000 */  nop
/* 5194 80029D94 0C00A6B1 */  jal       round
/* 5198 80029D98 4614A300 */   add.s    $f12, $f20, $f20
/* 519C 80029D9C 00021080 */  sll       $v0, $v0, 2
/* 51A0 80029DA0 3C018007 */  lui       $at, %hi(D_80074414)
/* 51A4 80029DA4 00220821 */  addu      $at, $at, $v0
/* 51A8 80029DA8 C4204414 */  lwc1      $f0, %lo(D_80074414)($at)
/* 51AC 80029DAC 4618B03E */  c.le.s    $f22, $f24
/* 51B0 80029DB0 4600A502 */  mul.s     $f20, $f20, $f0
/* 51B4 80029DB4 00000000 */  nop
/* 51B8 80029DB8 4500000A */  bc1f      .L80029DE4
/* 51BC 80029DBC 00000000 */   nop
/* 51C0 80029DC0 461AB03E */  c.le.s    $f22, $f26
/* 51C4 80029DC4 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 51C8 80029DC8 44810000 */  mtc1      $at, $f0
/* 51CC 80029DCC 4503000D */  bc1tl     .L80029E04
/* 51D0 80029DD0 46140001 */   sub.s    $f0, $f0, $f20
/* 51D4 80029DD4 3C014334 */  lui       $at, (0x43340000 >> 16)
/* 51D8 80029DD8 44810000 */  mtc1      $at, $f0
/* 51DC 80029DDC 0800A781 */  j         .L80029E04
/* 51E0 80029DE0 4600A000 */   add.s    $f0, $f20, $f0
.L80029DE4:
/* 51E4 80029DE4 461AB03E */  c.le.s    $f22, $f26
/* 51E8 80029DE8 00000000 */  nop
/* 51EC 80029DEC 45010005 */  bc1t      .L80029E04
/* 51F0 80029DF0 4600A006 */   mov.s    $f0, $f20
/* 51F4 80029DF4 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 51F8 80029DF8 44810000 */  mtc1      $at, $f0
/* 51FC 80029DFC 00000000 */  nop
/* 5200 80029E00 46140001 */  sub.s     $f0, $f0, $f20
.L80029E04:
/* 5204 80029E04 8FBF0010 */  lw        $ra, 0x10($sp)
/* 5208 80029E08 D7BA0030 */  ldc1      $f26, 0x30($sp)
/* 520C 80029E0C D7B80028 */  ldc1      $f24, 0x28($sp)
/* 5210 80029E10 D7B60020 */  ldc1      $f22, 0x20($sp)
/* 5214 80029E14 D7B40018 */  ldc1      $f20, 0x18($sp)
/* 5218 80029E18 03E00008 */  jr        $ra
/* 521C 80029E1C 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ) {
    f32 xDiff = endX - startX;
    f32 zDiff = endZ - startZ;
    f32 absXDiff = fabsf(xDiff);
    f32 absZDiff = fabsf(zDiff);
    f32 ret;

    if (absZDiff < absXDiff) {
        ret = (absZDiff / absXDiff) * 45.0f;
        ret *= sAtanFactors[round(2.0f * ret)];
        if (xDiff >= 0.0f) {
            if (zDiff >= 0.0f) {
                return ret + 90.0f;
            } else {
                return 90.0f - ret;
            }
        }
        if (zDiff >= 0.0f) {
            return 270.0f - ret;
        } else {
            return ret + 270.0f;
        }
    } else {
        if (absZDiff == 0.0f) {
            return 0.0f;
        }
        ret = (absXDiff / absZDiff) * 45.0f;
        ret *= sAtanFactors[round(2.0f * ret)];
        if (zDiff >= 0.0f) {
            if (xDiff >= 0.0f) {
                return 180.0f - ret;
            } else {
                return ret + 180.0f;
            }
        } else if (!(xDiff >= 0.0f)) {
            return 360.0f - ret;
        }
    }
    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel phys_check_interactable_collision
/* 7E624 800E5174 27BDFFB8 */  addiu     $sp, $sp, -0x48
/* 7E628 800E5178 2404FFFF */  addiu     $a0, $zero, -0x1
/* 7E62C 800E517C 3C038011 */  lui       $v1, %hi(gPlayerStatus)
/* 7E630 800E5180 2463EFC8 */  addiu     $v1, $v1, %lo(gPlayerStatus)
/* 7E634 800E5184 AFBF0038 */  sw        $ra, 0x38($sp)
/* 7E638 800E5188 AFB30034 */  sw        $s3, 0x34($sp)
/* 7E63C 800E518C AFB20030 */  sw        $s2, 0x30($sp)
/* 7E640 800E5190 AFB1002C */  sw        $s1, 0x2C($sp)
/* 7E644 800E5194 AFB00028 */  sw        $s0, 0x28($sp)
/* 7E648 800E5198 F7B40040 */  sdc1      $f20, 0x40($sp)
/* 7E64C 800E519C 8C620000 */  lw        $v0, 0x0($v1)
/* 7E650 800E51A0 30422000 */  andi      $v0, $v0, 0x2000
/* 7E654 800E51A4 1440004B */  bnez      $v0, .L800E52D4
/* 7E658 800E51A8 0060802D */   daddu    $s0, $v1, $zero
/* 7E65C 800E51AC 8E0200E0 */  lw        $v0, 0xE0($s0)
/* 7E660 800E51B0 30428000 */  andi      $v0, $v0, 0x8000
/* 7E664 800E51B4 10400047 */  beqz      $v0, .L800E52D4
/* 7E668 800E51B8 27B20018 */   addiu    $s2, $sp, 0x18
/* 7E66C 800E51BC 0200202D */  daddu     $a0, $s0, $zero
/* 7E670 800E51C0 0240282D */  daddu     $a1, $s2, $zero
/* 7E674 800E51C4 27B1001C */  addiu     $s1, $sp, 0x1C
/* 7E678 800E51C8 0220302D */  daddu     $a2, $s1, $zero
/* 7E67C 800E51CC 27B30020 */  addiu     $s3, $sp, 0x20
/* 7E680 800E51D0 0260382D */  daddu     $a3, $s3, $zero
/* 7E684 800E51D4 860200B2 */  lh        $v0, 0xB2($s0)
/* 7E688 800E51D8 C6080080 */  lwc1      $f8, 0x80($s0)
/* 7E68C 800E51DC C6040028 */  lwc1      $f4, 0x28($s0)
/* 7E690 800E51E0 C606002C */  lwc1      $f6, 0x2C($s0)
/* 7E694 800E51E4 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 7E698 800E51E8 4481A000 */  mtc1      $at, $f20
/* 7E69C 800E51EC C6020030 */  lwc1      $f2, 0x30($s0)
/* 7E6A0 800E51F0 44820000 */  mtc1      $v0, $f0
/* 7E6A4 800E51F4 00000000 */  nop
/* 7E6A8 800E51F8 46800020 */  cvt.s.w   $f0, $f0
/* 7E6AC 800E51FC 46140002 */  mul.s     $f0, $f0, $f20
/* 7E6B0 800E5200 00000000 */  nop
/* 7E6B4 800E5204 E7A40018 */  swc1      $f4, 0x18($sp)
/* 7E6B8 800E5208 E7A6001C */  swc1      $f6, 0x1C($sp)
/* 7E6BC 800E520C E7A20020 */  swc1      $f2, 0x20($sp)
/* 7E6C0 800E5210 E7A80014 */  swc1      $f8, 0x14($sp)
/* 7E6C4 800E5214 0C037D18 */  jal       player_test_move_with_slipping
/* 7E6C8 800E5218 E7A00010 */   swc1     $f0, 0x10($sp)
/* 7E6CC 800E521C 0040202D */  daddu     $a0, $v0, $zero
/* 7E6D0 800E5220 0481002D */  bgez      $a0, .L800E52D8
/* 7E6D4 800E5224 0080102D */   daddu    $v0, $a0, $zero
/* 7E6D8 800E5228 C6020054 */  lwc1      $f2, 0x54($s0)
/* 7E6DC 800E522C 44800000 */  mtc1      $zero, $f0
/* 7E6E0 800E5230 00000000 */  nop
/* 7E6E4 800E5234 46001032 */  c.eq.s    $f2, $f0
/* 7E6E8 800E5238 00000000 */  nop
/* 7E6EC 800E523C 45000026 */  bc1f      .L800E52D8
/* 7E6F0 800E5240 0240282D */   daddu    $a1, $s2, $zero
/* 7E6F4 800E5244 0200202D */  daddu     $a0, $s0, $zero
/* 7E6F8 800E5248 0220302D */  daddu     $a2, $s1, $zero
/* 7E6FC 800E524C 0260382D */  daddu     $a3, $s3, $zero
/* 7E700 800E5250 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 7E704 800E5254 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 7E708 800E5258 C4800028 */  lwc1      $f0, 0x28($a0)
/* 7E70C 800E525C C482002C */  lwc1      $f2, 0x2C($a0)
/* 7E710 800E5260 00031080 */  sll       $v0, $v1, 2
/* 7E714 800E5264 00431021 */  addu      $v0, $v0, $v1
/* 7E718 800E5268 00021080 */  sll       $v0, $v0, 2
/* 7E71C 800E526C 00431023 */  subu      $v0, $v0, $v1
/* 7E720 800E5270 E7A00018 */  swc1      $f0, 0x18($sp)
/* 7E724 800E5274 E7A2001C */  swc1      $f2, 0x1C($sp)
/* 7E728 800E5278 848300B2 */  lh        $v1, 0xB2($a0)
/* 7E72C 800E527C 000240C0 */  sll       $t0, $v0, 3
/* 7E730 800E5280 44833000 */  mtc1      $v1, $f6
/* 7E734 800E5284 00000000 */  nop
/* 7E738 800E5288 468031A0 */  cvt.s.w   $f6, $f6
/* 7E73C 800E528C 46143182 */  mul.s     $f6, $f6, $f20
/* 7E740 800E5290 00000000 */  nop
/* 7E744 800E5294 00481021 */  addu      $v0, $v0, $t0
/* 7E748 800E5298 C48000A8 */  lwc1      $f0, 0xA8($a0)
/* 7E74C 800E529C 3C0142B4 */  lui       $at, (0x42B40000 >> 16)
/* 7E750 800E52A0 44811000 */  mtc1      $at, $f2
/* 7E754 800E52A4 000210C0 */  sll       $v0, $v0, 3
/* 7E758 800E52A8 46020001 */  sub.s     $f0, $f0, $f2
/* 7E75C 800E52AC 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 7E760 800E52B0 00220821 */  addu      $at, $at, $v0
/* 7E764 800E52B4 C4221DEC */  lwc1      $f2, %lo(gCameras + 0x6C)($at)
/* 7E768 800E52B8 C4840030 */  lwc1      $f4, 0x30($a0)
/* 7E76C 800E52BC 46020200 */  add.s     $f8, $f0, $f2
/* 7E770 800E52C0 E7A40020 */  swc1      $f4, 0x20($sp)
/* 7E774 800E52C4 E7A60010 */  swc1      $f6, 0x10($sp)
/* 7E778 800E52C8 0C037D18 */  jal       player_test_move_with_slipping
/* 7E77C 800E52CC E7A80014 */   swc1     $f8, 0x14($sp)
/* 7E780 800E52D0 0040202D */  daddu     $a0, $v0, $zero
.L800E52D4:
/* 7E784 800E52D4 0080102D */  daddu     $v0, $a0, $zero
.L800E52D8:
/* 7E788 800E52D8 8FBF0038 */  lw        $ra, 0x38($sp)
/* 7E78C 800E52DC 8FB30034 */  lw        $s3, 0x34($sp)
/* 7E790 800E52E0 8FB20030 */  lw        $s2, 0x30($sp)
/* 7E794 800E52E4 8FB1002C */  lw        $s1, 0x2C($sp)
/* 7E798 800E52E8 8FB00028 */  lw        $s0, 0x28($sp)
/* 7E79C 800E52EC D7B40040 */  ldc1      $f20, 0x40($sp)
/* 7E7A0 800E52F0 03E00008 */  jr        $ra
/* 7E7A4 800E52F4 27BD0048 */   addiu    $sp, $sp, 0x48

### DECOMPILED C INSTRUCTIONS:

s32 phys_check_interactable_collision(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    f32 x, y, z, yaw;
    s32 ret = -1;

    if (playerStatus->flags & PS_FLAG_INPUT_DISABLED) {
        return ret;
    }

    if (playerStatus->pressedButtons & BUTTON_A) {
        yaw = playerStatus->targetYaw;
        x = playerStatus->position.x;
        y = playerStatus->position.y;
        z = playerStatus->position.z;
        ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw);

        if (ret < 0 && playerStatus->currentSpeed == 0.0f) {
            yaw = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw;
            x = playerStatus->position.x;
            y = playerStatus->position.y;
            z = playerStatus->position.z;
            ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw);
        }
    }

    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel test_ray_collider_horizontal
/* 386DC 8005D2DC 27BDFFA8 */  addiu     $sp, $sp, -0x58
/* 386E0 8005D2E0 F7B80040 */  sdc1      $f24, 0x40($sp)
/* 386E4 8005D2E4 4486C000 */  mtc1      $a2, $f24
/* 386E8 8005D2E8 F7BA0048 */  sdc1      $f26, 0x48($sp)
/* 386EC 8005D2EC 4487D000 */  mtc1      $a3, $f26
/* 386F0 8005D2F0 C7AC0070 */  lwc1      $f12, 0x70($sp)
/* 386F4 8005D2F4 3C0140C9 */  lui       $at, (0x40C90FD0 >> 16)
/* 386F8 8005D2F8 34210FD0 */  ori       $at, $at, (0x40C90FD0 & 0xFFFF)
/* 386FC 8005D2FC 44810000 */  mtc1      $at, $f0
/* 38700 8005D300 F7BC0050 */  sdc1      $f28, 0x50($sp)
/* 38704 8005D304 3C01BF80 */  lui       $at, (0xBF800000 >> 16)
/* 38708 8005D308 4481E000 */  mtc1      $at, $f28
/* 3870C 8005D30C AFB1001C */  sw        $s1, 0x1C($sp)
/* 38710 8005D310 0080882D */  daddu     $s1, $a0, $zero
/* 38714 8005D314 AFB00018 */  sw        $s0, 0x18($sp)
/* 38718 8005D318 00A0802D */  daddu     $s0, $a1, $zero
/* 3871C 8005D31C F7B40030 */  sdc1      $f20, 0x30($sp)
/* 38720 8005D320 C7B40068 */  lwc1      $f20, 0x68($sp)
/* 38724 8005D324 27A50010 */  addiu     $a1, $sp, 0x10
/* 38728 8005D328 F7B60038 */  sdc1      $f22, 0x38($sp)
/* 3872C 8005D32C C7B6006C */  lwc1      $f22, 0x6C($sp)
/* 38730 8005D330 46006302 */  mul.s     $f12, $f12, $f0
/* 38734 8005D334 00000000 */  nop
/* 38738 8005D338 3C0143B4 */  lui       $at, (0x43B40000 >> 16)
/* 3873C 8005D33C 44810000 */  mtc1      $at, $f0
/* 38740 8005D340 27A60014 */  addiu     $a2, $sp, 0x14
/* 38744 8005D344 AFBF0028 */  sw        $ra, 0x28($sp)
/* 38748 8005D348 AFB30024 */  sw        $s3, 0x24($sp)
/* 3874C 8005D34C AFB20020 */  sw        $s2, 0x20($sp)
/* 38750 8005D350 0C00A82D */  jal       sin_cos_rad
/* 38754 8005D354 46006303 */   div.s    $f12, $f12, $f0
/* 38758 8005D358 3C13800B */  lui       $s3, %hi(gCollisionData)
/* 3875C 8005D35C 267342E0 */  addiu     $s3, $s3, %lo(gCollisionData)
/* 38760 8005D360 001010C0 */  sll       $v0, $s0, 3
/* 38764 8005D364 00501023 */  subu      $v0, $v0, $s0
/* 38768 8005D368 00021080 */  sll       $v0, $v0, 2
/* 3876C 8005D36C 8E630004 */  lw        $v1, 0x4($s3)
/* 38770 8005D370 C7A00010 */  lwc1      $f0, 0x10($sp)
/* 38774 8005D374 00629021 */  addu      $s2, $v1, $v0
/* 38778 8005D378 8E420000 */  lw        $v0, 0x0($s2)
/* 3877C 8005D37C 3C01800A */  lui       $at, %hi(gCollisionRayDirY)
/* 38780 8005D380 AC204240 */  sw        $zero, %lo(gCollisionRayDirY)($at)
/* 38784 8005D384 3C01800A */  lui       $at, %hi(gCollisionRayStartX)
/* 38788 8005D388 E4384230 */  swc1      $f24, %lo(gCollisionRayStartX)($at)
/* 3878C 8005D38C 3C01800A */  lui       $at, %hi(gCollisionRayStartY)
/* 38790 8005D390 E43A4234 */  swc1      $f26, %lo(gCollisionRayStartY)($at)
/* 38794 8005D394 3C01800A */  lui       $at, %hi(gCollisionRayStartZ)
/* 38798 8005D398 E4344238 */  swc1      $f20, %lo(gCollisionRayStartZ)($at)
/* 3879C 8005D39C 3C01800A */  lui       $at, %hi(gCollisionRayLength)
/* 387A0 8005D3A0 E4364254 */  swc1      $f22, %lo(gCollisionRayLength)($at)
/* 387A4 8005D3A4 3C01800A */  lui       $at, %hi(gCollisionRayDirX)
/* 387A8 8005D3A8 E420423C */  swc1      $f0, %lo(gCollisionRayDirX)($at)
/* 387AC 8005D3AC C7A00014 */  lwc1      $f0, 0x14($sp)
/* 387B0 8005D3B0 00511024 */  and       $v0, $v0, $s1
/* 387B4 8005D3B4 46000007 */  neg.s     $f0, $f0
/* 387B8 8005D3B8 3C01800A */  lui       $at, %hi(gCollisionRayDirZ)
/* 387BC 8005D3BC E4204244 */  swc1      $f0, %lo(gCollisionRayDirZ)($at)
/* 387C0 8005D3C0 14400015 */  bnez      $v0, .L8005D418
/* 387C4 8005D3C4 4600E006 */   mov.s    $f0, $f28
/* 387C8 8005D3C8 8642000A */  lh        $v0, 0xA($s2)
/* 387CC 8005D3CC 10400012 */  beqz      $v0, .L8005D418
/* 387D0 8005D3D0 00000000 */   nop
/* 387D4 8005D3D4 8E51000C */  lw        $s1, 0xC($s2)
/* 387D8 8005D3D8 1840000F */  blez      $v0, .L8005D418
/* 387DC 8005D3DC 0000802D */   daddu    $s0, $zero, $zero
/* 387E0 8005D3E0 0220202D */  daddu     $a0, $s1, $zero
.L8005D3E4:
/* 387E4 8005D3E4 8E650000 */  lw        $a1, 0x0($s3)
/* 387E8 8005D3E8 0C0171E9 */  jal       test_ray_triangle_horizontal
/* 387EC 8005D3EC 26310040 */   addiu    $s1, $s1, 0x40
/* 387F0 8005D3F0 10400003 */  beqz      $v0, .L8005D400
/* 387F4 8005D3F4 00000000 */   nop
/* 387F8 8005D3F8 3C01800A */  lui       $at, %hi(gCollisionRayLength)
/* 387FC 8005D3FC C43C4254 */  lwc1      $f28, %lo(gCollisionRayLength)($at)
.L8005D400:
/* 38800 8005D400 8642000A */  lh        $v0, 0xA($s2)
/* 38804 8005D404 26100001 */  addiu     $s0, $s0, 0x1
/* 38808 8005D408 0202102A */  slt       $v0, $s0, $v0
/* 3880C 8005D40C 1440FFF5 */  bnez      $v0, .L8005D3E4
/* 38810 8005D410 0220202D */   daddu    $a0, $s1, $zero
/* 38814 8005D414 4600E006 */  mov.s     $f0, $f28
.L8005D418:
/* 38818 8005D418 8FBF0028 */  lw        $ra, 0x28($sp)
/* 3881C 8005D41C 8FB30024 */  lw        $s3, 0x24($sp)
/* 38820 8005D420 8FB20020 */  lw        $s2, 0x20($sp)
/* 38824 8005D424 8FB1001C */  lw        $s1, 0x1C($sp)
/* 38828 8005D428 8FB00018 */  lw        $s0, 0x18($sp)
/* 3882C 8005D42C D7BC0050 */  ldc1      $f28, 0x50($sp)
/* 38830 8005D430 D7BA0048 */  ldc1      $f26, 0x48($sp)
/* 38834 8005D434 D7B80040 */  ldc1      $f24, 0x40($sp)
/* 38838 8005D438 D7B60038 */  ldc1      $f22, 0x38($sp)
/* 3883C 8005D43C D7B40030 */  ldc1      $f20, 0x30($sp)
/* 38840 8005D440 03E00008 */  jr        $ra
/* 38844 8005D444 27BD0058 */   addiu    $sp, $sp, 0x58

### DECOMPILED C INSTRUCTIONS:

f32 test_ray_collider_horizontal(s32 ignoreFlags, s32 colliderID, f32 x, f32 y, f32 z, f32 length, f32 yaw) {
    CollisionData* collisionData = &gCollisionData;
    f32 cosTheta;
    f32 sinTheta;
    Collider* collider;
    ColliderTriangle* triangleTable;
    s32 i;
    f32 ret;

    sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta);
    collider = &collisionData->colliderList[colliderID];

    gCollisionRayDirY = 0;
    gCollisionRayStartX = x;
    gCollisionRayStartY = y;
    gCollisionRayStartZ = z;
    gCollisionRayLength = length;
    gCollisionRayDirX = sinTheta;
    gCollisionRayDirZ = -cosTheta;
    ret = -1.0f;

    if (!(collider->flags & ignoreFlags) && collider->numTriangles != 0) {
        triangleTable = collider->triangleTable;

        for (i = 0; i < collider->numTriangles; i++)
            if (test_ray_triangle_horizontal(triangleTable++, collisionData->vertices))
                ret = gCollisionRayLength;
    }

    return ret;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel entity_WoodenCrate_init_fragments
/* 109660 802E7DE0 27BDFF48 */  addiu     $sp, $sp, -0xB8
/* 109664 802E7DE4 AFB3009C */  sw        $s3, 0x9C($sp)
/* 109668 802E7DE8 0080982D */  daddu     $s3, $a0, $zero
/* 10966C 802E7DEC AFB400A0 */  sw        $s4, 0xA0($sp)
/* 109670 802E7DF0 00C0A02D */  daddu     $s4, $a2, $zero
/* 109674 802E7DF4 27A40050 */  addiu     $a0, $sp, 0x50
/* 109678 802E7DF8 AFB20098 */  sw        $s2, 0x98($sp)
/* 10967C 802E7DFC 0000902D */  daddu     $s2, $zero, $zero
/* 109680 802E7E00 AFB600A8 */  sw        $s6, 0xA8($sp)
/* 109684 802E7E04 24160014 */  addiu     $s6, $zero, 0x14
/* 109688 802E7E08 AFB500A4 */  sw        $s5, 0xA4($sp)
/* 10968C 802E7E0C 2415FFF6 */  addiu     $s5, $zero, -0xA
/* 109690 802E7E10 AFBF00AC */  sw        $ra, 0xAC($sp)
/* 109694 802E7E14 AFB10094 */  sw        $s1, 0x94($sp)
/* 109698 802E7E18 AFB00090 */  sw        $s0, 0x90($sp)
/* 10969C 802E7E1C F7B400B0 */  sdc1      $f20, 0xB0($sp)
/* 1096A0 802E7E20 8E620040 */  lw        $v0, 0x40($s3)
/* 1096A4 802E7E24 30A5FFFF */  andi      $a1, $a1, 0xFFFF
/* 1096A8 802E7E28 0040802D */  daddu     $s0, $v0, $zero
/* 1096AC 802E7E2C 8E620044 */  lw        $v0, 0x44($s3)
/* 1096B0 802E7E30 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 1096B4 802E7E34 4481A000 */  mtc1      $at, $f20
/* 1096B8 802E7E38 00451021 */  addu      $v0, $v0, $a1
/* 1096BC 802E7E3C AE020008 */  sw        $v0, 0x8($s0)
/* 1096C0 802E7E40 3C02802F */  lui       $v0, %hi(entity_WoodenCrate_setupGfx)
/* 1096C4 802E7E44 2442854C */  addiu     $v0, $v0, %lo(entity_WoodenCrate_setupGfx)
/* 1096C8 802E7E48 AE62003C */  sw        $v0, 0x3C($s3)
/* 1096CC 802E7E4C 240200FF */  addiu     $v0, $zero, 0xFF
/* 1096D0 802E7E50 A262000B */  sb        $v0, 0xB($s3)
/* 1096D4 802E7E54 C600000C */  lwc1      $f0, 0xC($s0)
/* 1096D8 802E7E58 8E650048 */  lw        $a1, 0x48($s3)
/* 1096DC 802E7E5C 8E670050 */  lw        $a3, 0x50($s3)
/* 1096E0 802E7E60 44060000 */  mfc1      $a2, $f0
/* 1096E4 802E7E64 0200882D */  daddu     $s1, $s0, $zero
/* 1096E8 802E7E68 0C019E40 */  jal       guTranslateF
/* 1096EC 802E7E6C AE66004C */   sw       $a2, 0x4C($s3)
.L802E7E70:
/* 1096F0 802E7E70 3282FFFF */  andi      $v0, $s4, 0xFFFF
/* 1096F4 802E7E74 26940040 */  addiu     $s4, $s4, 0x40
/* 1096F8 802E7E78 8E650044 */  lw        $a1, 0x44($s3)
/* 1096FC 802E7E7C 27A40010 */  addiu     $a0, $sp, 0x10
/* 109700 802E7E80 0C019D60 */  jal       guMtxL2F
/* 109704 802E7E84 00A22821 */   addu     $a1, $a1, $v0
/* 109708 802E7E88 27A40050 */  addiu     $a0, $sp, 0x50
/* 10970C 802E7E8C 27A50010 */  addiu     $a1, $sp, 0x10
/* 109710 802E7E90 0C019D80 */  jal       guMtxCatF
/* 109714 802E7E94 00A0302D */   daddu    $a2, $a1, $zero
/* 109718 802E7E98 C7A00040 */  lwc1      $f0, 0x40($sp)
/* 10971C 802E7E9C E6000154 */  swc1      $f0, 0x154($s0)
/* 109720 802E7EA0 C7A00044 */  lwc1      $f0, 0x44($sp)
/* 109724 802E7EA4 E60001E4 */  swc1      $f0, 0x1E4($s0)
/* 109728 802E7EA8 C7A00048 */  lwc1      $f0, 0x48($sp)
/* 10972C 802E7EAC 240400FF */  addiu     $a0, $zero, 0xFF
/* 109730 802E7EB0 0C00A67F */  jal       rand_int
/* 109734 802E7EB4 E6000274 */   swc1     $f0, 0x274($s0)
/* 109738 802E7EB8 24040005 */  addiu     $a0, $zero, 0x5
/* 10973C 802E7EBC 00021023 */  negu      $v0, $v0
/* 109740 802E7EC0 A2220034 */  sb        $v0, 0x34($s1)
/* 109744 802E7EC4 0C00A67F */  jal       rand_int
/* 109748 802E7EC8 A23600A0 */   sb       $s6, 0xA0($s1)
/* 10974C 802E7ECC 0040182D */  daddu     $v1, $v0, $zero
/* 109750 802E7ED0 32420001 */  andi      $v0, $s2, 0x1
/* 109754 802E7ED4 14400002 */  bnez      $v0, .L802E7EE0
/* 109758 802E7ED8 2462000A */   addiu    $v0, $v1, 0xA
/* 10975C 802E7EDC 02A31023 */  subu      $v0, $s5, $v1
.L802E7EE0:
/* 109760 802E7EE0 44820000 */  mtc1      $v0, $f0
/* 109764 802E7EE4 00000000 */  nop
/* 109768 802E7EE8 46800020 */  cvt.s.w   $f0, $f0
/* 10976C 802E7EEC E60000C4 */  swc1      $f0, 0xC4($s0)
/* 109770 802E7EF0 E6140304 */  swc1      $f20, 0x304($s0)
/* 109774 802E7EF4 A2200010 */  sb        $zero, 0x10($s1)
/* 109778 802E7EF8 A2200058 */  sb        $zero, 0x58($s1)
/* 10977C 802E7EFC A220007C */  sb        $zero, 0x7C($s1)
/* 109780 802E7F00 26310001 */  addiu     $s1, $s1, 0x1
/* 109784 802E7F04 26520001 */  addiu     $s2, $s2, 0x1
/* 109788 802E7F08 2A420023 */  slti      $v0, $s2, 0x23
/* 10978C 802E7F0C 1440FFD8 */  bnez      $v0, .L802E7E70
/* 109790 802E7F10 26100004 */   addiu    $s0, $s0, 0x4
/* 109794 802E7F14 8FBF00AC */  lw        $ra, 0xAC($sp)
/* 109798 802E7F18 8FB600A8 */  lw        $s6, 0xA8($sp)
/* 10979C 802E7F1C 8FB500A4 */  lw        $s5, 0xA4($sp)
/* 1097A0 802E7F20 8FB400A0 */  lw        $s4, 0xA0($sp)
/* 1097A4 802E7F24 8FB3009C */  lw        $s3, 0x9C($sp)
/* 1097A8 802E7F28 8FB20098 */  lw        $s2, 0x98($sp)
/* 1097AC 802E7F2C 8FB10094 */  lw        $s1, 0x94($sp)
/* 1097B0 802E7F30 8FB00090 */  lw        $s0, 0x90($sp)
/* 1097B4 802E7F34 D7B400B0 */  ldc1      $f20, 0xB0($sp)
/* 1097B8 802E7F38 03E00008 */  jr        $ra
/* 1097BC 802E7F3C 27BD00B8 */   addiu    $sp, $sp, 0xB8

### DECOMPILED C INSTRUCTIONS:

void entity_WoodenCrate_init_fragments(Entity* entity, Gfx** dlists, Mtx* matrices) {
    WoodenCrateData* data = entity->dataBuf.crate;
    Matrix4f mtxFragment;
    Matrix4f mtxTrans;
    s32 i;
    s32 rotationSpeed;

    data->fragmentsGfx = ENTITY_ADDR(entity, Gfx**, dlists);
    entity->renderSetupFunc = entity_WoodenCrate_setupGfx;
    entity->alpha = 255;
    entity->position.y = data->basePosY;
    guTranslateF(mtxTrans, entity->position.x, entity->position.y, entity->position.z);

    for (i = 0; i < 35; i++) {
        guMtxL2F(mtxFragment, ENTITY_ADDR(entity, Mtx*, matrices++));
        guMtxCatF(mtxTrans, mtxFragment, mtxFragment);
        data->fragmentPosX[i] = mtxFragment[3][0];
        data->fragmentPosY[i] = mtxFragment[3][1];
        data->fragmentPosZ[i] = mtxFragment[3][2];
        data->fragmentMoveAngle[i] = -rand_int(255);
        data->fragmentLateralSpeed[i] = 20;

        rotationSpeed = rand_int(5);
        if (i % 2 != 0) {
            data->fragmentRotationSpeed[i] = rotationSpeed + 10;
        } else {
            data->fragmentRotationSpeed[i] = -10 - rotationSpeed;
        }

        data->fragmentFallSpeed[i] = 10.0f;
        data->fragmentRebounds[i] = 0;
        data->fragmentRotX[i] = 0;
        data->fragmentRotY[i] = 0;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel MakeEntity
/* A8438 80111D38 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* A843C 80111D3C AFB20030 */  sw        $s2, 0x30($sp)
/* A8440 80111D40 0080902D */  daddu     $s2, $a0, $zero
/* A8444 80111D44 24020001 */  addiu     $v0, $zero, 0x1
/* A8448 80111D48 AFBF004C */  sw        $ra, 0x4C($sp)
/* A844C 80111D4C AFBE0048 */  sw        $fp, 0x48($sp)
/* A8450 80111D50 AFB70044 */  sw        $s7, 0x44($sp)
/* A8454 80111D54 AFB60040 */  sw        $s6, 0x40($sp)
/* A8458 80111D58 AFB5003C */  sw        $s5, 0x3C($sp)
/* A845C 80111D5C AFB40038 */  sw        $s4, 0x38($sp)
/* A8460 80111D60 AFB30034 */  sw        $s3, 0x34($sp)
/* A8464 80111D64 AFB1002C */  sw        $s1, 0x2C($sp)
/* A8468 80111D68 AFB00028 */  sw        $s0, 0x28($sp)
/* A846C 80111D6C 8E50000C */  lw        $s0, 0xC($s2)
/* A8470 80111D70 14A2003E */  bne       $a1, $v0, .L80111E6C
/* A8474 80111D74 24020002 */   addiu    $v0, $zero, 0x2
/* A8478 80111D78 8E050000 */  lw        $a1, 0x0($s0)
/* A847C 80111D7C 26100004 */  addiu     $s0, $s0, 0x4
/* A8480 80111D80 0240202D */  daddu     $a0, $s2, $zero
/* A8484 80111D84 3C118016 */  lui       $s1, %hi(CreateEntityVarArgBuffer2)
/* A8488 80111D88 2631C7D8 */  addiu     $s1, $s1, %lo(CreateEntityVarArgBuffer2)
/* A848C 80111D8C 0C0B1EAF */  jal       evt_get_variable
/* A8490 80111D90 3C148000 */   lui      $s4, (0x80000000 >> 16)
/* A8494 80111D94 8E050000 */  lw        $a1, 0x0($s0)
/* A8498 80111D98 26100004 */  addiu     $s0, $s0, 0x4
/* A849C 80111D9C 0240202D */  daddu     $a0, $s2, $zero
/* A84A0 80111DA0 0C0B1EAF */  jal       evt_get_variable
/* A84A4 80111DA4 0040F02D */   daddu    $fp, $v0, $zero
/* A84A8 80111DA8 8E050000 */  lw        $a1, 0x0($s0)
/* A84AC 80111DAC 26100004 */  addiu     $s0, $s0, 0x4
/* A84B0 80111DB0 0240202D */  daddu     $a0, $s2, $zero
/* A84B4 80111DB4 0C0B1EAF */  jal       evt_get_variable
/* A84B8 80111DB8 0040B02D */   daddu    $s6, $v0, $zero
/* A84BC 80111DBC 8E050000 */  lw        $a1, 0x0($s0)
/* A84C0 80111DC0 26100004 */  addiu     $s0, $s0, 0x4
/* A84C4 80111DC4 0240202D */  daddu     $a0, $s2, $zero
/* A84C8 80111DC8 0C0B1EAF */  jal       evt_get_variable
/* A84CC 80111DCC 0040B82D */   daddu    $s7, $v0, $zero
/* A84D0 80111DD0 8E050000 */  lw        $a1, 0x0($s0)
/* A84D4 80111DD4 26100004 */  addiu     $s0, $s0, 0x4
/* A84D8 80111DD8 0240202D */  daddu     $a0, $s2, $zero
/* A84DC 80111DDC 0C0B1EAF */  jal       evt_get_variable
/* A84E0 80111DE0 0040A82D */   daddu    $s5, $v0, $zero
/* A84E4 80111DE4 0040982D */  daddu     $s3, $v0, $zero
/* A84E8 80111DE8 AE200000 */  sw        $zero, 0x0($s1)
/* A84EC 80111DEC 2631FFFC */  addiu     $s1, $s1, -0x4
/* A84F0 80111DF0 AE200000 */  sw        $zero, 0x0($s1)
/* A84F4 80111DF4 2631FFFC */  addiu     $s1, $s1, -0x4
/* A84F8 80111DF8 AE200000 */  sw        $zero, 0x0($s1)
.L80111DFC:
/* A84FC 80111DFC 8E050000 */  lw        $a1, 0x0($s0)
/* A8500 80111E00 26100004 */  addiu     $s0, $s0, 0x4
/* A8504 80111E04 0C0B1EAF */  jal       evt_get_variable
/* A8508 80111E08 0240202D */   daddu    $a0, $s2, $zero
/* A850C 80111E0C 10540004 */  beq       $v0, $s4, .L80111E20
/* A8510 80111E10 03C0202D */   daddu    $a0, $fp, $zero
/* A8514 80111E14 AE220000 */  sw        $v0, 0x0($s1)
/* A8518 80111E18 0804477F */  j         .L80111DFC
/* A851C 80111E1C 26310004 */   addiu    $s1, $s1, 0x4
.L80111E20:
/* A8520 80111E20 3C028016 */  lui       $v0, %hi(CreateEntityVarArgBuffer)
/* A8524 80111E24 2442C7D0 */  addiu     $v0, $v0, %lo(CreateEntityVarArgBuffer)
/* A8528 80111E28 02C0282D */  daddu     $a1, $s6, $zero
/* A852C 80111E2C 8C430000 */  lw        $v1, 0x0($v0)
/* A8530 80111E30 8C460004 */  lw        $a2, 0x4($v0)
/* A8534 80111E34 8C420008 */  lw        $v0, 0x8($v0)
/* A8538 80111E38 02A0382D */  daddu     $a3, $s5, $zero
/* A853C 80111E3C AFB30010 */  sw        $s3, 0x10($sp)
/* A8540 80111E40 AFB40020 */  sw        $s4, 0x20($sp)
/* A8544 80111E44 AFA60018 */  sw        $a2, 0x18($sp)
/* A8548 80111E48 02E0302D */  daddu     $a2, $s7, $zero
/* A854C 80111E4C AFA30014 */  sw        $v1, 0x14($sp)
/* A8550 80111E50 0C044631 */  jal       create_entity
/* A8554 80111E54 AFA2001C */   sw       $v0, 0x1C($sp)
/* A8558 80111E58 0040182D */  daddu     $v1, $v0, $zero
/* A855C 80111E5C 24020002 */  addiu     $v0, $zero, 0x2
/* A8560 80111E60 3C018015 */  lui       $at, %hi(gLastCreatedEntityIndex)
/* A8564 80111E64 AC2312EC */  sw        $v1, %lo(gLastCreatedEntityIndex)($at)
/* A8568 80111E68 AE430084 */  sw        $v1, 0x84($s2)
.L80111E6C:
/* A856C 80111E6C 8FBF004C */  lw        $ra, 0x4C($sp)
/* A8570 80111E70 8FBE0048 */  lw        $fp, 0x48($sp)
/* A8574 80111E74 8FB70044 */  lw        $s7, 0x44($sp)
/* A8578 80111E78 8FB60040 */  lw        $s6, 0x40($sp)
/* A857C 80111E7C 8FB5003C */  lw        $s5, 0x3C($sp)
/* A8580 80111E80 8FB40038 */  lw        $s4, 0x38($sp)
/* A8584 80111E84 8FB30034 */  lw        $s3, 0x34($sp)
/* A8588 80111E88 8FB20030 */  lw        $s2, 0x30($sp)
/* A858C 80111E8C 8FB1002C */  lw        $s1, 0x2C($sp)
/* A8590 80111E90 8FB00028 */  lw        $s0, 0x28($sp)
/* A8594 80111E94 03E00008 */  jr        $ra
/* A8598 80111E98 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

s32 MakeEntity(Evt* script, s32 isInitialCall) {
    Bytecode* args = script->ptrReadPos;
    EntityBlueprint* entityData;
    s32 x, y, z;
    s32 flags;
    s32 nextArg;
    s32 entityIndex;
    s32 endOfArgs;
    s32* varArgBufPos;

    if (isInitialCall != TRUE) {
        return ApiStatus_DONE2;
    }

    entityData = (EntityBlueprint*)evt_get_variable(script, *args++);
    varArgBufPos = &CreateEntityVarArgBuffer[2];
    endOfArgs = MAKE_ENTITY_END;
    x = evt_get_variable(script, *args++);
    y = evt_get_variable(script, *args++);
    z = evt_get_variable(script, *args++);
    flags = evt_get_variable(script, *args++);

    *varArgBufPos-- = 0;
    *varArgBufPos-- = 0;
    *varArgBufPos = 0;

    do {
        nextArg = evt_get_variable(script, *args++);

        if (nextArg != endOfArgs) {
            *varArgBufPos++ = nextArg;
        }
    } while (nextArg != endOfArgs);

    entityIndex = create_entity(entityData, x, y, z, flags, CreateEntityVarArgBuffer[0], CreateEntityVarArgBuffer[1], CreateEntityVarArgBuffer[2], endOfArgs);
    gLastCreatedEntityIndex = entityIndex;
    script->varTable[0] = entityIndex;
    return ApiStatus_DONE2;
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel update_encounters_conversation
/* 1E49C 8004309C 3C03800A */  lui       $v1, %hi(gEncounterSubState)
/* 1E4A0 800430A0 8C63A5D0 */  lw        $v1, %lo(gEncounterSubState)($v1)
/* 1E4A4 800430A4 27BDFFE0 */  addiu     $sp, $sp, -0x20
/* 1E4A8 800430A8 AFB10014 */  sw        $s1, 0x14($sp)
/* 1E4AC 800430AC 3C11800B */  lui       $s1, %hi(gCurrentEncounter)
/* 1E4B0 800430B0 26310F10 */  addiu     $s1, $s1, %lo(gCurrentEncounter)
/* 1E4B4 800430B4 AFBF0018 */  sw        $ra, 0x18($sp)
/* 1E4B8 800430B8 10600006 */  beqz      $v1, .L800430D4
/* 1E4BC 800430BC AFB00010 */   sw       $s0, 0x10($sp)
/* 1E4C0 800430C0 24020001 */  addiu     $v0, $zero, 0x1
/* 1E4C4 800430C4 1062001B */  beq       $v1, $v0, .L80043134
/* 1E4C8 800430C8 00000000 */   nop
/* 1E4CC 800430CC 08010C70 */  j         .L800431C0
/* 1E4D0 800430D0 00000000 */   nop
.L800430D4:
/* 1E4D4 800430D4 8E30008C */  lw        $s0, 0x8C($s1)
/* 1E4D8 800430D8 8E020038 */  lw        $v0, 0x38($s0)
/* 1E4DC 800430DC 10400007 */  beqz      $v0, .L800430FC
/* 1E4E0 800430E0 0000882D */   daddu    $s1, $zero, $zero
/* 1E4E4 800430E4 8E040050 */  lw        $a0, 0x50($s0)
/* 1E4E8 800430E8 0C0B1059 */  jal       does_script_exist
/* 1E4EC 800430EC 00000000 */   nop
/* 1E4F0 800430F0 50400002 */  beql      $v0, $zero, .L800430FC
/* 1E4F4 800430F4 AE000038 */   sw       $zero, 0x38($s0)
/* 1E4F8 800430F8 24110001 */  addiu     $s1, $zero, 0x1
.L800430FC:
/* 1E4FC 800430FC 8E020040 */  lw        $v0, 0x40($s0)
/* 1E500 80043100 10400006 */  beqz      $v0, .L8004311C
/* 1E504 80043104 00000000 */   nop
/* 1E508 80043108 0C0B1059 */  jal       does_script_exist
/* 1E50C 8004310C 8E040058 */   lw       $a0, 0x58($s0)
/* 1E510 80043110 50400002 */  beql      $v0, $zero, .L8004311C
/* 1E514 80043114 AE000040 */   sw       $zero, 0x40($s0)
/* 1E518 80043118 24110001 */  addiu     $s1, $zero, 0x1
.L8004311C:
/* 1E51C 8004311C 16200028 */  bnez      $s1, .L800431C0
/* 1E520 80043120 24020001 */   addiu    $v0, $zero, 0x1
/* 1E524 80043124 3C01800A */  lui       $at, %hi(gEncounterSubState)
/* 1E528 80043128 AC22A5D0 */  sw        $v0, %lo(gEncounterSubState)($at)
/* 1E52C 8004312C 08010C70 */  j         .L800431C0
/* 1E530 80043130 00000000 */   nop
.L80043134:
/* 1E534 80043134 0C0B1192 */  jal       resume_all_group
/* 1E538 80043138 24040001 */   addiu    $a0, $zero, 0x1
/* 1E53C 8004313C 8E30008C */  lw        $s0, 0x8C($s1)
/* 1E540 80043140 12000006 */  beqz      $s0, .L8004315C
/* 1E544 80043144 00000000 */   nop
/* 1E548 80043148 8E02003C */  lw        $v0, 0x3C($s0)
/* 1E54C 8004314C 10400003 */  beqz      $v0, .L8004315C
/* 1E550 80043150 00000000 */   nop
/* 1E554 80043154 0C0B1123 */  jal       resume_all_script
/* 1E558 80043158 8E040054 */   lw       $a0, 0x54($s0)
.L8004315C:
/* 1E55C 8004315C 0C038069 */  jal       enable_player_input
/* 1E560 80043160 00000000 */   nop
/* 1E564 80043164 0C03BD80 */  jal       partner_enable_input
/* 1E568 80043168 00000000 */   nop
/* 1E56C 8004316C 3C028011 */  lui       $v0, %hi(gPlayerStatus)
/* 1E570 80043170 2442EFC8 */  addiu     $v0, $v0, %lo(gPlayerStatus)
/* 1E574 80043174 804300B4 */  lb        $v1, 0xB4($v0)
/* 1E578 80043178 2402000C */  addiu     $v0, $zero, 0xC
/* 1E57C 8004317C 14620003 */  bne       $v1, $v0, .L8004318C
/* 1E580 80043180 00000000 */   nop
/* 1E584 80043184 0C039769 */  jal       set_action_state
/* 1E588 80043188 0000202D */   daddu    $a0, $zero, $zero
.L8004318C:
/* 1E58C 8004318C 0C03BCF5 */  jal       func_800EF3D4
/* 1E590 80043190 0000202D */   daddu    $a0, $zero, $zero
/* 1E594 80043194 24040010 */  addiu     $a0, $zero, 0x10
/* 1E598 80043198 0C0B1192 */  jal       resume_all_group
/* 1E59C 8004319C A2200005 */   sb       $zero, 0x5($s1)
/* 1E5A0 800431A0 24020002 */  addiu     $v0, $zero, 0x2
/* 1E5A4 800431A4 3C01800A */  lui       $at, %hi(gEncounterState)
/* 1E5A8 800431A8 AC22A600 */  sw        $v0, %lo(gEncounterState)($at)
/* 1E5AC 800431AC 24020001 */  addiu     $v0, $zero, 0x1
/* 1E5B0 800431B0 3C01800A */  lui       $at, %hi(D_8009A678)
/* 1E5B4 800431B4 AC22A678 */  sw        $v0, %lo(D_8009A678)($at)
/* 1E5B8 800431B8 3C01800A */  lui       $at, %hi(gEncounterSubState)
/* 1E5BC 800431BC AC20A5D0 */  sw        $zero, %lo(gEncounterSubState)($at)
.L800431C0:
/* 1E5C0 800431C0 8FBF0018 */  lw        $ra, 0x18($sp)
/* 1E5C4 800431C4 8FB10014 */  lw        $s1, 0x14($sp)
/* 1E5C8 800431C8 8FB00010 */  lw        $s0, 0x10($sp)
/* 1E5CC 800431CC 03E00008 */  jr        $ra
/* 1E5D0 800431D0 27BD0020 */   addiu    $sp, $sp, 0x20

### DECOMPILED C INSTRUCTIONS:

void update_encounters_conversation(void) {
    EncounterStatus* encounter = &gCurrentEncounter;
    PlayerStatus* playerStatus = &gPlayerStatus;
    Enemy* currentEnemy;
    s32 flag;

    switch (gEncounterSubState) {
        case ENCOUNTER_SUBSTATE_CONVERSATION_INIT:
            currentEnemy = encounter->currentEnemy;
            flag = FALSE;

            if (currentEnemy->interactScript != NULL) {
                if (does_script_exist(currentEnemy->interactScriptID)) {
                    flag = TRUE;
                } else {
                    currentEnemy->interactScript = NULL;
                }
            }

            if (currentEnemy->hitScript != NULL) {
                if (does_script_exist(currentEnemy->hitScriptID)) {
                    flag = TRUE;
                } else {
                    currentEnemy->hitScript = NULL;
                }
            }

            if (!flag) {
                gEncounterSubState = ENCOUNTER_SUBSTATE_CONVERSATION_END;
            }
            break;
        case ENCOUNTER_SUBSTATE_CONVERSATION_END:
            resume_all_group(EVT_GROUP_01);

            currentEnemy = encounter->currentEnemy;
            if (currentEnemy != NULL && currentEnemy->aiScript != NULL) {
                resume_all_script(currentEnemy->aiScriptID);
            }

            enable_player_input();
            partner_enable_input();

            if (playerStatus->actionState == ACTION_STATE_TALK) {
                set_action_state(ACTION_STATE_IDLE);
            }

            func_800EF3D4(0);
            encounter->hitType = 0;
            resume_all_group(EVT_GROUP_10);
            gEncounterState = ENCOUNTER_STATE_NEUTRAL;
            D_8009A678 = 1;
            gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL;
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_802B6348
/* E24388 802B6348 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* E2438C 802B634C 3C058011 */  lui       $a1, %hi(gPlayerStatus)
PlayerTweesterPhysicsPtr:
/* E24390 802B6350 24A5EFC8 */  addiu     $a1, $a1, %lo(gPlayerStatus)
glabel .L802B6354
/* E24394 802B6354 AFBF004C */  sw        $ra, 0x4C($sp)
/* E24398 802B6358 AFB00048 */  sw        $s0, 0x48($sp)
.L802B635C:
/* E2439C 802B635C 8CA20004 */  lw        $v0, 0x4($a1)
D_802B6360:
/* E243A0 802B6360 30421000 */  andi      $v0, $v0, 0x1000
.L802B6364:
/* E243A4 802B6364 10400005 */  beqz      $v0, .L802B637C
/* E243A8 802B6368 00A0802D */   daddu    $s0, $a1, $zero
.L802B636C:
/* E243AC 802B636C 0C0AD942 */  jal       action_update_pushing_block
glabel .L802B6370
/* E243B0 802B6370 00000000 */   nop
.L802B6374:
/* E243B4 802B6374 080AD91B */  j         .L802B646C
/* E243B8 802B6378 00000000 */   nop
glabel .L802B637C
/* E243BC 802B637C 8CA30000 */  lw        $v1, 0x0($a1)
/* E243C0 802B6380 0461000A */  bgez      $v1, .L802B63AC
/* E243C4 802B6384 3C027FFF */   lui      $v0, (0x7FFFFFF5 >> 16)
/* E243C8 802B6388 3442FFF5 */  ori       $v0, $v0, (0x7FFFFFF5 & 0xFFFF)
/* E243CC 802B638C 00621024 */  and       $v0, $v1, $v0
/* E243D0 802B6390 3C04800B */  lui       $a0, %hi(gCameras)
glabel .L802B6394
/* E243D4 802B6394 24841D80 */  addiu     $a0, $a0, %lo(gCameras)
.L802B6398:
/* E243D8 802B6398 94830002 */  lhu       $v1, 0x2($a0)
.L802B639C:
/* E243DC 802B639C 34420004 */  ori       $v0, $v0, 0x4
/* E243E0 802B63A0 ACA20000 */  sw        $v0, 0x0($a1)
/* E243E4 802B63A4 34630001 */  ori       $v1, $v1, 0x1
.L802B63A8:
/* E243E8 802B63A8 A4830002 */  sh        $v1, 0x2($a0)
.L802B63AC:
/* E243EC 802B63AC 960200C0 */  lhu       $v0, 0xC0($s0)
glabel .L802B63B0
/* E243F0 802B63B0 24420001 */  addiu     $v0, $v0, 0x1
/* E243F4 802B63B4 0C039454 */  jal       phys_update_interact_collider
/* E243F8 802B63B8 A60200C0 */   sh       $v0, 0xC0($s0)
/* E243FC 802B63BC 0200202D */  daddu     $a0, $s0, $zero
.L802B63C0:
/* E24400 802B63C0 27A50028 */  addiu     $a1, $sp, 0x28
.L802B63C4:
/* E24404 802B63C4 27A6002C */  addiu     $a2, $sp, 0x2C
.L802B63C8:
/* E24408 802B63C8 C6000028 */  lwc1      $f0, 0x28($s0)
.L802B63CC:
/* E2440C 802B63CC C602002C */  lwc1      $f2, 0x2C($s0)
.L802B63D0:
/* E24410 802B63D0 C6040030 */  lwc1      $f4, 0x30($s0)
glabel action_update_first_strike
/* E24414 802B63D4 860200B0 */  lh        $v0, 0xB0($s0)
.L802B63D8:
/* E24418 802B63D8 27A70030 */  addiu     $a3, $sp, 0x30
glabel .L802B63DC
/* E2441C 802B63DC E7A00028 */  swc1      $f0, 0x28($sp)
.L802B63E0:
/* E24420 802B63E0 44820000 */  mtc1      $v0, $f0
.L802B63E4:
/* E24424 802B63E4 00000000 */  nop
/* E24428 802B63E8 46800020 */  cvt.s.w   $f0, $f0
/* E2442C 802B63EC 27A20034 */  addiu     $v0, $sp, 0x34
.L802B63F0:
/* E24430 802B63F0 E7A2002C */  swc1      $f2, 0x2C($sp)
.L802B63F4:
/* E24434 802B63F4 E7A40030 */  swc1      $f4, 0x30($sp)
/* E24438 802B63F8 E7A00034 */  swc1      $f0, 0x34($sp)
/* E2443C 802B63FC AFA20010 */  sw        $v0, 0x10($sp)
.L802B6400:
/* E24440 802B6400 27A20038 */  addiu     $v0, $sp, 0x38
/* E24444 802B6404 AFA20014 */  sw        $v0, 0x14($sp)
/* E24448 802B6408 27A2003C */  addiu     $v0, $sp, 0x3C
.L802B640C:
/* E2444C 802B640C AFA20018 */  sw        $v0, 0x18($sp)
/* E24450 802B6410 27A20040 */  addiu     $v0, $sp, 0x40
.L802B6414:
/* E24454 802B6414 AFA2001C */  sw        $v0, 0x1C($sp)
.L802B6418:
/* E24458 802B6418 27A20044 */  addiu     $v0, $sp, 0x44
/* E2445C 802B641C 0C03791B */  jal       player_raycast_below_cam_relative
.L802B6420:
/* E24460 802B6420 AFA20020 */   sw       $v0, 0x20($sp)
.L802B6424:
/* E24464 802B6424 0C016F6A */  jal       get_collider_flags
.L802B6428:
/* E24468 802B6428 0040202D */   daddu    $a0, $v0, $zero
.L802B642C:
/* E2446C 802B642C 304200FF */  andi      $v0, $v0, 0xFF
D_802B6430:
/* E24470 802B6430 2442FFFE */  addiu     $v0, $v0, -0x2
/* E24474 802B6434 2C420002 */  sltiu     $v0, $v0, 0x2
/* E24478 802B6438 1440000C */  bnez      $v0, .L802B646C
/* E2447C 802B643C 00000000 */   nop
/* E24480 802B6440 0C039858 */  jal       check_input_jump
/* E24484 802B6444 00000000 */   nop
.L802B6448:
/* E24488 802B6448 10400008 */  beqz      $v0, .L802B646C
glabel action_update_peach_step_down_land
/* E2448C 802B644C 00000000 */   nop
.L802B6450:
/* E24490 802B6450 0C039769 */  jal       set_action_state
.L802B6454:
/* E24494 802B6454 24040003 */   addiu    $a0, $zero, 0x3
/* E24498 802B6458 8E020000 */  lw        $v0, 0x0($s0)
/* E2449C 802B645C 2403FFF1 */  addiu     $v1, $zero, -0xF
.L802B6460:
/* E244A0 802B6460 00431024 */  and       $v0, $v0, $v1
.L802B6464:
/* E244A4 802B6464 0C0AD82D */  jal       action_update_jump
/* E244A8 802B6468 AE020000 */   sw       $v0, 0x0($s0)
glabel .L802B646C
/* E244AC 802B646C 8FBF004C */  lw        $ra, 0x4C($sp)
/* E244B0 802B6470 8FB00048 */  lw        $s0, 0x48($sp)
/* E244B4 802B6474 03E00008 */  jr        $ra
glabel action_update_raise_arms
/* E244B8 802B6478 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void action_update_step_down(void) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    s32 colliderID;
    s32 surfaceType;
    f32 posX, posY, posZ;
    f32 hitRx, hitRz;
    f32 hitDirX, hitDirZ;
    f32 height;

    if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) {
        action_update_peach_step_down();
        return;
    }

    if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) {
        playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_JUMPING | PS_FLAG_FLYING);
        playerStatus->flags |= PS_FLAG_FALLING;
        gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y;
    }

    playerStatus->timeInAir++;
    phys_update_interact_collider();
    posX = playerStatus->position.x;
    posY = playerStatus->position.y;
    posZ = playerStatus->position.z;
    height = playerStatus->colliderHeight;

    colliderID = player_raycast_below_cam_relative(playerStatus, &posX, &posY, &posZ, &height, &hitRx, &hitRz, &hitDirX, &hitDirZ);
    surfaceType = get_collider_flags(colliderID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK;
    if (!(surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) && check_input_jump()) {
        set_action_state(ACTION_STATE_JUMP);
        playerStatus->flags &= ~PS_FLAG_AIRBORNE;
        action_update_jump();
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

dlabel func_80253D10
/* 1825F0 80253D10 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 1825F4 80253D14 AFB40020 */  sw        $s4, 0x20($sp)
/* 1825F8 80253D18 0080A02D */  daddu     $s4, $a0, $zero
/* 1825FC 80253D1C AFB7002C */  sw        $s7, 0x2C($sp)
/* 182600 80253D20 3C17800E */  lui       $s7, %hi(gBattleStatus)
/* 182604 80253D24 26F7C070 */  addiu     $s7, $s7, %lo(gBattleStatus)
/* 182608 80253D28 240600FF */  addiu     $a2, $zero, 0xFF
/* 18260C 80253D2C AFB60028 */  sw        $s6, 0x28($sp)
/* 182610 80253D30 24160001 */  addiu     $s6, $zero, 0x1
/* 182614 80253D34 3C058028 */  lui       $a1, %hi(D_80284044)
/* 182618 80253D38 24A54044 */  addiu     $a1, $a1, %lo(D_80284044)
/* 18261C 80253D3C AFBF0030 */  sw        $ra, 0x30($sp)
/* 182620 80253D40 AFB50024 */  sw        $s5, 0x24($sp)
/* 182624 80253D44 AFB3001C */  sw        $s3, 0x1C($sp)
/* 182628 80253D48 AFB20018 */  sw        $s2, 0x18($sp)
/* 18262C 80253D4C AFB10014 */  sw        $s1, 0x14($sp)
/* 182630 80253D50 AFB00010 */  sw        $s0, 0x10($sp)
.L80253D54:
/* 182634 80253D54 8CA40000 */  lw        $a0, 0x0($a1)
/* 182638 80253D58 10800029 */  beqz      $a0, .L80253E00
/* 18263C 80253D5C 00000000 */   nop
/* 182640 80253D60 90820000 */  lbu       $v0, 0x0($a0)
/* 182644 80253D64 10460024 */  beq       $v0, $a2, .L80253DF8
/* 182648 80253D68 0080182D */   daddu    $v1, $a0, $zero
.L80253D6C:
/* 18264C 80253D6C 90620000 */  lbu       $v0, 0x0($v1)
/* 182650 80253D70 5682001E */  bnel      $s4, $v0, .L80253DEC
/* 182654 80253D74 24630001 */   addiu    $v1, $v1, 0x1
/* 182658 80253D78 90820000 */  lbu       $v0, 0x0($a0)
/* 18265C 80253D7C 10460033 */  beq       $v0, $a2, .L80253E4C
/* 182660 80253D80 241500FF */   addiu    $s5, $zero, 0xFF
/* 182664 80253D84 0080982D */  daddu     $s3, $a0, $zero
.L80253D88:
/* 182668 80253D88 92740000 */  lbu       $s4, 0x0($s3)
/* 18266C 80253D8C 06810002 */  bgez      $s4, .L80253D98
/* 182670 80253D90 0280802D */   daddu    $s0, $s4, $zero
/* 182674 80253D94 26900007 */  addiu     $s0, $s4, 0x7
.L80253D98:
/* 182678 80253D98 001080C3 */  sra       $s0, $s0, 3
/* 18267C 80253D9C 2611016D */  addiu     $s1, $s0, 0x16D
/* 182680 80253DA0 0C05154E */  jal       get_global_byte
/* 182684 80253DA4 0220202D */   daddu    $a0, $s1, $zero
/* 182688 80253DA8 001018C0 */  sll       $v1, $s0, 3
/* 18268C 80253DAC 02831823 */  subu      $v1, $s4, $v1
/* 182690 80253DB0 00761804 */  sllv      $v1, $s6, $v1
/* 182694 80253DB4 00439025 */  or        $s2, $v0, $v1
/* 182698 80253DB8 0220202D */  daddu     $a0, $s1, $zero
/* 18269C 80253DBC 0C051548 */  jal       set_global_byte
/* 1826A0 80253DC0 0240282D */   daddu    $a1, $s2, $zero
/* 1826A4 80253DC4 02F08021 */  addu      $s0, $s7, $s0
/* 1826A8 80253DC8 92020440 */  lbu       $v0, 0x440($s0)
/* 1826AC 80253DCC 26730001 */  addiu     $s3, $s3, 0x1
/* 1826B0 80253DD0 00521025 */  or        $v0, $v0, $s2
/* 1826B4 80253DD4 A2020440 */  sb        $v0, 0x440($s0)
/* 1826B8 80253DD8 92620000 */  lbu       $v0, 0x0($s3)
/* 1826BC 80253DDC 1055001B */  beq       $v0, $s5, .L80253E4C
/* 1826C0 80253DE0 00000000 */   nop
/* 1826C4 80253DE4 08094F62 */  j         .L80253D88
/* 1826C8 80253DE8 00000000 */   nop
.L80253DEC:
/* 1826CC 80253DEC 90620000 */  lbu       $v0, 0x0($v1)
/* 1826D0 80253DF0 1446FFDE */  bne       $v0, $a2, .L80253D6C
/* 1826D4 80253DF4 00000000 */   nop
.L80253DF8:
/* 1826D8 80253DF8 08094F55 */  j         .L80253D54
/* 1826DC 80253DFC 24A50004 */   addiu    $a1, $a1, 0x4
.L80253E00:
/* 1826E0 80253E00 06810002 */  bgez      $s4, .L80253E0C
/* 1826E4 80253E04 0280202D */   daddu    $a0, $s4, $zero
/* 1826E8 80253E08 26840007 */  addiu     $a0, $s4, 0x7
.L80253E0C:
/* 1826EC 80253E0C 000488C3 */  sra       $s1, $a0, 3
/* 1826F0 80253E10 2630016D */  addiu     $s0, $s1, 0x16D
/* 1826F4 80253E14 0C05154E */  jal       get_global_byte
/* 1826F8 80253E18 0200202D */   daddu    $a0, $s0, $zero
/* 1826FC 80253E1C 001120C0 */  sll       $a0, $s1, 3
/* 182700 80253E20 02842023 */  subu      $a0, $s4, $a0
/* 182704 80253E24 24030001 */  addiu     $v1, $zero, 0x1
/* 182708 80253E28 00831804 */  sllv      $v1, $v1, $a0
/* 18270C 80253E2C 00439025 */  or        $s2, $v0, $v1
/* 182710 80253E30 0200202D */  daddu     $a0, $s0, $zero
/* 182714 80253E34 0C051548 */  jal       set_global_byte
/* 182718 80253E38 0240282D */   daddu    $a1, $s2, $zero
/* 18271C 80253E3C 02F11821 */  addu      $v1, $s7, $s1
/* 182720 80253E40 90620440 */  lbu       $v0, 0x440($v1)
/* 182724 80253E44 00521025 */  or        $v0, $v0, $s2
/* 182728 80253E48 A0620440 */  sb        $v0, 0x440($v1)
.L80253E4C:
/* 18272C 80253E4C 8FBF0030 */  lw        $ra, 0x30($sp)
/* 182730 80253E50 8FB7002C */  lw        $s7, 0x2C($sp)
/* 182734 80253E54 8FB60028 */  lw        $s6, 0x28($sp)
/* 182738 80253E58 8FB50024 */  lw        $s5, 0x24($sp)
/* 18273C 80253E5C 8FB40020 */  lw        $s4, 0x20($sp)
/* 182740 80253E60 8FB3001C */  lw        $s3, 0x1C($sp)
/* 182744 80253E64 8FB20018 */  lw        $s2, 0x18($sp)
/* 182748 80253E68 8FB10014 */  lw        $s1, 0x14($sp)
/* 18274C 80253E6C 8FB00010 */  lw        $s0, 0x10($sp)
/* 182750 80253E70 03E00008 */  jr        $ra
/* 182754 80253E74 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void save_tattle_flags(s32 actorType) {
    BattleStatus* battleStatus = &gBattleStatus;
    u8* types;
    s32 gb;
    s32 i = 0;
    s32 j;
    s32 k;

    while (TRUE) {
        types = ActorTypesLists[i];
        if (types == NULL) {
            break;
        }

        for (j = 0; types[j] != ACTOR_TYPE_LIST_END; j++) {
            if (actorType == types[j]) {
                for (k = 0; types[k] != ACTOR_TYPE_LIST_END; k++) {
                    actorType = types[k];

                    gb = get_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8);
                    gb |= 1 << (actorType % 8);
                    set_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8, gb);
                    battleStatus->tattleFlags[actorType / 8] |= gb;
                }
                return;
            }
        }
        i++;
    }

    gb = get_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8);
    gb |= 1 << (actorType % 8);
    set_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8, gb);
    battleStatus->tattleFlags[actorType / 8] |= gb;
}