### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80244710
/* 172FF0 80244710 27BDFFC8 */  addiu     $sp, $sp, -0x38
/* 172FF4 80244714 AFB30024 */  sw        $s3, 0x24($sp)
D_80244718:
/* 172FF8 80244718 3C13800E */  lui       $s3, %hi(gBattleStatus)
/* 172FFC 8024471C 2673C070 */  addiu     $s3, $s3, %lo(gBattleStatus)
jtbl_80244720:
/* 173000 80244720 AFB5002C */  sw        $s5, 0x2C($sp)
.L80244724:
/* 173004 80244724 3C158011 */  lui       $s5, %hi(gPlayerData)
/* 173008 80244728 26B5F290 */  addiu     $s5, $s5, %lo(gPlayerData)
/* 17300C 8024472C AFB20020 */  sw        $s2, 0x20($sp)
/* 173010 80244730 3C12800E */  lui       $s2, %hi(gBattleSubState)
flo_25_pad_4734:
/* 173014 80244734 2652C4DC */  addiu     $s2, $s2, %lo(gBattleSubState)
D_80244738:
/* 173018 80244738 AFBF0030 */  sw        $ra, 0x30($sp)
D_8024473C:
/* 17301C 8024473C AFB40028 */  sw        $s4, 0x28($sp)
D_80244740:
/* 173020 80244740 AFB1001C */  sw        $s1, 0x1C($sp)
/* 173024 80244744 AFB00018 */  sw        $s0, 0x18($sp)
/* 173028 80244748 8E7000D8 */  lw        $s0, 0xD8($s3)
/* 17302C 8024474C 8E430000 */  lw        $v1, 0x0($s2)
D_80244750:
/* 173030 80244750 8E7100DC */  lw        $s1, 0xDC($s3)
/* 173034 80244754 10600005 */  beqz      $v1, D_8024476C
D_80244758:
/* 173038 80244758 2402000A */   addiu    $v0, $zero, 0xA
.L8024475C:
/* 17303C 8024475C 1062003B */  beq       $v1, $v0, .L8024484C
/* 173040 80244760 00000000 */   nop
/* 173044 80244764 08091228 */  j         D_802448A0
/* 173048 80244768 00000000 */   nop
D_8024476C:
/* 17304C 8024476C 3C03F3FF */  lui       $v1, (0xF3FFFFFF >> 16)
/* 173050 80244770 8E020000 */  lw        $v0, 0x0($s0)
D_80244774:
/* 173054 80244774 3463FFFF */  ori       $v1, $v1, (0xF3FFFFFF & 0xFFFF)
.L80244778:
/* 173058 80244778 00431024 */  and       $v0, $v0, $v1
/* 17305C 8024477C 12200004 */  beqz      $s1, D_80244790
/* 173060 80244780 AE020000 */   sw       $v0, 0x0($s0)
.L80244784:
/* 173064 80244784 8E220000 */  lw        $v0, 0x0($s1)
D_80244788:
/* 173068 80244788 00431024 */  and       $v0, $v0, $v1
/* 17306C 8024478C AE220000 */  sw        $v0, 0x0($s1)
D_80244790:
/* 173070 80244790 2402000B */  addiu     $v0, $zero, 0xB
/* 173074 80244794 AE420000 */  sw        $v0, 0x0($s2)
D_80244798:
/* 173078 80244798 8E620004 */  lw        $v0, 0x4($s3)
/* 17307C 8024479C 2403FFFD */  addiu     $v1, $zero, -0x3
D_802447A0:
/* 173080 802447A0 00431024 */  and       $v0, $v0, $v1
/* 173084 802447A4 2403FFFB */  addiu     $v1, $zero, -0x5
D_802447A8:
/* 173088 802447A8 00431024 */  and       $v0, $v0, $v1
D_802447AC:
/* 17308C 802447AC 2403FFF7 */  addiu     $v1, $zero, -0x9
D_802447B0:
/* 173090 802447B0 00431024 */  and       $v0, $v0, $v1
/* 173094 802447B4 2403FFEF */  addiu     $v1, $zero, -0x11
.L802447B8:
/* 173098 802447B8 00431024 */  and       $v0, $v0, $v1
.L802447BC:
/* 17309C 802447BC AE620004 */  sw        $v0, 0x4($s3)
D_802447C0:
/* 1730A0 802447C0 82020216 */  lb        $v0, 0x216($s0)
.L802447C4:
/* 1730A4 802447C4 2414000D */  addiu     $s4, $zero, 0xD
/* 1730A8 802447C8 14540005 */  bne       $v0, $s4, D_802447E0
/* 1730AC 802447CC 00000000 */   nop
D_802447D0:
/* 1730B0 802447D0 0C09C596 */  jal       dispatch_event_player
D_802447D4:
/* 1730B4 802447D4 24040034 */   addiu    $a0, $zero, 0x34
D_802447D8:
/* 1730B8 802447D8 2402000A */  addiu     $v0, $zero, 0xA
arn_03_pad_47DC:
/* 1730BC 802447DC AE420000 */  sw        $v0, 0x0($s2)
D_802447E0:
/* 1730C0 802447E0 8E020440 */  lw        $v0, 0x440($s0)
D_802447E4:
/* 1730C4 802447E4 A2000210 */  sb        $zero, 0x210($s0)
D_802447E8:
/* 1730C8 802447E8 A2000212 */  sb        $zero, 0x212($s0)
/* 1730CC 802447EC A2000214 */  sb        $zero, 0x214($s0)
/* 1730D0 802447F0 A2000218 */  sb        $zero, 0x218($s0)
glabel func_802447F4
/* 1730D4 802447F4 A2000216 */  sb        $zero, 0x216($s0)
.L802447F8:
/* 1730D8 802447F8 A2000217 */  sb        $zero, 0x217($s0)
/* 1730DC 802447FC 8C42000C */  lw        $v0, 0xC($v0)
/* 1730E0 80244800 12200027 */  beqz      $s1, D_802448A0
D_80244804:
/* 1730E4 80244804 AC40003C */   sw       $zero, 0x3C($v0)
/* 1730E8 80244808 82220216 */  lb        $v0, 0x216($s1)
/* 1730EC 8024480C 14540005 */  bne       $v0, $s4, .L80244824
D_80244810:
/* 1730F0 80244810 00000000 */   nop
.L80244814:
/* 1730F4 80244814 0C09F7A0 */  jal       dispatch_event_partner
D_80244818:
/* 1730F8 80244818 24040034 */   addiu    $a0, $zero, 0x34
/* 1730FC 8024481C 2402000A */  addiu     $v0, $zero, 0xA
D_80244820:
/* 173100 80244820 AE420000 */  sw        $v0, 0x0($s2)
.L80244824:
/* 173104 80244824 8E220440 */  lw        $v0, 0x440($s1)
jtbl_80244828:
/* 173108 80244828 A2200210 */  sb        $zero, 0x210($s1)
/* 17310C 8024482C A2200212 */  sb        $zero, 0x212($s1)
D_80244830:
/* 173110 80244830 A2200214 */  sb        $zero, 0x214($s1)
/* 173114 80244834 A2200218 */  sb        $zero, 0x218($s1)
D_80244838:
/* 173118 80244838 A2200216 */  sb        $zero, 0x216($s1)
/* 17311C 8024483C A2200217 */  sb        $zero, 0x217($s1)
D_80244840:
/* 173120 80244840 8C42000C */  lw        $v0, 0xC($v0)
.L80244844:
/* 173124 80244844 08091228 */  j         D_802448A0
glabel func_80244848
/* 173128 80244848 AC40003C */   sw       $zero, 0x3C($v0)
.L8024484C:
/* 17312C 8024484C 8E0201D8 */  lw        $v0, 0x1D8($s0)
/* 173130 80244850 10400005 */  beqz      $v0, D_80244868
/* 173134 80244854 00000000 */   nop
glabel func_80244858
/* 173138 80244858 0C0B1059 */  jal       does_script_exist
.L8024485C:
/* 17313C 8024485C 8E0401E8 */   lw       $a0, 0x1E8($s0)
D_80244860:
/* 173140 80244860 1440000F */  bnez      $v0, D_802448A0
/* 173144 80244864 00000000 */   nop
D_80244868:
/* 173148 80244868 1220000A */  beqz      $s1, .L80244894
glabel func_8024486C
/* 17314C 8024486C AE0001D8 */   sw       $zero, 0x1D8($s0)
jtbl_80244870:
/* 173150 80244870 8E2201D8 */  lw        $v0, 0x1D8($s1)
/* 173154 80244874 50400007 */  beql      $v0, $zero, .L80244894
D_80244878:
/* 173158 80244878 AE2001D8 */   sw       $zero, 0x1D8($s1)
/* 17315C 8024487C 8E2401E8 */  lw        $a0, 0x1E8($s1)
D_80244880:
/* 173160 80244880 0C0B1059 */  jal       does_script_exist
/* 173164 80244884 00000000 */   nop
D_80244888:
/* 173168 80244888 14400005 */  bnez      $v0, D_802448A0
.L8024488C:
/* 17316C 8024488C 00000000 */   nop
D_80244890:
/* 173170 80244890 AE2001D8 */  sw        $zero, 0x1D8($s1)
.L80244894:
/* 173174 80244894 2402000B */  addiu     $v0, $zero, 0xB
jtbl_80244898:
/* 173178 80244898 3C01800E */  lui       $at, %hi(gBattleSubState)
/* 17317C 8024489C AC22C4DC */  sw        $v0, %lo(gBattleSubState)($at)
D_802448A0:
/* 173180 802448A0 3C12800E */  lui       $s2, %hi(gBattleSubState)
/* 173184 802448A4 2652C4DC */  addiu     $s2, $s2, %lo(gBattleSubState)
D_802448A8:
/* 173188 802448A8 8E500000 */  lw        $s0, 0x0($s2)
/* 17318C 802448AC 2402000B */  addiu     $v0, $zero, 0xB
D_802448B0:
/* 173190 802448B0 12020005 */  beq       $s0, $v0, .L802448C8
/* 173194 802448B4 2402000D */   addiu    $v0, $zero, 0xD
jtbl_802448B8:
/* 173198 802448B8 12020023 */  beq       $s0, $v0, .L80244948
D_802448BC:
/* 17319C 802448BC 00000000 */   nop
D_802448C0:
/* 1731A0 802448C0 08091259 */  j         .L80244964
/* 1731A4 802448C4 00000000 */   nop
.L802448C8:
/* 1731A8 802448C8 3C05800E */  lui       $a1, %hi(gBattleStatus)
/* 1731AC 802448CC 24A5C070 */  addiu     $a1, $a1, %lo(gBattleStatus)
/* 1731B0 802448D0 2403FFFD */  addiu     $v1, $zero, -0x3
/* 1731B4 802448D4 A260008C */  sb        $zero, 0x8C($s3)
jtbl_802448D8:
/* 1731B8 802448D8 8CA20004 */  lw        $v0, 0x4($a1)
/* 1731BC 802448DC 8264009A */  lb        $a0, 0x9A($s3)
glabel func_802448E0
/* 1731C0 802448E0 00431024 */  and       $v0, $v0, $v1
.L802448E4:
/* 1731C4 802448E4 2403FFFB */  addiu     $v1, $zero, -0x5
/* 1731C8 802448E8 00431024 */  and       $v0, $v0, $v1
/* 1731CC 802448EC 2403FFF7 */  addiu     $v1, $zero, -0x9
/* 1731D0 802448F0 00431024 */  and       $v0, $v0, $v1
D_802448F4:
/* 1731D4 802448F4 2403FFEF */  addiu     $v1, $zero, -0x11
/* 1731D8 802448F8 00431024 */  and       $v0, $v0, $v1
D_802448FC:
/* 1731DC 802448FC 14800004 */  bnez      $a0, jtbl_80244910
D_80244900:
/* 1731E0 80244900 ACA20004 */   sw       $v0, 0x4($a1)
/* 1731E4 80244904 2402000D */  addiu     $v0, $zero, 0xD
/* 1731E8 80244908 08091259 */  j         .L80244964
D_8024490C:
/* 1731EC 8024490C AE420000 */   sw       $v0, 0x0($s2)
jtbl_80244910:
/* 1731F0 80244910 2405000A */  addiu     $a1, $zero, 0xA
/* 1731F4 80244914 2402000C */  addiu     $v0, $zero, 0xC
.L80244918:
/* 1731F8 80244918 A26201A7 */  sb        $v0, 0x1A7($s3)
.L8024491C:
/* 1731FC 8024491C 8E2401CC */  lw        $a0, 0x1CC($s1)
D_80244920:
/* 173200 80244920 0C0B0CF8 */  jal       start_script
.L80244924:
/* 173204 80244924 0000302D */   daddu    $a2, $zero, $zero
/* 173208 80244928 AE2201DC */  sw        $v0, 0x1DC($s1)
/* 17320C 8024492C 8C440144 */  lw        $a0, 0x144($v0)
/* 173210 80244930 2403000C */  addiu     $v1, $zero, 0xC
glabel func_80244934
/* 173214 80244934 AE430000 */  sw        $v1, 0x0($s2)
/* 173218 80244938 24030100 */  addiu     $v1, $zero, 0x100
/* 17321C 8024493C AE2401EC */  sw        $a0, 0x1EC($s1)
.L80244940:
/* 173220 80244940 08091259 */  j         .L80244964
/* 173224 80244944 AC430148 */   sw       $v1, 0x148($v0)
.L80244948:
/* 173228 80244948 8E2401EC */  lw        $a0, 0x1EC($s1)
/* 17322C 8024494C 0C0B1059 */  jal       does_script_exist
/* 173230 80244950 00000000 */   nop
.L80244954:
/* 173234 80244954 14400003 */  bnez      $v0, .L80244964
/* 173238 80244958 00000000 */   nop
/* 17323C 8024495C A260009A */  sb        $zero, 0x9A($s3)
D_80244960:
/* 173240 80244960 AE500000 */  sw        $s0, 0x0($s2)
.L80244964:
/* 173244 80244964 3C10800E */  lui       $s0, %hi(gBattleSubState)
D_80244968:
/* 173248 80244968 2610C4DC */  addiu     $s0, $s0, %lo(gBattleSubState)
/* 17324C 8024496C 8E030000 */  lw        $v1, 0x0($s0)
/* 173250 80244970 2402000D */  addiu     $v0, $zero, 0xD
.L80244974:
/* 173254 80244974 10620005 */  beq       $v1, $v0, .L8024498C
/* 173258 80244978 2402000E */   addiu    $v0, $zero, 0xE
/* 17325C 8024497C 1062000B */  beq       $v1, $v0, .L802449AC
/* 173260 80244980 00000000 */   nop
glabel func_80244984
/* 173264 80244984 08091289 */  j         .L80244A24
D_80244988:
/* 173268 80244988 00000000 */   nop
.L8024498C:
/* 17326C 8024498C 0C093903 */  jal       func_8024E40C
.L80244990:
/* 173270 80244990 24040002 */   addiu    $a0, $zero, 0x2
/* 173274 80244994 2402001E */  addiu     $v0, $zero, 0x1E
D_80244998:
/* 173278 80244998 3C01802A */  lui       $at, %hi(D_8029F248)
/* 17327C 8024499C AC22F248 */  sw        $v0, %lo(D_8029F248)($at)
.L802449A0:
/* 173280 802449A0 2402000E */  addiu     $v0, $zero, 0xE
.L802449A4:
/* 173284 802449A4 08091289 */  j         .L80244A24
/* 173288 802449A8 AE020000 */   sw       $v0, 0x0($s0)
.L802449AC:
/* 17328C 802449AC 3C03802A */  lui       $v1, %hi(D_8029F248)
D_802449B0:
/* 173290 802449B0 2463F248 */  addiu     $v1, $v1, %lo(D_8029F248)
.L802449B4:
/* 173294 802449B4 8C620000 */  lw        $v0, 0x0($v1)
.L802449B8:
/* 173298 802449B8 10400003 */  beqz      $v0, .L802449C8
/* 17329C 802449BC 2442FFFF */   addiu    $v0, $v0, -0x1
/* 1732A0 802449C0 08091289 */  j         .L80244A24
D_802449C4:
/* 1732A4 802449C4 AC620000 */   sw       $v0, 0x0($v1)
.L802449C8:
/* 1732A8 802449C8 96A302AA */  lhu       $v1, 0x2AA($s5)
D_802449CC:
/* 1732AC 802449CC 2C62270F */  sltiu     $v0, $v1, 0x270F
D_802449D0:
/* 1732B0 802449D0 10400002 */  beqz      $v0, .L802449DC
/* 1732B4 802449D4 24620001 */   addiu    $v0, $v1, 0x1
D_802449D8:
/* 1732B8 802449D8 A6A202AA */  sh        $v0, 0x2AA($s5)
.L802449DC:
/* 1732BC 802449DC 24030003 */  addiu     $v1, $zero, 0x3
.L802449E0:
/* 1732C0 802449E0 3C02800B */  lui       $v0, %hi(gCurrentEncounter)
glabel func_802449E4
/* 1732C4 802449E4 24420F10 */  addiu     $v0, $v0, %lo(gCurrentEncounter)
/* 1732C8 802449E8 A0430009 */  sb        $v1, 0x9($v0)
D_802449EC:
/* 1732CC 802449EC 3C02800E */  lui       $v0, %hi(gBattleStatus + 0x4)
D_802449F0:
/* 1732D0 802449F0 8C42C074 */  lw        $v0, %lo(gBattleStatus + 0x4)($v0)
D_802449F4:
/* 1732D4 802449F4 3C030200 */  lui       $v1, (0x2000000 >> 16)
glabel func_802449F8
/* 1732D8 802449F8 00431024 */  and       $v0, $v0, $v1
D_802449FC:
/* 1732DC 802449FC 14400007 */  bnez      $v0, .L80244A1C
jtbl_80244A00:
/* 1732E0 80244A00 24020008 */   addiu    $v0, $zero, 0x8
D_80244A04:
/* 1732E4 80244A04 AFA20010 */  sw        $v0, 0x10($sp)
/* 1732E8 80244A08 0000202D */  daddu     $a0, $zero, $zero
D_80244A0C:
/* 1732EC 80244A0C 2405FFFF */  addiu     $a1, $zero, -0x1
D_80244A10:
/* 1732F0 80244A10 0080302D */  daddu     $a2, $a0, $zero
/* 1732F4 80244A14 0C052A46 */  jal       bgm_set_song
/* 1732F8 80244A18 240705DC */   addiu    $a3, $zero, 0x5DC
.L80244A1C:
/* 1732FC 80244A1C 0C090464 */  jal       func_80241190
D_80244A20:
/* 173300 80244A20 24040020 */   addiu    $a0, $zero, 0x20
.L80244A24:
/* 173304 80244A24 8FBF0030 */  lw        $ra, 0x30($sp)
D_80244A28:
/* 173308 80244A28 8FB5002C */  lw        $s5, 0x2C($sp)
D_80244A2C:
/* 17330C 80244A2C 8FB40028 */  lw        $s4, 0x28($sp)
.L80244A30:
/* 173310 80244A30 8FB30024 */  lw        $s3, 0x24($sp)
/* 173314 80244A34 8FB20020 */  lw        $s2, 0x20($sp)
/* 173318 80244A38 8FB1001C */  lw        $s1, 0x1C($sp)
/* 17331C 80244A3C 8FB00018 */  lw        $s0, 0x18($sp)
D_80244A40:
/* 173320 80244A40 03E00008 */  jr        $ra
.L80244A44:
/* 173324 80244A44 27BD0038 */   addiu    $sp, $sp, 0x38

