.include "macros.inc" .section .data, "wa" .balign 8 .global SectorSizeTable SectorSizeTable: .4byte 0x00002000 .4byte 0x00004000 .4byte 0x00008000 .4byte 0x00010000 .4byte 0x00020000 .4byte 0x00040000 .4byte 0x00000000 .4byte 0x00000000 .global LatencyTable LatencyTable: .4byte 0x00000004 .4byte 0x00000008 .4byte 0x00000010 .4byte 0x00000020 .4byte 0x00000040 .4byte 0x00000080 .4byte 0x00000100 .4byte 0x00000200 .section .text, "ax" .global IsCard IsCard: /* 803BBB10 003B8A70 54 60 00 1F */ rlwinm. r0, r3, 0, 0, 0xf /* 803BBB14 003B8A74 41 82 00 24 */ beq lbl_803BBB38 /* 803BBB18 003B8A78 3C 03 80 00 */ addis r0, r3, 0x8000 /* 803BBB1C 003B8A7C 28 00 00 04 */ cmplwi r0, 4 /* 803BBB20 003B8A80 40 82 00 10 */ bne lbl_803BBB30 /* 803BBB24 003B8A84 A0 0D A0 40 */ lhz r0, __CARDVendorID@sda21(r13) /* 803BBB28 003B8A88 28 00 FF FF */ cmplwi r0, 0xffff /* 803BBB2C 003B8A8C 40 82 00 0C */ bne lbl_803BBB38 lbl_803BBB30: /* 803BBB30 003B8A90 38 60 00 00 */ li r3, 0 /* 803BBB34 003B8A94 4E 80 00 20 */ blr lbl_803BBB38: /* 803BBB38 003B8A98 54 60 07 BF */ clrlwi. r0, r3, 0x1e /* 803BBB3C 003B8A9C 41 82 00 0C */ beq lbl_803BBB48 /* 803BBB40 003B8AA0 38 60 00 00 */ li r3, 0 /* 803BBB44 003B8AA4 4E 80 00 20 */ blr lbl_803BBB48: /* 803BBB48 003B8AA8 54 65 06 3A */ rlwinm r5, r3, 0, 0x18, 0x1d /* 803BBB4C 003B8AAC 2C 05 00 20 */ cmpwi r5, 0x20 /* 803BBB50 003B8AB0 41 82 00 48 */ beq lbl_803BBB98 /* 803BBB54 003B8AB4 40 80 00 28 */ bge lbl_803BBB7C /* 803BBB58 003B8AB8 2C 05 00 08 */ cmpwi r5, 8 /* 803BBB5C 003B8ABC 41 82 00 3C */ beq lbl_803BBB98 /* 803BBB60 003B8AC0 40 80 00 10 */ bge lbl_803BBB70 /* 803BBB64 003B8AC4 2C 05 00 04 */ cmpwi r5, 4 /* 803BBB68 003B8AC8 41 82 00 30 */ beq lbl_803BBB98 /* 803BBB6C 003B8ACC 48 00 00 24 */ b lbl_803BBB90 lbl_803BBB70: /* 803BBB70 003B8AD0 2C 05 00 10 */ cmpwi r5, 0x10 /* 803BBB74 003B8AD4 41 82 00 24 */ beq lbl_803BBB98 /* 803BBB78 003B8AD8 48 00 00 18 */ b lbl_803BBB90 lbl_803BBB7C: /* 803BBB7C 003B8ADC 2C 05 00 80 */ cmpwi r5, 0x80 /* 803BBB80 003B8AE0 41 82 00 18 */ beq lbl_803BBB98 /* 803BBB84 003B8AE4 40 80 00 0C */ bge lbl_803BBB90 /* 803BBB88 003B8AE8 2C 05 00 40 */ cmpwi r5, 0x40 /* 803BBB8C 003B8AEC 41 82 00 0C */ beq lbl_803BBB98 lbl_803BBB90: /* 803BBB90 003B8AF0 38 60 00 00 */ li r3, 0 /* 803BBB94 003B8AF4 4E 80 00 20 */ blr lbl_803BBB98: /* 803BBB98 003B8AF8 3C 80 80 3F */ lis r4, SectorSizeTable@ha /* 803BBB9C 003B8AFC 54 63 BE FA */ rlwinm r3, r3, 0x17, 0x1b, 0x1d /* 803BBBA0 003B8B00 38 04 6E 60 */ addi r0, r4, SectorSizeTable@l /* 803BBBA4 003B8B04 7C 60 1A 14 */ add r3, r0, r3 /* 803BBBA8 003B8B08 80 63 00 00 */ lwz r3, 0(r3) /* 803BBBAC 003B8B0C 2C 03 00 00 */ cmpwi r3, 0 /* 803BBBB0 003B8B10 40 82 00 0C */ bne lbl_803BBBBC /* 803BBBB4 003B8B14 38 60 00 00 */ li r3, 0 /* 803BBBB8 003B8B18 4E 80 00 20 */ blr lbl_803BBBBC: /* 803BBBBC 003B8B1C 54 A0 88 DC */ rlwinm r0, r5, 0x11, 3, 0xe /* 803BBBC0 003B8B20 7C 00 1B 96 */ divwu r0, r0, r3 /* 803BBBC4 003B8B24 28 00 00 08 */ cmplwi r0, 8 /* 803BBBC8 003B8B28 40 80 00 0C */ bge lbl_803BBBD4 /* 803BBBCC 003B8B2C 38 60 00 00 */ li r3, 0 /* 803BBBD0 003B8B30 4E 80 00 20 */ blr lbl_803BBBD4: /* 803BBBD4 003B8B34 38 60 00 01 */ li r3, 1 /* 803BBBD8 003B8B38 4E 80 00 20 */ blr .global CARDProbeEx CARDProbeEx: /* 803BBBDC 003B8B3C 7C 08 02 A6 */ mflr r0 /* 803BBBE0 003B8B40 90 01 00 04 */ stw r0, 4(r1) /* 803BBBE4 003B8B44 94 21 FF D0 */ stwu r1, -0x30(r1) /* 803BBBE8 003B8B48 BF 61 00 1C */ stmw r27, 0x1c(r1) /* 803BBBEC 003B8B4C 7C 7B 1B 79 */ or. r27, r3, r3 /* 803BBBF0 003B8B50 3B 84 00 00 */ addi r28, r4, 0 /* 803BBBF4 003B8B54 3B E5 00 00 */ addi r31, r5, 0 /* 803BBBF8 003B8B58 41 80 00 0C */ blt lbl_803BBC04 /* 803BBBFC 003B8B5C 2C 1B 00 02 */ cmpwi r27, 2 /* 803BBC00 003B8B60 41 80 00 0C */ blt lbl_803BBC0C lbl_803BBC04: /* 803BBC04 003B8B64 38 60 FF 80 */ li r3, -128 /* 803BBC08 003B8B68 48 00 01 3C */ b lbl_803BBD44 lbl_803BBC0C: /* 803BBC0C 003B8B6C 3C 60 80 00 */ lis r3, 0x800030E3@ha /* 803BBC10 003B8B70 88 03 30 E3 */ lbz r0, 0x800030E3@l(r3) /* 803BBC14 003B8B74 54 00 06 31 */ rlwinm. r0, r0, 0, 0x18, 0x18 /* 803BBC18 003B8B78 41 82 00 0C */ beq lbl_803BBC24 /* 803BBC1C 003B8B7C 38 60 FF FD */ li r3, -3 /* 803BBC20 003B8B80 48 00 01 24 */ b lbl_803BBD44 lbl_803BBC24: /* 803BBC24 003B8B84 1C 9B 01 10 */ mulli r4, r27, 0x110 /* 803BBC28 003B8B88 3C 60 80 57 */ lis r3, __CARDBlock@ha /* 803BBC2C 003B8B8C 38 03 9A 58 */ addi r0, r3, __CARDBlock@l /* 803BBC30 003B8B90 7F C0 22 14 */ add r30, r0, r4 /* 803BBC34 003B8B94 4B FC 5A 2D */ bl OSDisableInterrupts /* 803BBC38 003B8B98 3B A3 00 00 */ addi r29, r3, 0 /* 803BBC3C 003B8B9C 38 7B 00 00 */ addi r3, r27, 0 /* 803BBC40 003B8BA0 48 00 4D A1 */ bl EXIProbeEx /* 803BBC44 003B8BA4 2C 03 FF FF */ cmpwi r3, -1 /* 803BBC48 003B8BA8 40 82 00 0C */ bne lbl_803BBC54 /* 803BBC4C 003B8BAC 3B C0 FF FD */ li r30, -3 /* 803BBC50 003B8BB0 48 00 00 E8 */ b lbl_803BBD38 lbl_803BBC54: /* 803BBC54 003B8BB4 2C 03 00 00 */ cmpwi r3, 0 /* 803BBC58 003B8BB8 40 82 00 0C */ bne lbl_803BBC64 /* 803BBC5C 003B8BBC 3B C0 FF FF */ li r30, -1 /* 803BBC60 003B8BC0 48 00 00 D8 */ b lbl_803BBD38 lbl_803BBC64: /* 803BBC64 003B8BC4 80 1E 00 00 */ lwz r0, 0(r30) /* 803BBC68 003B8BC8 2C 00 00 00 */ cmpwi r0, 0 /* 803BBC6C 003B8BCC 41 82 00 40 */ beq lbl_803BBCAC /* 803BBC70 003B8BD0 80 1E 00 24 */ lwz r0, 0x24(r30) /* 803BBC74 003B8BD4 2C 00 00 01 */ cmpwi r0, 1 /* 803BBC78 003B8BD8 40 80 00 0C */ bge lbl_803BBC84 /* 803BBC7C 003B8BDC 3B C0 FF FF */ li r30, -1 /* 803BBC80 003B8BE0 48 00 00 B8 */ b lbl_803BBD38 lbl_803BBC84: /* 803BBC84 003B8BE4 28 1C 00 00 */ cmplwi r28, 0 /* 803BBC88 003B8BE8 41 82 00 0C */ beq lbl_803BBC94 /* 803BBC8C 003B8BEC A0 1E 00 08 */ lhz r0, 8(r30) /* 803BBC90 003B8BF0 90 1C 00 00 */ stw r0, 0(r28) lbl_803BBC94: /* 803BBC94 003B8BF4 28 1F 00 00 */ cmplwi r31, 0 /* 803BBC98 003B8BF8 41 82 00 0C */ beq lbl_803BBCA4 /* 803BBC9C 003B8BFC 80 1E 00 0C */ lwz r0, 0xc(r30) /* 803BBCA0 003B8C00 90 1F 00 00 */ stw r0, 0(r31) lbl_803BBCA4: /* 803BBCA4 003B8C04 3B C0 00 00 */ li r30, 0 /* 803BBCA8 003B8C08 48 00 00 90 */ b lbl_803BBD38 lbl_803BBCAC: /* 803BBCAC 003B8C0C 7F 63 DB 78 */ mr r3, r27 /* 803BBCB0 003B8C10 48 00 58 85 */ bl EXIGetState /* 803BBCB4 003B8C14 54 60 07 39 */ rlwinm. r0, r3, 0, 0x1c, 0x1c /* 803BBCB8 003B8C18 41 82 00 0C */ beq lbl_803BBCC4 /* 803BBCBC 003B8C1C 3B C0 FF FE */ li r30, -2 /* 803BBCC0 003B8C20 48 00 00 78 */ b lbl_803BBD38 lbl_803BBCC4: /* 803BBCC4 003B8C24 38 7B 00 00 */ addi r3, r27, 0 /* 803BBCC8 003B8C28 38 A1 00 14 */ addi r5, r1, 0x14 /* 803BBCCC 003B8C2C 38 80 00 00 */ li r4, 0 /* 803BBCD0 003B8C30 48 00 58 A5 */ bl EXIGetID /* 803BBCD4 003B8C34 2C 03 00 00 */ cmpwi r3, 0 /* 803BBCD8 003B8C38 40 82 00 0C */ bne lbl_803BBCE4 /* 803BBCDC 003B8C3C 3B C0 FF FF */ li r30, -1 /* 803BBCE0 003B8C40 48 00 00 58 */ b lbl_803BBD38 lbl_803BBCE4: /* 803BBCE4 003B8C44 80 61 00 14 */ lwz r3, 0x14(r1) /* 803BBCE8 003B8C48 4B FF FE 29 */ bl IsCard /* 803BBCEC 003B8C4C 2C 03 00 00 */ cmpwi r3, 0 /* 803BBCF0 003B8C50 41 82 00 44 */ beq lbl_803BBD34 /* 803BBCF4 003B8C54 28 1C 00 00 */ cmplwi r28, 0 /* 803BBCF8 003B8C58 41 82 00 10 */ beq lbl_803BBD08 /* 803BBCFC 003B8C5C 80 01 00 14 */ lwz r0, 0x14(r1) /* 803BBD00 003B8C60 54 00 06 3A */ rlwinm r0, r0, 0, 0x18, 0x1d /* 803BBD04 003B8C64 90 1C 00 00 */ stw r0, 0(r28) lbl_803BBD08: /* 803BBD08 003B8C68 28 1F 00 00 */ cmplwi r31, 0 /* 803BBD0C 003B8C6C 41 82 00 20 */ beq lbl_803BBD2C /* 803BBD10 003B8C70 80 81 00 14 */ lwz r4, 0x14(r1) /* 803BBD14 003B8C74 3C 60 80 3F */ lis r3, SectorSizeTable@ha /* 803BBD18 003B8C78 38 03 6E 60 */ addi r0, r3, SectorSizeTable@l /* 803BBD1C 003B8C7C 54 83 BE FA */ rlwinm r3, r4, 0x17, 0x1b, 0x1d /* 803BBD20 003B8C80 7C 60 1A 14 */ add r3, r0, r3 /* 803BBD24 003B8C84 80 03 00 00 */ lwz r0, 0(r3) /* 803BBD28 003B8C88 90 1F 00 00 */ stw r0, 0(r31) lbl_803BBD2C: /* 803BBD2C 003B8C8C 3B C0 00 00 */ li r30, 0 /* 803BBD30 003B8C90 48 00 00 08 */ b lbl_803BBD38 lbl_803BBD34: /* 803BBD34 003B8C94 3B C0 FF FE */ li r30, -2 lbl_803BBD38: /* 803BBD38 003B8C98 7F A3 EB 78 */ mr r3, r29 /* 803BBD3C 003B8C9C 4B FC 59 4D */ bl OSRestoreInterrupts /* 803BBD40 003B8CA0 7F C3 F3 78 */ mr r3, r30 lbl_803BBD44: /* 803BBD44 003B8CA4 BB 61 00 1C */ lmw r27, 0x1c(r1) /* 803BBD48 003B8CA8 80 01 00 34 */ lwz r0, 0x34(r1) /* 803BBD4C 003B8CAC 38 21 00 30 */ addi r1, r1, 0x30 /* 803BBD50 003B8CB0 7C 08 03 A6 */ mtlr r0 /* 803BBD54 003B8CB4 4E 80 00 20 */ blr .global DoMount DoMount: /* 803BBD58 003B8CB8 7C 08 02 A6 */ mflr r0 /* 803BBD5C 003B8CBC 90 01 00 04 */ stw r0, 4(r1) /* 803BBD60 003B8CC0 94 21 FF D0 */ stwu r1, -0x30(r1) /* 803BBD64 003B8CC4 93 E1 00 2C */ stw r31, 0x2c(r1) /* 803BBD68 003B8CC8 93 C1 00 28 */ stw r30, 0x28(r1) /* 803BBD6C 003B8CCC 93 A1 00 24 */ stw r29, 0x24(r1) /* 803BBD70 003B8CD0 3B A3 00 00 */ addi r29, r3, 0 /* 803BBD74 003B8CD4 1C 9D 01 10 */ mulli r4, r29, 0x110 /* 803BBD78 003B8CD8 93 81 00 20 */ stw r28, 0x20(r1) /* 803BBD7C 003B8CDC 3C 60 80 57 */ lis r3, __CARDBlock@ha /* 803BBD80 003B8CE0 38 03 9A 58 */ addi r0, r3, __CARDBlock@l /* 803BBD84 003B8CE4 7C 60 22 14 */ add r3, r0, r4 /* 803BBD88 003B8CE8 80 03 00 24 */ lwz r0, 0x24(r3) /* 803BBD8C 003B8CEC 3B E3 00 00 */ addi r31, r3, 0 /* 803BBD90 003B8CF0 2C 00 00 00 */ cmpwi r0, 0 /* 803BBD94 003B8CF4 40 82 02 AC */ bne lbl_803BC040 /* 803BBD98 003B8CF8 38 7D 00 00 */ addi r3, r29, 0 /* 803BBD9C 003B8CFC 38 A1 00 18 */ addi r5, r1, 0x18 /* 803BBDA0 003B8D00 38 80 00 00 */ li r4, 0 /* 803BBDA4 003B8D04 48 00 57 D1 */ bl EXIGetID /* 803BBDA8 003B8D08 2C 03 00 00 */ cmpwi r3, 0 /* 803BBDAC 003B8D0C 40 82 00 0C */ bne lbl_803BBDB8 /* 803BBDB0 003B8D10 3B C0 FF FD */ li r30, -3 /* 803BBDB4 003B8D14 48 00 00 20 */ b lbl_803BBDD4 lbl_803BBDB8: /* 803BBDB8 003B8D18 80 61 00 18 */ lwz r3, 0x18(r1) /* 803BBDBC 003B8D1C 4B FF FD 55 */ bl IsCard /* 803BBDC0 003B8D20 2C 03 00 00 */ cmpwi r3, 0 /* 803BBDC4 003B8D24 41 82 00 0C */ beq lbl_803BBDD0 /* 803BBDC8 003B8D28 3B C0 00 00 */ li r30, 0 /* 803BBDCC 003B8D2C 48 00 00 08 */ b lbl_803BBDD4 lbl_803BBDD0: /* 803BBDD0 003B8D30 3B C0 FF FE */ li r30, -2 lbl_803BBDD4: /* 803BBDD4 003B8D34 2C 1E 00 00 */ cmpwi r30, 0 /* 803BBDD8 003B8D38 41 80 03 44 */ blt lbl_803BC11C /* 803BBDDC 003B8D3C 80 01 00 18 */ lwz r0, 0x18(r1) /* 803BBDE0 003B8D40 3C 80 80 3F */ lis r4, SectorSizeTable@ha /* 803BBDE4 003B8D44 38 84 6E 60 */ addi r4, r4, SectorSizeTable@l /* 803BBDE8 003B8D48 90 1F 01 08 */ stw r0, 0x108(r31) /* 803BBDEC 003B8D4C 3C 60 80 3F */ lis r3, LatencyTable@ha /* 803BBDF0 003B8D50 38 03 6E 80 */ addi r0, r3, LatencyTable@l /* 803BBDF4 003B8D54 80 A1 00 18 */ lwz r5, 0x18(r1) /* 803BBDF8 003B8D58 38 7D 00 00 */ addi r3, r29, 0 /* 803BBDFC 003B8D5C 54 A5 06 3A */ rlwinm r5, r5, 0, 0x18, 0x1d /* 803BBE00 003B8D60 B0 BF 00 08 */ sth r5, 8(r31) /* 803BBE04 003B8D64 80 A1 00 18 */ lwz r5, 0x18(r1) /* 803BBE08 003B8D68 54 A5 BE FA */ rlwinm r5, r5, 0x17, 0x1b, 0x1d /* 803BBE0C 003B8D6C 7C 84 2A 14 */ add r4, r4, r5 /* 803BBE10 003B8D70 80 84 00 00 */ lwz r4, 0(r4) /* 803BBE14 003B8D74 90 9F 00 0C */ stw r4, 0xc(r31) /* 803BBE18 003B8D78 A0 BF 00 08 */ lhz r5, 8(r31) /* 803BBE1C 003B8D7C 80 9F 00 0C */ lwz r4, 0xc(r31) /* 803BBE20 003B8D80 54 A5 A0 16 */ slwi r5, r5, 0x14 /* 803BBE24 003B8D84 7C A5 1E 70 */ srawi r5, r5, 3 /* 803BBE28 003B8D88 7C A5 01 94 */ addze r5, r5 /* 803BBE2C 003B8D8C 7C 85 23 D6 */ divw r4, r5, r4 /* 803BBE30 003B8D90 B0 9F 00 10 */ sth r4, 0x10(r31) /* 803BBE34 003B8D94 80 81 00 18 */ lwz r4, 0x18(r1) /* 803BBE38 003B8D98 54 84 D6 FA */ rlwinm r4, r4, 0x1a, 0x1b, 0x1d /* 803BBE3C 003B8D9C 7C 80 22 14 */ add r4, r0, r4 /* 803BBE40 003B8DA0 80 04 00 00 */ lwz r0, 0(r4) /* 803BBE44 003B8DA4 90 1F 00 14 */ stw r0, 0x14(r31) /* 803BBE48 003B8DA8 4B FF C4 FD */ bl __CARDClearStatus /* 803BBE4C 003B8DAC 7C 7E 1B 79 */ or. r30, r3, r3 /* 803BBE50 003B8DB0 41 80 02 CC */ blt lbl_803BC11C /* 803BBE54 003B8DB4 38 7D 00 00 */ addi r3, r29, 0 /* 803BBE58 003B8DB8 38 81 00 14 */ addi r4, r1, 0x14 /* 803BBE5C 003B8DBC 4B FF C3 F9 */ bl __CARDReadStatus /* 803BBE60 003B8DC0 7C 7E 1B 79 */ or. r30, r3, r3 /* 803BBE64 003B8DC4 41 80 02 B8 */ blt lbl_803BC11C /* 803BBE68 003B8DC8 7F A3 EB 78 */ mr r3, r29 /* 803BBE6C 003B8DCC 48 00 4A F5 */ bl EXIProbe /* 803BBE70 003B8DD0 2C 03 00 00 */ cmpwi r3, 0 /* 803BBE74 003B8DD4 40 82 00 0C */ bne lbl_803BBE80 /* 803BBE78 003B8DD8 3B C0 FF FD */ li r30, -3 /* 803BBE7C 003B8DDC 48 00 02 A0 */ b lbl_803BC11C lbl_803BBE80: /* 803BBE80 003B8DE0 88 01 00 14 */ lbz r0, 0x14(r1) /* 803BBE84 003B8DE4 54 00 06 73 */ rlwinm. r0, r0, 0, 0x19, 0x19 /* 803BBE88 003B8DE8 40 82 01 14 */ bne lbl_803BBF9C /* 803BBE8C 003B8DEC 38 7D 00 00 */ addi r3, r29, 0 /* 803BBE90 003B8DF0 38 9F 00 18 */ addi r4, r31, 0x18 /* 803BBE94 003B8DF4 4B FF D5 6D */ bl __CARDUnlock /* 803BBE98 003B8DF8 7C 7E 1B 79 */ or. r30, r3, r3 /* 803BBE9C 003B8DFC 41 80 02 80 */ blt lbl_803BC11C /* 803BBEA0 003B8E00 4B FC 7C 91 */ bl __OSLockSramEx /* 803BBEA4 003B8E04 1C 1D 00 0C */ mulli r0, r29, 0xc /* 803BBEA8 003B8E08 7C 83 02 14 */ add r4, r3, r0 /* 803BBEAC 003B8E0C 88 1F 00 18 */ lbz r0, 0x18(r31) /* 803BBEB0 003B8E10 38 BF 00 18 */ addi r5, r31, 0x18 /* 803BBEB4 003B8E14 98 04 00 00 */ stb r0, 0(r4) /* 803BBEB8 003B8E18 39 05 00 02 */ addi r8, r5, 2 /* 803BBEBC 003B8E1C 39 25 00 03 */ addi r9, r5, 3 /* 803BBEC0 003B8E20 88 FF 00 18 */ lbz r7, 0x18(r31) /* 803BBEC4 003B8E24 39 45 00 04 */ addi r10, r5, 4 /* 803BBEC8 003B8E28 88 1F 00 19 */ lbz r0, 0x19(r31) /* 803BBECC 003B8E2C 39 65 00 05 */ addi r11, r5, 5 /* 803BBED0 003B8E30 39 85 00 06 */ addi r12, r5, 6 /* 803BBED4 003B8E34 98 04 00 01 */ stb r0, 1(r4) /* 803BBED8 003B8E38 3B 85 00 07 */ addi r28, r5, 7 /* 803BBEDC 003B8E3C 38 A0 00 08 */ li r5, 8 /* 803BBEE0 003B8E40 88 1F 00 19 */ lbz r0, 0x19(r31) /* 803BBEE4 003B8E44 88 C8 00 00 */ lbz r6, 0(r8) /* 803BBEE8 003B8E48 7C 07 02 14 */ add r0, r7, r0 /* 803BBEEC 003B8E4C 98 C4 00 02 */ stb r6, 2(r4) /* 803BBEF0 003B8E50 88 E8 00 00 */ lbz r7, 0(r8) /* 803BBEF4 003B8E54 88 C9 00 00 */ lbz r6, 0(r9) /* 803BBEF8 003B8E58 7C 00 3A 14 */ add r0, r0, r7 /* 803BBEFC 003B8E5C 98 C4 00 03 */ stb r6, 3(r4) /* 803BBF00 003B8E60 88 E9 00 00 */ lbz r7, 0(r9) /* 803BBF04 003B8E64 88 CA 00 00 */ lbz r6, 0(r10) /* 803BBF08 003B8E68 7C 00 3A 14 */ add r0, r0, r7 /* 803BBF0C 003B8E6C 98 C4 00 04 */ stb r6, 4(r4) /* 803BBF10 003B8E70 88 EA 00 00 */ lbz r7, 0(r10) /* 803BBF14 003B8E74 88 CB 00 00 */ lbz r6, 0(r11) /* 803BBF18 003B8E78 7C 00 3A 14 */ add r0, r0, r7 /* 803BBF1C 003B8E7C 98 C4 00 05 */ stb r6, 5(r4) /* 803BBF20 003B8E80 88 EB 00 00 */ lbz r7, 0(r11) /* 803BBF24 003B8E84 88 CC 00 00 */ lbz r6, 0(r12) /* 803BBF28 003B8E88 7C 00 3A 14 */ add r0, r0, r7 /* 803BBF2C 003B8E8C 98 C4 00 06 */ stb r6, 6(r4) /* 803BBF30 003B8E90 88 EC 00 00 */ lbz r7, 0(r12) /* 803BBF34 003B8E94 88 DC 00 00 */ lbz r6, 0(r28) /* 803BBF38 003B8E98 7C 00 3A 14 */ add r0, r0, r7 /* 803BBF3C 003B8E9C 98 C4 00 07 */ stb r6, 7(r4) /* 803BBF40 003B8EA0 88 DC 00 00 */ lbz r6, 0(r28) /* 803BBF44 003B8EA4 7C 00 32 14 */ add r0, r0, r6 /* 803BBF48 003B8EA8 48 00 01 F0 */ b lbl_803BC138 lbl_803BBF4C: /* 803BBF4C 003B8EAC 20 85 00 0C */ subfic r4, r5, 0xc /* 803BBF50 003B8EB0 2C 05 00 0C */ cmpwi r5, 0xc /* 803BBF54 003B8EB4 7C 89 03 A6 */ mtctr r4 /* 803BBF58 003B8EB8 40 80 00 28 */ bge lbl_803BBF80 lbl_803BBF5C: /* 803BBF5C 003B8EBC 38 E5 00 18 */ addi r7, r5, 0x18 /* 803BBF60 003B8EC0 7C FF 3A 14 */ add r7, r31, r7 /* 803BBF64 003B8EC4 88 87 00 00 */ lbz r4, 0(r7) /* 803BBF68 003B8EC8 38 A5 00 01 */ addi r5, r5, 1 /* 803BBF6C 003B8ECC 98 86 00 00 */ stb r4, 0(r6) /* 803BBF70 003B8ED0 38 C6 00 01 */ addi r6, r6, 1 /* 803BBF74 003B8ED4 88 87 00 00 */ lbz r4, 0(r7) /* 803BBF78 003B8ED8 7C 00 22 14 */ add r0, r0, r4 /* 803BBF7C 003B8EDC 42 00 FF E0 */ bdnz lbl_803BBF5C lbl_803BBF80: /* 803BBF80 003B8EE0 7C 63 EA 14 */ add r3, r3, r29 /* 803BBF84 003B8EE4 7C 00 00 F8 */ nor r0, r0, r0 /* 803BBF88 003B8EE8 98 03 00 26 */ stb r0, 0x26(r3) /* 803BBF8C 003B8EEC 38 60 00 01 */ li r3, 1 /* 803BBF90 003B8EF0 4B FC 7F 29 */ bl __OSUnlockSramEx /* 803BBF94 003B8EF4 7F C3 F3 78 */ mr r3, r30 /* 803BBF98 003B8EF8 48 00 01 B0 */ b lbl_803BC148 lbl_803BBF9C: /* 803BBF9C 003B8EFC 38 00 00 01 */ li r0, 1 /* 803BBFA0 003B8F00 90 1F 00 24 */ stw r0, 0x24(r31) /* 803BBFA4 003B8F04 4B FC 7B 8D */ bl __OSLockSramEx /* 803BBFA8 003B8F08 1C 1D 00 0C */ mulli r0, r29, 0xc /* 803BBFAC 003B8F0C 3B C3 00 00 */ addi r30, r3, 0 /* 803BBFB0 003B8F10 7C BE 02 14 */ add r5, r30, r0 /* 803BBFB4 003B8F14 88 85 00 00 */ lbz r4, 0(r5) /* 803BBFB8 003B8F18 38 C0 00 08 */ li r6, 8 /* 803BBFBC 003B8F1C 88 05 00 01 */ lbz r0, 1(r5) /* 803BBFC0 003B8F20 88 65 00 02 */ lbz r3, 2(r5) /* 803BBFC4 003B8F24 7F 84 02 14 */ add r28, r4, r0 /* 803BBFC8 003B8F28 88 05 00 03 */ lbz r0, 3(r5) /* 803BBFCC 003B8F2C 7F 9C 1A 14 */ add r28, r28, r3 /* 803BBFD0 003B8F30 88 65 00 04 */ lbz r3, 4(r5) /* 803BBFD4 003B8F34 7F 9C 02 14 */ add r28, r28, r0 /* 803BBFD8 003B8F38 88 05 00 05 */ lbz r0, 5(r5) /* 803BBFDC 003B8F3C 7F 9C 1A 14 */ add r28, r28, r3 /* 803BBFE0 003B8F40 88 65 00 06 */ lbz r3, 6(r5) /* 803BBFE4 003B8F44 7F 9C 02 14 */ add r28, r28, r0 /* 803BBFE8 003B8F48 88 05 00 07 */ lbz r0, 7(r5) /* 803BBFEC 003B8F4C 7F 9C 1A 14 */ add r28, r28, r3 /* 803BBFF0 003B8F50 7F 9C 02 14 */ add r28, r28, r0 /* 803BBFF4 003B8F54 48 00 01 4C */ b lbl_803BC140 lbl_803BBFF8: /* 803BBFF8 003B8F58 20 06 00 0C */ subfic r0, r6, 0xc /* 803BBFFC 003B8F5C 2C 06 00 0C */ cmpwi r6, 0xc /* 803BC000 003B8F60 7C 09 03 A6 */ mtctr r0 /* 803BC004 003B8F64 40 80 00 14 */ bge lbl_803BC018 lbl_803BC008: /* 803BC008 003B8F68 88 03 00 00 */ lbz r0, 0(r3) /* 803BC00C 003B8F6C 38 63 00 01 */ addi r3, r3, 1 /* 803BC010 003B8F70 7F 9C 02 14 */ add r28, r28, r0 /* 803BC014 003B8F74 42 00 FF F4 */ bdnz lbl_803BC008 lbl_803BC018: /* 803BC018 003B8F78 38 60 00 00 */ li r3, 0 /* 803BC01C 003B8F7C 4B FC 7E 9D */ bl __OSUnlockSramEx /* 803BC020 003B8F80 7C 7E EA 14 */ add r3, r30, r29 /* 803BC024 003B8F84 7F 80 E0 F8 */ nor r0, r28, r28 /* 803BC028 003B8F88 88 63 00 26 */ lbz r3, 0x26(r3) /* 803BC02C 003B8F8C 54 00 06 3E */ clrlwi r0, r0, 0x18 /* 803BC030 003B8F90 7C 03 00 40 */ cmplw r3, r0 /* 803BC034 003B8F94 41 82 00 0C */ beq lbl_803BC040 /* 803BC038 003B8F98 3B C0 FF FB */ li r30, -5 /* 803BC03C 003B8F9C 48 00 00 E0 */ b lbl_803BC11C lbl_803BC040: /* 803BC040 003B8FA0 80 1F 00 24 */ lwz r0, 0x24(r31) /* 803BC044 003B8FA4 2C 00 00 01 */ cmpwi r0, 1 /* 803BC048 003B8FA8 40 82 00 88 */ bne lbl_803BC0D0 /* 803BC04C 003B8FAC 80 7F 01 08 */ lwz r3, 0x108(r31) /* 803BC050 003B8FB0 3C 03 80 00 */ addis r0, r3, 0x8000 /* 803BC054 003B8FB4 28 00 00 04 */ cmplwi r0, 4 /* 803BC058 003B8FB8 40 82 00 34 */ bne lbl_803BC08C /* 803BC05C 003B8FBC 4B FC 7A D5 */ bl __OSLockSramEx /* 803BC060 003B8FC0 1C 1D 00 0C */ mulli r0, r29, 0xc /* 803BC064 003B8FC4 7F 83 02 2E */ lhzx r28, r3, r0 /* 803BC068 003B8FC8 38 60 00 00 */ li r3, 0 /* 803BC06C 003B8FCC 4B FC 7E 4D */ bl __OSUnlockSramEx /* 803BC070 003B8FD0 A0 0D A0 40 */ lhz r0, __CARDVendorID@sda21(r13) /* 803BC074 003B8FD4 28 00 FF FF */ cmplwi r0, 0xffff /* 803BC078 003B8FD8 41 82 00 0C */ beq lbl_803BC084 /* 803BC07C 003B8FDC 7C 1C 00 40 */ cmplw r28, r0 /* 803BC080 003B8FE0 41 82 00 0C */ beq lbl_803BC08C lbl_803BC084: /* 803BC084 003B8FE4 3B C0 FF FE */ li r30, -2 /* 803BC088 003B8FE8 48 00 00 94 */ b lbl_803BC11C lbl_803BC08C: /* 803BC08C 003B8FEC 38 00 00 02 */ li r0, 2 /* 803BC090 003B8FF0 90 1F 00 24 */ stw r0, 0x24(r31) /* 803BC094 003B8FF4 38 7D 00 00 */ addi r3, r29, 0 /* 803BC098 003B8FF8 38 80 00 01 */ li r4, 1 /* 803BC09C 003B8FFC 4B FF C0 F9 */ bl __CARDEnableInterrupt /* 803BC0A0 003B9000 7C 7E 1B 79 */ or. r30, r3, r3 /* 803BC0A4 003B9004 41 80 00 78 */ blt lbl_803BC11C /* 803BC0A8 003B9008 3C 60 80 3B */ lis r3, __CARDExiHandler@ha /* 803BC0AC 003B900C 38 83 7F 50 */ addi r4, r3, __CARDExiHandler@l /* 803BC0B0 003B9010 38 7D 00 00 */ addi r3, r29, 0 /* 803BC0B4 003B9014 48 00 46 BD */ bl EXISetExiCallback /* 803BC0B8 003B9018 7F A3 EB 78 */ mr r3, r29 /* 803BC0BC 003B901C 48 00 53 9D */ bl EXIUnlock /* 803BC0C0 003B9020 3C 80 00 01 */ lis r4, 0x0000A000@ha /* 803BC0C4 003B9024 80 7F 00 80 */ lwz r3, 0x80(r31) /* 803BC0C8 003B9028 38 84 A0 00 */ addi r4, r4, 0x0000A000@l /* 803BC0CC 003B902C 4B FC 29 B9 */ bl DCInvalidateRange lbl_803BC0D0: /* 803BC0D0 003B9030 80 9F 00 24 */ lwz r4, 0x24(r31) /* 803BC0D4 003B9034 3C 60 80 3C */ lis r3, __CARDMountCallback@ha /* 803BC0D8 003B9038 80 1F 00 0C */ lwz r0, 0xc(r31) /* 803BC0DC 003B903C 38 E3 C1 68 */ addi r7, r3, __CARDMountCallback@l /* 803BC0E0 003B9040 38 64 FF FE */ addi r3, r4, -2 /* 803BC0E4 003B9044 7C 80 19 D6 */ mullw r4, r0, r3 /* 803BC0E8 003B9048 80 BF 00 80 */ lwz r5, 0x80(r31) /* 803BC0EC 003B904C 54 60 68 24 */ slwi r0, r3, 0xd /* 803BC0F0 003B9050 7C C5 02 14 */ add r6, r5, r0 /* 803BC0F4 003B9054 38 7D 00 00 */ addi r3, r29, 0 /* 803BC0F8 003B9058 38 A0 20 00 */ li r5, 0x2000 /* 803BC0FC 003B905C 4B FF E2 CD */ bl __CARDRead /* 803BC100 003B9060 7C 7C 1B 79 */ or. r28, r3, r3 /* 803BC104 003B9064 40 80 00 10 */ bge lbl_803BC114 /* 803BC108 003B9068 38 7F 00 00 */ addi r3, r31, 0 /* 803BC10C 003B906C 38 9C 00 00 */ addi r4, r28, 0 /* 803BC110 003B9070 4B FF CD 49 */ bl __CARDPutControlBlock lbl_803BC114: /* 803BC114 003B9074 7F 83 E3 78 */ mr r3, r28 /* 803BC118 003B9078 48 00 00 30 */ b lbl_803BC148 lbl_803BC11C: /* 803BC11C 003B907C 7F A3 EB 78 */ mr r3, r29 /* 803BC120 003B9080 48 00 53 39 */ bl EXIUnlock /* 803BC124 003B9084 38 7D 00 00 */ addi r3, r29, 0 /* 803BC128 003B9088 38 9E 00 00 */ addi r4, r30, 0 /* 803BC12C 003B908C 48 00 03 15 */ bl DoUnmount /* 803BC130 003B9090 7F C3 F3 78 */ mr r3, r30 /* 803BC134 003B9094 48 00 00 14 */ b lbl_803BC148 lbl_803BC138: /* 803BC138 003B9098 38 C4 00 08 */ addi r6, r4, 8 /* 803BC13C 003B909C 4B FF FE 10 */ b lbl_803BBF4C lbl_803BC140: /* 803BC140 003B90A0 38 65 00 08 */ addi r3, r5, 8 /* 803BC144 003B90A4 4B FF FE B4 */ b lbl_803BBFF8 lbl_803BC148: /* 803BC148 003B90A8 80 01 00 34 */ lwz r0, 0x34(r1) /* 803BC14C 003B90AC 83 E1 00 2C */ lwz r31, 0x2c(r1) /* 803BC150 003B90B0 83 C1 00 28 */ lwz r30, 0x28(r1) /* 803BC154 003B90B4 83 A1 00 24 */ lwz r29, 0x24(r1) /* 803BC158 003B90B8 83 81 00 20 */ lwz r28, 0x20(r1) /* 803BC15C 003B90BC 38 21 00 30 */ addi r1, r1, 0x30 /* 803BC160 003B90C0 7C 08 03 A6 */ mtlr r0 /* 803BC164 003B90C4 4E 80 00 20 */ blr .global __CARDMountCallback __CARDMountCallback: /* 803BC168 003B90C8 7C 08 02 A6 */ mflr r0 /* 803BC16C 003B90CC 90 01 00 04 */ stw r0, 4(r1) /* 803BC170 003B90D0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 803BC174 003B90D4 93 E1 00 1C */ stw r31, 0x1c(r1) /* 803BC178 003B90D8 93 C1 00 18 */ stw r30, 0x18(r1) /* 803BC17C 003B90DC 93 A1 00 14 */ stw r29, 0x14(r1) /* 803BC180 003B90E0 3B A4 00 00 */ addi r29, r4, 0 /* 803BC184 003B90E4 2C 1D FF FD */ cmpwi r29, -3 /* 803BC188 003B90E8 93 81 00 10 */ stw r28, 0x10(r1) /* 803BC18C 003B90EC 3B 83 00 00 */ addi r28, r3, 0 /* 803BC190 003B90F0 1C BC 01 10 */ mulli r5, r28, 0x110 /* 803BC194 003B90F4 3C 60 80 57 */ lis r3, __CARDBlock@ha /* 803BC198 003B90F8 38 03 9A 58 */ addi r0, r3, __CARDBlock@l /* 803BC19C 003B90FC 7F E0 2A 14 */ add r31, r0, r5 /* 803BC1A0 003B9100 41 82 00 A8 */ beq lbl_803BC248 /* 803BC1A4 003B9104 40 80 00 10 */ bge lbl_803BC1B4 /* 803BC1A8 003B9108 2C 1D FF FB */ cmpwi r29, -5 /* 803BC1AC 003B910C 41 82 00 9C */ beq lbl_803BC248 /* 803BC1B0 003B9110 48 00 00 A4 */ b lbl_803BC254 lbl_803BC1B4: /* 803BC1B4 003B9114 2C 1D 00 01 */ cmpwi r29, 1 /* 803BC1B8 003B9118 41 82 00 4C */ beq lbl_803BC204 /* 803BC1BC 003B911C 40 80 00 98 */ bge lbl_803BC254 /* 803BC1C0 003B9120 2C 1D 00 00 */ cmpwi r29, 0 /* 803BC1C4 003B9124 40 80 00 08 */ bge lbl_803BC1CC /* 803BC1C8 003B9128 48 00 00 8C */ b lbl_803BC254 lbl_803BC1CC: /* 803BC1CC 003B912C 80 7F 00 24 */ lwz r3, 0x24(r31) /* 803BC1D0 003B9130 38 03 00 01 */ addi r0, r3, 1 /* 803BC1D4 003B9134 2C 00 00 07 */ cmpwi r0, 7 /* 803BC1D8 003B9138 90 1F 00 24 */ stw r0, 0x24(r31) /* 803BC1DC 003B913C 40 80 00 18 */ bge lbl_803BC1F4 /* 803BC1E0 003B9140 7F 83 E3 78 */ mr r3, r28 /* 803BC1E4 003B9144 4B FF FB 75 */ bl DoMount /* 803BC1E8 003B9148 7C 7D 1B 79 */ or. r29, r3, r3 /* 803BC1EC 003B914C 41 80 00 68 */ blt lbl_803BC254 /* 803BC1F0 003B9150 48 00 00 90 */ b lbl_803BC280 lbl_803BC1F4: /* 803BC1F4 003B9154 7F E3 FB 78 */ mr r3, r31 /* 803BC1F8 003B9158 4B FF F2 D5 */ bl __CARDVerify /* 803BC1FC 003B915C 7C 7D 1B 78 */ mr r29, r3 /* 803BC200 003B9160 48 00 00 54 */ b lbl_803BC254 lbl_803BC204: /* 803BC204 003B9164 3C 60 80 3C */ lis r3, __CARDMountCallback@ha /* 803BC208 003B9168 38 03 C1 68 */ addi r0, r3, __CARDMountCallback@l /* 803BC20C 003B916C 3C 60 80 3C */ lis r3, __CARDUnlockedHandler@ha /* 803BC210 003B9170 90 1F 00 DC */ stw r0, 0xdc(r31) /* 803BC214 003B9174 38 A3 81 10 */ addi r5, r3, __CARDUnlockedHandler@l /* 803BC218 003B9178 38 7C 00 00 */ addi r3, r28, 0 /* 803BC21C 003B917C 38 80 00 00 */ li r4, 0 /* 803BC220 003B9180 48 00 51 45 */ bl EXILock /* 803BC224 003B9184 2C 03 00 00 */ cmpwi r3, 0 /* 803BC228 003B9188 41 82 00 58 */ beq lbl_803BC280 /* 803BC22C 003B918C 38 00 00 00 */ li r0, 0 /* 803BC230 003B9190 90 1F 00 DC */ stw r0, 0xdc(r31) /* 803BC234 003B9194 7F 83 E3 78 */ mr r3, r28 /* 803BC238 003B9198 4B FF FB 21 */ bl DoMount /* 803BC23C 003B919C 7C 7D 1B 79 */ or. r29, r3, r3 /* 803BC240 003B91A0 41 80 00 14 */ blt lbl_803BC254 /* 803BC244 003B91A4 48 00 00 3C */ b lbl_803BC280 lbl_803BC248: /* 803BC248 003B91A8 38 7C 00 00 */ addi r3, r28, 0 /* 803BC24C 003B91AC 38 9D 00 00 */ addi r4, r29, 0 /* 803BC250 003B91B0 48 00 01 F1 */ bl DoUnmount lbl_803BC254: /* 803BC254 003B91B4 83 DF 00 D0 */ lwz r30, 0xd0(r31) /* 803BC258 003B91B8 38 00 00 00 */ li r0, 0 /* 803BC25C 003B91BC 38 7F 00 00 */ addi r3, r31, 0 /* 803BC260 003B91C0 90 1F 00 D0 */ stw r0, 0xd0(r31) /* 803BC264 003B91C4 7F A4 EB 78 */ mr r4, r29 /* 803BC268 003B91C8 4B FF CB F1 */ bl __CARDPutControlBlock /* 803BC26C 003B91CC 39 9E 00 00 */ addi r12, r30, 0 /* 803BC270 003B91D0 7D 88 03 A6 */ mtlr r12 /* 803BC274 003B91D4 38 7C 00 00 */ addi r3, r28, 0 /* 803BC278 003B91D8 38 9D 00 00 */ addi r4, r29, 0 /* 803BC27C 003B91DC 4E 80 00 21 */ blrl lbl_803BC280: /* 803BC280 003B91E0 80 01 00 24 */ lwz r0, 0x24(r1) /* 803BC284 003B91E4 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 803BC288 003B91E8 83 C1 00 18 */ lwz r30, 0x18(r1) /* 803BC28C 003B91EC 83 A1 00 14 */ lwz r29, 0x14(r1) /* 803BC290 003B91F0 83 81 00 10 */ lwz r28, 0x10(r1) /* 803BC294 003B91F4 38 21 00 20 */ addi r1, r1, 0x20 /* 803BC298 003B91F8 7C 08 03 A6 */ mtlr r0 /* 803BC29C 003B91FC 4E 80 00 20 */ blr .global CARDMountAsync CARDMountAsync: /* 803BC2A0 003B9200 7C 08 02 A6 */ mflr r0 /* 803BC2A4 003B9204 90 01 00 04 */ stw r0, 4(r1) /* 803BC2A8 003B9208 94 21 FF D0 */ stwu r1, -0x30(r1) /* 803BC2AC 003B920C BF 41 00 18 */ stmw r26, 0x18(r1) /* 803BC2B0 003B9210 7C 7E 1B 79 */ or. r30, r3, r3 /* 803BC2B4 003B9214 3B 44 00 00 */ addi r26, r4, 0 /* 803BC2B8 003B9218 3B 65 00 00 */ addi r27, r5, 0 /* 803BC2BC 003B921C 3B A6 00 00 */ addi r29, r6, 0 /* 803BC2C0 003B9220 41 80 00 0C */ blt lbl_803BC2CC /* 803BC2C4 003B9224 2C 1E 00 02 */ cmpwi r30, 2 /* 803BC2C8 003B9228 41 80 00 0C */ blt lbl_803BC2D4 lbl_803BC2CC: /* 803BC2CC 003B922C 38 60 FF 80 */ li r3, -128 /* 803BC2D0 003B9230 48 00 01 5C */ b lbl_803BC42C lbl_803BC2D4: /* 803BC2D4 003B9234 3C 60 80 00 */ lis r3, 0x800030E3@ha /* 803BC2D8 003B9238 88 03 30 E3 */ lbz r0, 0x800030E3@l(r3) /* 803BC2DC 003B923C 54 00 06 31 */ rlwinm. r0, r0, 0, 0x18, 0x18 /* 803BC2E0 003B9240 41 82 00 0C */ beq lbl_803BC2EC /* 803BC2E4 003B9244 38 60 FF FD */ li r3, -3 /* 803BC2E8 003B9248 48 00 01 44 */ b lbl_803BC42C lbl_803BC2EC: /* 803BC2EC 003B924C 1C 9E 01 10 */ mulli r4, r30, 0x110 /* 803BC2F0 003B9250 3C 60 80 57 */ lis r3, __CARDBlock@ha /* 803BC2F4 003B9254 38 03 9A 58 */ addi r0, r3, __CARDBlock@l /* 803BC2F8 003B9258 7F E0 22 14 */ add r31, r0, r4 /* 803BC2FC 003B925C 4B FC 53 65 */ bl OSDisableInterrupts /* 803BC300 003B9260 80 1F 00 04 */ lwz r0, 4(r31) /* 803BC304 003B9264 3B 83 00 00 */ addi r28, r3, 0 /* 803BC308 003B9268 2C 00 FF FF */ cmpwi r0, -1 /* 803BC30C 003B926C 40 82 00 14 */ bne lbl_803BC320 /* 803BC310 003B9270 7F 83 E3 78 */ mr r3, r28 /* 803BC314 003B9274 4B FC 53 75 */ bl OSRestoreInterrupts /* 803BC318 003B9278 38 60 FF FF */ li r3, -1 /* 803BC31C 003B927C 48 00 01 10 */ b lbl_803BC42C lbl_803BC320: /* 803BC320 003B9280 80 1F 00 00 */ lwz r0, 0(r31) /* 803BC324 003B9284 2C 00 00 00 */ cmpwi r0, 0 /* 803BC328 003B9288 40 82 00 24 */ bne lbl_803BC34C /* 803BC32C 003B928C 7F C3 F3 78 */ mr r3, r30 /* 803BC330 003B9290 48 00 52 05 */ bl EXIGetState /* 803BC334 003B9294 54 60 07 39 */ rlwinm. r0, r3, 0, 0x1c, 0x1c /* 803BC338 003B9298 41 82 00 14 */ beq lbl_803BC34C /* 803BC33C 003B929C 7F 83 E3 78 */ mr r3, r28 /* 803BC340 003B92A0 4B FC 53 49 */ bl OSRestoreInterrupts /* 803BC344 003B92A4 38 60 FF FE */ li r3, -2 /* 803BC348 003B92A8 48 00 00 E4 */ b lbl_803BC42C lbl_803BC34C: /* 803BC34C 003B92AC 38 00 FF FF */ li r0, -1 /* 803BC350 003B92B0 90 1F 00 04 */ stw r0, 4(r31) /* 803BC354 003B92B4 28 1D 00 00 */ cmplwi r29, 0 /* 803BC358 003B92B8 93 5F 00 80 */ stw r26, 0x80(r31) /* 803BC35C 003B92BC 93 7F 00 C4 */ stw r27, 0xc4(r31) /* 803BC360 003B92C0 41 82 00 0C */ beq lbl_803BC36C /* 803BC364 003B92C4 7F A0 EB 78 */ mr r0, r29 /* 803BC368 003B92C8 48 00 00 0C */ b lbl_803BC374 lbl_803BC36C: /* 803BC36C 003B92CC 3C 60 80 3B */ lis r3, __CARDDefaultApiCallback@ha /* 803BC370 003B92D0 38 03 7E 74 */ addi r0, r3, __CARDDefaultApiCallback@l lbl_803BC374: /* 803BC374 003B92D4 90 1F 00 D0 */ stw r0, 0xd0(r31) /* 803BC378 003B92D8 38 00 00 00 */ li r0, 0 /* 803BC37C 003B92DC 90 1F 00 CC */ stw r0, 0xcc(r31) /* 803BC380 003B92E0 80 1F 00 00 */ lwz r0, 0(r31) /* 803BC384 003B92E4 2C 00 00 00 */ cmpwi r0, 0 /* 803BC388 003B92E8 40 82 00 34 */ bne lbl_803BC3BC /* 803BC38C 003B92EC 3C 60 80 3B */ lis r3, __CARDExtHandler@ha /* 803BC390 003B92F0 38 83 7E 78 */ addi r4, r3, __CARDExtHandler@l /* 803BC394 003B92F4 38 7E 00 00 */ addi r3, r30, 0 /* 803BC398 003B92F8 48 00 46 FD */ bl EXIAttach /* 803BC39C 003B92FC 2C 03 00 00 */ cmpwi r3, 0 /* 803BC3A0 003B9300 40 82 00 1C */ bne lbl_803BC3BC /* 803BC3A4 003B9304 38 00 FF FD */ li r0, -3 /* 803BC3A8 003B9308 90 1F 00 04 */ stw r0, 4(r31) /* 803BC3AC 003B930C 7F 83 E3 78 */ mr r3, r28 /* 803BC3B0 003B9310 4B FC 52 D9 */ bl OSRestoreInterrupts /* 803BC3B4 003B9314 38 60 FF FD */ li r3, -3 /* 803BC3B8 003B9318 48 00 00 74 */ b lbl_803BC42C lbl_803BC3BC: /* 803BC3BC 003B931C 3B A0 00 00 */ li r29, 0 /* 803BC3C0 003B9320 93 BF 00 24 */ stw r29, 0x24(r31) /* 803BC3C4 003B9324 38 00 00 01 */ li r0, 1 /* 803BC3C8 003B9328 38 7E 00 00 */ addi r3, r30, 0 /* 803BC3CC 003B932C 90 1F 00 00 */ stw r0, 0(r31) /* 803BC3D0 003B9330 38 80 00 00 */ li r4, 0 /* 803BC3D4 003B9334 48 00 43 9D */ bl EXISetExiCallback /* 803BC3D8 003B9338 38 7F 00 E0 */ addi r3, r31, 0xe0 /* 803BC3DC 003B933C 4B FC 20 19 */ bl OSCancelAlarm /* 803BC3E0 003B9340 93 BF 00 84 */ stw r29, 0x84(r31) /* 803BC3E4 003B9344 7F 83 E3 78 */ mr r3, r28 /* 803BC3E8 003B9348 93 BF 00 88 */ stw r29, 0x88(r31) /* 803BC3EC 003B934C 4B FC 52 9D */ bl OSRestoreInterrupts /* 803BC3F0 003B9350 3C 60 80 3C */ lis r3, __CARDMountCallback@ha /* 803BC3F4 003B9354 38 03 C1 68 */ addi r0, r3, __CARDMountCallback@l /* 803BC3F8 003B9358 3C 60 80 3C */ lis r3, __CARDUnlockedHandler@ha /* 803BC3FC 003B935C 90 1F 00 DC */ stw r0, 0xdc(r31) /* 803BC400 003B9360 38 A3 81 10 */ addi r5, r3, __CARDUnlockedHandler@l /* 803BC404 003B9364 38 7E 00 00 */ addi r3, r30, 0 /* 803BC408 003B9368 38 80 00 00 */ li r4, 0 /* 803BC40C 003B936C 48 00 4F 59 */ bl EXILock /* 803BC410 003B9370 2C 03 00 00 */ cmpwi r3, 0 /* 803BC414 003B9374 40 82 00 0C */ bne lbl_803BC420 /* 803BC418 003B9378 38 60 00 00 */ li r3, 0 /* 803BC41C 003B937C 48 00 00 10 */ b lbl_803BC42C lbl_803BC420: /* 803BC420 003B9380 93 BF 00 DC */ stw r29, 0xdc(r31) /* 803BC424 003B9384 7F C3 F3 78 */ mr r3, r30 /* 803BC428 003B9388 4B FF F9 31 */ bl DoMount lbl_803BC42C: /* 803BC42C 003B938C BB 41 00 18 */ lmw r26, 0x18(r1) /* 803BC430 003B9390 80 01 00 34 */ lwz r0, 0x34(r1) /* 803BC434 003B9394 38 21 00 30 */ addi r1, r1, 0x30 /* 803BC438 003B9398 7C 08 03 A6 */ mtlr r0 /* 803BC43C 003B939C 4E 80 00 20 */ blr .global DoUnmount DoUnmount: /* 803BC440 003B93A0 7C 08 02 A6 */ mflr r0 /* 803BC444 003B93A4 90 01 00 04 */ stw r0, 4(r1) /* 803BC448 003B93A8 94 21 FF E0 */ stwu r1, -0x20(r1) /* 803BC44C 003B93AC 93 E1 00 1C */ stw r31, 0x1c(r1) /* 803BC450 003B93B0 93 C1 00 18 */ stw r30, 0x18(r1) /* 803BC454 003B93B4 93 A1 00 14 */ stw r29, 0x14(r1) /* 803BC458 003B93B8 3B A4 00 00 */ addi r29, r4, 0 /* 803BC45C 003B93BC 93 81 00 10 */ stw r28, 0x10(r1) /* 803BC460 003B93C0 3B 83 00 00 */ addi r28, r3, 0 /* 803BC464 003B93C4 1C BC 01 10 */ mulli r5, r28, 0x110 /* 803BC468 003B93C8 3C 60 80 57 */ lis r3, __CARDBlock@ha /* 803BC46C 003B93CC 38 03 9A 58 */ addi r0, r3, __CARDBlock@l /* 803BC470 003B93D0 7F E0 2A 14 */ add r31, r0, r5 /* 803BC474 003B93D4 4B FC 51 ED */ bl OSDisableInterrupts /* 803BC478 003B93D8 80 1F 00 00 */ lwz r0, 0(r31) /* 803BC47C 003B93DC 3B C3 00 00 */ addi r30, r3, 0 /* 803BC480 003B93E0 2C 00 00 00 */ cmpwi r0, 0 /* 803BC484 003B93E4 41 82 00 30 */ beq lbl_803BC4B4 /* 803BC488 003B93E8 38 7C 00 00 */ addi r3, r28, 0 /* 803BC48C 003B93EC 38 80 00 00 */ li r4, 0 /* 803BC490 003B93F0 48 00 42 E1 */ bl EXISetExiCallback /* 803BC494 003B93F4 7F 83 E3 78 */ mr r3, r28 /* 803BC498 003B93F8 48 00 47 09 */ bl EXIDetach /* 803BC49C 003B93FC 38 7F 00 E0 */ addi r3, r31, 0xe0 /* 803BC4A0 003B9400 4B FC 1F 55 */ bl OSCancelAlarm /* 803BC4A4 003B9404 38 00 00 00 */ li r0, 0 /* 803BC4A8 003B9408 90 1F 00 00 */ stw r0, 0(r31) /* 803BC4AC 003B940C 93 BF 00 04 */ stw r29, 4(r31) /* 803BC4B0 003B9410 90 1F 00 24 */ stw r0, 0x24(r31) lbl_803BC4B4: /* 803BC4B4 003B9414 7F C3 F3 78 */ mr r3, r30 /* 803BC4B8 003B9418 4B FC 51 D1 */ bl OSRestoreInterrupts /* 803BC4BC 003B941C 80 01 00 24 */ lwz r0, 0x24(r1) /* 803BC4C0 003B9420 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 803BC4C4 003B9424 83 C1 00 18 */ lwz r30, 0x18(r1) /* 803BC4C8 003B9428 83 A1 00 14 */ lwz r29, 0x14(r1) /* 803BC4CC 003B942C 83 81 00 10 */ lwz r28, 0x10(r1) /* 803BC4D0 003B9430 38 21 00 20 */ addi r1, r1, 0x20 /* 803BC4D4 003B9434 7C 08 03 A6 */ mtlr r0 /* 803BC4D8 003B9438 4E 80 00 20 */ blr .global CARDUnmount CARDUnmount: /* 803BC4DC 003B943C 7C 08 02 A6 */ mflr r0 /* 803BC4E0 003B9440 90 01 00 04 */ stw r0, 4(r1) /* 803BC4E4 003B9444 94 21 FF E0 */ stwu r1, -0x20(r1) /* 803BC4E8 003B9448 93 E1 00 1C */ stw r31, 0x1c(r1) /* 803BC4EC 003B944C 38 81 00 0C */ addi r4, r1, 0xc /* 803BC4F0 003B9450 93 C1 00 18 */ stw r30, 0x18(r1) /* 803BC4F4 003B9454 93 A1 00 14 */ stw r29, 0x14(r1) /* 803BC4F8 003B9458 3B A3 00 00 */ addi r29, r3, 0 /* 803BC4FC 003B945C 4B FF C8 A5 */ bl __CARDGetControlBlock /* 803BC500 003B9460 2C 03 00 00 */ cmpwi r3, 0 /* 803BC504 003B9464 40 80 00 08 */ bge lbl_803BC50C /* 803BC508 003B9468 48 00 00 64 */ b lbl_803BC56C lbl_803BC50C: /* 803BC50C 003B946C 1C 9D 01 10 */ mulli r4, r29, 0x110 /* 803BC510 003B9470 3C 60 80 57 */ lis r3, __CARDBlock@ha /* 803BC514 003B9474 38 03 9A 58 */ addi r0, r3, __CARDBlock@l /* 803BC518 003B9478 7F C0 22 14 */ add r30, r0, r4 /* 803BC51C 003B947C 4B FC 51 45 */ bl OSDisableInterrupts /* 803BC520 003B9480 80 1E 00 00 */ lwz r0, 0(r30) /* 803BC524 003B9484 3B E3 00 00 */ addi r31, r3, 0 /* 803BC528 003B9488 2C 00 00 00 */ cmpwi r0, 0 /* 803BC52C 003B948C 41 82 00 34 */ beq lbl_803BC560 /* 803BC530 003B9490 38 7D 00 00 */ addi r3, r29, 0 /* 803BC534 003B9494 38 80 00 00 */ li r4, 0 /* 803BC538 003B9498 48 00 42 39 */ bl EXISetExiCallback /* 803BC53C 003B949C 7F A3 EB 78 */ mr r3, r29 /* 803BC540 003B94A0 48 00 46 61 */ bl EXIDetach /* 803BC544 003B94A4 38 7E 00 E0 */ addi r3, r30, 0xe0 /* 803BC548 003B94A8 4B FC 1E AD */ bl OSCancelAlarm /* 803BC54C 003B94AC 38 60 00 00 */ li r3, 0 /* 803BC550 003B94B0 90 7E 00 00 */ stw r3, 0(r30) /* 803BC554 003B94B4 38 00 FF FD */ li r0, -3 /* 803BC558 003B94B8 90 1E 00 04 */ stw r0, 4(r30) /* 803BC55C 003B94BC 90 7E 00 24 */ stw r3, 0x24(r30) lbl_803BC560: /* 803BC560 003B94C0 7F E3 FB 78 */ mr r3, r31 /* 803BC564 003B94C4 4B FC 51 25 */ bl OSRestoreInterrupts /* 803BC568 003B94C8 38 60 00 00 */ li r3, 0 lbl_803BC56C: /* 803BC56C 003B94CC 80 01 00 24 */ lwz r0, 0x24(r1) /* 803BC570 003B94D0 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 803BC574 003B94D4 83 C1 00 18 */ lwz r30, 0x18(r1) /* 803BC578 003B94D8 83 A1 00 14 */ lwz r29, 0x14(r1) /* 803BC57C 003B94DC 38 21 00 20 */ addi r1, r1, 0x20 /* 803BC580 003B94E0 7C 08 03 A6 */ mtlr r0 /* 803BC584 003B94E4 4E 80 00 20 */ blr