prime/asm/Kyoto/PVS/CPVSVisOctree.s

184 lines
7.5 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax"
.global GetNumChildren__13CPVSVisOctreeCFUc
GetNumChildren__13CPVSVisOctreeCFUc:
/* 80315D78 00312CD8 3C 60 80 3D */ lis r3, lbl_803D7820@ha
/* 80315D7C 00312CDC 54 80 16 FA */ rlwinm r0, r4, 2, 0x1b, 0x1d
/* 80315D80 00312CE0 38 63 78 20 */ addi r3, r3, lbl_803D7820@l
/* 80315D84 00312CE4 7C 63 00 2E */ lwzx r3, r3, r0
/* 80315D88 00312CE8 4E 80 00 20 */ blr
.global IterateSearch__13CPVSVisOctreeCFUcRC9CVector3f
IterateSearch__13CPVSVisOctreeCFUcRC9CVector3f:
/* 80315D8C 00312CEC 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80315D90 00312CF0 54 80 07 7F */ clrlwi. r0, r4, 0x1d
/* 80315D94 00312CF4 54 84 06 3E */ clrlwi r4, r4, 0x18
/* 80315D98 00312CF8 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80315D9C 00312CFC 40 82 00 0C */ bne lbl_80315DA8
/* 80315DA0 00312D00 38 60 FF FF */ li r3, -1
/* 80315DA4 00312D04 48 00 01 C8 */ b lbl_80315F6C
lbl_80315DA8:
/* 80315DA8 00312D08 C0 23 00 38 */ lfs f1, 0x38(r3)
/* 80315DAC 00312D0C C0 63 00 2C */ lfs f3, 0x2c(r3)
/* 80315DB0 00312D10 C0 03 00 3C */ lfs f0, 0x3c(r3)
/* 80315DB4 00312D14 C0 E3 00 30 */ lfs f7, 0x30(r3)
/* 80315DB8 00312D18 EC 21 18 28 */ fsubs f1, f1, f3
/* 80315DBC 00312D1C C0 82 C9 D0 */ lfs f4, lbl_805AE6F0@sda21(r2)
/* 80315DC0 00312D20 EC C0 38 28 */ fsubs f6, f0, f7
/* 80315DC4 00312D24 C0 43 00 40 */ lfs f2, 0x40(r3)
/* 80315DC8 00312D28 C1 03 00 34 */ lfs f8, 0x34(r3)
/* 80315DCC 00312D2C EC 24 00 72 */ fmuls f1, f4, f1
/* 80315DD0 00312D30 C0 05 00 00 */ lfs f0, 0(r5)
/* 80315DD4 00312D34 EC A2 40 28 */ fsubs f5, f2, f8
/* 80315DD8 00312D38 EC 61 18 2A */ fadds f3, f1, f3
/* 80315DDC 00312D3C EC 44 01 B2 */ fmuls f2, f4, f6
/* 80315DE0 00312D40 EC 24 01 72 */ fmuls f1, f4, f5
/* 80315DE4 00312D44 FC 00 18 40 */ fcmpo cr0, f0, f3
/* 80315DE8 00312D48 D0 61 00 08 */ stfs f3, 8(r1)
/* 80315DEC 00312D4C EC 42 38 2A */ fadds f2, f2, f7
/* 80315DF0 00312D50 EC 21 40 2A */ fadds f1, f1, f8
/* 80315DF4 00312D54 D0 41 00 0C */ stfs f2, 0xc(r1)
/* 80315DF8 00312D58 D0 21 00 10 */ stfs f1, 0x10(r1)
/* 80315DFC 00312D5C 40 81 00 10 */ ble lbl_80315E0C
/* 80315E00 00312D60 C0 83 00 38 */ lfs f4, 0x38(r3)
/* 80315E04 00312D64 39 60 00 01 */ li r11, 1
/* 80315E08 00312D68 48 00 00 10 */ b lbl_80315E18
lbl_80315E0C:
/* 80315E0C 00312D6C FC 80 18 90 */ fmr f4, f3
/* 80315E10 00312D70 C0 63 00 2C */ lfs f3, 0x2c(r3)
/* 80315E14 00312D74 39 60 00 00 */ li r11, 0
lbl_80315E18:
/* 80315E18 00312D78 C0 05 00 04 */ lfs f0, 4(r5)
/* 80315E1C 00312D7C C0 21 00 0C */ lfs f1, 0xc(r1)
/* 80315E20 00312D80 FC 00 08 40 */ fcmpo cr0, f0, f1
/* 80315E24 00312D84 40 81 00 14 */ ble lbl_80315E38
/* 80315E28 00312D88 FC 40 08 90 */ fmr f2, f1
/* 80315E2C 00312D8C C0 A3 00 3C */ lfs f5, 0x3c(r3)
/* 80315E30 00312D90 38 C0 00 01 */ li r6, 1
/* 80315E34 00312D94 48 00 00 10 */ b lbl_80315E44
lbl_80315E38:
/* 80315E38 00312D98 FC A0 08 90 */ fmr f5, f1
/* 80315E3C 00312D9C C0 43 00 30 */ lfs f2, 0x30(r3)
/* 80315E40 00312DA0 38 C0 00 00 */ li r6, 0
lbl_80315E44:
/* 80315E44 00312DA4 C0 05 00 08 */ lfs f0, 8(r5)
/* 80315E48 00312DA8 C0 21 00 10 */ lfs f1, 0x10(r1)
/* 80315E4C 00312DAC FC 00 08 40 */ fcmpo cr0, f0, f1
/* 80315E50 00312DB0 40 81 00 14 */ ble lbl_80315E64
/* 80315E54 00312DB4 FC 00 08 90 */ fmr f0, f1
/* 80315E58 00312DB8 C0 C3 00 40 */ lfs f6, 0x40(r3)
/* 80315E5C 00312DBC 38 00 00 01 */ li r0, 1
/* 80315E60 00312DC0 48 00 00 10 */ b lbl_80315E70
lbl_80315E64:
/* 80315E64 00312DC4 FC C0 08 90 */ fmr f6, f1
/* 80315E68 00312DC8 C0 03 00 34 */ lfs f0, 0x34(r3)
/* 80315E6C 00312DCC 38 00 00 00 */ li r0, 0
lbl_80315E70:
/* 80315E70 00312DD0 54 89 07 FF */ clrlwi. r9, r4, 0x1f
/* 80315E74 00312DD4 39 80 00 01 */ li r12, 1
/* 80315E78 00312DD8 3B E0 00 01 */ li r31, 1
/* 80315E7C 00312DDC 41 82 00 08 */ beq lbl_80315E84
/* 80315E80 00312DE0 39 80 00 02 */ li r12, 2
lbl_80315E84:
/* 80315E84 00312DE4 54 88 07 BD */ rlwinm. r8, r4, 0, 0x1e, 0x1e
/* 80315E88 00312DE8 41 82 00 08 */ beq lbl_80315E90
/* 80315E8C 00312DEC 3B E0 00 02 */ li r31, 2
lbl_80315E90:
/* 80315E90 00312DF0 54 8A 07 7B */ rlwinm. r10, r4, 0, 0x1d, 0x1d
/* 80315E94 00312DF4 41 82 00 0C */ beq lbl_80315EA0
/* 80315E98 00312DF8 FC 20 00 90 */ fmr f1, f0
/* 80315E9C 00312DFC 48 00 00 08 */ b lbl_80315EA4
lbl_80315EA0:
/* 80315EA0 00312E00 C0 23 00 34 */ lfs f1, 0x34(r3)
lbl_80315EA4:
/* 80315EA4 00312E04 2C 08 00 00 */ cmpwi r8, 0
/* 80315EA8 00312E08 41 82 00 08 */ beq lbl_80315EB0
/* 80315EAC 00312E0C 48 00 00 08 */ b lbl_80315EB4
lbl_80315EB0:
/* 80315EB0 00312E10 C0 43 00 30 */ lfs f2, 0x30(r3)
lbl_80315EB4:
/* 80315EB4 00312E14 2C 09 00 00 */ cmpwi r9, 0
/* 80315EB8 00312E18 41 82 00 0C */ beq lbl_80315EC4
/* 80315EBC 00312E1C FC 00 18 90 */ fmr f0, f3
/* 80315EC0 00312E20 48 00 00 08 */ b lbl_80315EC8
lbl_80315EC4:
/* 80315EC4 00312E24 C0 03 00 2C */ lfs f0, 0x2c(r3)
lbl_80315EC8:
/* 80315EC8 00312E28 D0 03 00 2C */ stfs f0, 0x2c(r3)
/* 80315ECC 00312E2C 2C 0A 00 00 */ cmpwi r10, 0
/* 80315ED0 00312E30 D0 43 00 30 */ stfs f2, 0x30(r3)
/* 80315ED4 00312E34 D0 23 00 34 */ stfs f1, 0x34(r3)
/* 80315ED8 00312E38 41 82 00 0C */ beq lbl_80315EE4
/* 80315EDC 00312E3C FC 20 30 90 */ fmr f1, f6
/* 80315EE0 00312E40 48 00 00 08 */ b lbl_80315EE8
lbl_80315EE4:
/* 80315EE4 00312E44 C0 23 00 40 */ lfs f1, 0x40(r3)
lbl_80315EE8:
/* 80315EE8 00312E48 2C 08 00 00 */ cmpwi r8, 0
/* 80315EEC 00312E4C 41 82 00 0C */ beq lbl_80315EF8
/* 80315EF0 00312E50 FC 40 28 90 */ fmr f2, f5
/* 80315EF4 00312E54 48 00 00 08 */ b lbl_80315EFC
lbl_80315EF8:
/* 80315EF8 00312E58 C0 43 00 3C */ lfs f2, 0x3c(r3)
lbl_80315EFC:
/* 80315EFC 00312E5C 2C 09 00 00 */ cmpwi r9, 0
/* 80315F00 00312E60 41 82 00 0C */ beq lbl_80315F0C
/* 80315F04 00312E64 FC 00 20 90 */ fmr f0, f4
/* 80315F08 00312E68 48 00 00 08 */ b lbl_80315F10
lbl_80315F0C:
/* 80315F0C 00312E6C C0 03 00 38 */ lfs f0, 0x38(r3)
lbl_80315F10:
/* 80315F10 00312E70 54 00 06 3E */ clrlwi r0, r0, 0x18
/* 80315F14 00312E74 54 C5 06 3E */ clrlwi r5, r6, 0x18
/* 80315F18 00312E78 7C 00 61 D6 */ mullw r0, r0, r12
/* 80315F1C 00312E7C 7C C8 00 D0 */ neg r6, r8
/* 80315F20 00312E80 7C 8A 00 D0 */ neg r4, r10
/* 80315F24 00312E84 D0 03 00 38 */ stfs f0, 0x38(r3)
/* 80315F28 00312E88 7C E9 00 D0 */ neg r7, r9
/* 80315F2C 00312E8C 7C C6 43 78 */ or r6, r6, r8
/* 80315F30 00312E90 7C A5 61 D6 */ mullw r5, r5, r12
/* 80315F34 00312E94 7C 84 53 78 */ or r4, r4, r10
/* 80315F38 00312E98 7C E7 4B 78 */ or r7, r7, r9
/* 80315F3C 00312E9C D0 43 00 3C */ stfs f2, 0x3c(r3)
/* 80315F40 00312EA0 54 C6 0F FE */ srwi r6, r6, 0x1f
/* 80315F44 00312EA4 54 84 0F FE */ srwi r4, r4, 0x1f
/* 80315F48 00312EA8 7C 1F 01 D6 */ mullw r0, r31, r0
/* 80315F4C 00312EAC 55 68 06 3E */ clrlwi r8, r11, 0x18
/* 80315F50 00312EB0 54 E7 0F FE */ srwi r7, r7, 0x1f
/* 80315F54 00312EB4 D0 23 00 40 */ stfs f1, 0x40(r3)
/* 80315F58 00312EB8 7C 66 29 D6 */ mullw r3, r6, r5
/* 80315F5C 00312EBC 7C 04 01 D6 */ mullw r0, r4, r0
/* 80315F60 00312EC0 7C 88 39 D6 */ mullw r4, r8, r7
/* 80315F64 00312EC4 7C 63 02 14 */ add r3, r3, r0
/* 80315F68 00312EC8 7C 64 1A 14 */ add r3, r4, r3
lbl_80315F6C:
/* 80315F6C 00312ECC 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80315F70 00312ED0 38 21 00 20 */ addi r1, r1, 0x20
/* 80315F74 00312ED4 4E 80 00 20 */ blr
.section .sdata2, "a"
.balign 8
.global lbl_805AE6F0
lbl_805AE6F0:
# ROM: 0x3FAF90
.float 0.5
.4byte 0
.section .rodata
.balign 8
.global lbl_803D7820
lbl_803D7820:
# ROM: 0x3D4820
.4byte 0
.4byte 0x00000002
.4byte 0x00000002
.4byte 0x00000004
.4byte 0x00000002
.4byte 0x00000004
.4byte 0x00000004
.4byte 0x00000008