prime/asm/Kyoto/Math/CQuaternion.s

2040 lines
98 KiB
ArmAsm

.include "macros.inc"
.section .ctors, "wa"
lbl_ctor:
.4byte __sinit_CQuaternion_cpp
.section .bss
.balign 8
.comm sNoRotation__11CQuaternion, 0x10, 4
.lcomm XAxis, 0xC, 4
.lcomm YAxis, 0xC, 4
.lcomm ZAxis, 0x10, 4
.section .sdata
.balign 8
.global lbl_805A8850
lbl_805A8850:
# ROM: 0x3F61F0
.float -1.0
.global lbl_805A8854
lbl_805A8854:
# ROM: 0x3F61F4
.float 1.0
.global lbl_805A8858
lbl_805A8858:
# ROM: 0x3F61F8
.float -1.0
.global lbl_805A885C
lbl_805A885C:
# ROM: 0x3F61FC
.float 1.0
.global lbl_805A8860
lbl_805A8860:
# ROM: 0x3F6200
.float 1.0
.global lbl_805A8864
lbl_805A8864:
# ROM: 0x3F6204
.float -1.0
.section .sbss, "wa"
.balign 8
.global lbl_805A9448
lbl_805A9448:
.skip 0x4
.global lbl_805A944C
lbl_805A944C:
.skip 0x4
.section .text, "ax"
.global FromNUQuaternion__11CQuaternionFRC13CNUQuaternion
FromNUQuaternion__11CQuaternionFRC13CNUQuaternion:
/* 803109E8 0030D948 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803109EC 0030D94C 7C 08 02 A6 */ mflr r0
/* 803109F0 0030D950 90 01 00 24 */ stw r0, 0x24(r1)
/* 803109F4 0030D954 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803109F8 0030D958 7C 7F 1B 78 */ mr r31, r3
/* 803109FC 0030D95C 38 61 00 08 */ addi r3, r1, 8
/* 80310A00 0030D960 48 00 03 E9 */ bl AsNormalized__13CNUQuaternionCFv
/* 80310A04 0030D964 C0 21 00 0C */ lfs f1, 0xc(r1)
/* 80310A08 0030D968 C0 41 00 10 */ lfs f2, 0x10(r1)
/* 80310A0C 0030D96C C0 61 00 14 */ lfs f3, 0x14(r1)
/* 80310A10 0030D970 C0 01 00 08 */ lfs f0, 8(r1)
/* 80310A14 0030D974 D0 1F 00 00 */ stfs f0, 0(r31)
/* 80310A18 0030D978 D0 3F 00 04 */ stfs f1, 4(r31)
/* 80310A1C 0030D97C D0 5F 00 08 */ stfs f2, 8(r31)
/* 80310A20 0030D980 D0 7F 00 0C */ stfs f3, 0xc(r31)
/* 80310A24 0030D984 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80310A28 0030D988 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80310A2C 0030D98C 7C 08 03 A6 */ mtlr r0
/* 80310A30 0030D990 38 21 00 20 */ addi r1, r1, 0x20
/* 80310A34 0030D994 4E 80 00 20 */ blr
.global __ml__FfRC13CNUQuaternion
__ml__FfRC13CNUQuaternion:
/* 80310A38 0030D998 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80310A3C 0030D99C 7C 08 02 A6 */ mflr r0
/* 80310A40 0030D9A0 90 01 00 24 */ stw r0, 0x24(r1)
/* 80310A44 0030D9A4 C0 84 00 08 */ lfs f4, 8(r4)
/* 80310A48 0030D9A8 C0 64 00 0C */ lfs f3, 0xc(r4)
/* 80310A4C 0030D9AC C0 44 00 04 */ lfs f2, 4(r4)
/* 80310A50 0030D9B0 EC C1 01 32 */ fmuls f6, f1, f4
/* 80310A54 0030D9B4 C0 04 00 00 */ lfs f0, 0(r4)
/* 80310A58 0030D9B8 EC A1 00 F2 */ fmuls f5, f1, f3
/* 80310A5C 0030D9BC D0 41 00 08 */ stfs f2, 8(r1)
/* 80310A60 0030D9C0 EC 41 00 B2 */ fmuls f2, f1, f2
/* 80310A64 0030D9C4 EC 21 00 32 */ fmuls f1, f1, f0
/* 80310A68 0030D9C8 D0 81 00 0C */ stfs f4, 0xc(r1)
/* 80310A6C 0030D9CC 38 81 00 14 */ addi r4, r1, 0x14
/* 80310A70 0030D9D0 D0 61 00 10 */ stfs f3, 0x10(r1)
/* 80310A74 0030D9D4 D0 41 00 14 */ stfs f2, 0x14(r1)
/* 80310A78 0030D9D8 D0 C1 00 18 */ stfs f6, 0x18(r1)
/* 80310A7C 0030D9DC D0 A1 00 1C */ stfs f5, 0x1c(r1)
/* 80310A80 0030D9E0 48 00 05 81 */ bl __ct__13CNUQuaternionFfRC9CVector3f
/* 80310A84 0030D9E4 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80310A88 0030D9E8 7C 08 03 A6 */ mtlr r0
/* 80310A8C 0030D9EC 38 21 00 20 */ addi r1, r1, 0x20
/* 80310A90 0030D9F0 4E 80 00 20 */ blr
.global __ml__FRC13CNUQuaternionf
__ml__FRC13CNUQuaternionf:
/* 80310A94 0030D9F4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80310A98 0030D9F8 7C 08 02 A6 */ mflr r0
/* 80310A9C 0030D9FC 90 01 00 24 */ stw r0, 0x24(r1)
/* 80310AA0 0030DA00 C0 84 00 08 */ lfs f4, 8(r4)
/* 80310AA4 0030DA04 C0 64 00 0C */ lfs f3, 0xc(r4)
/* 80310AA8 0030DA08 C0 44 00 04 */ lfs f2, 4(r4)
/* 80310AAC 0030DA0C EC C1 01 32 */ fmuls f6, f1, f4
/* 80310AB0 0030DA10 C0 04 00 00 */ lfs f0, 0(r4)
/* 80310AB4 0030DA14 EC A1 00 F2 */ fmuls f5, f1, f3
/* 80310AB8 0030DA18 D0 41 00 08 */ stfs f2, 8(r1)
/* 80310ABC 0030DA1C EC 41 00 B2 */ fmuls f2, f1, f2
/* 80310AC0 0030DA20 EC 21 00 32 */ fmuls f1, f1, f0
/* 80310AC4 0030DA24 D0 81 00 0C */ stfs f4, 0xc(r1)
/* 80310AC8 0030DA28 38 81 00 14 */ addi r4, r1, 0x14
/* 80310ACC 0030DA2C D0 61 00 10 */ stfs f3, 0x10(r1)
/* 80310AD0 0030DA30 D0 41 00 14 */ stfs f2, 0x14(r1)
/* 80310AD4 0030DA34 D0 C1 00 18 */ stfs f6, 0x18(r1)
/* 80310AD8 0030DA38 D0 A1 00 1C */ stfs f5, 0x1c(r1)
/* 80310ADC 0030DA3C 48 00 05 25 */ bl __ct__13CNUQuaternionFfRC9CVector3f
/* 80310AE0 0030DA40 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80310AE4 0030DA44 7C 08 03 A6 */ mtlr r0
/* 80310AE8 0030DA48 38 21 00 20 */ addi r1, r1, 0x20
/* 80310AEC 0030DA4C 4E 80 00 20 */ blr
.global BuildFromMatrix3f__13CNUQuaternionFRC9CMatrix3f
BuildFromMatrix3f__13CNUQuaternionFRC9CMatrix3f:
/* 80310AF0 0030DA50 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80310AF4 0030DA54 7C 08 02 A6 */ mflr r0
/* 80310AF8 0030DA58 C0 02 C8 60 */ lfs f0, lbl_805AE580@sda21(r2)
/* 80310AFC 0030DA5C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80310B00 0030DA60 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80310B04 0030DA64 7C 9F 23 78 */ mr r31, r4
/* 80310B08 0030DA68 93 C1 00 08 */ stw r30, 8(r1)
/* 80310B0C 0030DA6C 7C 7E 1B 78 */ mr r30, r3
/* 80310B10 0030DA70 C0 44 00 00 */ lfs f2, 0(r4)
/* 80310B14 0030DA74 C0 64 00 10 */ lfs f3, 0x10(r4)
/* 80310B18 0030DA78 C0 24 00 20 */ lfs f1, 0x20(r4)
/* 80310B1C 0030DA7C EC 82 18 2A */ fadds f4, f2, f3
/* 80310B20 0030DA80 EC A1 20 2A */ fadds f5, f1, f4
/* 80310B24 0030DA84 FC 05 00 40 */ fcmpo cr0, f5, f0
/* 80310B28 0030DA88 4C 41 13 82 */ cror 2, 1, 2
/* 80310B2C 0030DA8C 40 82 00 58 */ bne lbl_80310B84
/* 80310B30 0030DA90 C0 02 C8 64 */ lfs f0, lbl_805AE584@sda21(r2)
/* 80310B34 0030DA94 EC 20 28 2A */ fadds f1, f0, f5
/* 80310B38 0030DA98 48 00 49 C9 */ bl SqrtF__5CMathFf
/* 80310B3C 0030DA9C C0 E2 C8 68 */ lfs f7, lbl_805AE588@sda21(r2)
/* 80310B40 0030DAA0 7F C3 F3 78 */ mr r3, r30
/* 80310B44 0030DAA4 C0 DF 00 1C */ lfs f6, 0x1c(r31)
/* 80310B48 0030DAA8 ED 07 08 24 */ fdivs f8, f7, f1
/* 80310B4C 0030DAAC C0 BF 00 14 */ lfs f5, 0x14(r31)
/* 80310B50 0030DAB0 C0 9F 00 08 */ lfs f4, 8(r31)
/* 80310B54 0030DAB4 C0 7F 00 18 */ lfs f3, 0x18(r31)
/* 80310B58 0030DAB8 C0 5F 00 0C */ lfs f2, 0xc(r31)
/* 80310B5C 0030DABC C0 1F 00 04 */ lfs f0, 4(r31)
/* 80310B60 0030DAC0 EC 64 18 28 */ fsubs f3, f4, f3
/* 80310B64 0030DAC4 EC 02 00 28 */ fsubs f0, f2, f0
/* 80310B68 0030DAC8 EC A6 28 28 */ fsubs f5, f6, f5
/* 80310B6C 0030DACC EC 27 00 72 */ fmuls f1, f7, f1
/* 80310B70 0030DAD0 EC 68 00 F2 */ fmuls f3, f8, f3
/* 80310B74 0030DAD4 EC 48 01 72 */ fmuls f2, f8, f5
/* 80310B78 0030DAD8 EC 88 00 32 */ fmuls f4, f8, f0
/* 80310B7C 0030DADC 48 00 04 71 */ bl __ct__13CNUQuaternionFffff
/* 80310B80 0030DAE0 48 00 01 7C */ b lbl_80310CFC
lbl_80310B84:
/* 80310B84 0030DAE4 FC 03 10 40 */ fcmpo cr0, f3, f2
/* 80310B88 0030DAE8 38 00 00 00 */ li r0, 0
/* 80310B8C 0030DAEC 40 81 00 18 */ ble lbl_80310BA4
/* 80310B90 0030DAF0 FC 01 18 40 */ fcmpo cr0, f1, f3
/* 80310B94 0030DAF4 38 00 00 01 */ li r0, 1
/* 80310B98 0030DAF8 40 81 00 18 */ ble lbl_80310BB0
/* 80310B9C 0030DAFC 38 00 00 02 */ li r0, 2
/* 80310BA0 0030DB00 48 00 00 10 */ b lbl_80310BB0
lbl_80310BA4:
/* 80310BA4 0030DB04 FC 01 10 40 */ fcmpo cr0, f1, f2
/* 80310BA8 0030DB08 40 81 00 08 */ ble lbl_80310BB0
/* 80310BAC 0030DB0C 38 00 00 02 */ li r0, 2
lbl_80310BB0:
/* 80310BB0 0030DB10 2C 00 00 01 */ cmpwi r0, 1
/* 80310BB4 0030DB14 41 82 00 7C */ beq lbl_80310C30
/* 80310BB8 0030DB18 40 80 00 10 */ bge lbl_80310BC8
/* 80310BBC 0030DB1C 2C 00 00 00 */ cmpwi r0, 0
/* 80310BC0 0030DB20 40 80 00 14 */ bge lbl_80310BD4
/* 80310BC4 0030DB24 48 00 01 20 */ b lbl_80310CE4
lbl_80310BC8:
/* 80310BC8 0030DB28 2C 00 00 03 */ cmpwi r0, 3
/* 80310BCC 0030DB2C 40 80 01 18 */ bge lbl_80310CE4
/* 80310BD0 0030DB30 48 00 00 BC */ b lbl_80310C8C
lbl_80310BD4:
/* 80310BD4 0030DB34 EC 03 08 2A */ fadds f0, f3, f1
/* 80310BD8 0030DB38 C0 22 C8 64 */ lfs f1, lbl_805AE584@sda21(r2)
/* 80310BDC 0030DB3C EC 02 00 28 */ fsubs f0, f2, f0
/* 80310BE0 0030DB40 EC 21 00 2A */ fadds f1, f1, f0
/* 80310BE4 0030DB44 48 00 49 1D */ bl SqrtF__5CMathFf
/* 80310BE8 0030DB48 C0 42 C8 68 */ lfs f2, lbl_805AE588@sda21(r2)
/* 80310BEC 0030DB4C 7F C3 F3 78 */ mr r3, r30
/* 80310BF0 0030DB50 C0 FF 00 1C */ lfs f7, 0x1c(r31)
/* 80310BF4 0030DB54 ED 02 08 24 */ fdivs f8, f2, f1
/* 80310BF8 0030DB58 C0 DF 00 14 */ lfs f6, 0x14(r31)
/* 80310BFC 0030DB5C C0 BF 00 04 */ lfs f5, 4(r31)
/* 80310C00 0030DB60 C0 9F 00 0C */ lfs f4, 0xc(r31)
/* 80310C04 0030DB64 C0 7F 00 18 */ lfs f3, 0x18(r31)
/* 80310C08 0030DB68 C0 1F 00 08 */ lfs f0, 8(r31)
/* 80310C0C 0030DB6C EC 42 00 72 */ fmuls f2, f2, f1
/* 80310C10 0030DB70 EC 27 30 28 */ fsubs f1, f7, f6
/* 80310C14 0030DB74 EC 85 20 2A */ fadds f4, f5, f4
/* 80310C18 0030DB78 EC 03 00 2A */ fadds f0, f3, f0
/* 80310C1C 0030DB7C EC 28 00 72 */ fmuls f1, f8, f1
/* 80310C20 0030DB80 EC 68 01 32 */ fmuls f3, f8, f4
/* 80310C24 0030DB84 EC 88 00 32 */ fmuls f4, f8, f0
/* 80310C28 0030DB88 48 00 03 C5 */ bl __ct__13CNUQuaternionFffff
/* 80310C2C 0030DB8C 48 00 00 D0 */ b lbl_80310CFC
lbl_80310C30:
/* 80310C30 0030DB90 EC 01 10 2A */ fadds f0, f1, f2
/* 80310C34 0030DB94 C0 22 C8 64 */ lfs f1, lbl_805AE584@sda21(r2)
/* 80310C38 0030DB98 EC 03 00 28 */ fsubs f0, f3, f0
/* 80310C3C 0030DB9C EC 21 00 2A */ fadds f1, f1, f0
/* 80310C40 0030DBA0 48 00 48 C1 */ bl SqrtF__5CMathFf
/* 80310C44 0030DBA4 C0 62 C8 68 */ lfs f3, lbl_805AE588@sda21(r2)
/* 80310C48 0030DBA8 7F C3 F3 78 */ mr r3, r30
/* 80310C4C 0030DBAC C0 FF 00 08 */ lfs f7, 8(r31)
/* 80310C50 0030DBB0 ED 03 08 24 */ fdivs f8, f3, f1
/* 80310C54 0030DBB4 C0 DF 00 18 */ lfs f6, 0x18(r31)
/* 80310C58 0030DBB8 C0 BF 00 04 */ lfs f5, 4(r31)
/* 80310C5C 0030DBBC C0 9F 00 0C */ lfs f4, 0xc(r31)
/* 80310C60 0030DBC0 C0 5F 00 14 */ lfs f2, 0x14(r31)
/* 80310C64 0030DBC4 C0 1F 00 1C */ lfs f0, 0x1c(r31)
/* 80310C68 0030DBC8 EC 63 00 72 */ fmuls f3, f3, f1
/* 80310C6C 0030DBCC EC 27 30 28 */ fsubs f1, f7, f6
/* 80310C70 0030DBD0 EC 85 20 2A */ fadds f4, f5, f4
/* 80310C74 0030DBD4 EC 02 00 2A */ fadds f0, f2, f0
/* 80310C78 0030DBD8 EC 28 00 72 */ fmuls f1, f8, f1
/* 80310C7C 0030DBDC EC 48 01 32 */ fmuls f2, f8, f4
/* 80310C80 0030DBE0 EC 88 00 32 */ fmuls f4, f8, f0
/* 80310C84 0030DBE4 48 00 03 69 */ bl __ct__13CNUQuaternionFffff
/* 80310C88 0030DBE8 48 00 00 74 */ b lbl_80310CFC
lbl_80310C8C:
/* 80310C8C 0030DBEC EC 01 20 28 */ fsubs f0, f1, f4
/* 80310C90 0030DBF0 C0 22 C8 64 */ lfs f1, lbl_805AE584@sda21(r2)
/* 80310C94 0030DBF4 EC 21 00 2A */ fadds f1, f1, f0
/* 80310C98 0030DBF8 48 00 48 69 */ bl SqrtF__5CMathFf
/* 80310C9C 0030DBFC C0 82 C8 68 */ lfs f4, lbl_805AE588@sda21(r2)
/* 80310CA0 0030DC00 7F C3 F3 78 */ mr r3, r30
/* 80310CA4 0030DC04 C0 FF 00 0C */ lfs f7, 0xc(r31)
/* 80310CA8 0030DC08 ED 04 08 24 */ fdivs f8, f4, f1
/* 80310CAC 0030DC0C C0 DF 00 04 */ lfs f6, 4(r31)
/* 80310CB0 0030DC10 C0 BF 00 18 */ lfs f5, 0x18(r31)
/* 80310CB4 0030DC14 C0 7F 00 08 */ lfs f3, 8(r31)
/* 80310CB8 0030DC18 C0 5F 00 14 */ lfs f2, 0x14(r31)
/* 80310CBC 0030DC1C C0 1F 00 1C */ lfs f0, 0x1c(r31)
/* 80310CC0 0030DC20 EC 84 00 72 */ fmuls f4, f4, f1
/* 80310CC4 0030DC24 EC 27 30 28 */ fsubs f1, f7, f6
/* 80310CC8 0030DC28 EC 65 18 2A */ fadds f3, f5, f3
/* 80310CCC 0030DC2C EC 02 00 2A */ fadds f0, f2, f0
/* 80310CD0 0030DC30 EC 28 00 72 */ fmuls f1, f8, f1
/* 80310CD4 0030DC34 EC 48 00 F2 */ fmuls f2, f8, f3
/* 80310CD8 0030DC38 EC 68 00 32 */ fmuls f3, f8, f0
/* 80310CDC 0030DC3C 48 00 03 11 */ bl __ct__13CNUQuaternionFffff
/* 80310CE0 0030DC40 48 00 00 1C */ b lbl_80310CFC
lbl_80310CE4:
/* 80310CE4 0030DC44 C0 22 C8 60 */ lfs f1, lbl_805AE580@sda21(r2)
/* 80310CE8 0030DC48 7F C3 F3 78 */ mr r3, r30
/* 80310CEC 0030DC4C FC 40 08 90 */ fmr f2, f1
/* 80310CF0 0030DC50 FC 60 08 90 */ fmr f3, f1
/* 80310CF4 0030DC54 FC 80 08 90 */ fmr f4, f1
/* 80310CF8 0030DC58 48 00 02 F5 */ bl __ct__13CNUQuaternionFffff
lbl_80310CFC:
/* 80310CFC 0030DC5C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80310D00 0030DC60 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80310D04 0030DC64 83 C1 00 08 */ lwz r30, 8(r1)
/* 80310D08 0030DC68 7C 08 03 A6 */ mtlr r0
/* 80310D0C 0030DC6C 38 21 00 10 */ addi r1, r1, 0x10
/* 80310D10 0030DC70 4E 80 00 20 */ blr
.global BuildFromQuaternion__13CNUQuaternionFRC11CQuaternion
BuildFromQuaternion__13CNUQuaternionFRC11CQuaternion:
/* 80310D14 0030DC74 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80310D18 0030DC78 7C 08 02 A6 */ mflr r0
/* 80310D1C 0030DC7C 90 01 00 14 */ stw r0, 0x14(r1)
/* 80310D20 0030DC80 C0 24 00 00 */ lfs f1, 0(r4)
/* 80310D24 0030DC84 38 84 00 04 */ addi r4, r4, 4
/* 80310D28 0030DC88 48 00 02 D9 */ bl __ct__13CNUQuaternionFfRC9CVector3f
/* 80310D2C 0030DC8C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80310D30 0030DC90 7C 08 03 A6 */ mtlr r0
/* 80310D34 0030DC94 38 21 00 10 */ addi r1, r1, 0x10
/* 80310D38 0030DC98 4E 80 00 20 */ blr
.global BuildFromAxisAngle__13CNUQuaternionFRC9CVector3ff
BuildFromAxisAngle__13CNUQuaternionFRC9CVector3ff:
/* 80310D3C 0030DC9C 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 80310D40 0030DCA0 7C 08 02 A6 */ mflr r0
/* 80310D44 0030DCA4 90 01 00 54 */ stw r0, 0x54(r1)
/* 80310D48 0030DCA8 DB E1 00 40 */ stfd f31, 0x40(r1)
/* 80310D4C 0030DCAC F3 E1 00 48 */ psq_st f31, 72(r1), 0, qr0
/* 80310D50 0030DCB0 DB C1 00 30 */ stfd f30, 0x30(r1)
/* 80310D54 0030DCB4 F3 C1 00 38 */ psq_st f30, 56(r1), 0, qr0
/* 80310D58 0030DCB8 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 80310D5C 0030DCBC 93 C1 00 28 */ stw r30, 0x28(r1)
/* 80310D60 0030DCC0 C0 02 C8 68 */ lfs f0, lbl_805AE588@sda21(r2)
/* 80310D64 0030DCC4 7C 7E 1B 78 */ mr r30, r3
/* 80310D68 0030DCC8 7C 9F 23 78 */ mr r31, r4
/* 80310D6C 0030DCCC EF C1 00 32 */ fmuls f30, f1, f0
/* 80310D70 0030DCD0 FC 20 F0 90 */ fmr f1, f30
/* 80310D74 0030DCD4 48 00 45 95 */ bl SlowSineR__5CMathFf
/* 80310D78 0030DCD8 FF E0 08 90 */ fmr f31, f1
/* 80310D7C 0030DCDC 7F E4 FB 78 */ mr r4, r31
/* 80310D80 0030DCE0 38 61 00 08 */ addi r3, r1, 8
/* 80310D84 0030DCE4 48 00 3A CD */ bl AsNormalized__9CVector3fCFv
/* 80310D88 0030DCE8 C0 61 00 08 */ lfs f3, 8(r1)
/* 80310D8C 0030DCEC FC 20 F0 90 */ fmr f1, f30
/* 80310D90 0030DCF0 C0 41 00 0C */ lfs f2, 0xc(r1)
/* 80310D94 0030DCF4 C0 01 00 10 */ lfs f0, 0x10(r1)
/* 80310D98 0030DCF8 EC 7F 00 F2 */ fmuls f3, f31, f3
/* 80310D9C 0030DCFC EC 5F 00 B2 */ fmuls f2, f31, f2
/* 80310DA0 0030DD00 EC 1F 00 32 */ fmuls f0, f31, f0
/* 80310DA4 0030DD04 D0 61 00 14 */ stfs f3, 0x14(r1)
/* 80310DA8 0030DD08 D0 41 00 18 */ stfs f2, 0x18(r1)
/* 80310DAC 0030DD0C D0 01 00 1C */ stfs f0, 0x1c(r1)
/* 80310DB0 0030DD10 48 00 45 35 */ bl SlowCosineR__5CMathFf
/* 80310DB4 0030DD14 7F C3 F3 78 */ mr r3, r30
/* 80310DB8 0030DD18 38 81 00 14 */ addi r4, r1, 0x14
/* 80310DBC 0030DD1C 48 00 02 45 */ bl __ct__13CNUQuaternionFfRC9CVector3f
/* 80310DC0 0030DD20 E3 E1 00 48 */ psq_l f31, 72(r1), 0, qr0
/* 80310DC4 0030DD24 CB E1 00 40 */ lfd f31, 0x40(r1)
/* 80310DC8 0030DD28 E3 C1 00 38 */ psq_l f30, 56(r1), 0, qr0
/* 80310DCC 0030DD2C CB C1 00 30 */ lfd f30, 0x30(r1)
/* 80310DD0 0030DD30 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80310DD4 0030DD34 80 01 00 54 */ lwz r0, 0x54(r1)
/* 80310DD8 0030DD38 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 80310DDC 0030DD3C 7C 08 03 A6 */ mtlr r0
/* 80310DE0 0030DD40 38 21 00 50 */ addi r1, r1, 0x50
/* 80310DE4 0030DD44 4E 80 00 20 */ blr
.global AsNormalized__13CNUQuaternionCFv
AsNormalized__13CNUQuaternionCFv:
/* 80310DE8 0030DD48 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 80310DEC 0030DD4C 7C 08 02 A6 */ mflr r0
/* 80310DF0 0030DD50 90 01 00 34 */ stw r0, 0x34(r1)
/* 80310DF4 0030DD54 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 80310DF8 0030DD58 7C 9F 23 78 */ mr r31, r4
/* 80310DFC 0030DD5C 93 C1 00 28 */ stw r30, 0x28(r1)
/* 80310E00 0030DD60 7C 7E 1B 78 */ mr r30, r3
/* 80310E04 0030DD64 C0 24 00 04 */ lfs f1, 4(r4)
/* 80310E08 0030DD68 C0 04 00 08 */ lfs f0, 8(r4)
/* 80310E0C 0030DD6C EC 21 00 72 */ fmuls f1, f1, f1
/* 80310E10 0030DD70 C0 44 00 0C */ lfs f2, 0xc(r4)
/* 80310E14 0030DD74 EC 00 00 32 */ fmuls f0, f0, f0
/* 80310E18 0030DD78 C0 64 00 00 */ lfs f3, 0(r4)
/* 80310E1C 0030DD7C EC 42 00 B2 */ fmuls f2, f2, f2
/* 80310E20 0030DD80 EC 63 00 F2 */ fmuls f3, f3, f3
/* 80310E24 0030DD84 EC 01 00 2A */ fadds f0, f1, f0
/* 80310E28 0030DD88 EC 02 00 2A */ fadds f0, f2, f0
/* 80310E2C 0030DD8C EC 23 00 2A */ fadds f1, f3, f0
/* 80310E30 0030DD90 48 00 45 A9 */ bl InvSqrtF__5CMathFf
/* 80310E34 0030DD94 C0 BF 00 04 */ lfs f5, 4(r31)
/* 80310E38 0030DD98 7F C3 F3 78 */ mr r3, r30
/* 80310E3C 0030DD9C C0 9F 00 08 */ lfs f4, 8(r31)
/* 80310E40 0030DDA0 38 81 00 14 */ addi r4, r1, 0x14
/* 80310E44 0030DDA4 C0 7F 00 0C */ lfs f3, 0xc(r31)
/* 80310E48 0030DDA8 EC 41 01 72 */ fmuls f2, f1, f5
/* 80310E4C 0030DDAC EC E1 01 32 */ fmuls f7, f1, f4
/* 80310E50 0030DDB0 C0 1F 00 00 */ lfs f0, 0(r31)
/* 80310E54 0030DDB4 EC C1 00 F2 */ fmuls f6, f1, f3
/* 80310E58 0030DDB8 D0 A1 00 08 */ stfs f5, 8(r1)
/* 80310E5C 0030DDBC EC 21 00 32 */ fmuls f1, f1, f0
/* 80310E60 0030DDC0 D0 81 00 0C */ stfs f4, 0xc(r1)
/* 80310E64 0030DDC4 D0 61 00 10 */ stfs f3, 0x10(r1)
/* 80310E68 0030DDC8 D0 41 00 14 */ stfs f2, 0x14(r1)
/* 80310E6C 0030DDCC D0 E1 00 18 */ stfs f7, 0x18(r1)
/* 80310E70 0030DDD0 D0 C1 00 1C */ stfs f6, 0x1c(r1)
/* 80310E74 0030DDD4 48 00 01 8D */ bl __ct__13CNUQuaternionFfRC9CVector3f
/* 80310E78 0030DDD8 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80310E7C 0030DDDC 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80310E80 0030DDE0 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 80310E84 0030DDE4 7C 08 03 A6 */ mtlr r0
/* 80310E88 0030DDE8 38 21 00 30 */ addi r1, r1, 0x30
/* 80310E8C 0030DDEC 4E 80 00 20 */ blr
.global __apl__13CNUQuaternionFRC13CNUQuaternion
__apl__13CNUQuaternionFRC13CNUQuaternion:
/* 80310E90 0030DDF0 C0 23 00 00 */ lfs f1, 0(r3)
/* 80310E94 0030DDF4 C0 04 00 00 */ lfs f0, 0(r4)
/* 80310E98 0030DDF8 EC 01 00 2A */ fadds f0, f1, f0
/* 80310E9C 0030DDFC D0 03 00 00 */ stfs f0, 0(r3)
/* 80310EA0 0030DE00 C0 23 00 04 */ lfs f1, 4(r3)
/* 80310EA4 0030DE04 C0 04 00 04 */ lfs f0, 4(r4)
/* 80310EA8 0030DE08 EC 01 00 2A */ fadds f0, f1, f0
/* 80310EAC 0030DE0C D0 03 00 04 */ stfs f0, 4(r3)
/* 80310EB0 0030DE10 C0 23 00 08 */ lfs f1, 8(r3)
/* 80310EB4 0030DE14 C0 04 00 08 */ lfs f0, 8(r4)
/* 80310EB8 0030DE18 EC 01 00 2A */ fadds f0, f1, f0
/* 80310EBC 0030DE1C D0 03 00 08 */ stfs f0, 8(r3)
/* 80310EC0 0030DE20 C0 23 00 0C */ lfs f1, 0xc(r3)
/* 80310EC4 0030DE24 C0 04 00 0C */ lfs f0, 0xc(r4)
/* 80310EC8 0030DE28 EC 01 00 2A */ fadds f0, f1, f0
/* 80310ECC 0030DE2C D0 03 00 0C */ stfs f0, 0xc(r3)
/* 80310ED0 0030DE30 4E 80 00 20 */ blr
.global __ml__13CNUQuaternionCFRC13CNUQuaternion
__ml__13CNUQuaternionCFRC13CNUQuaternion:
/* 80310ED4 0030DE34 94 21 FF 70 */ stwu r1, -0x90(r1)
/* 80310ED8 0030DE38 7C 08 02 A6 */ mflr r0
/* 80310EDC 0030DE3C 90 01 00 94 */ stw r0, 0x94(r1)
/* 80310EE0 0030DE40 DB E1 00 80 */ stfd f31, 0x80(r1)
/* 80310EE4 0030DE44 F3 E1 00 88 */ psq_st f31, 136(r1), 0, qr0
/* 80310EE8 0030DE48 DB C1 00 70 */ stfd f30, 0x70(r1)
/* 80310EEC 0030DE4C F3 C1 00 78 */ psq_st f30, 120(r1), 0, qr0
/* 80310EF0 0030DE50 DB A1 00 60 */ stfd f29, 0x60(r1)
/* 80310EF4 0030DE54 F3 A1 00 68 */ psq_st f29, 104(r1), 0, qr0
/* 80310EF8 0030DE58 DB 81 00 50 */ stfd f28, 0x50(r1)
/* 80310EFC 0030DE5C F3 81 00 58 */ psq_st f28, 88(r1), 0, qr0
/* 80310F00 0030DE60 C1 84 00 08 */ lfs f12, 8(r4)
/* 80310F04 0030DE64 C3 A5 00 08 */ lfs f29, 8(r5)
/* 80310F08 0030DE68 C3 E4 00 0C */ lfs f31, 0xc(r4)
/* 80310F0C 0030DE6C C1 65 00 00 */ lfs f11, 0(r5)
/* 80310F10 0030DE70 EC 0C 07 72 */ fmuls f0, f12, f29
/* 80310F14 0030DE74 C1 A4 00 04 */ lfs f13, 4(r4)
/* 80310F18 0030DE78 ED 3D 07 F2 */ fmuls f9, f29, f31
/* 80310F1C 0030DE7C C3 C5 00 04 */ lfs f30, 4(r5)
/* 80310F20 0030DE80 EC CB 03 32 */ fmuls f6, f11, f12
/* 80310F24 0030DE84 C1 44 00 00 */ lfs f10, 0(r4)
/* 80310F28 0030DE88 C3 85 00 0C */ lfs f28, 0xc(r5)
/* 80310F2C 0030DE8C EC FE 03 32 */ fmuls f7, f30, f12
/* 80310F30 0030DE90 EC 2A 07 72 */ fmuls f1, f10, f29
/* 80310F34 0030DE94 D0 C1 00 18 */ stfs f6, 0x18(r1)
/* 80310F38 0030DE98 ED 1C 03 72 */ fmuls f8, f28, f13
/* 80310F3C 0030DE9C 38 81 00 38 */ addi r4, r1, 0x38
/* 80310F40 0030DEA0 EC 6B 03 72 */ fmuls f3, f11, f13
/* 80310F44 0030DEA4 EC AA 07 B2 */ fmuls f5, f10, f30
/* 80310F48 0030DEA8 EC 4B 07 F2 */ fmuls f2, f11, f31
/* 80310F4C 0030DEAC D0 21 00 24 */ stfs f1, 0x24(r1)
/* 80310F50 0030DEB0 EC 8A 07 32 */ fmuls f4, f10, f28
/* 80310F54 0030DEB4 EC 0D 07 BA */ fmadds f0, f13, f30, f0
/* 80310F58 0030DEB8 D0 61 00 14 */ stfs f3, 0x14(r1)
/* 80310F5C 0030DEBC ED 2C 4F 38 */ fmsubs f9, f12, f28, f9
/* 80310F60 0030DEC0 EC 65 18 2A */ fadds f3, f5, f3
/* 80310F64 0030DEC4 D0 41 00 1C */ stfs f2, 0x1c(r1)
/* 80310F68 0030DEC8 ED 1F 47 B8 */ fmsubs f8, f31, f30, f8
/* 80310F6C 0030DECC ED 81 30 2A */ fadds f12, f1, f6
/* 80310F70 0030DED0 D1 21 00 08 */ stfs f9, 8(r1)
/* 80310F74 0030DED4 EC 2D 3F 78 */ fmsubs f1, f13, f29, f7
/* 80310F78 0030DED8 EC C4 10 2A */ fadds f6, f4, f2
/* 80310F7C 0030DEDC D1 01 00 0C */ stfs f8, 0xc(r1)
/* 80310F80 0030DEE0 EC 1F 07 3A */ fmadds f0, f31, f28, f0
/* 80310F84 0030DEE4 ED 0C 40 2A */ fadds f8, f12, f8
/* 80310F88 0030DEE8 D0 21 00 10 */ stfs f1, 0x10(r1)
/* 80310F8C 0030DEEC EC E6 08 2A */ fadds f7, f6, f1
/* 80310F90 0030DEF0 EC 43 48 2A */ fadds f2, f3, f9
/* 80310F94 0030DEF4 D0 A1 00 20 */ stfs f5, 0x20(r1)
/* 80310F98 0030DEF8 EC 2A 02 F8 */ fmsubs f1, f10, f11, f0
/* 80310F9C 0030DEFC D0 81 00 28 */ stfs f4, 0x28(r1)
/* 80310FA0 0030DF00 D0 61 00 2C */ stfs f3, 0x2c(r1)
/* 80310FA4 0030DF04 D1 81 00 30 */ stfs f12, 0x30(r1)
/* 80310FA8 0030DF08 D0 C1 00 34 */ stfs f6, 0x34(r1)
/* 80310FAC 0030DF0C D0 41 00 38 */ stfs f2, 0x38(r1)
/* 80310FB0 0030DF10 D1 01 00 3C */ stfs f8, 0x3c(r1)
/* 80310FB4 0030DF14 D0 E1 00 40 */ stfs f7, 0x40(r1)
/* 80310FB8 0030DF18 48 00 00 49 */ bl __ct__13CNUQuaternionFfRC9CVector3f
/* 80310FBC 0030DF1C E3 E1 00 88 */ psq_l f31, 136(r1), 0, qr0
/* 80310FC0 0030DF20 CB E1 00 80 */ lfd f31, 0x80(r1)
/* 80310FC4 0030DF24 E3 C1 00 78 */ psq_l f30, 120(r1), 0, qr0
/* 80310FC8 0030DF28 CB C1 00 70 */ lfd f30, 0x70(r1)
/* 80310FCC 0030DF2C E3 A1 00 68 */ psq_l f29, 104(r1), 0, qr0
/* 80310FD0 0030DF30 CB A1 00 60 */ lfd f29, 0x60(r1)
/* 80310FD4 0030DF34 E3 81 00 58 */ psq_l f28, 88(r1), 0, qr0
/* 80310FD8 0030DF38 80 01 00 94 */ lwz r0, 0x94(r1)
/* 80310FDC 0030DF3C CB 81 00 50 */ lfd f28, 0x50(r1)
/* 80310FE0 0030DF40 7C 08 03 A6 */ mtlr r0
/* 80310FE4 0030DF44 38 21 00 90 */ addi r1, r1, 0x90
/* 80310FE8 0030DF48 4E 80 00 20 */ blr
.global __ct__13CNUQuaternionFffff
__ct__13CNUQuaternionFffff:
/* 80310FEC 0030DF4C D0 23 00 00 */ stfs f1, 0(r3)
/* 80310FF0 0030DF50 D0 43 00 04 */ stfs f2, 4(r3)
/* 80310FF4 0030DF54 D0 63 00 08 */ stfs f3, 8(r3)
/* 80310FF8 0030DF58 D0 83 00 0C */ stfs f4, 0xc(r3)
/* 80310FFC 0030DF5C 4E 80 00 20 */ blr
.global __ct__13CNUQuaternionFfRC9CVector3f
__ct__13CNUQuaternionFfRC9CVector3f:
/* 80311000 0030DF60 D0 23 00 00 */ stfs f1, 0(r3)
/* 80311004 0030DF64 C0 04 00 00 */ lfs f0, 0(r4)
/* 80311008 0030DF68 D0 03 00 04 */ stfs f0, 4(r3)
/* 8031100C 0030DF6C C0 04 00 04 */ lfs f0, 4(r4)
/* 80311010 0030DF70 D0 03 00 08 */ stfs f0, 8(r3)
/* 80311014 0030DF74 C0 04 00 08 */ lfs f0, 8(r4)
/* 80311018 0030DF78 D0 03 00 0C */ stfs f0, 0xc(r3)
/* 8031101C 0030DF7C 4E 80 00 20 */ blr
.global ClampedRotateTo__11CQuaternionFRC10UnitVectorRC10UnitVectorRC9CRelAngle
ClampedRotateTo__11CQuaternionFRC10UnitVectorRC10UnitVectorRC9CRelAngle:
/* 80311020 0030DF80 94 21 FF A0 */ stwu r1, -0x60(r1)
/* 80311024 0030DF84 7C 08 02 A6 */ mflr r0
/* 80311028 0030DF88 90 01 00 64 */ stw r0, 0x64(r1)
/* 8031102C 0030DF8C DB E1 00 50 */ stfd f31, 0x50(r1)
/* 80311030 0030DF90 F3 E1 00 58 */ psq_st f31, 88(r1), 0, qr0
/* 80311034 0030DF94 93 E1 00 4C */ stw r31, 0x4c(r1)
/* 80311038 0030DF98 93 C1 00 48 */ stw r30, 0x48(r1)
/* 8031103C 0030DF9C 93 A1 00 44 */ stw r29, 0x44(r1)
/* 80311040 0030DFA0 7C 7D 1B 78 */ mr r29, r3
/* 80311044 0030DFA4 7C DE 33 78 */ mr r30, r6
/* 80311048 0030DFA8 38 61 00 14 */ addi r3, r1, 0x14
/* 8031104C 0030DFAC 48 00 0A 6D */ bl ShortestRotationArc__11CQuaternionFRC9CVector3fRC9CVector3f
/* 80311050 0030DFB0 C0 21 00 14 */ lfs f1, 0x14(r1)
/* 80311054 0030DFB4 3B E1 00 28 */ addi r31, r1, 0x28
/* 80311058 0030DFB8 C0 61 00 18 */ lfs f3, 0x18(r1)
/* 8031105C 0030DFBC C0 41 00 1C */ lfs f2, 0x1c(r1)
/* 80311060 0030DFC0 C0 01 00 20 */ lfs f0, 0x20(r1)
/* 80311064 0030DFC4 D0 21 00 24 */ stfs f1, 0x24(r1)
/* 80311068 0030DFC8 C3 FE 00 00 */ lfs f31, 0(r30)
/* 8031106C 0030DFCC D0 61 00 28 */ stfs f3, 0x28(r1)
/* 80311070 0030DFD0 D0 41 00 2C */ stfs f2, 0x2c(r1)
/* 80311074 0030DFD4 D0 01 00 30 */ stfs f0, 0x30(r1)
/* 80311078 0030DFD8 48 08 3B B5 */ bl acos
/* 8031107C 0030DFDC FC 20 08 18 */ frsp f1, f1
/* 80311080 0030DFE0 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 80311084 0030DFE4 EC 00 00 72 */ fmuls f0, f0, f1
/* 80311088 0030DFE8 FC 1F 00 40 */ fcmpo cr0, f31, f0
/* 8031108C 0030DFEC 4C 41 13 82 */ cror 2, 1, 2
/* 80311090 0030DFF0 40 82 00 28 */ bne lbl_803110B8
/* 80311094 0030DFF4 C0 01 00 24 */ lfs f0, 0x24(r1)
/* 80311098 0030DFF8 D0 1D 00 00 */ stfs f0, 0(r29)
/* 8031109C 0030DFFC C0 01 00 28 */ lfs f0, 0x28(r1)
/* 803110A0 0030E000 D0 1D 00 04 */ stfs f0, 4(r29)
/* 803110A4 0030E004 C0 01 00 2C */ lfs f0, 0x2c(r1)
/* 803110A8 0030E008 D0 1D 00 08 */ stfs f0, 8(r29)
/* 803110AC 0030E00C C0 01 00 30 */ lfs f0, 0x30(r1)
/* 803110B0 0030E010 D0 1D 00 0C */ stfs f0, 0xc(r29)
/* 803110B4 0030E014 48 00 00 20 */ b lbl_803110D4
lbl_803110B8:
/* 803110B8 0030E018 7F E4 FB 78 */ mr r4, r31
/* 803110BC 0030E01C 38 61 00 08 */ addi r3, r1, 8
/* 803110C0 0030E020 48 00 2D 11 */ bl __ct__13CUnitVector3fFRC9CVector3f
/* 803110C4 0030E024 7C 64 1B 78 */ mr r4, r3
/* 803110C8 0030E028 7F A3 EB 78 */ mr r3, r29
/* 803110CC 0030E02C 7F C5 F3 78 */ mr r5, r30
/* 803110D0 0030E030 48 00 02 25 */ bl AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
lbl_803110D4:
/* 803110D4 0030E034 E3 E1 00 58 */ psq_l f31, 88(r1), 0, qr0
/* 803110D8 0030E038 80 01 00 64 */ lwz r0, 0x64(r1)
/* 803110DC 0030E03C CB E1 00 50 */ lfd f31, 0x50(r1)
/* 803110E0 0030E040 83 E1 00 4C */ lwz r31, 0x4c(r1)
/* 803110E4 0030E044 83 C1 00 48 */ lwz r30, 0x48(r1)
/* 803110E8 0030E048 83 A1 00 44 */ lwz r29, 0x44(r1)
/* 803110EC 0030E04C 7C 08 03 A6 */ mtlr r0
/* 803110F0 0030E050 38 21 00 60 */ addi r1, r1, 0x60
/* 803110F4 0030E054 4E 80 00 20 */ blr
.global ZRotation__11CQuaternionFRC9CRelAngle
ZRotation__11CQuaternionFRC9CRelAngle:
/* 803110F8 0030E058 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803110FC 0030E05C 7C 08 02 A6 */ mflr r0
/* 80311100 0030E060 3C C0 80 4C */ lis r6, ZAxis@ha
/* 80311104 0030E064 7C 85 23 78 */ mr r5, r4
/* 80311108 0030E068 90 01 00 14 */ stw r0, 0x14(r1)
/* 8031110C 0030E06C 38 86 FD 48 */ addi r4, r6, ZAxis@l
/* 80311110 0030E070 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80311114 0030E074 7C 7F 1B 78 */ mr r31, r3
/* 80311118 0030E078 48 00 01 DD */ bl AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
/* 8031111C 0030E07C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80311120 0030E080 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80311124 0030E084 7C 08 03 A6 */ mtlr r0
/* 80311128 0030E088 38 21 00 10 */ addi r1, r1, 0x10
/* 8031112C 0030E08C 4E 80 00 20 */ blr
.global YRotation__11CQuaternionFRC9CRelAngle
YRotation__11CQuaternionFRC9CRelAngle:
/* 80311130 0030E090 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80311134 0030E094 7C 08 02 A6 */ mflr r0
/* 80311138 0030E098 3C C0 80 4C */ lis r6, YAxis@ha
/* 8031113C 0030E09C 7C 85 23 78 */ mr r5, r4
/* 80311140 0030E0A0 90 01 00 14 */ stw r0, 0x14(r1)
/* 80311144 0030E0A4 38 86 FD 3C */ addi r4, r6, YAxis@l
/* 80311148 0030E0A8 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8031114C 0030E0AC 7C 7F 1B 78 */ mr r31, r3
/* 80311150 0030E0B0 48 00 01 A5 */ bl AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
/* 80311154 0030E0B4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80311158 0030E0B8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8031115C 0030E0BC 7C 08 03 A6 */ mtlr r0
/* 80311160 0030E0C0 38 21 00 10 */ addi r1, r1, 0x10
/* 80311164 0030E0C4 4E 80 00 20 */ blr
.global XRotation__11CQuaternionFRC9CRelAngle
XRotation__11CQuaternionFRC9CRelAngle:
/* 80311168 0030E0C8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8031116C 0030E0CC 7C 08 02 A6 */ mflr r0
/* 80311170 0030E0D0 3C C0 80 4C */ lis r6, XAxis@ha
/* 80311174 0030E0D4 7C 85 23 78 */ mr r5, r4
/* 80311178 0030E0D8 90 01 00 14 */ stw r0, 0x14(r1)
/* 8031117C 0030E0DC 38 86 FD 30 */ addi r4, r6, XAxis@l
/* 80311180 0030E0E0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80311184 0030E0E4 7C 7F 1B 78 */ mr r31, r3
/* 80311188 0030E0E8 48 00 01 6D */ bl AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
/* 8031118C 0030E0EC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80311190 0030E0F0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80311194 0030E0F4 7C 08 03 A6 */ mtlr r0
/* 80311198 0030E0F8 38 21 00 10 */ addi r1, r1, 0x10
/* 8031119C 0030E0FC 4E 80 00 20 */ blr
.global __ml__11CQuaternionCFRC11CQuaternion
__ml__11CQuaternionCFRC11CQuaternion:
/* 803111A0 0030E100 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 803111A4 0030E104 DB E1 00 30 */ stfd f31, 0x30(r1)
/* 803111A8 0030E108 F3 E1 00 38 */ psq_st f31, 56(r1), 0, qr0
/* 803111AC 0030E10C DB C1 00 20 */ stfd f30, 0x20(r1)
/* 803111B0 0030E110 F3 C1 00 28 */ psq_st f30, 40(r1), 0, qr0
/* 803111B4 0030E114 DB A1 00 10 */ stfd f29, 0x10(r1)
/* 803111B8 0030E118 F3 A1 00 18 */ psq_st f29, 24(r1), 0, qr0
/* 803111BC 0030E11C C1 84 00 08 */ lfs f12, 8(r4)
/* 803111C0 0030E120 C3 C5 00 08 */ lfs f30, 8(r5)
/* 803111C4 0030E124 C3 E5 00 04 */ lfs f31, 4(r5)
/* 803111C8 0030E128 EC 2C 07 B2 */ fmuls f1, f12, f30
/* 803111CC 0030E12C C1 64 00 04 */ lfs f11, 4(r4)
/* 803111D0 0030E130 C1 24 00 00 */ lfs f9, 0(r4)
/* 803111D4 0030E134 EC 1F 03 32 */ fmuls f0, f31, f12
/* 803111D8 0030E138 C1 45 00 00 */ lfs f10, 0(r5)
/* 803111DC 0030E13C C1 A4 00 0C */ lfs f13, 0xc(r4)
/* 803111E0 0030E140 C3 A5 00 0C */ lfs f29, 0xc(r5)
/* 803111E4 0030E144 EC 4B 0F FA */ fmadds f2, f11, f31, f1
/* 803111E8 0030E148 EC 3E 03 72 */ fmuls f1, f30, f13
/* 803111EC 0030E14C EC 7D 02 F2 */ fmuls f3, f29, f11
/* 803111F0 0030E150 EC 8D 17 7A */ fmadds f4, f13, f29, f2
/* 803111F4 0030E154 EC C9 07 F2 */ fmuls f6, f9, f31
/* 803111F8 0030E158 EC 4A 02 F2 */ fmuls f2, f10, f11
/* 803111FC 0030E15C ED 09 22 B8 */ fmsubs f8, f9, f10, f4
/* 80311200 0030E160 EC A9 07 B2 */ fmuls f5, f9, f30
/* 80311204 0030E164 EC 8A 03 32 */ fmuls f4, f10, f12
/* 80311208 0030E168 EC E6 10 2A */ fadds f7, f6, f2
/* 8031120C 0030E16C D1 03 00 00 */ stfs f8, 0(r3)
/* 80311210 0030E170 EC CC 0F 78 */ fmsubs f6, f12, f29, f1
/* 80311214 0030E174 EC 49 07 72 */ fmuls f2, f9, f29
/* 80311218 0030E178 EC 2A 03 72 */ fmuls f1, f10, f13
/* 8031121C 0030E17C EC C7 30 2A */ fadds f6, f7, f6
/* 80311220 0030E180 EC 85 20 2A */ fadds f4, f5, f4
/* 80311224 0030E184 EC 6D 1F F8 */ fmsubs f3, f13, f31, f3
/* 80311228 0030E188 EC 22 08 2A */ fadds f1, f2, f1
/* 8031122C 0030E18C D0 C3 00 04 */ stfs f6, 4(r3)
/* 80311230 0030E190 EC 0B 07 B8 */ fmsubs f0, f11, f30, f0
/* 80311234 0030E194 EC 44 18 2A */ fadds f2, f4, f3
/* 80311238 0030E198 EC 01 00 2A */ fadds f0, f1, f0
/* 8031123C 0030E19C D0 43 00 08 */ stfs f2, 8(r3)
/* 80311240 0030E1A0 D0 03 00 0C */ stfs f0, 0xc(r3)
/* 80311244 0030E1A4 E3 E1 00 38 */ psq_l f31, 56(r1), 0, qr0
/* 80311248 0030E1A8 CB E1 00 30 */ lfd f31, 0x30(r1)
/* 8031124C 0030E1AC E3 C1 00 28 */ psq_l f30, 40(r1), 0, qr0
/* 80311250 0030E1B0 CB C1 00 20 */ lfd f30, 0x20(r1)
/* 80311254 0030E1B4 E3 A1 00 18 */ psq_l f29, 24(r1), 0, qr0
/* 80311258 0030E1B8 CB A1 00 10 */ lfd f29, 0x10(r1)
/* 8031125C 0030E1BC 38 21 00 40 */ addi r1, r1, 0x40
/* 80311260 0030E1C0 4E 80 00 20 */ blr
.global Transform__11CQuaternionCFRC9CVector3f
Transform__11CQuaternionCFRC9CVector3f:
/* 80311264 0030E1C4 C0 C4 00 08 */ lfs f6, 8(r4)
/* 80311268 0030E1C8 C0 85 00 04 */ lfs f4, 4(r5)
/* 8031126C 0030E1CC C1 04 00 04 */ lfs f8, 4(r4)
/* 80311270 0030E1D0 EC 06 01 32 */ fmuls f0, f6, f4
/* 80311274 0030E1D4 C0 E5 00 00 */ lfs f7, 0(r5)
/* 80311278 0030E1D8 C1 24 00 0C */ lfs f9, 0xc(r4)
/* 8031127C 0030E1DC EC 48 01 32 */ fmuls f2, f8, f4
/* 80311280 0030E1E0 C0 A5 00 08 */ lfs f5, 8(r5)
/* 80311284 0030E1E4 EC 68 01 FA */ fmadds f3, f8, f7, f0
/* 80311288 0030E1E8 C1 44 00 00 */ lfs f10, 0(r4)
/* 8031128C 0030E1EC EC 06 01 72 */ fmuls f0, f6, f5
/* 80311290 0030E1F0 EC 29 01 F2 */ fmuls f1, f9, f7
/* 80311294 0030E1F4 EC 69 19 7A */ fmadds f3, f9, f5, f3
/* 80311298 0030E1F8 EC 0A 01 FA */ fmadds f0, f10, f7, f0
/* 8031129C 0030E1FC EC 2A 09 3A */ fmadds f1, f10, f4, f1
/* 803112A0 0030E200 FD 60 18 50 */ fneg f11, f3
/* 803112A4 0030E204 EC 6A 11 7A */ fmadds f3, f10, f5, f2
/* 803112A8 0030E208 EC 84 02 7C */ fnmsubs f4, f4, f9, f0
/* 803112AC 0030E20C EC 0B 02 32 */ fmuls f0, f11, f8
/* 803112B0 0030E210 EC A5 0A 3C */ fnmsubs f5, f5, f8, f1
/* 803112B4 0030E214 EC 2B 01 B2 */ fmuls f1, f11, f6
/* 803112B8 0030E218 EC 4A 01 38 */ fmsubs f2, f10, f4, f0
/* 803112BC 0030E21C EC 67 19 BC */ fnmsubs f3, f7, f6, f3
/* 803112C0 0030E220 EC 0B 02 72 */ fmuls f0, f11, f9
/* 803112C4 0030E224 EC 2A 09 78 */ fmsubs f1, f10, f5, f1
/* 803112C8 0030E228 EC 45 12 7C */ fnmsubs f2, f5, f9, f2
/* 803112CC 0030E22C EC 0A 00 F8 */ fmsubs f0, f10, f3, f0
/* 803112D0 0030E230 EC 23 0A 3C */ fnmsubs f1, f3, f8, f1
/* 803112D4 0030E234 EC 46 10 FA */ fmadds f2, f6, f3, f2
/* 803112D8 0030E238 EC 04 01 BC */ fnmsubs f0, f4, f6, f0
/* 803112DC 0030E23C EC 29 09 3A */ fmadds f1, f9, f4, f1
/* 803112E0 0030E240 D0 43 00 00 */ stfs f2, 0(r3)
/* 803112E4 0030E244 EC 08 01 7A */ fmadds f0, f8, f5, f0
/* 803112E8 0030E248 D0 23 00 04 */ stfs f1, 4(r3)
/* 803112EC 0030E24C D0 03 00 08 */ stfs f0, 8(r3)
/* 803112F0 0030E250 4E 80 00 20 */ blr
.global AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle:
/* 803112F4 0030E254 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 803112F8 0030E258 7C 08 02 A6 */ mflr r0
/* 803112FC 0030E25C 90 01 00 34 */ stw r0, 0x34(r1)
/* 80311300 0030E260 DB E1 00 20 */ stfd f31, 0x20(r1)
/* 80311304 0030E264 F3 E1 00 28 */ psq_st f31, 40(r1), 0, qr0
/* 80311308 0030E268 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8031130C 0030E26C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80311310 0030E270 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80311314 0030E274 7C BF 2B 78 */ mr r31, r5
/* 80311318 0030E278 C0 02 C8 7C */ lfs f0, lbl_805AE59C@sda21(r2)
/* 8031131C 0030E27C C0 25 00 00 */ lfs f1, 0(r5)
/* 80311320 0030E280 7C 7D 1B 78 */ mr r29, r3
/* 80311324 0030E284 7C 9E 23 78 */ mr r30, r4
/* 80311328 0030E288 EC 21 00 32 */ fmuls f1, f1, f0
/* 8031132C 0030E28C 48 08 30 C5 */ bl cos
/* 80311330 0030E290 C0 5F 00 00 */ lfs f2, 0(r31)
/* 80311334 0030E294 FF E0 08 90 */ fmr f31, f1
/* 80311338 0030E298 C0 02 C8 7C */ lfs f0, lbl_805AE59C@sda21(r2)
/* 8031133C 0030E29C EC 42 00 32 */ fmuls f2, f2, f0
/* 80311340 0030E2A0 FC 20 10 90 */ fmr f1, f2
/* 80311344 0030E2A4 48 08 37 99 */ bl sin
/* 80311348 0030E2A8 FC 80 08 18 */ frsp f4, f1
/* 8031134C 0030E2AC C0 7E 00 00 */ lfs f3, 0(r30)
/* 80311350 0030E2B0 FC 00 F8 18 */ frsp f0, f31
/* 80311354 0030E2B4 C0 5E 00 04 */ lfs f2, 4(r30)
/* 80311358 0030E2B8 C0 3E 00 08 */ lfs f1, 8(r30)
/* 8031135C 0030E2BC EC 64 00 F2 */ fmuls f3, f4, f3
/* 80311360 0030E2C0 D0 1D 00 00 */ stfs f0, 0(r29)
/* 80311364 0030E2C4 EC 44 00 B2 */ fmuls f2, f4, f2
/* 80311368 0030E2C8 EC 04 00 72 */ fmuls f0, f4, f1
/* 8031136C 0030E2CC D0 7D 00 04 */ stfs f3, 4(r29)
/* 80311370 0030E2D0 D0 5D 00 08 */ stfs f2, 8(r29)
/* 80311374 0030E2D4 D0 1D 00 0C */ stfs f0, 0xc(r29)
/* 80311378 0030E2D8 E3 E1 00 28 */ psq_l f31, 40(r1), 0, qr0
/* 8031137C 0030E2DC 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80311380 0030E2E0 CB E1 00 20 */ lfd f31, 0x20(r1)
/* 80311384 0030E2E4 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80311388 0030E2E8 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8031138C 0030E2EC 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80311390 0030E2F0 7C 08 03 A6 */ mtlr r0
/* 80311394 0030E2F4 38 21 00 30 */ addi r1, r1, 0x30
/* 80311398 0030E2F8 4E 80 00 20 */ blr
.global BuildNormalized__11CQuaternionCFv
BuildNormalized__11CQuaternionCFv:
/* 8031139C 0030E2FC 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 803113A0 0030E300 7C 08 02 A6 */ mflr r0
/* 803113A4 0030E304 90 01 00 14 */ stw r0, 0x14(r1)
/* 803113A8 0030E308 93 E1 00 0C */ stw r31, 0xc(r1)
/* 803113AC 0030E30C 7C 9F 23 78 */ mr r31, r4
/* 803113B0 0030E310 93 C1 00 08 */ stw r30, 8(r1)
/* 803113B4 0030E314 7C 7E 1B 78 */ mr r30, r3
/* 803113B8 0030E318 C0 24 00 04 */ lfs f1, 4(r4)
/* 803113BC 0030E31C C0 04 00 08 */ lfs f0, 8(r4)
/* 803113C0 0030E320 EC 21 00 72 */ fmuls f1, f1, f1
/* 803113C4 0030E324 C0 44 00 0C */ lfs f2, 0xc(r4)
/* 803113C8 0030E328 EC 00 00 32 */ fmuls f0, f0, f0
/* 803113CC 0030E32C C0 64 00 00 */ lfs f3, 0(r4)
/* 803113D0 0030E330 EC 42 00 B2 */ fmuls f2, f2, f2
/* 803113D4 0030E334 EC 63 00 F2 */ fmuls f3, f3, f3
/* 803113D8 0030E338 EC 01 00 2A */ fadds f0, f1, f0
/* 803113DC 0030E33C EC 02 00 2A */ fadds f0, f2, f0
/* 803113E0 0030E340 EC 23 00 2A */ fadds f1, f3, f0
/* 803113E4 0030E344 48 00 3F F5 */ bl InvSqrtF__5CMathFf
/* 803113E8 0030E348 C0 1F 00 00 */ lfs f0, 0(r31)
/* 803113EC 0030E34C C0 9F 00 04 */ lfs f4, 4(r31)
/* 803113F0 0030E350 EC 01 00 32 */ fmuls f0, f1, f0
/* 803113F4 0030E354 C0 7F 00 08 */ lfs f3, 8(r31)
/* 803113F8 0030E358 C0 5F 00 0C */ lfs f2, 0xc(r31)
/* 803113FC 0030E35C EC 81 01 32 */ fmuls f4, f1, f4
/* 80311400 0030E360 EC 61 00 F2 */ fmuls f3, f1, f3
/* 80311404 0030E364 D0 1E 00 00 */ stfs f0, 0(r30)
/* 80311408 0030E368 EC 01 00 B2 */ fmuls f0, f1, f2
/* 8031140C 0030E36C D0 9E 00 04 */ stfs f4, 4(r30)
/* 80311410 0030E370 D0 7E 00 08 */ stfs f3, 8(r30)
/* 80311414 0030E374 D0 1E 00 0C */ stfs f0, 0xc(r30)
/* 80311418 0030E378 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8031141C 0030E37C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80311420 0030E380 83 C1 00 08 */ lwz r30, 8(r1)
/* 80311424 0030E384 7C 08 03 A6 */ mtlr r0
/* 80311428 0030E388 38 21 00 10 */ addi r1, r1, 0x10
/* 8031142C 0030E38C 4E 80 00 20 */ blr
.global BuildEquivalent__11CQuaternionCFv
BuildEquivalent__11CQuaternionCFv:
/* 80311430 0030E390 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80311434 0030E394 7C 08 02 A6 */ mflr r0
/* 80311438 0030E398 90 01 00 44 */ stw r0, 0x44(r1)
/* 8031143C 0030E39C DB E1 00 30 */ stfd f31, 0x30(r1)
/* 80311440 0030E3A0 F3 E1 00 38 */ psq_st f31, 56(r1), 0, qr0
/* 80311444 0030E3A4 93 E1 00 2C */ stw r31, 0x2c(r1)
/* 80311448 0030E3A8 93 C1 00 28 */ stw r30, 0x28(r1)
/* 8031144C 0030E3AC 7C 9F 23 78 */ mr r31, r4
/* 80311450 0030E3B0 C0 0D 9C A0 */ lfs f0, lbl_805A8860@sda21(r13)
/* 80311454 0030E3B4 C0 24 00 00 */ lfs f1, 0(r4)
/* 80311458 0030E3B8 7C 7E 1B 78 */ mr r30, r3
/* 8031145C 0030E3BC FC 00 08 40 */ fcmpo cr0, f0, f1
/* 80311460 0030E3C0 D0 21 00 0C */ stfs f1, 0xc(r1)
/* 80311464 0030E3C4 40 80 00 0C */ bge lbl_80311470
/* 80311468 0030E3C8 38 6D 9C A0 */ addi r3, r13, lbl_805A8860@sda21
/* 8031146C 0030E3CC 48 00 00 08 */ b lbl_80311474
lbl_80311470:
/* 80311470 0030E3D0 38 61 00 0C */ addi r3, r1, 0xc
lbl_80311474:
/* 80311474 0030E3D4 C0 23 00 00 */ lfs f1, 0(r3)
/* 80311478 0030E3D8 C0 0D 9C A4 */ lfs f0, lbl_805A8864@sda21(r13)
/* 8031147C 0030E3DC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80311480 0030E3E0 40 80 00 08 */ bge lbl_80311488
/* 80311484 0030E3E4 38 6D 9C A4 */ addi r3, r13, lbl_805A8864@sda21
lbl_80311488:
/* 80311488 0030E3E8 C0 23 00 00 */ lfs f1, 0(r3)
/* 8031148C 0030E3EC 48 08 37 A1 */ bl acos
/* 80311490 0030E3F0 C8 02 C8 80 */ lfd f0, lbl_805AE5A0@sda21(r2)
/* 80311494 0030E3F4 C8 42 C8 90 */ lfd f2, lbl_805AE5B0@sda21(r2)
/* 80311498 0030E3F8 FC 80 00 72 */ fmul f4, f0, f1
/* 8031149C 0030E3FC C8 62 C8 88 */ lfd f3, lbl_805AE5A8@sda21(r2)
/* 803114A0 0030E400 C8 02 C8 98 */ lfd f0, lbl_805AE5B8@sda21(r2)
/* 803114A4 0030E404 FC 24 10 28 */ fsub f1, f4, f2
/* 803114A8 0030E408 FF E3 20 2A */ fadd f31, f3, f4
/* 803114AC 0030E40C FC 20 0A 10 */ fabs f1, f1
/* 803114B0 0030E410 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 803114B4 0030E414 40 80 00 2C */ bge lbl_803114E0
/* 803114B8 0030E418 C0 02 C8 A0 */ lfs f0, lbl_805AE5C0@sda21(r2)
/* 803114BC 0030E41C 3C 60 80 5A */ lis r3, sZeroVector__9CVector3f@ha
/* 803114C0 0030E420 D0 1E 00 00 */ stfs f0, 0(r30)
/* 803114C4 0030E424 C4 03 66 A0 */ lfsu f0, sZeroVector__9CVector3f@l(r3)
/* 803114C8 0030E428 D0 1E 00 04 */ stfs f0, 4(r30)
/* 803114CC 0030E42C C0 03 00 04 */ lfs f0, 4(r3)
/* 803114D0 0030E430 D0 1E 00 08 */ stfs f0, 8(r30)
/* 803114D4 0030E434 C0 03 00 08 */ lfs f0, 8(r3)
/* 803114D8 0030E438 D0 1E 00 0C */ stfs f0, 0xc(r30)
/* 803114DC 0030E43C 48 00 00 28 */ b lbl_80311504
lbl_803114E0:
/* 803114E0 0030E440 38 61 00 10 */ addi r3, r1, 0x10
/* 803114E4 0030E444 38 9F 00 04 */ addi r4, r31, 4
/* 803114E8 0030E448 48 00 28 E9 */ bl __ct__13CUnitVector3fFRC9CVector3f
/* 803114EC 0030E44C FC 00 F8 18 */ frsp f0, f31
/* 803114F0 0030E450 7F C3 F3 78 */ mr r3, r30
/* 803114F4 0030E454 38 81 00 10 */ addi r4, r1, 0x10
/* 803114F8 0030E458 38 A1 00 08 */ addi r5, r1, 8
/* 803114FC 0030E45C D0 01 00 08 */ stfs f0, 8(r1)
/* 80311500 0030E460 4B FF FD F5 */ bl AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
lbl_80311504:
/* 80311504 0030E464 E3 E1 00 38 */ psq_l f31, 56(r1), 0, qr0
/* 80311508 0030E468 80 01 00 44 */ lwz r0, 0x44(r1)
/* 8031150C 0030E46C CB E1 00 30 */ lfd f31, 0x30(r1)
/* 80311510 0030E470 83 E1 00 2C */ lwz r31, 0x2c(r1)
/* 80311514 0030E474 83 C1 00 28 */ lwz r30, 0x28(r1)
/* 80311518 0030E478 7C 08 03 A6 */ mtlr r0
/* 8031151C 0030E47C 38 21 00 40 */ addi r1, r1, 0x40
/* 80311520 0030E480 4E 80 00 20 */ blr
.global AngleFrom__11CQuaternionCFRC11CQuaternion
AngleFrom__11CQuaternionCFRC11CQuaternion:
/* 80311524 0030E484 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80311528 0030E488 7C 08 02 A6 */ mflr r0
/* 8031152C 0030E48C 90 01 00 24 */ stw r0, 0x24(r1)
/* 80311530 0030E490 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80311534 0030E494 7C 7F 1B 78 */ mr r31, r3
/* 80311538 0030E498 C0 24 00 08 */ lfs f1, 8(r4)
/* 8031153C 0030E49C C0 05 00 08 */ lfs f0, 8(r5)
/* 80311540 0030E4A0 C0 44 00 04 */ lfs f2, 4(r4)
/* 80311544 0030E4A4 EC 01 00 32 */ fmuls f0, f1, f0
/* 80311548 0030E4A8 C0 25 00 04 */ lfs f1, 4(r5)
/* 8031154C 0030E4AC C0 84 00 0C */ lfs f4, 0xc(r4)
/* 80311550 0030E4B0 C0 65 00 0C */ lfs f3, 0xc(r5)
/* 80311554 0030E4B4 EC 22 00 7A */ fmadds f1, f2, f1, f0
/* 80311558 0030E4B8 C0 A4 00 00 */ lfs f5, 0(r4)
/* 8031155C 0030E4BC C0 45 00 00 */ lfs f2, 0(r5)
/* 80311560 0030E4C0 C0 0D 9C 98 */ lfs f0, lbl_805A8858@sda21(r13)
/* 80311564 0030E4C4 EC 24 08 FA */ fmadds f1, f4, f3, f1
/* 80311568 0030E4C8 EC 25 08 BA */ fmadds f1, f5, f2, f1
/* 8031156C 0030E4CC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80311570 0030E4D0 D0 21 00 08 */ stfs f1, 8(r1)
/* 80311574 0030E4D4 40 80 00 0C */ bge lbl_80311580
/* 80311578 0030E4D8 38 6D 9C 98 */ addi r3, r13, lbl_805A8858@sda21
/* 8031157C 0030E4DC 48 00 00 08 */ b lbl_80311584
lbl_80311580:
/* 80311580 0030E4E0 38 61 00 08 */ addi r3, r1, 8
lbl_80311584:
/* 80311584 0030E4E4 C0 2D 9C 9C */ lfs f1, lbl_805A885C@sda21(r13)
/* 80311588 0030E4E8 C0 03 00 00 */ lfs f0, 0(r3)
/* 8031158C 0030E4EC FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80311590 0030E4F0 40 80 00 08 */ bge lbl_80311598
/* 80311594 0030E4F4 38 6D 9C 9C */ addi r3, r13, lbl_805A885C@sda21
lbl_80311598:
/* 80311598 0030E4F8 C0 23 00 00 */ lfs f1, 0(r3)
/* 8031159C 0030E4FC 48 00 3D F5 */ bl ArcCosineR__5CMathFf
/* 803115A0 0030E500 D0 3F 00 00 */ stfs f1, 0(r31)
/* 803115A4 0030E504 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803115A8 0030E508 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803115AC 0030E50C 7C 08 03 A6 */ mtlr r0
/* 803115B0 0030E510 38 21 00 20 */ addi r1, r1, 0x20
/* 803115B4 0030E514 4E 80 00 20 */ blr
.global SlerpLocal__11CQuaternionFRC11CQuaternionRC11CQuaternionf
SlerpLocal__11CQuaternionFRC11CQuaternionRC11CQuaternionf:
/* 803115B8 0030E518 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 803115BC 0030E51C 7C 08 02 A6 */ mflr r0
/* 803115C0 0030E520 90 01 00 54 */ stw r0, 0x54(r1)
/* 803115C4 0030E524 DB E1 00 40 */ stfd f31, 0x40(r1)
/* 803115C8 0030E528 F3 E1 00 48 */ psq_st f31, 72(r1), 0, qr0
/* 803115CC 0030E52C 93 E1 00 3C */ stw r31, 0x3c(r1)
/* 803115D0 0030E530 93 C1 00 38 */ stw r30, 0x38(r1)
/* 803115D4 0030E534 C0 44 00 08 */ lfs f2, 8(r4)
/* 803115D8 0030E538 FF E0 08 90 */ fmr f31, f1
/* 803115DC 0030E53C C0 05 00 08 */ lfs f0, 8(r5)
/* 803115E0 0030E540 7C 9F 23 78 */ mr r31, r4
/* 803115E4 0030E544 C0 64 00 04 */ lfs f3, 4(r4)
/* 803115E8 0030E548 7C 7E 1B 78 */ mr r30, r3
/* 803115EC 0030E54C EC 02 00 32 */ fmuls f0, f2, f0
/* 803115F0 0030E550 C0 45 00 04 */ lfs f2, 4(r5)
/* 803115F4 0030E554 C0 A4 00 0C */ lfs f5, 0xc(r4)
/* 803115F8 0030E558 EC 43 00 BA */ fmadds f2, f3, f2, f0
/* 803115FC 0030E55C C0 85 00 0C */ lfs f4, 0xc(r5)
/* 80311600 0030E560 C0 C4 00 00 */ lfs f6, 0(r4)
/* 80311604 0030E564 C0 65 00 00 */ lfs f3, 0(r5)
/* 80311608 0030E568 EC 45 11 3A */ fmadds f2, f5, f4, f2
/* 8031160C 0030E56C C0 02 C8 78 */ lfs f0, lbl_805AE598@sda21(r2)
/* 80311610 0030E570 EC 46 10 FA */ fmadds f2, f6, f3, f2
/* 80311614 0030E574 FC 02 00 40 */ fcmpo cr0, f2, f0
/* 80311618 0030E578 4C 41 13 82 */ cror 2, 1, 2
/* 8031161C 0030E57C 40 82 00 14 */ bne lbl_80311630
/* 80311620 0030E580 38 61 00 28 */ addi r3, r1, 0x28
/* 80311624 0030E584 48 00 06 D5 */ bl Slerp__11CQuaternionFRC11CQuaternionRC11CQuaternionf
/* 80311628 0030E588 38 61 00 28 */ addi r3, r1, 0x28
/* 8031162C 0030E58C 48 00 00 28 */ b lbl_80311654
lbl_80311630:
/* 80311630 0030E590 7C A4 2B 78 */ mr r4, r5
/* 80311634 0030E594 38 61 00 18 */ addi r3, r1, 0x18
/* 80311638 0030E598 4B FF FD F9 */ bl BuildEquivalent__11CQuaternionCFv
/* 8031163C 0030E59C FC 20 F8 90 */ fmr f1, f31
/* 80311640 0030E5A0 7F E4 FB 78 */ mr r4, r31
/* 80311644 0030E5A4 38 61 00 08 */ addi r3, r1, 8
/* 80311648 0030E5A8 38 A1 00 18 */ addi r5, r1, 0x18
/* 8031164C 0030E5AC 48 00 06 AD */ bl Slerp__11CQuaternionFRC11CQuaternionRC11CQuaternionf
/* 80311650 0030E5B0 38 61 00 08 */ addi r3, r1, 8
lbl_80311654:
/* 80311654 0030E5B4 C0 03 00 00 */ lfs f0, 0(r3)
/* 80311658 0030E5B8 D0 1E 00 00 */ stfs f0, 0(r30)
/* 8031165C 0030E5BC C0 03 00 04 */ lfs f0, 4(r3)
/* 80311660 0030E5C0 D0 1E 00 04 */ stfs f0, 4(r30)
/* 80311664 0030E5C4 C0 03 00 08 */ lfs f0, 8(r3)
/* 80311668 0030E5C8 D0 1E 00 08 */ stfs f0, 8(r30)
/* 8031166C 0030E5CC C0 03 00 0C */ lfs f0, 0xc(r3)
/* 80311670 0030E5D0 D0 1E 00 0C */ stfs f0, 0xc(r30)
/* 80311674 0030E5D4 E3 E1 00 48 */ psq_l f31, 72(r1), 0, qr0
/* 80311678 0030E5D8 80 01 00 54 */ lwz r0, 0x54(r1)
/* 8031167C 0030E5DC CB E1 00 40 */ lfd f31, 0x40(r1)
/* 80311680 0030E5E0 83 E1 00 3C */ lwz r31, 0x3c(r1)
/* 80311684 0030E5E4 83 C1 00 38 */ lwz r30, 0x38(r1)
/* 80311688 0030E5E8 7C 08 03 A6 */ mtlr r0
/* 8031168C 0030E5EC 38 21 00 50 */ addi r1, r1, 0x50
/* 80311690 0030E5F0 4E 80 00 20 */ blr
.global LookAt__11CQuaternionFRC13CUnitVector3fRC13CUnitVector3fRC9CRelAngle
LookAt__11CQuaternionFRC13CUnitVector3fRC13CUnitVector3fRC9CRelAngle:
/* 80311694 0030E5F4 94 21 FE D0 */ stwu r1, -0x130(r1)
/* 80311698 0030E5F8 7C 08 02 A6 */ mflr r0
/* 8031169C 0030E5FC 90 01 01 34 */ stw r0, 0x134(r1)
/* 803116A0 0030E600 DB E1 01 20 */ stfd f31, 0x120(r1)
/* 803116A4 0030E604 F3 E1 01 28 */ psq_st f31, 296(r1), 0, qr0
/* 803116A8 0030E608 DB C1 01 10 */ stfd f30, 0x110(r1)
/* 803116AC 0030E60C F3 C1 01 18 */ psq_st f30, 280(r1), 0, qr0
/* 803116B0 0030E610 DB A1 01 00 */ stfd f29, 0x100(r1)
/* 803116B4 0030E614 F3 A1 01 08 */ psq_st f29, 264(r1), 0, qr0
/* 803116B8 0030E618 DB 81 00 F0 */ stfd f28, 0xf0(r1)
/* 803116BC 0030E61C F3 81 00 F8 */ psq_st f28, 248(r1), 0, qr0
/* 803116C0 0030E620 93 E1 00 EC */ stw r31, 0xec(r1)
/* 803116C4 0030E624 93 C1 00 E8 */ stw r30, 0xe8(r1)
/* 803116C8 0030E628 93 A1 00 E4 */ stw r29, 0xe4(r1)
/* 803116CC 0030E62C 7C 9E 23 78 */ mr r30, r4
/* 803116D0 0030E630 C1 04 00 00 */ lfs f8, 0(r4)
/* 803116D4 0030E634 C0 FE 00 04 */ lfs f7, 4(r30)
/* 803116D8 0030E638 3C 80 80 5A */ lis r4, sNoRotation__11CQuaternion@ha
/* 803116DC 0030E63C C1 65 00 00 */ lfs f11, 0(r5)
/* 803116E0 0030E640 EC 68 02 32 */ fmuls f3, f8, f8
/* 803116E4 0030E644 C1 45 00 04 */ lfs f10, 4(r5)
/* 803116E8 0030E648 EC 47 01 F2 */ fmuls f2, f7, f7
/* 803116EC 0030E64C C0 A2 C8 78 */ lfs f5, lbl_805AE598@sda21(r2)
/* 803116F0 0030E650 EC 2B 02 F2 */ fmuls f1, f11, f11
/* 803116F4 0030E654 EC 0A 02 B2 */ fmuls f0, f10, f10
/* 803116F8 0030E658 EC 85 01 72 */ fmuls f4, f5, f5
/* 803116FC 0030E65C C1 25 00 08 */ lfs f9, 8(r5)
/* 80311700 0030E660 EC 43 10 2A */ fadds f2, f3, f2
/* 80311704 0030E664 C5 84 66 60 */ lfsu f12, sNoRotation__11CQuaternion@l(r4)
/* 80311708 0030E668 EC 21 00 2A */ fadds f1, f1, f0
/* 8031170C 0030E66C D1 21 00 DC */ stfs f9, 0xdc(r1)
/* 80311710 0030E670 ED 24 10 2A */ fadds f9, f4, f2
/* 80311714 0030E674 C0 DE 00 08 */ lfs f6, 8(r30)
/* 80311718 0030E678 C0 02 C8 A4 */ lfs f0, lbl_805AE5C4@sda21(r2)
/* 8031171C 0030E67C EC 84 08 2A */ fadds f4, f4, f1
/* 80311720 0030E680 D0 C1 00 D0 */ stfs f6, 0xd0(r1)
/* 80311724 0030E684 7C BF 2B 78 */ mr r31, r5
/* 80311728 0030E688 C0 C6 00 00 */ lfs f6, 0(r6)
/* 8031172C 0030E68C FC 09 00 40 */ fcmpo cr0, f9, f0
/* 80311730 0030E690 C0 64 00 04 */ lfs f3, 4(r4)
/* 80311734 0030E694 7C 7D 1B 78 */ mr r29, r3
/* 80311738 0030E698 C0 44 00 08 */ lfs f2, 8(r4)
/* 8031173C 0030E69C C0 24 00 0C */ lfs f1, 0xc(r4)
/* 80311740 0030E6A0 D1 61 00 D4 */ stfs f11, 0xd4(r1)
/* 80311744 0030E6A4 D1 41 00 D8 */ stfs f10, 0xd8(r1)
/* 80311748 0030E6A8 D1 01 00 C8 */ stfs f8, 0xc8(r1)
/* 8031174C 0030E6AC D0 E1 00 CC */ stfs f7, 0xcc(r1)
/* 80311750 0030E6B0 D0 C1 00 20 */ stfs f6, 0x20(r1)
/* 80311754 0030E6B4 D0 A1 00 DC */ stfs f5, 0xdc(r1)
/* 80311758 0030E6B8 D0 A1 00 D0 */ stfs f5, 0xd0(r1)
/* 8031175C 0030E6BC D1 81 00 B8 */ stfs f12, 0xb8(r1)
/* 80311760 0030E6C0 D0 61 00 BC */ stfs f3, 0xbc(r1)
/* 80311764 0030E6C4 D0 41 00 C0 */ stfs f2, 0xc0(r1)
/* 80311768 0030E6C8 D0 21 00 C4 */ stfs f1, 0xc4(r1)
/* 8031176C 0030E6CC 40 81 01 80 */ ble lbl_803118EC
/* 80311770 0030E6D0 FC 04 00 40 */ fcmpo cr0, f4, f0
/* 80311774 0030E6D4 40 81 01 78 */ ble lbl_803118EC
/* 80311778 0030E6D8 38 61 00 C8 */ addi r3, r1, 0xc8
/* 8031177C 0030E6DC 48 00 31 7D */ bl Normalize__9CVector3fFv
/* 80311780 0030E6E0 38 61 00 D4 */ addi r3, r1, 0xd4
/* 80311784 0030E6E4 48 00 31 75 */ bl Normalize__9CVector3fFv
/* 80311788 0030E6E8 C0 21 00 C8 */ lfs f1, 0xc8(r1)
/* 8031178C 0030E6EC C0 41 00 CC */ lfs f2, 0xcc(r1)
/* 80311790 0030E6F0 48 08 34 DD */ bl atan2
/* 80311794 0030E6F4 FF 80 08 18 */ frsp f28, f1
/* 80311798 0030E6F8 C0 21 00 D4 */ lfs f1, 0xd4(r1)
/* 8031179C 0030E6FC C0 41 00 D8 */ lfs f2, 0xd8(r1)
/* 803117A0 0030E700 48 08 34 CD */ bl atan2
/* 803117A4 0030E704 88 0D A8 8C */ lbz r0, lbl_805A944C@sda21(r13)
/* 803117A8 0030E708 FC 20 08 18 */ frsp f1, f1
/* 803117AC 0030E70C 7C 00 07 75 */ extsb. r0, r0
/* 803117B0 0030E710 40 82 00 14 */ bne lbl_803117C4
/* 803117B4 0030E714 C0 02 C8 A8 */ lfs f0, lbl_805AE5C8@sda21(r2)
/* 803117B8 0030E718 38 00 00 01 */ li r0, 1
/* 803117BC 0030E71C 98 0D A8 8C */ stb r0, lbl_805A944C@sda21(r13)
/* 803117C0 0030E720 D0 0D A8 88 */ stfs f0, lbl_805A9448@sda21(r13)
lbl_803117C4:
/* 803117C4 0030E724 EC 21 E0 28 */ fsubs f1, f1, f28
/* 803117C8 0030E728 C0 4D A8 88 */ lfs f2, lbl_805A9448@sda21(r13)
/* 803117CC 0030E72C FC 01 10 40 */ fcmpo cr0, f1, f2
/* 803117D0 0030E730 40 81 00 10 */ ble lbl_803117E0
/* 803117D4 0030E734 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 803117D8 0030E738 EC 20 08 BC */ fnmsubs f1, f0, f2, f1
/* 803117DC 0030E73C 48 00 00 18 */ b lbl_803117F4
lbl_803117E0:
/* 803117E0 0030E740 FC 00 10 50 */ fneg f0, f2
/* 803117E4 0030E744 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 803117E8 0030E748 40 80 00 0C */ bge lbl_803117F4
/* 803117EC 0030E74C C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 803117F0 0030E750 EC 20 08 BA */ fmadds f1, f0, f2, f1
lbl_803117F4:
/* 803117F4 0030E754 C0 01 00 20 */ lfs f0, 0x20(r1)
/* 803117F8 0030E758 D0 21 00 1C */ stfs f1, 0x1c(r1)
/* 803117FC 0030E75C FC 00 08 40 */ fcmpo cr0, f0, f1
/* 80311800 0030E760 40 80 00 0C */ bge lbl_8031180C
/* 80311804 0030E764 38 61 00 20 */ addi r3, r1, 0x20
/* 80311808 0030E768 48 00 00 08 */ b lbl_80311810
lbl_8031180C:
/* 8031180C 0030E76C 38 61 00 1C */ addi r3, r1, 0x1c
lbl_80311810:
/* 80311810 0030E770 FC 20 00 50 */ fneg f1, f0
/* 80311814 0030E774 C0 43 00 00 */ lfs f2, 0(r3)
/* 80311818 0030E778 D0 41 00 1C */ stfs f2, 0x1c(r1)
/* 8031181C 0030E77C FC 00 08 18 */ frsp f0, f1
/* 80311820 0030E780 D0 21 00 14 */ stfs f1, 0x14(r1)
/* 80311824 0030E784 FC 02 00 40 */ fcmpo cr0, f2, f0
/* 80311828 0030E788 40 80 00 0C */ bge lbl_80311834
/* 8031182C 0030E78C 38 61 00 14 */ addi r3, r1, 0x14
/* 80311830 0030E790 48 00 00 08 */ b lbl_80311838
lbl_80311834:
/* 80311834 0030E794 38 61 00 1C */ addi r3, r1, 0x1c
lbl_80311838:
/* 80311838 0030E798 C0 23 00 00 */ lfs f1, 0(r3)
/* 8031183C 0030E79C 38 61 00 98 */ addi r3, r1, 0x98
/* 80311840 0030E7A0 38 81 00 10 */ addi r4, r1, 0x10
/* 80311844 0030E7A4 FC 00 08 50 */ fneg f0, f1
/* 80311848 0030E7A8 D0 21 00 1C */ stfs f1, 0x1c(r1)
/* 8031184C 0030E7AC D0 01 00 10 */ stfs f0, 0x10(r1)
/* 80311850 0030E7B0 4B FF F8 A9 */ bl ZRotation__11CQuaternionFRC9CRelAngle
/* 80311854 0030E7B4 80 E1 00 9C */ lwz r7, 0x9c(r1)
/* 80311858 0030E7B8 38 61 00 78 */ addi r3, r1, 0x78
/* 8031185C 0030E7BC 80 C1 00 A0 */ lwz r6, 0xa0(r1)
/* 80311860 0030E7C0 38 81 00 B8 */ addi r4, r1, 0xb8
/* 80311864 0030E7C4 80 01 00 A4 */ lwz r0, 0xa4(r1)
/* 80311868 0030E7C8 38 A1 00 68 */ addi r5, r1, 0x68
/* 8031186C 0030E7CC 90 E1 00 BC */ stw r7, 0xbc(r1)
/* 80311870 0030E7D0 C0 81 00 98 */ lfs f4, 0x98(r1)
/* 80311874 0030E7D4 90 C1 00 C0 */ stw r6, 0xc0(r1)
/* 80311878 0030E7D8 C0 01 00 BC */ lfs f0, 0xbc(r1)
/* 8031187C 0030E7DC 90 01 00 C4 */ stw r0, 0xc4(r1)
/* 80311880 0030E7E0 C0 21 00 C0 */ lfs f1, 0xc0(r1)
/* 80311884 0030E7E4 FC A0 00 50 */ fneg f5, f0
/* 80311888 0030E7E8 C0 01 00 C4 */ lfs f0, 0xc4(r1)
/* 8031188C 0030E7EC FC C0 08 50 */ fneg f6, f1
/* 80311890 0030E7F0 C0 62 C8 78 */ lfs f3, lbl_805AE598@sda21(r2)
/* 80311894 0030E7F4 FC E0 00 50 */ fneg f7, f0
/* 80311898 0030E7F8 C0 41 00 C8 */ lfs f2, 0xc8(r1)
/* 8031189C 0030E7FC C0 21 00 CC */ lfs f1, 0xcc(r1)
/* 803118A0 0030E800 C0 01 00 D0 */ lfs f0, 0xd0(r1)
/* 803118A4 0030E804 D0 81 00 B8 */ stfs f4, 0xb8(r1)
/* 803118A8 0030E808 D0 81 00 58 */ stfs f4, 0x58(r1)
/* 803118AC 0030E80C D0 A1 00 5C */ stfs f5, 0x5c(r1)
/* 803118B0 0030E810 D0 C1 00 60 */ stfs f6, 0x60(r1)
/* 803118B4 0030E814 D0 E1 00 64 */ stfs f7, 0x64(r1)
/* 803118B8 0030E818 D0 61 00 68 */ stfs f3, 0x68(r1)
/* 803118BC 0030E81C D0 41 00 6C */ stfs f2, 0x6c(r1)
/* 803118C0 0030E820 D0 21 00 70 */ stfs f1, 0x70(r1)
/* 803118C4 0030E824 D0 01 00 74 */ stfs f0, 0x74(r1)
/* 803118C8 0030E828 4B FF F8 D9 */ bl __ml__11CQuaternionCFRC11CQuaternion
/* 803118CC 0030E82C 38 61 00 88 */ addi r3, r1, 0x88
/* 803118D0 0030E830 38 81 00 78 */ addi r4, r1, 0x78
/* 803118D4 0030E834 38 A1 00 58 */ addi r5, r1, 0x58
/* 803118D8 0030E838 4B FF F8 C9 */ bl __ml__11CQuaternionCFRC11CQuaternion
/* 803118DC 0030E83C C0 C1 00 8C */ lfs f6, 0x8c(r1)
/* 803118E0 0030E840 C0 E1 00 90 */ lfs f7, 0x90(r1)
/* 803118E4 0030E844 C1 01 00 94 */ lfs f8, 0x94(r1)
/* 803118E8 0030E848 48 00 00 70 */ b lbl_80311958
lbl_803118EC:
/* 803118EC 0030E84C C0 02 C8 A4 */ lfs f0, lbl_805AE5C4@sda21(r2)
/* 803118F0 0030E850 FC 09 00 40 */ fcmpo cr0, f9, f0
/* 803118F4 0030E854 40 81 00 20 */ ble lbl_80311914
/* 803118F8 0030E858 38 61 00 4C */ addi r3, r1, 0x4c
/* 803118FC 0030E85C 38 81 00 C8 */ addi r4, r1, 0xc8
/* 80311900 0030E860 48 00 2F 51 */ bl AsNormalized__9CVector3fCFv
/* 80311904 0030E864 C0 C1 00 4C */ lfs f6, 0x4c(r1)
/* 80311908 0030E868 C0 E1 00 50 */ lfs f7, 0x50(r1)
/* 8031190C 0030E86C C1 01 00 54 */ lfs f8, 0x54(r1)
/* 80311910 0030E870 48 00 00 48 */ b lbl_80311958
lbl_80311914:
/* 80311914 0030E874 FC 04 00 40 */ fcmpo cr0, f4, f0
/* 80311918 0030E878 40 81 00 20 */ ble lbl_80311938
/* 8031191C 0030E87C 38 61 00 40 */ addi r3, r1, 0x40
/* 80311920 0030E880 38 81 00 D4 */ addi r4, r1, 0xd4
/* 80311924 0030E884 48 00 2F 2D */ bl AsNormalized__9CVector3fCFv
/* 80311928 0030E888 C0 C1 00 40 */ lfs f6, 0x40(r1)
/* 8031192C 0030E88C C0 E1 00 44 */ lfs f7, 0x44(r1)
/* 80311930 0030E890 C1 01 00 48 */ lfs f8, 0x48(r1)
/* 80311934 0030E894 48 00 00 24 */ b lbl_80311958
lbl_80311938:
/* 80311938 0030E898 D1 9D 00 00 */ stfs f12, 0(r29)
/* 8031193C 0030E89C C0 04 00 04 */ lfs f0, 4(r4)
/* 80311940 0030E8A0 D0 1D 00 04 */ stfs f0, 4(r29)
/* 80311944 0030E8A4 C0 04 00 08 */ lfs f0, 8(r4)
/* 80311948 0030E8A8 D0 1D 00 08 */ stfs f0, 8(r29)
/* 8031194C 0030E8AC C0 04 00 0C */ lfs f0, 0xc(r4)
/* 80311950 0030E8B0 D0 1D 00 0C */ stfs f0, 0xc(r29)
/* 80311954 0030E8B4 48 00 01 28 */ b lbl_80311A7C
lbl_80311958:
/* 80311958 0030E8B8 C0 A2 C8 78 */ lfs f5, lbl_805AE598@sda21(r2)
/* 8031195C 0030E8BC C0 62 C8 74 */ lfs f3, lbl_805AE594@sda21(r2)
/* 80311960 0030E8C0 EC 85 01 F2 */ fmuls f4, f5, f7
/* 80311964 0030E8C4 C0 3F 00 08 */ lfs f1, 8(r31)
/* 80311968 0030E8C8 EC 43 01 B2 */ fmuls f2, f3, f6
/* 8031196C 0030E8CC EC 05 02 32 */ fmuls f0, f5, f8
/* 80311970 0030E8D0 EF E6 21 78 */ fmsubs f31, f6, f5, f4
/* 80311974 0030E8D4 EF 88 11 78 */ fmsubs f28, f8, f5, f2
/* 80311978 0030E8D8 EF A7 00 F8 */ fmsubs f29, f7, f3, f0
/* 8031197C 0030E8DC 48 08 32 B1 */ bl acos
/* 80311980 0030E8E0 FF C0 08 18 */ frsp f30, f1
/* 80311984 0030E8E4 C0 3E 00 08 */ lfs f1, 8(r30)
/* 80311988 0030E8E8 48 08 32 A5 */ bl acos
/* 8031198C 0030E8EC 88 0D A8 8C */ lbz r0, lbl_805A944C@sda21(r13)
/* 80311990 0030E8F0 FC 20 08 18 */ frsp f1, f1
/* 80311994 0030E8F4 7C 00 07 75 */ extsb. r0, r0
/* 80311998 0030E8F8 40 82 00 14 */ bne lbl_803119AC
/* 8031199C 0030E8FC C0 02 C8 A8 */ lfs f0, lbl_805AE5C8@sda21(r2)
/* 803119A0 0030E900 38 00 00 01 */ li r0, 1
/* 803119A4 0030E904 98 0D A8 8C */ stb r0, lbl_805A944C@sda21(r13)
/* 803119A8 0030E908 D0 0D A8 88 */ stfs f0, lbl_805A9448@sda21(r13)
lbl_803119AC:
/* 803119AC 0030E90C EC 3E 08 28 */ fsubs f1, f30, f1
/* 803119B0 0030E910 C0 4D A8 88 */ lfs f2, lbl_805A9448@sda21(r13)
/* 803119B4 0030E914 FC 01 10 40 */ fcmpo cr0, f1, f2
/* 803119B8 0030E918 40 81 00 10 */ ble lbl_803119C8
/* 803119BC 0030E91C C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 803119C0 0030E920 EC 20 08 BC */ fnmsubs f1, f0, f2, f1
/* 803119C4 0030E924 48 00 00 18 */ b lbl_803119DC
lbl_803119C8:
/* 803119C8 0030E928 FC 00 10 50 */ fneg f0, f2
/* 803119CC 0030E92C FC 01 00 40 */ fcmpo cr0, f1, f0
/* 803119D0 0030E930 40 80 00 0C */ bge lbl_803119DC
/* 803119D4 0030E934 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 803119D8 0030E938 EC 20 08 BA */ fmadds f1, f0, f2, f1
lbl_803119DC:
/* 803119DC 0030E93C C0 01 00 20 */ lfs f0, 0x20(r1)
/* 803119E0 0030E940 D0 21 00 18 */ stfs f1, 0x18(r1)
/* 803119E4 0030E944 FC 00 08 40 */ fcmpo cr0, f0, f1
/* 803119E8 0030E948 40 80 00 0C */ bge lbl_803119F4
/* 803119EC 0030E94C 38 61 00 20 */ addi r3, r1, 0x20
/* 803119F0 0030E950 48 00 00 08 */ b lbl_803119F8
lbl_803119F4:
/* 803119F4 0030E954 38 61 00 18 */ addi r3, r1, 0x18
lbl_803119F8:
/* 803119F8 0030E958 FC 20 00 50 */ fneg f1, f0
/* 803119FC 0030E95C C0 43 00 00 */ lfs f2, 0(r3)
/* 80311A00 0030E960 D0 41 00 18 */ stfs f2, 0x18(r1)
/* 80311A04 0030E964 FC 00 08 18 */ frsp f0, f1
/* 80311A08 0030E968 D0 21 00 0C */ stfs f1, 0xc(r1)
/* 80311A0C 0030E96C FC 02 00 40 */ fcmpo cr0, f2, f0
/* 80311A10 0030E970 40 80 00 0C */ bge lbl_80311A1C
/* 80311A14 0030E974 38 61 00 0C */ addi r3, r1, 0xc
/* 80311A18 0030E978 48 00 00 08 */ b lbl_80311A20
lbl_80311A1C:
/* 80311A1C 0030E97C 38 61 00 18 */ addi r3, r1, 0x18
lbl_80311A20:
/* 80311A20 0030E980 C0 23 00 00 */ lfs f1, 0(r3)
/* 80311A24 0030E984 38 61 00 30 */ addi r3, r1, 0x30
/* 80311A28 0030E988 38 81 00 24 */ addi r4, r1, 0x24
/* 80311A2C 0030E98C 38 A1 00 08 */ addi r5, r1, 8
/* 80311A30 0030E990 FC 00 08 50 */ fneg f0, f1
/* 80311A34 0030E994 D0 21 00 18 */ stfs f1, 0x18(r1)
/* 80311A38 0030E998 D3 A1 00 24 */ stfs f29, 0x24(r1)
/* 80311A3C 0030E99C D0 01 00 08 */ stfs f0, 8(r1)
/* 80311A40 0030E9A0 D3 81 00 28 */ stfs f28, 0x28(r1)
/* 80311A44 0030E9A4 D3 E1 00 2C */ stfs f31, 0x2c(r1)
/* 80311A48 0030E9A8 4B FF F8 AD */ bl AxisAngle__11CQuaternionFRC13CUnitVector3fRC9CRelAngle
/* 80311A4C 0030E9AC C0 61 00 30 */ lfs f3, 0x30(r1)
/* 80311A50 0030E9B0 7F A3 EB 78 */ mr r3, r29
/* 80311A54 0030E9B4 C0 41 00 34 */ lfs f2, 0x34(r1)
/* 80311A58 0030E9B8 38 81 00 A8 */ addi r4, r1, 0xa8
/* 80311A5C 0030E9BC C0 21 00 38 */ lfs f1, 0x38(r1)
/* 80311A60 0030E9C0 38 A1 00 B8 */ addi r5, r1, 0xb8
/* 80311A64 0030E9C4 C0 01 00 3C */ lfs f0, 0x3c(r1)
/* 80311A68 0030E9C8 D0 61 00 A8 */ stfs f3, 0xa8(r1)
/* 80311A6C 0030E9CC D0 41 00 AC */ stfs f2, 0xac(r1)
/* 80311A70 0030E9D0 D0 21 00 B0 */ stfs f1, 0xb0(r1)
/* 80311A74 0030E9D4 D0 01 00 B4 */ stfs f0, 0xb4(r1)
/* 80311A78 0030E9D8 4B FF F7 29 */ bl __ml__11CQuaternionCFRC11CQuaternion
lbl_80311A7C:
/* 80311A7C 0030E9DC E3 E1 01 28 */ psq_l f31, 296(r1), 0, qr0
/* 80311A80 0030E9E0 CB E1 01 20 */ lfd f31, 0x120(r1)
/* 80311A84 0030E9E4 E3 C1 01 18 */ psq_l f30, 280(r1), 0, qr0
/* 80311A88 0030E9E8 CB C1 01 10 */ lfd f30, 0x110(r1)
/* 80311A8C 0030E9EC E3 A1 01 08 */ psq_l f29, 264(r1), 0, qr0
/* 80311A90 0030E9F0 CB A1 01 00 */ lfd f29, 0x100(r1)
/* 80311A94 0030E9F4 E3 81 00 F8 */ psq_l f28, 248(r1), 0, qr0
/* 80311A98 0030E9F8 CB 81 00 F0 */ lfd f28, 0xf0(r1)
/* 80311A9C 0030E9FC 83 E1 00 EC */ lwz r31, 0xec(r1)
/* 80311AA0 0030EA00 83 C1 00 E8 */ lwz r30, 0xe8(r1)
/* 80311AA4 0030EA04 80 01 01 34 */ lwz r0, 0x134(r1)
/* 80311AA8 0030EA08 83 A1 00 E4 */ lwz r29, 0xe4(r1)
/* 80311AAC 0030EA0C 7C 08 03 A6 */ mtlr r0
/* 80311AB0 0030EA10 38 21 01 30 */ addi r1, r1, 0x130
/* 80311AB4 0030EA14 4E 80 00 20 */ blr
.global ShortestRotationArc__11CQuaternionFRC9CVector3fRC9CVector3f
ShortestRotationArc__11CQuaternionFRC9CVector3fRC9CVector3f:
/* 80311AB8 0030EA18 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 80311ABC 0030EA1C 7C 08 02 A6 */ mflr r0
/* 80311AC0 0030EA20 C0 02 C8 78 */ lfs f0, lbl_805AE598@sda21(r2)
/* 80311AC4 0030EA24 90 01 00 54 */ stw r0, 0x54(r1)
/* 80311AC8 0030EA28 38 00 00 00 */ li r0, 0
/* 80311ACC 0030EA2C 93 E1 00 4C */ stw r31, 0x4c(r1)
/* 80311AD0 0030EA30 7C 7F 1B 78 */ mr r31, r3
/* 80311AD4 0030EA34 C0 C4 00 00 */ lfs f6, 0(r4)
/* 80311AD8 0030EA38 C0 A4 00 04 */ lfs f5, 4(r4)
/* 80311ADC 0030EA3C C0 84 00 08 */ lfs f4, 8(r4)
/* 80311AE0 0030EA40 FC 00 30 00 */ fcmpu cr0, f0, f6
/* 80311AE4 0030EA44 C0 65 00 00 */ lfs f3, 0(r5)
/* 80311AE8 0030EA48 C0 45 00 04 */ lfs f2, 4(r5)
/* 80311AEC 0030EA4C C0 25 00 08 */ lfs f1, 8(r5)
/* 80311AF0 0030EA50 D0 C1 00 30 */ stfs f6, 0x30(r1)
/* 80311AF4 0030EA54 D0 A1 00 34 */ stfs f5, 0x34(r1)
/* 80311AF8 0030EA58 D0 81 00 38 */ stfs f4, 0x38(r1)
/* 80311AFC 0030EA5C D0 61 00 24 */ stfs f3, 0x24(r1)
/* 80311B00 0030EA60 D0 41 00 28 */ stfs f2, 0x28(r1)
/* 80311B04 0030EA64 D0 21 00 2C */ stfs f1, 0x2c(r1)
/* 80311B08 0030EA68 40 82 00 14 */ bne lbl_80311B1C
/* 80311B0C 0030EA6C FC 00 28 00 */ fcmpu cr0, f0, f5
/* 80311B10 0030EA70 40 82 00 0C */ bne lbl_80311B1C
/* 80311B14 0030EA74 FC 00 20 00 */ fcmpu cr0, f0, f4
/* 80311B18 0030EA78 41 82 00 08 */ beq lbl_80311B20
lbl_80311B1C:
/* 80311B1C 0030EA7C 38 00 00 01 */ li r0, 1
lbl_80311B20:
/* 80311B20 0030EA80 54 00 06 3F */ clrlwi. r0, r0, 0x18
/* 80311B24 0030EA84 41 82 00 0C */ beq lbl_80311B30
/* 80311B28 0030EA88 38 61 00 30 */ addi r3, r1, 0x30
/* 80311B2C 0030EA8C 48 00 2D CD */ bl Normalize__9CVector3fFv
lbl_80311B30:
/* 80311B30 0030EA90 C0 22 C8 78 */ lfs f1, lbl_805AE598@sda21(r2)
/* 80311B34 0030EA94 38 00 00 00 */ li r0, 0
/* 80311B38 0030EA98 C0 01 00 24 */ lfs f0, 0x24(r1)
/* 80311B3C 0030EA9C FC 01 00 00 */ fcmpu cr0, f1, f0
/* 80311B40 0030EAA0 40 82 00 1C */ bne lbl_80311B5C
/* 80311B44 0030EAA4 C0 01 00 28 */ lfs f0, 0x28(r1)
/* 80311B48 0030EAA8 FC 01 00 00 */ fcmpu cr0, f1, f0
/* 80311B4C 0030EAAC 40 82 00 10 */ bne lbl_80311B5C
/* 80311B50 0030EAB0 C0 01 00 2C */ lfs f0, 0x2c(r1)
/* 80311B54 0030EAB4 FC 01 00 00 */ fcmpu cr0, f1, f0
/* 80311B58 0030EAB8 41 82 00 08 */ beq lbl_80311B60
lbl_80311B5C:
/* 80311B5C 0030EABC 38 00 00 01 */ li r0, 1
lbl_80311B60:
/* 80311B60 0030EAC0 54 00 06 3F */ clrlwi. r0, r0, 0x18
/* 80311B64 0030EAC4 41 82 00 0C */ beq lbl_80311B70
/* 80311B68 0030EAC8 38 61 00 24 */ addi r3, r1, 0x24
/* 80311B6C 0030EACC 48 00 2D 8D */ bl Normalize__9CVector3fFv
lbl_80311B70:
/* 80311B70 0030EAD0 C1 61 00 38 */ lfs f11, 0x38(r1)
/* 80311B74 0030EAD4 C1 01 00 28 */ lfs f8, 0x28(r1)
/* 80311B78 0030EAD8 C1 41 00 2C */ lfs f10, 0x2c(r1)
/* 80311B7C 0030EADC C0 C1 00 30 */ lfs f6, 0x30(r1)
/* 80311B80 0030EAE0 EC 08 02 F2 */ fmuls f0, f8, f11
/* 80311B84 0030EAE4 C1 21 00 34 */ lfs f9, 0x34(r1)
/* 80311B88 0030EAE8 C0 E1 00 24 */ lfs f7, 0x24(r1)
/* 80311B8C 0030EAEC EC 2A 01 B2 */ fmuls f1, f10, f6
/* 80311B90 0030EAF0 EC 89 02 B8 */ fmsubs f4, f9, f10, f0
/* 80311B94 0030EAF4 C0 02 C8 AC */ lfs f0, lbl_805AE5CC@sda21(r2)
/* 80311B98 0030EAF8 EC A7 02 72 */ fmuls f5, f7, f9
/* 80311B9C 0030EAFC EC 6B 09 F8 */ fmsubs f3, f11, f7, f1
/* 80311BA0 0030EB00 EC 44 01 32 */ fmuls f2, f4, f4
/* 80311BA4 0030EB04 D0 81 00 18 */ stfs f4, 0x18(r1)
/* 80311BA8 0030EB08 EC 86 2A 38 */ fmsubs f4, f6, f8, f5
/* 80311BAC 0030EB0C EC 23 00 F2 */ fmuls f1, f3, f3
/* 80311BB0 0030EB10 D0 61 00 1C */ stfs f3, 0x1c(r1)
/* 80311BB4 0030EB14 EC 64 01 32 */ fmuls f3, f4, f4
/* 80311BB8 0030EB18 D0 81 00 20 */ stfs f4, 0x20(r1)
/* 80311BBC 0030EB1C EC 22 08 2A */ fadds f1, f2, f1
/* 80311BC0 0030EB20 EC 23 08 2A */ fadds f1, f3, f1
/* 80311BC4 0030EB24 FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80311BC8 0030EB28 40 80 00 AC */ bge lbl_80311C74
/* 80311BCC 0030EB2C EC 29 02 32 */ fmuls f1, f9, f8
/* 80311BD0 0030EB30 C0 02 C8 78 */ lfs f0, lbl_805AE598@sda21(r2)
/* 80311BD4 0030EB34 EC 26 09 FA */ fmadds f1, f6, f7, f1
/* 80311BD8 0030EB38 EC 2B 0A BA */ fmadds f1, f11, f10, f1
/* 80311BDC 0030EB3C FC 01 00 40 */ fcmpo cr0, f1, f0
/* 80311BE0 0030EB40 40 81 00 2C */ ble lbl_80311C0C
/* 80311BE4 0030EB44 3C 60 80 5A */ lis r3, sNoRotation__11CQuaternion@ha
/* 80311BE8 0030EB48 C4 03 66 60 */ lfsu f0, sNoRotation__11CQuaternion@l(r3)
/* 80311BEC 0030EB4C D0 1F 00 00 */ stfs f0, 0(r31)
/* 80311BF0 0030EB50 C0 03 00 04 */ lfs f0, 4(r3)
/* 80311BF4 0030EB54 D0 1F 00 04 */ stfs f0, 4(r31)
/* 80311BF8 0030EB58 C0 03 00 08 */ lfs f0, 8(r3)
/* 80311BFC 0030EB5C D0 1F 00 08 */ stfs f0, 8(r31)
/* 80311C00 0030EB60 C0 03 00 0C */ lfs f0, 0xc(r3)
/* 80311C04 0030EB64 D0 1F 00 0C */ stfs f0, 0xc(r31)
/* 80311C08 0030EB68 48 00 00 DC */ b lbl_80311CE4
lbl_80311C0C:
/* 80311C0C 0030EB6C 38 61 00 18 */ addi r3, r1, 0x18
/* 80311C10 0030EB70 48 00 2A E9 */ bl CanBeNormalized__9CVector3fCFv
/* 80311C14 0030EB74 54 60 06 3F */ clrlwi. r0, r3, 0x18
/* 80311C18 0030EB78 41 82 00 34 */ beq lbl_80311C4C
/* 80311C1C 0030EB7C 38 61 00 0C */ addi r3, r1, 0xc
/* 80311C20 0030EB80 38 81 00 18 */ addi r4, r1, 0x18
/* 80311C24 0030EB84 48 00 2C 2D */ bl AsNormalized__9CVector3fCFv
/* 80311C28 0030EB88 C0 02 C8 78 */ lfs f0, lbl_805AE598@sda21(r2)
/* 80311C2C 0030EB8C D0 1F 00 00 */ stfs f0, 0(r31)
/* 80311C30 0030EB90 C0 01 00 0C */ lfs f0, 0xc(r1)
/* 80311C34 0030EB94 D0 1F 00 04 */ stfs f0, 4(r31)
/* 80311C38 0030EB98 C0 01 00 10 */ lfs f0, 0x10(r1)
/* 80311C3C 0030EB9C D0 1F 00 08 */ stfs f0, 8(r31)
/* 80311C40 0030EBA0 C0 01 00 14 */ lfs f0, 0x14(r1)
/* 80311C44 0030EBA4 D0 1F 00 0C */ stfs f0, 0xc(r31)
/* 80311C48 0030EBA8 48 00 00 9C */ b lbl_80311CE4
lbl_80311C4C:
/* 80311C4C 0030EBAC 3C 60 80 5A */ lis r3, sNoRotation__11CQuaternion@ha
/* 80311C50 0030EBB0 C4 03 66 60 */ lfsu f0, sNoRotation__11CQuaternion@l(r3)
/* 80311C54 0030EBB4 D0 1F 00 00 */ stfs f0, 0(r31)
/* 80311C58 0030EBB8 C0 03 00 04 */ lfs f0, 4(r3)
/* 80311C5C 0030EBBC D0 1F 00 04 */ stfs f0, 4(r31)
/* 80311C60 0030EBC0 C0 03 00 08 */ lfs f0, 8(r3)
/* 80311C64 0030EBC4 D0 1F 00 08 */ stfs f0, 8(r31)
/* 80311C68 0030EBC8 C0 03 00 0C */ lfs f0, 0xc(r3)
/* 80311C6C 0030EBCC D0 1F 00 0C */ stfs f0, 0xc(r31)
/* 80311C70 0030EBD0 48 00 00 74 */ b lbl_80311CE4
lbl_80311C74:
/* 80311C74 0030EBD4 EC 09 02 32 */ fmuls f0, f9, f8
/* 80311C78 0030EBD8 38 81 00 08 */ addi r4, r1, 8
/* 80311C7C 0030EBDC 38 6D 9C 90 */ addi r3, r13, lbl_805A8850@sda21
/* 80311C80 0030EBE0 38 AD 9C 94 */ addi r5, r13, lbl_805A8854@sda21
/* 80311C84 0030EBE4 EC 06 01 FA */ fmadds f0, f6, f7, f0
/* 80311C88 0030EBE8 EC 0B 02 BA */ fmadds f0, f11, f10, f0
/* 80311C8C 0030EBEC D0 01 00 08 */ stfs f0, 8(r1)
/* 80311C90 0030EBF0 4B CF A6 25 */ bl "Clamp<f>__5CMathFRCfRCfRCf"
/* 80311C94 0030EBF4 C0 43 00 00 */ lfs f2, 0(r3)
/* 80311C98 0030EBF8 C0 22 C8 74 */ lfs f1, lbl_805AE594@sda21(r2)
/* 80311C9C 0030EBFC C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 80311CA0 0030EC00 EC 21 10 2A */ fadds f1, f1, f2
/* 80311CA4 0030EC04 EC 20 00 72 */ fmuls f1, f0, f1
/* 80311CA8 0030EC08 48 00 38 59 */ bl SqrtF__5CMathFf
/* 80311CAC 0030EC0C C0 42 C8 74 */ lfs f2, lbl_805AE594@sda21(r2)
/* 80311CB0 0030EC10 C0 02 C8 7C */ lfs f0, lbl_805AE59C@sda21(r2)
/* 80311CB4 0030EC14 EC A2 08 24 */ fdivs f5, f2, f1
/* 80311CB8 0030EC18 C0 81 00 18 */ lfs f4, 0x18(r1)
/* 80311CBC 0030EC1C C0 61 00 1C */ lfs f3, 0x1c(r1)
/* 80311CC0 0030EC20 C0 41 00 20 */ lfs f2, 0x20(r1)
/* 80311CC4 0030EC24 EC 00 00 72 */ fmuls f0, f0, f1
/* 80311CC8 0030EC28 EC 85 01 32 */ fmuls f4, f5, f4
/* 80311CCC 0030EC2C EC 25 00 F2 */ fmuls f1, f5, f3
/* 80311CD0 0030EC30 D0 1F 00 00 */ stfs f0, 0(r31)
/* 80311CD4 0030EC34 EC 05 00 B2 */ fmuls f0, f5, f2
/* 80311CD8 0030EC38 D0 9F 00 04 */ stfs f4, 4(r31)
/* 80311CDC 0030EC3C D0 3F 00 08 */ stfs f1, 8(r31)
/* 80311CE0 0030EC40 D0 1F 00 0C */ stfs f0, 0xc(r31)
lbl_80311CE4:
/* 80311CE4 0030EC44 80 01 00 54 */ lwz r0, 0x54(r1)
/* 80311CE8 0030EC48 83 E1 00 4C */ lwz r31, 0x4c(r1)
/* 80311CEC 0030EC4C 7C 08 03 A6 */ mtlr r0
/* 80311CF0 0030EC50 38 21 00 50 */ addi r1, r1, 0x50
/* 80311CF4 0030EC54 4E 80 00 20 */ blr
.global Slerp__11CQuaternionFRC11CQuaternionRC11CQuaternionf
Slerp__11CQuaternionFRC11CQuaternionRC11CQuaternionf:
/* 80311CF8 0030EC58 94 21 FF A0 */ stwu r1, -0x60(r1)
/* 80311CFC 0030EC5C 7C 08 02 A6 */ mflr r0
/* 80311D00 0030EC60 90 01 00 64 */ stw r0, 0x64(r1)
/* 80311D04 0030EC64 DB E1 00 50 */ stfd f31, 0x50(r1)
/* 80311D08 0030EC68 F3 E1 00 58 */ psq_st f31, 88(r1), 0, qr0
/* 80311D0C 0030EC6C DB C1 00 40 */ stfd f30, 0x40(r1)
/* 80311D10 0030EC70 F3 C1 00 48 */ psq_st f30, 72(r1), 0, qr0
/* 80311D14 0030EC74 DB A1 00 30 */ stfd f29, 0x30(r1)
/* 80311D18 0030EC78 F3 A1 00 38 */ psq_st f29, 56(r1), 0, qr0
/* 80311D1C 0030EC7C DB 81 00 20 */ stfd f28, 0x20(r1)
/* 80311D20 0030EC80 F3 81 00 28 */ psq_st f28, 40(r1), 0, qr0
/* 80311D24 0030EC84 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80311D28 0030EC88 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80311D2C 0030EC8C 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80311D30 0030EC90 7C 9E 23 78 */ mr r30, r4
/* 80311D34 0030EC94 7C BF 2B 78 */ mr r31, r5
/* 80311D38 0030EC98 C0 44 00 08 */ lfs f2, 8(r4)
/* 80311D3C 0030EC9C FF C0 08 90 */ fmr f30, f1
/* 80311D40 0030ECA0 C0 05 00 08 */ lfs f0, 8(r5)
/* 80311D44 0030ECA4 7C 7D 1B 78 */ mr r29, r3
/* 80311D48 0030ECA8 C0 64 00 04 */ lfs f3, 4(r4)
/* 80311D4C 0030ECAC EC 02 00 32 */ fmuls f0, f2, f0
/* 80311D50 0030ECB0 C0 25 00 04 */ lfs f1, 4(r5)
/* 80311D54 0030ECB4 C0 84 00 0C */ lfs f4, 0xc(r4)
/* 80311D58 0030ECB8 C0 45 00 0C */ lfs f2, 0xc(r5)
/* 80311D5C 0030ECBC EC 03 00 7A */ fmadds f0, f3, f1, f0
/* 80311D60 0030ECC0 C0 64 00 00 */ lfs f3, 0(r4)
/* 80311D64 0030ECC4 C0 25 00 00 */ lfs f1, 0(r5)
/* 80311D68 0030ECC8 C3 E2 C8 74 */ lfs f31, lbl_805AE594@sda21(r2)
/* 80311D6C 0030ECCC EC 04 00 BA */ fmadds f0, f4, f2, f0
/* 80311D70 0030ECD0 EC 03 00 7A */ fmadds f0, f3, f1, f0
/* 80311D74 0030ECD4 FC 00 F8 40 */ fcmpo cr0, f0, f31
/* 80311D78 0030ECD8 40 81 00 08 */ ble lbl_80311D80
/* 80311D7C 0030ECDC 48 00 00 18 */ b lbl_80311D94
lbl_80311D80:
/* 80311D80 0030ECE0 C3 E2 C8 A0 */ lfs f31, lbl_805AE5C0@sda21(r2)
/* 80311D84 0030ECE4 FC 00 F8 40 */ fcmpo cr0, f0, f31
/* 80311D88 0030ECE8 40 80 00 08 */ bge lbl_80311D90
/* 80311D8C 0030ECEC 48 00 00 08 */ b lbl_80311D94
lbl_80311D90:
/* 80311D90 0030ECF0 FF E0 00 90 */ fmr f31, f0
lbl_80311D94:
/* 80311D94 0030ECF4 FC 20 F8 90 */ fmr f1, f31
/* 80311D98 0030ECF8 48 08 2E 95 */ bl acos
/* 80311D9C 0030ECFC FF 80 08 90 */ fmr f28, f1
/* 80311DA0 0030ED00 48 08 2D 3D */ bl sin
/* 80311DA4 0030ED04 FF A0 08 90 */ fmr f29, f1
/* 80311DA8 0030ED08 C8 02 C8 90 */ lfd f0, lbl_805AE5B0@sda21(r2)
/* 80311DAC 0030ED0C FC 00 E8 00 */ fcmpu cr0, f0, f29
/* 80311DB0 0030ED10 40 82 00 34 */ bne lbl_80311DE4
/* 80311DB4 0030ED14 C0 02 C8 78 */ lfs f0, lbl_805AE598@sda21(r2)
/* 80311DB8 0030ED18 FC 1F 00 40 */ fcmpo cr0, f31, f0
/* 80311DBC 0030ED1C 40 81 00 28 */ ble lbl_80311DE4
/* 80311DC0 0030ED20 C0 1E 00 00 */ lfs f0, 0(r30)
/* 80311DC4 0030ED24 D0 1D 00 00 */ stfs f0, 0(r29)
/* 80311DC8 0030ED28 C0 1E 00 04 */ lfs f0, 4(r30)
/* 80311DCC 0030ED2C D0 1D 00 04 */ stfs f0, 4(r29)
/* 80311DD0 0030ED30 C0 1E 00 08 */ lfs f0, 8(r30)
/* 80311DD4 0030ED34 D0 1D 00 08 */ stfs f0, 8(r29)
/* 80311DD8 0030ED38 C0 1E 00 0C */ lfs f0, 0xc(r30)
/* 80311DDC 0030ED3C D0 1D 00 0C */ stfs f0, 0xc(r29)
/* 80311DE0 0030ED40 48 00 00 A0 */ b lbl_80311E80
lbl_80311DE4:
/* 80311DE4 0030ED44 C0 02 C8 74 */ lfs f0, lbl_805AE594@sda21(r2)
/* 80311DE8 0030ED48 EC 00 F0 28 */ fsubs f0, f0, f30
/* 80311DEC 0030ED4C FC 3C 00 32 */ fmul f1, f28, f0
/* 80311DF0 0030ED50 48 08 2C ED */ bl sin
/* 80311DF4 0030ED54 FF E0 08 18 */ frsp f31, f1
/* 80311DF8 0030ED58 FC 3C 07 B2 */ fmul f1, f28, f30
/* 80311DFC 0030ED5C 48 08 2C E1 */ bl sin
/* 80311E00 0030ED60 C8 42 C8 B0 */ lfd f2, lbl_805AE5D0@sda21(r2)
/* 80311E04 0030ED64 FD 00 08 18 */ frsp f8, f1
/* 80311E08 0030ED68 C0 1F 00 00 */ lfs f0, 0(r31)
/* 80311E0C 0030ED6C FD 22 E8 24 */ fdiv f9, f2, f29
/* 80311E10 0030ED70 C0 FE 00 04 */ lfs f7, 4(r30)
/* 80311E14 0030ED74 C0 DF 00 04 */ lfs f6, 4(r31)
/* 80311E18 0030ED78 C0 BE 00 08 */ lfs f5, 8(r30)
/* 80311E1C 0030ED7C C0 7E 00 0C */ lfs f3, 0xc(r30)
/* 80311E20 0030ED80 C0 3E 00 00 */ lfs f1, 0(r30)
/* 80311E24 0030ED84 EC 08 00 32 */ fmuls f0, f8, f0
/* 80311E28 0030ED88 C0 9F 00 08 */ lfs f4, 8(r31)
/* 80311E2C 0030ED8C EC FF 01 F2 */ fmuls f7, f31, f7
/* 80311E30 0030ED90 C0 5F 00 0C */ lfs f2, 0xc(r31)
/* 80311E34 0030ED94 EC C8 01 B2 */ fmuls f6, f8, f6
/* 80311E38 0030ED98 EC 1F 00 7A */ fmadds f0, f31, f1, f0
/* 80311E3C 0030ED9C EC BF 01 72 */ fmuls f5, f31, f5
/* 80311E40 0030EDA0 EC 28 01 32 */ fmuls f1, f8, f4
/* 80311E44 0030EDA4 FC 09 00 32 */ fmul f0, f9, f0
/* 80311E48 0030EDA8 EC 85 08 2A */ fadds f4, f5, f1
/* 80311E4C 0030EDAC FD 20 48 18 */ frsp f9, f9
/* 80311E50 0030EDB0 EC C7 30 2A */ fadds f6, f7, f6
/* 80311E54 0030EDB4 FC 00 00 18 */ frsp f0, f0
/* 80311E58 0030EDB8 EC 28 00 B2 */ fmuls f1, f8, f2
/* 80311E5C 0030EDBC EC 7F 00 F2 */ fmuls f3, f31, f3
/* 80311E60 0030EDC0 D0 1D 00 00 */ stfs f0, 0(r29)
/* 80311E64 0030EDC4 EC A9 01 B2 */ fmuls f5, f9, f6
/* 80311E68 0030EDC8 EC 49 01 32 */ fmuls f2, f9, f4
/* 80311E6C 0030EDCC EC 03 08 2A */ fadds f0, f3, f1
/* 80311E70 0030EDD0 D0 BD 00 04 */ stfs f5, 4(r29)
/* 80311E74 0030EDD4 EC 09 00 32 */ fmuls f0, f9, f0
/* 80311E78 0030EDD8 D0 5D 00 08 */ stfs f2, 8(r29)
/* 80311E7C 0030EDDC D0 1D 00 0C */ stfs f0, 0xc(r29)
lbl_80311E80:
/* 80311E80 0030EDE0 E3 E1 00 58 */ psq_l f31, 88(r1), 0, qr0
/* 80311E84 0030EDE4 CB E1 00 50 */ lfd f31, 0x50(r1)
/* 80311E88 0030EDE8 E3 C1 00 48 */ psq_l f30, 72(r1), 0, qr0
/* 80311E8C 0030EDEC CB C1 00 40 */ lfd f30, 0x40(r1)
/* 80311E90 0030EDF0 E3 A1 00 38 */ psq_l f29, 56(r1), 0, qr0
/* 80311E94 0030EDF4 CB A1 00 30 */ lfd f29, 0x30(r1)
/* 80311E98 0030EDF8 E3 81 00 28 */ psq_l f28, 40(r1), 0, qr0
/* 80311E9C 0030EDFC CB 81 00 20 */ lfd f28, 0x20(r1)
/* 80311EA0 0030EE00 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80311EA4 0030EE04 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80311EA8 0030EE08 80 01 00 64 */ lwz r0, 0x64(r1)
/* 80311EAC 0030EE0C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80311EB0 0030EE10 7C 08 03 A6 */ mtlr r0
/* 80311EB4 0030EE14 38 21 00 60 */ addi r1, r1, 0x60
/* 80311EB8 0030EE18 4E 80 00 20 */ blr
.global BuildTransform4f__11CQuaternionCFRC9CVector3f
BuildTransform4f__11CQuaternionCFRC9CVector3f:
/* 80311EBC 0030EE1C 94 21 FF B0 */ stwu r1, -0x50(r1)
/* 80311EC0 0030EE20 DB E1 00 40 */ stfd f31, 0x40(r1)
/* 80311EC4 0030EE24 F3 E1 00 48 */ psq_st f31, 72(r1), 0, qr0
/* 80311EC8 0030EE28 DB C1 00 30 */ stfd f30, 0x30(r1)
/* 80311ECC 0030EE2C F3 C1 00 38 */ psq_st f30, 56(r1), 0, qr0
/* 80311ED0 0030EE30 DB A1 00 20 */ stfd f29, 0x20(r1)
/* 80311ED4 0030EE34 F3 A1 00 28 */ psq_st f29, 40(r1), 0, qr0
/* 80311ED8 0030EE38 DB 81 00 10 */ stfd f28, 0x10(r1)
/* 80311EDC 0030EE3C F3 81 00 18 */ psq_st f28, 24(r1), 0, qr0
/* 80311EE0 0030EE40 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 80311EE4 0030EE44 C0 44 00 08 */ lfs f2, 8(r4)
/* 80311EE8 0030EE48 C1 04 00 0C */ lfs f8, 0xc(r4)
/* 80311EEC 0030EE4C ED 60 00 B2 */ fmuls f11, f0, f2
/* 80311EF0 0030EE50 C0 24 00 04 */ lfs f1, 4(r4)
/* 80311EF4 0030EE54 ED 20 02 32 */ fmuls f9, f0, f8
/* 80311EF8 0030EE58 C0 84 00 00 */ lfs f4, 0(r4)
/* 80311EFC 0030EE5C ED 40 00 72 */ fmuls f10, f0, f1
/* 80311F00 0030EE60 C0 62 C8 74 */ lfs f3, lbl_805AE594@sda21(r2)
/* 80311F04 0030EE64 EF AB 00 B2 */ fmuls f29, f11, f2
/* 80311F08 0030EE68 C0 A5 00 08 */ lfs f5, 8(r5)
/* 80311F0C 0030EE6C EF 89 02 32 */ fmuls f28, f9, f8
/* 80311F10 0030EE70 C0 C5 00 04 */ lfs f6, 4(r5)
/* 80311F14 0030EE74 EC 0A 00 72 */ fmuls f0, f10, f1
/* 80311F18 0030EE78 C0 E5 00 00 */ lfs f7, 0(r5)
/* 80311F1C 0030EE7C EC 23 E8 28 */ fsubs f1, f3, f29
/* 80311F20 0030EE80 ED A4 02 72 */ fmuls f13, f4, f9
/* 80311F24 0030EE84 EF EA 00 B2 */ fmuls f31, f10, f2
/* 80311F28 0030EE88 EC 21 E0 28 */ fsubs f1, f1, f28
/* 80311F2C 0030EE8C ED 84 02 F2 */ fmuls f12, f4, f11
/* 80311F30 0030EE90 EF CA 02 32 */ fmuls f30, f10, f8
/* 80311F34 0030EE94 EC 5F 68 28 */ fsubs f2, f31, f13
/* 80311F38 0030EE98 D0 23 00 00 */ stfs f1, 0(r3)
/* 80311F3C 0030EE9C ED 23 00 28 */ fsubs f9, f3, f0
/* 80311F40 0030EEA0 EC 3E 60 2A */ fadds f1, f30, f12
/* 80311F44 0030EEA4 D0 43 00 04 */ stfs f2, 4(r3)
/* 80311F48 0030EEA8 EC 1F 68 2A */ fadds f0, f31, f13
/* 80311F4C 0030EEAC ED 44 02 B2 */ fmuls f10, f4, f10
/* 80311F50 0030EEB0 ED 0B 02 32 */ fmuls f8, f11, f8
/* 80311F54 0030EEB4 D0 23 00 08 */ stfs f1, 8(r3)
/* 80311F58 0030EEB8 EC 89 E0 28 */ fsubs f4, f9, f28
/* 80311F5C 0030EEBC D0 E3 00 0C */ stfs f7, 0xc(r3)
/* 80311F60 0030EEC0 EC 5E 60 28 */ fsubs f2, f30, f12
/* 80311F64 0030EEC4 EC 68 50 28 */ fsubs f3, f8, f10
/* 80311F68 0030EEC8 D0 03 00 10 */ stfs f0, 0x10(r3)
/* 80311F6C 0030EECC EC 28 50 2A */ fadds f1, f8, f10
/* 80311F70 0030EED0 EC 09 E8 28 */ fsubs f0, f9, f29
/* 80311F74 0030EED4 D0 83 00 14 */ stfs f4, 0x14(r3)
/* 80311F78 0030EED8 D0 63 00 18 */ stfs f3, 0x18(r3)
/* 80311F7C 0030EEDC D0 C3 00 1C */ stfs f6, 0x1c(r3)
/* 80311F80 0030EEE0 D0 43 00 20 */ stfs f2, 0x20(r3)
/* 80311F84 0030EEE4 D0 23 00 24 */ stfs f1, 0x24(r3)
/* 80311F88 0030EEE8 D0 03 00 28 */ stfs f0, 0x28(r3)
/* 80311F8C 0030EEEC D0 A3 00 2C */ stfs f5, 0x2c(r3)
/* 80311F90 0030EEF0 E3 E1 00 48 */ psq_l f31, 72(r1), 0, qr0
/* 80311F94 0030EEF4 CB E1 00 40 */ lfd f31, 0x40(r1)
/* 80311F98 0030EEF8 E3 C1 00 38 */ psq_l f30, 56(r1), 0, qr0
/* 80311F9C 0030EEFC CB C1 00 30 */ lfd f30, 0x30(r1)
/* 80311FA0 0030EF00 E3 A1 00 28 */ psq_l f29, 40(r1), 0, qr0
/* 80311FA4 0030EF04 CB A1 00 20 */ lfd f29, 0x20(r1)
/* 80311FA8 0030EF08 E3 81 00 18 */ psq_l f28, 24(r1), 0, qr0
/* 80311FAC 0030EF0C CB 81 00 10 */ lfd f28, 0x10(r1)
/* 80311FB0 0030EF10 38 21 00 50 */ addi r1, r1, 0x50
/* 80311FB4 0030EF14 4E 80 00 20 */ blr
.global BuildTransform4f__11CQuaternionCFv
BuildTransform4f__11CQuaternionCFv:
/* 80311FB8 0030EF18 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 80311FBC 0030EF1C DB E1 00 20 */ stfd f31, 0x20(r1)
/* 80311FC0 0030EF20 F3 E1 00 28 */ psq_st f31, 40(r1), 0, qr0
/* 80311FC4 0030EF24 DB C1 00 10 */ stfd f30, 0x10(r1)
/* 80311FC8 0030EF28 F3 C1 00 18 */ psq_st f30, 24(r1), 0, qr0
/* 80311FCC 0030EF2C C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 80311FD0 0030EF30 C0 44 00 08 */ lfs f2, 8(r4)
/* 80311FD4 0030EF34 C0 C4 00 0C */ lfs f6, 0xc(r4)
/* 80311FD8 0030EF38 ED 20 00 B2 */ fmuls f9, f0, f2
/* 80311FDC 0030EF3C C0 24 00 04 */ lfs f1, 4(r4)
/* 80311FE0 0030EF40 EC E0 01 B2 */ fmuls f7, f0, f6
/* 80311FE4 0030EF44 C0 84 00 00 */ lfs f4, 0(r4)
/* 80311FE8 0030EF48 ED 00 00 72 */ fmuls f8, f0, f1
/* 80311FEC 0030EF4C C0 62 C8 74 */ lfs f3, lbl_805AE594@sda21(r2)
/* 80311FF0 0030EF50 EF E9 00 B2 */ fmuls f31, f9, f2
/* 80311FF4 0030EF54 C0 A2 C8 78 */ lfs f5, lbl_805AE598@sda21(r2)
/* 80311FF8 0030EF58 EF C7 01 B2 */ fmuls f30, f7, f6
/* 80311FFC 0030EF5C EC 08 00 72 */ fmuls f0, f8, f1
/* 80312000 0030EF60 EC 23 F8 28 */ fsubs f1, f3, f31
/* 80312004 0030EF64 ED 64 01 F2 */ fmuls f11, f4, f7
/* 80312008 0030EF68 ED 88 00 B2 */ fmuls f12, f8, f2
/* 8031200C 0030EF6C EC 21 F0 28 */ fsubs f1, f1, f30
/* 80312010 0030EF70 ED 44 02 72 */ fmuls f10, f4, f9
/* 80312014 0030EF74 ED A8 01 B2 */ fmuls f13, f8, f6
/* 80312018 0030EF78 EC 4C 58 28 */ fsubs f2, f12, f11
/* 8031201C 0030EF7C D0 23 00 00 */ stfs f1, 0(r3)
/* 80312020 0030EF80 EC E3 00 28 */ fsubs f7, f3, f0
/* 80312024 0030EF84 EC 2D 50 2A */ fadds f1, f13, f10
/* 80312028 0030EF88 D0 43 00 04 */ stfs f2, 4(r3)
/* 8031202C 0030EF8C EC 0C 58 2A */ fadds f0, f12, f11
/* 80312030 0030EF90 ED 04 02 32 */ fmuls f8, f4, f8
/* 80312034 0030EF94 EC C9 01 B2 */ fmuls f6, f9, f6
/* 80312038 0030EF98 D0 23 00 08 */ stfs f1, 8(r3)
/* 8031203C 0030EF9C EC 87 F0 28 */ fsubs f4, f7, f30
/* 80312040 0030EFA0 D0 A3 00 0C */ stfs f5, 0xc(r3)
/* 80312044 0030EFA4 EC 4D 50 28 */ fsubs f2, f13, f10
/* 80312048 0030EFA8 EC 66 40 28 */ fsubs f3, f6, f8
/* 8031204C 0030EFAC D0 03 00 10 */ stfs f0, 0x10(r3)
/* 80312050 0030EFB0 EC 26 40 2A */ fadds f1, f6, f8
/* 80312054 0030EFB4 EC 07 F8 28 */ fsubs f0, f7, f31
/* 80312058 0030EFB8 D0 83 00 14 */ stfs f4, 0x14(r3)
/* 8031205C 0030EFBC D0 63 00 18 */ stfs f3, 0x18(r3)
/* 80312060 0030EFC0 D0 A3 00 1C */ stfs f5, 0x1c(r3)
/* 80312064 0030EFC4 D0 43 00 20 */ stfs f2, 0x20(r3)
/* 80312068 0030EFC8 D0 23 00 24 */ stfs f1, 0x24(r3)
/* 8031206C 0030EFCC D0 03 00 28 */ stfs f0, 0x28(r3)
/* 80312070 0030EFD0 D0 A3 00 2C */ stfs f5, 0x2c(r3)
/* 80312074 0030EFD4 E3 E1 00 28 */ psq_l f31, 40(r1), 0, qr0
/* 80312078 0030EFD8 CB E1 00 20 */ lfd f31, 0x20(r1)
/* 8031207C 0030EFDC E3 C1 00 18 */ psq_l f30, 24(r1), 0, qr0
/* 80312080 0030EFE0 CB C1 00 10 */ lfd f30, 0x10(r1)
/* 80312084 0030EFE4 38 21 00 30 */ addi r1, r1, 0x30
/* 80312088 0030EFE8 4E 80 00 20 */ blr
.global BuildTransform__11CQuaternionCFv
BuildTransform__11CQuaternionCFv:
/* 8031208C 0030EFEC C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 80312090 0030EFF0 C0 84 00 08 */ lfs f4, 8(r4)
/* 80312094 0030EFF4 C0 A4 00 0C */ lfs f5, 0xc(r4)
/* 80312098 0030EFF8 EC E0 01 32 */ fmuls f7, f0, f4
/* 8031209C 0030EFFC C0 24 00 04 */ lfs f1, 4(r4)
/* 803120A0 0030F000 ED 00 01 72 */ fmuls f8, f0, f5
/* 803120A4 0030F004 C0 64 00 00 */ lfs f3, 0(r4)
/* 803120A8 0030F008 EC C0 00 72 */ fmuls f6, f0, f1
/* 803120AC 0030F00C C0 42 C8 74 */ lfs f2, lbl_805AE594@sda21(r2)
/* 803120B0 0030F010 ED 87 01 32 */ fmuls f12, f7, f4
/* 803120B4 0030F014 ED A8 01 72 */ fmuls f13, f8, f5
/* 803120B8 0030F018 EC 06 00 72 */ fmuls f0, f6, f1
/* 803120BC 0030F01C EC 22 60 28 */ fsubs f1, f2, f12
/* 803120C0 0030F020 ED 23 02 32 */ fmuls f9, f3, f8
/* 803120C4 0030F024 ED 46 01 32 */ fmuls f10, f6, f4
/* 803120C8 0030F028 EC 21 68 28 */ fsubs f1, f1, f13
/* 803120CC 0030F02C ED 03 01 F2 */ fmuls f8, f3, f7
/* 803120D0 0030F030 ED 66 01 72 */ fmuls f11, f6, f5
/* 803120D4 0030F034 EC 82 00 28 */ fsubs f4, f2, f0
/* 803120D8 0030F038 D0 23 00 00 */ stfs f1, 0(r3)
/* 803120DC 0030F03C EC 4A 48 28 */ fsubs f2, f10, f9
/* 803120E0 0030F040 EC 0B 40 2A */ fadds f0, f11, f8
/* 803120E4 0030F044 EC 2A 48 2A */ fadds f1, f10, f9
/* 803120E8 0030F048 D0 43 00 04 */ stfs f2, 4(r3)
/* 803120EC 0030F04C EC C3 01 B2 */ fmuls f6, f3, f6
/* 803120F0 0030F050 EC A7 01 72 */ fmuls f5, f7, f5
/* 803120F4 0030F054 D0 03 00 08 */ stfs f0, 8(r3)
/* 803120F8 0030F058 EC 04 68 28 */ fsubs f0, f4, f13
/* 803120FC 0030F05C EC 4B 40 28 */ fsubs f2, f11, f8
/* 80312100 0030F060 D0 23 00 0C */ stfs f1, 0xc(r3)
/* 80312104 0030F064 EC 65 30 28 */ fsubs f3, f5, f6
/* 80312108 0030F068 EC 25 30 2A */ fadds f1, f5, f6
/* 8031210C 0030F06C D0 03 00 10 */ stfs f0, 0x10(r3)
/* 80312110 0030F070 EC 04 60 28 */ fsubs f0, f4, f12
/* 80312114 0030F074 D0 63 00 14 */ stfs f3, 0x14(r3)
/* 80312118 0030F078 D0 43 00 18 */ stfs f2, 0x18(r3)
/* 8031211C 0030F07C D0 23 00 1C */ stfs f1, 0x1c(r3)
/* 80312120 0030F080 D0 03 00 20 */ stfs f0, 0x20(r3)
/* 80312124 0030F084 4E 80 00 20 */ blr
.global FromMatrix__11CQuaternionFRC12CTransform4f
FromMatrix__11CQuaternionFRC12CTransform4f:
/* 80312128 0030F088 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8031212C 0030F08C 7C 08 02 A6 */ mflr r0
/* 80312130 0030F090 38 A4 00 10 */ addi r5, r4, 0x10
/* 80312134 0030F094 38 C4 00 20 */ addi r6, r4, 0x20
/* 80312138 0030F098 90 01 00 24 */ stw r0, 0x24(r1)
/* 8031213C 0030F09C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80312140 0030F0A0 7C 7F 1B 78 */ mr r31, r3
/* 80312144 0030F0A4 38 61 00 08 */ addi r3, r1, 8
/* 80312148 0030F0A8 48 00 00 91 */ bl FromMatrixRows__11CQuaternionFRC9CVector3fRC9CVector3fRC9CVector3f
/* 8031214C 0030F0AC C0 21 00 0C */ lfs f1, 0xc(r1)
/* 80312150 0030F0B0 C0 41 00 10 */ lfs f2, 0x10(r1)
/* 80312154 0030F0B4 C0 61 00 14 */ lfs f3, 0x14(r1)
/* 80312158 0030F0B8 C0 01 00 08 */ lfs f0, 8(r1)
/* 8031215C 0030F0BC D0 1F 00 00 */ stfs f0, 0(r31)
/* 80312160 0030F0C0 D0 3F 00 04 */ stfs f1, 4(r31)
/* 80312164 0030F0C4 D0 5F 00 08 */ stfs f2, 8(r31)
/* 80312168 0030F0C8 D0 7F 00 0C */ stfs f3, 0xc(r31)
/* 8031216C 0030F0CC 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80312170 0030F0D0 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80312174 0030F0D4 7C 08 03 A6 */ mtlr r0
/* 80312178 0030F0D8 38 21 00 20 */ addi r1, r1, 0x20
/* 8031217C 0030F0DC 4E 80 00 20 */ blr
.global FromMatrix__11CQuaternionFRC9CMatrix3f
FromMatrix__11CQuaternionFRC9CMatrix3f:
/* 80312180 0030F0E0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80312184 0030F0E4 7C 08 02 A6 */ mflr r0
/* 80312188 0030F0E8 38 A4 00 0C */ addi r5, r4, 0xc
/* 8031218C 0030F0EC 38 C4 00 18 */ addi r6, r4, 0x18
/* 80312190 0030F0F0 90 01 00 24 */ stw r0, 0x24(r1)
/* 80312194 0030F0F4 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80312198 0030F0F8 7C 7F 1B 78 */ mr r31, r3
/* 8031219C 0030F0FC 38 61 00 08 */ addi r3, r1, 8
/* 803121A0 0030F100 48 00 00 39 */ bl FromMatrixRows__11CQuaternionFRC9CVector3fRC9CVector3fRC9CVector3f
/* 803121A4 0030F104 C0 21 00 0C */ lfs f1, 0xc(r1)
/* 803121A8 0030F108 C0 41 00 10 */ lfs f2, 0x10(r1)
/* 803121AC 0030F10C C0 61 00 14 */ lfs f3, 0x14(r1)
/* 803121B0 0030F110 C0 01 00 08 */ lfs f0, 8(r1)
/* 803121B4 0030F114 D0 1F 00 00 */ stfs f0, 0(r31)
/* 803121B8 0030F118 D0 3F 00 04 */ stfs f1, 4(r31)
/* 803121BC 0030F11C D0 5F 00 08 */ stfs f2, 8(r31)
/* 803121C0 0030F120 D0 7F 00 0C */ stfs f3, 0xc(r31)
/* 803121C4 0030F124 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 803121C8 0030F128 80 01 00 24 */ lwz r0, 0x24(r1)
/* 803121CC 0030F12C 7C 08 03 A6 */ mtlr r0
/* 803121D0 0030F130 38 21 00 20 */ addi r1, r1, 0x20
/* 803121D4 0030F134 4E 80 00 20 */ blr
.global FromMatrixRows__11CQuaternionFRC9CVector3fRC9CVector3fRC9CVector3f
FromMatrixRows__11CQuaternionFRC9CVector3fRC9CVector3fRC9CVector3f:
/* 803121D8 0030F138 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 803121DC 0030F13C 7C 08 02 A6 */ mflr r0
/* 803121E0 0030F140 C0 42 C8 74 */ lfs f2, lbl_805AE594@sda21(r2)
/* 803121E4 0030F144 90 01 00 24 */ stw r0, 0x24(r1)
/* 803121E8 0030F148 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 803121EC 0030F14C 7C DF 33 78 */ mr r31, r6
/* 803121F0 0030F150 93 C1 00 18 */ stw r30, 0x18(r1)
/* 803121F4 0030F154 7C BE 2B 78 */ mr r30, r5
/* 803121F8 0030F158 93 A1 00 14 */ stw r29, 0x14(r1)
/* 803121FC 0030F15C 7C 9D 23 78 */ mr r29, r4
/* 80312200 0030F160 93 81 00 10 */ stw r28, 0x10(r1)
/* 80312204 0030F164 7C 7C 1B 78 */ mr r28, r3
/* 80312208 0030F168 C0 64 00 00 */ lfs f3, 0(r4)
/* 8031220C 0030F16C C0 85 00 04 */ lfs f4, 4(r5)
/* 80312210 0030F170 EC 02 18 2A */ fadds f0, f2, f3
/* 80312214 0030F174 C0 A6 00 08 */ lfs f5, 8(r6)
/* 80312218 0030F178 EC 00 20 2A */ fadds f0, f0, f4
/* 8031221C 0030F17C EC 25 00 2A */ fadds f1, f5, f0
/* 80312220 0030F180 FC 01 10 40 */ fcmpo cr0, f1, f2
/* 80312224 0030F184 40 81 00 5C */ ble lbl_80312280
/* 80312228 0030F188 48 00 32 D9 */ bl SqrtF__5CMathFf
/* 8031222C 0030F18C C0 42 C8 7C */ lfs f2, lbl_805AE59C@sda21(r2)
/* 80312230 0030F190 C0 02 C8 B8 */ lfs f0, lbl_805AE5D8@sda21(r2)
/* 80312234 0030F194 EC C1 00 B2 */ fmuls f6, f1, f2
/* 80312238 0030F198 C0 BF 00 04 */ lfs f5, 4(r31)
/* 8031223C 0030F19C C0 9E 00 08 */ lfs f4, 8(r30)
/* 80312240 0030F1A0 C0 7D 00 08 */ lfs f3, 8(r29)
/* 80312244 0030F1A4 EC E0 30 24 */ fdivs f7, f0, f6
/* 80312248 0030F1A8 C0 5F 00 00 */ lfs f2, 0(r31)
/* 8031224C 0030F1AC C0 3E 00 00 */ lfs f1, 0(r30)
/* 80312250 0030F1B0 C0 1D 00 04 */ lfs f0, 4(r29)
/* 80312254 0030F1B4 D0 DC 00 00 */ stfs f6, 0(r28)
/* 80312258 0030F1B8 EC 43 10 28 */ fsubs f2, f3, f2
/* 8031225C 0030F1BC EC 01 00 28 */ fsubs f0, f1, f0
/* 80312260 0030F1C0 EC 85 20 28 */ fsubs f4, f5, f4
/* 80312264 0030F1C4 EC 47 00 B2 */ fmuls f2, f7, f2
/* 80312268 0030F1C8 EC 07 00 32 */ fmuls f0, f7, f0
/* 8031226C 0030F1CC EC 27 01 32 */ fmuls f1, f7, f4
/* 80312270 0030F1D0 D0 3C 00 04 */ stfs f1, 4(r28)
/* 80312274 0030F1D4 D0 5C 00 08 */ stfs f2, 8(r28)
/* 80312278 0030F1D8 D0 1C 00 0C */ stfs f0, 0xc(r28)
/* 8031227C 0030F1DC 48 00 01 94 */ b lbl_80312410
lbl_80312280:
/* 80312280 0030F1E0 FC 04 18 40 */ fcmpo cr0, f4, f3
/* 80312284 0030F1E4 40 81 00 1C */ ble lbl_803122A0
/* 80312288 0030F1E8 FC 05 20 40 */ fcmpo cr0, f5, f4
/* 8031228C 0030F1EC 40 81 00 0C */ ble lbl_80312298
/* 80312290 0030F1F0 38 00 00 02 */ li r0, 2
/* 80312294 0030F1F4 48 00 00 20 */ b lbl_803122B4
lbl_80312298:
/* 80312298 0030F1F8 38 00 00 01 */ li r0, 1
/* 8031229C 0030F1FC 48 00 00 18 */ b lbl_803122B4
lbl_803122A0:
/* 803122A0 0030F200 FC 05 18 40 */ fcmpo cr0, f5, f3
/* 803122A4 0030F204 40 81 00 0C */ ble lbl_803122B0
/* 803122A8 0030F208 38 00 00 02 */ li r0, 2
/* 803122AC 0030F20C 48 00 00 08 */ b lbl_803122B4
lbl_803122B0:
/* 803122B0 0030F210 38 00 00 00 */ li r0, 0
lbl_803122B4:
/* 803122B4 0030F214 2C 00 00 00 */ cmpwi r0, 0
/* 803122B8 0030F218 40 82 00 74 */ bne lbl_8031232C
/* 803122BC 0030F21C EC 03 20 28 */ fsubs f0, f3, f4
/* 803122C0 0030F220 C0 22 C8 74 */ lfs f1, lbl_805AE594@sda21(r2)
/* 803122C4 0030F224 EC 00 28 28 */ fsubs f0, f0, f5
/* 803122C8 0030F228 EC 21 00 2A */ fadds f1, f1, f0
/* 803122CC 0030F22C 48 00 32 35 */ bl SqrtF__5CMathFf
/* 803122D0 0030F230 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 803122D4 0030F234 C0 62 C8 74 */ lfs f3, lbl_805AE594@sda21(r2)
/* 803122D8 0030F238 EC E0 00 72 */ fmuls f7, f0, f1
/* 803122DC 0030F23C C0 02 C8 B8 */ lfs f0, lbl_805AE5D8@sda21(r2)
/* 803122E0 0030F240 C0 5F 00 04 */ lfs f2, 4(r31)
/* 803122E4 0030F244 C0 3E 00 08 */ lfs f1, 8(r30)
/* 803122E8 0030F248 ED 03 38 24 */ fdivs f8, f3, f7
/* 803122EC 0030F24C C0 DD 00 04 */ lfs f6, 4(r29)
/* 803122F0 0030F250 C0 BE 00 00 */ lfs f5, 0(r30)
/* 803122F4 0030F254 C0 9D 00 08 */ lfs f4, 8(r29)
/* 803122F8 0030F258 C0 7F 00 00 */ lfs f3, 0(r31)
/* 803122FC 0030F25C EC 22 08 28 */ fsubs f1, f2, f1
/* 80312300 0030F260 EC A6 28 2A */ fadds f5, f6, f5
/* 80312304 0030F264 EC 07 00 32 */ fmuls f0, f7, f0
/* 80312308 0030F268 EC 28 00 72 */ fmuls f1, f8, f1
/* 8031230C 0030F26C EC 44 18 2A */ fadds f2, f4, f3
/* 80312310 0030F270 EC 68 01 72 */ fmuls f3, f8, f5
/* 80312314 0030F274 D0 3C 00 00 */ stfs f1, 0(r28)
/* 80312318 0030F278 EC 28 00 B2 */ fmuls f1, f8, f2
/* 8031231C 0030F27C D0 1C 00 04 */ stfs f0, 4(r28)
/* 80312320 0030F280 D0 7C 00 08 */ stfs f3, 8(r28)
/* 80312324 0030F284 D0 3C 00 0C */ stfs f1, 0xc(r28)
/* 80312328 0030F288 48 00 00 E8 */ b lbl_80312410
lbl_8031232C:
/* 8031232C 0030F28C 2C 00 00 01 */ cmpwi r0, 1
/* 80312330 0030F290 40 82 00 74 */ bne lbl_803123A4
/* 80312334 0030F294 EC 04 28 28 */ fsubs f0, f4, f5
/* 80312338 0030F298 C0 22 C8 74 */ lfs f1, lbl_805AE594@sda21(r2)
/* 8031233C 0030F29C EC 00 18 28 */ fsubs f0, f0, f3
/* 80312340 0030F2A0 EC 21 00 2A */ fadds f1, f1, f0
/* 80312344 0030F2A4 48 00 31 BD */ bl SqrtF__5CMathFf
/* 80312348 0030F2A8 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 8031234C 0030F2AC C0 62 C8 74 */ lfs f3, lbl_805AE594@sda21(r2)
/* 80312350 0030F2B0 EC E0 00 72 */ fmuls f7, f0, f1
/* 80312354 0030F2B4 C0 02 C8 B8 */ lfs f0, lbl_805AE5D8@sda21(r2)
/* 80312358 0030F2B8 C0 5D 00 08 */ lfs f2, 8(r29)
/* 8031235C 0030F2BC C0 3F 00 00 */ lfs f1, 0(r31)
/* 80312360 0030F2C0 ED 03 38 24 */ fdivs f8, f3, f7
/* 80312364 0030F2C4 C0 9E 00 00 */ lfs f4, 0(r30)
/* 80312368 0030F2C8 C0 7D 00 04 */ lfs f3, 4(r29)
/* 8031236C 0030F2CC C0 DE 00 08 */ lfs f6, 8(r30)
/* 80312370 0030F2D0 C0 BF 00 04 */ lfs f5, 4(r31)
/* 80312374 0030F2D4 EC 22 08 28 */ fsubs f1, f2, f1
/* 80312378 0030F2D8 EC 44 18 2A */ fadds f2, f4, f3
/* 8031237C 0030F2DC EC 66 28 2A */ fadds f3, f6, f5
/* 80312380 0030F2E0 EC 28 00 72 */ fmuls f1, f8, f1
/* 80312384 0030F2E4 EC 48 00 B2 */ fmuls f2, f8, f2
/* 80312388 0030F2E8 EC 07 00 32 */ fmuls f0, f7, f0
/* 8031238C 0030F2EC D0 3C 00 00 */ stfs f1, 0(r28)
/* 80312390 0030F2F0 EC 28 00 F2 */ fmuls f1, f8, f3
/* 80312394 0030F2F4 D0 5C 00 04 */ stfs f2, 4(r28)
/* 80312398 0030F2F8 D0 1C 00 08 */ stfs f0, 8(r28)
/* 8031239C 0030F2FC D0 3C 00 0C */ stfs f1, 0xc(r28)
/* 803123A0 0030F300 48 00 00 70 */ b lbl_80312410
lbl_803123A4:
/* 803123A4 0030F304 EC 05 18 28 */ fsubs f0, f5, f3
/* 803123A8 0030F308 C0 22 C8 74 */ lfs f1, lbl_805AE594@sda21(r2)
/* 803123AC 0030F30C EC 00 20 28 */ fsubs f0, f0, f4
/* 803123B0 0030F310 EC 21 00 2A */ fadds f1, f1, f0
/* 803123B4 0030F314 48 00 31 4D */ bl SqrtF__5CMathFf
/* 803123B8 0030F318 C0 02 C8 70 */ lfs f0, lbl_805AE590@sda21(r2)
/* 803123BC 0030F31C C0 62 C8 74 */ lfs f3, lbl_805AE594@sda21(r2)
/* 803123C0 0030F320 EC E0 00 72 */ fmuls f7, f0, f1
/* 803123C4 0030F324 C0 02 C8 B8 */ lfs f0, lbl_805AE5D8@sda21(r2)
/* 803123C8 0030F328 C0 5E 00 00 */ lfs f2, 0(r30)
/* 803123CC 0030F32C C0 3D 00 04 */ lfs f1, 4(r29)
/* 803123D0 0030F330 ED 03 38 24 */ fdivs f8, f3, f7
/* 803123D4 0030F334 C0 DF 00 00 */ lfs f6, 0(r31)
/* 803123D8 0030F338 C0 BD 00 08 */ lfs f5, 8(r29)
/* 803123DC 0030F33C C0 9F 00 04 */ lfs f4, 4(r31)
/* 803123E0 0030F340 C0 7E 00 08 */ lfs f3, 8(r30)
/* 803123E4 0030F344 EC 22 08 28 */ fsubs f1, f2, f1
/* 803123E8 0030F348 EC 44 18 2A */ fadds f2, f4, f3
/* 803123EC 0030F34C EC A6 28 2A */ fadds f5, f6, f5
/* 803123F0 0030F350 EC 28 00 72 */ fmuls f1, f8, f1
/* 803123F4 0030F354 EC 48 00 B2 */ fmuls f2, f8, f2
/* 803123F8 0030F358 EC 68 01 72 */ fmuls f3, f8, f5
/* 803123FC 0030F35C D0 3C 00 00 */ stfs f1, 0(r28)
/* 80312400 0030F360 EC 07 00 32 */ fmuls f0, f7, f0
/* 80312404 0030F364 D0 7C 00 04 */ stfs f3, 4(r28)
/* 80312408 0030F368 D0 5C 00 08 */ stfs f2, 8(r28)
/* 8031240C 0030F36C D0 1C 00 0C */ stfs f0, 0xc(r28)
lbl_80312410:
/* 80312410 0030F370 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80312414 0030F374 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80312418 0030F378 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8031241C 0030F37C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80312420 0030F380 83 81 00 10 */ lwz r28, 0x10(r1)
/* 80312424 0030F384 7C 08 03 A6 */ mtlr r0
/* 80312428 0030F388 38 21 00 20 */ addi r1, r1, 0x20
/* 8031242C 0030F38C 4E 80 00 20 */ blr
.global __ct__11CQuaternionFR12CInputStream
__ct__11CQuaternionFR12CInputStream:
/* 80312430 0030F390 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80312434 0030F394 7C 08 02 A6 */ mflr r0
/* 80312438 0030F398 90 01 00 14 */ stw r0, 0x14(r1)
/* 8031243C 0030F39C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80312440 0030F3A0 7C 9F 23 78 */ mr r31, r4
/* 80312444 0030F3A4 93 C1 00 08 */ stw r30, 8(r1)
/* 80312448 0030F3A8 7C 7E 1B 78 */ mr r30, r3
/* 8031244C 0030F3AC 7F E3 FB 78 */ mr r3, r31
/* 80312450 0030F3B0 48 02 C7 D9 */ bl ReadFloat__12CInputStreamFv
/* 80312454 0030F3B4 D0 3E 00 00 */ stfs f1, 0(r30)
/* 80312458 0030F3B8 7F E4 FB 78 */ mr r4, r31
/* 8031245C 0030F3BC 38 7E 00 04 */ addi r3, r30, 4
/* 80312460 0030F3C0 48 00 27 2D */ bl __ct__9CVector3fFR12CInputStream
/* 80312464 0030F3C4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80312468 0030F3C8 7F C3 F3 78 */ mr r3, r30
/* 8031246C 0030F3CC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80312470 0030F3D0 83 C1 00 08 */ lwz r30, 8(r1)
/* 80312474 0030F3D4 7C 08 03 A6 */ mtlr r0
/* 80312478 0030F3D8 38 21 00 10 */ addi r1, r1, 0x10
/* 8031247C 0030F3DC 4E 80 00 20 */ blr
.global __sinit_CQuaternion_cpp
__sinit_CQuaternion_cpp:
/* 80312480 0030F3E0 3C 80 80 4C */ lis r4, XAxis@ha
/* 80312484 0030F3E4 3C 60 80 5A */ lis r3, sNoRotation__11CQuaternion@ha
/* 80312488 0030F3E8 38 E4 FD 30 */ addi r7, r4, XAxis@l
/* 8031248C 0030F3EC C0 02 C8 78 */ lfs f0, lbl_805AE598@sda21(r2)
/* 80312490 0030F3F0 38 C3 66 60 */ addi r6, r3, sNoRotation__11CQuaternion@l
/* 80312494 0030F3F4 C0 22 C8 74 */ lfs f1, lbl_805AE594@sda21(r2)
/* 80312498 0030F3F8 38 A7 00 00 */ addi r5, r7, 0
/* 8031249C 0030F3FC 38 87 00 0C */ addi r4, r7, 0xc
/* 803124A0 0030F400 38 67 00 18 */ addi r3, r7, 0x18
/* 803124A4 0030F404 D0 26 00 00 */ stfs f1, 0(r6)
/* 803124A8 0030F408 D0 06 00 04 */ stfs f0, 4(r6)
/* 803124AC 0030F40C D0 06 00 08 */ stfs f0, 8(r6)
/* 803124B0 0030F410 D0 06 00 0C */ stfs f0, 0xc(r6)
/* 803124B4 0030F414 D0 27 00 00 */ stfs f1, 0(r7)
/* 803124B8 0030F418 D0 05 00 04 */ stfs f0, 4(r5)
/* 803124BC 0030F41C D0 05 00 08 */ stfs f0, 8(r5)
/* 803124C0 0030F420 D0 07 00 0C */ stfs f0, 0xc(r7)
/* 803124C4 0030F424 D0 24 00 04 */ stfs f1, 4(r4)
/* 803124C8 0030F428 D0 04 00 08 */ stfs f0, 8(r4)
/* 803124CC 0030F42C D0 07 00 18 */ stfs f0, 0x18(r7)
/* 803124D0 0030F430 D0 03 00 04 */ stfs f0, 4(r3)
/* 803124D4 0030F434 D0 23 00 08 */ stfs f1, 8(r3)
/* 803124D8 0030F438 4E 80 00 20 */ blr
.section .sdata2, "a"
.balign 8
.global lbl_805AE580
lbl_805AE580:
# ROM: 0x3FAE20
.4byte 0
.global lbl_805AE584
lbl_805AE584:
# ROM: 0x3FAE24
.float 1.0
.global lbl_805AE588
lbl_805AE588:
# ROM: 0x3FAE28
.float 0.5
.4byte 0
.global lbl_805AE590
lbl_805AE590:
# ROM: 0x3FAE30
.float 2.0
.global lbl_805AE594
lbl_805AE594:
# ROM: 0x3FAE34
.float 1.0
.global lbl_805AE598
lbl_805AE598:
# ROM: 0x3FAE38
.4byte 0
.global lbl_805AE59C
lbl_805AE59C:
# ROM: 0x3FAE3C
.float 0.5
.global lbl_805AE5A0
lbl_805AE5A0:
# ROM: 0x3FAE40
.float 2.0
.4byte 0
.global lbl_805AE5A8
lbl_805AE5A8:
# ROM: 0x3FAE48
.4byte 0x401921FB
.4byte 0x54442D18
.global lbl_805AE5B0
lbl_805AE5B0:
# ROM: 0x3FAE50
.4byte 0
.4byte 0
.global lbl_805AE5B8
lbl_805AE5B8:
# ROM: 0x3FAE58
.4byte 0x3E7AD7F2
.4byte 0x9ABCAF48
.global lbl_805AE5C0
lbl_805AE5C0:
# ROM: 0x3FAE60
.float -1.0
.global lbl_805AE5C4
lbl_805AE5C4:
# ROM: 0x3FAE64
.float 1.0E-4
.global lbl_805AE5C8
lbl_805AE5C8:
# ROM: 0x3FAE68
.4byte 0x40490FDB
.global lbl_805AE5CC
lbl_805AE5CC:
# ROM: 0x3FAE6C
.float 0.001
.global lbl_805AE5D0
lbl_805AE5D0:
# ROM: 0x3FAE70
.double 1.0
.global lbl_805AE5D8
lbl_805AE5D8:
# ROM: 0x3FAE78
.float 0.25
.4byte 0