mirror of https://github.com/PrimeDecomp/prime.git
67 lines
2.7 KiB
ArmAsm
67 lines
2.7 KiB
ArmAsm
.include "macros.inc"
|
|
|
|
.section .sdata, "wa"
|
|
.balign 8
|
|
.global __CARDVendorID
|
|
__CARDVendorID:
|
|
.2byte 0xFFFF
|
|
.balign 4
|
|
|
|
.section .text, "ax"
|
|
|
|
.global CARDGetSerialNo
|
|
CARDGetSerialNo:
|
|
/* 803BE5E8 003BB548 7C 08 02 A6 */ mflr r0
|
|
/* 803BE5EC 003BB54C 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BE5F0 003BB550 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803BE5F4 003BB554 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
/* 803BE5F8 003BB558 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
/* 803BE5FC 003BB55C 3B E4 00 00 */ addi r31, r4, 0
|
|
/* 803BE600 003BB560 41 80 00 0C */ blt lbl_803BE60C
|
|
/* 803BE604 003BB564 2C 03 00 02 */ cmpwi r3, 2
|
|
/* 803BE608 003BB568 41 80 00 0C */ blt lbl_803BE614
|
|
lbl_803BE60C:
|
|
/* 803BE60C 003BB56C 38 60 FF 80 */ li r3, -128
|
|
/* 803BE610 003BB570 48 00 00 88 */ b lbl_803BE698
|
|
lbl_803BE614:
|
|
/* 803BE614 003BB574 38 81 00 10 */ addi r4, r1, 0x10
|
|
/* 803BE618 003BB578 4B FF A7 89 */ bl __CARDGetControlBlock
|
|
/* 803BE61C 003BB57C 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BE620 003BB580 40 80 00 08 */ bge lbl_803BE628
|
|
/* 803BE624 003BB584 48 00 00 74 */ b lbl_803BE698
|
|
lbl_803BE628:
|
|
/* 803BE628 003BB588 80 61 00 10 */ lwz r3, 0x10(r1)
|
|
/* 803BE62C 003BB58C 38 E0 00 00 */ li r7, 0
|
|
/* 803BE630 003BB590 38 C0 00 00 */ li r6, 0
|
|
/* 803BE634 003BB594 80 A3 00 80 */ lwz r5, 0x80(r3)
|
|
/* 803BE638 003BB598 38 80 00 00 */ li r4, 0
|
|
/* 803BE63C 003BB59C 80 65 00 04 */ lwz r3, 4(r5)
|
|
/* 803BE640 003BB5A0 80 05 00 00 */ lwz r0, 0(r5)
|
|
/* 803BE644 003BB5A4 7C E7 1A 78 */ xor r7, r7, r3
|
|
/* 803BE648 003BB5A8 38 65 00 08 */ addi r3, r5, 8
|
|
/* 803BE64C 003BB5AC 7C C6 02 78 */ xor r6, r6, r0
|
|
/* 803BE650 003BB5B0 80 05 00 08 */ lwz r0, 8(r5)
|
|
/* 803BE654 003BB5B4 80 63 00 04 */ lwz r3, 4(r3)
|
|
/* 803BE658 003BB5B8 7C C6 02 78 */ xor r6, r6, r0
|
|
/* 803BE65C 003BB5BC 7C E7 1A 78 */ xor r7, r7, r3
|
|
/* 803BE660 003BB5C0 38 65 00 10 */ addi r3, r5, 0x10
|
|
/* 803BE664 003BB5C4 80 05 00 10 */ lwz r0, 0x10(r5)
|
|
/* 803BE668 003BB5C8 80 63 00 04 */ lwz r3, 4(r3)
|
|
/* 803BE66C 003BB5CC 7C C6 02 78 */ xor r6, r6, r0
|
|
/* 803BE670 003BB5D0 7C E7 1A 78 */ xor r7, r7, r3
|
|
/* 803BE674 003BB5D4 38 65 00 18 */ addi r3, r5, 0x18
|
|
/* 803BE678 003BB5D8 80 05 00 18 */ lwz r0, 0x18(r5)
|
|
/* 803BE67C 003BB5DC 80 63 00 04 */ lwz r3, 4(r3)
|
|
/* 803BE680 003BB5E0 7C C6 02 78 */ xor r6, r6, r0
|
|
/* 803BE684 003BB5E4 7C E7 1A 78 */ xor r7, r7, r3
|
|
/* 803BE688 003BB5E8 90 FF 00 04 */ stw r7, 4(r31)
|
|
/* 803BE68C 003BB5EC 90 DF 00 00 */ stw r6, 0(r31)
|
|
/* 803BE690 003BB5F0 80 61 00 10 */ lwz r3, 0x10(r1)
|
|
/* 803BE694 003BB5F4 4B FF A7 C5 */ bl __CARDPutControlBlock
|
|
lbl_803BE698:
|
|
/* 803BE698 003BB5F8 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
/* 803BE69C 003BB5FC 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
/* 803BE6A0 003BB600 38 21 00 20 */ addi r1, r1, 0x20
|
|
/* 803BE6A4 003BB604 7C 08 03 A6 */ mtlr r0
|
|
/* 803BE6A8 003BB608 4E 80 00 20 */ blr
|