mirror of https://github.com/PrimeDecomp/prime.git
340 lines
15 KiB
ArmAsm
340 lines
15 KiB
ArmAsm
.include "macros.inc"
|
|
|
|
.section .text, "ax"
|
|
|
|
.global __CARDCompareFileName
|
|
__CARDCompareFileName:
|
|
/* 803BCD6C 003B9CCC 38 A3 00 08 */ addi r5, r3, 8
|
|
/* 803BCD70 003B9CD0 38 E0 00 20 */ li r7, 0x20
|
|
/* 803BCD74 003B9CD4 48 00 00 3C */ b lbl_803BCDB0
|
|
lbl_803BCD78:
|
|
/* 803BCD78 003B9CD8 88 05 00 00 */ lbz r0, 0(r5)
|
|
/* 803BCD7C 003B9CDC 38 A5 00 01 */ addi r5, r5, 1
|
|
/* 803BCD80 003B9CE0 88 C4 00 00 */ lbz r6, 0(r4)
|
|
/* 803BCD84 003B9CE4 38 84 00 01 */ addi r4, r4, 1
|
|
/* 803BCD88 003B9CE8 7C 03 07 74 */ extsb r3, r0
|
|
/* 803BCD8C 003B9CEC 7C C0 07 74 */ extsb r0, r6
|
|
/* 803BCD90 003B9CF0 7C 03 00 00 */ cmpw r3, r0
|
|
/* 803BCD94 003B9CF4 41 82 00 0C */ beq lbl_803BCDA0
|
|
/* 803BCD98 003B9CF8 38 60 00 00 */ li r3, 0
|
|
/* 803BCD9C 003B9CFC 4E 80 00 20 */ blr
|
|
lbl_803BCDA0:
|
|
/* 803BCDA0 003B9D00 7C C0 07 75 */ extsb. r0, r6
|
|
/* 803BCDA4 003B9D04 40 82 00 0C */ bne lbl_803BCDB0
|
|
/* 803BCDA8 003B9D08 38 60 00 01 */ li r3, 1
|
|
/* 803BCDAC 003B9D0C 4E 80 00 20 */ blr
|
|
lbl_803BCDB0:
|
|
/* 803BCDB0 003B9D10 34 E7 FF FF */ addic. r7, r7, -1
|
|
/* 803BCDB4 003B9D14 40 80 FF C4 */ bge lbl_803BCD78
|
|
/* 803BCDB8 003B9D18 88 04 00 00 */ lbz r0, 0(r4)
|
|
/* 803BCDBC 003B9D1C 7C 00 07 75 */ extsb. r0, r0
|
|
/* 803BCDC0 003B9D20 40 82 00 0C */ bne lbl_803BCDCC
|
|
/* 803BCDC4 003B9D24 38 60 00 01 */ li r3, 1
|
|
/* 803BCDC8 003B9D28 4E 80 00 20 */ blr
|
|
lbl_803BCDCC:
|
|
/* 803BCDCC 003B9D2C 38 60 00 00 */ li r3, 0
|
|
/* 803BCDD0 003B9D30 4E 80 00 20 */ blr
|
|
|
|
.global __CARDAccess
|
|
__CARDAccess:
|
|
/* 803BCDD4 003B9D34 7C 08 02 A6 */ mflr r0
|
|
/* 803BCDD8 003B9D38 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803BCDDC 003B9D3C 94 21 FF E8 */ stwu r1, -0x18(r1)
|
|
/* 803BCDE0 003B9D40 93 E1 00 14 */ stw r31, 0x14(r1)
|
|
/* 803BCDE4 003B9D44 7C 9F 23 78 */ mr r31, r4
|
|
/* 803BCDE8 003B9D48 93 C1 00 10 */ stw r30, 0x10(r1)
|
|
/* 803BCDEC 003B9D4C 3B C3 00 00 */ addi r30, r3, 0
|
|
/* 803BCDF0 003B9D50 88 04 00 00 */ lbz r0, 0(r4)
|
|
/* 803BCDF4 003B9D54 28 00 00 FF */ cmplwi r0, 0xff
|
|
/* 803BCDF8 003B9D58 40 82 00 0C */ bne lbl_803BCE04
|
|
/* 803BCDFC 003B9D5C 38 60 FF FC */ li r3, -4
|
|
/* 803BCE00 003B9D60 48 00 00 54 */ b lbl_803BCE54
|
|
lbl_803BCE04:
|
|
/* 803BCE04 003B9D64 3C 60 80 57 */ lis r3, __CARDDiskNone@ha
|
|
/* 803BCE08 003B9D68 80 9E 01 0C */ lwz r4, 0x10c(r30)
|
|
/* 803BCE0C 003B9D6C 38 03 9C 78 */ addi r0, r3, __CARDDiskNone@l
|
|
/* 803BCE10 003B9D70 7C 04 00 40 */ cmplw r4, r0
|
|
/* 803BCE14 003B9D74 41 82 00 34 */ beq lbl_803BCE48
|
|
/* 803BCE18 003B9D78 38 7F 00 00 */ addi r3, r31, 0
|
|
/* 803BCE1C 003B9D7C 38 A0 00 04 */ li r5, 4
|
|
/* 803BCE20 003B9D80 4B FD 0A 5D */ bl memcmp
|
|
/* 803BCE24 003B9D84 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BCE28 003B9D88 40 82 00 28 */ bne lbl_803BCE50
|
|
/* 803BCE2C 003B9D8C 80 9E 01 0C */ lwz r4, 0x10c(r30)
|
|
/* 803BCE30 003B9D90 38 7F 00 04 */ addi r3, r31, 4
|
|
/* 803BCE34 003B9D94 38 A0 00 02 */ li r5, 2
|
|
/* 803BCE38 003B9D98 38 84 00 04 */ addi r4, r4, 4
|
|
/* 803BCE3C 003B9D9C 4B FD 0A 41 */ bl memcmp
|
|
/* 803BCE40 003B9DA0 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BCE44 003B9DA4 40 82 00 0C */ bne lbl_803BCE50
|
|
lbl_803BCE48:
|
|
/* 803BCE48 003B9DA8 38 60 00 00 */ li r3, 0
|
|
/* 803BCE4C 003B9DAC 48 00 00 08 */ b lbl_803BCE54
|
|
lbl_803BCE50:
|
|
/* 803BCE50 003B9DB0 38 60 FF F6 */ li r3, -10
|
|
lbl_803BCE54:
|
|
/* 803BCE54 003B9DB4 80 01 00 1C */ lwz r0, 0x1c(r1)
|
|
/* 803BCE58 003B9DB8 83 E1 00 14 */ lwz r31, 0x14(r1)
|
|
/* 803BCE5C 003B9DBC 83 C1 00 10 */ lwz r30, 0x10(r1)
|
|
/* 803BCE60 003B9DC0 38 21 00 18 */ addi r1, r1, 0x18
|
|
/* 803BCE64 003B9DC4 7C 08 03 A6 */ mtlr r0
|
|
/* 803BCE68 003B9DC8 4E 80 00 20 */ blr
|
|
|
|
.global sub_803bce6c
|
|
sub_803bce6c:
|
|
/* 803BCE6C 003B9DCC 88 03 00 00 */ lbz r0, 0(r3)
|
|
/* 803BCE70 003B9DD0 28 00 00 FF */ cmplwi r0, 0xff
|
|
/* 803BCE74 003B9DD4 40 82 00 0C */ bne lbl_803BCE80
|
|
/* 803BCE78 003B9DD8 38 60 FF FC */ li r3, -4
|
|
/* 803BCE7C 003B9DDC 4E 80 00 20 */ blr
|
|
lbl_803BCE80:
|
|
/* 803BCE80 003B9DE0 88 03 00 34 */ lbz r0, 0x34(r3)
|
|
/* 803BCE84 003B9DE4 54 00 07 7B */ rlwinm. r0, r0, 0, 0x1d, 0x1d
|
|
/* 803BCE88 003B9DE8 41 82 00 0C */ beq lbl_803BCE94
|
|
/* 803BCE8C 003B9DEC 38 60 00 00 */ li r3, 0
|
|
/* 803BCE90 003B9DF0 4E 80 00 20 */ blr
|
|
lbl_803BCE94:
|
|
/* 803BCE94 003B9DF4 38 60 FF F6 */ li r3, -10
|
|
/* 803BCE98 003B9DF8 4E 80 00 20 */ blr
|
|
|
|
.global sub_803bce9c
|
|
sub_803bce9c:
|
|
/* 803BCE9C 003B9DFC 7C 08 02 A6 */ mflr r0
|
|
/* 803BCEA0 003B9E00 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803BCEA4 003B9E04 94 21 FF D0 */ stwu r1, -0x30(r1)
|
|
/* 803BCEA8 003B9E08 BF 41 00 18 */ stmw r26, 0x18(r1)
|
|
/* 803BCEAC 003B9E0C 7C 7B 1B 78 */ mr r27, r3
|
|
/* 803BCEB0 003B9E10 3B 84 00 00 */ addi r28, r4, 0
|
|
/* 803BCEB4 003B9E14 3B A5 00 00 */ addi r29, r5, 0
|
|
/* 803BCEB8 003B9E18 80 03 00 00 */ lwz r0, 0(r3)
|
|
/* 803BCEBC 003B9E1C 2C 00 00 00 */ cmpwi r0, 0
|
|
/* 803BCEC0 003B9E20 40 82 00 0C */ bne lbl_803BCECC
|
|
/* 803BCEC4 003B9E24 38 60 FF FD */ li r3, -3
|
|
/* 803BCEC8 003B9E28 48 00 01 10 */ b lbl_803BCFD8
|
|
lbl_803BCECC:
|
|
/* 803BCECC 003B9E2C 7F 63 DB 78 */ mr r3, r27
|
|
/* 803BCED0 003B9E30 4B FF DA A1 */ bl __CARDGetDirBlock
|
|
/* 803BCED4 003B9E34 3C 80 80 57 */ lis r4, __CARDDiskNone@ha
|
|
/* 803BCED8 003B9E38 3B E3 00 00 */ addi r31, r3, 0
|
|
/* 803BCEDC 003B9E3C 3B 44 9C 78 */ addi r26, r4, __CARDDiskNone@l
|
|
/* 803BCEE0 003B9E40 3B C0 00 00 */ li r30, 0
|
|
lbl_803BCEE4:
|
|
/* 803BCEE4 003B9E44 88 1F 00 00 */ lbz r0, 0(r31)
|
|
/* 803BCEE8 003B9E48 28 00 00 FF */ cmplwi r0, 0xff
|
|
/* 803BCEEC 003B9E4C 40 82 00 0C */ bne lbl_803BCEF8
|
|
/* 803BCEF0 003B9E50 38 00 FF FC */ li r0, -4
|
|
/* 803BCEF4 003B9E54 48 00 00 4C */ b lbl_803BCF40
|
|
lbl_803BCEF8:
|
|
/* 803BCEF8 003B9E58 80 9B 01 0C */ lwz r4, 0x10c(r27)
|
|
/* 803BCEFC 003B9E5C 7C 04 D0 40 */ cmplw r4, r26
|
|
/* 803BCF00 003B9E60 41 82 00 34 */ beq lbl_803BCF34
|
|
/* 803BCF04 003B9E64 38 7F 00 00 */ addi r3, r31, 0
|
|
/* 803BCF08 003B9E68 38 A0 00 04 */ li r5, 4
|
|
/* 803BCF0C 003B9E6C 4B FD 09 71 */ bl memcmp
|
|
/* 803BCF10 003B9E70 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BCF14 003B9E74 40 82 00 28 */ bne lbl_803BCF3C
|
|
/* 803BCF18 003B9E78 80 9B 01 0C */ lwz r4, 0x10c(r27)
|
|
/* 803BCF1C 003B9E7C 38 7F 00 04 */ addi r3, r31, 4
|
|
/* 803BCF20 003B9E80 38 A0 00 02 */ li r5, 2
|
|
/* 803BCF24 003B9E84 38 84 00 04 */ addi r4, r4, 4
|
|
/* 803BCF28 003B9E88 4B FD 09 55 */ bl memcmp
|
|
/* 803BCF2C 003B9E8C 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BCF30 003B9E90 40 82 00 0C */ bne lbl_803BCF3C
|
|
lbl_803BCF34:
|
|
/* 803BCF34 003B9E94 38 00 00 00 */ li r0, 0
|
|
/* 803BCF38 003B9E98 48 00 00 08 */ b lbl_803BCF40
|
|
lbl_803BCF3C:
|
|
/* 803BCF3C 003B9E9C 38 00 FF F6 */ li r0, -10
|
|
lbl_803BCF40:
|
|
/* 803BCF40 003B9EA0 2C 00 00 00 */ cmpwi r0, 0
|
|
/* 803BCF44 003B9EA4 41 80 00 80 */ blt lbl_803BCFC4
|
|
/* 803BCF48 003B9EA8 38 FC 00 00 */ addi r7, r28, 0
|
|
/* 803BCF4C 003B9EAC 38 DF 00 08 */ addi r6, r31, 8
|
|
/* 803BCF50 003B9EB0 38 80 00 20 */ li r4, 0x20
|
|
/* 803BCF54 003B9EB4 48 00 00 3C */ b lbl_803BCF90
|
|
lbl_803BCF58:
|
|
/* 803BCF58 003B9EB8 88 06 00 00 */ lbz r0, 0(r6)
|
|
/* 803BCF5C 003B9EBC 38 C6 00 01 */ addi r6, r6, 1
|
|
/* 803BCF60 003B9EC0 88 A7 00 00 */ lbz r5, 0(r7)
|
|
/* 803BCF64 003B9EC4 38 E7 00 01 */ addi r7, r7, 1
|
|
/* 803BCF68 003B9EC8 7C 03 07 74 */ extsb r3, r0
|
|
/* 803BCF6C 003B9ECC 7C A0 07 74 */ extsb r0, r5
|
|
/* 803BCF70 003B9ED0 7C 03 00 00 */ cmpw r3, r0
|
|
/* 803BCF74 003B9ED4 41 82 00 0C */ beq lbl_803BCF80
|
|
/* 803BCF78 003B9ED8 38 00 00 00 */ li r0, 0
|
|
/* 803BCF7C 003B9EDC 48 00 00 34 */ b lbl_803BCFB0
|
|
lbl_803BCF80:
|
|
/* 803BCF80 003B9EE0 7C A0 07 75 */ extsb. r0, r5
|
|
/* 803BCF84 003B9EE4 40 82 00 0C */ bne lbl_803BCF90
|
|
/* 803BCF88 003B9EE8 38 00 00 01 */ li r0, 1
|
|
/* 803BCF8C 003B9EEC 48 00 00 24 */ b lbl_803BCFB0
|
|
lbl_803BCF90:
|
|
/* 803BCF90 003B9EF0 34 84 FF FF */ addic. r4, r4, -1
|
|
/* 803BCF94 003B9EF4 40 80 FF C4 */ bge lbl_803BCF58
|
|
/* 803BCF98 003B9EF8 88 07 00 00 */ lbz r0, 0(r7)
|
|
/* 803BCF9C 003B9EFC 7C 00 07 75 */ extsb. r0, r0
|
|
/* 803BCFA0 003B9F00 40 82 00 0C */ bne lbl_803BCFAC
|
|
/* 803BCFA4 003B9F04 38 00 00 01 */ li r0, 1
|
|
/* 803BCFA8 003B9F08 48 00 00 08 */ b lbl_803BCFB0
|
|
lbl_803BCFAC:
|
|
/* 803BCFAC 003B9F0C 38 00 00 00 */ li r0, 0
|
|
lbl_803BCFB0:
|
|
/* 803BCFB0 003B9F10 2C 00 00 00 */ cmpwi r0, 0
|
|
/* 803BCFB4 003B9F14 41 82 00 10 */ beq lbl_803BCFC4
|
|
/* 803BCFB8 003B9F18 93 DD 00 00 */ stw r30, 0(r29)
|
|
/* 803BCFBC 003B9F1C 38 60 00 00 */ li r3, 0
|
|
/* 803BCFC0 003B9F20 48 00 00 18 */ b lbl_803BCFD8
|
|
lbl_803BCFC4:
|
|
/* 803BCFC4 003B9F24 3B DE 00 01 */ addi r30, r30, 1
|
|
/* 803BCFC8 003B9F28 2C 1E 00 7F */ cmpwi r30, 0x7f
|
|
/* 803BCFCC 003B9F2C 3B FF 00 40 */ addi r31, r31, 0x40
|
|
/* 803BCFD0 003B9F30 41 80 FF 14 */ blt lbl_803BCEE4
|
|
/* 803BCFD4 003B9F34 38 60 FF FC */ li r3, -4
|
|
lbl_803BCFD8:
|
|
/* 803BCFD8 003B9F38 BB 41 00 18 */ lmw r26, 0x18(r1)
|
|
/* 803BCFDC 003B9F3C 80 01 00 34 */ lwz r0, 0x34(r1)
|
|
/* 803BCFE0 003B9F40 38 21 00 30 */ addi r1, r1, 0x30
|
|
/* 803BCFE4 003B9F44 7C 08 03 A6 */ mtlr r0
|
|
/* 803BCFE8 003B9F48 4E 80 00 20 */ blr
|
|
|
|
.global CARDOpen
|
|
CARDOpen:
|
|
/* 803BCFEC 003B9F4C 7C 08 02 A6 */ mflr r0
|
|
/* 803BCFF0 003B9F50 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803BCFF4 003B9F54 38 00 FF FF */ li r0, -1
|
|
/* 803BCFF8 003B9F58 94 21 FF C0 */ stwu r1, -0x40(r1)
|
|
/* 803BCFFC 003B9F5C BE E1 00 1C */ stmw r23, 0x1c(r1)
|
|
/* 803BD000 003B9F60 3B 84 00 00 */ addi r28, r4, 0
|
|
/* 803BD004 003B9F64 3B A5 00 00 */ addi r29, r5, 0
|
|
/* 803BD008 003B9F68 3B 63 00 00 */ addi r27, r3, 0
|
|
/* 803BD00C 003B9F6C 38 81 00 14 */ addi r4, r1, 0x14
|
|
/* 803BD010 003B9F70 90 05 00 00 */ stw r0, 0(r5)
|
|
/* 803BD014 003B9F74 4B FF BD 8D */ bl __CARDGetControlBlock
|
|
/* 803BD018 003B9F78 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BD01C 003B9F7C 40 80 00 08 */ bge lbl_803BD024
|
|
/* 803BD020 003B9F80 48 00 01 30 */ b lbl_803BD150
|
|
lbl_803BD024:
|
|
/* 803BD024 003B9F84 83 E1 00 14 */ lwz r31, 0x14(r1)
|
|
/* 803BD028 003B9F88 80 1F 00 00 */ lwz r0, 0(r31)
|
|
/* 803BD02C 003B9F8C 2C 00 00 00 */ cmpwi r0, 0
|
|
/* 803BD030 003B9F90 40 82 00 0C */ bne lbl_803BD03C
|
|
/* 803BD034 003B9F94 3A E0 FF FD */ li r23, -3
|
|
/* 803BD038 003B9F98 48 00 00 B8 */ b lbl_803BD0F0
|
|
lbl_803BD03C:
|
|
/* 803BD03C 003B9F9C 7F E3 FB 78 */ mr r3, r31
|
|
/* 803BD040 003B9FA0 4B FF D9 31 */ bl __CARDGetDirBlock
|
|
/* 803BD044 003B9FA4 3C 80 80 57 */ lis r4, __CARDDiskNone@ha
|
|
/* 803BD048 003B9FA8 3A E3 00 00 */ addi r23, r3, 0
|
|
/* 803BD04C 003B9FAC 3B 44 9C 78 */ addi r26, r4, __CARDDiskNone@l
|
|
/* 803BD050 003B9FB0 3B 20 00 00 */ li r25, 0
|
|
lbl_803BD054:
|
|
/* 803BD054 003B9FB4 88 17 00 00 */ lbz r0, 0(r23)
|
|
/* 803BD058 003B9FB8 3B 17 00 00 */ addi r24, r23, 0
|
|
/* 803BD05C 003B9FBC 28 00 00 FF */ cmplwi r0, 0xff
|
|
/* 803BD060 003B9FC0 40 82 00 0C */ bne lbl_803BD06C
|
|
/* 803BD064 003B9FC4 38 00 FF FC */ li r0, -4
|
|
/* 803BD068 003B9FC8 48 00 00 4C */ b lbl_803BD0B4
|
|
lbl_803BD06C:
|
|
/* 803BD06C 003B9FCC 80 9F 01 0C */ lwz r4, 0x10c(r31)
|
|
/* 803BD070 003B9FD0 7C 04 D0 40 */ cmplw r4, r26
|
|
/* 803BD074 003B9FD4 41 82 00 34 */ beq lbl_803BD0A8
|
|
/* 803BD078 003B9FD8 38 78 00 00 */ addi r3, r24, 0
|
|
/* 803BD07C 003B9FDC 38 A0 00 04 */ li r5, 4
|
|
/* 803BD080 003B9FE0 4B FD 07 FD */ bl memcmp
|
|
/* 803BD084 003B9FE4 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BD088 003B9FE8 40 82 00 28 */ bne lbl_803BD0B0
|
|
/* 803BD08C 003B9FEC 80 9F 01 0C */ lwz r4, 0x10c(r31)
|
|
/* 803BD090 003B9FF0 38 78 00 04 */ addi r3, r24, 4
|
|
/* 803BD094 003B9FF4 38 A0 00 02 */ li r5, 2
|
|
/* 803BD098 003B9FF8 38 84 00 04 */ addi r4, r4, 4
|
|
/* 803BD09C 003B9FFC 4B FD 07 E1 */ bl memcmp
|
|
/* 803BD0A0 003BA000 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BD0A4 003BA004 40 82 00 0C */ bne lbl_803BD0B0
|
|
lbl_803BD0A8:
|
|
/* 803BD0A8 003BA008 38 00 00 00 */ li r0, 0
|
|
/* 803BD0AC 003BA00C 48 00 00 08 */ b lbl_803BD0B4
|
|
lbl_803BD0B0:
|
|
/* 803BD0B0 003BA010 38 00 FF F6 */ li r0, -10
|
|
lbl_803BD0B4:
|
|
/* 803BD0B4 003BA014 2C 00 00 00 */ cmpwi r0, 0
|
|
/* 803BD0B8 003BA018 41 80 00 24 */ blt lbl_803BD0DC
|
|
/* 803BD0BC 003BA01C 38 77 00 00 */ addi r3, r23, 0
|
|
/* 803BD0C0 003BA020 38 9C 00 00 */ addi r4, r28, 0
|
|
/* 803BD0C4 003BA024 4B FF FC A9 */ bl __CARDCompareFileName
|
|
/* 803BD0C8 003BA028 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BD0CC 003BA02C 41 82 00 10 */ beq lbl_803BD0DC
|
|
/* 803BD0D0 003BA030 3B D9 00 00 */ addi r30, r25, 0
|
|
/* 803BD0D4 003BA034 3A E0 00 00 */ li r23, 0
|
|
/* 803BD0D8 003BA038 48 00 00 18 */ b lbl_803BD0F0
|
|
lbl_803BD0DC:
|
|
/* 803BD0DC 003BA03C 3B 39 00 01 */ addi r25, r25, 1
|
|
/* 803BD0E0 003BA040 2C 19 00 7F */ cmpwi r25, 0x7f
|
|
/* 803BD0E4 003BA044 3A F7 00 40 */ addi r23, r23, 0x40
|
|
/* 803BD0E8 003BA048 41 80 FF 6C */ blt lbl_803BD054
|
|
/* 803BD0EC 003BA04C 3A E0 FF FC */ li r23, -4
|
|
lbl_803BD0F0:
|
|
/* 803BD0F0 003BA050 2C 17 00 00 */ cmpwi r23, 0
|
|
/* 803BD0F4 003BA054 41 80 00 50 */ blt lbl_803BD144
|
|
/* 803BD0F8 003BA058 80 61 00 14 */ lwz r3, 0x14(r1)
|
|
/* 803BD0FC 003BA05C 4B FF D8 75 */ bl __CARDGetDirBlock
|
|
/* 803BD100 003BA060 57 C0 30 32 */ slwi r0, r30, 6
|
|
/* 803BD104 003BA064 7C A3 02 14 */ add r5, r3, r0
|
|
/* 803BD108 003BA068 A0 85 00 36 */ lhz r4, 0x36(r5)
|
|
/* 803BD10C 003BA06C 28 04 00 05 */ cmplwi r4, 5
|
|
/* 803BD110 003BA070 41 80 00 14 */ blt lbl_803BD124
|
|
/* 803BD114 003BA074 80 61 00 14 */ lwz r3, 0x14(r1)
|
|
/* 803BD118 003BA078 A0 03 00 10 */ lhz r0, 0x10(r3)
|
|
/* 803BD11C 003BA07C 7C 04 00 40 */ cmplw r4, r0
|
|
/* 803BD120 003BA080 41 80 00 0C */ blt lbl_803BD12C
|
|
lbl_803BD124:
|
|
/* 803BD124 003BA084 3A E0 FF FA */ li r23, -6
|
|
/* 803BD128 003BA088 48 00 00 1C */ b lbl_803BD144
|
|
lbl_803BD12C:
|
|
/* 803BD12C 003BA08C 93 7D 00 00 */ stw r27, 0(r29)
|
|
/* 803BD130 003BA090 38 00 00 00 */ li r0, 0
|
|
/* 803BD134 003BA094 93 DD 00 04 */ stw r30, 4(r29)
|
|
/* 803BD138 003BA098 90 1D 00 08 */ stw r0, 8(r29)
|
|
/* 803BD13C 003BA09C A0 05 00 36 */ lhz r0, 0x36(r5)
|
|
/* 803BD140 003BA0A0 B0 1D 00 10 */ sth r0, 0x10(r29)
|
|
lbl_803BD144:
|
|
/* 803BD144 003BA0A4 80 61 00 14 */ lwz r3, 0x14(r1)
|
|
/* 803BD148 003BA0A8 7E E4 BB 78 */ mr r4, r23
|
|
/* 803BD14C 003BA0AC 4B FF BD 0D */ bl __CARDPutControlBlock
|
|
lbl_803BD150:
|
|
/* 803BD150 003BA0B0 BA E1 00 1C */ lmw r23, 0x1c(r1)
|
|
/* 803BD154 003BA0B4 80 01 00 44 */ lwz r0, 0x44(r1)
|
|
/* 803BD158 003BA0B8 38 21 00 40 */ addi r1, r1, 0x40
|
|
/* 803BD15C 003BA0BC 7C 08 03 A6 */ mtlr r0
|
|
/* 803BD160 003BA0C0 4E 80 00 20 */ blr
|
|
|
|
.global CARDClose
|
|
CARDClose:
|
|
/* 803BD164 003BA0C4 7C 08 02 A6 */ mflr r0
|
|
/* 803BD168 003BA0C8 90 01 00 04 */ stw r0, 4(r1)
|
|
/* 803BD16C 003BA0CC 94 21 FF E8 */ stwu r1, -0x18(r1)
|
|
/* 803BD170 003BA0D0 93 E1 00 14 */ stw r31, 0x14(r1)
|
|
/* 803BD174 003BA0D4 7C 7F 1B 78 */ mr r31, r3
|
|
/* 803BD178 003BA0D8 38 81 00 0C */ addi r4, r1, 0xc
|
|
/* 803BD17C 003BA0DC 80 63 00 00 */ lwz r3, 0(r3)
|
|
/* 803BD180 003BA0E0 4B FF BC 21 */ bl __CARDGetControlBlock
|
|
/* 803BD184 003BA0E4 2C 03 00 00 */ cmpwi r3, 0
|
|
/* 803BD188 003BA0E8 40 80 00 08 */ bge lbl_803BD190
|
|
/* 803BD18C 003BA0EC 48 00 00 18 */ b lbl_803BD1A4
|
|
lbl_803BD190:
|
|
/* 803BD190 003BA0F0 38 00 FF FF */ li r0, -1
|
|
/* 803BD194 003BA0F4 90 1F 00 00 */ stw r0, 0(r31)
|
|
/* 803BD198 003BA0F8 38 80 00 00 */ li r4, 0
|
|
/* 803BD19C 003BA0FC 80 61 00 0C */ lwz r3, 0xc(r1)
|
|
/* 803BD1A0 003BA100 4B FF BC B9 */ bl __CARDPutControlBlock
|
|
lbl_803BD1A4:
|
|
/* 803BD1A4 003BA104 80 01 00 1C */ lwz r0, 0x1c(r1)
|
|
/* 803BD1A8 003BA108 83 E1 00 14 */ lwz r31, 0x14(r1)
|
|
/* 803BD1AC 003BA10C 38 21 00 18 */ addi r1, r1, 0x18
|
|
/* 803BD1B0 003BA110 7C 08 03 A6 */ mtlr r0
|
|
/* 803BD1B4 003BA114 4E 80 00 20 */ blr
|
|
|
|
.global __CARDIsOpened
|
|
__CARDIsOpened:
|
|
/* 803BD1B8 003BA118 38 60 00 00 */ li r3, 0
|
|
/* 803BD1BC 003BA11C 4E 80 00 20 */ blr
|