prime/asm/MetroidPrime/BodyState/CBSTurn.s

890 lines
43 KiB
ArmAsm
Raw Normal View History

.include "macros.inc"
.section .data
.global lbl_803E1750
lbl_803E1750:
# ROM: 0x3DE750
.4byte 0
.4byte 0
.4byte __dt__12CBSFlyerTurnFv
.4byte IsInAir__10CBodyStateCFRC15CBodyController
.4byte IsDead__10CBodyStateCFv
.4byte IsDying__10CBodyStateCFv
.4byte IsMoving__10CBodyStateCFv
.4byte ApplyGravity__10CBodyStateCFv
.4byte ApplyHeadTracking__10CBodyStateCFv
.4byte ApplyAnimationDeltas__10CBodyStateCFv
.4byte CanShoot__7CBSTurnCFv
.4byte Start__12CBSFlyerTurnFR15CBodyControllerR13CStateManager
.4byte UpdateBody__12CBSFlyerTurnFfR15CBodyControllerR13CStateManager
.4byte Shutdown__7CBSTurnFR15CBodyController
.4byte GetBodyStateTransition__7CBSTurnFfR15CBodyController
.global lbl_803E178C
lbl_803E178C:
# ROM: 0x3DE78C
.4byte 0
.4byte 0
.4byte __dt__7CBSTurnFv
.4byte IsInAir__10CBodyStateCFRC15CBodyController
.4byte IsDead__10CBodyStateCFv
.4byte IsDying__10CBodyStateCFv
.4byte IsMoving__10CBodyStateCFv
.4byte ApplyGravity__10CBodyStateCFv
.4byte ApplyHeadTracking__10CBodyStateCFv
.4byte ApplyAnimationDeltas__10CBodyStateCFv
.4byte CanShoot__7CBSTurnCFv
.4byte Start__7CBSTurnFR15CBodyControllerR13CStateManager
.4byte UpdateBody__7CBSTurnFfR15CBodyControllerR13CStateManager
.4byte Shutdown__7CBSTurnFR15CBodyController
.4byte GetBodyStateTransition__7CBSTurnFfR15CBodyController
.section .text, "ax"
.global __dt__12CBSFlyerTurnFv
__dt__12CBSFlyerTurnFv:
/* 801391C4 00136124 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 801391C8 00136128 7C 08 02 A6 */ mflr r0
/* 801391CC 0013612C 90 01 00 14 */ stw r0, 0x14(r1)
/* 801391D0 00136130 93 E1 00 0C */ stw r31, 0xc(r1)
/* 801391D4 00136134 7C 7F 1B 79 */ or. r31, r3, r3
/* 801391D8 00136138 41 82 00 40 */ beq lbl_80139218
/* 801391DC 0013613C 3C 60 80 3E */ lis r3, lbl_803E1750@ha
/* 801391E0 00136140 38 03 17 50 */ addi r0, r3, lbl_803E1750@l
/* 801391E4 00136144 90 1F 00 00 */ stw r0, 0(r31)
/* 801391E8 00136148 41 82 00 20 */ beq lbl_80139208
/* 801391EC 0013614C 3C 60 80 3E */ lis r3, lbl_803E178C@ha
/* 801391F0 00136150 38 03 17 8C */ addi r0, r3, lbl_803E178C@l
/* 801391F4 00136154 90 1F 00 00 */ stw r0, 0(r31)
/* 801391F8 00136158 41 82 00 10 */ beq lbl_80139208
/* 801391FC 0013615C 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 80139200 00136160 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80139204 00136164 90 1F 00 00 */ stw r0, 0(r31)
lbl_80139208:
/* 80139208 00136168 7C 80 07 35 */ extsh. r0, r4
/* 8013920C 0013616C 40 81 00 0C */ ble lbl_80139218
/* 80139210 00136170 7F E3 FB 78 */ mr r3, r31
/* 80139214 00136174 48 1D C7 1D */ bl Free__7CMemoryFPCv
lbl_80139218:
/* 80139218 00136178 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8013921C 0013617C 7F E3 FB 78 */ mr r3, r31
/* 80139220 00136180 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80139224 00136184 7C 08 03 A6 */ mtlr r0
/* 80139228 00136188 38 21 00 10 */ addi r1, r1, 0x10
/* 8013922C 0013618C 4E 80 00 20 */ blr
.global CanShoot__7CBSTurnCFv
CanShoot__7CBSTurnCFv:
/* 80139230 00136190 38 60 00 01 */ li r3, 1
/* 80139234 00136194 4E 80 00 20 */ blr
.global UpdateBody__12CBSFlyerTurnFfR15CBodyControllerR13CStateManager
UpdateBody__12CBSFlyerTurnFfR15CBodyControllerR13CStateManager:
/* 80139238 00136198 94 21 FF A0 */ stwu r1, -0x60(r1)
/* 8013923C 0013619C 7C 08 02 A6 */ mflr r0
/* 80139240 001361A0 90 01 00 64 */ stw r0, 0x64(r1)
/* 80139244 001361A4 DB E1 00 50 */ stfd f31, 0x50(r1)
/* 80139248 001361A8 F3 E1 00 58 */ psq_st f31, 88(r1), 0, qr0
/* 8013924C 001361AC 93 E1 00 4C */ stw r31, 0x4c(r1)
/* 80139250 001361B0 93 C1 00 48 */ stw r30, 0x48(r1)
/* 80139254 001361B4 93 A1 00 44 */ stw r29, 0x44(r1)
/* 80139258 001361B8 FF E0 08 90 */ fmr f31, f1
/* 8013925C 001361BC 7C 9E 23 78 */ mr r30, r4
/* 80139260 001361C0 7C 7D 1B 78 */ mr r29, r3
/* 80139264 001361C4 7C BF 2B 78 */ mr r31, r5
/* 80139268 001361C8 7F C3 F3 78 */ mr r3, r30
/* 8013926C 001361CC 48 00 11 E9 */ bl GetPASDatabase__15CBodyControllerCFv
/* 80139270 001361D0 38 80 00 08 */ li r4, 8
/* 80139274 001361D4 48 1A BC 51 */ bl GetAnimState__12CPASDatabaseCFi
/* 80139278 001361D8 80 03 00 18 */ lwz r0, 0x18(r3)
/* 8013927C 001361DC 28 00 00 00 */ cmplwi r0, 0
/* 80139280 001361E0 41 82 00 20 */ beq lbl_801392A0
/* 80139284 001361E4 FC 20 F8 90 */ fmr f1, f31
/* 80139288 001361E8 7F A3 EB 78 */ mr r3, r29
/* 8013928C 001361EC 7F C4 F3 78 */ mr r4, r30
/* 80139290 001361F0 7F E5 FB 78 */ mr r5, r31
/* 80139294 001361F4 48 00 06 F5 */ bl UpdateBody__7CBSTurnFfR15CBodyControllerR13CStateManager
/* 80139298 001361F8 7C 7F 1B 78 */ mr r31, r3
/* 8013929C 001361FC 48 00 01 0C */ b lbl_801393A8
lbl_801392A0:
/* 801392A0 00136200 7F A3 EB 78 */ mr r3, r29
/* 801392A4 00136204 FC 20 F8 90 */ fmr f1, f31
/* 801392A8 00136208 81 9D 00 00 */ lwz r12, 0(r29)
/* 801392AC 0013620C 7F C4 F3 78 */ mr r4, r30
/* 801392B0 00136210 81 8C 00 38 */ lwz r12, 0x38(r12)
/* 801392B4 00136214 7D 89 03 A6 */ mtctr r12
/* 801392B8 00136218 4E 80 04 21 */ bctrl
/* 801392BC 0013621C 7C 7F 1B 78 */ mr r31, r3
/* 801392C0 00136220 2C 1F FF FF */ cmpwi r31, -1
/* 801392C4 00136224 40 82 00 E4 */ bne lbl_801393A8
/* 801392C8 00136228 C0 3E 00 10 */ lfs f1, 0x10(r30)
/* 801392CC 0013622C 38 00 00 00 */ li r0, 0
/* 801392D0 00136230 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 801392D4 00136234 C0 5E 00 14 */ lfs f2, 0x14(r30)
/* 801392D8 00136238 FC 00 08 00 */ fcmpu cr0, f0, f1
/* 801392DC 0013623C C0 7E 00 18 */ lfs f3, 0x18(r30)
/* 801392E0 00136240 40 82 00 14 */ bne lbl_801392F4
/* 801392E4 00136244 FC 00 10 00 */ fcmpu cr0, f0, f2
/* 801392E8 00136248 40 82 00 0C */ bne lbl_801392F4
/* 801392EC 0013624C FC 00 18 00 */ fcmpu cr0, f0, f3
/* 801392F0 00136250 41 82 00 08 */ beq lbl_801392F8
lbl_801392F4:
/* 801392F4 00136254 38 00 00 01 */ li r0, 1
lbl_801392F8:
/* 801392F8 00136258 54 00 06 3F */ clrlwi. r0, r0, 0x18
/* 801392FC 0013625C 41 82 00 84 */ beq lbl_80139380
/* 80139300 00136260 38 61 00 18 */ addi r3, r1, 0x18
/* 80139304 00136264 48 1D AE FD */ bl __ct__9CVector2fFff
/* 80139308 00136268 C0 01 00 18 */ lfs f0, 0x18(r1)
/* 8013930C 0013626C 38 61 00 10 */ addi r3, r1, 0x10
/* 80139310 00136270 D0 1D 00 08 */ stfs f0, 8(r29)
/* 80139314 00136274 C0 01 00 1C */ lfs f0, 0x1c(r1)
/* 80139318 00136278 D0 1D 00 0C */ stfs f0, 0xc(r29)
/* 8013931C 0013627C 80 9E 00 00 */ lwz r4, 0(r30)
/* 80139320 00136280 C0 24 00 38 */ lfs f1, 0x38(r4)
/* 80139324 00136284 C0 44 00 48 */ lfs f2, 0x48(r4)
/* 80139328 00136288 48 1D AE D9 */ bl __ct__9CVector2fFff
/* 8013932C 0013628C C0 01 00 10 */ lfs f0, 0x10(r1)
/* 80139330 00136290 38 61 00 08 */ addi r3, r1, 8
/* 80139334 00136294 C0 21 00 14 */ lfs f1, 0x14(r1)
/* 80139338 00136298 FC 40 00 50 */ fneg f2, f0
/* 8013933C 0013629C D0 01 00 28 */ stfs f0, 0x28(r1)
/* 80139340 001362A0 D0 21 00 2C */ stfs f1, 0x2c(r1)
/* 80139344 001362A4 48 1D AE BD */ bl __ct__9CVector2fFff
/* 80139348 001362A8 C0 21 00 08 */ lfs f1, 8(r1)
/* 8013934C 001362AC 38 61 00 20 */ addi r3, r1, 0x20
/* 80139350 001362B0 C0 01 00 0C */ lfs f0, 0xc(r1)
/* 80139354 001362B4 38 9D 00 08 */ addi r4, r29, 8
/* 80139358 001362B8 D0 21 00 20 */ stfs f1, 0x20(r1)
/* 8013935C 001362BC D0 01 00 24 */ stfs f0, 0x24(r1)
/* 80139360 001362C0 48 1D AC 49 */ bl Dot__9CVector2fFRC9CVector2fRC9CVector2f
/* 80139364 001362C4 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 80139368 001362C8 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 8013936C 001362CC 40 81 00 0C */ ble lbl_80139378
/* 80139370 001362D0 38 00 00 01 */ li r0, 1
/* 80139374 001362D4 48 00 00 08 */ b lbl_8013937C
lbl_80139378:
/* 80139378 001362D8 38 00 00 00 */ li r0, 0
lbl_8013937C:
/* 8013937C 001362DC 90 1D 00 10 */ stw r0, 0x10(r29)
lbl_80139380:
/* 80139380 001362E0 C0 5D 00 08 */ lfs f2, 8(r29)
/* 80139384 001362E4 FC 20 F8 90 */ fmr f1, f31
/* 80139388 001362E8 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 8013938C 001362EC 7F C3 F3 78 */ mr r3, r30
/* 80139390 001362F0 D0 41 00 30 */ stfs f2, 0x30(r1)
/* 80139394 001362F4 38 81 00 30 */ addi r4, r1, 0x30
/* 80139398 001362F8 C0 5D 00 0C */ lfs f2, 0xc(r29)
/* 8013939C 001362FC D0 41 00 34 */ stfs f2, 0x34(r1)
/* 801393A0 00136300 D0 01 00 38 */ stfs f0, 0x38(r1)
/* 801393A4 00136304 48 00 13 01 */ bl FaceDirection__15CBodyControllerFRC9CVector3ff
lbl_801393A8:
/* 801393A8 00136308 7F E3 FB 78 */ mr r3, r31
/* 801393AC 0013630C E3 E1 00 58 */ psq_l f31, 88(r1), 0, qr0
/* 801393B0 00136310 80 01 00 64 */ lwz r0, 0x64(r1)
/* 801393B4 00136314 CB E1 00 50 */ lfd f31, 0x50(r1)
/* 801393B8 00136318 83 E1 00 4C */ lwz r31, 0x4c(r1)
/* 801393BC 0013631C 83 C1 00 48 */ lwz r30, 0x48(r1)
/* 801393C0 00136320 83 A1 00 44 */ lwz r29, 0x44(r1)
/* 801393C4 00136324 7C 08 03 A6 */ mtlr r0
/* 801393C8 00136328 38 21 00 60 */ addi r1, r1, 0x60
/* 801393CC 0013632C 4E 80 00 20 */ blr
.global Start__12CBSFlyerTurnFR15CBodyControllerR13CStateManager
Start__12CBSFlyerTurnFR15CBodyControllerR13CStateManager:
/* 801393D0 00136330 94 21 FF 00 */ stwu r1, -0x100(r1)
/* 801393D4 00136334 7C 08 02 A6 */ mflr r0
/* 801393D8 00136338 90 01 01 04 */ stw r0, 0x104(r1)
/* 801393DC 0013633C 93 E1 00 FC */ stw r31, 0xfc(r1)
/* 801393E0 00136340 7C 7F 1B 78 */ mr r31, r3
/* 801393E4 00136344 93 C1 00 F8 */ stw r30, 0xf8(r1)
/* 801393E8 00136348 93 A1 00 F4 */ stw r29, 0xf4(r1)
/* 801393EC 0013634C 7C BD 2B 78 */ mr r29, r5
/* 801393F0 00136350 93 81 00 F0 */ stw r28, 0xf0(r1)
/* 801393F4 00136354 7C 9C 23 78 */ mr r28, r4
/* 801393F8 00136358 7F 83 E3 78 */ mr r3, r28
/* 801393FC 0013635C 48 00 10 59 */ bl GetPASDatabase__15CBodyControllerCFv
/* 80139400 00136360 38 80 00 08 */ li r4, 8
/* 80139404 00136364 7C 7E 1B 78 */ mr r30, r3
/* 80139408 00136368 48 1A BA BD */ bl GetAnimState__12CPASDatabaseCFi
/* 8013940C 0013636C 80 03 00 18 */ lwz r0, 0x18(r3)
/* 80139410 00136370 28 00 00 00 */ cmplwi r0, 0
/* 80139414 00136374 41 82 00 18 */ beq lbl_8013942C
/* 80139418 00136378 7F E3 FB 78 */ mr r3, r31
/* 8013941C 0013637C 7F 84 E3 78 */ mr r4, r28
/* 80139420 00136380 7F A5 EB 78 */ mr r5, r29
/* 80139424 00136384 48 00 05 F9 */ bl Start__7CBSTurnFR15CBodyControllerR13CStateManager
/* 80139428 00136388 48 00 01 DC */ b lbl_80139604
lbl_8013942C:
/* 8013942C 0013638C C0 3C 00 10 */ lfs f1, 0x10(r28)
/* 80139430 00136390 38 61 00 68 */ addi r3, r1, 0x68
/* 80139434 00136394 C0 5C 00 14 */ lfs f2, 0x14(r28)
/* 80139438 00136398 48 1D AD C9 */ bl __ct__9CVector2fFff
/* 8013943C 0013639C C0 01 00 68 */ lfs f0, 0x68(r1)
/* 80139440 001363A0 38 61 00 60 */ addi r3, r1, 0x60
/* 80139444 001363A4 D0 1F 00 08 */ stfs f0, 8(r31)
/* 80139448 001363A8 C0 01 00 6C */ lfs f0, 0x6c(r1)
/* 8013944C 001363AC D0 1F 00 0C */ stfs f0, 0xc(r31)
/* 80139450 001363B0 80 9C 00 00 */ lwz r4, 0(r28)
/* 80139454 001363B4 C0 24 00 38 */ lfs f1, 0x38(r4)
/* 80139458 001363B8 C0 44 00 48 */ lfs f2, 0x48(r4)
/* 8013945C 001363BC 48 1D AD A5 */ bl __ct__9CVector2fFff
/* 80139460 001363C0 C0 01 00 60 */ lfs f0, 0x60(r1)
/* 80139464 001363C4 38 61 00 58 */ addi r3, r1, 0x58
/* 80139468 001363C8 C0 21 00 64 */ lfs f1, 0x64(r1)
/* 8013946C 001363CC FC 40 00 50 */ fneg f2, f0
/* 80139470 001363D0 D0 01 00 78 */ stfs f0, 0x78(r1)
/* 80139474 001363D4 D0 21 00 7C */ stfs f1, 0x7c(r1)
/* 80139478 001363D8 48 1D AD 89 */ bl __ct__9CVector2fFff
/* 8013947C 001363DC C0 21 00 58 */ lfs f1, 0x58(r1)
/* 80139480 001363E0 38 61 00 70 */ addi r3, r1, 0x70
/* 80139484 001363E4 C0 01 00 5C */ lfs f0, 0x5c(r1)
/* 80139488 001363E8 38 9F 00 08 */ addi r4, r31, 8
/* 8013948C 001363EC D0 21 00 70 */ stfs f1, 0x70(r1)
/* 80139490 001363F0 D0 01 00 74 */ stfs f0, 0x74(r1)
/* 80139494 001363F4 48 1D AB 15 */ bl Dot__9CVector2fFRC9CVector2fRC9CVector2f
/* 80139498 001363F8 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 8013949C 001363FC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 801394A0 00136400 40 81 00 0C */ ble lbl_801394AC
/* 801394A4 00136404 38 00 00 01 */ li r0, 1
/* 801394A8 00136408 48 00 00 08 */ b lbl_801394B0
lbl_801394AC:
/* 801394AC 0013640C 38 00 00 00 */ li r0, 0
lbl_801394B0:
/* 801394B0 00136410 90 1F 00 10 */ stw r0, 0x10(r31)
/* 801394B4 00136414 38 61 00 18 */ addi r3, r1, 0x18
/* 801394B8 00136418 83 FC 02 EC */ lwz r31, 0x2ec(r28)
/* 801394BC 0013641C 48 1A 9B C1 */ bl NoParameter__12CPASAnimParmFv
/* 801394C0 00136420 38 61 00 20 */ addi r3, r1, 0x20
/* 801394C4 00136424 48 1A 9B B9 */ bl NoParameter__12CPASAnimParmFv
/* 801394C8 00136428 38 61 00 28 */ addi r3, r1, 0x28
/* 801394CC 0013642C 48 1A 9B B1 */ bl NoParameter__12CPASAnimParmFv
/* 801394D0 00136430 38 61 00 30 */ addi r3, r1, 0x30
/* 801394D4 00136434 48 1A 9B A9 */ bl NoParameter__12CPASAnimParmFv
/* 801394D8 00136438 38 61 00 38 */ addi r3, r1, 0x38
/* 801394DC 0013643C 48 1A 9B A1 */ bl NoParameter__12CPASAnimParmFv
/* 801394E0 00136440 38 61 00 40 */ addi r3, r1, 0x40
/* 801394E4 00136444 48 1A 9B 99 */ bl NoParameter__12CPASAnimParmFv
/* 801394E8 00136448 7F E4 FB 78 */ mr r4, r31
/* 801394EC 0013644C 38 61 00 48 */ addi r3, r1, 0x48
/* 801394F0 00136450 48 1A 9A 95 */ bl FromEnum__12CPASAnimParmFi
/* 801394F4 00136454 38 61 00 50 */ addi r3, r1, 0x50
/* 801394F8 00136458 38 80 00 00 */ li r4, 0
/* 801394FC 0013645C 48 1A 9A 89 */ bl FromEnum__12CPASAnimParmFi
/* 80139500 00136460 38 61 00 20 */ addi r3, r1, 0x20
/* 80139504 00136464 38 01 00 18 */ addi r0, r1, 0x18
/* 80139508 00136468 90 61 00 08 */ stw r3, 8(r1)
/* 8013950C 0013646C 38 61 00 A8 */ addi r3, r1, 0xa8
/* 80139510 00136470 38 A1 00 50 */ addi r5, r1, 0x50
/* 80139514 00136474 38 C1 00 48 */ addi r6, r1, 0x48
/* 80139518 00136478 90 01 00 0C */ stw r0, 0xc(r1)
/* 8013951C 0013647C 38 E1 00 40 */ addi r7, r1, 0x40
/* 80139520 00136480 39 01 00 38 */ addi r8, r1, 0x38
/* 80139524 00136484 39 21 00 30 */ addi r9, r1, 0x30
/* 80139528 00136488 39 41 00 28 */ addi r10, r1, 0x28
/* 8013952C 0013648C 38 80 00 05 */ li r4, 5
/* 80139530 00136490 4B F4 3D 95 */ bl __ct__16CPASAnimParmDataFiRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParm
/* 80139534 00136494 80 DD 09 00 */ lwz r6, 0x900(r29)
/* 80139538 00136498 7F C4 F3 78 */ mr r4, r30
/* 8013953C 0013649C 38 61 00 10 */ addi r3, r1, 0x10
/* 80139540 001364A0 38 A1 00 A8 */ addi r5, r1, 0xa8
/* 80139544 001364A4 38 E0 FF FF */ li r7, -1
/* 80139548 001364A8 48 1A BB 19 */ bl FindBestAnimation__12CPASDatabaseCFRC16CPASAnimParmDataR9CRandom16i
/* 8013954C 001364AC 80 61 00 14 */ lwz r3, 0x14(r1)
/* 80139550 001364B0 80 1C 02 F8 */ lwz r0, 0x2f8(r28)
/* 80139554 001364B4 7C 03 00 00 */ cmpw r3, r0
/* 80139558 001364B8 41 82 00 50 */ beq lbl_801395A8
/* 8013955C 001364BC C0 02 9A 64 */ lfs f0, lbl_805AB784@sda21(r2)
/* 80139560 001364C0 38 00 00 00 */ li r0, 0
/* 80139564 001364C4 38 C0 FF FF */ li r6, -1
/* 80139568 001364C8 38 E0 00 01 */ li r7, 1
/* 8013956C 001364CC 90 61 00 80 */ stw r3, 0x80(r1)
/* 80139570 001364D0 7F 83 E3 78 */ mr r3, r28
/* 80139574 001364D4 38 81 00 80 */ addi r4, r1, 0x80
/* 80139578 001364D8 38 A0 00 01 */ li r5, 1
/* 8013957C 001364DC 90 C1 00 84 */ stw r6, 0x84(r1)
/* 80139580 001364E0 38 C0 00 00 */ li r6, 0
/* 80139584 001364E4 D0 01 00 88 */ stfs f0, 0x88(r1)
/* 80139588 001364E8 98 E1 00 8C */ stb r7, 0x8c(r1)
/* 8013958C 001364EC 90 01 00 90 */ stw r0, 0x90(r1)
/* 80139590 001364F0 90 01 00 94 */ stw r0, 0x94(r1)
/* 80139594 001364F4 98 01 00 98 */ stb r0, 0x98(r1)
/* 80139598 001364F8 90 01 00 9C */ stw r0, 0x9c(r1)
/* 8013959C 001364FC 90 01 00 A0 */ stw r0, 0xa0(r1)
/* 801395A0 00136500 90 01 00 A4 */ stw r0, 0xa4(r1)
/* 801395A4 00136504 48 00 13 79 */ bl SetCurrentAnimation__15CBodyControllerFRC18CAnimPlaybackParmsbb
lbl_801395A8:
/* 801395A8 00136508 34 A1 00 AC */ addic. r5, r1, 0xac
/* 801395AC 0013650C 41 82 00 58 */ beq lbl_80139604
/* 801395B0 00136510 80 C5 00 00 */ lwz r6, 0(r5)
/* 801395B4 00136514 38 60 00 00 */ li r3, 0
/* 801395B8 00136518 2C 06 00 00 */ cmpwi r6, 0
/* 801395BC 0013651C 40 81 00 40 */ ble lbl_801395FC
/* 801395C0 00136520 2C 06 00 08 */ cmpwi r6, 8
/* 801395C4 00136524 38 86 FF F8 */ addi r4, r6, -8
/* 801395C8 00136528 40 81 00 20 */ ble lbl_801395E8
/* 801395CC 0013652C 38 04 00 07 */ addi r0, r4, 7
/* 801395D0 00136530 54 00 E8 FE */ srwi r0, r0, 3
/* 801395D4 00136534 7C 09 03 A6 */ mtctr r0
/* 801395D8 00136538 2C 04 00 00 */ cmpwi r4, 0
/* 801395DC 0013653C 40 81 00 0C */ ble lbl_801395E8
lbl_801395E0:
/* 801395E0 00136540 38 63 00 08 */ addi r3, r3, 8
/* 801395E4 00136544 42 00 FF FC */ bdnz lbl_801395E0
lbl_801395E8:
/* 801395E8 00136548 7C 03 30 50 */ subf r0, r3, r6
/* 801395EC 0013654C 7C 09 03 A6 */ mtctr r0
/* 801395F0 00136550 7C 03 30 00 */ cmpw r3, r6
/* 801395F4 00136554 40 80 00 08 */ bge lbl_801395FC
lbl_801395F8:
/* 801395F8 00136558 42 00 00 00 */ bdnz lbl_801395F8
lbl_801395FC:
/* 801395FC 0013655C 38 00 00 00 */ li r0, 0
/* 80139600 00136560 90 05 00 00 */ stw r0, 0(r5)
lbl_80139604:
/* 80139604 00136564 80 01 01 04 */ lwz r0, 0x104(r1)
/* 80139608 00136568 83 E1 00 FC */ lwz r31, 0xfc(r1)
/* 8013960C 0013656C 83 C1 00 F8 */ lwz r30, 0xf8(r1)
/* 80139610 00136570 83 A1 00 F4 */ lwz r29, 0xf4(r1)
/* 80139614 00136574 83 81 00 F0 */ lwz r28, 0xf0(r1)
/* 80139618 00136578 7C 08 03 A6 */ mtlr r0
/* 8013961C 0013657C 38 21 01 00 */ addi r1, r1, 0x100
/* 80139620 00136580 4E 80 00 20 */ blr
.global __ct__12CBSFlyerTurnFv
__ct__12CBSFlyerTurnFv:
/* 80139624 00136584 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80139628 00136588 7C 08 02 A6 */ mflr r0
/* 8013962C 0013658C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80139630 00136590 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80139634 00136594 7C 7F 1B 78 */ mr r31, r3
/* 80139638 00136598 48 00 06 A9 */ bl __ct__7CBSTurnFv
/* 8013963C 0013659C 3C 80 80 3E */ lis r4, lbl_803E1750@ha
/* 80139640 001365A0 7F E3 FB 78 */ mr r3, r31
/* 80139644 001365A4 38 04 17 50 */ addi r0, r4, lbl_803E1750@l
/* 80139648 001365A8 90 1F 00 00 */ stw r0, 0(r31)
/* 8013964C 001365AC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80139650 001365B0 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80139654 001365B4 7C 08 03 A6 */ mtlr r0
/* 80139658 001365B8 38 21 00 10 */ addi r1, r1, 0x10
/* 8013965C 001365BC 4E 80 00 20 */ blr
.global __dt__7CBSTurnFv
__dt__7CBSTurnFv:
/* 80139660 001365C0 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80139664 001365C4 7C 08 02 A6 */ mflr r0
/* 80139668 001365C8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8013966C 001365CC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80139670 001365D0 7C 7F 1B 79 */ or. r31, r3, r3
/* 80139674 001365D4 41 82 00 30 */ beq lbl_801396A4
/* 80139678 001365D8 3C 60 80 3E */ lis r3, lbl_803E178C@ha
/* 8013967C 001365DC 38 03 17 8C */ addi r0, r3, lbl_803E178C@l
/* 80139680 001365E0 90 1F 00 00 */ stw r0, 0(r31)
/* 80139684 001365E4 41 82 00 10 */ beq lbl_80139694
/* 80139688 001365E8 3C 60 80 3E */ lis r3, lbl_803E1318@ha
/* 8013968C 001365EC 38 03 13 18 */ addi r0, r3, lbl_803E1318@l
/* 80139690 001365F0 90 1F 00 00 */ stw r0, 0(r31)
lbl_80139694:
/* 80139694 001365F4 7C 80 07 35 */ extsh. r0, r4
/* 80139698 001365F8 40 81 00 0C */ ble lbl_801396A4
/* 8013969C 001365FC 7F E3 FB 78 */ mr r3, r31
/* 801396A0 00136600 48 1D C2 91 */ bl Free__7CMemoryFPCv
lbl_801396A4:
/* 801396A4 00136604 80 01 00 14 */ lwz r0, 0x14(r1)
/* 801396A8 00136608 7F E3 FB 78 */ mr r3, r31
/* 801396AC 0013660C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 801396B0 00136610 7C 08 03 A6 */ mtlr r0
/* 801396B4 00136614 38 21 00 10 */ addi r1, r1, 0x10
/* 801396B8 00136618 4E 80 00 20 */ blr
.global GetBodyStateTransition__7CBSTurnFfR15CBodyController
GetBodyStateTransition__7CBSTurnFfR15CBodyController:
/* 801396BC 0013661C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 801396C0 00136620 7C 08 02 A6 */ mflr r0
/* 801396C4 00136624 90 01 00 24 */ stw r0, 0x24(r1)
/* 801396C8 00136628 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 801396CC 0013662C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 801396D0 00136630 7C 9E 23 78 */ mr r30, r4
/* 801396D4 00136634 3B FE 00 04 */ addi r31, r30, 4
/* 801396D8 00136638 38 80 00 0F */ li r4, 0xf
/* 801396DC 0013663C 93 A1 00 14 */ stw r29, 0x14(r1)
/* 801396E0 00136640 7C 7D 1B 78 */ mr r29, r3
/* 801396E4 00136644 7F E3 FB 78 */ mr r3, r31
/* 801396E8 00136648 4B FF 7D 69 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 801396EC 0013664C 28 03 00 00 */ cmplwi r3, 0
/* 801396F0 00136650 41 82 00 0C */ beq lbl_801396FC
/* 801396F4 00136654 38 60 00 0E */ li r3, 0xe
/* 801396F8 00136658 48 00 01 B8 */ b lbl_801398B0
lbl_801396FC:
/* 801396FC 0013665C 7F E3 FB 78 */ mr r3, r31
/* 80139700 00136660 38 80 00 03 */ li r4, 3
/* 80139704 00136664 4B FF 7D 4D */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139708 00136668 28 03 00 00 */ cmplwi r3, 0
/* 8013970C 0013666C 41 82 00 0C */ beq lbl_80139718
/* 80139710 00136670 38 60 00 00 */ li r3, 0
/* 80139714 00136674 48 00 01 9C */ b lbl_801398B0
lbl_80139718:
/* 80139718 00136678 7F E3 FB 78 */ mr r3, r31
/* 8013971C 0013667C 38 80 00 09 */ li r4, 9
/* 80139720 00136680 4B FF 7D 31 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139724 00136684 28 03 00 00 */ cmplwi r3, 0
/* 80139728 00136688 41 82 00 0C */ beq lbl_80139734
/* 8013972C 0013668C 38 60 00 0A */ li r3, 0xa
/* 80139730 00136690 48 00 01 80 */ b lbl_801398B0
lbl_80139734:
/* 80139734 00136694 7F E3 FB 78 */ mr r3, r31
/* 80139738 00136698 38 80 00 04 */ li r4, 4
/* 8013973C 0013669C 4B FF 7D 15 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139740 001366A0 28 03 00 00 */ cmplwi r3, 0
/* 80139744 001366A4 41 82 00 0C */ beq lbl_80139750
/* 80139748 001366A8 38 60 00 06 */ li r3, 6
/* 8013974C 001366AC 48 00 01 64 */ b lbl_801398B0
lbl_80139750:
/* 80139750 001366B0 7F E3 FB 78 */ mr r3, r31
/* 80139754 001366B4 38 80 00 16 */ li r4, 0x16
/* 80139758 001366B8 4B FF 7C F9 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 8013975C 001366BC 28 03 00 00 */ cmplwi r3, 0
/* 80139760 001366C0 41 82 00 0C */ beq lbl_8013976C
/* 80139764 001366C4 38 60 00 05 */ li r3, 5
/* 80139768 001366C8 48 00 01 48 */ b lbl_801398B0
lbl_8013976C:
/* 8013976C 001366CC 7F E3 FB 78 */ mr r3, r31
/* 80139770 001366D0 38 80 00 0E */ li r4, 0xe
/* 80139774 001366D4 4B FF 7C DD */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139778 001366D8 28 03 00 00 */ cmplwi r3, 0
/* 8013977C 001366DC 41 82 00 0C */ beq lbl_80139788
/* 80139780 001366E0 38 60 00 0C */ li r3, 0xc
/* 80139784 001366E4 48 00 01 2C */ b lbl_801398B0
lbl_80139788:
/* 80139788 001366E8 7F E3 FB 78 */ mr r3, r31
/* 8013978C 001366EC 38 80 00 05 */ li r4, 5
/* 80139790 001366F0 4B FF 7C C1 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139794 001366F4 28 03 00 00 */ cmplwi r3, 0
/* 80139798 001366F8 41 82 00 0C */ beq lbl_801397A4
/* 8013979C 001366FC 38 60 00 07 */ li r3, 7
/* 801397A0 00136700 48 00 01 10 */ b lbl_801398B0
lbl_801397A4:
/* 801397A4 00136704 7F E3 FB 78 */ mr r3, r31
/* 801397A8 00136708 38 80 00 06 */ li r4, 6
/* 801397AC 0013670C 4B FF 7C A5 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 801397B0 00136710 28 03 00 00 */ cmplwi r3, 0
/* 801397B4 00136714 41 82 00 0C */ beq lbl_801397C0
/* 801397B8 00136718 38 60 00 12 */ li r3, 0x12
/* 801397BC 0013671C 48 00 00 F4 */ b lbl_801398B0
lbl_801397C0:
/* 801397C0 00136720 7F E3 FB 78 */ mr r3, r31
/* 801397C4 00136724 38 80 00 07 */ li r4, 7
/* 801397C8 00136728 4B FF 7C 89 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 801397CC 0013672C 28 03 00 00 */ cmplwi r3, 0
/* 801397D0 00136730 41 82 00 0C */ beq lbl_801397DC
/* 801397D4 00136734 38 60 00 09 */ li r3, 9
/* 801397D8 00136738 48 00 00 D8 */ b lbl_801398B0
lbl_801397DC:
/* 801397DC 0013673C 7F E3 FB 78 */ mr r3, r31
/* 801397E0 00136740 38 80 00 08 */ li r4, 8
/* 801397E4 00136744 4B FF 7C 6D */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 801397E8 00136748 28 03 00 00 */ cmplwi r3, 0
/* 801397EC 0013674C 41 82 00 0C */ beq lbl_801397F8
/* 801397F0 00136750 38 60 00 0A */ li r3, 0xa
/* 801397F4 00136754 48 00 00 BC */ b lbl_801398B0
lbl_801397F8:
/* 801397F8 00136758 7F E3 FB 78 */ mr r3, r31
/* 801397FC 0013675C 38 80 00 10 */ li r4, 0x10
/* 80139800 00136760 4B FF 7C 51 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139804 00136764 28 03 00 00 */ cmplwi r3, 0
/* 80139808 00136768 41 82 00 0C */ beq lbl_80139814
/* 8013980C 0013676C 38 60 00 0D */ li r3, 0xd
/* 80139810 00136770 48 00 00 A0 */ b lbl_801398B0
lbl_80139814:
/* 80139814 00136774 7F E3 FB 78 */ mr r3, r31
/* 80139818 00136778 38 80 00 01 */ li r4, 1
/* 8013981C 0013677C 4B FF 7C 35 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 80139820 00136780 28 03 00 00 */ cmplwi r3, 0
/* 80139824 00136784 41 82 00 0C */ beq lbl_80139830
/* 80139828 00136788 38 60 00 03 */ li r3, 3
/* 8013982C 0013678C 48 00 00 84 */ b lbl_801398B0
lbl_80139830:
/* 80139830 00136790 7F E3 FB 78 */ mr r3, r31
/* 80139834 00136794 38 80 00 13 */ li r4, 0x13
/* 80139838 00136798 4B FF 7C 19 */ bl GetCmd__16CBodyStateCmdMgrF13EBodyStateCmd
/* 8013983C 0013679C 28 03 00 00 */ cmplwi r3, 0
/* 80139840 001367A0 41 82 00 0C */ beq lbl_8013984C
/* 80139844 001367A4 38 60 00 11 */ li r3, 0x11
/* 80139848 001367A8 48 00 00 68 */ b lbl_801398B0
lbl_8013984C:
/* 8013984C 001367AC 88 1E 03 00 */ lbz r0, 0x300(r30)
/* 80139850 001367B0 54 00 CF FF */ rlwinm. r0, r0, 0x19, 0x1f, 0x1f
/* 80139854 001367B4 40 82 00 50 */ bne lbl_801398A4
/* 80139858 001367B8 7F A3 EB 78 */ mr r3, r29
/* 8013985C 001367BC 7F C4 F3 78 */ mr r4, r30
/* 80139860 001367C0 48 00 00 6D */ bl FacingDest__7CBSTurnCFR15CBodyController
/* 80139864 001367C4 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80139868 001367C8 40 82 00 3C */ bne lbl_801398A4
/* 8013986C 001367CC C0 22 9A 60 */ lfs f1, lbl_805AB780@sda21(r2)
/* 80139870 001367D0 38 00 00 00 */ li r0, 0
/* 80139874 001367D4 C0 1F 00 00 */ lfs f0, 0(r31)
/* 80139878 001367D8 FC 01 00 00 */ fcmpu cr0, f1, f0
/* 8013987C 001367DC 40 82 00 1C */ bne lbl_80139898
/* 80139880 001367E0 C0 1F 00 04 */ lfs f0, 4(r31)
/* 80139884 001367E4 FC 01 00 00 */ fcmpu cr0, f1, f0
/* 80139888 001367E8 40 82 00 10 */ bne lbl_80139898
/* 8013988C 001367EC C0 1F 00 08 */ lfs f0, 8(r31)
/* 80139890 001367F0 FC 01 00 00 */ fcmpu cr0, f1, f0
/* 80139894 001367F4 41 82 00 08 */ beq lbl_8013989C
lbl_80139898:
/* 80139898 001367F8 38 00 00 01 */ li r0, 1
lbl_8013989C:
/* 8013989C 001367FC 54 00 06 3F */ clrlwi. r0, r0, 0x18
/* 801398A0 00136800 41 82 00 0C */ beq lbl_801398AC
lbl_801398A4:
/* 801398A4 00136804 38 60 00 05 */ li r3, 5
/* 801398A8 00136808 48 00 00 08 */ b lbl_801398B0
lbl_801398AC:
/* 801398AC 0013680C 38 60 FF FF */ li r3, -1
lbl_801398B0:
/* 801398B0 00136810 80 01 00 24 */ lwz r0, 0x24(r1)
/* 801398B4 00136814 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 801398B8 00136818 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 801398BC 0013681C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 801398C0 00136820 7C 08 03 A6 */ mtlr r0
/* 801398C4 00136824 38 21 00 20 */ addi r1, r1, 0x20
/* 801398C8 00136828 4E 80 00 20 */ blr
.global FacingDest__7CBSTurnCFR15CBodyController
FacingDest__7CBSTurnCFR15CBodyController:
/* 801398CC 0013682C 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 801398D0 00136830 7C 08 02 A6 */ mflr r0
/* 801398D4 00136834 90 01 00 34 */ stw r0, 0x34(r1)
/* 801398D8 00136838 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 801398DC 0013683C 7C 7F 1B 78 */ mr r31, r3
/* 801398E0 00136840 38 61 00 10 */ addi r3, r1, 0x10
/* 801398E4 00136844 80 84 00 00 */ lwz r4, 0(r4)
/* 801398E8 00136848 C0 24 00 38 */ lfs f1, 0x38(r4)
/* 801398EC 0013684C C0 44 00 48 */ lfs f2, 0x48(r4)
/* 801398F0 00136850 48 1D A9 11 */ bl __ct__9CVector2fFff
/* 801398F4 00136854 C0 01 00 10 */ lfs f0, 0x10(r1)
/* 801398F8 00136858 38 61 00 08 */ addi r3, r1, 8
/* 801398FC 0013685C C0 21 00 14 */ lfs f1, 0x14(r1)
/* 80139900 00136860 FC 40 00 50 */ fneg f2, f0
/* 80139904 00136864 D0 01 00 20 */ stfs f0, 0x20(r1)
/* 80139908 00136868 D0 21 00 24 */ stfs f1, 0x24(r1)
/* 8013990C 0013686C 48 1D A8 F5 */ bl __ct__9CVector2fFff
/* 80139910 00136870 80 1F 00 10 */ lwz r0, 0x10(r31)
/* 80139914 00136874 C0 21 00 08 */ lfs f1, 8(r1)
/* 80139918 00136878 C0 01 00 0C */ lfs f0, 0xc(r1)
/* 8013991C 0013687C 2C 00 00 01 */ cmpwi r0, 1
/* 80139920 00136880 D0 21 00 18 */ stfs f1, 0x18(r1)
/* 80139924 00136884 D0 01 00 1C */ stfs f0, 0x1c(r1)
/* 80139928 00136888 40 82 00 24 */ bne lbl_8013994C
/* 8013992C 0013688C 38 61 00 18 */ addi r3, r1, 0x18
/* 80139930 00136890 38 9F 00 08 */ addi r4, r31, 8
/* 80139934 00136894 48 1D A6 75 */ bl Dot__9CVector2fFRC9CVector2fRC9CVector2f
/* 80139938 00136898 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 8013993C 0013689C FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80139940 001368A0 40 80 00 2C */ bge lbl_8013996C
/* 80139944 001368A4 38 60 00 01 */ li r3, 1
/* 80139948 001368A8 48 00 00 28 */ b lbl_80139970
lbl_8013994C:
/* 8013994C 001368AC 38 61 00 18 */ addi r3, r1, 0x18
/* 80139950 001368B0 38 9F 00 08 */ addi r4, r31, 8
/* 80139954 001368B4 48 1D A6 55 */ bl Dot__9CVector2fFRC9CVector2fRC9CVector2f
/* 80139958 001368B8 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 8013995C 001368BC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80139960 001368C0 40 81 00 0C */ ble lbl_8013996C
/* 80139964 001368C4 38 60 00 01 */ li r3, 1
/* 80139968 001368C8 48 00 00 08 */ b lbl_80139970
lbl_8013996C:
/* 8013996C 001368CC 38 60 00 00 */ li r3, 0
lbl_80139970:
/* 80139970 001368D0 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80139974 001368D4 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80139978 001368D8 7C 08 03 A6 */ mtlr r0
/* 8013997C 001368DC 38 21 00 30 */ addi r1, r1, 0x30
/* 80139980 001368E0 4E 80 00 20 */ blr
.global Shutdown__7CBSTurnFR15CBodyController
Shutdown__7CBSTurnFR15CBodyController:
/* 80139984 001368E4 4E 80 00 20 */ blr
.global UpdateBody__7CBSTurnFfR15CBodyControllerR13CStateManager
UpdateBody__7CBSTurnFfR15CBodyControllerR13CStateManager:
/* 80139988 001368E8 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 8013998C 001368EC 7C 08 02 A6 */ mflr r0
/* 80139990 001368F0 90 01 00 44 */ stw r0, 0x44(r1)
/* 80139994 001368F4 DB E1 00 30 */ stfd f31, 0x30(r1)
/* 80139998 001368F8 F3 E1 00 38 */ psq_st f31, 56(r1), 0, qr0
/* 8013999C 001368FC 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 801399A0 00136900 93 C1 00 28 */ stw r30, 0x28(r1)
/* 801399A4 00136904 93 A1 00 24 */ stw r29, 0x24(r1)
/* 801399A8 00136908 81 83 00 00 */ lwz r12, 0(r3)
/* 801399AC 0013690C FF E0 08 90 */ fmr f31, f1
/* 801399B0 00136910 7C 7D 1B 78 */ mr r29, r3
/* 801399B4 00136914 7C 9E 23 78 */ mr r30, r4
/* 801399B8 00136918 81 8C 00 38 */ lwz r12, 0x38(r12)
/* 801399BC 0013691C 7D 89 03 A6 */ mtctr r12
/* 801399C0 00136920 4E 80 04 21 */ bctrl
/* 801399C4 00136924 7C 7F 1B 78 */ mr r31, r3
/* 801399C8 00136928 2C 1F FF FF */ cmpwi r31, -1
/* 801399CC 0013692C 40 82 00 28 */ bne lbl_801399F4
/* 801399D0 00136930 C0 1D 00 04 */ lfs f0, 4(r29)
/* 801399D4 00136934 38 61 00 0C */ addi r3, r1, 0xc
/* 801399D8 00136938 38 81 00 08 */ addi r4, r1, 8
/* 801399DC 0013693C EC 00 07 F2 */ fmuls f0, f0, f31
/* 801399E0 00136940 D0 01 00 08 */ stfs f0, 8(r1)
/* 801399E4 00136944 48 1D 77 15 */ bl ZRotation__11CQuaternionFRC9CRelAngle
/* 801399E8 00136948 7F C3 F3 78 */ mr r3, r30
/* 801399EC 0013694C 38 81 00 0C */ addi r4, r1, 0xc
/* 801399F0 00136950 48 00 0E 19 */ bl SetDeltaRotation__15CBodyControllerFRC11CQuaternion
lbl_801399F4:
/* 801399F4 00136954 7F E3 FB 78 */ mr r3, r31
/* 801399F8 00136958 E3 E1 00 38 */ psq_l f31, 56(r1), 0, qr0
/* 801399FC 0013695C 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80139A00 00136960 CB E1 00 30 */ lfd f31, 0x30(r1)
/* 80139A04 00136964 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80139A08 00136968 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 80139A0C 0013696C 83 A1 00 24 */ lwz r29, 0x24(r1)
/* 80139A10 00136970 7C 08 03 A6 */ mtlr r0
/* 80139A14 00136974 38 21 00 40 */ addi r1, r1, 0x40
/* 80139A18 00136978 4E 80 00 20 */ blr
.global Start__7CBSTurnFR15CBodyControllerR13CStateManager
Start__7CBSTurnFR15CBodyControllerR13CStateManager:
/* 80139A1C 0013697C 94 21 FE D0 */ stwu r1, -0x130(r1)
/* 80139A20 00136980 7C 08 02 A6 */ mflr r0
/* 80139A24 00136984 90 01 01 34 */ stw r0, 0x134(r1)
/* 80139A28 00136988 DB E1 01 20 */ stfd f31, 0x120(r1)
/* 80139A2C 0013698C F3 E1 01 28 */ psq_st f31, 296(r1), 0, qr0
/* 80139A30 00136990 BF 61 01 0C */ stmw r27, 0x10c(r1)
/* 80139A34 00136994 7C 9F 23 78 */ mr r31, r4
/* 80139A38 00136998 7C 7E 1B 78 */ mr r30, r3
/* 80139A3C 0013699C 80 84 00 00 */ lwz r4, 0(r4)
/* 80139A40 001369A0 7C BB 2B 78 */ mr r27, r5
/* 80139A44 001369A4 38 61 00 70 */ addi r3, r1, 0x70
/* 80139A48 001369A8 C0 24 00 38 */ lfs f1, 0x38(r4)
/* 80139A4C 001369AC C0 44 00 48 */ lfs f2, 0x48(r4)
/* 80139A50 001369B0 48 1D A7 B1 */ bl __ct__9CVector2fFff
/* 80139A54 001369B4 C0 21 00 70 */ lfs f1, 0x70(r1)
/* 80139A58 001369B8 38 61 00 68 */ addi r3, r1, 0x68
/* 80139A5C 001369BC C0 01 00 74 */ lfs f0, 0x74(r1)
/* 80139A60 001369C0 D0 21 00 88 */ stfs f1, 0x88(r1)
/* 80139A64 001369C4 D0 01 00 8C */ stfs f0, 0x8c(r1)
/* 80139A68 001369C8 C0 3F 00 10 */ lfs f1, 0x10(r31)
/* 80139A6C 001369CC C0 5F 00 14 */ lfs f2, 0x14(r31)
/* 80139A70 001369D0 48 1D A7 91 */ bl __ct__9CVector2fFff
/* 80139A74 001369D4 C0 01 00 68 */ lfs f0, 0x68(r1)
/* 80139A78 001369D8 38 61 00 88 */ addi r3, r1, 0x88
/* 80139A7C 001369DC 38 9E 00 08 */ addi r4, r30, 8
/* 80139A80 001369E0 D0 1E 00 08 */ stfs f0, 8(r30)
/* 80139A84 001369E4 C0 01 00 6C */ lfs f0, 0x6c(r1)
/* 80139A88 001369E8 D0 1E 00 0C */ stfs f0, 0xc(r30)
/* 80139A8C 001369EC 48 1D A5 39 */ bl GetAngleDiff__9CVector2fFRC9CVector2fRC9CVector2f
/* 80139A90 001369F0 C0 42 9A 68 */ lfs f2, lbl_805AB788@sda21(r2)
/* 80139A94 001369F4 38 61 00 60 */ addi r3, r1, 0x60
/* 80139A98 001369F8 C0 01 00 88 */ lfs f0, 0x88(r1)
/* 80139A9C 001369FC EF E2 00 72 */ fmuls f31, f2, f1
/* 80139AA0 00136A00 C0 21 00 8C */ lfs f1, 0x8c(r1)
/* 80139AA4 00136A04 FC 40 00 50 */ fneg f2, f0
/* 80139AA8 00136A08 48 1D A7 59 */ bl __ct__9CVector2fFff
/* 80139AAC 00136A0C C0 21 00 60 */ lfs f1, 0x60(r1)
/* 80139AB0 00136A10 38 61 00 80 */ addi r3, r1, 0x80
/* 80139AB4 00136A14 C0 01 00 64 */ lfs f0, 0x64(r1)
/* 80139AB8 00136A18 38 9E 00 08 */ addi r4, r30, 8
/* 80139ABC 00136A1C D0 21 00 80 */ stfs f1, 0x80(r1)
/* 80139AC0 00136A20 D0 01 00 84 */ stfs f0, 0x84(r1)
/* 80139AC4 00136A24 48 1D A4 E5 */ bl Dot__9CVector2fFRC9CVector2fRC9CVector2f
/* 80139AC8 00136A28 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 80139ACC 00136A2C FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80139AD0 00136A30 40 81 00 0C */ ble lbl_80139ADC
/* 80139AD4 00136A34 38 00 00 01 */ li r0, 1
/* 80139AD8 00136A38 48 00 00 08 */ b lbl_80139AE0
lbl_80139ADC:
/* 80139ADC 00136A3C 38 00 00 00 */ li r0, 0
lbl_80139AE0:
/* 80139AE0 00136A40 90 1E 00 10 */ stw r0, 0x10(r30)
/* 80139AE4 00136A44 7F E3 FB 78 */ mr r3, r31
/* 80139AE8 00136A48 48 00 09 6D */ bl GetPASDatabase__15CBodyControllerCFv
/* 80139AEC 00136A4C 83 BF 02 EC */ lwz r29, 0x2ec(r31)
/* 80139AF0 00136A50 7C 7C 1B 78 */ mr r28, r3
/* 80139AF4 00136A54 38 61 00 20 */ addi r3, r1, 0x20
/* 80139AF8 00136A58 48 1A 95 85 */ bl NoParameter__12CPASAnimParmFv
/* 80139AFC 00136A5C 38 61 00 28 */ addi r3, r1, 0x28
/* 80139B00 00136A60 48 1A 95 7D */ bl NoParameter__12CPASAnimParmFv
/* 80139B04 00136A64 38 61 00 30 */ addi r3, r1, 0x30
/* 80139B08 00136A68 48 1A 95 75 */ bl NoParameter__12CPASAnimParmFv
/* 80139B0C 00136A6C 38 61 00 38 */ addi r3, r1, 0x38
/* 80139B10 00136A70 48 1A 95 6D */ bl NoParameter__12CPASAnimParmFv
/* 80139B14 00136A74 38 61 00 40 */ addi r3, r1, 0x40
/* 80139B18 00136A78 48 1A 95 65 */ bl NoParameter__12CPASAnimParmFv
/* 80139B1C 00136A7C 7F A4 EB 78 */ mr r4, r29
/* 80139B20 00136A80 38 61 00 48 */ addi r3, r1, 0x48
/* 80139B24 00136A84 48 1A 94 61 */ bl FromEnum__12CPASAnimParmFi
/* 80139B28 00136A88 FC 20 F8 90 */ fmr f1, f31
/* 80139B2C 00136A8C 38 61 00 50 */ addi r3, r1, 0x50
/* 80139B30 00136A90 48 1A 94 B9 */ bl FromReal32__12CPASAnimParmFf
/* 80139B34 00136A94 80 9E 00 10 */ lwz r4, 0x10(r30)
/* 80139B38 00136A98 38 61 00 58 */ addi r3, r1, 0x58
/* 80139B3C 00136A9C 48 1A 94 49 */ bl FromEnum__12CPASAnimParmFi
/* 80139B40 00136AA0 38 61 00 28 */ addi r3, r1, 0x28
/* 80139B44 00136AA4 38 01 00 20 */ addi r0, r1, 0x20
/* 80139B48 00136AA8 90 61 00 08 */ stw r3, 8(r1)
/* 80139B4C 00136AAC 38 61 00 B8 */ addi r3, r1, 0xb8
/* 80139B50 00136AB0 38 A1 00 58 */ addi r5, r1, 0x58
/* 80139B54 00136AB4 38 C1 00 50 */ addi r6, r1, 0x50
/* 80139B58 00136AB8 90 01 00 0C */ stw r0, 0xc(r1)
/* 80139B5C 00136ABC 38 E1 00 48 */ addi r7, r1, 0x48
/* 80139B60 00136AC0 39 01 00 40 */ addi r8, r1, 0x40
/* 80139B64 00136AC4 39 21 00 38 */ addi r9, r1, 0x38
/* 80139B68 00136AC8 39 41 00 30 */ addi r10, r1, 0x30
/* 80139B6C 00136ACC 38 80 00 08 */ li r4, 8
/* 80139B70 00136AD0 4B F4 37 55 */ bl __ct__16CPASAnimParmDataFiRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParmRC12CPASAnimParm
/* 80139B74 00136AD4 80 DB 09 00 */ lwz r6, 0x900(r27)
/* 80139B78 00136AD8 7F 84 E3 78 */ mr r4, r28
/* 80139B7C 00136ADC 38 61 00 18 */ addi r3, r1, 0x18
/* 80139B80 00136AE0 38 A1 00 B8 */ addi r5, r1, 0xb8
/* 80139B84 00136AE4 38 E0 FF FF */ li r7, -1
/* 80139B88 00136AE8 48 1A B4 D9 */ bl FindBestAnimation__12CPASDatabaseCFRC16CPASAnimParmDataR9CRandom16i
/* 80139B8C 00136AEC 83 A1 00 1C */ lwz r29, 0x1c(r1)
/* 80139B90 00136AF0 38 00 00 00 */ li r0, 0
/* 80139B94 00136AF4 C0 02 9A 64 */ lfs f0, lbl_805AB784@sda21(r2)
/* 80139B98 00136AF8 38 A0 FF FF */ li r5, -1
/* 80139B9C 00136AFC 38 E0 00 01 */ li r7, 1
/* 80139BA0 00136B00 93 A1 00 90 */ stw r29, 0x90(r1)
/* 80139BA4 00136B04 7F E3 FB 78 */ mr r3, r31
/* 80139BA8 00136B08 38 81 00 90 */ addi r4, r1, 0x90
/* 80139BAC 00136B0C 90 A1 00 94 */ stw r5, 0x94(r1)
/* 80139BB0 00136B10 38 A0 00 00 */ li r5, 0
/* 80139BB4 00136B14 38 C0 00 00 */ li r6, 0
/* 80139BB8 00136B18 D0 01 00 98 */ stfs f0, 0x98(r1)
/* 80139BBC 00136B1C 98 E1 00 9C */ stb r7, 0x9c(r1)
/* 80139BC0 00136B20 90 01 00 A0 */ stw r0, 0xa0(r1)
/* 80139BC4 00136B24 90 01 00 A4 */ stw r0, 0xa4(r1)
/* 80139BC8 00136B28 98 01 00 A8 */ stb r0, 0xa8(r1)
/* 80139BCC 00136B2C 90 01 00 AC */ stw r0, 0xac(r1)
/* 80139BD0 00136B30 90 01 00 B0 */ stw r0, 0xb0(r1)
/* 80139BD4 00136B34 90 01 00 B4 */ stw r0, 0xb4(r1)
/* 80139BD8 00136B38 48 00 0D 45 */ bl SetCurrentAnimation__15CBodyControllerFRC18CAnimPlaybackParmsbb
/* 80139BDC 00136B3C 7F 83 E3 78 */ mr r3, r28
/* 80139BE0 00136B40 38 80 00 08 */ li r4, 8
/* 80139BE4 00136B44 48 1A B2 E1 */ bl GetAnimState__12CPASDatabaseCFi
/* 80139BE8 00136B48 7C 64 1B 78 */ mr r4, r3
/* 80139BEC 00136B4C 7F A5 EB 78 */ mr r5, r29
/* 80139BF0 00136B50 38 61 00 10 */ addi r3, r1, 0x10
/* 80139BF4 00136B54 38 C0 00 01 */ li r6, 1
/* 80139BF8 00136B58 48 1A A3 FD */ bl GetAnimParmData__13CPASAnimStateCFiUi
/* 80139BFC 00136B5C 80 61 00 10 */ lwz r3, 0x10(r1)
/* 80139C00 00136B60 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80139C04 00136B64 90 61 00 78 */ stw r3, 0x78(r1)
/* 80139C08 00136B68 90 01 00 7C */ stw r0, 0x7c(r1)
/* 80139C0C 00136B6C 80 1E 00 10 */ lwz r0, 0x10(r30)
/* 80139C10 00136B70 2C 00 00 01 */ cmpwi r0, 1
/* 80139C14 00136B74 40 82 00 14 */ bne lbl_80139C28
/* 80139C18 00136B78 38 61 00 78 */ addi r3, r1, 0x78
/* 80139C1C 00136B7C 48 1A 93 51 */ bl GetReal32Value__12CPASAnimParmCFv
/* 80139C20 00136B80 EC 21 F8 28 */ fsubs f1, f1, f31
/* 80139C24 00136B84 48 00 00 10 */ b lbl_80139C34
lbl_80139C28:
/* 80139C28 00136B88 38 61 00 78 */ addi r3, r1, 0x78
/* 80139C2C 00136B8C 48 1A 93 41 */ bl GetReal32Value__12CPASAnimParmCFv
/* 80139C30 00136B90 EC 3F 08 28 */ fsubs f1, f31, f1
lbl_80139C34:
/* 80139C34 00136B94 C0 02 9A 6C */ lfs f0, lbl_805AB78C@sda21(r2)
/* 80139C38 00136B98 7F E3 FB 78 */ mr r3, r31
/* 80139C3C 00136B9C EC 00 00 72 */ fmuls f0, f0, f1
/* 80139C40 00136BA0 D0 1E 00 04 */ stfs f0, 4(r30)
/* 80139C44 00136BA4 48 00 0C 75 */ bl GetAnimTimeRemaining__15CBodyControllerCFv
/* 80139C48 00136BA8 C0 02 9A 60 */ lfs f0, lbl_805AB780@sda21(r2)
/* 80139C4C 00136BAC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80139C50 00136BB0 40 81 00 10 */ ble lbl_80139C60
/* 80139C54 00136BB4 C0 1E 00 04 */ lfs f0, 4(r30)
/* 80139C58 00136BB8 EC 00 08 24 */ fdivs f0, f0, f1
/* 80139C5C 00136BBC 48 00 00 08 */ b lbl_80139C64
lbl_80139C60:
/* 80139C60 00136BC0 C0 1E 00 04 */ lfs f0, 4(r30)
lbl_80139C64:
/* 80139C64 00136BC4 34 A1 00 BC */ addic. r5, r1, 0xbc
/* 80139C68 00136BC8 D0 1E 00 04 */ stfs f0, 4(r30)
/* 80139C6C 00136BCC 41 82 00 58 */ beq lbl_80139CC4
/* 80139C70 00136BD0 80 C5 00 00 */ lwz r6, 0(r5)
/* 80139C74 00136BD4 38 60 00 00 */ li r3, 0
/* 80139C78 00136BD8 2C 06 00 00 */ cmpwi r6, 0
/* 80139C7C 00136BDC 40 81 00 40 */ ble lbl_80139CBC
/* 80139C80 00136BE0 2C 06 00 08 */ cmpwi r6, 8
/* 80139C84 00136BE4 38 86 FF F8 */ addi r4, r6, -8
/* 80139C88 00136BE8 40 81 00 20 */ ble lbl_80139CA8
/* 80139C8C 00136BEC 38 04 00 07 */ addi r0, r4, 7
/* 80139C90 00136BF0 54 00 E8 FE */ srwi r0, r0, 3
/* 80139C94 00136BF4 7C 09 03 A6 */ mtctr r0
/* 80139C98 00136BF8 2C 04 00 00 */ cmpwi r4, 0
/* 80139C9C 00136BFC 40 81 00 0C */ ble lbl_80139CA8
lbl_80139CA0:
/* 80139CA0 00136C00 38 63 00 08 */ addi r3, r3, 8
/* 80139CA4 00136C04 42 00 FF FC */ bdnz lbl_80139CA0
lbl_80139CA8:
/* 80139CA8 00136C08 7C 03 30 50 */ subf r0, r3, r6
/* 80139CAC 00136C0C 7C 09 03 A6 */ mtctr r0
/* 80139CB0 00136C10 7C 03 30 00 */ cmpw r3, r6
/* 80139CB4 00136C14 40 80 00 08 */ bge lbl_80139CBC
lbl_80139CB8:
/* 80139CB8 00136C18 42 00 00 00 */ bdnz lbl_80139CB8
lbl_80139CBC:
/* 80139CBC 00136C1C 38 00 00 00 */ li r0, 0
/* 80139CC0 00136C20 90 05 00 00 */ stw r0, 0(r5)
lbl_80139CC4:
/* 80139CC4 00136C24 E3 E1 01 28 */ psq_l f31, 296(r1), 0, qr0
/* 80139CC8 00136C28 CB E1 01 20 */ lfd f31, 0x120(r1)
/* 80139CCC 00136C2C BB 61 01 0C */ lmw r27, 0x10c(r1)
/* 80139CD0 00136C30 80 01 01 34 */ lwz r0, 0x134(r1)
/* 80139CD4 00136C34 7C 08 03 A6 */ mtlr r0
/* 80139CD8 00136C38 38 21 01 30 */ addi r1, r1, 0x130
/* 80139CDC 00136C3C 4E 80 00 20 */ blr
.global __ct__7CBSTurnFv
__ct__7CBSTurnFv:
/* 80139CE0 00136C40 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80139CE4 00136C44 7C 08 02 A6 */ mflr r0
/* 80139CE8 00136C48 C0 22 9A 60 */ lfs f1, lbl_805AB780@sda21(r2)
/* 80139CEC 00136C4C 3C 80 80 3E */ lis r4, lbl_803E1318@ha
/* 80139CF0 00136C50 90 01 00 14 */ stw r0, 0x14(r1)
/* 80139CF4 00136C54 38 04 13 18 */ addi r0, r4, lbl_803E1318@l
/* 80139CF8 00136C58 FC 40 08 90 */ fmr f2, f1
/* 80139CFC 00136C5C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80139D00 00136C60 7C 7F 1B 78 */ mr r31, r3
/* 80139D04 00136C64 3C 60 80 3E */ lis r3, lbl_803E178C@ha
/* 80139D08 00136C68 90 1F 00 00 */ stw r0, 0(r31)
/* 80139D0C 00136C6C 38 03 17 8C */ addi r0, r3, lbl_803E178C@l
/* 80139D10 00136C70 38 7F 00 08 */ addi r3, r31, 8
/* 80139D14 00136C74 90 1F 00 00 */ stw r0, 0(r31)
/* 80139D18 00136C78 D0 3F 00 04 */ stfs f1, 4(r31)
/* 80139D1C 00136C7C 48 1D A4 E5 */ bl __ct__9CVector2fFff
/* 80139D20 00136C80 38 00 FF FF */ li r0, -1
/* 80139D24 00136C84 7F E3 FB 78 */ mr r3, r31
/* 80139D28 00136C88 90 1F 00 10 */ stw r0, 0x10(r31)
/* 80139D2C 00136C8C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80139D30 00136C90 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80139D34 00136C94 7C 08 03 A6 */ mtlr r0
/* 80139D38 00136C98 38 21 00 10 */ addi r1, r1, 0x10
/* 80139D3C 00136C9C 4E 80 00 20 */ blr
.section .sdata2, "a"
.global lbl_805AB780
lbl_805AB780:
# ROM: 0x3F8020
.4byte 0
.global lbl_805AB784
lbl_805AB784:
# ROM: 0x3F8024
.float 1.0
.global lbl_805AB788
lbl_805AB788:
# ROM: 0x3F8028
.4byte 0x42652EE0
.global lbl_805AB78C
lbl_805AB78C:
# ROM: 0x3F802C
.float 0.017453292