.include "macros.inc" .section .data .balign 8 .global lbl_803E1418 lbl_803E1418: # ROM: 0x3DE418 .4byte 0 .4byte 0 .4byte __dt__8CBSGetupFv .4byte IsInAir__10CBodyStateCFRC15CBodyController .4byte IsDead__10CBodyStateCFv .4byte IsDying__10CBodyStateCFv .4byte IsMoving__10CBodyStateCFv .4byte ApplyGravity__10CBodyStateCFv .4byte ApplyHeadTracking__10CBodyStateCFv .4byte ApplyAnimationDeltas__10CBodyStateCFv .4byte CanShoot__10CBodyStateCFv .4byte Start__8CBSGetupFR15CBodyControllerR13CStateManager .4byte UpdateBody__8CBSGetupFfR15CBodyControllerR13CStateManager .4byte Shutdown__8CBSGetupFR15CBodyController .section .text, "ax" .global __dt__8CBSGetupFv __dt__8CBSGetupFv: /* 80135E88 00132DE8 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80135E8C 00132DEC 7C 08 02 A6 */ mflr r0 /* 80135E90 00132DF0 90 01 00 14 */ stw r0, 0x14(r1) /* 80135E94 00132DF4 93 E1 00 0C */ stw r31, 0xc(r1) /* 80135E98 00132DF8 7C 7F 1B 79 */ or. r31, r3, r3 /* 80135E9C 00132DFC 41 82 00 30 */ beq lbl_80135ECC /* 80135EA0 00132E00 3C 60 80 3E */ lis r3, lbl_803E1418@ha /* 80135EA4 00132E04 38 03 14 18 */ addi r0, r3, lbl_803E1418@l /* 80135EA8 00132E08 90 1F 00 00 */ stw r0, 0(r31) /* 80135EAC 00132E0C 41 82 00 10 */ beq lbl_80135EBC /* 80135EB0 00132E10 3C 60 80 3E */ lis r3, lbl_803E1318@ha /* 80135EB4 00132E14 38 03 13 18 */ addi r0, r3, lbl_803E1318@l /* 80135EB8 00132E18 90 1F 00 00 */ stw r0, 0(r31) lbl_80135EBC: /* 80135EBC 00132E1C 7C 80 07 35 */ extsh. r0, r4 /* 80135EC0 00132E20 40 81 00 0C */ ble lbl_80135ECC /* 80135EC4 00132E24 7F E3 FB 78 */ mr r3, r31 /* 80135EC8 00132E28 48 1D FA 69 */ bl Free__7CMemoryFPCv lbl_80135ECC: /* 80135ECC 00132E2C 80 01 00 14 */ lwz r0, 0x14(r1) /* 80135ED0 00132E30 7F E3 FB 78 */ mr r3, r31 /* 80135ED4 00132E34 83 E1 00 0C */ lwz r31, 0xc(r1) /* 80135ED8 00132E38 7C 08 03 A6 */ mtlr r0 /* 80135EDC 00132E3C 38 21 00 10 */ addi r1, r1, 0x10 /* 80135EE0 00132E40 4E 80 00 20 */ blr .global GetBodyStateTransition__8CBSGetupFfR15CBodyController GetBodyStateTransition__8CBSGetupFfR15CBodyController: /* 80135EE4 00132E44 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80135EE8 00132E48 7C 08 02 A6 */ mflr r0 /* 80135EEC 00132E4C 90 01 00 24 */ stw r0, 0x24(r1) /* 80135EF0 00132E50 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80135EF4 00132E54 93 C1 00 18 */ stw r30, 0x18(r1) /* 80135EF8 00132E58 7C 9E 23 78 */ mr r30, r4 /* 80135EFC 00132E5C 3B FE 00 04 */ addi r31, r30, 4 /* 80135F00 00132E60 38 80 00 0F */ li r4, 0xf /* 80135F04 00132E64 93 A1 00 14 */ stw r29, 0x14(r1) /* 80135F08 00132E68 7C 7D 1B 78 */ mr r29, r3 /* 80135F0C 00132E6C 7F E3 FB 78 */ mr r3, r31 /* 80135F10 00132E70 4B FF B5 41 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd /* 80135F14 00132E74 28 03 00 00 */ cmplwi r3, 0 /* 80135F18 00132E78 41 82 00 0C */ beq lbl_80135F24 /* 80135F1C 00132E7C 38 60 00 0E */ li r3, 0xe /* 80135F20 00132E80 48 00 00 48 */ b lbl_80135F68 lbl_80135F24: /* 80135F24 00132E84 7F E3 FB 78 */ mr r3, r31 /* 80135F28 00132E88 38 80 00 03 */ li r4, 3 /* 80135F2C 00132E8C 4B FF B5 25 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd /* 80135F30 00132E90 28 03 00 00 */ cmplwi r3, 0 /* 80135F34 00132E94 41 82 00 0C */ beq lbl_80135F40 /* 80135F38 00132E98 38 60 00 00 */ li r3, 0 /* 80135F3C 00132E9C 48 00 00 2C */ b lbl_80135F68 lbl_80135F40: /* 80135F40 00132EA0 88 1E 03 00 */ lbz r0, 0x300(r30) /* 80135F44 00132EA4 54 00 CF FF */ rlwinm. r0, r0, 0x19, 0x1f, 0x1f /* 80135F48 00132EA8 41 82 00 1C */ beq lbl_80135F64 /* 80135F4C 00132EAC 80 1D 00 04 */ lwz r0, 4(r29) /* 80135F50 00132EB0 38 60 00 01 */ li r3, 1 /* 80135F54 00132EB4 2C 00 00 00 */ cmpwi r0, 0 /* 80135F58 00132EB8 40 82 00 10 */ bne lbl_80135F68 /* 80135F5C 00132EBC 38 60 00 05 */ li r3, 5 /* 80135F60 00132EC0 48 00 00 08 */ b lbl_80135F68 lbl_80135F64: /* 80135F64 00132EC4 38 60 FF FF */ li r3, -1 lbl_80135F68: /* 80135F68 00132EC8 80 01 00 24 */ lwz r0, 0x24(r1) /* 80135F6C 00132ECC 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80135F70 00132ED0 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80135F74 00132ED4 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80135F78 00132ED8 7C 08 03 A6 */ mtlr r0 /* 80135F7C 00132EDC 38 21 00 20 */ addi r1, r1, 0x20 /* 80135F80 00132EE0 4E 80 00 20 */ blr .global Shutdown__8CBSGetupFR15CBodyController Shutdown__8CBSGetupFR15CBodyController: /* 80135F84 00132EE4 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80135F88 00132EE8 7C 08 02 A6 */ mflr r0 /* 80135F8C 00132EEC 90 01 00 14 */ stw r0, 0x14(r1) /* 80135F90 00132EF0 7C 80 23 78 */ mr r0, r4 /* 80135F94 00132EF4 80 83 00 04 */ lwz r4, 4(r3) /* 80135F98 00132EF8 7C 03 03 78 */ mr r3, r0 /* 80135F9C 00132EFC 48 00 4C 09 */ bl SetFallState__15CBodyControllerFQ23pas10EFallState /* 80135FA0 00132F00 80 01 00 14 */ lwz r0, 0x14(r1) /* 80135FA4 00132F04 7C 08 03 A6 */ mtlr r0 /* 80135FA8 00132F08 38 21 00 10 */ addi r1, r1, 0x10 /* 80135FAC 00132F0C 4E 80 00 20 */ blr .global UpdateBody__8CBSGetupFfR15CBodyControllerR13CStateManager UpdateBody__8CBSGetupFfR15CBodyControllerR13CStateManager: /* 80135FB0 00132F10 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80135FB4 00132F14 7C 08 02 A6 */ mflr r0 /* 80135FB8 00132F18 90 01 00 14 */ stw r0, 0x14(r1) /* 80135FBC 00132F1C 4B FF FF 29 */ bl GetBodyStateTransition__8CBSGetupFfR15CBodyController /* 80135FC0 00132F20 80 01 00 14 */ lwz r0, 0x14(r1) /* 80135FC4 00132F24 7C 08 03 A6 */ mtlr r0 /* 80135FC8 00132F28 38 21 00 10 */ addi r1, r1, 0x10 /* 80135FCC 00132F2C 4E 80 00 20 */ blr .global Start__8CBSGetupFR15CBodyControllerR13CStateManager Start__8CBSGetupFR15CBodyControllerR13CStateManager: /* 80135FD0 00132F30 94 21 FF 10 */ stwu r1, -0xf0(r1) /* 80135FD4 00132F34 7C 08 02 A6 */ mflr r0 /* 80135FD8 00132F38 90 01 00 F4 */ stw r0, 0xf4(r1) /* 80135FDC 00132F3C BF 41 00 D8 */ stmw r26, 0xd8(r1) /* 80135FE0 00132F40 7C 9A 23 78 */ mr r26, r4 /* 80135FE4 00132F44 7C 7F 1B 78 */ mr r31, r3 /* 80135FE8 00132F48 7C BB 2B 78 */ mr r27, r5 /* 80135FEC 00132F4C 38 80 00 00 */ li r4, 0 /* 80135FF0 00132F50 38 7A 00 04 */ addi r3, r26, 4 /* 80135FF4 00132F54 4B FF B4 5D */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd /* 80135FF8 00132F58 7C 7E 1B 78 */ mr r30, r3 /* 80135FFC 00132F5C 7F 43 D3 78 */ mr r3, r26 /* 80136000 00132F60 48 00 4B AD */ bl GetFallState__15CBodyControllerCFv /* 80136004 00132F64 7C 60 1B 78 */ mr r0, r3 /* 80136008 00132F68 7F 43 D3 78 */ mr r3, r26 /* 8013600C 00132F6C 7C 1D 03 78 */ mr r29, r0 /* 80136010 00132F70 48 00 44 45 */ bl GetPASDatabase__15CBodyControllerCFv /* 80136014 00132F74 83 DE 00 08 */ lwz r30, 8(r30) /* 80136018 00132F78 7C 7C 1B 78 */ mr r28, r3 /* 8013601C 00132F7C 38 61 00 20 */ addi r3, r1, 0x20 /* 80136020 00132F80 48 1A D0 5D */ bl NoParameter__12CPASAnimParmFv /* 80136024 00132F84 38 61 00 28 */ addi r3, r1, 0x28 /* 80136028 00132F88 48 1A D0 55 */ bl NoParameter__12CPASAnimParmFv /* 8013602C 00132F8C 38 61 00 30 */ addi r3, r1, 0x30 /* 80136030 00132F90 48 1A D0 4D */ bl NoParameter__12CPASAnimParmFv /* 80136034 00132F94 38 61 00 38 */ addi r3, r1, 0x38 /* 80136038 00132F98 48 1A D0 45 */ bl NoParameter__12CPASAnimParmFv /* 8013603C 00132F9C 38 61 00 40 */ addi r3, r1, 0x40 /* 80136040 00132FA0 48 1A D0 3D */ bl NoParameter__12CPASAnimParmFv /* 80136044 00132FA4 38 61 00 48 */ addi r3, r1, 0x48 /* 80136048 00132FA8 48 1A D0 35 */ bl NoParameter__12CPASAnimParmFv /* 8013604C 00132FAC 7F C4 F3 78 */ mr r4, r30 /* 80136050 00132FB0 38 61 00 50 */ addi r3, r1, 0x50 /* 80136054 00132FB4 48 1A CF 31 */ bl FromEnum__12CPASAnimParmFi /* 80136058 00132FB8 7F A4 EB 78 */ mr r4, r29 /* 8013605C 00132FBC 38 61 00 58 */ addi r3, r1, 0x58 /* 80136060 00132FC0 48 1A CF 25 */ bl FromEnum__12CPASAnimParmFi /* 80136064 00132FC4 38 61 00 28 */ addi r3, r1, 0x28 /* 80136068 00132FC8 38 01 00 20 */ addi r0, r1, 0x20 /* 8013606C 00132FCC 90 61 00 08 */ stw r3, 8(r1) /* 80136070 00132FD0 38 61 00 90 */ addi r3, r1, 0x90 /* 80136074 00132FD4 38 A1 00 58 */ addi r5, r1, 0x58 /* 80136078 00132FD8 38 C1 00 50 */ addi r6, r1, 0x50 /* 8013607C 00132FDC 90 01 00 0C */ stw r0, 0xc(r1) /* 80136080 00132FE0 38 E1 00 48 */ addi r7, r1, 0x48 /* 80136084 00132FE4 39 01 00 40 */ addi r8, r1, 0x40 /* 80136088 00132FE8 39 21 00 38 */ addi r9, r1, 0x38 /* 8013608C 00132FEC 39 41 00 30 */ addi r10, r1, 0x30 /* 80136090 00132FF0 38 80 00 01 */ li r4, 1 /* 80136094 00132FF4 4B F4 72 31 */ bl __ct__16CPASAnimParmDataFiRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParm /* 80136098 00132FF8 80 DB 09 00 */ lwz r6, 0x900(r27) /* 8013609C 00132FFC 7F 84 E3 78 */ mr r4, r28 /* 801360A0 00133000 38 61 00 18 */ addi r3, r1, 0x18 /* 801360A4 00133004 38 A1 00 90 */ addi r5, r1, 0x90 /* 801360A8 00133008 38 E0 FF FF */ li r7, -1 /* 801360AC 0013300C 48 1A EF B5 */ bl FindBestAnimation__12CPASDatabaseCFRC16CPASAnimParmDataR9CRandom16i /* 801360B0 00133010 C0 21 00 18 */ lfs f1, 0x18(r1) /* 801360B4 00133014 C0 02 99 F0 */ lfs f0, lbl_805AB710@sda21(r2) /* 801360B8 00133018 80 61 00 1C */ lwz r3, 0x1c(r1) /* 801360BC 0013301C FC 01 00 40 */ fcmpo cr0, f1, f0 /* 801360C0 00133020 40 81 00 A0 */ ble lbl_80136160 /* 801360C4 00133024 80 1A 02 F8 */ lwz r0, 0x2f8(r26) /* 801360C8 00133028 7C 7D 1B 78 */ mr r29, r3 /* 801360CC 0013302C 7C 03 00 00 */ cmpw r3, r0 /* 801360D0 00133030 41 82 00 50 */ beq lbl_80136120 /* 801360D4 00133034 C0 02 99 F4 */ lfs f0, lbl_805AB714@sda21(r2) /* 801360D8 00133038 38 00 00 00 */ li r0, 0 /* 801360DC 0013303C 38 C0 FF FF */ li r6, -1 /* 801360E0 00133040 38 E0 00 01 */ li r7, 1 /* 801360E4 00133044 90 61 00 68 */ stw r3, 0x68(r1) /* 801360E8 00133048 7F 43 D3 78 */ mr r3, r26 /* 801360EC 0013304C 38 81 00 68 */ addi r4, r1, 0x68 /* 801360F0 00133050 38 A0 00 00 */ li r5, 0 /* 801360F4 00133054 90 C1 00 6C */ stw r6, 0x6c(r1) /* 801360F8 00133058 38 C0 00 00 */ li r6, 0 /* 801360FC 0013305C D0 01 00 70 */ stfs f0, 0x70(r1) /* 80136100 00133060 98 E1 00 74 */ stb r7, 0x74(r1) /* 80136104 00133064 90 01 00 78 */ stw r0, 0x78(r1) /* 80136108 00133068 90 01 00 7C */ stw r0, 0x7c(r1) /* 8013610C 0013306C 98 01 00 80 */ stb r0, 0x80(r1) /* 80136110 00133070 90 01 00 84 */ stw r0, 0x84(r1) /* 80136114 00133074 90 01 00 88 */ stw r0, 0x88(r1) /* 80136118 00133078 90 01 00 8C */ stw r0, 0x8c(r1) /* 8013611C 0013307C 48 00 48 01 */ bl SetCurrentAnimation__15CBodyControllerFRC18CAnimPlaybackParmsbb lbl_80136120: /* 80136120 00133080 7F 83 E3 78 */ mr r3, r28 /* 80136124 00133084 38 80 00 01 */ li r4, 1 /* 80136128 00133088 48 1A ED 9D */ bl GetAnimState__12CPASDatabaseCFi /* 8013612C 0013308C 7C 64 1B 78 */ mr r4, r3 /* 80136130 00133090 7F A5 EB 78 */ mr r5, r29 /* 80136134 00133094 38 61 00 10 */ addi r3, r1, 0x10 /* 80136138 00133098 38 C0 00 02 */ li r6, 2 /* 8013613C 0013309C 48 1A DE B9 */ bl GetAnimParmData__13CPASAnimStateCFiUi /* 80136140 001330A0 80 81 00 10 */ lwz r4, 0x10(r1) /* 80136144 001330A4 38 61 00 60 */ addi r3, r1, 0x60 /* 80136148 001330A8 80 01 00 14 */ lwz r0, 0x14(r1) /* 8013614C 001330AC 90 81 00 60 */ stw r4, 0x60(r1) /* 80136150 001330B0 90 01 00 64 */ stw r0, 0x64(r1) /* 80136154 001330B4 48 1A CE 09 */ bl GetEnumValue__12CPASAnimParmCFv /* 80136158 001330B8 90 7F 00 04 */ stw r3, 4(r31) /* 8013615C 001330BC 48 00 00 0C */ b lbl_80136168 lbl_80136160: /* 80136160 001330C0 38 00 00 00 */ li r0, 0 /* 80136164 001330C4 90 1F 00 04 */ stw r0, 4(r31) lbl_80136168: /* 80136168 001330C8 34 A1 00 94 */ addic. r5, r1, 0x94 /* 8013616C 001330CC 41 82 00 58 */ beq lbl_801361C4 /* 80136170 001330D0 80 C5 00 00 */ lwz r6, 0(r5) /* 80136174 001330D4 38 60 00 00 */ li r3, 0 /* 80136178 001330D8 2C 06 00 00 */ cmpwi r6, 0 /* 8013617C 001330DC 40 81 00 40 */ ble lbl_801361BC /* 80136180 001330E0 2C 06 00 08 */ cmpwi r6, 8 /* 80136184 001330E4 38 86 FF F8 */ addi r4, r6, -8 /* 80136188 001330E8 40 81 00 20 */ ble lbl_801361A8 /* 8013618C 001330EC 38 04 00 07 */ addi r0, r4, 7 /* 80136190 001330F0 54 00 E8 FE */ srwi r0, r0, 3 /* 80136194 001330F4 7C 09 03 A6 */ mtctr r0 /* 80136198 001330F8 2C 04 00 00 */ cmpwi r4, 0 /* 8013619C 001330FC 40 81 00 0C */ ble lbl_801361A8 lbl_801361A0: /* 801361A0 00133100 38 63 00 08 */ addi r3, r3, 8 /* 801361A4 00133104 42 00 FF FC */ bdnz lbl_801361A0 lbl_801361A8: /* 801361A8 00133108 7C 03 30 50 */ subf r0, r3, r6 /* 801361AC 0013310C 7C 09 03 A6 */ mtctr r0 /* 801361B0 00133110 7C 03 30 00 */ cmpw r3, r6 /* 801361B4 00133114 40 80 00 08 */ bge lbl_801361BC lbl_801361B8: /* 801361B8 00133118 42 00 00 00 */ bdnz lbl_801361B8 lbl_801361BC: /* 801361BC 0013311C 38 00 00 00 */ li r0, 0 /* 801361C0 00133120 90 05 00 00 */ stw r0, 0(r5) lbl_801361C4: /* 801361C4 00133124 BB 41 00 D8 */ lmw r26, 0xd8(r1) /* 801361C8 00133128 80 01 00 F4 */ lwz r0, 0xf4(r1) /* 801361CC 0013312C 7C 08 03 A6 */ mtlr r0 /* 801361D0 00133130 38 21 00 F0 */ addi r1, r1, 0xf0 /* 801361D4 00133134 4E 80 00 20 */ blr .global __ct__8CBSGetupFv __ct__8CBSGetupFv: /* 801361D8 00133138 3C A0 80 3E */ lis r5, lbl_803E1318@ha /* 801361DC 0013313C 3C 80 80 3E */ lis r4, lbl_803E1418@ha /* 801361E0 00133140 38 A5 13 18 */ addi r5, r5, lbl_803E1318@l /* 801361E4 00133144 38 00 FF FF */ li r0, -1 /* 801361E8 00133148 90 A3 00 00 */ stw r5, 0(r3) /* 801361EC 0013314C 38 84 14 18 */ addi r4, r4, lbl_803E1418@l /* 801361F0 00133150 90 83 00 00 */ stw r4, 0(r3) /* 801361F4 00133154 90 03 00 04 */ stw r0, 4(r3) /* 801361F8 00133158 4E 80 00 20 */ blr .section .sdata2, "a" .balign 8 .global lbl_805AB710 lbl_805AB710: # ROM: 0x3F7FB0 .float 1.1920929E-7 .global lbl_805AB714 lbl_805AB714: # ROM: 0x3F7FB4 .float 1.0