donut-decomp/asm/libnw4r_g3d/g3d_resanmvis.s
2022-07-21 16:12:13 +01:00

97 lines
4.2 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260
.global GetAnmResult__Q34nw4r3g3d9ResAnmVisCFUlf
GetAnmResult__Q34nw4r3g3d9ResAnmVisCFUlf:
/* 800CF6B0 000CB4F0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800CF6B4 000CB4F4 7C 08 02 A6 */ mflr r0
/* 800CF6B8 000CB4F8 80 A3 00 00 */ lwz r5, 0(r3)
/* 800CF6BC 000CB4FC 90 01 00 24 */ stw r0, 0x24(r1)
/* 800CF6C0 000CB500 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800CF6C4 000CB504 80 05 00 10 */ lwz r0, 0x10(r5)
/* 800CF6C8 000CB508 2C 00 00 00 */ cmpwi r0, 0
/* 800CF6CC 000CB50C 41 82 00 0C */ beq lbl_800CF6D8
/* 800CF6D0 000CB510 7C 05 02 14 */ add r0, r5, r0
/* 800CF6D4 000CB514 48 00 00 08 */ b lbl_800CF6DC
lbl_800CF6D8:
/* 800CF6D8 000CB518 38 00 00 00 */ li r0, 0
lbl_800CF6DC:
/* 800CF6DC 000CB51C 2C 00 00 00 */ cmpwi r0, 0
/* 800CF6E0 000CB520 41 82 00 2C */ beq lbl_800CF70C
/* 800CF6E4 000CB524 38 84 00 01 */ addi r4, r4, 1
/* 800CF6E8 000CB528 54 84 20 36 */ slwi r4, r4, 4
/* 800CF6EC 000CB52C 7C 80 22 14 */ add r4, r0, r4
/* 800CF6F0 000CB530 80 84 00 14 */ lwz r4, 0x14(r4)
/* 800CF6F4 000CB534 2C 04 00 00 */ cmpwi r4, 0
/* 800CF6F8 000CB538 41 82 00 0C */ beq lbl_800CF704
/* 800CF6FC 000CB53C 7F E0 22 14 */ add r31, r0, r4
/* 800CF700 000CB540 48 00 00 10 */ b lbl_800CF710
lbl_800CF704:
/* 800CF704 000CB544 3B E0 00 00 */ li r31, 0
/* 800CF708 000CB548 48 00 00 08 */ b lbl_800CF710
lbl_800CF70C:
/* 800CF70C 000CB54C 3B E0 00 00 */ li r31, 0
lbl_800CF710:
/* 800CF710 000CB550 80 9F 00 04 */ lwz r4, 4(r31)
/* 800CF714 000CB554 80 63 00 00 */ lwz r3, 0(r3)
/* 800CF718 000CB558 54 80 07 BD */ rlwinm. r0, r4, 0, 0x1e, 0x1e
/* 800CF71C 000CB55C 41 82 00 0C */ beq lbl_800CF728
/* 800CF720 000CB560 54 83 07 FE */ clrlwi r3, r4, 0x1f
/* 800CF724 000CB564 48 00 00 98 */ b lbl_800CF7BC
lbl_800CF728:
/* 800CF728 000CB568 C0 02 8F 08 */ lfs f0, $$25876-_SDA2_BASE_(r2)
/* 800CF72C 000CB56C FC 01 00 40 */ fcmpo cr0, f1, f0
/* 800CF730 000CB570 4C 40 13 82 */ cror 2, 0, 2
/* 800CF734 000CB574 40 82 00 08 */ bne lbl_800CF73C
/* 800CF738 000CB578 48 00 00 44 */ b lbl_800CF77C
lbl_800CF73C:
/* 800CF73C 000CB57C A0 63 00 20 */ lhz r3, 0x20(r3)
/* 800CF740 000CB580 3C 00 43 30 */ lis r0, 0x4330
/* 800CF744 000CB584 90 61 00 0C */ stw r3, 0xc(r1)
/* 800CF748 000CB588 C8 42 8F 10 */ lfd f2, $$25879-_SDA2_BASE_(r2)
/* 800CF74C 000CB58C 90 01 00 08 */ stw r0, 8(r1)
/* 800CF750 000CB590 C8 01 00 08 */ lfd f0, 8(r1)
/* 800CF754 000CB594 EC 00 10 28 */ fsubs f0, f0, f2
/* 800CF758 000CB598 FC 00 08 40 */ fcmpo cr0, f0, f1
/* 800CF75C 000CB59C 4C 40 13 82 */ cror 2, 0, 2
/* 800CF760 000CB5A0 40 82 00 18 */ bne lbl_800CF778
/* 800CF764 000CB5A4 90 61 00 14 */ stw r3, 0x14(r1)
/* 800CF768 000CB5A8 90 01 00 10 */ stw r0, 0x10(r1)
/* 800CF76C 000CB5AC C8 01 00 10 */ lfd f0, 0x10(r1)
/* 800CF770 000CB5B0 EC 00 10 28 */ fsubs f0, f0, f2
/* 800CF774 000CB5B4 48 00 00 08 */ b lbl_800CF77C
lbl_800CF778:
/* 800CF778 000CB5B8 FC 00 08 90 */ fmr f0, f1
lbl_800CF77C:
/* 800CF77C 000CB5BC FC 20 00 90 */ fmr f1, f0
/* 800CF780 000CB5C0 4B F4 48 85 */ bl floor
/* 800CF784 000CB5C4 FC 00 08 18 */ frsp f0, f1
/* 800CF788 000CB5C8 3C 60 80 00 */ lis r3, 0x8000
/* 800CF78C 000CB5CC FC 00 00 1E */ fctiwz f0, f0
/* 800CF790 000CB5D0 D8 01 00 10 */ stfd f0, 0x10(r1)
/* 800CF794 000CB5D4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 800CF798 000CB5D8 54 04 E8 FA */ rlwinm r4, r0, 0x1d, 3, 0x1d
/* 800CF79C 000CB5DC 54 00 06 FE */ clrlwi r0, r0, 0x1b
/* 800CF7A0 000CB5E0 7C 9F 22 14 */ add r4, r31, r4
/* 800CF7A4 000CB5E4 80 84 00 08 */ lwz r4, 8(r4)
/* 800CF7A8 000CB5E8 7C 60 04 30 */ srw r0, r3, r0
/* 800CF7AC 000CB5EC 7C 83 00 38 */ and r3, r4, r0
/* 800CF7B0 000CB5F0 7C 03 00 D0 */ neg r0, r3
/* 800CF7B4 000CB5F4 7C 00 1B 78 */ or r0, r0, r3
/* 800CF7B8 000CB5F8 54 03 0F FE */ srwi r3, r0, 0x1f
lbl_800CF7BC:
/* 800CF7BC 000CB5FC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 800CF7C0 000CB600 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 800CF7C4 000CB604 7C 08 03 A6 */ mtlr r0
/* 800CF7C8 000CB608 38 21 00 20 */ addi r1, r1, 0x20
/* 800CF7CC 000CB60C 4E 80 00 20 */ blr
.section .sdata2, "wa" # 0x8055DF80 - 0x805643C0
.global $$25876
$$25876:
.4byte 0
.4byte 0
.global $$25879
$$25879:
.4byte 0x43300000
.4byte 0