### DECOMPILED C INSTRUCTIONS:

void btl_state_update_end_training_battle(void) {
    BattleStatus* battleStatus = &gBattleStatus;
    PlayerData* playerData = &gPlayerData;
    EncounterStatus* encounterStatus = &gCurrentEncounter;
    Actor* player = gBattleStatus.playerActor;
    Actor* partner = gBattleStatus.partnerActor;
    Evt* script;

    switch (gBattleSubState) {
        case BTL_SUBSTATE_END_TRAINING_INIT:
            player->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
            if (partner != NULL) {
                partner->flags &= ~(ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
            }
            gBattleSubState = BTL_SUBSTATE_END_TRAINING_CHECK_OUTTA_SIGHT;
            gBattleStatus.flags2 &= ~BS_FLAGS2_2;
            gBattleStatus.flags2 &= ~BS_FLAGS2_4;
            gBattleStatus.flags2 &= ~BS_FLAGS2_8;
            gBattleStatus.flags2 &= ~BS_FLAGS2_10;

            if (player->koStatus == STATUS_KEY_DAZE) {
                dispatch_event_player(EVENT_RECOVER_FROM_KO);
                gBattleSubState = BTL_SUBSTATE_END_TRAINING_AWAIT_RECOVERING;
            }
            player->debuff = 0;
            player->staticStatus = 0;
            player->stoneStatus = 0;
            player->transparentStatus = 0;
            player->koStatus = 0;
            player->koDuration = 0;
            player->disableEffect->data.disableX->koDuration = 0;
            if (partner != NULL) {
                if (partner->koStatus == STATUS_KEY_DAZE) {
                    dispatch_event_partner(EVENT_RECOVER_FROM_KO);
                    gBattleSubState = BTL_SUBSTATE_END_TRAINING_AWAIT_RECOVERING;
                }
                partner->debuff = 0;
                partner->staticStatus = 0;
                partner->stoneStatus = 0;
                partner->transparentStatus = 0;
                partner->koStatus = 0;
                partner->koDuration = 0;
                partner->disableEffect->data.disableX->koDuration = 0;
            }
            break;
        case BTL_SUBSTATE_END_TRAINING_AWAIT_RECOVERING:
            if (player->handleEventScript != NULL && does_script_exist(player->handleEventScriptID)) {
                break;
            }
            player->handleEventScript = NULL;

            if (partner != NULL) {
                if (partner->handleEventScript != NULL && does_script_exist(partner->handleEventScriptID)) {
                    break;
                }
                partner->handleEventScript = NULL;
            }

            gBattleSubState = BTL_SUBSTATE_END_TRAINING_CHECK_OUTTA_SIGHT;
            break;
    }

    switch (gBattleSubState) {
        case BTL_SUBSTATE_END_TRAINING_CHECK_OUTTA_SIGHT:
            battleStatus->stateFreezeCount = 0;
            gBattleStatus.flags2 &= ~BS_FLAGS2_2;
            gBattleStatus.flags2 &= ~BS_FLAGS2_4;
            gBattleStatus.flags2 &= ~BS_FLAGS2_8;
            gBattleStatus.flags2 &= ~BS_FLAGS2_10;

            if (!battleStatus->outtaSightActive) {
                gBattleSubState = BTL_SUBSTATE_END_TRAINING_RESET_CAM;
            } else {
                battleStatus->battlePhase = PHASE_ENEMY_BEGIN;
                script = start_script(partner->handlePhaseSource, EVT_PRIORITY_A, 0);
                partner->handlePhaseScript = script;
                partner->handleBatttlePhaseScriptID = script->id;
                script->owner1.actorID = ACTOR_PARTNER;
                gBattleSubState = BTL_SUBSTATE_END_TRAINING_AWAIT_OUTTA_SIGHT;
            }
            break;
        case BTL_SUBSTATE_END_TRAINING_RESET_CAM: //@bug should be BTL_SUBSTATE_END_TRAINING_AWAIT_OUTTA_SIGHT
            if (!does_script_exist(partner->handleBatttlePhaseScriptID)) {
                battleStatus->outtaSightActive = FALSE;
                gBattleSubState = BTL_SUBSTATE_END_TRAINING_RESET_CAM;
            }
            break;
    }

    switch (gBattleSubState) {
        case BTL_SUBSTATE_END_TRAINING_RESET_CAM:
            btl_cam_use_preset(BTL_CAM_DEFAULT);
            D_8029F248 = 30;
            gBattleSubState = BTL_SUBSTATE_END_TRAINING_DONE;
            break;
        case BTL_SUBSTATE_END_TRAINING_DONE:
            if (D_8029F248 != 0) {
                D_8029F248--;
                return;
            }
            if (playerData->trainingsDone < 9999) {
                playerData->trainingsDone++;
            }
            encounterStatus->battleOutcome = OUTCOME_ENEMY_FLED;
            if (!(gBattleStatus.flags2 & BS_FLAGS2_DONT_STOP_MUSIC)) {
                bgm_set_song(0, -1, 0, 1500, 8);
            }
            btl_set_state(BATTLE_STATE_END_BATTLE);
            break;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel update_triggers
/* DBF60 80145860 27BDFFD0 */  addiu     $sp, $sp, -0x30
/* DBF64 80145864 AFB20020 */  sw        $s2, 0x20($sp)
/* DBF68 80145868 3C128016 */  lui       $s2, %hi(gCollisionStatus)
/* DBF6C 8014586C 2652A550 */  addiu     $s2, $s2, %lo(gCollisionStatus)
/* DBF70 80145870 AFB30024 */  sw        $s3, 0x24($sp)
/* DBF74 80145874 0000982D */  daddu     $s3, $zero, $zero
/* DBF78 80145878 AFBF0028 */  sw        $ra, 0x28($sp)
/* DBF7C 8014587C AFB1001C */  sw        $s1, 0x1C($sp)
/* DBF80 80145880 AFB00018 */  sw        $s0, 0x18($sp)
/* DBF84 80145884 A6400016 */  sh        $zero, 0x16($s2)
.L80145888:
/* DBF88 80145888 3C038016 */  lui       $v1, %hi(gCurrentTriggerListPtr)
/* DBF8C 8014588C 8C639390 */  lw        $v1, %lo(gCurrentTriggerListPtr)($v1)
/* DBF90 80145890 00131080 */  sll       $v0, $s3, 2
/* DBF94 80145894 00431021 */  addu      $v0, $v0, $v1
/* DBF98 80145898 8C510000 */  lw        $s1, 0x0($v0)
/* DBF9C 8014589C 522000B1 */  beql      $s1, $zero, .L80145B64
/* DBFA0 801458A0 26730001 */   addiu    $s3, $s3, 0x1
/* DBFA4 801458A4 8E230000 */  lw        $v1, 0x0($s1)
/* DBFA8 801458A8 30620001 */  andi      $v0, $v1, 0x1
/* DBFAC 801458AC 504000AD */  beql      $v0, $zero, .L80145B64
/* DBFB0 801458B0 26730001 */   addiu    $s3, $s3, 0x1
/* DBFB4 801458B4 30620010 */  andi      $v0, $v1, 0x10
/* DBFB8 801458B8 144000A8 */  bnez      $v0, .L80145B5C
/* DBFBC 801458BC 34620002 */   ori      $v0, $v1, 0x2
/* DBFC0 801458C0 30620040 */  andi      $v0, $v1, 0x40
/* DBFC4 801458C4 1040000D */  beqz      $v0, .L801458FC
/* DBFC8 801458C8 00000000 */   nop
/* DBFCC 801458CC 86430012 */  lh        $v1, 0x12($s2)
/* DBFD0 801458D0 8E220008 */  lw        $v0, 0x8($s1)
/* DBFD4 801458D4 14430003 */  bne       $v0, $v1, .L801458E4
/* DBFD8 801458D8 00000000 */   nop
/* DBFDC 801458DC 0C0381B0 */  jal       func_800E06C0
/* DBFE0 801458E0 24040001 */   addiu    $a0, $zero, 0x1
.L801458E4:
/* DBFE4 801458E4 86430000 */  lh        $v1, 0x0($s2)
/* DBFE8 801458E8 8E220008 */  lw        $v0, 0x8($s1)
/* DBFEC 801458EC 5443009D */  bnel      $v0, $v1, .L80145B64
/* DBFF0 801458F0 26730001 */   addiu    $s3, $s3, 0x1
/* DBFF4 801458F4 0C0381B0 */  jal       func_800E06C0
/* DBFF8 801458F8 0000202D */   daddu    $a0, $zero, $zero
.L801458FC:
/* DBFFC 801458FC 8E240000 */  lw        $a0, 0x0($s1)
/* DC000 80145900 30820080 */  andi      $v0, $a0, 0x80
/* DC004 80145904 10400006 */  beqz      $v0, .L80145920
/* DC008 80145908 3C020008 */   lui      $v0, (0x80000 >> 16)
/* DC00C 8014590C 86430002 */  lh        $v1, 0x2($s2)
/* DC010 80145910 8E220008 */  lw        $v0, 0x8($s1)
/* DC014 80145914 54430093 */  bnel      $v0, $v1, .L80145B64
/* DC018 80145918 26730001 */   addiu    $s3, $s3, 0x1
/* DC01C 8014591C 3C020008 */  lui       $v0, (0x80000 >> 16)
.L80145920:
/* DC020 80145920 00821024 */  and       $v0, $a0, $v0
/* DC024 80145924 10400006 */  beqz      $v0, .L80145940
/* DC028 80145928 30820100 */   andi     $v0, $a0, 0x100
/* DC02C 8014592C 86430006 */  lh        $v1, 0x6($s2)
/* DC030 80145930 8E220008 */  lw        $v0, 0x8($s1)
/* DC034 80145934 5443008B */  bnel      $v0, $v1, .L80145B64
/* DC038 80145938 26730001 */   addiu    $s3, $s3, 0x1
/* DC03C 8014593C 30820100 */  andi      $v0, $a0, 0x100
.L80145940:
/* DC040 80145940 1040000E */  beqz      $v0, .L8014597C
/* DC044 80145944 00000000 */   nop
/* DC048 80145948 86430012 */  lh        $v1, 0x12($s2)
/* DC04C 8014594C 8E220008 */  lw        $v0, 0x8($s1)
/* DC050 80145950 14430002 */  bne       $v0, $v1, .L8014595C
/* DC054 80145954 24020001 */   addiu    $v0, $zero, 0x1
/* DC058 80145958 A6420016 */  sh        $v0, 0x16($s2)
.L8014595C:
/* DC05C 8014595C 8643000A */  lh        $v1, 0xA($s2)
/* DC060 80145960 8E220008 */  lw        $v0, 0x8($s1)
/* DC064 80145964 5443007F */  bnel      $v0, $v1, .L80145B64
/* DC068 80145968 26730001 */   addiu    $s3, $s3, 0x1
/* DC06C 8014596C 0C0394BE */  jal       phys_can_player_interact
/* DC070 80145970 00000000 */   nop
/* DC074 80145974 5040007B */  beql      $v0, $zero, .L80145B64
/* DC078 80145978 26730001 */   addiu    $s3, $s3, 0x1
.L8014597C:
/* DC07C 8014597C 8E240000 */  lw        $a0, 0x0($s1)
/* DC080 80145980 30820400 */  andi      $v0, $a0, 0x400
/* DC084 80145984 10400006 */  beqz      $v0, .L801459A0
/* DC088 80145988 30820200 */   andi     $v0, $a0, 0x200
/* DC08C 8014598C 86430012 */  lh        $v1, 0x12($s2)
/* DC090 80145990 8E220008 */  lw        $v0, 0x8($s1)
/* DC094 80145994 54430073 */  bnel      $v0, $v1, .L80145B64
/* DC098 80145998 26730001 */   addiu    $s3, $s3, 0x1
/* DC09C 8014599C 30820200 */  andi      $v0, $a0, 0x200
.L801459A0:
/* DC0A0 801459A0 10400006 */  beqz      $v0, .L801459BC
/* DC0A4 801459A4 30820800 */   andi     $v0, $a0, 0x800
/* DC0A8 801459A8 86430004 */  lh        $v1, 0x4($s2)
/* DC0AC 801459AC 8E220008 */  lw        $v0, 0x8($s1)
/* DC0B0 801459B0 5443006C */  bnel      $v0, $v1, .L80145B64
/* DC0B4 801459B4 26730001 */   addiu    $s3, $s3, 0x1
/* DC0B8 801459B8 30820800 */  andi      $v0, $a0, 0x800
.L801459BC:
/* DC0BC 801459BC 10400011 */  beqz      $v0, .L80145A04
/* DC0C0 801459C0 30821000 */   andi     $v0, $a0, 0x1000
/* DC0C4 801459C4 86430002 */  lh        $v1, 0x2($s2)
/* DC0C8 801459C8 8E220008 */  lw        $v0, 0x8($s1)
/* DC0CC 801459CC 54430065 */  bnel      $v0, $v1, .L80145B64
/* DC0D0 801459D0 26730001 */   addiu    $s3, $s3, 0x1
/* DC0D4 801459D4 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* DC0D8 801459D8 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* DC0DC 801459DC 8C420010 */  lw        $v0, 0x10($v0)
/* DC0E0 801459E0 30428000 */  andi      $v0, $v0, 0x8000
/* DC0E4 801459E4 5040005F */  beql      $v0, $zero, .L80145B64
/* DC0E8 801459E8 26730001 */   addiu    $s3, $s3, 0x1
/* DC0EC 801459EC 3C028011 */  lui       $v0, %hi(gPlayerStatus)
/* DC0F0 801459F0 8C42EFC8 */  lw        $v0, %lo(gPlayerStatus)($v0)
/* DC0F4 801459F4 30422000 */  andi      $v0, $v0, 0x2000
/* DC0F8 801459F8 5440005A */  bnel      $v0, $zero, .L80145B64
/* DC0FC 801459FC 26730001 */   addiu    $s3, $s3, 0x1
/* DC100 80145A00 30821000 */  andi      $v0, $a0, 0x1000
.L80145A04:
/* DC104 80145A04 10400006 */  beqz      $v0, .L80145A20
/* DC108 80145A08 3C020004 */   lui      $v0, (0x40000 >> 16)
/* DC10C 80145A0C 86430014 */  lh        $v1, 0x14($s2)
/* DC110 80145A10 8E220008 */  lw        $v0, 0x8($s1)
/* DC114 80145A14 54430053 */  bnel      $v0, $v1, .L80145B64
/* DC118 80145A18 26730001 */   addiu    $s3, $s3, 0x1
/* DC11C 80145A1C 3C020004 */  lui       $v0, (0x40000 >> 16)
.L80145A20:
/* DC120 80145A20 00821024 */  and       $v0, $a0, $v0
/* DC124 80145A24 10400006 */  beqz      $v0, .L80145A40
/* DC128 80145A28 30822000 */   andi     $v0, $a0, 0x2000
/* DC12C 80145A2C 86430008 */  lh        $v1, 0x8($s2)
/* DC130 80145A30 8E220008 */  lw        $v0, 0x8($s1)
/* DC134 80145A34 5443004B */  bnel      $v0, $v1, .L80145B64
/* DC138 80145A38 26730001 */   addiu    $s3, $s3, 0x1
/* DC13C 80145A3C 30822000 */  andi      $v0, $a0, 0x2000
.L80145A40:
/* DC140 80145A40 10400006 */  beqz      $v0, .L80145A5C
/* DC144 80145A44 30824000 */   andi     $v0, $a0, 0x4000
/* DC148 80145A48 8643000C */  lh        $v1, 0xC($s2)
/* DC14C 80145A4C 8E220008 */  lw        $v0, 0x8($s1)
/* DC150 80145A50 54430044 */  bnel      $v0, $v1, .L80145B64
/* DC154 80145A54 26730001 */   addiu    $s3, $s3, 0x1
/* DC158 80145A58 30824000 */  andi      $v0, $a0, 0x4000
.L80145A5C:
/* DC15C 80145A5C 10400006 */  beqz      $v0, .L80145A78
/* DC160 80145A60 30828000 */   andi     $v0, $a0, 0x8000
/* DC164 80145A64 8643000E */  lh        $v1, 0xE($s2)
/* DC168 80145A68 8E220008 */  lw        $v0, 0x8($s1)
/* DC16C 80145A6C 5443003D */  bnel      $v0, $v1, .L80145B64
/* DC170 80145A70 26730001 */   addiu    $s3, $s3, 0x1
/* DC174 80145A74 30828000 */  andi      $v0, $a0, 0x8000
.L80145A78:
/* DC178 80145A78 10400006 */  beqz      $v0, .L80145A94
/* DC17C 80145A7C 3C020010 */   lui      $v0, (0x100000 >> 16)
/* DC180 80145A80 86430010 */  lh        $v1, 0x10($s2)
/* DC184 80145A84 8E220008 */  lw        $v0, 0x8($s1)
/* DC188 80145A88 54430036 */  bnel      $v0, $v1, .L80145B64
/* DC18C 80145A8C 26730001 */   addiu    $s3, $s3, 0x1
/* DC190 80145A90 3C020010 */  lui       $v0, (0x100000 >> 16)
.L80145A94:
/* DC194 80145A94 00821024 */  and       $v0, $a0, $v0
/* DC198 80145A98 1040001C */  beqz      $v0, .L80145B0C
/* DC19C 80145A9C 00000000 */   nop
/* DC1A0 80145AA0 86420018 */  lh        $v0, 0x18($s2)
/* DC1A4 80145AA4 0442002F */  bltzl     $v0, .L80145B64
/* DC1A8 80145AA8 26730001 */   addiu    $s3, $s3, 0x1
/* DC1AC 80145AAC C6420020 */  lwc1      $f2, 0x20($s2)
/* DC1B0 80145AB0 8E300008 */  lw        $s0, 0x8($s1)
/* DC1B4 80145AB4 C6400024 */  lwc1      $f0, 0x24($s2)
/* DC1B8 80145AB8 E7A20010 */  swc1      $f2, 0x10($sp)
/* DC1BC 80145ABC E7A00014 */  swc1      $f0, 0x14($sp)
/* DC1C0 80145AC0 C60C0000 */  lwc1      $f12, 0x0($s0)
/* DC1C4 80145AC4 C60E0004 */  lwc1      $f14, 0x4($s0)
/* DC1C8 80145AC8 8E060008 */  lw        $a2, 0x8($s0)
/* DC1CC 80145ACC 0C00A7CB */  jal       dist3D
/* DC1D0 80145AD0 8E47001C */   lw       $a3, 0x1C($s2)
/* DC1D4 80145AD4 C604000C */  lwc1      $f4, 0xC($s0)
/* DC1D8 80145AD8 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* DC1DC 80145ADC 44811000 */  mtc1      $at, $f2
/* DC1E0 80145AE0 00000000 */  nop
/* DC1E4 80145AE4 46022102 */  mul.s     $f4, $f4, $f2
/* DC1E8 80145AE8 00000000 */  nop
/* DC1EC 80145AEC 3C014248 */  lui       $at, (0x42480000 >> 16)
/* DC1F0 80145AF0 44811000 */  mtc1      $at, $f2
/* DC1F4 80145AF4 00000000 */  nop
/* DC1F8 80145AF8 46022100 */  add.s     $f4, $f4, $f2
/* DC1FC 80145AFC 4600203C */  c.lt.s    $f4, $f0
/* DC200 80145B00 00000000 */  nop
/* DC204 80145B04 45030017 */  bc1tl     .L80145B64
/* DC208 80145B08 26730001 */   addiu    $s3, $s3, 0x1
.L80145B0C:
/* DC20C 80145B0C 8E220000 */  lw        $v0, 0x0($s1)
/* DC210 80145B10 3C030001 */  lui       $v1, (0x10000 >> 16)
/* DC214 80145B14 00431024 */  and       $v0, $v0, $v1
/* DC218 80145B18 10400005 */  beqz      $v0, .L80145B30
/* DC21C 80145B1C 00000000 */   nop
/* DC220 80145B20 0C05152F */  jal       get_global_flag
/* DC224 80145B24 8E240004 */   lw       $a0, 0x4($s1)
/* DC228 80145B28 5040000E */  beql      $v0, $zero, .L80145B64
/* DC22C 80145B2C 26730001 */   addiu    $s3, $s3, 0x1
.L80145B30:
/* DC230 80145B30 8E220000 */  lw        $v0, 0x0($s1)
/* DC234 80145B34 3C030002 */  lui       $v1, (0x20000 >> 16)
/* DC238 80145B38 00431024 */  and       $v0, $v0, $v1
/* DC23C 80145B3C 10400005 */  beqz      $v0, .L80145B54
/* DC240 80145B40 00000000 */   nop
/* DC244 80145B44 0C05157C */  jal       get_area_flag
/* DC248 80145B48 8E240004 */   lw       $a0, 0x4($s1)
/* DC24C 80145B4C 50400005 */  beql      $v0, $zero, .L80145B64
/* DC250 80145B50 26730001 */   addiu    $s3, $s3, 0x1
.L80145B54:
/* DC254 80145B54 8E220000 */  lw        $v0, 0x0($s1)
/* DC258 80145B58 34420002 */  ori       $v0, $v0, 0x2
.L80145B5C:
/* DC25C 80145B5C AE220000 */  sw        $v0, 0x0($s1)
/* DC260 80145B60 26730001 */  addiu     $s3, $s3, 0x1
.L80145B64:
/* DC264 80145B64 2A620040 */  slti      $v0, $s3, 0x40
/* DC268 80145B68 1440FF47 */  bnez      $v0, .L80145888
/* DC26C 80145B6C 2410FFFD */   addiu    $s0, $zero, -0x3
/* DC270 80145B70 0000982D */  daddu     $s3, $zero, $zero
.L80145B74:
/* DC274 80145B74 3C038016 */  lui       $v1, %hi(gCurrentTriggerListPtr)
/* DC278 80145B78 8C639390 */  lw        $v1, %lo(gCurrentTriggerListPtr)($v1)
/* DC27C 80145B7C 00131080 */  sll       $v0, $s3, 2
/* DC280 80145B80 00431021 */  addu      $v0, $v0, $v1
/* DC284 80145B84 8C510000 */  lw        $s1, 0x0($v0)
/* DC288 80145B88 52200010 */  beql      $s1, $zero, .L80145BCC
/* DC28C 80145B8C 26730001 */   addiu    $s3, $s3, 0x1
/* DC290 80145B90 8E230000 */  lw        $v1, 0x0($s1)
/* DC294 80145B94 30620001 */  andi      $v0, $v1, 0x1
/* DC298 80145B98 5040000C */  beql      $v0, $zero, .L80145BCC
/* DC29C 80145B9C 26730001 */   addiu    $s3, $s3, 0x1
/* DC2A0 80145BA0 30620002 */  andi      $v0, $v1, 0x2
/* DC2A4 80145BA4 50400009 */  beql      $v0, $zero, .L80145BCC
/* DC2A8 80145BA8 26730001 */   addiu    $s3, $s3, 0x1
/* DC2AC 80145BAC 8E22000C */  lw        $v0, 0xC($s1)
/* DC2B0 80145BB0 0040F809 */  jalr      $v0
/* DC2B4 80145BB4 0220202D */   daddu    $a0, $s1, $zero
/* DC2B8 80145BB8 14400004 */  bnez      $v0, .L80145BCC
/* DC2BC 80145BBC 26730001 */   addiu    $s3, $s3, 0x1
/* DC2C0 80145BC0 8E220000 */  lw        $v0, 0x0($s1)
/* DC2C4 80145BC4 00501024 */  and       $v0, $v0, $s0
/* DC2C8 80145BC8 AE220000 */  sw        $v0, 0x0($s1)
.L80145BCC:
/* DC2CC 80145BCC 2A620040 */  slti      $v0, $s3, 0x40
/* DC2D0 80145BD0 1440FFE8 */  bnez      $v0, .L80145B74
/* DC2D4 80145BD4 00000000 */   nop
/* DC2D8 80145BD8 8FBF0028 */  lw        $ra, 0x28($sp)
/* DC2DC 80145BDC 8FB30024 */  lw        $s3, 0x24($sp)
/* DC2E0 80145BE0 8FB20020 */  lw        $s2, 0x20($sp)
/* DC2E4 80145BE4 8FB1001C */  lw        $s1, 0x1C($sp)
/* DC2E8 80145BE8 8FB00018 */  lw        $s0, 0x18($sp)
/* DC2EC 80145BEC 03E00008 */  jr        $ra
/* DC2F0 80145BF0 27BD0030 */   addiu    $sp, $sp, 0x30

### DECOMPILED C INSTRUCTIONS:

void update_triggers(void) {
    CollisionStatus* collisionStatus = &gCollisionStatus;
    Trigger* listTrigger;
    s32 i;

    collisionStatus->touchingWallTrigger = 0;

    for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
        listTrigger = (*gCurrentTriggerListPtr)[i];

        if (listTrigger == NULL) {
            continue;
        }

        if (!(listTrigger->flags.flags & TRIGGER_ACTIVE)) {
            continue;
        }

        if (listTrigger->flags.flags & TRIGGER_FORCE_ACTIVATE) {
            listTrigger->flags.flags |= TRIGGER_ACTIVATED;
            continue;
        }

        if (listTrigger->flags.flags & TRIGGER_WALL_PUSH) {
            if (listTrigger->location.colliderID == collisionStatus->currentWall) {
                func_800E06C0(1);
            }
            if (listTrigger->location.colliderID == collisionStatus->pushingAgainstWall) {
                func_800E06C0(0);
            } else {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLOOR_TOUCH) {
            if (listTrigger->location.colliderID != collisionStatus->currentFloor) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLOOR_ABOVE) {
            if (listTrigger->location.colliderID != collisionStatus->floorBelow) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_WALL_PRESS_A) {
            if (listTrigger->location.colliderID == collisionStatus->currentWall) {
                collisionStatus->touchingWallTrigger = 1;
            }
            if ((listTrigger->location.colliderID != collisionStatus->currentInspect) || !phys_can_player_interact()) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_WALL_TOUCH) {
            if (listTrigger->location.colliderID != collisionStatus->currentWall) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLOOR_JUMP) {
            if (listTrigger->location.colliderID != collisionStatus->lastTouchedFloor) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLOOR_PRESS_A) {
            if ((listTrigger->location.colliderID != collisionStatus->currentFloor) ||
                !(gGameStatusPtr->pressedButtons[0] & BUTTON_A) || (gPlayerStatus.flags & PS_FLAG_INPUT_DISABLED)) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_WALL_HAMMER) {
            if (listTrigger->location.colliderID != collisionStatus->lastWallHammered) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_CEILING_TOUCH) {
            if (listTrigger->location.colliderID != collisionStatus->currentCeiling) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLAG_2000) {
            if (listTrigger->location.colliderID != collisionStatus->unk_0C) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLAG_4000) {
            if (listTrigger->location.colliderID != collisionStatus->unk_0E) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_FLAG_8000) {
            if (listTrigger->location.colliderID != collisionStatus->unk_10) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_POINT_BOMB) {
            Vec4f* triggerPos;
            f32 dist;

            if (collisionStatus->bombetteExploded < 0) {
                continue;
            }

            triggerPos = listTrigger->location.pos;
            dist = dist3D(triggerPos->x, triggerPos->y, triggerPos->z,
                                collisionStatus->bombetteExplosionPos.x, collisionStatus->bombetteExplosionPos.y,
                                collisionStatus->bombetteExplosionPos.z);

            if ((triggerPos->yaw * 0.5f) + 50.0f < dist) {
                continue;
            }
        }

        if (listTrigger->flags.flags & TRIGGER_GAME_FLAG_SET && get_global_flag(listTrigger->varIndex) == 0) {
            continue;
        }

        if (listTrigger->flags.flags & TRIGGER_AREA_FLAG_SET && get_area_flag(listTrigger->varIndex) == 0) {
            continue;
        }

        listTrigger->flags.flags |= TRIGGER_ACTIVATED;
    }

    for (i = 0; i < ARRAY_COUNT(*gCurrentTriggerListPtr); i++) {
        listTrigger = (*gCurrentTriggerListPtr)[i];

        if (listTrigger == NULL) {
            continue;
        }

        if (listTrigger->flags.flags & TRIGGER_ACTIVE) {
            if (listTrigger->flags.flags & TRIGGER_ACTIVATED) {
                if (listTrigger->onActivateFunc(listTrigger) == 0) {
                    listTrigger->flags.flags &= ~TRIGGER_ACTIVATED;
                }
            }
        }
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel partner_flying_update_motion
/* 86A80 800ED5D0 3C028007 */  lui       $v0, %hi(gGameStatusPtr)
/* 86A84 800ED5D4 8C42419C */  lw        $v0, %lo(gGameStatusPtr)($v0)
/* 86A88 800ED5D8 27BDFFB0 */  addiu     $sp, $sp, -0x50
/* 86A8C 800ED5DC AFB00030 */  sw        $s0, 0x30($sp)
/* 86A90 800ED5E0 AFB20038 */  sw        $s2, 0x38($sp)
/* 86A94 800ED5E4 3C128011 */  lui       $s2, %hi(gPlayerStatus)
/* 86A98 800ED5E8 2652EFC8 */  addiu     $s2, $s2, %lo(gPlayerStatus)
/* 86A9C 800ED5EC AFBF004C */  sw        $ra, 0x4C($sp)
/* 86AA0 800ED5F0 AFB60048 */  sw        $s6, 0x48($sp)
/* 86AA4 800ED5F4 AFB50044 */  sw        $s5, 0x44($sp)
/* 86AA8 800ED5F8 AFB40040 */  sw        $s4, 0x40($sp)
/* 86AAC 800ED5FC AFB3003C */  sw        $s3, 0x3C($sp)
/* 86AB0 800ED600 AFB10034 */  sw        $s1, 0x34($sp)
/* 86AB4 800ED604 80420081 */  lb        $v0, 0x81($v0)
/* 86AB8 800ED608 3C118011 */  lui       $s1, %hi(gPartnerStatus)
/* 86ABC 800ED60C 2631EBB0 */  addiu     $s1, $s1, %lo(gPartnerStatus)
/* 86AC0 800ED610 1040000B */  beqz      $v0, .L800ED640
/* 86AC4 800ED614 0080802D */   daddu    $s0, $a0, $zero
/* 86AC8 800ED618 8E420000 */  lw        $v0, 0x0($s2)
/* 86ACC 800ED61C 30423000 */  andi      $v0, $v0, 0x3000
/* 86AD0 800ED620 14400007 */  bnez      $v0, .L800ED640
/* 86AD4 800ED624 00000000 */   nop
/* 86AD8 800ED628 82220014 */  lb        $v0, 0x14($s1)
/* 86ADC 800ED62C 14400004 */  bnez      $v0, .L800ED640
/* 86AE0 800ED630 00000000 */   nop
/* 86AE4 800ED634 82220002 */  lb        $v0, 0x2($s1)
/* 86AE8 800ED638 1040000F */  beqz      $v0, .L800ED678
/* 86AEC 800ED63C 00000000 */   nop
.L800ED640:
/* 86AF0 800ED640 8E420004 */  lw        $v0, 0x4($s2)
/* 86AF4 800ED644 30420800 */  andi      $v0, $v0, 0x800
/* 86AF8 800ED648 10400005 */  beqz      $v0, .L800ED660
/* 86AFC 800ED64C 00000000 */   nop
/* 86B00 800ED650 3C028010 */  lui       $v0, %hi(D_800F8020)
/* 86B04 800ED654 8C428020 */  lw        $v0, %lo(D_800F8020)($v0)
/* 86B08 800ED658 14400003 */  bnez      $v0, .L800ED668
/* 86B0C 800ED65C 00000000 */   nop
.L800ED660:
/* 86B10 800ED660 0C03B67E */  jal       partner_flying_follow_player
/* 86B14 800ED664 0200202D */   daddu    $a0, $s0, $zero
.L800ED668:
/* 86B18 800ED668 8E22000C */  lw        $v0, 0xC($s1)
/* 86B1C 800ED66C 30426006 */  andi      $v0, $v0, 0x6006
/* 86B20 800ED670 54400001 */  bnel      $v0, $zero, .L800ED678
/* 86B24 800ED674 A2200002 */   sb       $zero, 0x2($s1)
.L800ED678:
/* 86B28 800ED678 3C038011 */  lui       $v1, %hi(wPartnerFollowState)
/* 86B2C 800ED67C 8463CFC8 */  lh        $v1, %lo(wPartnerFollowState)($v1)
/* 86B30 800ED680 24020032 */  addiu     $v0, $zero, 0x32
/* 86B34 800ED684 10620017 */  beq       $v1, $v0, .L800ED6E4
/* 86B38 800ED688 0000202D */   daddu    $a0, $zero, $zero
/* 86B3C 800ED68C C600003C */  lwc1      $f0, 0x3C($s0)
/* 86B40 800ED690 C642002C */  lwc1      $f2, 0x2C($s2)
/* 86B44 800ED694 46020001 */  sub.s     $f0, $f0, $f2
/* 86B48 800ED698 3C01447A */  lui       $at, (0x447A0000 >> 16)
/* 86B4C 800ED69C 44811000 */  mtc1      $at, $f2
/* 86B50 800ED6A0 46000005 */  abs.s     $f0, $f0
/* 86B54 800ED6A4 4600103C */  c.lt.s    $f2, $f0
/* 86B58 800ED6A8 00000000 */  nop
/* 86B5C 800ED6AC 4500000D */  bc1f      .L800ED6E4
/* 86B60 800ED6B0 2403F7FF */   addiu    $v1, $zero, -0x801
/* 86B64 800ED6B4 C6400028 */  lwc1      $f0, 0x28($s2)
/* 86B68 800ED6B8 8E020000 */  lw        $v0, 0x0($s0)
/* 86B6C 800ED6BC E6000038 */  swc1      $f0, 0x38($s0)
/* 86B70 800ED6C0 C640002C */  lwc1      $f0, 0x2C($s2)
/* 86B74 800ED6C4 E600003C */  swc1      $f0, 0x3C($s0)
/* 86B78 800ED6C8 C6400030 */  lwc1      $f0, 0x30($s2)
/* 86B7C 800ED6CC 00431024 */  and       $v0, $v0, $v1
/* 86B80 800ED6D0 AE00001C */  sw        $zero, 0x1C($s0)
/* 86B84 800ED6D4 AE000014 */  sw        $zero, 0x14($s0)
/* 86B88 800ED6D8 AE020000 */  sw        $v0, 0x0($s0)
/* 86B8C 800ED6DC E6000040 */  swc1      $f0, 0x40($s0)
/* 86B90 800ED6E0 0000202D */  daddu     $a0, $zero, $zero
.L800ED6E4:
/* 86B94 800ED6E4 27B30020 */  addiu     $s3, $sp, 0x20
/* 86B98 800ED6E8 0260282D */  daddu     $a1, $s3, $zero
/* 86B9C 800ED6EC 27B50024 */  addiu     $s5, $sp, 0x24
/* 86BA0 800ED6F0 02A0302D */  daddu     $a2, $s5, $zero
/* 86BA4 800ED6F4 27B60028 */  addiu     $s6, $sp, 0x28
/* 86BA8 800ED6F8 02C0382D */  daddu     $a3, $s6, $zero
/* 86BAC 800ED6FC 860200A8 */  lh        $v0, 0xA8($s0)
/* 86BB0 800ED700 3C013F00 */  lui       $at, (0x3F000000 >> 16)
/* 86BB4 800ED704 44811000 */  mtc1      $at, $f2
/* 86BB8 800ED708 44823000 */  mtc1      $v0, $f6
/* 86BBC 800ED70C 00000000 */  nop
/* 86BC0 800ED710 468031A0 */  cvt.s.w   $f6, $f6
/* 86BC4 800ED714 46023182 */  mul.s     $f6, $f6, $f2
/* 86BC8 800ED718 00000000 */  nop
/* 86BCC 800ED71C 3C148010 */  lui       $s4, %hi(D_800F8020)
/* 86BD0 800ED720 26948020 */  addiu     $s4, $s4, %lo(D_800F8020)
/* 86BD4 800ED724 27B1002C */  addiu     $s1, $sp, 0x2C
/* 86BD8 800ED728 C6000038 */  lwc1      $f0, 0x38($s0)
/* 86BDC 800ED72C 44822000 */  mtc1      $v0, $f4
/* 86BE0 800ED730 00000000 */  nop
/* 86BE4 800ED734 46802120 */  cvt.s.w   $f4, $f4
/* 86BE8 800ED738 46022102 */  mul.s     $f4, $f4, $f2
/* 86BEC 800ED73C 00000000 */  nop
/* 86BF0 800ED740 AE800000 */  sw        $zero, 0x0($s4)
/* 86BF4 800ED744 E7A00020 */  swc1      $f0, 0x20($sp)
/* 86BF8 800ED748 C600003C */  lwc1      $f0, 0x3C($s0)
/* 86BFC 800ED74C C6020040 */  lwc1      $f2, 0x40($s0)
/* 86C00 800ED750 46060000 */  add.s     $f0, $f0, $f6
/* 86C04 800ED754 E7A20028 */  swc1      $f2, 0x28($sp)
/* 86C08 800ED758 E7A4002C */  swc1      $f4, 0x2C($sp)
/* 86C0C 800ED75C E7A00024 */  swc1      $f0, 0x24($sp)
/* 86C10 800ED760 0C03739C */  jal       npc_raycast_up
/* 86C14 800ED764 AFB10010 */   sw       $s1, 0x10($sp)
/* 86C18 800ED768 10400006 */  beqz      $v0, .L800ED784
/* 86C1C 800ED76C 24020001 */   addiu    $v0, $zero, 0x1
/* 86C20 800ED770 C6000038 */  lwc1      $f0, 0x38($s0)
/* 86C24 800ED774 C602003C */  lwc1      $f2, 0x3C($s0)
/* 86C28 800ED778 C6040040 */  lwc1      $f4, 0x40($s0)
/* 86C2C 800ED77C 0803B66E */  j         .L800ED9B8
/* 86C30 800ED780 AE820000 */   sw       $v0, 0x0($s4)
.L800ED784:
/* 86C34 800ED784 0C03BD90 */  jal       partner_do_player_collision
/* 86C38 800ED788 0200202D */   daddu    $a0, $s0, $zero
/* 86C3C 800ED78C 3C038011 */  lui       $v1, %hi(wPartnerFollowState)
/* 86C40 800ED790 8463CFC8 */  lh        $v1, %lo(wPartnerFollowState)($v1)
/* 86C44 800ED794 24020032 */  addiu     $v0, $zero, 0x32
/* 86C48 800ED798 10620084 */  beq       $v1, $v0, .L800ED9AC
/* 86C4C 800ED79C 3C040001 */   lui      $a0, (0x10000 >> 16)
/* 86C50 800ED7A0 C6000038 */  lwc1      $f0, 0x38($s0)
/* 86C54 800ED7A4 C602003C */  lwc1      $f2, 0x3C($s0)
/* 86C58 800ED7A8 C6040040 */  lwc1      $f4, 0x40($s0)
/* 86C5C 800ED7AC 3C01447A */  lui       $at, (0x447A0000 >> 16)
/* 86C60 800ED7B0 44813000 */  mtc1      $at, $f6
/* 86C64 800ED7B4 0260282D */  daddu     $a1, $s3, $zero
/* 86C68 800ED7B8 E7A00020 */  swc1      $f0, 0x20($sp)
/* 86C6C 800ED7BC E7A20024 */  swc1      $f2, 0x24($sp)
/* 86C70 800ED7C0 E7A40028 */  swc1      $f4, 0x28($sp)
/* 86C74 800ED7C4 E7A6002C */  swc1      $f6, 0x2C($sp)
/* 86C78 800ED7C8 AFB10010 */  sw        $s1, 0x10($sp)
/* 86C7C 800ED7CC C600000C */  lwc1      $f0, 0xC($s0)
/* 86C80 800ED7D0 02A0302D */  daddu     $a2, $s5, $zero
/* 86C84 800ED7D4 E7A00014 */  swc1      $f0, 0x14($sp)
/* 86C88 800ED7D8 860200A6 */  lh        $v0, 0xA6($s0)
/* 86C8C 800ED7DC 02C0382D */  daddu     $a3, $s6, $zero
/* 86C90 800ED7E0 44820000 */  mtc1      $v0, $f0
/* 86C94 800ED7E4 00000000 */  nop
/* 86C98 800ED7E8 46800020 */  cvt.s.w   $f0, $f0
/* 86C9C 800ED7EC 0C0371DE */  jal       npc_raycast_down_around
/* 86CA0 800ED7F0 E7A00018 */   swc1     $f0, 0x18($sp)
/* 86CA4 800ED7F4 14400003 */  bnez      $v0, .L800ED804
/* 86CA8 800ED7F8 00000000 */   nop
/* 86CAC 800ED7FC C640002C */  lwc1      $f0, 0x2C($s2)
/* 86CB0 800ED800 E7A00024 */  swc1      $f0, 0x24($sp)
.L800ED804:
/* 86CB4 800ED804 960200A8 */  lhu       $v0, 0xA8($s0)
/* 86CB8 800ED808 C7A60024 */  lwc1      $f6, 0x24($sp)
/* 86CBC 800ED80C 00021400 */  sll       $v0, $v0, 16
/* 86CC0 800ED810 00021C03 */  sra       $v1, $v0, 16
/* 86CC4 800ED814 44830000 */  mtc1      $v1, $f0
/* 86CC8 800ED818 00000000 */  nop
/* 86CCC 800ED81C 46800020 */  cvt.s.w   $f0, $f0
/* 86CD0 800ED820 46003200 */  add.s     $f8, $f6, $f0
/* 86CD4 800ED824 3C014000 */  lui       $at, (0x40000000 >> 16)
/* 86CD8 800ED828 44815000 */  mtc1      $at, $f10
/* 86CDC 800ED82C 00000000 */  nop
/* 86CE0 800ED830 460A4000 */  add.s     $f0, $f8, $f10
/* 86CE4 800ED834 C604003C */  lwc1      $f4, 0x3C($s0)
/* 86CE8 800ED838 4600203E */  c.le.s    $f4, $f0
/* 86CEC 800ED83C 00000000 */  nop
/* 86CF0 800ED840 45000024 */  bc1f      .L800ED8D4
/* 86CF4 800ED844 00000000 */   nop
/* 86CF8 800ED848 C6420054 */  lwc1      $f2, 0x54($s2)
/* 86CFC 800ED84C 44800000 */  mtc1      $zero, $f0
/* 86D00 800ED850 00000000 */  nop
/* 86D04 800ED854 46001032 */  c.eq.s    $f2, $f0
/* 86D08 800ED858 00000000 */  nop
/* 86D0C 800ED85C 4501000C */  bc1t      .L800ED890
/* 86D10 800ED860 000217C2 */   srl      $v0, $v0, 31
/* 86D14 800ED864 00621021 */  addu      $v0, $v1, $v0
/* 86D18 800ED868 00021043 */  sra       $v0, $v0, 1
/* 86D1C 800ED86C 44820000 */  mtc1      $v0, $f0
/* 86D20 800ED870 00000000 */  nop
/* 86D24 800ED874 46800020 */  cvt.s.w   $f0, $f0
/* 86D28 800ED878 46003000 */  add.s     $f0, $f6, $f0
/* 86D2C 800ED87C 460A0000 */  add.s     $f0, $f0, $f10
/* 86D30 800ED880 3C013E00 */  lui       $at, (0x3E000000 >> 16)
/* 86D34 800ED884 44811000 */  mtc1      $at, $f2
/* 86D38 800ED888 0803B662 */  j         .L800ED988
/* 86D3C 800ED88C 46040001 */   sub.s    $f0, $f0, $f4
.L800ED890:
/* 86D40 800ED890 C642002C */  lwc1      $f2, 0x2C($s2)
/* 86D44 800ED894 4602303C */  c.lt.s    $f6, $f2
/* 86D48 800ED898 00000000 */  nop
/* 86D4C 800ED89C 45000005 */  bc1f      .L800ED8B4
/* 86D50 800ED8A0 00000000 */   nop
/* 86D54 800ED8A4 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 86D58 800ED8A8 44810000 */  mtc1      $at, $f0
/* 86D5C 800ED8AC 0803B631 */  j         .L800ED8C4
/* 86D60 800ED8B0 46001000 */   add.s    $f0, $f2, $f0
.L800ED8B4:
/* 86D64 800ED8B4 3C014120 */  lui       $at, (0x41200000 >> 16)
/* 86D68 800ED8B8 44810000 */  mtc1      $at, $f0
/* 86D6C 800ED8BC 00000000 */  nop
/* 86D70 800ED8C0 46003000 */  add.s     $f0, $f6, $f0
.L800ED8C4:
/* 86D74 800ED8C4 3C013E80 */  lui       $at, (0x3E800000 >> 16)
/* 86D78 800ED8C8 44811000 */  mtc1      $at, $f2
/* 86D7C 800ED8CC 0803B662 */  j         .L800ED988
/* 86D80 800ED8D0 46040001 */   sub.s    $f0, $f0, $f4
.L800ED8D4:
/* 86D84 800ED8D4 864200B0 */  lh        $v0, 0xB0($s2)
/* 86D88 800ED8D8 C642002C */  lwc1      $f2, 0x2C($s2)
/* 86D8C 800ED8DC 44820000 */  mtc1      $v0, $f0
/* 86D90 800ED8E0 00000000 */  nop
/* 86D94 800ED8E4 46800020 */  cvt.s.w   $f0, $f0
/* 86D98 800ED8E8 46001080 */  add.s     $f2, $f2, $f0
/* 86D9C 800ED8EC 4606103C */  c.lt.s    $f2, $f6
/* 86DA0 800ED8F0 00000000 */  nop
/* 86DA4 800ED8F4 4500001C */  bc1f      .L800ED968
/* 86DA8 800ED8F8 00000000 */   nop
/* 86DAC 800ED8FC 46044081 */  sub.s     $f2, $f8, $f4
/* 86DB0 800ED900 3C013E00 */  lui       $at, (0x3E000000 >> 16)
/* 86DB4 800ED904 44810000 */  mtc1      $at, $f0
/* 86DB8 800ED908 00000000 */  nop
/* 86DBC 800ED90C 46001082 */  mul.s     $f2, $f2, $f0
/* 86DC0 800ED910 00000000 */  nop
/* 86DC4 800ED914 860200A8 */  lh        $v0, 0xA8($s0)
/* 86DC8 800ED918 44820000 */  mtc1      $v0, $f0
/* 86DCC 800ED91C 00000000 */  nop
/* 86DD0 800ED920 46800020 */  cvt.s.w   $f0, $f0
/* 86DD4 800ED924 46003000 */  add.s     $f0, $f6, $f0
/* 86DD8 800ED928 C608003C */  lwc1      $f8, 0x3C($s0)
/* 86DDC 800ED92C 46024100 */  add.s     $f4, $f8, $f2
/* 86DE0 800ED930 3C028010 */  lui       $v0, %hi(D_800F84F8)
/* 86DE4 800ED934 244284F8 */  addiu     $v0, $v0, %lo(D_800F84F8)
/* 86DE8 800ED938 4600203E */  c.le.s    $f4, $f0
/* 86DEC 800ED93C 00000000 */  nop
/* 86DF0 800ED940 45000015 */  bc1f      .L800ED998
/* 86DF4 800ED944 E4420000 */   swc1     $f2, 0x0($v0)
/* 86DF8 800ED948 46080001 */  sub.s     $f0, $f0, $f8
/* 86DFC 800ED94C 3C013E80 */  lui       $at, (0x3E800000 >> 16)
/* 86E00 800ED950 44811000 */  mtc1      $at, $f2
/* 86E04 800ED954 00000000 */  nop
/* 86E08 800ED958 46020002 */  mul.s     $f0, $f0, $f2
/* 86E0C 800ED95C 00000000 */  nop
/* 86E10 800ED960 0803B666 */  j         .L800ED998
/* 86E14 800ED964 E4400000 */   swc1     $f0, 0x0($v0)
.L800ED968:
/* 86E18 800ED968 3C0140A0 */  lui       $at, (0x40A00000 >> 16)
/* 86E1C 800ED96C 44810000 */  mtc1      $at, $f0
/* 86E20 800ED970 00000000 */  nop
/* 86E24 800ED974 46001000 */  add.s     $f0, $f2, $f0
/* 86E28 800ED978 46040001 */  sub.s     $f0, $f0, $f4
/* 86E2C 800ED97C 3C013D80 */  lui       $at, (0x3D800000 >> 16)
/* 86E30 800ED980 44811000 */  mtc1      $at, $f2
/* 86E34 800ED984 00000000 */  nop
.L800ED988:
/* 86E38 800ED988 46020002 */  mul.s     $f0, $f0, $f2
/* 86E3C 800ED98C 00000000 */  nop
/* 86E40 800ED990 3C018010 */  lui       $at, %hi(D_800F84F8)
/* 86E44 800ED994 E42084F8 */  swc1      $f0, %lo(D_800F84F8)($at)
.L800ED998:
/* 86E48 800ED998 C600003C */  lwc1      $f0, 0x3C($s0)
/* 86E4C 800ED99C 3C018010 */  lui       $at, %hi(D_800F84F8)
/* 86E50 800ED9A0 C42284F8 */  lwc1      $f2, %lo(D_800F84F8)($at)
/* 86E54 800ED9A4 46020000 */  add.s     $f0, $f0, $f2
/* 86E58 800ED9A8 E600003C */  swc1      $f0, 0x3C($s0)
.L800ED9AC:
/* 86E5C 800ED9AC C6000038 */  lwc1      $f0, 0x38($s0)
/* 86E60 800ED9B0 C602003C */  lwc1      $f2, 0x3C($s0)
/* 86E64 800ED9B4 C6040040 */  lwc1      $f4, 0x40($s0)
.L800ED9B8:
/* 86E68 800ED9B8 3C018010 */  lui       $at, %hi(wSavedPartnerPosX)
/* 86E6C 800ED9BC E420833C */  swc1      $f0, %lo(wSavedPartnerPosX)($at)
/* 86E70 800ED9C0 3C018010 */  lui       $at, %hi(wSavedPartnerPosY)
/* 86E74 800ED9C4 E4228340 */  swc1      $f2, %lo(wSavedPartnerPosY)($at)
/* 86E78 800ED9C8 3C018010 */  lui       $at, %hi(wSavedPartnerPosZ)
/* 86E7C 800ED9CC E4248344 */  swc1      $f4, %lo(wSavedPartnerPosZ)($at)
/* 86E80 800ED9D0 8FBF004C */  lw        $ra, 0x4C($sp)
/* 86E84 800ED9D4 8FB60048 */  lw        $s6, 0x48($sp)
/* 86E88 800ED9D8 8FB50044 */  lw        $s5, 0x44($sp)
/* 86E8C 800ED9DC 8FB40040 */  lw        $s4, 0x40($sp)
/* 86E90 800ED9E0 8FB3003C */  lw        $s3, 0x3C($sp)
/* 86E94 800ED9E4 8FB20038 */  lw        $s2, 0x38($sp)
/* 86E98 800ED9E8 8FB10034 */  lw        $s1, 0x34($sp)
/* 86E9C 800ED9EC 8FB00030 */  lw        $s0, 0x30($sp)
/* 86EA0 800ED9F0 03E00008 */  jr        $ra
/* 86EA4 800ED9F4 27BD0050 */   addiu    $sp, $sp, 0x50

### DECOMPILED C INSTRUCTIONS:

void partner_flying_update_motion(Npc* partner) {
    PlayerStatus* playerStatus = &gPlayerStatus;
    PartnerStatus* partnerStatus = &gPartnerStatus;
    f32 x, y, z, hitDepth;
    f32 var_f0;
    f32 var_f2;

    if (gGameStatusPtr->multiplayerEnabled == 0 ||
        (playerStatus->flags & (PS_FLAG_INPUT_DISABLED | PS_FLAG_NO_STATIC_COLLISION)) ||
        partnerStatus->inputDisabledCount ||
        partnerStatus->partnerAction_unk_2)
    {
        if (!(playerStatus->animFlags & PA_FLAG_OPENED_HIDDEN_PANEL) || D_800F8020 == 0) {
            partner_flying_follow_player(partner);
        }
        if (partnerStatus->pressedButtons & (BUTTON_B | BUTTON_Z | BUTTON_C_DOWN | BUTTON_C_LEFT)) {
            partnerStatus->partnerAction_unk_2 = FALSE;
        }
    }
    if (wPartnerFollowState != 50 && fabsf(partner->pos.y - playerStatus->position.y) > 1000.0f) {
        partner->pos.x = playerStatus->position.x;
        partner->pos.y = playerStatus->position.y;
        partner->pos.z = playerStatus->position.z;
        partner->jumpVelocity = 0.0f;
        partner->jumpScale = 0.0f;
        partner->flags &= ~NPC_FLAG_JUMPING;
    }

    D_800F8020 = 0;
    x = partner->pos.x;
    y = partner->pos.y + (partner->collisionHeight * 0.5f);
    z = partner->pos.z;

    hitDepth = partner->collisionHeight * 0.5f;
    if (npc_raycast_up(0, &x, &y, &z, &hitDepth) != 0) {
        D_800F8020 = 1;
        wSavedPartnerPosX = partner->pos.x;
        wSavedPartnerPosY = partner->pos.y;
        wSavedPartnerPosZ = partner->pos.z;
    } else {
        partner_do_player_collision(partner);
        if (wPartnerFollowState != 0x32) {
            x = partner->pos.x;
            y = partner->pos.y;
            z = partner->pos.z;
            hitDepth = 1000.0f;
            if (npc_raycast_down_around(COLLISION_CHANNEL_10000, &x, &y, &z, &hitDepth, partner->yaw, partner->collisionDiameter) == 0) {
                y = playerStatus->position.y;
            }

            if (partner->pos.y <= y + partner->collisionHeight + 2.0f) {
                if (playerStatus->currentSpeed != 0.0f) {
                    D_800F84F8 = ((y + (partner->collisionHeight / 2) + 2.0f) - partner->pos.y) * 0.125f;
                } else {
                    if (y < playerStatus->position.y) {
                        var_f0 = playerStatus->position.y + 10.0f - partner->pos.y;
                    } else {
                        var_f0 = y + 10.0f - partner->pos.y;
                    }
                    var_f2 = 0.25f;
                    D_800F84F8 = var_f0 * var_f2;
                }
            } else {
                if (playerStatus->position.y + playerStatus->colliderHeight < y) {
                    D_800F84F8 = (y + partner->collisionHeight - partner->pos.y) * 0.125f;
                    if (partner->pos.y + D_800F84F8 <= y + partner->collisionHeight) {
                        D_800F84F8 = (y + partner->collisionHeight - partner->pos.y) * 0.25f;
                    }
                } else {
                    var_f0 = (playerStatus->position.y + playerStatus->colliderHeight + 5.0f) - partner->pos.y;
                    var_f2 = 0.0625f;
                    D_800F84F8 = var_f0 * var_f2;
                }
            }
            partner->pos.y += D_800F84F8;
        }
        wSavedPartnerPosX = partner->pos.x;
        wSavedPartnerPosY = partner->pos.y;
        wSavedPartnerPosZ = partner->pos.z;
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel got_item_outline_appendGfx
/* 345704 E0036224 27BDFF28 */  addiu     $sp, $sp, -0xD8
/* 345708 E0036228 0080402D */  daddu     $t0, $a0, $zero
/* 34570C E003622C AFBF00B8 */  sw        $ra, 0xB8($sp)
/* 345710 E0036230 AFB700B4 */  sw        $s7, 0xB4($sp)
/* 345714 E0036234 AFB600B0 */  sw        $s6, 0xB0($sp)
/* 345718 E0036238 AFB500AC */  sw        $s5, 0xAC($sp)
/* 34571C E003623C AFB400A8 */  sw        $s4, 0xA8($sp)
/* 345720 E0036240 AFB300A4 */  sw        $s3, 0xA4($sp)
/* 345724 E0036244 AFB200A0 */  sw        $s2, 0xA0($sp)
/* 345728 E0036248 AFB1009C */  sw        $s1, 0x9C($sp)
/* 34572C E003624C AFB00098 */  sw        $s0, 0x98($sp)
/* 345730 E0036250 F7B800D0 */  sdc1      $f24, 0xD0($sp)
/* 345734 E0036254 F7B600C8 */  sdc1      $f22, 0xC8($sp)
/* 345738 E0036258 F7B400C0 */  sdc1      $f20, 0xC0($sp)
/* 34573C E003625C 8D07000C */  lw        $a3, 0xC($t0)
/* 345740 E0036260 44800000 */  mtc1      $zero, $f0
/* 345744 E0036264 C4F80018 */  lwc1      $f24, 0x18($a3)
/* 345748 E0036268 8CF30000 */  lw        $s3, 0x0($a3)
/* 34574C E003626C 4600C032 */  c.eq.s    $f24, $f0
/* 345750 E0036270 00000000 */  nop
/* 345754 E0036274 450100E0 */  bc1t      .LE00365F8
/* 345758 E0036278 3C04DB06 */   lui      $a0, (0xDB060024 >> 16)
/* 34575C E003627C 3C06800A */  lui       $a2, %hi(gMainGfxPos)
/* 345760 E0036280 24C6A66C */  addiu     $a2, $a2, %lo(gMainGfxPos)
/* 345764 E0036284 34840024 */  ori       $a0, $a0, (0xDB060024 & 0xFFFF)
/* 345768 E0036288 8CC50000 */  lw        $a1, 0x0($a2)
/* 34576C E003628C 3C02E700 */  lui       $v0, (0xE7000000 >> 16)
/* 345770 E0036290 00A0182D */  daddu     $v1, $a1, $zero
/* 345774 E0036294 24A50008 */  addiu     $a1, $a1, 0x8
/* 345778 E0036298 ACC50000 */  sw        $a1, 0x0($a2)
/* 34577C E003629C AC620000 */  sw        $v0, 0x0($v1)
/* 345780 E00362A0 24A20008 */  addiu     $v0, $a1, 0x8
/* 345784 E00362A4 AC600004 */  sw        $zero, 0x4($v1)
/* 345788 E00362A8 ACC20000 */  sw        $v0, 0x0($a2)
/* 34578C E00362AC ACA40000 */  sw        $a0, 0x0($a1)
/* 345790 E00362B0 8D030010 */  lw        $v1, 0x10($t0)
/* 345794 E00362B4 24A20010 */  addiu     $v0, $a1, 0x10
/* 345798 E00362B8 ACC20000 */  sw        $v0, 0x0($a2)
/* 34579C E00362BC 8C63001C */  lw        $v1, 0x1C($v1)
/* 3457A0 E00362C0 3C02DE00 */  lui       $v0, (0xDE000000 >> 16)
/* 3457A4 E00362C4 ACA20008 */  sw        $v0, 0x8($a1)
/* 3457A8 E00362C8 3C020901 */  lui       $v0, %hi(D_09008100_3F3F60)
/* 3457AC E00362CC 24428100 */  addiu     $v0, $v0, %lo(D_09008100_3F3F60)
/* 3457B0 E00362D0 ACA2000C */  sw        $v0, 0xC($a1)
/* 3457B4 E00362D4 3C028000 */  lui       $v0, (0x80000000 >> 16)
/* 3457B8 E00362D8 00621821 */  addu      $v1, $v1, $v0
/* 3457BC E00362DC 1660000E */  bnez      $s3, .LE0036318
/* 3457C0 E00362E0 ACA30004 */   sw       $v1, 0x4($a1)
/* 3457C4 E00362E4 24A20018 */  addiu     $v0, $a1, 0x18
/* 3457C8 E00362E8 ACC20000 */  sw        $v0, 0x0($a2)
/* 3457CC E00362EC 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 3457D0 E00362F0 ACA20010 */  sw        $v0, 0x10($a1)
/* 3457D4 E00362F4 90E3001F */  lbu       $v1, 0x1F($a3)
/* 3457D8 E00362F8 24A20020 */  addiu     $v0, $a1, 0x20
/* 3457DC E00362FC ACC20000 */  sw        $v0, 0x0($a2)
/* 3457E0 E0036300 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 3457E4 E0036304 ACA20018 */  sw        $v0, 0x18($a1)
/* 3457E8 E0036308 240200FF */  addiu     $v0, $zero, 0xFF
/* 3457EC E003630C ACA2001C */  sw        $v0, 0x1C($a1)
/* 3457F0 E0036310 0800D8D3 */  j         .LE003634C
/* 3457F4 E0036314 2402FF00 */   addiu    $v0, $zero, -0x100
.LE0036318:
/* 3457F8 E0036318 3C04FFFF */  lui       $a0, (0xFFFF00FF >> 16)
/* 3457FC E003631C 348400FF */  ori       $a0, $a0, (0xFFFF00FF & 0xFFFF)
/* 345800 E0036320 24A20018 */  addiu     $v0, $a1, 0x18
/* 345804 E0036324 ACC20000 */  sw        $v0, 0x0($a2)
/* 345808 E0036328 3C02FA00 */  lui       $v0, (0xFA000000 >> 16)
/* 34580C E003632C ACA20010 */  sw        $v0, 0x10($a1)
/* 345810 E0036330 90E3001F */  lbu       $v1, 0x1F($a3)
/* 345814 E0036334 24A20020 */  addiu     $v0, $a1, 0x20
/* 345818 E0036338 ACC20000 */  sw        $v0, 0x0($a2)
/* 34581C E003633C 3C02FB00 */  lui       $v0, (0xFB000000 >> 16)
/* 345820 E0036340 ACA20018 */  sw        $v0, 0x18($a1)
/* 345824 E0036344 2402FF00 */  addiu     $v0, $zero, -0x100
/* 345828 E0036348 ACA4001C */  sw        $a0, 0x1C($a1)
.LE003634C:
/* 34582C E003634C 00621825 */  or        $v1, $v1, $v0
/* 345830 E0036350 ACA30014 */  sw        $v1, 0x14($a1)
/* 345834 E0036354 8CE50004 */  lw        $a1, 0x4($a3)
/* 345838 E0036358 8CE60008 */  lw        $a2, 0x8($a3)
/* 34583C E003635C 8CE7000C */  lw        $a3, 0xC($a3)
/* 345840 E0036360 0C080108 */  jal       shim_guTranslateF
/* 345844 E0036364 27A40018 */   addiu    $a0, $sp, 0x18
/* 345848 E0036368 27B00058 */  addiu     $s0, $sp, 0x58
/* 34584C E003636C 4480A000 */  mtc1      $zero, $f20
/* 345850 E0036370 3C038007 */  lui       $v1, %hi(gCurrentCameraID)
/* 345854 E0036374 8C637410 */  lw        $v1, %lo(gCurrentCameraID)($v1)
/* 345858 E0036378 3C013F80 */  lui       $at, (0x3F800000 >> 16)
/* 34585C E003637C 4481B000 */  mtc1      $at, $f22
/* 345860 E0036380 00031080 */  sll       $v0, $v1, 2
/* 345864 E0036384 00431021 */  addu      $v0, $v0, $v1
/* 345868 E0036388 00021080 */  sll       $v0, $v0, 2
/* 34586C E003638C 00431023 */  subu      $v0, $v0, $v1
/* 345870 E0036390 000218C0 */  sll       $v1, $v0, 3
/* 345874 E0036394 00431021 */  addu      $v0, $v0, $v1
/* 345878 E0036398 000210C0 */  sll       $v0, $v0, 3
/* 34587C E003639C 4406A000 */  mfc1      $a2, $f20
/* 345880 E00363A0 3C01800B */  lui       $at, %hi(gCameras + 0x6C)
/* 345884 E00363A4 00220821 */  addu      $at, $at, $v0
/* 345888 E00363A8 C4201DEC */  lwc1      $f0, %lo(gCameras + 0x6C)($at)
/* 34588C E00363AC 4407B000 */  mfc1      $a3, $f22
/* 345890 E00363B0 46000007 */  neg.s     $f0, $f0
/* 345894 E00363B4 44050000 */  mfc1      $a1, $f0
/* 345898 E00363B8 0200202D */  daddu     $a0, $s0, $zero
/* 34589C E00363BC 0C080104 */  jal       shim_guRotateF
/* 3458A0 E00363C0 E7B40010 */   swc1     $f20, 0x10($sp)
/* 3458A4 E00363C4 0200202D */  daddu     $a0, $s0, $zero
/* 3458A8 E00363C8 27A50018 */  addiu     $a1, $sp, 0x18
/* 3458AC E00363CC 0C080114 */  jal       shim_guMtxCatF
/* 3458B0 E00363D0 00A0302D */   daddu    $a2, $a1, $zero
/* 3458B4 E00363D4 0200202D */  daddu     $a0, $s0, $zero
/* 3458B8 E00363D8 4405A000 */  mfc1      $a1, $f20
/* 3458BC E00363DC 3C07C000 */  lui       $a3, (0xC0000000 >> 16)
/* 3458C0 E00363E0 0C080108 */  jal       shim_guTranslateF
/* 3458C4 E00363E4 00A0302D */   daddu    $a2, $a1, $zero
/* 3458C8 E00363E8 0200202D */  daddu     $a0, $s0, $zero
/* 3458CC E00363EC 27A50018 */  addiu     $a1, $sp, 0x18
/* 3458D0 E00363F0 0C080114 */  jal       shim_guMtxCatF
/* 3458D4 E00363F4 00A0302D */   daddu    $a2, $a1, $zero
/* 3458D8 E00363F8 3C01E003 */  lui       $at, (0xE0036650 >> 16)
/* 3458DC E00363FC D4226650 */  ldc1      $f2, (0xE0036650 & 0xFFFF)($at)
/* 3458E0 E0036400 4600C021 */  cvt.d.s   $f0, $f24
/* 3458E4 E0036404 46220002 */  mul.d     $f0, $f0, $f2
/* 3458E8 E0036408 00000000 */  nop
/* 3458EC E003640C 3C120001 */  lui       $s2, (0x11630 >> 16)
/* 3458F0 E0036410 36521630 */  ori       $s2, $s2, (0x11630 & 0xFFFF)
/* 3458F4 E0036414 0200202D */  daddu     $a0, $s0, $zero
/* 3458F8 E0036418 46200620 */  cvt.s.d   $f24, $f0
/* 3458FC E003641C 4405C000 */  mfc1      $a1, $f24
/* 345900 E0036420 4407B000 */  mfc1      $a3, $f22
/* 345904 E0036424 0C080110 */  jal       shim_guScaleF
/* 345908 E0036428 00A0302D */   daddu    $a2, $a1, $zero
/* 34590C E003642C 0200202D */  daddu     $a0, $s0, $zero
/* 345910 E0036430 27A50018 */  addiu     $a1, $sp, 0x18
/* 345914 E0036434 0C080114 */  jal       shim_guMtxCatF
/* 345918 E0036438 00A0302D */   daddu    $a2, $a1, $zero
/* 34591C E003643C 27A40018 */  addiu     $a0, $sp, 0x18
/* 345920 E0036440 3C108007 */  lui       $s0, %hi(gMatrixListPos)
/* 345924 E0036444 261041F0 */  addiu     $s0, $s0, %lo(gMatrixListPos)
/* 345928 E0036448 3C11800A */  lui       $s1, %hi(gDisplayContext)
/* 34592C E003644C 2631A674 */  addiu     $s1, $s1, %lo(gDisplayContext)
/* 345930 E0036450 96050000 */  lhu       $a1, 0x0($s0)
/* 345934 E0036454 8E220000 */  lw        $v0, 0x0($s1)
/* 345938 E0036458 00052980 */  sll       $a1, $a1, 6
/* 34593C E003645C 00B22821 */  addu      $a1, $a1, $s2
/* 345940 E0036460 0C080118 */  jal       shim_guMtxF2L
/* 345944 E0036464 00452821 */   addu     $a1, $v0, $a1
/* 345948 E0036468 3C05DA38 */  lui       $a1, (0xDA380002 >> 16)
/* 34594C E003646C 34A50002 */  ori       $a1, $a1, (0xDA380002 & 0xFFFF)
/* 345950 E0036470 0000482D */  daddu     $t1, $zero, $zero
/* 345954 E0036474 3C170900 */  lui       $s7, %hi(D_09000000_415060)
/* 345958 E0036478 26F70000 */  addiu     $s7, $s7, %lo(D_09000000_415060)
/* 34595C E003647C 3C160900 */  lui       $s6, %hi(D_09004000_411290)
/* 345960 E0036480 26D64000 */  addiu     $s6, $s6, %lo(D_09004000_411290)
/* 345964 E0036484 3C02800A */  lui       $v0, %hi(gMainGfxPos)
/* 345968 E0036488 2442A66C */  addiu     $v0, $v0, %lo(gMainGfxPos)
/* 34596C E003648C 0040302D */  daddu     $a2, $v0, $zero
/* 345970 E0036490 3C0DFD68 */  lui       $t5, (0xFD68007F >> 16)
/* 345974 E0036494 35AD007F */  ori       $t5, $t5, (0xFD68007F & 0xFFFF)
/* 345978 E0036498 3C0AF568 */  lui       $t2, (0xF5682000 >> 16)
/* 34597C E003649C 354A2000 */  ori       $t2, $t2, (0xF5682000 & 0xFFFF)
/* 345980 E00364A0 3C150700 */  lui       $s5, (0x7000000 >> 16)
/* 345984 E00364A4 3C14E600 */  lui       $s4, (0xE6000000 >> 16)
/* 345988 E00364A8 3C19F400 */  lui       $t9, (0xF4000000 >> 16)
/* 34598C E00364AC 3C0C071F */  lui       $t4, (0x71FC07C >> 16)
/* 345990 E00364B0 358CC07C */  ori       $t4, $t4, (0x71FC07C & 0xFFFF)
/* 345994 E00364B4 3C18E700 */  lui       $t8, (0xE7000000 >> 16)
/* 345998 E00364B8 3C0FF200 */  lui       $t7, (0xF2000000 >> 16)
/* 34599C E00364BC 3C0B001F */  lui       $t3, (0x1FC07C >> 16)
/* 3459A0 E00364C0 356BC07C */  ori       $t3, $t3, (0x1FC07C & 0xFFFF)
/* 3459A4 E00364C4 3C0EDE00 */  lui       $t6, (0xDE000000 >> 16)
/* 3459A8 E00364C8 3C08E003 */  lui       $t0, %hi(D_E0036630)
/* 3459AC E00364CC 25086630 */  addiu     $t0, $t0, %lo(D_E0036630)
/* 3459B0 E00364D0 0120382D */  daddu     $a3, $t1, $zero
/* 3459B4 E00364D4 8CC30000 */  lw        $v1, 0x0($a2)
/* 3459B8 E00364D8 96020000 */  lhu       $v0, 0x0($s0)
/* 3459BC E00364DC 0060202D */  daddu     $a0, $v1, $zero
/* 3459C0 E00364E0 24630008 */  addiu     $v1, $v1, 0x8
/* 3459C4 E00364E4 ACC30000 */  sw        $v1, 0x0($a2)
/* 3459C8 E00364E8 24430001 */  addiu     $v1, $v0, 0x1
/* 3459CC E00364EC 3042FFFF */  andi      $v0, $v0, 0xFFFF
/* 3459D0 E00364F0 00021180 */  sll       $v0, $v0, 6
/* 3459D4 E00364F4 AC850000 */  sw        $a1, 0x0($a0)
/* 3459D8 E00364F8 A6030000 */  sh        $v1, 0x0($s0)
/* 3459DC E00364FC 8E230000 */  lw        $v1, 0x0($s1)
/* 3459E0 E0036500 00521021 */  addu      $v0, $v0, $s2
/* 3459E4 E0036504 00621821 */  addu      $v1, $v1, $v0
/* 3459E8 E0036508 AC830004 */  sw        $v1, 0x4($a0)
.LE003650C:
/* 3459EC E003650C 16600002 */  bnez      $s3, .LE0036518
/* 3459F0 E0036510 00F62021 */   addu     $a0, $a3, $s6
/* 3459F4 E0036514 00F72021 */  addu      $a0, $a3, $s7
.LE0036518:
/* 3459F8 E0036518 24E71000 */  addiu     $a3, $a3, 0x1000
/* 3459FC E003651C 8CC30000 */  lw        $v1, 0x0($a2)
/* 345A00 E0036520 25290001 */  addiu     $t1, $t1, 0x1
/* 345A04 E0036524 0060102D */  daddu     $v0, $v1, $zero
/* 345A08 E0036528 24630008 */  addiu     $v1, $v1, 0x8
/* 345A0C E003652C AC4D0000 */  sw        $t5, 0x0($v0)
/* 345A10 E0036530 AC440004 */  sw        $a0, 0x4($v0)
/* 345A14 E0036534 AC6A0000 */  sw        $t2, 0x0($v1)
/* 345A18 E0036538 AC750004 */  sw        $s5, 0x4($v1)
/* 345A1C E003653C AC740008 */  sw        $s4, 0x8($v1)
/* 345A20 E0036540 AC60000C */  sw        $zero, 0xC($v1)
/* 345A24 E0036544 AC790010 */  sw        $t9, 0x10($v1)
/* 345A28 E0036548 AC6C0014 */  sw        $t4, 0x14($v1)
/* 345A2C E003654C AC780018 */  sw        $t8, 0x18($v1)
/* 345A30 E0036550 AC60001C */  sw        $zero, 0x1C($v1)
/* 345A34 E0036554 AC6A0020 */  sw        $t2, 0x20($v1)
/* 345A38 E0036558 AC600024 */  sw        $zero, 0x24($v1)
/* 345A3C E003655C AC6F0028 */  sw        $t7, 0x28($v1)
/* 345A40 E0036560 AC6B002C */  sw        $t3, 0x2C($v1)
/* 345A44 E0036564 AC6E0030 */  sw        $t6, 0x30($v1)
/* 345A48 E0036568 8D040000 */  lw        $a0, 0x0($t0)
/* 345A4C E003656C 25080004 */  addiu     $t0, $t0, 0x4
/* 345A50 E0036570 24620008 */  addiu     $v0, $v1, 0x8
/* 345A54 E0036574 ACC30000 */  sw        $v1, 0x0($a2)
/* 345A58 E0036578 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A5C E003657C 24620010 */  addiu     $v0, $v1, 0x10
/* 345A60 E0036580 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A64 E0036584 24620018 */  addiu     $v0, $v1, 0x18
/* 345A68 E0036588 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A6C E003658C 24620020 */  addiu     $v0, $v1, 0x20
/* 345A70 E0036590 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A74 E0036594 24620028 */  addiu     $v0, $v1, 0x28
/* 345A78 E0036598 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A7C E003659C 24620030 */  addiu     $v0, $v1, 0x30
/* 345A80 E00365A0 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A84 E00365A4 24620038 */  addiu     $v0, $v1, 0x38
/* 345A88 E00365A8 ACC20000 */  sw        $v0, 0x0($a2)
/* 345A8C E00365AC 29220004 */  slti      $v0, $t1, 0x4
/* 345A90 E00365B0 1440FFD6 */  bnez      $v0, .LE003650C
/* 345A94 E00365B4 AC640034 */   sw       $a0, 0x34($v1)
/* 345A98 E00365B8 3C03D838 */  lui       $v1, (0xD8380002 >> 16)
/* 345A9C E00365BC 3C04800A */  lui       $a0, %hi(gMainGfxPos)
/* 345AA0 E00365C0 2484A66C */  addiu     $a0, $a0, %lo(gMainGfxPos)
/* 345AA4 E00365C4 8C820000 */  lw        $v0, 0x0($a0)
/* 345AA8 E00365C8 34630002 */  ori       $v1, $v1, (0xD8380002 & 0xFFFF)
/* 345AAC E00365CC 0040282D */  daddu     $a1, $v0, $zero
/* 345AB0 E00365D0 24420008 */  addiu     $v0, $v0, 0x8
/* 345AB4 E00365D4 AC820000 */  sw        $v0, 0x0($a0)
/* 345AB8 E00365D8 ACA30000 */  sw        $v1, 0x0($a1)
/* 345ABC E00365DC 24030040 */  addiu     $v1, $zero, 0x40
/* 345AC0 E00365E0 ACA30004 */  sw        $v1, 0x4($a1)
/* 345AC4 E00365E4 24430008 */  addiu     $v1, $v0, 0x8
/* 345AC8 E00365E8 AC830000 */  sw        $v1, 0x0($a0)
/* 345ACC E00365EC 3C03E700 */  lui       $v1, (0xE7000000 >> 16)
/* 345AD0 E00365F0 AC430000 */  sw        $v1, 0x0($v0)
/* 345AD4 E00365F4 AC400004 */  sw        $zero, 0x4($v0)
.LE00365F8:
/* 345AD8 E00365F8 8FBF00B8 */  lw        $ra, 0xB8($sp)
/* 345ADC E00365FC 8FB700B4 */  lw        $s7, 0xB4($sp)
/* 345AE0 E0036600 8FB600B0 */  lw        $s6, 0xB0($sp)
/* 345AE4 E0036604 8FB500AC */  lw        $s5, 0xAC($sp)
/* 345AE8 E0036608 8FB400A8 */  lw        $s4, 0xA8($sp)
/* 345AEC E003660C 8FB300A4 */  lw        $s3, 0xA4($sp)
/* 345AF0 E0036610 8FB200A0 */  lw        $s2, 0xA0($sp)
/* 345AF4 E0036614 8FB1009C */  lw        $s1, 0x9C($sp)
/* 345AF8 E0036618 8FB00098 */  lw        $s0, 0x98($sp)
/* 345AFC E003661C D7B800D0 */  ldc1      $f24, 0xD0($sp)
/* 345B00 E0036620 D7B600C8 */  ldc1      $f22, 0xC8($sp)
/* 345B04 E0036624 D7B400C0 */  ldc1      $f20, 0xC0($sp)
/* 345B08 E0036628 03E00008 */  jr        $ra
/* 345B0C E003662C 27BD00D8 */   addiu    $sp, $sp, 0xD8

### DECOMPILED C INSTRUCTIONS:

void got_item_outline_appendGfx(void* effect) {
    GotItemOutlineFXData* data = ((EffectInstance*)effect)->data.gotItemOutline;
    s32 type = data->type;
    f32 scale = data->scale;
    Matrix4f mtxTransform;
    Matrix4f mtxTemp;
    s32 i;

    if (scale != 0.0f) {
        gDPPipeSync(gMainGfxPos++);
        gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
        gSPDisplayList(gMainGfxPos++, D_09008100_34DC40);

        if (type == 0) {
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha);
            gDPSetEnvColor(gMainGfxPos++, 0, 0, 0, 255);
        } else {
            gDPSetPrimColor(gMainGfxPos++, 0, 0, 255, 255, 255, data->alpha);
            gDPSetEnvColor(gMainGfxPos++, 255, 255, 0, 255);
        }

        shim_guTranslateF(mtxTransform, data->pos.x, data->pos.y, data->pos.z);
        shim_guRotateF(mtxTemp, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
        shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
        shim_guTranslateF(mtxTemp, 0.0f, 0.0f, -2.0f);
        shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);

        scale *= 0.6;

        shim_guScaleF(mtxTemp, scale, scale, 1.0f);
        shim_guMtxCatF(mtxTemp, mtxTransform, mtxTransform);
        shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]);

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

        for (i = 0; i < 4; i++) {
            IMG_PTR img;

            if (type == 0) {
                img = D_09000000_345B40[i];
            } else {
                img = D_09004000_349B40[i];
            }

            gDPSetTextureImage(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 128, img);
            gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_LOADTILE, 0,
                       G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
                       G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
            gDPLoadSync(gMainGfxPos++);
            gDPLoadTile(gMainGfxPos++, G_TX_LOADTILE, 0, 0, 508, 124);
            gDPPipeSync(gMainGfxPos++);
            gDPSetTile(gMainGfxPos++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0, G_TX_RENDERTILE, 0,
                       G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD,
                       G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
            gDPSetTileSize(gMainGfxPos++, G_TX_RENDERTILE, 0, 0, 508, 124);
            gSPDisplayList(gMainGfxPos++, D_E0036630[i]);
        }

        gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW);
        gDPPipeSync(gMainGfxPos++);
    }
}


### RAW ASSEMBLY INSTRUCTIONS:

glabel func_80240DA4_EA9884
/* 9087D4 80240DA4 27BDFFA0 */  addiu     $sp, $sp, -0x60
glabel func_80240DA8
/* 9087D8 80240DA8 0000202D */  daddu     $a0, $zero, $zero
glabel sam_08_MeleeHitbox_31
/* 9087DC 80240DAC 3C05FD05 */  lui       $a1, (0xFD050F80 >> 16)
glabel .L80240DB0
/* 9087E0 80240DB0 34A50F80 */  ori       $a1, $a1, (0xFD050F80 & 0xFFFF)
glabel mgm_00_PatrolNoAttackAI_15
/* 9087E4 80240DB4 AFBF0058 */  sw        $ra, 0x58($sp)
glabel mgm_01_EndBowserPanelAnimation
/* 9087E8 80240DB8 AFB10054 */  sw        $s1, 0x54($sp)
glabel pra_31_UnkFunc12
/* 9087EC 80240DBC 0C0B1EAF */  jal       evt_get_variable
glabel func_80240DC0
/* 9087F0 80240DC0 AFB00050 */   sw       $s0, 0x50($sp)
glabel dead_kzn_17_func_80240DC4_EA16C4
/* 9087F4 80240DC4 241000E2 */  addiu     $s0, $zero, 0xE2
glabel .L80240DC8
/* 9087F8 80240DC8 3C038024 */  lui       $v1, %hi(func_802417C8)
glabel func_80240DCC
/* 9087FC 80240DCC 8C6317C8 */  lw        $v1, %lo(func_802417C8)($v1)
glabel func_80240DD0
/* 908800 80240DD0 0040202D */  daddu     $a0, $v0, $zero
glabel .L80240DD4
/* 908804 80240DD4 2C620005 */  sltiu     $v0, $v1, 0x5
glabel .L80240DD8
/* 908808 80240DD8 1040003F */  beqz      $v0, sam_02_Quizmo_NPC_Aux_Impl
D_80240DDC:
/* 90880C 80240DDC 24110046 */   addiu    $s1, $zero, 0x46
glabel func_80240DE0
/* 908810 80240DE0 00031080 */  sll       $v0, $v1, 2
D_80240DE4:
/* 908814 80240DE4 3C018024 */  lui       $at, %hi(D_802437F0)
glabel dead_flo_16_SuperBlock_WaitForPlayerToLand
/* 908818 80240DE8 00220821 */  addu      $at, $at, $v0
glabel func_80240DEC
/* 90881C 80240DEC 8C2237F0 */  lw        $v0, %lo(D_802437F0)($at)
glabel func_80240DF0
/* 908820 80240DF0 00400008 */  jr        $v0
glabel func_80240DF4
/* 908824 80240DF4 00000000 */   nop
glabel func_80240DF8
/* 908828 80240DF8 8482001E */  lh        $v0, 0x1E($a0)
glabel func_80240DFC
/* 90882C 80240DFC 10400036 */  beqz      $v0, sam_02_Quizmo_NPC_Aux_Impl
glabel func_80240E00
/* 908830 80240E00 24020001 */   addiu    $v0, $zero, 0x1
D_80240E04:
/* 908834 80240E04 080903B4 */  j         func_80240ED0
glabel flo_22_pad_E08
/* 908838 80240E08 00000000 */   nop
glabel func_80240E0C
/* 90883C 80240E0C 3C048024 */  lui       $a0, %hi(dead_flo_08_AddPlayerHandsOffset)
D_80240E10:
/* 908840 80240E10 248417CC */  addiu     $a0, $a0, %lo(dead_flo_08_AddPlayerHandsOffset)
glabel func_80240E14
/* 908844 80240E14 3C058024 */  lui       $a1, %hi(dead_flo_14_FlyingAI_ChaseInit)
glabel dead_flo_16_IsPlayerPounding
/* 908848 80240E18 24A517D0 */  addiu     $a1, $a1, %lo(dead_flo_14_FlyingAI_ChaseInit)
glabel func_80240E1C
/* 90884C 80240E1C 8C820000 */  lw        $v0, 0x0($a0)
glabel func_80240E20
/* 908850 80240E20 8CA30000 */  lw        $v1, 0x0($a1)
D_80240E24:
/* 908854 80240E24 24420014 */  addiu     $v0, $v0, 0x14
glabel flo_12_pad_E28
/* 908858 80240E28 24630005 */  addiu     $v1, $v1, 0x5
glabel func_80240E2C
/* 90885C 80240E2C AC820000 */  sw        $v0, 0x0($a0)
D_80240E30:
/* 908860 80240E30 0050102A */  slt       $v0, $v0, $s0
glabel func_80240E34
/* 908864 80240E34 14400002 */  bnez      $v0, D_80240E40
glabel func_80240E38
/* 908868 80240E38 ACA30000 */   sw       $v1, 0x0($a1)
D_80240E3C:
/* 90886C 80240E3C AC900000 */  sw        $s0, 0x0($a0)
D_80240E40:
/* 908870 80240E40 0071102A */  slt       $v0, $v1, $s1
.L80240E44:
/* 908874 80240E44 50400001 */  beql      $v0, $zero, func_80240E4C
glabel func_80240E48
/* 908878 80240E48 ACB10000 */   sw       $s1, 0x0($a1)
glabel func_80240E4C
/* 90887C 80240E4C 8C820000 */  lw        $v0, 0x0($a0)
glabel dead_flo_16_FlyingAI_WanderInit
/* 908880 80240E50 14500021 */  bne       $v0, $s0, sam_02_Quizmo_NPC_Aux_Impl
glabel func_80240E54
/* 908884 80240E54 00000000 */   nop
glabel func_80240E58
/* 908888 80240E58 8CA20000 */  lw        $v0, 0x0($a1)
D_80240E5C:
/* 90888C 80240E5C 1451001E */  bne       $v0, $s1, sam_02_Quizmo_NPC_Aux_Impl
glabel func_80240E60
/* 908890 80240E60 24020002 */   addiu    $v0, $zero, 0x2
glabel dead_11_FlyingAI_Chase
/* 908894 80240E64 080903B4 */  j         func_80240ED0
D_80240E68:
/* 908898 80240E68 00000000 */   nop
glabel func_80240E6C
/* 90889C 80240E6C 8482001E */  lh        $v0, 0x1E($a0)
glabel func_80240E70
/* 9088A0 80240E70 14400019 */  bnez      $v0, sam_02_Quizmo_NPC_Aux_Impl
glabel func_80240E74
/* 9088A4 80240E74 24020003 */   addiu    $v0, $zero, 0x3
glabel .L80240E78
/* 9088A8 80240E78 080903B4 */  j         func_80240ED0
glabel .L80240E7C
/* 9088AC 80240E7C 00000000 */   nop
glabel func_80240E80
/* 9088B0 80240E80 3C048024 */  lui       $a0, %hi(dead_flo_08_AddPlayerHandsOffset)
glabel dead_flo_13_FlyingAI_ChaseInit
/* 9088B4 80240E84 248417CC */  addiu     $a0, $a0, %lo(dead_flo_08_AddPlayerHandsOffset)
flo_18_pad_E88:
/* 9088B8 80240E88 3C058024 */  lui       $a1, %hi(dead_flo_14_FlyingAI_ChaseInit)
glabel sam_02_Quizmo_RenderInit
/* 9088BC 80240E8C 24A517D0 */  addiu     $a1, $a1, %lo(dead_flo_14_FlyingAI_ChaseInit)
D_80240E90:
/* 9088C0 80240E90 8C820000 */  lw        $v0, 0x0($a0)
glabel func_80240E94
/* 9088C4 80240E94 8CA30000 */  lw        $v1, 0x0($a1)
glabel func_80240E98
/* 9088C8 80240E98 2442FFEC */  addiu     $v0, $v0, -0x14
glabel func_80240E9C
/* 9088CC 80240E9C 2463FFFB */  addiu     $v1, $v1, -0x5
glabel .L80240EA0
/* 9088D0 80240EA0 AC820000 */  sw        $v0, 0x0($a0)
glabel flo_03_pad_EA4
/* 9088D4 80240EA4 04410002 */  bgez      $v0, func_80240EB0
glabel func_80240EA8
/* 9088D8 80240EA8 ACA30000 */   sw       $v1, 0x0($a1)
glabel func_80240EAC
/* 9088DC 80240EAC AC800000 */  sw        $zero, 0x0($a0)
glabel func_80240EB0
/* 9088E0 80240EB0 04620001 */  bltzl     $v1, func_80240EB8
glabel func_80240EB4
/* 9088E4 80240EB4 ACA00000 */   sw       $zero, 0x0($a1)
glabel func_80240EB8
/* 9088E8 80240EB8 8C820000 */  lw        $v0, 0x0($a0)
glabel sam_11_Quizmo_UpdateRecords
/* 9088EC 80240EBC 1440000A */  bnez      $v0, pra_39_worker_reflect_partner_floor
glabel end_01_CharAnim_FadeIn_5
/* 9088F0 80240EC0 00000000 */   nop
glabel .L80240EC4
/* 9088F4 80240EC4 8CA20000 */  lw        $v0, 0x0($a1)
glabel dead_11_FlyingAI_LosePlayer
/* 9088F8 80240EC8 14400003 */  bnez      $v0, sam_02_Quizmo_NPC_Aux_Impl
glabel func_80240ECC
/* 9088FC 80240ECC 24020004 */   addiu    $v0, $zero, 0x4
glabel func_80240ED0
/* 908900 80240ED0 3C018024 */  lui       $at, %hi(func_802417C8)
glabel .L80240ED4
/* 908904 80240ED4 AC2217C8 */  sw        $v0, %lo(func_802417C8)($at)
glabel sam_02_Quizmo_NPC_Aux_Impl
/* 908908 80240ED8 3C028024 */  lui       $v0, %hi(dead_flo_08_AddPlayerHandsOffset)
glabel omo_02_GuardAI_IdleInit
/* 90890C 80240EDC 8C4217CC */  lw        $v0, %lo(dead_flo_08_AddPlayerHandsOffset)($v0)
D_80240EE0:
/* 908910 80240EE0 10400074 */  beqz      $v0, func_802410B4
glabel .L80240EE4
/* 908914 80240EE4 00000000 */   nop
glabel pra_39_worker_reflect_partner_floor
/* 908918 80240EE8 3C098024 */  lui       $t1, %hi(dead_flo_14_FlyingAI_ChaseInit)
glabel func_80240EEC
/* 90891C 80240EEC 8D2917D0 */  lw        $t1, %lo(dead_flo_14_FlyingAI_ChaseInit)($t1)
D_80240EF0:
/* 908920 80240EF0 11200070 */  beqz      $t1, func_802410B4
glabel sam_08_MeleeHitbox_33
/* 908924 80240EF4 2402002F */   addiu    $v0, $zero, 0x2F
glabel func_80240EF8
/* 908928 80240EF8 3C013FE0 */  lui       $at, (0x3FE00000 >> 16)
glabel dead_flo_09_FlyingAI_JumpInit
/* 90892C 80240EFC 44810800 */  mtc1      $at, $f1
glabel func_80240F00
/* 908930 80240F00 44800000 */  mtc1      $zero, $f0
glabel func_80240F04
/* 908934 80240F04 44902000 */  mtc1      $s0, $f4
flo_03_varStash:
/* 908938 80240F08 00000000 */  nop
D_80240F0C:
/* 90893C 80240F0C 46802121 */  cvt.d.w   $f4, $f4
glabel func_80240F10
/* 908940 80240F10 46202102 */  mul.d     $f4, $f4, $f0
glabel func_80240F14
/* 908944 80240F14 00000000 */  nop
glabel func_80240F18
/* 908948 80240F18 3C088024 */  lui       $t0, %hi(dead_flo_08_AddPlayerHandsOffset)
glabel func_80240F1C
/* 90894C 80240F1C 8D0817CC */  lw        $t0, %lo(dead_flo_08_AddPlayerHandsOffset)($t0)
glabel func_80240F20
/* 908950 80240F20 44884000 */  mtc1      $t0, $f8
glabel .L80240F24
/* 908954 80240F24 00000000 */  nop
dead_flo_03_varStash:
/* 908958 80240F28 46804221 */  cvt.d.w   $f8, $f8
glabel func_80240F2C_D7FC8C
/* 90895C 80240F2C 46204202 */  mul.d     $f8, $f8, $f0
glabel func_80240F30
/* 908960 80240F30 00000000 */  nop
glabel .L80240F34
/* 908964 80240F34 44913000 */  mtc1      $s1, $f6
glabel func_80240F38
/* 908968 80240F38 00000000 */  nop
D_80240F3C:
/* 90896C 80240F3C 468031A1 */  cvt.d.w   $f6, $f6
glabel func_80240F40_EB9D90
/* 908970 80240F40 46203182 */  mul.d     $f6, $f6, $f0
glabel func_80240F44
/* 908974 80240F44 00000000 */  nop
glabel func_80240F48
/* 908978 80240F48 44895000 */  mtc1      $t1, $f10
glabel func_80240F4C
/* 90897C 80240F4C 00000000 */  nop
glabel pra_39_SwooperAI_Main
/* 908980 80240F50 468052A1 */  cvt.d.w   $f10, $f10
glabel func_80240F54_DE33E4
/* 908984 80240F54 46205282 */  mul.d     $f10, $f10, $f0
glabel func_80240F58
/* 908988 80240F58 00000000 */  nop
.L80240F5C:
/* 90898C 80240F5C 44821000 */  mtc1      $v0, $f2
glabel func_80240F60_D4DFA0
/* 908990 80240F60 00000000 */  nop
D_80240F64:
/* 908994 80240F64 468010A1 */  cvt.d.w   $f2, $f2
glabel func_80240F68
/* 908998 80240F68 46241080 */  add.d     $f2, $f2, $f4
D_80240F6C:
/* 90899C 80240F6C 46281401 */  sub.d     $f16, $f2, $f8
glabel func_80240F70
/* 9089A0 80240F70 3C014080 */  lui       $at, (0x40800000 >> 16)
glabel dead_flo_09lo_09_FlyingAI_Jump
/* 9089A4 80240F74 44817000 */  mtc1      $at, $f14
glabel func_80240F78
/* 9089A8 80240F78 46208320 */  cvt.s.d   $f12, $f16
glabel omo_04_FlyingAI_JumpInit
/* 9089AC 80240F7C 460E6302 */  mul.s     $f12, $f12, $f14
glabel func_80240F80
/* 9089B0 80240F80 00000000 */  nop
glabel func_80240F84
/* 9089B4 80240F84 24020064 */  addiu     $v0, $zero, 0x64
glabel kzn_04_SuperBlock_PartnerSparkles2
/* 9089B8 80240F88 44820000 */  mtc1      $v0, $f0
glabel func_80240F8C
/* 9089BC 80240F8C 00000000 */  nop
glabel func_80240F90
/* 9089C0 80240F90 46800021 */  cvt.d.w   $f0, $f0
glabel func_80240F94
/* 9089C4 80240F94 46260000 */  add.d     $f0, $f0, $f6
glabel .L80240F98
/* 9089C8 80240F98 462A0181 */  sub.d     $f6, $f0, $f10
glabel func_80240F9C
/* 9089CC 80240F9C 46203120 */  cvt.s.d   $f4, $f6
glabel func_80240FA0
/* 9089D0 80240FA0 460E2102 */  mul.s     $f4, $f4, $f14
glabel func_80240FA4
/* 9089D4 80240FA4 00000000 */  nop
glabel func_80240FA8
/* 9089D8 80240FA8 46281080 */  add.d     $f2, $f2, $f8
glabel func_80240FAC
/* 9089DC 80240FAC 24040004 */  addiu     $a0, $zero, 0x4
glabel func_80240FB0_EB9E00
/* 9089E0 80240FB0 3C03800A */  lui       $v1, %hi(gMainGfxPos)
glabel omo_17_FlyingAI_WanderInit
/* 9089E4 80240FB4 2463A66C */  addiu     $v1, $v1, %lo(gMainGfxPos)
glabel func_80240FB8
/* 9089E8 80240FB8 462010A0 */  cvt.s.d   $f2, $f2
glabel func_80240FBC
/* 9089EC 80240FBC 460E1082 */  mul.s     $f2, $f2, $f14
glabel func_80240FC0
/* 9089F0 80240FC0 00000000 */  nop
glabel func_80240FC4
/* 9089F4 80240FC4 3C058024 */  lui       $a1, %hi(func_802417D8)
.L80240FC8:
/* 9089F8 80240FC8 24A517D8 */  addiu     $a1, $a1, %lo(func_802417D8)
glabel func_80240FCC
/* 9089FC 80240FCC 8C620000 */  lw        $v0, 0x0($v1)
tst_04_B_80240FD0:
/* 908A00 80240FD0 3C06ED00 */  lui       $a2, (0xED000000 >> 16)
glabel func_80240FD4
/* 908A04 80240FD4 0040382D */  daddu     $a3, $v0, $zero
glabel omo_07_PatrolAI_LosePlayer
/* 908A08 80240FD8 462A0000 */  add.d     $f0, $f0, $f10
glabel func_80240FDC
/* 908A0C 80240FDC 24420008 */  addiu     $v0, $v0, 0x8
glabel func_80240FE0
/* 908A10 80240FE0 AC620000 */  sw        $v0, 0x0($v1)
glabel func_80240FE4
/* 908A14 80240FE4 46200020 */  cvt.s.d   $f0, $f0
glabel func_80240FE8
/* 908A18 80240FE8 460E0002 */  mul.s     $f0, $f0, $f14
glabel end_00_CharAnim_HoldClearImgFX
/* 908A1C 80240FEC 00000000 */  nop
glabel func_80240FF0
/* 908A20 80240FF0 4600648D */  trunc.w.s $f18, $f12
glabel omo_04_FlyingAI_Jump
/* 908A24 80240FF4 44039000 */  mfc1      $v1, $f18
glabel func_80240FF8
/* 908A28 80240FF8 00000000 */  nop
glabel func_80240FFC
/* 908A2C 80240FFC 30630FFF */  andi      $v1, $v1, 0xFFF
glabel dead_flo_16_FlyingAI_Wander
/* 908A30 80241000 00031B00 */  sll       $v1, $v1, 12
glabel pra_28_GetItemName
/* 908A34 80241004 4600248D */  trunc.w.s $f18, $f4
glabel func_80241008
/* 908A38 80241008 44029000 */  mfc1      $v0, $f18
D_8024100C:
/* 908A3C 8024100C 00000000 */  nop
glabel func_80241010
/* 908A40 80241010 30420FFF */  andi      $v0, $v0, 0xFFF
glabel func_80241014
/* 908A44 80241014 00461025 */  or        $v0, $v0, $a2
glabel func_80241018
/* 908A48 80241018 00621825 */  or        $v1, $v1, $v0
glabel dead_flo_13_FlyingAI_LosePlayer
/* 908A4C 8024101C 4600148D */  trunc.w.s $f18, $f2
glabel func_80241020
/* 908A50 80241020 44029000 */  mfc1      $v0, $f18
glabel func_80241024
/* 908A54 80241024 00000000 */  nop
glabel UpdateAntiGuyPosition
/* 908A58 80241028 30420FFF */  andi      $v0, $v0, 0xFFF
glabel func_8024102C
/* 908A5C 8024102C 00021300 */  sll       $v0, $v0, 12
glabel func_80241030
/* 908A60 80241030 ACE30000 */  sw        $v1, 0x0($a3)
.L80241034:
/* 908A64 80241034 4600048D */  trunc.w.s $f18, $f0
glabel func_80241038
/* 908A68 80241038 44039000 */  mfc1      $v1, $f18
glabel func_8024103C
/* 908A6C 8024103C 00000000 */  nop
glabel func_80241040
/* 908A70 80241040 30630FFF */  andi      $v1, $v1, 0xFFF
flo_19_pad_1044:
/* 908A74 80241044 00431025 */  or        $v0, $v0, $v1
glabel .L80241048
/* 908A78 80241048 ACE20004 */  sw        $v0, 0x4($a3)
D_8024104C:
/* 908A7C 8024104C 240200B4 */  addiu     $v0, $zero, 0xB4
D_80241050:
/* 908A80 80241050 AFA2001C */  sw        $v0, 0x1C($sp)
glabel func_80241054
/* 908A84 80241054 24020140 */  addiu     $v0, $zero, 0x140
glabel func_80241058
/* 908A88 80241058 AFA20044 */  sw        $v0, 0x44($sp)
.L8024105C:
/* 908A8C 8024105C 240200F0 */  addiu     $v0, $zero, 0xF0
glabel omo_04_FlyingAI_ChaseInit
/* 908A90 80241060 4620848D */  trunc.w.d $f18, $f16
glabel func_80241064
/* 908A94 80241064 44069000 */  mfc1      $a2, $f18
glabel func_80241068
/* 908A98 80241068 3C013F80 */  lui       $at, (0x3F800000 >> 16)
glabel func_8024106C
/* 908A9C 8024106C 44810000 */  mtc1      $at, $f0
glabel func_80241070
/* 908AA0 80241070 4620348D */  trunc.w.d $f18, $f6
glabel func_80241074
/* 908AA4 80241074 44079000 */  mfc1      $a3, $f18
glabel pra_35_PatrolAI_Move
/* 908AA8 80241078 AFA00010 */  sw        $zero, 0x10($sp)
glabel func_8024107C
/* 908AAC 8024107C AFA80014 */  sw        $t0, 0x14($sp)
glabel func_80241080
/* 908AB0 80241080 AFA90018 */  sw        $t1, 0x18($sp)
glabel func_80241084
/* 908AB4 80241084 AFA00020 */  sw        $zero, 0x20($sp)
glabel sam_07_PiranhaPlantAI_10
/* 908AB8 80241088 AFA0002C */  sw        $zero, 0x2C($sp)
glabel func_8024108C
/* 908ABC 8024108C AFA00030 */  sw        $zero, 0x30($sp)
glabel mgm_01_OnBreakBlock
/* 908AC0 80241090 AFA00034 */  sw        $zero, 0x34($sp)
D_80241094:
/* 908AC4 80241094 AFA00038 */  sw        $zero, 0x38($sp)
glabel func_80241098
/* 908AC8 80241098 AFA0003C */  sw        $zero, 0x3C($sp)
glabel func_8024109C
/* 908ACC 8024109C AFA00040 */  sw        $zero, 0x40($sp)
D_802410A0:
/* 908AD0 802410A0 AFA20048 */  sw        $v0, 0x48($sp)
glabel omo_09_PatrolAI_Move
/* 908AD4 802410A4 AFA0004C */  sw        $zero, 0x4C($sp)
D_802410A8:
/* 908AD8 802410A8 E7A00024 */  swc1      $f0, 0x24($sp)
D_802410AC:
/* 908ADC 802410AC 0C03D4B8 */  jal       draw_box
glabel omo_02_GuardAI_AlertInit
/* 908AE0 802410B0 E7A00028 */   swc1     $f0, 0x28($sp)
glabel func_802410B4
/* 908AE4 802410B4 8FBF0058 */  lw        $ra, 0x58($sp)
glabel func_802410B8
/* 908AE8 802410B8 8FB10054 */  lw        $s1, 0x54($sp)
glabel func_802410BC
/* 908AEC 802410BC 8FB00050 */  lw        $s0, 0x50($sp)
glabel func_802410C0
/* 908AF0 802410C0 03E00008 */  jr        $ra
glabel func_802410C4
/* 908AF4 802410C4 27BD0060 */   addiu    $sp, $sp, 0x60

### DECOMPILED C INSTRUCTIONS:

void func_80240DA4_9087D4(void) {
    s32 fullWidth = 226;
    s32 fullHeight = 70;
    s32 baseX = SCREEN_WIDTH / 2 - fullWidth / 2;
    s32 baseY = 100;
    EndChapter* data = (EndChapter*) evt_get_variable(NULL, MV_EndChapterDataPtr);

    switch (D_802417C8_9091F8) {
        case 0:
            if (data->unk1E) {
                D_802417C8_9091F8 = 1;
            }
            break;
        case 1:
            D_802417CC_9091FC += 20;
            D_802417D0_909200 += 5;
            if (D_802417CC_9091FC >= fullWidth) {
                D_802417CC_9091FC = fullWidth;
            }
            if (D_802417D0_909200 >= fullHeight) {
                D_802417D0_909200 = fullHeight;
            }
            if (D_802417CC_9091FC == fullWidth && D_802417D0_909200 == fullHeight) {
                D_802417C8_9091F8 = 2;
            }
            break;
        case 2:
            if (!data->unk1E) {
               D_802417C8_9091F8 = 3;
            }
            break;
        case 3:
            D_802417CC_9091FC -= 20;
            D_802417D0_909200 -= 5;
            if (D_802417CC_9091FC < 0) {
                D_802417CC_9091FC = 0;
            }
            if (D_802417D0_909200 < 0) {
                D_802417D0_909200 = 0;
            }
            if (D_802417CC_9091FC == 0 && D_802417D0_909200 == 0) {
                D_802417C8_9091F8 = 4;
            }
            break;
        case 4:
            break;
    }

    if (D_802417CC_9091FC != 0 && D_802417D0_909200 != 0) {
        f64 ulx = baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5);
        f64 uly = baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5);
        f64 lrx = baseX + (fullWidth * 0.5) + (D_802417CC_9091FC * 0.5);
        f64 lry = baseY + (fullHeight * 0.5) + (D_802417D0_909200 * 0.5);
        gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
        draw_box(DRAW_FLAG_NO_CLIP, &D_802417D8_909208, ulx, uly, 0, D_802417CC_9091FC, D_802417D0_909200, 180, 0, 1.0f, 1.0f,
                 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
    }
}