.include "macros.inc" .section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860 .global strnlen strnlen: /* 8004E820 0004A660 7C 65 1B 78 */ mr r5, r3 /* 8004E824 0004A664 48 00 00 08 */ b lbl_8004E82C .global lbl_8004E828 lbl_8004E828: /* 8004E828 0004A668 38 A5 00 01 */ addi r5, r5, 0x1 .global lbl_8004E82C lbl_8004E82C: /* 8004E82C 0004A66C 88 05 00 00 */ lbz r0, 0x0(r5) /* 8004E830 0004A670 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004E834 0004A674 41 82 00 10 */ beq lbl_8004E844 /* 8004E838 0004A678 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004E83C 0004A67C 38 84 FF FF */ addi r4, r4, -0x1 /* 8004E840 0004A680 40 82 FF E8 */ bne lbl_8004E828 .global lbl_8004E844 lbl_8004E844: /* 8004E844 0004A684 7C 63 28 50 */ subf r3, r3, r5 /* 8004E848 0004A688 4E 80 00 20 */ blr /* 8004E84C 0004A68C 00 00 00 00 */ .4byte 0x00000000 .global IpcReplyHandler IpcReplyHandler: /* 8004E850 0004A690 94 21 FD 20 */ stwu r1, -0x2e0(r1) /* 8004E854 0004A694 7C 08 02 A6 */ mflr r0 /* 8004E858 0004A698 38 60 00 02 */ li r3, 0x2 /* 8004E85C 0004A69C 90 01 02 E4 */ stw r0, 0x2e4(r1) /* 8004E860 0004A6A0 93 E1 02 DC */ stw r31, 0x2dc(r1) /* 8004E864 0004A6A4 93 C1 02 D8 */ stw r30, 0x2d8(r1) /* 8004E868 0004A6A8 7C 9E 23 78 */ mr r30, r4 /* 8004E86C 0004A6AC 93 A1 02 D4 */ stw r29, 0x2d4(r1) /* 8004E870 0004A6B0 93 81 02 D0 */ stw r28, 0x2d0(r1) /* 8004E874 0004A6B4 4B FF FF 5D */ bl IPCReadReg /* 8004E878 0004A6B8 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004E87C 0004A6BC 41 82 02 0C */ beq lbl_8004EA88 /* 8004E880 0004A6C0 3F E3 80 00 */ addis r31, r3, 0x8000 /* 8004E884 0004A6C4 38 60 00 01 */ li r3, 0x1 /* 8004E888 0004A6C8 4B FF FF 49 */ bl IPCReadReg /* 8004E88C 0004A6CC 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 8004E890 0004A6D0 38 60 00 01 */ li r3, 0x1 /* 8004E894 0004A6D4 60 04 00 04 */ ori r4, r0, 0x4 /* 8004E898 0004A6D8 4B FF FF 49 */ bl IPCWriteReg /* 8004E89C 0004A6DC 3C 60 CD 00 */ lis r3, 0xCD000030@ha /* 8004E8A0 0004A6E0 3C 00 40 00 */ lis r0, 0x4000 /* 8004E8A4 0004A6E4 90 03 00 30 */ stw r0, 0xCD000030@l(r3) /* 8004E8A8 0004A6E8 7F E3 FB 78 */ mr r3, r31 /* 8004E8AC 0004A6EC 38 80 00 20 */ li r4, 0x20 /* 8004E8B0 0004A6F0 4B FC E0 A1 */ bl DCInvalidateRange /* 8004E8B4 0004A6F4 80 1F 00 08 */ lwz r0, 0x8(r31) /* 8004E8B8 0004A6F8 2C 00 00 06 */ cmpwi r0, 0x6 /* 8004E8BC 0004A6FC 41 82 00 54 */ beq lbl_8004E910 /* 8004E8C0 0004A700 40 80 00 10 */ bge lbl_8004E8D0 /* 8004E8C4 0004A704 2C 00 00 03 */ cmpwi r0, 0x3 /* 8004E8C8 0004A708 41 82 00 14 */ beq lbl_8004E8DC /* 8004E8CC 0004A70C 48 00 01 40 */ b lbl_8004EA0C .global lbl_8004E8D0 lbl_8004E8D0: /* 8004E8D0 0004A710 2C 00 00 08 */ cmpwi r0, 0x8 /* 8004E8D4 0004A714 40 80 01 38 */ bge lbl_8004EA0C /* 8004E8D8 0004A718 48 00 00 70 */ b lbl_8004E948 .global lbl_8004E8DC lbl_8004E8DC: /* 8004E8DC 0004A71C 80 7F 00 0C */ lwz r3, 0xc(r31) /* 8004E8E0 0004A720 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004E8E4 0004A724 41 82 00 0C */ beq lbl_8004E8F0 /* 8004E8E8 0004A728 3C 03 80 00 */ addis r0, r3, 0x8000 /* 8004E8EC 0004A72C 48 00 00 08 */ b lbl_8004E8F4 .global lbl_8004E8F0 lbl_8004E8F0: /* 8004E8F0 0004A730 38 00 00 00 */ li r0, 0x0 .global lbl_8004E8F4 lbl_8004E8F4: /* 8004E8F4 0004A734 90 1F 00 0C */ stw r0, 0xc(r31) /* 8004E8F8 0004A738 80 9F 00 04 */ lwz r4, 0x4(r31) /* 8004E8FC 0004A73C 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004E900 0004A740 40 81 01 0C */ ble lbl_8004EA0C /* 8004E904 0004A744 80 7F 00 0C */ lwz r3, 0xc(r31) /* 8004E908 0004A748 4B FC E0 49 */ bl DCInvalidateRange /* 8004E90C 0004A74C 48 00 01 00 */ b lbl_8004EA0C .global lbl_8004E910 lbl_8004E910: /* 8004E910 0004A750 80 7F 00 18 */ lwz r3, 0x18(r31) /* 8004E914 0004A754 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004E918 0004A758 41 82 00 0C */ beq lbl_8004E924 /* 8004E91C 0004A75C 3C 03 80 00 */ addis r0, r3, 0x8000 /* 8004E920 0004A760 48 00 00 08 */ b lbl_8004E928 .global lbl_8004E924 lbl_8004E924: /* 8004E924 0004A764 38 00 00 00 */ li r0, 0x0 .global lbl_8004E928 lbl_8004E928: /* 8004E928 0004A768 90 1F 00 18 */ stw r0, 0x18(r31) /* 8004E92C 0004A76C 80 7F 00 10 */ lwz r3, 0x10(r31) /* 8004E930 0004A770 80 9F 00 14 */ lwz r4, 0x14(r31) /* 8004E934 0004A774 4B FC E0 1D */ bl DCInvalidateRange /* 8004E938 0004A778 80 7F 00 18 */ lwz r3, 0x18(r31) /* 8004E93C 0004A77C 80 9F 00 1C */ lwz r4, 0x1c(r31) /* 8004E940 0004A780 4B FC E0 11 */ bl DCInvalidateRange /* 8004E944 0004A784 48 00 00 C8 */ b lbl_8004EA0C .global lbl_8004E948 lbl_8004E948: /* 8004E948 0004A788 80 7F 00 18 */ lwz r3, 0x18(r31) /* 8004E94C 0004A78C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004E950 0004A790 41 82 00 0C */ beq lbl_8004E95C /* 8004E954 0004A794 3C 63 80 00 */ addis r3, r3, 0x8000 /* 8004E958 0004A798 48 00 00 08 */ b lbl_8004E960 .global lbl_8004E95C lbl_8004E95C: /* 8004E95C 0004A79C 38 60 00 00 */ li r3, 0x0 .global lbl_8004E960 lbl_8004E960: /* 8004E960 0004A7A0 90 7F 00 18 */ stw r3, 0x18(r31) /* 8004E964 0004A7A4 80 9F 00 10 */ lwz r4, 0x10(r31) /* 8004E968 0004A7A8 80 1F 00 14 */ lwz r0, 0x14(r31) /* 8004E96C 0004A7AC 7C 04 02 14 */ add r0, r4, r0 /* 8004E970 0004A7B0 54 04 18 38 */ slwi r4, r0, 3 /* 8004E974 0004A7B4 4B FC DF DD */ bl DCInvalidateRange /* 8004E978 0004A7B8 3B 80 00 00 */ li r28, 0x0 /* 8004E97C 0004A7BC 3B A0 00 00 */ li r29, 0x0 /* 8004E980 0004A7C0 48 00 00 44 */ b lbl_8004E9C4 .global lbl_8004E984 lbl_8004E984: /* 8004E984 0004A7C4 80 7F 00 18 */ lwz r3, 0x18(r31) /* 8004E988 0004A7C8 7C 63 E8 2E */ lwzx r3, r3, r29 /* 8004E98C 0004A7CC 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004E990 0004A7D0 41 82 00 0C */ beq lbl_8004E99C /* 8004E994 0004A7D4 3C 03 80 00 */ addis r0, r3, 0x8000 /* 8004E998 0004A7D8 48 00 00 08 */ b lbl_8004E9A0 .global lbl_8004E99C lbl_8004E99C: /* 8004E99C 0004A7DC 38 00 00 00 */ li r0, 0x0 .global lbl_8004E9A0 lbl_8004E9A0: /* 8004E9A0 0004A7E0 80 7F 00 18 */ lwz r3, 0x18(r31) /* 8004E9A4 0004A7E4 7C 03 E9 2E */ stwx r0, r3, r29 /* 8004E9A8 0004A7E8 80 7F 00 18 */ lwz r3, 0x18(r31) /* 8004E9AC 0004A7EC 7C 83 EA 14 */ add r4, r3, r29 /* 8004E9B0 0004A7F0 7C 63 E8 2E */ lwzx r3, r3, r29 /* 8004E9B4 0004A7F4 80 84 00 04 */ lwz r4, 0x4(r4) /* 8004E9B8 0004A7F8 4B FC DF 99 */ bl DCInvalidateRange /* 8004E9BC 0004A7FC 3B 9C 00 01 */ addi r28, r28, 0x1 /* 8004E9C0 0004A800 3B BD 00 08 */ addi r29, r29, 0x8 .global lbl_8004E9C4 lbl_8004E9C4: /* 8004E9C4 0004A804 80 7F 00 10 */ lwz r3, 0x10(r31) /* 8004E9C8 0004A808 80 1F 00 14 */ lwz r0, 0x14(r31) /* 8004E9CC 0004A80C 7C 03 02 14 */ add r0, r3, r0 /* 8004E9D0 0004A810 7C 1C 00 40 */ cmplw r28, r0 /* 8004E9D4 0004A814 41 80 FF B0 */ blt lbl_8004E984 /* 8004E9D8 0004A818 80 0D E9 10 */ lwz r0, __relnchFl@sda21(r13) /* 8004E9DC 0004A81C 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004E9E0 0004A820 41 82 00 2C */ beq lbl_8004EA0C /* 8004E9E4 0004A824 80 0D E9 18 */ lwz r0, __relnchRpcSave@sda21(r13) /* 8004E9E8 0004A828 7C 00 F8 40 */ cmplw r0, r31 /* 8004E9EC 0004A82C 40 82 00 20 */ bne lbl_8004EA0C /* 8004E9F0 0004A830 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 8004E9F4 0004A834 38 00 00 00 */ li r0, 0x0 /* 8004E9F8 0004A838 90 0D E9 10 */ stw r0, __relnchFl@sda21(r13) /* 8004E9FC 0004A83C 2C 03 00 01 */ cmpwi r3, 0x1 /* 8004EA00 0004A840 40 80 00 0C */ bge lbl_8004EA0C /* 8004EA04 0004A844 38 03 00 01 */ addi r0, r3, 0x1 /* 8004EA08 0004A848 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) .global lbl_8004EA0C lbl_8004EA0C: /* 8004EA0C 0004A84C 80 1F 00 20 */ lwz r0, 0x20(r31) /* 8004EA10 0004A850 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EA14 0004A854 41 82 00 48 */ beq lbl_8004EA5C /* 8004EA18 0004A858 38 61 00 08 */ addi r3, r1, 0x8 /* 8004EA1C 0004A85C 4B FC EA 25 */ bl OSClearContext /* 8004EA20 0004A860 38 61 00 08 */ addi r3, r1, 0x8 /* 8004EA24 0004A864 4B FC E7 DD */ bl OSSetCurrentContext /* 8004EA28 0004A868 81 9F 00 20 */ lwz r12, 0x20(r31) /* 8004EA2C 0004A86C 80 7F 00 04 */ lwz r3, 0x4(r31) /* 8004EA30 0004A870 80 9F 00 24 */ lwz r4, 0x24(r31) /* 8004EA34 0004A874 7D 89 03 A6 */ mtctr r12 /* 8004EA38 0004A878 4E 80 04 21 */ bctrl /* 8004EA3C 0004A87C 38 61 00 08 */ addi r3, r1, 0x8 /* 8004EA40 0004A880 4B FC EA 01 */ bl OSClearContext /* 8004EA44 0004A884 7F C3 F3 78 */ mr r3, r30 /* 8004EA48 0004A888 4B FC E7 B9 */ bl OSSetCurrentContext /* 8004EA4C 0004A88C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004EA50 0004A890 7F E4 FB 78 */ mr r4, r31 /* 8004EA54 0004A894 48 00 1B 6D */ bl iosFree /* 8004EA58 0004A898 48 00 00 0C */ b lbl_8004EA64 .global lbl_8004EA5C lbl_8004EA5C: /* 8004EA5C 0004A89C 38 7F 00 2C */ addi r3, r31, 0x2c /* 8004EA60 0004A8A0 4B FD 6E A1 */ bl OSWakeupThread .global lbl_8004EA64 lbl_8004EA64: /* 8004EA64 0004A8A4 38 60 00 01 */ li r3, 0x1 /* 8004EA68 0004A8A8 4B FF FD 69 */ bl IPCReadReg /* 8004EA6C 0004A8AC 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 8004EA70 0004A8B0 38 60 00 01 */ li r3, 0x1 /* 8004EA74 0004A8B4 60 04 00 08 */ ori r4, r0, 0x8 /* 8004EA78 0004A8B8 4B FF FD 69 */ bl IPCWriteReg /* 8004EA7C 0004A8BC 80 9F 00 08 */ lwz r4, 0x8(r31) /* 8004EA80 0004A8C0 7F E3 FB 78 */ mr r3, r31 /* 8004EA84 0004A8C4 48 00 1E AD */ bl IPCiProfReply .global lbl_8004EA88 lbl_8004EA88: /* 8004EA88 0004A8C8 80 01 02 E4 */ lwz r0, 0x2e4(r1) /* 8004EA8C 0004A8CC 83 E1 02 DC */ lwz r31, 0x2dc(r1) /* 8004EA90 0004A8D0 83 C1 02 D8 */ lwz r30, 0x2d8(r1) /* 8004EA94 0004A8D4 83 A1 02 D4 */ lwz r29, 0x2d4(r1) /* 8004EA98 0004A8D8 83 81 02 D0 */ lwz r28, 0x2d0(r1) /* 8004EA9C 0004A8DC 7C 08 03 A6 */ mtlr r0 /* 8004EAA0 0004A8E0 38 21 02 E0 */ addi r1, r1, 0x2e0 /* 8004EAA4 0004A8E4 4E 80 00 20 */ blr /* 8004EAA8 0004A8E8 00 00 00 00 */ .4byte 0x00000000 /* 8004EAAC 0004A8EC 00 00 00 00 */ .4byte 0x00000000 .global IPCInterruptHandler IPCInterruptHandler: /* 8004EAB0 0004A8F0 94 21 FF F0 */ stwu r1, -0x10(r1) /* 8004EAB4 0004A8F4 7C 08 02 A6 */ mflr r0 /* 8004EAB8 0004A8F8 90 01 00 14 */ stw r0, 0x14(r1) /* 8004EABC 0004A8FC 93 E1 00 0C */ stw r31, 0xc(r1) /* 8004EAC0 0004A900 7C 9F 23 78 */ mr r31, r4 /* 8004EAC4 0004A904 93 C1 00 08 */ stw r30, 0x8(r1) /* 8004EAC8 0004A908 7C 7E 1B 78 */ mr r30, r3 /* 8004EACC 0004A90C 38 60 00 01 */ li r3, 0x1 /* 8004EAD0 0004A910 4B FF FD 01 */ bl IPCReadReg /* 8004EAD4 0004A914 70 60 00 14 */ andi. r0, r3, 0x14 /* 8004EAD8 0004A918 28 00 00 14 */ cmplwi r0, 0x14 /* 8004EADC 0004A91C 40 82 00 10 */ bne lbl_8004EAEC /* 8004EAE0 0004A920 7F C3 F3 78 */ mr r3, r30 /* 8004EAE4 0004A924 7F E4 FB 78 */ mr r4, r31 /* 8004EAE8 0004A928 4B FF FD 69 */ bl IpcReplyHandler .global lbl_8004EAEC lbl_8004EAEC: /* 8004EAEC 0004A92C 38 60 00 01 */ li r3, 0x1 /* 8004EAF0 0004A930 4B FF FC E1 */ bl IPCReadReg /* 8004EAF4 0004A934 70 60 00 22 */ andi. r0, r3, 0x22 /* 8004EAF8 0004A938 28 00 00 22 */ cmplwi r0, 0x22 /* 8004EAFC 0004A93C 40 82 01 5C */ bne lbl_8004EC58 /* 8004EB00 0004A940 38 60 00 01 */ li r3, 0x1 /* 8004EB04 0004A944 4B FF FC CD */ bl IPCReadReg /* 8004EB08 0004A948 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 8004EB0C 0004A94C 38 60 00 01 */ li r3, 0x1 /* 8004EB10 0004A950 60 04 00 02 */ ori r4, r0, 0x2 /* 8004EB14 0004A954 4B FF FC CD */ bl IPCWriteReg /* 8004EB18 0004A958 3C 60 CD 00 */ lis r3, 0xCD000030@ha /* 8004EB1C 0004A95C 3C 00 40 00 */ lis r0, 0x4000 /* 8004EB20 0004A960 90 03 00 30 */ stw r0, 0xCD000030@l(r3) /* 8004EB24 0004A964 83 ED 83 88 */ lwz r31, __mailboxAck@sda21(r13) /* 8004EB28 0004A968 2C 1F 00 01 */ cmpwi r31, 0x1 /* 8004EB2C 0004A96C 40 80 00 10 */ bge lbl_8004EB3C /* 8004EB30 0004A970 3B FF 00 01 */ addi r31, r31, 0x1 /* 8004EB34 0004A974 93 ED 83 88 */ stw r31, __mailboxAck@sda21(r13) /* 8004EB38 0004A978 48 00 1D E9 */ bl IPCiProfAck .global lbl_8004EB3C lbl_8004EB3C: /* 8004EB3C 0004A97C 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004EB40 0004A980 40 81 01 18 */ ble lbl_8004EC58 /* 8004EB44 0004A984 80 0D E9 10 */ lwz r0, __relnchFl@sda21(r13) /* 8004EB48 0004A988 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EB4C 0004A98C 41 82 00 38 */ beq lbl_8004EB84 /* 8004EB50 0004A990 80 6D E9 14 */ lwz r3, __relnchRpc@sda21(r13) /* 8004EB54 0004A994 38 00 00 00 */ li r0, 0x0 /* 8004EB58 0004A998 90 03 00 04 */ stw r0, 0x4(r3) /* 8004EB5C 0004A99C 80 6D E9 14 */ lwz r3, __relnchRpc@sda21(r13) /* 8004EB60 0004A9A0 90 0D E9 10 */ stw r0, __relnchFl@sda21(r13) /* 8004EB64 0004A9A4 38 63 00 2C */ addi r3, r3, 0x2c /* 8004EB68 0004A9A8 4B FD 6D 99 */ bl OSWakeupThread /* 8004EB6C 0004A9AC 38 60 00 01 */ li r3, 0x1 /* 8004EB70 0004A9B0 4B FF FC 61 */ bl IPCReadReg /* 8004EB74 0004A9B4 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 8004EB78 0004A9B8 38 60 00 01 */ li r3, 0x1 /* 8004EB7C 0004A9BC 60 04 00 08 */ ori r4, r0, 0x8 /* 8004EB80 0004A9C0 4B FF FC 61 */ bl IPCWriteReg .global lbl_8004EB84 lbl_8004EB84: /* 8004EB84 0004A9C4 3C 80 80 4C */ lis r4, __responses@ha /* 8004EB88 0004A9C8 38 64 DD 20 */ addi r3, r4, __responses@l /* 8004EB8C 0004A9CC 80 84 DD 20 */ lwz r4, -0x22e0(r4) /* 8004EB90 0004A9D0 80 03 00 04 */ lwz r0, 0x4(r3) /* 8004EB94 0004A9D4 7C 00 20 40 */ cmplw r0, r4 /* 8004EB98 0004A9D8 40 80 00 0C */ bge lbl_8004EBA4 /* 8004EB9C 0004A9DC 7C 04 00 50 */ subf r0, r4, r0 /* 8004EBA0 0004A9E0 48 00 00 10 */ b lbl_8004EBB0 .global lbl_8004EBA4 lbl_8004EBA4: /* 8004EBA4 0004A9E4 7C 04 00 50 */ subf r0, r4, r0 /* 8004EBA8 0004A9E8 7C 00 00 34 */ cntlzw r0, r0 /* 8004EBAC 0004A9EC 54 00 D9 7E */ srwi r0, r0, 5 .global lbl_8004EBB0 lbl_8004EBB0: /* 8004EBB0 0004A9F0 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EBB4 0004A9F4 40 82 00 A4 */ bne lbl_8004EC58 /* 8004EBB8 0004A9F8 3C 60 80 4C */ lis r3, __responses@ha /* 8004EBBC 0004A9FC 38 63 DD 20 */ addi r3, r3, __responses@l /* 8004EBC0 0004AA00 80 03 00 08 */ lwz r0, 0x8(r3) /* 8004EBC4 0004AA04 54 00 10 3A */ slwi r0, r0, 2 /* 8004EBC8 0004AA08 7C 63 02 14 */ add r3, r3, r0 /* 8004EBCC 0004AA0C 80 83 00 10 */ lwz r4, 0x10(r3) /* 8004EBD0 0004AA10 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004EBD4 0004AA14 41 82 00 84 */ beq lbl_8004EC58 /* 8004EBD8 0004AA18 80 04 00 28 */ lwz r0, 0x28(r4) /* 8004EBDC 0004AA1C 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EBE0 0004AA20 41 82 00 10 */ beq lbl_8004EBF0 /* 8004EBE4 0004AA24 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 8004EBE8 0004AA28 38 03 FF FF */ addi r0, r3, -0x1 /* 8004EBEC 0004AA2C 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) .global lbl_8004EBF0 lbl_8004EBF0: /* 8004EBF0 0004AA30 3C 84 80 00 */ addis r4, r4, 0x8000 /* 8004EBF4 0004AA34 38 60 00 00 */ li r3, 0x0 /* 8004EBF8 0004AA38 4B FF FB E9 */ bl IPCWriteReg /* 8004EBFC 0004AA3C 3D 00 80 4C */ lis r8, __responses@ha /* 8004EC00 0004AA40 3C 60 AA AB */ lis r3, 0xAAAAAAAB@ha /* 8004EC04 0004AA44 38 E8 DD 20 */ addi r7, r8, __responses@l /* 8004EC08 0004AA48 80 88 DD 20 */ lwz r4, -0x22e0(r8) /* 8004EC0C 0004AA4C 80 C7 00 08 */ lwz r6, 0x8(r7) /* 8004EC10 0004AA50 38 A3 AA AB */ addi r5, r3, 0xAAAAAAAB@l /* 8004EC14 0004AA54 38 04 00 01 */ addi r0, r4, 0x1 /* 8004EC18 0004AA58 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 8004EC1C 0004AA5C 38 C6 00 01 */ addi r6, r6, 0x1 /* 8004EC20 0004AA60 90 08 DD 20 */ stw r0, -0x22e0(r8) /* 8004EC24 0004AA64 7C 85 30 16 */ mulhwu r4, r5, r6 /* 8004EC28 0004AA68 38 03 FF FF */ addi r0, r3, -0x1 /* 8004EC2C 0004AA6C 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) /* 8004EC30 0004AA70 38 60 00 01 */ li r3, 0x1 /* 8004EC34 0004AA74 54 84 D9 7E */ srwi r4, r4, 5 /* 8004EC38 0004AA78 1C 04 00 30 */ mulli r0, r4, 0x30 /* 8004EC3C 0004AA7C 7C 00 30 50 */ subf r0, r0, r6 /* 8004EC40 0004AA80 90 07 00 08 */ stw r0, 0x8(r7) /* 8004EC44 0004AA84 4B FF FB 8D */ bl IPCReadReg /* 8004EC48 0004AA88 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 8004EC4C 0004AA8C 38 60 00 01 */ li r3, 0x1 /* 8004EC50 0004AA90 60 04 00 01 */ ori r4, r0, 0x1 /* 8004EC54 0004AA94 4B FF FB 8D */ bl IPCWriteReg .global lbl_8004EC58 lbl_8004EC58: /* 8004EC58 0004AA98 80 01 00 14 */ lwz r0, 0x14(r1) /* 8004EC5C 0004AA9C 83 E1 00 0C */ lwz r31, 0xc(r1) /* 8004EC60 0004AAA0 83 C1 00 08 */ lwz r30, 0x8(r1) /* 8004EC64 0004AAA4 7C 08 03 A6 */ mtlr r0 /* 8004EC68 0004AAA8 38 21 00 10 */ addi r1, r1, 0x10 /* 8004EC6C 0004AAAC 4E 80 00 20 */ blr .global IPCCltInit IPCCltInit: /* 8004EC70 0004AAB0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004EC74 0004AAB4 7C 08 02 A6 */ mflr r0 /* 8004EC78 0004AAB8 90 01 00 24 */ stw r0, 0x24(r1) /* 8004EC7C 0004AABC 80 0D E9 1C */ lwz r0, "@LOCAL@IPCCltInit__Fv@initialized"@sda21(r13) /* 8004EC80 0004AAC0 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004EC84 0004AAC4 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EC88 0004AAC8 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004EC8C 0004AACC 3B C0 00 00 */ li r30, 0x0 /* 8004EC90 0004AAD0 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004EC94 0004AAD4 40 82 00 7C */ bne lbl_8004ED10 /* 8004EC98 0004AAD8 38 00 00 01 */ li r0, 0x1 /* 8004EC9C 0004AADC 90 0D E9 1C */ stw r0, "@LOCAL@IPCCltInit__Fv@initialized"@sda21(r13) /* 8004ECA0 0004AAE0 4B FF FA 91 */ bl IPCInit /* 8004ECA4 0004AAE4 4B FF FB 5D */ bl IPCGetBufferLo /* 8004ECA8 0004AAE8 7C 7D 1B 78 */ mr r29, r3 /* 8004ECAC 0004AAEC 3B E3 20 00 */ addi r31, r3, 0x2000 /* 8004ECB0 0004AAF0 4B FF FB 41 */ bl IPCGetBufferHi /* 8004ECB4 0004AAF4 7C 1F 18 40 */ cmplw r31, r3 /* 8004ECB8 0004AAF8 40 81 00 0C */ ble lbl_8004ECC4 /* 8004ECBC 0004AAFC 3B C0 FF EA */ li r30, -0x16 /* 8004ECC0 0004AB00 48 00 00 50 */ b lbl_8004ED10 .global lbl_8004ECC4 lbl_8004ECC4: /* 8004ECC4 0004AB04 7F A3 EB 78 */ mr r3, r29 /* 8004ECC8 0004AB08 38 80 20 00 */ li r4, 0x2000 /* 8004ECCC 0004AB0C 48 00 15 B5 */ bl iosCreateHeap /* 8004ECD0 0004AB10 90 6D 83 8C */ stw r3, hid@sda21(r13) /* 8004ECD4 0004AB14 7F E3 FB 78 */ mr r3, r31 /* 8004ECD8 0004AB18 4B FF FB 39 */ bl IPCSetBufferLo /* 8004ECDC 0004AB1C 3C 80 80 05 */ lis r4, IPCInterruptHandler@ha /* 8004ECE0 0004AB20 38 60 00 1B */ li r3, 0x1b /* 8004ECE4 0004AB24 38 84 EA B0 */ addi r4, r4, IPCInterruptHandler@l /* 8004ECE8 0004AB28 4B FD 2B A9 */ bl __OSSetInterruptHandler /* 8004ECEC 0004AB2C 38 60 00 10 */ li r3, 0x10 /* 8004ECF0 0004AB30 4B FD 2F 81 */ bl __OSUnmaskInterrupts /* 8004ECF4 0004AB34 38 60 00 01 */ li r3, 0x1 /* 8004ECF8 0004AB38 38 80 00 38 */ li r4, 0x38 /* 8004ECFC 0004AB3C 4B FF FA E5 */ bl IPCWriteReg /* 8004ED00 0004AB40 48 00 1A B1 */ bl IPCiProfInit /* 8004ED04 0004AB44 3C 60 80 4C */ lis r3, __timeout_alarm@ha /* 8004ED08 0004AB48 38 63 DD F0 */ addi r3, r3, __timeout_alarm@l /* 8004ED0C 0004AB4C 4B FC CA F5 */ bl OSCreateAlarm .global lbl_8004ED10 lbl_8004ED10: /* 8004ED10 0004AB50 7F C3 F3 78 */ mr r3, r30 /* 8004ED14 0004AB54 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004ED18 0004AB58 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004ED1C 0004AB5C 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004ED20 0004AB60 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004ED24 0004AB64 7C 08 03 A6 */ mtlr r0 /* 8004ED28 0004AB68 38 21 00 20 */ addi r1, r1, 0x20 /* 8004ED2C 0004AB6C 4E 80 00 20 */ blr .global IPCCltReInit IPCCltReInit: /* 8004ED30 0004AB70 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004ED34 0004AB74 7C 08 02 A6 */ mflr r0 /* 8004ED38 0004AB78 90 01 00 24 */ stw r0, 0x24(r1) /* 8004ED3C 0004AB7C 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004ED40 0004AB80 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004ED44 0004AB84 3B C0 00 00 */ li r30, 0x0 /* 8004ED48 0004AB88 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004ED4C 0004AB8C 4B FF FA B5 */ bl IPCGetBufferLo /* 8004ED50 0004AB90 7C 7D 1B 78 */ mr r29, r3 /* 8004ED54 0004AB94 3B E3 10 00 */ addi r31, r3, 0x1000 /* 8004ED58 0004AB98 4B FF FA 99 */ bl IPCGetBufferHi /* 8004ED5C 0004AB9C 7C 1F 18 40 */ cmplw r31, r3 /* 8004ED60 0004ABA0 40 81 00 0C */ ble lbl_8004ED6C /* 8004ED64 0004ABA4 3B C0 FF EA */ li r30, -0x16 /* 8004ED68 0004ABA8 48 00 00 1C */ b lbl_8004ED84 .global lbl_8004ED6C lbl_8004ED6C: /* 8004ED6C 0004ABAC 7F A3 EB 78 */ mr r3, r29 /* 8004ED70 0004ABB0 38 80 10 00 */ li r4, 0x1000 /* 8004ED74 0004ABB4 48 00 15 0D */ bl iosCreateHeap /* 8004ED78 0004ABB8 90 6D 83 8C */ stw r3, hid@sda21(r13) /* 8004ED7C 0004ABBC 7F E3 FB 78 */ mr r3, r31 /* 8004ED80 0004ABC0 4B FF FA 91 */ bl IPCSetBufferLo .global lbl_8004ED84 lbl_8004ED84: /* 8004ED84 0004ABC4 7F C3 F3 78 */ mr r3, r30 /* 8004ED88 0004ABC8 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004ED8C 0004ABCC 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004ED90 0004ABD0 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004ED94 0004ABD4 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004ED98 0004ABD8 7C 08 03 A6 */ mtlr r0 /* 8004ED9C 0004ABDC 38 21 00 20 */ addi r1, r1, 0x20 /* 8004EDA0 0004ABE0 4E 80 00 20 */ blr /* 8004EDA4 0004ABE4 00 00 00 00 */ .4byte 0x00000000 /* 8004EDA8 0004ABE8 00 00 00 00 */ .4byte 0x00000000 /* 8004EDAC 0004ABEC 00 00 00 00 */ .4byte 0x00000000 .global __ios_Ipc2 __ios_Ipc2: /* 8004EDB0 0004ABF0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004EDB4 0004ABF4 7C 08 02 A6 */ mflr r0 /* 8004EDB8 0004ABF8 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004EDBC 0004ABFC 90 01 00 24 */ stw r0, 0x24(r1) /* 8004EDC0 0004AC00 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004EDC4 0004AC04 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004EDC8 0004AC08 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004EDCC 0004AC0C 7C 9D 23 78 */ mr r29, r4 /* 8004EDD0 0004AC10 93 81 00 10 */ stw r28, 0x10(r1) /* 8004EDD4 0004AC14 7C 7C 1B 78 */ mr r28, r3 /* 8004EDD8 0004AC18 40 82 00 0C */ bne lbl_8004EDE4 /* 8004EDDC 0004AC1C 3B E0 FF FC */ li r31, -0x4 /* 8004EDE0 0004AC20 48 00 01 F8 */ b lbl_8004EFD8 .global lbl_8004EDE4 lbl_8004EDE4: /* 8004EDE4 0004AC24 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004EDE8 0004AC28 40 82 00 0C */ bne lbl_8004EDF4 /* 8004EDEC 0004AC2C 38 63 00 2C */ addi r3, r3, 0x2c /* 8004EDF0 0004AC30 4B FD 59 51 */ bl OSInitThreadQueue .global lbl_8004EDF4 lbl_8004EDF4: /* 8004EDF4 0004AC34 7F 83 E3 78 */ mr r3, r28 /* 8004EDF8 0004AC38 38 80 00 20 */ li r4, 0x20 /* 8004EDFC 0004AC3C 4B FC DB 85 */ bl DCFlushRange /* 8004EE00 0004AC40 4B FD 2A 21 */ bl OSDisableInterrupts /* 8004EE04 0004AC44 3C 80 80 4C */ lis r4, __responses@ha /* 8004EE08 0004AC48 7C 7E 1B 78 */ mr r30, r3 /* 8004EE0C 0004AC4C 38 64 DD 20 */ addi r3, r4, __responses@l /* 8004EE10 0004AC50 80 84 DD 20 */ lwz r4, -0x22e0(r4) /* 8004EE14 0004AC54 80 03 00 04 */ lwz r0, 0x4(r3) /* 8004EE18 0004AC58 3B E0 00 00 */ li r31, 0x0 /* 8004EE1C 0004AC5C 7C 00 20 40 */ cmplw r0, r4 /* 8004EE20 0004AC60 40 80 00 0C */ bge lbl_8004EE2C /* 8004EE24 0004AC64 7C 04 00 50 */ subf r0, r4, r0 /* 8004EE28 0004AC68 48 00 00 20 */ b lbl_8004EE48 .global lbl_8004EE2C lbl_8004EE2C: /* 8004EE2C 0004AC6C 7C 84 00 50 */ subf r4, r4, r0 /* 8004EE30 0004AC70 38 60 00 30 */ li r3, 0x30 /* 8004EE34 0004AC74 38 04 FF D0 */ addi r0, r4, -0x30 /* 8004EE38 0004AC78 7C 83 1B 38 */ orc r3, r4, r3 /* 8004EE3C 0004AC7C 54 00 F8 7E */ srwi r0, r0, 1 /* 8004EE40 0004AC80 7C 00 18 50 */ subf r0, r0, r3 /* 8004EE44 0004AC84 54 00 0F FE */ srwi r0, r0, 31 .global lbl_8004EE48 lbl_8004EE48: /* 8004EE48 0004AC88 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EE4C 0004AC8C 41 82 00 0C */ beq lbl_8004EE58 /* 8004EE50 0004AC90 3B E0 FF F8 */ li r31, -0x8 /* 8004EE54 0004AC94 48 00 00 58 */ b lbl_8004EEAC .global lbl_8004EE58 lbl_8004EE58: /* 8004EE58 0004AC98 3C E0 80 4C */ lis r7, __responses@ha /* 8004EE5C 0004AC9C 3C 80 AA AB */ lis r4, 0xAAAAAAAB@ha /* 8004EE60 0004ACA0 38 E7 DD 20 */ addi r7, r7, __responses@l /* 8004EE64 0004ACA4 7F 83 E3 78 */ mr r3, r28 /* 8004EE68 0004ACA8 80 A7 00 0C */ lwz r5, 0xc(r7) /* 8004EE6C 0004ACAC 38 04 AA AB */ addi r0, r4, 0xAAAAAAAB@l /* 8004EE70 0004ACB0 54 A4 10 3A */ slwi r4, r5, 2 /* 8004EE74 0004ACB4 7C 87 22 14 */ add r4, r7, r4 /* 8004EE78 0004ACB8 93 84 00 10 */ stw r28, 0x10(r4) /* 8004EE7C 0004ACBC 80 A7 00 0C */ lwz r5, 0xc(r7) /* 8004EE80 0004ACC0 80 87 00 04 */ lwz r4, 0x4(r7) /* 8004EE84 0004ACC4 38 C5 00 01 */ addi r6, r5, 0x1 /* 8004EE88 0004ACC8 7C A0 30 16 */ mulhwu r5, r0, r6 /* 8004EE8C 0004ACCC 38 04 00 01 */ addi r0, r4, 0x1 /* 8004EE90 0004ACD0 90 07 00 04 */ stw r0, 0x4(r7) /* 8004EE94 0004ACD4 54 A5 D9 7E */ srwi r5, r5, 5 /* 8004EE98 0004ACD8 1C 05 00 30 */ mulli r0, r5, 0x30 /* 8004EE9C 0004ACDC 7C 00 30 50 */ subf r0, r0, r6 /* 8004EEA0 0004ACE0 90 07 00 0C */ stw r0, 0xc(r7) /* 8004EEA4 0004ACE4 80 9C 00 08 */ lwz r4, 0x8(r28) /* 8004EEA8 0004ACE8 48 00 1A 59 */ bl IPCiProfQueueReq .global lbl_8004EEAC lbl_8004EEAC: /* 8004EEAC 0004ACEC 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004EEB0 0004ACF0 41 82 00 24 */ beq lbl_8004EED4 /* 8004EEB4 0004ACF4 7F C3 F3 78 */ mr r3, r30 /* 8004EEB8 0004ACF8 4B FD 29 A9 */ bl OSRestoreInterrupts /* 8004EEBC 0004ACFC 2C 1D 00 00 */ cmpwi r29, 0x0 /* 8004EEC0 0004AD00 41 82 01 18 */ beq lbl_8004EFD8 /* 8004EEC4 0004AD04 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004EEC8 0004AD08 7F 84 E3 78 */ mr r4, r28 /* 8004EECC 0004AD0C 48 00 16 F5 */ bl iosFree /* 8004EED0 0004AD10 48 00 01 08 */ b lbl_8004EFD8 .global lbl_8004EED4 lbl_8004EED4: /* 8004EED4 0004AD14 80 0D 83 88 */ lwz r0, __mailboxAck@sda21(r13) /* 8004EED8 0004AD18 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EEDC 0004AD1C 40 81 00 D8 */ ble lbl_8004EFB4 /* 8004EEE0 0004AD20 3C 80 80 4C */ lis r4, __responses@ha /* 8004EEE4 0004AD24 38 64 DD 20 */ addi r3, r4, __responses@l /* 8004EEE8 0004AD28 80 84 DD 20 */ lwz r4, -0x22e0(r4) /* 8004EEEC 0004AD2C 80 03 00 04 */ lwz r0, 0x4(r3) /* 8004EEF0 0004AD30 7C 00 20 40 */ cmplw r0, r4 /* 8004EEF4 0004AD34 40 80 00 0C */ bge lbl_8004EF00 /* 8004EEF8 0004AD38 7C 04 00 50 */ subf r0, r4, r0 /* 8004EEFC 0004AD3C 48 00 00 10 */ b lbl_8004EF0C .global lbl_8004EF00 lbl_8004EF00: /* 8004EF00 0004AD40 7C 04 00 50 */ subf r0, r4, r0 /* 8004EF04 0004AD44 7C 00 00 34 */ cntlzw r0, r0 /* 8004EF08 0004AD48 54 00 D9 7E */ srwi r0, r0, 5 .global lbl_8004EF0C lbl_8004EF0C: /* 8004EF0C 0004AD4C 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EF10 0004AD50 40 82 00 A4 */ bne lbl_8004EFB4 /* 8004EF14 0004AD54 3C 60 80 4C */ lis r3, __responses@ha /* 8004EF18 0004AD58 38 63 DD 20 */ addi r3, r3, __responses@l /* 8004EF1C 0004AD5C 80 03 00 08 */ lwz r0, 0x8(r3) /* 8004EF20 0004AD60 54 00 10 3A */ slwi r0, r0, 2 /* 8004EF24 0004AD64 7C 63 02 14 */ add r3, r3, r0 /* 8004EF28 0004AD68 80 83 00 10 */ lwz r4, 0x10(r3) /* 8004EF2C 0004AD6C 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004EF30 0004AD70 41 82 00 84 */ beq lbl_8004EFB4 /* 8004EF34 0004AD74 80 04 00 28 */ lwz r0, 0x28(r4) /* 8004EF38 0004AD78 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004EF3C 0004AD7C 41 82 00 10 */ beq lbl_8004EF4C /* 8004EF40 0004AD80 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 8004EF44 0004AD84 38 03 FF FF */ addi r0, r3, -0x1 /* 8004EF48 0004AD88 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) .global lbl_8004EF4C lbl_8004EF4C: /* 8004EF4C 0004AD8C 3C 84 80 00 */ addis r4, r4, 0x8000 /* 8004EF50 0004AD90 38 60 00 00 */ li r3, 0x0 /* 8004EF54 0004AD94 4B FF F8 8D */ bl IPCWriteReg /* 8004EF58 0004AD98 3D 00 80 4C */ lis r8, __responses@ha /* 8004EF5C 0004AD9C 3C 60 AA AB */ lis r3, 0xAAAAAAAB@ha /* 8004EF60 0004ADA0 38 E8 DD 20 */ addi r7, r8, __responses@l /* 8004EF64 0004ADA4 80 88 DD 20 */ lwz r4, -0x22e0(r8) /* 8004EF68 0004ADA8 80 C7 00 08 */ lwz r6, 0x8(r7) /* 8004EF6C 0004ADAC 38 A3 AA AB */ addi r5, r3, 0xAAAAAAAB@l /* 8004EF70 0004ADB0 38 04 00 01 */ addi r0, r4, 0x1 /* 8004EF74 0004ADB4 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 8004EF78 0004ADB8 38 C6 00 01 */ addi r6, r6, 0x1 /* 8004EF7C 0004ADBC 90 08 DD 20 */ stw r0, -0x22e0(r8) /* 8004EF80 0004ADC0 7C 85 30 16 */ mulhwu r4, r5, r6 /* 8004EF84 0004ADC4 38 03 FF FF */ addi r0, r3, -0x1 /* 8004EF88 0004ADC8 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) /* 8004EF8C 0004ADCC 38 60 00 01 */ li r3, 0x1 /* 8004EF90 0004ADD0 54 84 D9 7E */ srwi r4, r4, 5 /* 8004EF94 0004ADD4 1C 04 00 30 */ mulli r0, r4, 0x30 /* 8004EF98 0004ADD8 7C 00 30 50 */ subf r0, r0, r6 /* 8004EF9C 0004ADDC 90 07 00 08 */ stw r0, 0x8(r7) /* 8004EFA0 0004ADE0 4B FF F8 31 */ bl IPCReadReg /* 8004EFA4 0004ADE4 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 8004EFA8 0004ADE8 38 60 00 01 */ li r3, 0x1 /* 8004EFAC 0004ADEC 60 04 00 01 */ ori r4, r0, 0x1 /* 8004EFB0 0004ADF0 4B FF F8 31 */ bl IPCWriteReg .global lbl_8004EFB4 lbl_8004EFB4: /* 8004EFB4 0004ADF4 2C 1D 00 00 */ cmpwi r29, 0x0 /* 8004EFB8 0004ADF8 40 82 00 0C */ bne lbl_8004EFC4 /* 8004EFBC 0004ADFC 38 7C 00 2C */ addi r3, r28, 0x2c /* 8004EFC0 0004AE00 4B FD 68 51 */ bl OSSleepThread .global lbl_8004EFC4 lbl_8004EFC4: /* 8004EFC4 0004AE04 7F C3 F3 78 */ mr r3, r30 /* 8004EFC8 0004AE08 4B FD 28 99 */ bl OSRestoreInterrupts /* 8004EFCC 0004AE0C 2C 1D 00 00 */ cmpwi r29, 0x0 /* 8004EFD0 0004AE10 40 82 00 08 */ bne lbl_8004EFD8 /* 8004EFD4 0004AE14 83 FC 00 04 */ lwz r31, 0x4(r28) .global lbl_8004EFD8 lbl_8004EFD8: /* 8004EFD8 0004AE18 2C 1C 00 00 */ cmpwi r28, 0x0 /* 8004EFDC 0004AE1C 41 82 00 18 */ beq lbl_8004EFF4 /* 8004EFE0 0004AE20 2C 1D 00 00 */ cmpwi r29, 0x0 /* 8004EFE4 0004AE24 40 82 00 10 */ bne lbl_8004EFF4 /* 8004EFE8 0004AE28 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004EFEC 0004AE2C 7F 84 E3 78 */ mr r4, r28 /* 8004EFF0 0004AE30 48 00 15 D1 */ bl iosFree .global lbl_8004EFF4 lbl_8004EFF4: /* 8004EFF4 0004AE34 7F E3 FB 78 */ mr r3, r31 /* 8004EFF8 0004AE38 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004EFFC 0004AE3C 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F000 0004AE40 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004F004 0004AE44 83 81 00 10 */ lwz r28, 0x10(r1) /* 8004F008 0004AE48 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F00C 0004AE4C 7C 08 03 A6 */ mtlr r0 /* 8004F010 0004AE50 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F014 0004AE54 4E 80 00 20 */ blr /* 8004F018 0004AE58 00 00 00 00 */ .4byte 0x00000000 /* 8004F01C 0004AE5C 00 00 00 00 */ .4byte 0x00000000 .global IOS_OpenAsync IOS_OpenAsync: /* 8004F020 0004AE60 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004F024 0004AE64 7C 08 02 A6 */ mflr r0 /* 8004F028 0004AE68 90 01 00 34 */ stw r0, 0x34(r1) /* 8004F02C 0004AE6C 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F030 0004AE70 4B FB 83 0D */ bl lbl_8000733C /* 8004F034 0004AE74 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F038 0004AE78 7C 7B 1B 78 */ mr r27, r3 /* 8004F03C 0004AE7C 7C 9C 23 78 */ mr r28, r4 /* 8004F040 0004AE80 7C BD 2B 78 */ mr r29, r5 /* 8004F044 0004AE84 7C DF 33 78 */ mr r31, r6 /* 8004F048 0004AE88 3B C0 00 00 */ li r30, 0x0 /* 8004F04C 0004AE8C 40 82 00 0C */ bne lbl_8004F058 /* 8004F050 0004AE90 3B C0 FF FC */ li r30, -0x4 /* 8004F054 0004AE94 48 00 00 4C */ b lbl_8004F0A0 .global lbl_8004F058 lbl_8004F058: /* 8004F058 0004AE98 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F05C 0004AE9C 38 80 00 40 */ li r4, 0x40 /* 8004F060 0004AEA0 38 A0 00 20 */ li r5, 0x20 /* 8004F064 0004AEA4 48 00 15 4D */ bl iosAllocAligned /* 8004F068 0004AEA8 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F06C 0004AEAC 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F070 0004AEB0 40 82 00 0C */ bne lbl_8004F07C /* 8004F074 0004AEB4 3B C0 FF EA */ li r30, -0x16 /* 8004F078 0004AEB8 48 00 00 28 */ b lbl_8004F0A0 .global lbl_8004F07C lbl_8004F07C: /* 8004F07C 0004AEBC 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004F080 0004AEC0 38 A0 00 00 */ li r5, 0x0 /* 8004F084 0004AEC4 38 00 00 01 */ li r0, 0x1 /* 8004F088 0004AEC8 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F08C 0004AECC 93 E4 00 24 */ stw r31, 0x24(r4) /* 8004F090 0004AED0 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F094 0004AED4 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F098 0004AED8 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F09C 0004AEDC 90 A3 00 08 */ stw r5, 0x8(r3) .global lbl_8004F0A0 lbl_8004F0A0: /* 8004F0A0 0004AEE0 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F0A4 0004AEE4 40 82 00 7C */ bne lbl_8004F120 /* 8004F0A8 0004AEE8 83 E1 00 08 */ lwz r31, 0x8(r1) /* 8004F0AC 0004AEEC 3B C0 00 00 */ li r30, 0x0 /* 8004F0B0 0004AEF0 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F0B4 0004AEF4 40 82 00 0C */ bne lbl_8004F0C0 /* 8004F0B8 0004AEF8 3B C0 FF FC */ li r30, -0x4 /* 8004F0BC 0004AEFC 48 00 00 4C */ b lbl_8004F108 .global lbl_8004F0C0 lbl_8004F0C0: /* 8004F0C0 0004AF00 7F 63 DB 78 */ mr r3, r27 /* 8004F0C4 0004AF04 38 80 00 40 */ li r4, 0x40 /* 8004F0C8 0004AF08 48 00 00 0C */ b lbl_8004F0D4 /* 8004F0CC 0004AF0C 60 00 00 00 */ nop .global lbl_8004F0D0 lbl_8004F0D0: /* 8004F0D0 0004AF10 38 63 00 01 */ addi r3, r3, 0x1 .global lbl_8004F0D4 lbl_8004F0D4: /* 8004F0D4 0004AF14 88 03 00 00 */ lbz r0, 0x0(r3) /* 8004F0D8 0004AF18 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004F0DC 0004AF1C 41 82 00 10 */ beq lbl_8004F0EC /* 8004F0E0 0004AF20 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004F0E4 0004AF24 38 84 FF FF */ addi r4, r4, -0x1 /* 8004F0E8 0004AF28 40 82 FF E8 */ bne lbl_8004F0D0 .global lbl_8004F0EC lbl_8004F0EC: /* 8004F0EC 0004AF2C 7C 9B 18 50 */ subf r4, r27, r3 /* 8004F0F0 0004AF30 7F 63 DB 78 */ mr r3, r27 /* 8004F0F4 0004AF34 38 84 00 01 */ addi r4, r4, 0x1 /* 8004F0F8 0004AF38 4B FC D8 89 */ bl DCFlushRange /* 8004F0FC 0004AF3C 3C 1B 80 00 */ addis r0, r27, 0x8000 /* 8004F100 0004AF40 90 1F 00 0C */ stw r0, 0xc(r31) /* 8004F104 0004AF44 93 9F 00 10 */ stw r28, 0x10(r31) .global lbl_8004F108 lbl_8004F108: /* 8004F108 0004AF48 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F10C 0004AF4C 40 82 00 14 */ bne lbl_8004F120 /* 8004F110 0004AF50 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F114 0004AF54 7F A4 EB 78 */ mr r4, r29 /* 8004F118 0004AF58 4B FF FC 99 */ bl __ios_Ipc2 /* 8004F11C 0004AF5C 7C 7E 1B 78 */ mr r30, r3 .global lbl_8004F120 lbl_8004F120: /* 8004F120 0004AF60 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F124 0004AF64 7F C3 F3 78 */ mr r3, r30 /* 8004F128 0004AF68 4B FB 82 61 */ bl lbl_80007388 /* 8004F12C 0004AF6C 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004F130 0004AF70 7C 08 03 A6 */ mtlr r0 /* 8004F134 0004AF74 38 21 00 30 */ addi r1, r1, 0x30 /* 8004F138 0004AF78 4E 80 00 20 */ blr /* 8004F13C 0004AF7C 00 00 00 00 */ .4byte 0x00000000 .global IOS_Open IOS_Open: /* 8004F140 0004AF80 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004F144 0004AF84 7C 08 02 A6 */ mflr r0 /* 8004F148 0004AF88 90 01 00 24 */ stw r0, 0x24(r1) /* 8004F14C 0004AF8C 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F150 0004AF90 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004F154 0004AF94 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004F158 0004AF98 3B C0 00 00 */ li r30, 0x0 /* 8004F15C 0004AF9C 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004F160 0004AFA0 7C 9D 23 78 */ mr r29, r4 /* 8004F164 0004AFA4 93 81 00 10 */ stw r28, 0x10(r1) /* 8004F168 0004AFA8 7C 7C 1B 78 */ mr r28, r3 /* 8004F16C 0004AFAC 40 82 00 0C */ bne lbl_8004F178 /* 8004F170 0004AFB0 3B C0 FF FC */ li r30, -0x4 /* 8004F174 0004AFB4 48 00 00 4C */ b lbl_8004F1C0 .global lbl_8004F178 lbl_8004F178: /* 8004F178 0004AFB8 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F17C 0004AFBC 38 80 00 40 */ li r4, 0x40 /* 8004F180 0004AFC0 38 A0 00 20 */ li r5, 0x20 /* 8004F184 0004AFC4 48 00 14 2D */ bl iosAllocAligned /* 8004F188 0004AFC8 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F18C 0004AFCC 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F190 0004AFD0 40 82 00 0C */ bne lbl_8004F19C /* 8004F194 0004AFD4 3B C0 FF EA */ li r30, -0x16 /* 8004F198 0004AFD8 48 00 00 28 */ b lbl_8004F1C0 .global lbl_8004F19C lbl_8004F19C: /* 8004F19C 0004AFDC 38 A0 00 00 */ li r5, 0x0 /* 8004F1A0 0004AFE0 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004F1A4 0004AFE4 38 00 00 01 */ li r0, 0x1 /* 8004F1A8 0004AFE8 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F1AC 0004AFEC 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004F1B0 0004AFF0 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F1B4 0004AFF4 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F1B8 0004AFF8 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F1BC 0004AFFC 90 A3 00 08 */ stw r5, 0x8(r3) .global lbl_8004F1C0 lbl_8004F1C0: /* 8004F1C0 0004B000 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F1C4 0004B004 40 82 00 7C */ bne lbl_8004F240 /* 8004F1C8 0004B008 83 E1 00 08 */ lwz r31, 0x8(r1) /* 8004F1CC 0004B00C 3B C0 00 00 */ li r30, 0x0 /* 8004F1D0 0004B010 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F1D4 0004B014 40 82 00 0C */ bne lbl_8004F1E0 /* 8004F1D8 0004B018 3B C0 FF FC */ li r30, -0x4 /* 8004F1DC 0004B01C 48 00 00 4C */ b lbl_8004F228 .global lbl_8004F1E0 lbl_8004F1E0: /* 8004F1E0 0004B020 7F 83 E3 78 */ mr r3, r28 /* 8004F1E4 0004B024 38 80 00 40 */ li r4, 0x40 /* 8004F1E8 0004B028 48 00 00 0C */ b lbl_8004F1F4 /* 8004F1EC 0004B02C 60 00 00 00 */ nop .global lbl_8004F1F0 lbl_8004F1F0: /* 8004F1F0 0004B030 38 63 00 01 */ addi r3, r3, 0x1 .global lbl_8004F1F4 lbl_8004F1F4: /* 8004F1F4 0004B034 88 03 00 00 */ lbz r0, 0x0(r3) /* 8004F1F8 0004B038 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004F1FC 0004B03C 41 82 00 10 */ beq lbl_8004F20C /* 8004F200 0004B040 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004F204 0004B044 38 84 FF FF */ addi r4, r4, -0x1 /* 8004F208 0004B048 40 82 FF E8 */ bne lbl_8004F1F0 .global lbl_8004F20C lbl_8004F20C: /* 8004F20C 0004B04C 7C 9C 18 50 */ subf r4, r28, r3 /* 8004F210 0004B050 7F 83 E3 78 */ mr r3, r28 /* 8004F214 0004B054 38 84 00 01 */ addi r4, r4, 0x1 /* 8004F218 0004B058 4B FC D7 69 */ bl DCFlushRange /* 8004F21C 0004B05C 3C 1C 80 00 */ addis r0, r28, 0x8000 /* 8004F220 0004B060 90 1F 00 0C */ stw r0, 0xc(r31) /* 8004F224 0004B064 93 BF 00 10 */ stw r29, 0x10(r31) .global lbl_8004F228 lbl_8004F228: /* 8004F228 0004B068 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F22C 0004B06C 40 82 00 14 */ bne lbl_8004F240 /* 8004F230 0004B070 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F234 0004B074 38 80 00 00 */ li r4, 0x0 /* 8004F238 0004B078 4B FF FB 79 */ bl __ios_Ipc2 /* 8004F23C 0004B07C 7C 7E 1B 78 */ mr r30, r3 .global lbl_8004F240 lbl_8004F240: /* 8004F240 0004B080 7F C3 F3 78 */ mr r3, r30 /* 8004F244 0004B084 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004F248 0004B088 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F24C 0004B08C 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004F250 0004B090 83 81 00 10 */ lwz r28, 0x10(r1) /* 8004F254 0004B094 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F258 0004B098 7C 08 03 A6 */ mtlr r0 /* 8004F25C 0004B09C 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F260 0004B0A0 4E 80 00 20 */ blr /* 8004F264 0004B0A4 00 00 00 00 */ .4byte 0x00000000 /* 8004F268 0004B0A8 00 00 00 00 */ .4byte 0x00000000 /* 8004F26C 0004B0AC 00 00 00 00 */ .4byte 0x00000000 .global IOS_CloseAsync IOS_CloseAsync: /* 8004F270 0004B0B0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004F274 0004B0B4 7C 08 02 A6 */ mflr r0 /* 8004F278 0004B0B8 90 01 00 24 */ stw r0, 0x24(r1) /* 8004F27C 0004B0BC 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F280 0004B0C0 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004F284 0004B0C4 3B E0 00 00 */ li r31, 0x0 /* 8004F288 0004B0C8 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004F28C 0004B0CC 7C BE 2B 78 */ mr r30, r5 /* 8004F290 0004B0D0 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004F294 0004B0D4 7C 9D 23 78 */ mr r29, r4 /* 8004F298 0004B0D8 93 81 00 10 */ stw r28, 0x10(r1) /* 8004F29C 0004B0DC 7C 7C 1B 78 */ mr r28, r3 /* 8004F2A0 0004B0E0 40 82 00 0C */ bne lbl_8004F2AC /* 8004F2A4 0004B0E4 3B E0 FF FC */ li r31, -0x4 /* 8004F2A8 0004B0E8 48 00 00 4C */ b lbl_8004F2F4 .global lbl_8004F2AC lbl_8004F2AC: /* 8004F2AC 0004B0EC 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F2B0 0004B0F0 38 80 00 40 */ li r4, 0x40 /* 8004F2B4 0004B0F4 38 A0 00 20 */ li r5, 0x20 /* 8004F2B8 0004B0F8 48 00 12 F9 */ bl iosAllocAligned /* 8004F2BC 0004B0FC 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F2C0 0004B100 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F2C4 0004B104 40 82 00 0C */ bne lbl_8004F2D0 /* 8004F2C8 0004B108 3B E0 FF EA */ li r31, -0x16 /* 8004F2CC 0004B10C 48 00 00 28 */ b lbl_8004F2F4 .global lbl_8004F2D0 lbl_8004F2D0: /* 8004F2D0 0004B110 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004F2D4 0004B114 38 A0 00 00 */ li r5, 0x0 /* 8004F2D8 0004B118 38 00 00 02 */ li r0, 0x2 /* 8004F2DC 0004B11C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F2E0 0004B120 93 C4 00 24 */ stw r30, 0x24(r4) /* 8004F2E4 0004B124 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F2E8 0004B128 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F2EC 0004B12C 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F2F0 0004B130 93 83 00 08 */ stw r28, 0x8(r3) .global lbl_8004F2F4 lbl_8004F2F4: /* 8004F2F4 0004B134 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F2F8 0004B138 40 82 00 14 */ bne lbl_8004F30C /* 8004F2FC 0004B13C 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F300 0004B140 7F A4 EB 78 */ mr r4, r29 /* 8004F304 0004B144 4B FF FA AD */ bl __ios_Ipc2 /* 8004F308 0004B148 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004F30C lbl_8004F30C: /* 8004F30C 0004B14C 7F E3 FB 78 */ mr r3, r31 /* 8004F310 0004B150 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004F314 0004B154 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F318 0004B158 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004F31C 0004B15C 83 81 00 10 */ lwz r28, 0x10(r1) /* 8004F320 0004B160 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F324 0004B164 7C 08 03 A6 */ mtlr r0 /* 8004F328 0004B168 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F32C 0004B16C 4E 80 00 20 */ blr .global IOS_Close IOS_Close: /* 8004F330 0004B170 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004F334 0004B174 7C 08 02 A6 */ mflr r0 /* 8004F338 0004B178 90 01 00 24 */ stw r0, 0x24(r1) /* 8004F33C 0004B17C 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F340 0004B180 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004F344 0004B184 3B E0 00 00 */ li r31, 0x0 /* 8004F348 0004B188 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004F34C 0004B18C 7C 7E 1B 78 */ mr r30, r3 /* 8004F350 0004B190 40 82 00 0C */ bne lbl_8004F35C /* 8004F354 0004B194 3B E0 FF FC */ li r31, -0x4 /* 8004F358 0004B198 48 00 00 4C */ b lbl_8004F3A4 .global lbl_8004F35C lbl_8004F35C: /* 8004F35C 0004B19C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F360 0004B1A0 38 80 00 40 */ li r4, 0x40 /* 8004F364 0004B1A4 38 A0 00 20 */ li r5, 0x20 /* 8004F368 0004B1A8 48 00 12 49 */ bl iosAllocAligned /* 8004F36C 0004B1AC 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F370 0004B1B0 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F374 0004B1B4 40 82 00 0C */ bne lbl_8004F380 /* 8004F378 0004B1B8 3B E0 FF EA */ li r31, -0x16 /* 8004F37C 0004B1BC 48 00 00 28 */ b lbl_8004F3A4 .global lbl_8004F380 lbl_8004F380: /* 8004F380 0004B1C0 38 A0 00 00 */ li r5, 0x0 /* 8004F384 0004B1C4 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004F388 0004B1C8 38 00 00 02 */ li r0, 0x2 /* 8004F38C 0004B1CC 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F390 0004B1D0 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004F394 0004B1D4 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F398 0004B1D8 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F39C 0004B1DC 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F3A0 0004B1E0 93 C3 00 08 */ stw r30, 0x8(r3) .global lbl_8004F3A4 lbl_8004F3A4: /* 8004F3A4 0004B1E4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F3A8 0004B1E8 40 82 00 14 */ bne lbl_8004F3BC /* 8004F3AC 0004B1EC 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F3B0 0004B1F0 38 80 00 00 */ li r4, 0x0 /* 8004F3B4 0004B1F4 4B FF F9 FD */ bl __ios_Ipc2 /* 8004F3B8 0004B1F8 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004F3BC lbl_8004F3BC: /* 8004F3BC 0004B1FC 7F E3 FB 78 */ mr r3, r31 /* 8004F3C0 0004B200 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004F3C4 0004B204 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F3C8 0004B208 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F3CC 0004B20C 7C 08 03 A6 */ mtlr r0 /* 8004F3D0 0004B210 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F3D4 0004B214 4E 80 00 20 */ blr /* 8004F3D8 0004B218 00 00 00 00 */ .4byte 0x00000000 /* 8004F3DC 0004B21C 00 00 00 00 */ .4byte 0x00000000 .global IOS_ReadAsync IOS_ReadAsync: /* 8004F3E0 0004B220 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004F3E4 0004B224 7C 08 02 A6 */ mflr r0 /* 8004F3E8 0004B228 90 01 00 34 */ stw r0, 0x34(r1) /* 8004F3EC 0004B22C 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F3F0 0004B230 4B FB 7F 49 */ bl lbl_80007338 /* 8004F3F4 0004B234 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F3F8 0004B238 7C 7A 1B 78 */ mr r26, r3 /* 8004F3FC 0004B23C 7C 9B 23 78 */ mr r27, r4 /* 8004F400 0004B240 7C BC 2B 78 */ mr r28, r5 /* 8004F404 0004B244 7C DD 33 78 */ mr r29, r6 /* 8004F408 0004B248 7C FF 3B 78 */ mr r31, r7 /* 8004F40C 0004B24C 3B C0 00 00 */ li r30, 0x0 /* 8004F410 0004B250 40 82 00 0C */ bne lbl_8004F41C /* 8004F414 0004B254 3B C0 FF FC */ li r30, -0x4 /* 8004F418 0004B258 48 00 00 4C */ b lbl_8004F464 .global lbl_8004F41C lbl_8004F41C: /* 8004F41C 0004B25C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F420 0004B260 38 80 00 40 */ li r4, 0x40 /* 8004F424 0004B264 38 A0 00 20 */ li r5, 0x20 /* 8004F428 0004B268 48 00 11 89 */ bl iosAllocAligned /* 8004F42C 0004B26C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F430 0004B270 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F434 0004B274 40 82 00 0C */ bne lbl_8004F440 /* 8004F438 0004B278 3B C0 FF EA */ li r30, -0x16 /* 8004F43C 0004B27C 48 00 00 28 */ b lbl_8004F464 .global lbl_8004F440 lbl_8004F440: /* 8004F440 0004B280 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004F444 0004B284 38 A0 00 00 */ li r5, 0x0 /* 8004F448 0004B288 38 00 00 03 */ li r0, 0x3 /* 8004F44C 0004B28C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F450 0004B290 93 E4 00 24 */ stw r31, 0x24(r4) /* 8004F454 0004B294 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F458 0004B298 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F45C 0004B29C 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F460 0004B2A0 93 43 00 08 */ stw r26, 0x8(r3) .global lbl_8004F464 lbl_8004F464: /* 8004F464 0004B2A4 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F468 0004B2A8 40 82 00 5C */ bne lbl_8004F4C4 /* 8004F46C 0004B2AC 83 E1 00 08 */ lwz r31, 0x8(r1) /* 8004F470 0004B2B0 3B C0 00 00 */ li r30, 0x0 /* 8004F474 0004B2B4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F478 0004B2B8 40 82 00 0C */ bne lbl_8004F484 /* 8004F47C 0004B2BC 3B C0 FF FC */ li r30, -0x4 /* 8004F480 0004B2C0 48 00 00 2C */ b lbl_8004F4AC .global lbl_8004F484 lbl_8004F484: /* 8004F484 0004B2C4 7F 63 DB 78 */ mr r3, r27 /* 8004F488 0004B2C8 7F 84 E3 78 */ mr r4, r28 /* 8004F48C 0004B2CC 4B FC D4 C5 */ bl DCInvalidateRange /* 8004F490 0004B2D0 2C 1B 00 00 */ cmpwi r27, 0x0 /* 8004F494 0004B2D4 41 82 00 0C */ beq lbl_8004F4A0 /* 8004F498 0004B2D8 3C 1B 80 00 */ addis r0, r27, 0x8000 /* 8004F49C 0004B2DC 48 00 00 08 */ b lbl_8004F4A4 .global lbl_8004F4A0 lbl_8004F4A0: /* 8004F4A0 0004B2E0 38 00 00 00 */ li r0, 0x0 .global lbl_8004F4A4 lbl_8004F4A4: /* 8004F4A4 0004B2E4 90 1F 00 0C */ stw r0, 0xc(r31) /* 8004F4A8 0004B2E8 93 9F 00 10 */ stw r28, 0x10(r31) .global lbl_8004F4AC lbl_8004F4AC: /* 8004F4AC 0004B2EC 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F4B0 0004B2F0 40 82 00 14 */ bne lbl_8004F4C4 /* 8004F4B4 0004B2F4 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F4B8 0004B2F8 7F A4 EB 78 */ mr r4, r29 /* 8004F4BC 0004B2FC 4B FF F8 F5 */ bl __ios_Ipc2 /* 8004F4C0 0004B300 7C 7E 1B 78 */ mr r30, r3 .global lbl_8004F4C4 lbl_8004F4C4: /* 8004F4C4 0004B304 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F4C8 0004B308 7F C3 F3 78 */ mr r3, r30 /* 8004F4CC 0004B30C 4B FB 7E B9 */ bl lbl_80007384 /* 8004F4D0 0004B310 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004F4D4 0004B314 7C 08 03 A6 */ mtlr r0 /* 8004F4D8 0004B318 38 21 00 30 */ addi r1, r1, 0x30 /* 8004F4DC 0004B31C 4E 80 00 20 */ blr .global IOS_Read IOS_Read: /* 8004F4E0 0004B320 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004F4E4 0004B324 7C 08 02 A6 */ mflr r0 /* 8004F4E8 0004B328 90 01 00 24 */ stw r0, 0x24(r1) /* 8004F4EC 0004B32C 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F4F0 0004B330 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004F4F4 0004B334 7C 7F 1B 78 */ mr r31, r3 /* 8004F4F8 0004B338 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004F4FC 0004B33C 3B C0 00 00 */ li r30, 0x0 /* 8004F500 0004B340 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004F504 0004B344 7C BD 2B 78 */ mr r29, r5 /* 8004F508 0004B348 93 81 00 10 */ stw r28, 0x10(r1) /* 8004F50C 0004B34C 7C 9C 23 78 */ mr r28, r4 /* 8004F510 0004B350 40 82 00 0C */ bne lbl_8004F51C /* 8004F514 0004B354 3B C0 FF FC */ li r30, -0x4 /* 8004F518 0004B358 48 00 00 4C */ b lbl_8004F564 .global lbl_8004F51C lbl_8004F51C: /* 8004F51C 0004B35C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F520 0004B360 38 80 00 40 */ li r4, 0x40 /* 8004F524 0004B364 38 A0 00 20 */ li r5, 0x20 /* 8004F528 0004B368 48 00 10 89 */ bl iosAllocAligned /* 8004F52C 0004B36C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F530 0004B370 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F534 0004B374 40 82 00 0C */ bne lbl_8004F540 /* 8004F538 0004B378 3B C0 FF EA */ li r30, -0x16 /* 8004F53C 0004B37C 48 00 00 28 */ b lbl_8004F564 .global lbl_8004F540 lbl_8004F540: /* 8004F540 0004B380 38 A0 00 00 */ li r5, 0x0 /* 8004F544 0004B384 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004F548 0004B388 38 00 00 03 */ li r0, 0x3 /* 8004F54C 0004B38C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F550 0004B390 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004F554 0004B394 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F558 0004B398 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F55C 0004B39C 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F560 0004B3A0 93 E3 00 08 */ stw r31, 0x8(r3) .global lbl_8004F564 lbl_8004F564: /* 8004F564 0004B3A4 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F568 0004B3A8 40 82 00 5C */ bne lbl_8004F5C4 /* 8004F56C 0004B3AC 83 E1 00 08 */ lwz r31, 0x8(r1) /* 8004F570 0004B3B0 3B C0 00 00 */ li r30, 0x0 /* 8004F574 0004B3B4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F578 0004B3B8 40 82 00 0C */ bne lbl_8004F584 /* 8004F57C 0004B3BC 3B C0 FF FC */ li r30, -0x4 /* 8004F580 0004B3C0 48 00 00 2C */ b lbl_8004F5AC .global lbl_8004F584 lbl_8004F584: /* 8004F584 0004B3C4 7F 83 E3 78 */ mr r3, r28 /* 8004F588 0004B3C8 7F A4 EB 78 */ mr r4, r29 /* 8004F58C 0004B3CC 4B FC D3 C5 */ bl DCInvalidateRange /* 8004F590 0004B3D0 2C 1C 00 00 */ cmpwi r28, 0x0 /* 8004F594 0004B3D4 41 82 00 0C */ beq lbl_8004F5A0 /* 8004F598 0004B3D8 3C 1C 80 00 */ addis r0, r28, 0x8000 /* 8004F59C 0004B3DC 48 00 00 08 */ b lbl_8004F5A4 .global lbl_8004F5A0 lbl_8004F5A0: /* 8004F5A0 0004B3E0 38 00 00 00 */ li r0, 0x0 .global lbl_8004F5A4 lbl_8004F5A4: /* 8004F5A4 0004B3E4 90 1F 00 0C */ stw r0, 0xc(r31) /* 8004F5A8 0004B3E8 93 BF 00 10 */ stw r29, 0x10(r31) .global lbl_8004F5AC lbl_8004F5AC: /* 8004F5AC 0004B3EC 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004F5B0 0004B3F0 40 82 00 14 */ bne lbl_8004F5C4 /* 8004F5B4 0004B3F4 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F5B8 0004B3F8 38 80 00 00 */ li r4, 0x0 /* 8004F5BC 0004B3FC 4B FF F7 F5 */ bl __ios_Ipc2 /* 8004F5C0 0004B400 7C 7E 1B 78 */ mr r30, r3 .global lbl_8004F5C4 lbl_8004F5C4: /* 8004F5C4 0004B404 7F C3 F3 78 */ mr r3, r30 /* 8004F5C8 0004B408 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004F5CC 0004B40C 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F5D0 0004B410 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004F5D4 0004B414 83 81 00 10 */ lwz r28, 0x10(r1) /* 8004F5D8 0004B418 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F5DC 0004B41C 7C 08 03 A6 */ mtlr r0 /* 8004F5E0 0004B420 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F5E4 0004B424 4E 80 00 20 */ blr /* 8004F5E8 0004B428 00 00 00 00 */ .4byte 0x00000000 /* 8004F5EC 0004B42C 00 00 00 00 */ .4byte 0x00000000 .global IOS_WriteAsync IOS_WriteAsync: /* 8004F5F0 0004B430 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004F5F4 0004B434 7C 08 02 A6 */ mflr r0 /* 8004F5F8 0004B438 90 01 00 34 */ stw r0, 0x34(r1) /* 8004F5FC 0004B43C 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F600 0004B440 4B FB 7D 39 */ bl lbl_80007338 /* 8004F604 0004B444 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F608 0004B448 7C 7A 1B 78 */ mr r26, r3 /* 8004F60C 0004B44C 7C 9B 23 78 */ mr r27, r4 /* 8004F610 0004B450 7C BC 2B 78 */ mr r28, r5 /* 8004F614 0004B454 7C DD 33 78 */ mr r29, r6 /* 8004F618 0004B458 7C FE 3B 78 */ mr r30, r7 /* 8004F61C 0004B45C 3B E0 00 00 */ li r31, 0x0 /* 8004F620 0004B460 40 82 00 0C */ bne lbl_8004F62C /* 8004F624 0004B464 3B E0 FF FC */ li r31, -0x4 /* 8004F628 0004B468 48 00 00 4C */ b lbl_8004F674 .global lbl_8004F62C lbl_8004F62C: /* 8004F62C 0004B46C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F630 0004B470 38 80 00 40 */ li r4, 0x40 /* 8004F634 0004B474 38 A0 00 20 */ li r5, 0x20 /* 8004F638 0004B478 48 00 0F 79 */ bl iosAllocAligned /* 8004F63C 0004B47C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F640 0004B480 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F644 0004B484 40 82 00 0C */ bne lbl_8004F650 /* 8004F648 0004B488 3B E0 FF EA */ li r31, -0x16 /* 8004F64C 0004B48C 48 00 00 28 */ b lbl_8004F674 .global lbl_8004F650 lbl_8004F650: /* 8004F650 0004B490 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004F654 0004B494 38 A0 00 00 */ li r5, 0x0 /* 8004F658 0004B498 38 00 00 04 */ li r0, 0x4 /* 8004F65C 0004B49C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F660 0004B4A0 93 C4 00 24 */ stw r30, 0x24(r4) /* 8004F664 0004B4A4 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F668 0004B4A8 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F66C 0004B4AC 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F670 0004B4B0 93 43 00 08 */ stw r26, 0x8(r3) .global lbl_8004F674 lbl_8004F674: /* 8004F674 0004B4B4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F678 0004B4B8 40 82 00 5C */ bne lbl_8004F6D4 /* 8004F67C 0004B4BC 80 A1 00 08 */ lwz r5, 0x8(r1) /* 8004F680 0004B4C0 3B E0 00 00 */ li r31, 0x0 /* 8004F684 0004B4C4 2C 05 00 00 */ cmpwi r5, 0x0 /* 8004F688 0004B4C8 40 82 00 0C */ bne lbl_8004F694 /* 8004F68C 0004B4CC 3B E0 FF FC */ li r31, -0x4 /* 8004F690 0004B4D0 48 00 00 2C */ b lbl_8004F6BC .global lbl_8004F694 lbl_8004F694: /* 8004F694 0004B4D4 2C 1B 00 00 */ cmpwi r27, 0x0 /* 8004F698 0004B4D8 41 82 00 0C */ beq lbl_8004F6A4 /* 8004F69C 0004B4DC 3C 1B 80 00 */ addis r0, r27, 0x8000 /* 8004F6A0 0004B4E0 48 00 00 08 */ b lbl_8004F6A8 .global lbl_8004F6A4 lbl_8004F6A4: /* 8004F6A4 0004B4E4 38 00 00 00 */ li r0, 0x0 .global lbl_8004F6A8 lbl_8004F6A8: /* 8004F6A8 0004B4E8 90 05 00 0C */ stw r0, 0xc(r5) /* 8004F6AC 0004B4EC 7F 63 DB 78 */ mr r3, r27 /* 8004F6B0 0004B4F0 7F 84 E3 78 */ mr r4, r28 /* 8004F6B4 0004B4F4 93 85 00 10 */ stw r28, 0x10(r5) /* 8004F6B8 0004B4F8 4B FC D2 C9 */ bl DCFlushRange .global lbl_8004F6BC lbl_8004F6BC: /* 8004F6BC 0004B4FC 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F6C0 0004B500 40 82 00 14 */ bne lbl_8004F6D4 /* 8004F6C4 0004B504 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F6C8 0004B508 7F A4 EB 78 */ mr r4, r29 /* 8004F6CC 0004B50C 4B FF F6 E5 */ bl __ios_Ipc2 /* 8004F6D0 0004B510 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004F6D4 lbl_8004F6D4: /* 8004F6D4 0004B514 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F6D8 0004B518 7F E3 FB 78 */ mr r3, r31 /* 8004F6DC 0004B51C 4B FB 7C A9 */ bl lbl_80007384 /* 8004F6E0 0004B520 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004F6E4 0004B524 7C 08 03 A6 */ mtlr r0 /* 8004F6E8 0004B528 38 21 00 30 */ addi r1, r1, 0x30 /* 8004F6EC 0004B52C 4E 80 00 20 */ blr .global IOS_Write IOS_Write: /* 8004F6F0 0004B530 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004F6F4 0004B534 7C 08 02 A6 */ mflr r0 /* 8004F6F8 0004B538 90 01 00 24 */ stw r0, 0x24(r1) /* 8004F6FC 0004B53C 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F700 0004B540 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004F704 0004B544 3B E0 00 00 */ li r31, 0x0 /* 8004F708 0004B548 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004F70C 0004B54C 7C BE 2B 78 */ mr r30, r5 /* 8004F710 0004B550 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004F714 0004B554 7C 9D 23 78 */ mr r29, r4 /* 8004F718 0004B558 93 81 00 10 */ stw r28, 0x10(r1) /* 8004F71C 0004B55C 7C 7C 1B 78 */ mr r28, r3 /* 8004F720 0004B560 40 82 00 0C */ bne lbl_8004F72C /* 8004F724 0004B564 3B E0 FF FC */ li r31, -0x4 /* 8004F728 0004B568 48 00 00 4C */ b lbl_8004F774 .global lbl_8004F72C lbl_8004F72C: /* 8004F72C 0004B56C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F730 0004B570 38 80 00 40 */ li r4, 0x40 /* 8004F734 0004B574 38 A0 00 20 */ li r5, 0x20 /* 8004F738 0004B578 48 00 0E 79 */ bl iosAllocAligned /* 8004F73C 0004B57C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F740 0004B580 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F744 0004B584 40 82 00 0C */ bne lbl_8004F750 /* 8004F748 0004B588 3B E0 FF EA */ li r31, -0x16 /* 8004F74C 0004B58C 48 00 00 28 */ b lbl_8004F774 .global lbl_8004F750 lbl_8004F750: /* 8004F750 0004B590 38 A0 00 00 */ li r5, 0x0 /* 8004F754 0004B594 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004F758 0004B598 38 00 00 04 */ li r0, 0x4 /* 8004F75C 0004B59C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F760 0004B5A0 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004F764 0004B5A4 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F768 0004B5A8 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F76C 0004B5AC 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F770 0004B5B0 93 83 00 08 */ stw r28, 0x8(r3) .global lbl_8004F774 lbl_8004F774: /* 8004F774 0004B5B4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F778 0004B5B8 40 82 00 5C */ bne lbl_8004F7D4 /* 8004F77C 0004B5BC 80 A1 00 08 */ lwz r5, 0x8(r1) /* 8004F780 0004B5C0 3B E0 00 00 */ li r31, 0x0 /* 8004F784 0004B5C4 2C 05 00 00 */ cmpwi r5, 0x0 /* 8004F788 0004B5C8 40 82 00 0C */ bne lbl_8004F794 /* 8004F78C 0004B5CC 3B E0 FF FC */ li r31, -0x4 /* 8004F790 0004B5D0 48 00 00 2C */ b lbl_8004F7BC .global lbl_8004F794 lbl_8004F794: /* 8004F794 0004B5D4 2C 1D 00 00 */ cmpwi r29, 0x0 /* 8004F798 0004B5D8 41 82 00 0C */ beq lbl_8004F7A4 /* 8004F79C 0004B5DC 3C 1D 80 00 */ addis r0, r29, 0x8000 /* 8004F7A0 0004B5E0 48 00 00 08 */ b lbl_8004F7A8 .global lbl_8004F7A4 lbl_8004F7A4: /* 8004F7A4 0004B5E4 38 00 00 00 */ li r0, 0x0 .global lbl_8004F7A8 lbl_8004F7A8: /* 8004F7A8 0004B5E8 90 05 00 0C */ stw r0, 0xc(r5) /* 8004F7AC 0004B5EC 7F A3 EB 78 */ mr r3, r29 /* 8004F7B0 0004B5F0 7F C4 F3 78 */ mr r4, r30 /* 8004F7B4 0004B5F4 93 C5 00 10 */ stw r30, 0x10(r5) /* 8004F7B8 0004B5F8 4B FC D1 C9 */ bl DCFlushRange .global lbl_8004F7BC lbl_8004F7BC: /* 8004F7BC 0004B5FC 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F7C0 0004B600 40 82 00 14 */ bne lbl_8004F7D4 /* 8004F7C4 0004B604 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F7C8 0004B608 38 80 00 00 */ li r4, 0x0 /* 8004F7CC 0004B60C 4B FF F5 E5 */ bl __ios_Ipc2 /* 8004F7D0 0004B610 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004F7D4 lbl_8004F7D4: /* 8004F7D4 0004B614 7F E3 FB 78 */ mr r3, r31 /* 8004F7D8 0004B618 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004F7DC 0004B61C 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F7E0 0004B620 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004F7E4 0004B624 83 81 00 10 */ lwz r28, 0x10(r1) /* 8004F7E8 0004B628 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F7EC 0004B62C 7C 08 03 A6 */ mtlr r0 /* 8004F7F0 0004B630 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F7F4 0004B634 4E 80 00 20 */ blr /* 8004F7F8 0004B638 00 00 00 00 */ .4byte 0x00000000 /* 8004F7FC 0004B63C 00 00 00 00 */ .4byte 0x00000000 .global IOS_SeekAsync IOS_SeekAsync: /* 8004F800 0004B640 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004F804 0004B644 7C 08 02 A6 */ mflr r0 /* 8004F808 0004B648 90 01 00 34 */ stw r0, 0x34(r1) /* 8004F80C 0004B64C 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F810 0004B650 4B FB 7B 29 */ bl lbl_80007338 /* 8004F814 0004B654 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F818 0004B658 7C 7A 1B 78 */ mr r26, r3 /* 8004F81C 0004B65C 7C 9B 23 78 */ mr r27, r4 /* 8004F820 0004B660 7C BC 2B 78 */ mr r28, r5 /* 8004F824 0004B664 7C DD 33 78 */ mr r29, r6 /* 8004F828 0004B668 7C FE 3B 78 */ mr r30, r7 /* 8004F82C 0004B66C 3B E0 00 00 */ li r31, 0x0 /* 8004F830 0004B670 40 82 00 0C */ bne lbl_8004F83C /* 8004F834 0004B674 3B E0 FF FC */ li r31, -0x4 /* 8004F838 0004B678 48 00 00 4C */ b lbl_8004F884 .global lbl_8004F83C lbl_8004F83C: /* 8004F83C 0004B67C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F840 0004B680 38 80 00 40 */ li r4, 0x40 /* 8004F844 0004B684 38 A0 00 20 */ li r5, 0x20 /* 8004F848 0004B688 48 00 0D 69 */ bl iosAllocAligned /* 8004F84C 0004B68C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F850 0004B690 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F854 0004B694 40 82 00 0C */ bne lbl_8004F860 /* 8004F858 0004B698 3B E0 FF EA */ li r31, -0x16 /* 8004F85C 0004B69C 48 00 00 28 */ b lbl_8004F884 .global lbl_8004F860 lbl_8004F860: /* 8004F860 0004B6A0 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004F864 0004B6A4 38 A0 00 00 */ li r5, 0x0 /* 8004F868 0004B6A8 38 00 00 05 */ li r0, 0x5 /* 8004F86C 0004B6AC 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F870 0004B6B0 93 C4 00 24 */ stw r30, 0x24(r4) /* 8004F874 0004B6B4 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F878 0004B6B8 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F87C 0004B6BC 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F880 0004B6C0 93 43 00 08 */ stw r26, 0x8(r3) .global lbl_8004F884 lbl_8004F884: /* 8004F884 0004B6C4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F888 0004B6C8 40 82 00 3C */ bne lbl_8004F8C4 /* 8004F88C 0004B6CC 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F890 0004B6D0 3B E0 00 00 */ li r31, 0x0 /* 8004F894 0004B6D4 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F898 0004B6D8 40 82 00 0C */ bne lbl_8004F8A4 /* 8004F89C 0004B6DC 3B E0 FF FC */ li r31, -0x4 /* 8004F8A0 0004B6E0 48 00 00 0C */ b lbl_8004F8AC .global lbl_8004F8A4 lbl_8004F8A4: /* 8004F8A4 0004B6E4 93 63 00 0C */ stw r27, 0xc(r3) /* 8004F8A8 0004B6E8 93 83 00 10 */ stw r28, 0x10(r3) .global lbl_8004F8AC lbl_8004F8AC: /* 8004F8AC 0004B6EC 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F8B0 0004B6F0 40 82 00 14 */ bne lbl_8004F8C4 /* 8004F8B4 0004B6F4 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F8B8 0004B6F8 7F A4 EB 78 */ mr r4, r29 /* 8004F8BC 0004B6FC 4B FF F4 F5 */ bl __ios_Ipc2 /* 8004F8C0 0004B700 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004F8C4 lbl_8004F8C4: /* 8004F8C4 0004B704 39 61 00 30 */ addi r11, r1, 0x30 /* 8004F8C8 0004B708 7F E3 FB 78 */ mr r3, r31 /* 8004F8CC 0004B70C 4B FB 7A B9 */ bl lbl_80007384 /* 8004F8D0 0004B710 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004F8D4 0004B714 7C 08 03 A6 */ mtlr r0 /* 8004F8D8 0004B718 38 21 00 30 */ addi r1, r1, 0x30 /* 8004F8DC 0004B71C 4E 80 00 20 */ blr .global IOS_Seek IOS_Seek: /* 8004F8E0 0004B720 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004F8E4 0004B724 7C 08 02 A6 */ mflr r0 /* 8004F8E8 0004B728 90 01 00 24 */ stw r0, 0x24(r1) /* 8004F8EC 0004B72C 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F8F0 0004B730 93 E1 00 1C */ stw r31, 0x1c(r1) /* 8004F8F4 0004B734 3B E0 00 00 */ li r31, 0x0 /* 8004F8F8 0004B738 93 C1 00 18 */ stw r30, 0x18(r1) /* 8004F8FC 0004B73C 7C BE 2B 78 */ mr r30, r5 /* 8004F900 0004B740 93 A1 00 14 */ stw r29, 0x14(r1) /* 8004F904 0004B744 7C 9D 23 78 */ mr r29, r4 /* 8004F908 0004B748 93 81 00 10 */ stw r28, 0x10(r1) /* 8004F90C 0004B74C 7C 7C 1B 78 */ mr r28, r3 /* 8004F910 0004B750 40 82 00 0C */ bne lbl_8004F91C /* 8004F914 0004B754 3B E0 FF FC */ li r31, -0x4 /* 8004F918 0004B758 48 00 00 4C */ b lbl_8004F964 .global lbl_8004F91C lbl_8004F91C: /* 8004F91C 0004B75C 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004F920 0004B760 38 80 00 40 */ li r4, 0x40 /* 8004F924 0004B764 38 A0 00 20 */ li r5, 0x20 /* 8004F928 0004B768 48 00 0C 89 */ bl iosAllocAligned /* 8004F92C 0004B76C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F930 0004B770 90 61 00 08 */ stw r3, 0x8(r1) /* 8004F934 0004B774 40 82 00 0C */ bne lbl_8004F940 /* 8004F938 0004B778 3B E0 FF EA */ li r31, -0x16 /* 8004F93C 0004B77C 48 00 00 28 */ b lbl_8004F964 .global lbl_8004F940 lbl_8004F940: /* 8004F940 0004B780 38 A0 00 00 */ li r5, 0x0 /* 8004F944 0004B784 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004F948 0004B788 38 00 00 05 */ li r0, 0x5 /* 8004F94C 0004B78C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F950 0004B790 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004F954 0004B794 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004F958 0004B798 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004F95C 0004B79C 90 03 00 00 */ stw r0, 0x0(r3) /* 8004F960 0004B7A0 93 83 00 08 */ stw r28, 0x8(r3) .global lbl_8004F964 lbl_8004F964: /* 8004F964 0004B7A4 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F968 0004B7A8 40 82 00 3C */ bne lbl_8004F9A4 /* 8004F96C 0004B7AC 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F970 0004B7B0 3B E0 00 00 */ li r31, 0x0 /* 8004F974 0004B7B4 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004F978 0004B7B8 40 82 00 0C */ bne lbl_8004F984 /* 8004F97C 0004B7BC 3B E0 FF FC */ li r31, -0x4 /* 8004F980 0004B7C0 48 00 00 0C */ b lbl_8004F98C .global lbl_8004F984 lbl_8004F984: /* 8004F984 0004B7C4 93 A3 00 0C */ stw r29, 0xc(r3) /* 8004F988 0004B7C8 93 C3 00 10 */ stw r30, 0x10(r3) .global lbl_8004F98C lbl_8004F98C: /* 8004F98C 0004B7CC 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004F990 0004B7D0 40 82 00 14 */ bne lbl_8004F9A4 /* 8004F994 0004B7D4 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004F998 0004B7D8 38 80 00 00 */ li r4, 0x0 /* 8004F99C 0004B7DC 4B FF F4 15 */ bl __ios_Ipc2 /* 8004F9A0 0004B7E0 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004F9A4 lbl_8004F9A4: /* 8004F9A4 0004B7E4 7F E3 FB 78 */ mr r3, r31 /* 8004F9A8 0004B7E8 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 8004F9AC 0004B7EC 83 C1 00 18 */ lwz r30, 0x18(r1) /* 8004F9B0 0004B7F0 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8004F9B4 0004B7F4 83 81 00 10 */ lwz r28, 0x10(r1) /* 8004F9B8 0004B7F8 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004F9BC 0004B7FC 7C 08 03 A6 */ mtlr r0 /* 8004F9C0 0004B800 38 21 00 20 */ addi r1, r1, 0x20 /* 8004F9C4 0004B804 4E 80 00 20 */ blr /* 8004F9C8 0004B808 00 00 00 00 */ .4byte 0x00000000 /* 8004F9CC 0004B80C 00 00 00 00 */ .4byte 0x00000000 .global IOS_IoctlAsync IOS_IoctlAsync: /* 8004F9D0 0004B810 94 21 FF C0 */ stwu r1, -0x40(r1) /* 8004F9D4 0004B814 7C 08 02 A6 */ mflr r0 /* 8004F9D8 0004B818 90 01 00 44 */ stw r0, 0x44(r1) /* 8004F9DC 0004B81C 39 61 00 40 */ addi r11, r1, 0x40 /* 8004F9E0 0004B820 4B FB 79 4D */ bl lbl_8000732C /* 8004F9E4 0004B824 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004F9E8 0004B828 7C 77 1B 78 */ mr r23, r3 /* 8004F9EC 0004B82C 7C 98 23 78 */ mr r24, r4 /* 8004F9F0 0004B830 7C B9 2B 78 */ mr r25, r5 /* 8004F9F4 0004B834 7C DA 33 78 */ mr r26, r6 /* 8004F9F8 0004B838 7C FB 3B 78 */ mr r27, r7 /* 8004F9FC 0004B83C 7D 1C 43 78 */ mr r28, r8 /* 8004FA00 0004B840 7D 3D 4B 78 */ mr r29, r9 /* 8004FA04 0004B844 7D 5E 53 78 */ mr r30, r10 /* 8004FA08 0004B848 3B E0 00 00 */ li r31, 0x0 /* 8004FA0C 0004B84C 40 82 00 0C */ bne lbl_8004FA18 /* 8004FA10 0004B850 3B E0 FF FC */ li r31, -0x4 /* 8004FA14 0004B854 48 00 00 4C */ b lbl_8004FA60 .global lbl_8004FA18 lbl_8004FA18: /* 8004FA18 0004B858 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004FA1C 0004B85C 38 80 00 40 */ li r4, 0x40 /* 8004FA20 0004B860 38 A0 00 20 */ li r5, 0x20 /* 8004FA24 0004B864 48 00 0B 8D */ bl iosAllocAligned /* 8004FA28 0004B868 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FA2C 0004B86C 90 61 00 08 */ stw r3, 0x8(r1) /* 8004FA30 0004B870 40 82 00 0C */ bne lbl_8004FA3C /* 8004FA34 0004B874 3B E0 FF EA */ li r31, -0x16 /* 8004FA38 0004B878 48 00 00 28 */ b lbl_8004FA60 .global lbl_8004FA3C lbl_8004FA3C: /* 8004FA3C 0004B87C 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004FA40 0004B880 38 A0 00 00 */ li r5, 0x0 /* 8004FA44 0004B884 38 00 00 06 */ li r0, 0x6 /* 8004FA48 0004B888 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FA4C 0004B88C 93 C4 00 24 */ stw r30, 0x24(r4) /* 8004FA50 0004B890 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FA54 0004B894 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004FA58 0004B898 90 03 00 00 */ stw r0, 0x0(r3) /* 8004FA5C 0004B89C 92 E3 00 08 */ stw r23, 0x8(r3) .global lbl_8004FA60 lbl_8004FA60: /* 8004FA60 0004B8A0 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004FA64 0004B8A4 40 82 00 88 */ bne lbl_8004FAEC /* 8004FA68 0004B8A8 80 A1 00 08 */ lwz r5, 0x8(r1) /* 8004FA6C 0004B8AC 3B E0 00 00 */ li r31, 0x0 /* 8004FA70 0004B8B0 2C 05 00 00 */ cmpwi r5, 0x0 /* 8004FA74 0004B8B4 40 82 00 0C */ bne lbl_8004FA80 /* 8004FA78 0004B8B8 3B E0 FF FC */ li r31, -0x4 /* 8004FA7C 0004B8BC 48 00 00 58 */ b lbl_8004FAD4 .global lbl_8004FA80 lbl_8004FA80: /* 8004FA80 0004B8C0 2C 1B 00 00 */ cmpwi r27, 0x0 /* 8004FA84 0004B8C4 93 05 00 0C */ stw r24, 0xc(r5) /* 8004FA88 0004B8C8 41 82 00 0C */ beq lbl_8004FA94 /* 8004FA8C 0004B8CC 3C 1B 80 00 */ addis r0, r27, 0x8000 /* 8004FA90 0004B8D0 48 00 00 08 */ b lbl_8004FA98 .global lbl_8004FA94 lbl_8004FA94: /* 8004FA94 0004B8D4 38 00 00 00 */ li r0, 0x0 .global lbl_8004FA98 lbl_8004FA98: /* 8004FA98 0004B8D8 90 05 00 18 */ stw r0, 0x18(r5) /* 8004FA9C 0004B8DC 2C 19 00 00 */ cmpwi r25, 0x0 /* 8004FAA0 0004B8E0 93 85 00 1C */ stw r28, 0x1c(r5) /* 8004FAA4 0004B8E4 41 82 00 0C */ beq lbl_8004FAB0 /* 8004FAA8 0004B8E8 3C 19 80 00 */ addis r0, r25, 0x8000 /* 8004FAAC 0004B8EC 48 00 00 08 */ b lbl_8004FAB4 .global lbl_8004FAB0 lbl_8004FAB0: /* 8004FAB0 0004B8F0 38 00 00 00 */ li r0, 0x0 .global lbl_8004FAB4 lbl_8004FAB4: /* 8004FAB4 0004B8F4 90 05 00 10 */ stw r0, 0x10(r5) /* 8004FAB8 0004B8F8 7F 23 CB 78 */ mr r3, r25 /* 8004FABC 0004B8FC 7F 44 D3 78 */ mr r4, r26 /* 8004FAC0 0004B900 93 45 00 14 */ stw r26, 0x14(r5) /* 8004FAC4 0004B904 4B FC CE BD */ bl DCFlushRange /* 8004FAC8 0004B908 7F 63 DB 78 */ mr r3, r27 /* 8004FACC 0004B90C 7F 84 E3 78 */ mr r4, r28 /* 8004FAD0 0004B910 4B FC CE B1 */ bl DCFlushRange .global lbl_8004FAD4 lbl_8004FAD4: /* 8004FAD4 0004B914 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004FAD8 0004B918 40 82 00 14 */ bne lbl_8004FAEC /* 8004FADC 0004B91C 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004FAE0 0004B920 7F A4 EB 78 */ mr r4, r29 /* 8004FAE4 0004B924 4B FF F2 CD */ bl __ios_Ipc2 /* 8004FAE8 0004B928 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004FAEC lbl_8004FAEC: /* 8004FAEC 0004B92C 39 61 00 40 */ addi r11, r1, 0x40 /* 8004FAF0 0004B930 7F E3 FB 78 */ mr r3, r31 /* 8004FAF4 0004B934 4B FB 78 85 */ bl lbl_80007378 /* 8004FAF8 0004B938 80 01 00 44 */ lwz r0, 0x44(r1) /* 8004FAFC 0004B93C 7C 08 03 A6 */ mtlr r0 /* 8004FB00 0004B940 38 21 00 40 */ addi r1, r1, 0x40 /* 8004FB04 0004B944 4E 80 00 20 */ blr /* 8004FB08 0004B948 00 00 00 00 */ .4byte 0x00000000 /* 8004FB0C 0004B94C 00 00 00 00 */ .4byte 0x00000000 .global IOS_Ioctl IOS_Ioctl: /* 8004FB10 0004B950 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004FB14 0004B954 7C 08 02 A6 */ mflr r0 /* 8004FB18 0004B958 90 01 00 34 */ stw r0, 0x34(r1) /* 8004FB1C 0004B95C 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FB20 0004B960 4B FB 78 15 */ bl lbl_80007334 /* 8004FB24 0004B964 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004FB28 0004B968 7C 79 1B 78 */ mr r25, r3 /* 8004FB2C 0004B96C 7C 9A 23 78 */ mr r26, r4 /* 8004FB30 0004B970 7C BB 2B 78 */ mr r27, r5 /* 8004FB34 0004B974 7C DC 33 78 */ mr r28, r6 /* 8004FB38 0004B978 7C FD 3B 78 */ mr r29, r7 /* 8004FB3C 0004B97C 7D 1E 43 78 */ mr r30, r8 /* 8004FB40 0004B980 3B E0 00 00 */ li r31, 0x0 /* 8004FB44 0004B984 40 82 00 0C */ bne lbl_8004FB50 /* 8004FB48 0004B988 3B E0 FF FC */ li r31, -0x4 /* 8004FB4C 0004B98C 48 00 00 4C */ b lbl_8004FB98 .global lbl_8004FB50 lbl_8004FB50: /* 8004FB50 0004B990 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004FB54 0004B994 38 80 00 40 */ li r4, 0x40 /* 8004FB58 0004B998 38 A0 00 20 */ li r5, 0x20 /* 8004FB5C 0004B99C 48 00 0A 55 */ bl iosAllocAligned /* 8004FB60 0004B9A0 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FB64 0004B9A4 90 61 00 08 */ stw r3, 0x8(r1) /* 8004FB68 0004B9A8 40 82 00 0C */ bne lbl_8004FB74 /* 8004FB6C 0004B9AC 3B E0 FF EA */ li r31, -0x16 /* 8004FB70 0004B9B0 48 00 00 28 */ b lbl_8004FB98 .global lbl_8004FB74 lbl_8004FB74: /* 8004FB74 0004B9B4 38 A0 00 00 */ li r5, 0x0 /* 8004FB78 0004B9B8 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004FB7C 0004B9BC 38 00 00 06 */ li r0, 0x6 /* 8004FB80 0004B9C0 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FB84 0004B9C4 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004FB88 0004B9C8 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FB8C 0004B9CC 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004FB90 0004B9D0 90 03 00 00 */ stw r0, 0x0(r3) /* 8004FB94 0004B9D4 93 23 00 08 */ stw r25, 0x8(r3) .global lbl_8004FB98 lbl_8004FB98: /* 8004FB98 0004B9D8 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004FB9C 0004B9DC 40 82 00 88 */ bne lbl_8004FC24 /* 8004FBA0 0004B9E0 80 A1 00 08 */ lwz r5, 0x8(r1) /* 8004FBA4 0004B9E4 3B E0 00 00 */ li r31, 0x0 /* 8004FBA8 0004B9E8 2C 05 00 00 */ cmpwi r5, 0x0 /* 8004FBAC 0004B9EC 40 82 00 0C */ bne lbl_8004FBB8 /* 8004FBB0 0004B9F0 3B E0 FF FC */ li r31, -0x4 /* 8004FBB4 0004B9F4 48 00 00 58 */ b lbl_8004FC0C .global lbl_8004FBB8 lbl_8004FBB8: /* 8004FBB8 0004B9F8 2C 1D 00 00 */ cmpwi r29, 0x0 /* 8004FBBC 0004B9FC 93 45 00 0C */ stw r26, 0xc(r5) /* 8004FBC0 0004BA00 41 82 00 0C */ beq lbl_8004FBCC /* 8004FBC4 0004BA04 3C 1D 80 00 */ addis r0, r29, 0x8000 /* 8004FBC8 0004BA08 48 00 00 08 */ b lbl_8004FBD0 .global lbl_8004FBCC lbl_8004FBCC: /* 8004FBCC 0004BA0C 38 00 00 00 */ li r0, 0x0 .global lbl_8004FBD0 lbl_8004FBD0: /* 8004FBD0 0004BA10 90 05 00 18 */ stw r0, 0x18(r5) /* 8004FBD4 0004BA14 2C 1B 00 00 */ cmpwi r27, 0x0 /* 8004FBD8 0004BA18 93 C5 00 1C */ stw r30, 0x1c(r5) /* 8004FBDC 0004BA1C 41 82 00 0C */ beq lbl_8004FBE8 /* 8004FBE0 0004BA20 3C 1B 80 00 */ addis r0, r27, 0x8000 /* 8004FBE4 0004BA24 48 00 00 08 */ b lbl_8004FBEC .global lbl_8004FBE8 lbl_8004FBE8: /* 8004FBE8 0004BA28 38 00 00 00 */ li r0, 0x0 .global lbl_8004FBEC lbl_8004FBEC: /* 8004FBEC 0004BA2C 90 05 00 10 */ stw r0, 0x10(r5) /* 8004FBF0 0004BA30 7F 63 DB 78 */ mr r3, r27 /* 8004FBF4 0004BA34 7F 84 E3 78 */ mr r4, r28 /* 8004FBF8 0004BA38 93 85 00 14 */ stw r28, 0x14(r5) /* 8004FBFC 0004BA3C 4B FC CD 85 */ bl DCFlushRange /* 8004FC00 0004BA40 7F A3 EB 78 */ mr r3, r29 /* 8004FC04 0004BA44 7F C4 F3 78 */ mr r4, r30 /* 8004FC08 0004BA48 4B FC CD 79 */ bl DCFlushRange .global lbl_8004FC0C lbl_8004FC0C: /* 8004FC0C 0004BA4C 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004FC10 0004BA50 40 82 00 14 */ bne lbl_8004FC24 /* 8004FC14 0004BA54 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004FC18 0004BA58 38 80 00 00 */ li r4, 0x0 /* 8004FC1C 0004BA5C 4B FF F1 95 */ bl __ios_Ipc2 /* 8004FC20 0004BA60 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004FC24 lbl_8004FC24: /* 8004FC24 0004BA64 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FC28 0004BA68 7F E3 FB 78 */ mr r3, r31 /* 8004FC2C 0004BA6C 4B FB 77 55 */ bl lbl_80007380 /* 8004FC30 0004BA70 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004FC34 0004BA74 7C 08 03 A6 */ mtlr r0 /* 8004FC38 0004BA78 38 21 00 30 */ addi r1, r1, 0x30 /* 8004FC3C 0004BA7C 4E 80 00 20 */ blr .global __ios_Ioctlv __ios_Ioctlv: /* 8004FC40 0004BA80 94 21 FF E0 */ stwu r1, -0x20(r1) /* 8004FC44 0004BA84 7C 08 02 A6 */ mflr r0 /* 8004FC48 0004BA88 90 01 00 24 */ stw r0, 0x24(r1) /* 8004FC4C 0004BA8C 39 61 00 20 */ addi r11, r1, 0x20 /* 8004FC50 0004BA90 4B FB 76 E9 */ bl lbl_80007338 /* 8004FC54 0004BA94 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FC58 0004BA98 7C 7D 1B 78 */ mr r29, r3 /* 8004FC5C 0004BA9C 7C FE 3B 78 */ mr r30, r7 /* 8004FC60 0004BAA0 3B E0 00 00 */ li r31, 0x0 /* 8004FC64 0004BAA4 40 82 00 0C */ bne lbl_8004FC70 /* 8004FC68 0004BAA8 3B E0 FF FC */ li r31, -0x4 /* 8004FC6C 0004BAAC 48 00 00 F4 */ b lbl_8004FD60 .global lbl_8004FC70 lbl_8004FC70: /* 8004FC70 0004BAB0 90 83 00 0C */ stw r4, 0xc(r3) /* 8004FC74 0004BAB4 54 BB 18 38 */ slwi r27, r5, 3 /* 8004FC78 0004BAB8 3B 40 00 00 */ li r26, 0x0 /* 8004FC7C 0004BABC 3B 80 00 00 */ li r28, 0x0 /* 8004FC80 0004BAC0 90 A3 00 10 */ stw r5, 0x10(r3) /* 8004FC84 0004BAC4 90 C3 00 14 */ stw r6, 0x14(r3) /* 8004FC88 0004BAC8 90 E3 00 18 */ stw r7, 0x18(r3) /* 8004FC8C 0004BACC 48 00 00 48 */ b lbl_8004FCD4 .global lbl_8004FC90 lbl_8004FC90: /* 8004FC90 0004BAD0 80 7D 00 18 */ lwz r3, 0x18(r29) /* 8004FC94 0004BAD4 7C 1C DA 14 */ add r0, r28, r27 /* 8004FC98 0004BAD8 7C 83 02 14 */ add r4, r3, r0 /* 8004FC9C 0004BADC 7C 63 00 2E */ lwzx r3, r3, r0 /* 8004FCA0 0004BAE0 80 84 00 04 */ lwz r4, 0x4(r4) /* 8004FCA4 0004BAE4 4B FC CC DD */ bl DCFlushRange /* 8004FCA8 0004BAE8 80 9D 00 18 */ lwz r4, 0x18(r29) /* 8004FCAC 0004BAEC 7C 7C DA 14 */ add r3, r28, r27 /* 8004FCB0 0004BAF0 7C A4 18 2E */ lwzx r5, r4, r3 /* 8004FCB4 0004BAF4 2C 05 00 00 */ cmpwi r5, 0x0 /* 8004FCB8 0004BAF8 41 82 00 0C */ beq lbl_8004FCC4 /* 8004FCBC 0004BAFC 3C 05 80 00 */ addis r0, r5, 0x8000 /* 8004FCC0 0004BB00 48 00 00 08 */ b lbl_8004FCC8 .global lbl_8004FCC4 lbl_8004FCC4: /* 8004FCC4 0004BB04 38 00 00 00 */ li r0, 0x0 .global lbl_8004FCC8 lbl_8004FCC8: /* 8004FCC8 0004BB08 7C 04 19 2E */ stwx r0, r4, r3 /* 8004FCCC 0004BB0C 3B 9C 00 08 */ addi r28, r28, 0x8 /* 8004FCD0 0004BB10 3B 5A 00 01 */ addi r26, r26, 0x1 .global lbl_8004FCD4 lbl_8004FCD4: /* 8004FCD4 0004BB14 80 1D 00 14 */ lwz r0, 0x14(r29) /* 8004FCD8 0004BB18 7C 1A 00 40 */ cmplw r26, r0 /* 8004FCDC 0004BB1C 41 80 FF B4 */ blt lbl_8004FC90 /* 8004FCE0 0004BB20 3B 60 00 00 */ li r27, 0x0 /* 8004FCE4 0004BB24 3B 80 00 00 */ li r28, 0x0 /* 8004FCE8 0004BB28 48 00 00 40 */ b lbl_8004FD28 .global lbl_8004FCEC lbl_8004FCEC: /* 8004FCEC 0004BB2C 80 1D 00 18 */ lwz r0, 0x18(r29) /* 8004FCF0 0004BB30 7C 80 E2 14 */ add r4, r0, r28 /* 8004FCF4 0004BB34 7C 7C 00 2E */ lwzx r3, r28, r0 /* 8004FCF8 0004BB38 80 84 00 04 */ lwz r4, 0x4(r4) /* 8004FCFC 0004BB3C 4B FC CC 85 */ bl DCFlushRange /* 8004FD00 0004BB40 80 7D 00 18 */ lwz r3, 0x18(r29) /* 8004FD04 0004BB44 7C 83 E0 2E */ lwzx r4, r3, r28 /* 8004FD08 0004BB48 2C 04 00 00 */ cmpwi r4, 0x0 /* 8004FD0C 0004BB4C 41 82 00 0C */ beq lbl_8004FD18 /* 8004FD10 0004BB50 3C 04 80 00 */ addis r0, r4, 0x8000 /* 8004FD14 0004BB54 48 00 00 08 */ b lbl_8004FD1C .global lbl_8004FD18 lbl_8004FD18: /* 8004FD18 0004BB58 38 00 00 00 */ li r0, 0x0 .global lbl_8004FD1C lbl_8004FD1C: /* 8004FD1C 0004BB5C 7C 03 E1 2E */ stwx r0, r3, r28 /* 8004FD20 0004BB60 3B 9C 00 08 */ addi r28, r28, 0x8 /* 8004FD24 0004BB64 3B 7B 00 01 */ addi r27, r27, 0x1 .global lbl_8004FD28 lbl_8004FD28: /* 8004FD28 0004BB68 80 9D 00 10 */ lwz r4, 0x10(r29) /* 8004FD2C 0004BB6C 7C 1B 20 40 */ cmplw r27, r4 /* 8004FD30 0004BB70 41 80 FF BC */ blt lbl_8004FCEC /* 8004FD34 0004BB74 80 1D 00 14 */ lwz r0, 0x14(r29) /* 8004FD38 0004BB78 80 7D 00 18 */ lwz r3, 0x18(r29) /* 8004FD3C 0004BB7C 7C 04 02 14 */ add r0, r4, r0 /* 8004FD40 0004BB80 54 04 18 38 */ slwi r4, r0, 3 /* 8004FD44 0004BB84 4B FC CC 3D */ bl DCFlushRange /* 8004FD48 0004BB88 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8004FD4C 0004BB8C 41 82 00 0C */ beq lbl_8004FD58 /* 8004FD50 0004BB90 3C 1E 80 00 */ addis r0, r30, 0x8000 /* 8004FD54 0004BB94 48 00 00 08 */ b lbl_8004FD5C .global lbl_8004FD58 lbl_8004FD58: /* 8004FD58 0004BB98 38 00 00 00 */ li r0, 0x0 .global lbl_8004FD5C lbl_8004FD5C: /* 8004FD5C 0004BB9C 90 1D 00 18 */ stw r0, 0x18(r29) .global lbl_8004FD60 lbl_8004FD60: /* 8004FD60 0004BBA0 39 61 00 20 */ addi r11, r1, 0x20 /* 8004FD64 0004BBA4 7F E3 FB 78 */ mr r3, r31 /* 8004FD68 0004BBA8 4B FB 76 1D */ bl lbl_80007384 /* 8004FD6C 0004BBAC 80 01 00 24 */ lwz r0, 0x24(r1) /* 8004FD70 0004BBB0 7C 08 03 A6 */ mtlr r0 /* 8004FD74 0004BBB4 38 21 00 20 */ addi r1, r1, 0x20 /* 8004FD78 0004BBB8 4E 80 00 20 */ blr /* 8004FD7C 0004BBBC 00 00 00 00 */ .4byte 0x00000000 .global IOS_IoctlvAsync IOS_IoctlvAsync: /* 8004FD80 0004BBC0 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004FD84 0004BBC4 7C 08 02 A6 */ mflr r0 /* 8004FD88 0004BBC8 90 01 00 34 */ stw r0, 0x34(r1) /* 8004FD8C 0004BBCC 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FD90 0004BBD0 4B FB 75 A1 */ bl lbl_80007330 /* 8004FD94 0004BBD4 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004FD98 0004BBD8 7C 78 1B 78 */ mr r24, r3 /* 8004FD9C 0004BBDC 7C 99 23 78 */ mr r25, r4 /* 8004FDA0 0004BBE0 7C BA 2B 78 */ mr r26, r5 /* 8004FDA4 0004BBE4 7C DB 33 78 */ mr r27, r6 /* 8004FDA8 0004BBE8 7C FC 3B 78 */ mr r28, r7 /* 8004FDAC 0004BBEC 7D 1D 43 78 */ mr r29, r8 /* 8004FDB0 0004BBF0 7D 3E 4B 78 */ mr r30, r9 /* 8004FDB4 0004BBF4 3B E0 00 00 */ li r31, 0x0 /* 8004FDB8 0004BBF8 40 82 00 0C */ bne lbl_8004FDC4 /* 8004FDBC 0004BBFC 3B E0 FF FC */ li r31, -0x4 /* 8004FDC0 0004BC00 48 00 00 4C */ b lbl_8004FE0C .global lbl_8004FDC4 lbl_8004FDC4: /* 8004FDC4 0004BC04 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004FDC8 0004BC08 38 80 00 40 */ li r4, 0x40 /* 8004FDCC 0004BC0C 38 A0 00 20 */ li r5, 0x20 /* 8004FDD0 0004BC10 48 00 07 E1 */ bl iosAllocAligned /* 8004FDD4 0004BC14 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FDD8 0004BC18 90 61 00 08 */ stw r3, 0x8(r1) /* 8004FDDC 0004BC1C 40 82 00 0C */ bne lbl_8004FDE8 /* 8004FDE0 0004BC20 3B E0 FF EA */ li r31, -0x16 /* 8004FDE4 0004BC24 48 00 00 28 */ b lbl_8004FE0C .global lbl_8004FDE8 lbl_8004FDE8: /* 8004FDE8 0004BC28 93 A3 00 20 */ stw r29, 0x20(r3) /* 8004FDEC 0004BC2C 38 A0 00 00 */ li r5, 0x0 /* 8004FDF0 0004BC30 38 00 00 07 */ li r0, 0x7 /* 8004FDF4 0004BC34 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FDF8 0004BC38 93 C4 00 24 */ stw r30, 0x24(r4) /* 8004FDFC 0004BC3C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FE00 0004BC40 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004FE04 0004BC44 90 03 00 00 */ stw r0, 0x0(r3) /* 8004FE08 0004BC48 93 03 00 08 */ stw r24, 0x8(r3) .global lbl_8004FE0C lbl_8004FE0C: /* 8004FE0C 0004BC4C 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004FE10 0004BC50 40 82 00 38 */ bne lbl_8004FE48 /* 8004FE14 0004BC54 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004FE18 0004BC58 7F 24 CB 78 */ mr r4, r25 /* 8004FE1C 0004BC5C 7F 45 D3 78 */ mr r5, r26 /* 8004FE20 0004BC60 7F 66 DB 78 */ mr r6, r27 /* 8004FE24 0004BC64 7F 87 E3 78 */ mr r7, r28 /* 8004FE28 0004BC68 4B FF FE 19 */ bl __ios_Ioctlv /* 8004FE2C 0004BC6C 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FE30 0004BC70 7C 7F 1B 78 */ mr r31, r3 /* 8004FE34 0004BC74 40 82 00 14 */ bne lbl_8004FE48 /* 8004FE38 0004BC78 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004FE3C 0004BC7C 7F A4 EB 78 */ mr r4, r29 /* 8004FE40 0004BC80 4B FF EF 71 */ bl __ios_Ipc2 /* 8004FE44 0004BC84 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004FE48 lbl_8004FE48: /* 8004FE48 0004BC88 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FE4C 0004BC8C 7F E3 FB 78 */ mr r3, r31 /* 8004FE50 0004BC90 4B FB 75 2D */ bl lbl_8000737C /* 8004FE54 0004BC94 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004FE58 0004BC98 7C 08 03 A6 */ mtlr r0 /* 8004FE5C 0004BC9C 38 21 00 30 */ addi r1, r1, 0x30 /* 8004FE60 0004BCA0 4E 80 00 20 */ blr /* 8004FE64 0004BCA4 00 00 00 00 */ .4byte 0x00000000 /* 8004FE68 0004BCA8 00 00 00 00 */ .4byte 0x00000000 /* 8004FE6C 0004BCAC 00 00 00 00 */ .4byte 0x00000000 .global IOS_Ioctlv IOS_Ioctlv: /* 8004FE70 0004BCB0 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004FE74 0004BCB4 7C 08 02 A6 */ mflr r0 /* 8004FE78 0004BCB8 90 01 00 34 */ stw r0, 0x34(r1) /* 8004FE7C 0004BCBC 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FE80 0004BCC0 4B FB 74 B9 */ bl lbl_80007338 /* 8004FE84 0004BCC4 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004FE88 0004BCC8 7C 7A 1B 78 */ mr r26, r3 /* 8004FE8C 0004BCCC 7C 9B 23 78 */ mr r27, r4 /* 8004FE90 0004BCD0 7C BC 2B 78 */ mr r28, r5 /* 8004FE94 0004BCD4 7C DD 33 78 */ mr r29, r6 /* 8004FE98 0004BCD8 7C FE 3B 78 */ mr r30, r7 /* 8004FE9C 0004BCDC 3B E0 00 00 */ li r31, 0x0 /* 8004FEA0 0004BCE0 40 82 00 0C */ bne lbl_8004FEAC /* 8004FEA4 0004BCE4 3B E0 FF FC */ li r31, -0x4 /* 8004FEA8 0004BCE8 48 00 00 4C */ b lbl_8004FEF4 .global lbl_8004FEAC lbl_8004FEAC: /* 8004FEAC 0004BCEC 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004FEB0 0004BCF0 38 80 00 40 */ li r4, 0x40 /* 8004FEB4 0004BCF4 38 A0 00 20 */ li r5, 0x20 /* 8004FEB8 0004BCF8 48 00 06 F9 */ bl iosAllocAligned /* 8004FEBC 0004BCFC 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FEC0 0004BD00 90 61 00 08 */ stw r3, 0x8(r1) /* 8004FEC4 0004BD04 40 82 00 0C */ bne lbl_8004FED0 /* 8004FEC8 0004BD08 3B E0 FF EA */ li r31, -0x16 /* 8004FECC 0004BD0C 48 00 00 28 */ b lbl_8004FEF4 .global lbl_8004FED0 lbl_8004FED0: /* 8004FED0 0004BD10 38 A0 00 00 */ li r5, 0x0 /* 8004FED4 0004BD14 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004FED8 0004BD18 38 00 00 07 */ li r0, 0x7 /* 8004FEDC 0004BD1C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FEE0 0004BD20 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004FEE4 0004BD24 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FEE8 0004BD28 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004FEEC 0004BD2C 90 03 00 00 */ stw r0, 0x0(r3) /* 8004FEF0 0004BD30 93 43 00 08 */ stw r26, 0x8(r3) .global lbl_8004FEF4 lbl_8004FEF4: /* 8004FEF4 0004BD34 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8004FEF8 0004BD38 40 82 00 38 */ bne lbl_8004FF30 /* 8004FEFC 0004BD3C 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004FF00 0004BD40 7F 64 DB 78 */ mr r4, r27 /* 8004FF04 0004BD44 7F 85 E3 78 */ mr r5, r28 /* 8004FF08 0004BD48 7F A6 EB 78 */ mr r6, r29 /* 8004FF0C 0004BD4C 7F C7 F3 78 */ mr r7, r30 /* 8004FF10 0004BD50 4B FF FD 31 */ bl __ios_Ioctlv /* 8004FF14 0004BD54 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FF18 0004BD58 7C 7F 1B 78 */ mr r31, r3 /* 8004FF1C 0004BD5C 40 82 00 14 */ bne lbl_8004FF30 /* 8004FF20 0004BD60 80 61 00 08 */ lwz r3, 0x8(r1) /* 8004FF24 0004BD64 38 80 00 00 */ li r4, 0x0 /* 8004FF28 0004BD68 4B FF EE 89 */ bl __ios_Ipc2 /* 8004FF2C 0004BD6C 7C 7F 1B 78 */ mr r31, r3 .global lbl_8004FF30 lbl_8004FF30: /* 8004FF30 0004BD70 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FF34 0004BD74 7F E3 FB 78 */ mr r3, r31 /* 8004FF38 0004BD78 4B FB 74 4D */ bl lbl_80007384 /* 8004FF3C 0004BD7C 80 01 00 34 */ lwz r0, 0x34(r1) /* 8004FF40 0004BD80 7C 08 03 A6 */ mtlr r0 /* 8004FF44 0004BD84 38 21 00 30 */ addi r1, r1, 0x30 /* 8004FF48 0004BD88 4E 80 00 20 */ blr /* 8004FF4C 0004BD8C 00 00 00 00 */ .4byte 0x00000000 .global IOS_IoctlvReboot IOS_IoctlvReboot: /* 8004FF50 0004BD90 94 21 FF D0 */ stwu r1, -0x30(r1) /* 8004FF54 0004BD94 7C 08 02 A6 */ mflr r0 /* 8004FF58 0004BD98 90 01 00 34 */ stw r0, 0x34(r1) /* 8004FF5C 0004BD9C 39 61 00 30 */ addi r11, r1, 0x30 /* 8004FF60 0004BDA0 4B FB 73 D9 */ bl lbl_80007338 /* 8004FF64 0004BDA4 7C 7A 1B 78 */ mr r26, r3 /* 8004FF68 0004BDA8 7C 9B 23 78 */ mr r27, r4 /* 8004FF6C 0004BDAC 7C BC 2B 78 */ mr r28, r5 /* 8004FF70 0004BDB0 7C DE 33 78 */ mr r30, r6 /* 8004FF74 0004BDB4 7C FD 3B 78 */ mr r29, r7 /* 8004FF78 0004BDB8 4B FD 18 A9 */ bl OSDisableInterrupts /* 8004FF7C 0004BDBC 80 0D E9 10 */ lwz r0, __relnchFl@sda21(r13) /* 8004FF80 0004BDC0 2C 00 00 00 */ cmpwi r0, 0x0 /* 8004FF84 0004BDC4 41 82 00 10 */ beq lbl_8004FF94 /* 8004FF88 0004BDC8 4B FD 18 D9 */ bl OSRestoreInterrupts /* 8004FF8C 0004BDCC 3B E0 FF F6 */ li r31, -0xa /* 8004FF90 0004BDD0 48 00 02 C8 */ b lbl_80050258 .global lbl_8004FF94 lbl_8004FF94: /* 8004FF94 0004BDD4 38 00 00 01 */ li r0, 0x1 /* 8004FF98 0004BDD8 90 0D E9 10 */ stw r0, __relnchFl@sda21(r13) /* 8004FF9C 0004BDDC 4B FD 18 C5 */ bl OSRestoreInterrupts /* 8004FFA0 0004BDE0 34 01 00 08 */ addic. r0, r1, 0x8 /* 8004FFA4 0004BDE4 3B E0 00 00 */ li r31, 0x0 /* 8004FFA8 0004BDE8 40 82 00 0C */ bne lbl_8004FFB4 /* 8004FFAC 0004BDEC 3B E0 FF FC */ li r31, -0x4 /* 8004FFB0 0004BDF0 48 00 00 4C */ b lbl_8004FFFC .global lbl_8004FFB4 lbl_8004FFB4: /* 8004FFB4 0004BDF4 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 8004FFB8 0004BDF8 38 80 00 40 */ li r4, 0x40 /* 8004FFBC 0004BDFC 38 A0 00 20 */ li r5, 0x20 /* 8004FFC0 0004BE00 48 00 05 F1 */ bl iosAllocAligned /* 8004FFC4 0004BE04 2C 03 00 00 */ cmpwi r3, 0x0 /* 8004FFC8 0004BE08 90 61 00 08 */ stw r3, 0x8(r1) /* 8004FFCC 0004BE0C 40 82 00 0C */ bne lbl_8004FFD8 /* 8004FFD0 0004BE10 3B E0 FF EA */ li r31, -0x16 /* 8004FFD4 0004BE14 48 00 00 28 */ b lbl_8004FFFC .global lbl_8004FFD8 lbl_8004FFD8: /* 8004FFD8 0004BE18 38 A0 00 00 */ li r5, 0x0 /* 8004FFDC 0004BE1C 90 A3 00 20 */ stw r5, 0x20(r3) /* 8004FFE0 0004BE20 38 00 00 07 */ li r0, 0x7 /* 8004FFE4 0004BE24 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FFE8 0004BE28 90 A4 00 24 */ stw r5, 0x24(r4) /* 8004FFEC 0004BE2C 80 81 00 08 */ lwz r4, 0x8(r1) /* 8004FFF0 0004BE30 90 A4 00 28 */ stw r5, 0x28(r4) /* 8004FFF4 0004BE34 90 03 00 00 */ stw r0, 0x0(r3) /* 8004FFF8 0004BE38 93 43 00 08 */ stw r26, 0x8(r3) .global lbl_8004FFFC lbl_8004FFFC: /* 8004FFFC 0004BE3C 2C 1F 00 00 */ cmpwi r31, 0x0 /* 80050000 0004BE40 40 82 02 30 */ bne lbl_80050230 /* 80050004 0004BE44 80 61 00 08 */ lwz r3, 0x8(r1) /* 80050008 0004BE48 38 00 00 01 */ li r0, 0x1 /* 8005000C 0004BE4C 90 6D E9 18 */ stw r3, __relnchRpcSave@sda21(r13) /* 80050010 0004BE50 7F 64 DB 78 */ mr r4, r27 /* 80050014 0004BE54 7F 85 E3 78 */ mr r5, r28 /* 80050018 0004BE58 7F C6 F3 78 */ mr r6, r30 /* 8005001C 0004BE5C 90 03 00 28 */ stw r0, 0x28(r3) /* 80050020 0004BE60 7F A7 EB 78 */ mr r7, r29 /* 80050024 0004BE64 80 61 00 08 */ lwz r3, 0x8(r1) /* 80050028 0004BE68 4B FF FC 19 */ bl __ios_Ioctlv /* 8005002C 0004BE6C 2C 03 00 00 */ cmpwi r3, 0x0 /* 80050030 0004BE70 7C 7F 1B 78 */ mr r31, r3 /* 80050034 0004BE74 40 82 01 FC */ bne lbl_80050230 /* 80050038 0004BE78 3F A0 80 4C */ lis r29, __rpcBuf@ha /* 8005003C 0004BE7C 80 81 00 08 */ lwz r4, 0x8(r1) /* 80050040 0004BE80 38 7D DE 20 */ addi r3, r29, __rpcBuf@l /* 80050044 0004BE84 38 A0 00 40 */ li r5, 0x40 /* 80050048 0004BE88 4B FB 3F B9 */ bl memcpy /* 8005004C 0004BE8C 38 7D DE 20 */ addi r3, r29, -0x21e0 /* 80050050 0004BE90 90 6D E9 14 */ stw r3, __relnchRpc@sda21(r13) /* 80050054 0004BE94 83 A1 00 08 */ lwz r29, 0x8(r1) /* 80050058 0004BE98 38 63 00 2C */ addi r3, r3, 0x2c /* 8005005C 0004BE9C 4B FD 46 E5 */ bl OSInitThreadQueue /* 80050060 0004BEA0 7F A3 EB 78 */ mr r3, r29 /* 80050064 0004BEA4 38 80 00 20 */ li r4, 0x20 /* 80050068 0004BEA8 4B FC C9 19 */ bl DCFlushRange /* 8005006C 0004BEAC 4B FD 17 B5 */ bl OSDisableInterrupts /* 80050070 0004BEB0 3C 80 80 4C */ lis r4, __responses@ha /* 80050074 0004BEB4 7C 7E 1B 78 */ mr r30, r3 /* 80050078 0004BEB8 38 64 DD 20 */ addi r3, r4, __responses@l /* 8005007C 0004BEBC 80 04 DD 20 */ lwz r0, -0x22e0(r4) /* 80050080 0004BEC0 80 63 00 04 */ lwz r3, 0x4(r3) /* 80050084 0004BEC4 3B E0 00 00 */ li r31, 0x0 /* 80050088 0004BEC8 7C 03 00 40 */ cmplw r3, r0 /* 8005008C 0004BECC 40 80 00 10 */ bge lbl_8005009C /* 80050090 0004BED0 20 00 00 00 */ subfic r0, r0, 0x0 /* 80050094 0004BED4 7C 00 1A 14 */ add r0, r0, r3 /* 80050098 0004BED8 48 00 00 20 */ b lbl_800500B8 .global lbl_8005009C lbl_8005009C: /* 8005009C 0004BEDC 7C 80 18 50 */ subf r4, r0, r3 /* 800500A0 0004BEE0 38 60 00 30 */ li r3, 0x30 /* 800500A4 0004BEE4 38 04 FF D0 */ addi r0, r4, -0x30 /* 800500A8 0004BEE8 7C 83 1B 38 */ orc r3, r4, r3 /* 800500AC 0004BEEC 54 00 F8 7E */ srwi r0, r0, 1 /* 800500B0 0004BEF0 7C 00 18 50 */ subf r0, r0, r3 /* 800500B4 0004BEF4 54 00 0F FE */ srwi r0, r0, 31 .global lbl_800500B8 lbl_800500B8: /* 800500B8 0004BEF8 2C 00 00 00 */ cmpwi r0, 0x0 /* 800500BC 0004BEFC 41 82 00 0C */ beq lbl_800500C8 /* 800500C0 0004BF00 3B E0 FF F8 */ li r31, -0x8 /* 800500C4 0004BF04 48 00 00 58 */ b lbl_8005011C .global lbl_800500C8 lbl_800500C8: /* 800500C8 0004BF08 3C E0 80 4C */ lis r7, __responses@ha /* 800500CC 0004BF0C 3C 80 AA AB */ lis r4, 0xAAAAAAAB@ha /* 800500D0 0004BF10 38 E7 DD 20 */ addi r7, r7, __responses@l /* 800500D4 0004BF14 7F A3 EB 78 */ mr r3, r29 /* 800500D8 0004BF18 80 A7 00 0C */ lwz r5, 0xc(r7) /* 800500DC 0004BF1C 38 04 AA AB */ addi r0, r4, 0xAAAAAAAB@l /* 800500E0 0004BF20 54 A4 10 3A */ slwi r4, r5, 2 /* 800500E4 0004BF24 7C 87 22 14 */ add r4, r7, r4 /* 800500E8 0004BF28 93 A4 00 10 */ stw r29, 0x10(r4) /* 800500EC 0004BF2C 80 A7 00 0C */ lwz r5, 0xc(r7) /* 800500F0 0004BF30 80 87 00 04 */ lwz r4, 0x4(r7) /* 800500F4 0004BF34 38 C5 00 01 */ addi r6, r5, 0x1 /* 800500F8 0004BF38 7C A0 30 16 */ mulhwu r5, r0, r6 /* 800500FC 0004BF3C 38 04 00 01 */ addi r0, r4, 0x1 /* 80050100 0004BF40 90 07 00 04 */ stw r0, 0x4(r7) /* 80050104 0004BF44 54 A5 D9 7E */ srwi r5, r5, 5 /* 80050108 0004BF48 1C 05 00 30 */ mulli r0, r5, 0x30 /* 8005010C 0004BF4C 7C 00 30 50 */ subf r0, r0, r6 /* 80050110 0004BF50 90 07 00 0C */ stw r0, 0xc(r7) /* 80050114 0004BF54 80 9D 00 08 */ lwz r4, 0x8(r29) /* 80050118 0004BF58 48 00 07 E9 */ bl IPCiProfQueueReq .global lbl_8005011C lbl_8005011C: /* 8005011C 0004BF5C 2C 1F 00 00 */ cmpwi r31, 0x0 /* 80050120 0004BF60 41 82 00 10 */ beq lbl_80050130 /* 80050124 0004BF64 7F C3 F3 78 */ mr r3, r30 /* 80050128 0004BF68 4B FD 17 39 */ bl OSRestoreInterrupts /* 8005012C 0004BF6C 48 00 01 04 */ b lbl_80050230 .global lbl_80050130 lbl_80050130: /* 80050130 0004BF70 80 0D 83 88 */ lwz r0, __mailboxAck@sda21(r13) /* 80050134 0004BF74 2C 00 00 00 */ cmpwi r0, 0x0 /* 80050138 0004BF78 40 81 00 DC */ ble lbl_80050214 /* 8005013C 0004BF7C 3C 80 80 4C */ lis r4, __responses@ha /* 80050140 0004BF80 38 64 DD 20 */ addi r3, r4, __responses@l /* 80050144 0004BF84 80 04 DD 20 */ lwz r0, -0x22e0(r4) /* 80050148 0004BF88 80 63 00 04 */ lwz r3, 0x4(r3) /* 8005014C 0004BF8C 7C 03 00 40 */ cmplw r3, r0 /* 80050150 0004BF90 40 80 00 10 */ bge lbl_80050160 /* 80050154 0004BF94 20 00 00 00 */ subfic r0, r0, 0x0 /* 80050158 0004BF98 7C 00 1A 14 */ add r0, r0, r3 /* 8005015C 0004BF9C 48 00 00 10 */ b lbl_8005016C .global lbl_80050160 lbl_80050160: /* 80050160 0004BFA0 7C 00 18 50 */ subf r0, r0, r3 /* 80050164 0004BFA4 7C 00 00 34 */ cntlzw r0, r0 /* 80050168 0004BFA8 54 00 D9 7E */ srwi r0, r0, 5 .global lbl_8005016C lbl_8005016C: /* 8005016C 0004BFAC 2C 00 00 00 */ cmpwi r0, 0x0 /* 80050170 0004BFB0 40 82 00 A4 */ bne lbl_80050214 /* 80050174 0004BFB4 3C 60 80 4C */ lis r3, __responses@ha /* 80050178 0004BFB8 38 63 DD 20 */ addi r3, r3, __responses@l /* 8005017C 0004BFBC 80 03 00 08 */ lwz r0, 0x8(r3) /* 80050180 0004BFC0 54 00 10 3A */ slwi r0, r0, 2 /* 80050184 0004BFC4 7C 63 02 14 */ add r3, r3, r0 /* 80050188 0004BFC8 80 83 00 10 */ lwz r4, 0x10(r3) /* 8005018C 0004BFCC 2C 04 00 00 */ cmpwi r4, 0x0 /* 80050190 0004BFD0 41 82 00 84 */ beq lbl_80050214 /* 80050194 0004BFD4 80 04 00 28 */ lwz r0, 0x28(r4) /* 80050198 0004BFD8 2C 00 00 00 */ cmpwi r0, 0x0 /* 8005019C 0004BFDC 41 82 00 10 */ beq lbl_800501AC /* 800501A0 0004BFE0 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 800501A4 0004BFE4 38 03 FF FF */ addi r0, r3, -0x1 /* 800501A8 0004BFE8 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) .global lbl_800501AC lbl_800501AC: /* 800501AC 0004BFEC 3C 84 80 00 */ addis r4, r4, 0x8000 /* 800501B0 0004BFF0 38 60 00 00 */ li r3, 0x0 /* 800501B4 0004BFF4 4B FF E6 2D */ bl IPCWriteReg /* 800501B8 0004BFF8 3D 00 80 4C */ lis r8, __responses@ha /* 800501BC 0004BFFC 3C 60 AA AB */ lis r3, 0xAAAAAAAB@ha /* 800501C0 0004C000 38 E8 DD 20 */ addi r7, r8, __responses@l /* 800501C4 0004C004 80 88 DD 20 */ lwz r4, -0x22e0(r8) /* 800501C8 0004C008 80 C7 00 08 */ lwz r6, 0x8(r7) /* 800501CC 0004C00C 38 A3 AA AB */ addi r5, r3, 0xAAAAAAAB@l /* 800501D0 0004C010 38 04 00 01 */ addi r0, r4, 0x1 /* 800501D4 0004C014 80 6D 83 88 */ lwz r3, __mailboxAck@sda21(r13) /* 800501D8 0004C018 38 C6 00 01 */ addi r6, r6, 0x1 /* 800501DC 0004C01C 90 08 DD 20 */ stw r0, -0x22e0(r8) /* 800501E0 0004C020 7C 85 30 16 */ mulhwu r4, r5, r6 /* 800501E4 0004C024 38 03 FF FF */ addi r0, r3, -0x1 /* 800501E8 0004C028 90 0D 83 88 */ stw r0, __mailboxAck@sda21(r13) /* 800501EC 0004C02C 38 60 00 01 */ li r3, 0x1 /* 800501F0 0004C030 54 84 D9 7E */ srwi r4, r4, 5 /* 800501F4 0004C034 1C 04 00 30 */ mulli r0, r4, 0x30 /* 800501F8 0004C038 7C 00 30 50 */ subf r0, r0, r6 /* 800501FC 0004C03C 90 07 00 08 */ stw r0, 0x8(r7) /* 80050200 0004C040 4B FF E5 D1 */ bl IPCReadReg /* 80050204 0004C044 54 60 06 B6 */ rlwinm r0, r3, 0, 26, 27 /* 80050208 0004C048 38 60 00 01 */ li r3, 0x1 /* 8005020C 0004C04C 60 04 00 01 */ ori r4, r0, 0x1 /* 80050210 0004C050 4B FF E5 D1 */ bl IPCWriteReg .global lbl_80050214 lbl_80050214: /* 80050214 0004C054 80 6D E9 14 */ lwz r3, __relnchRpc@sda21(r13) /* 80050218 0004C058 38 63 00 2C */ addi r3, r3, 0x2c /* 8005021C 0004C05C 4B FD 55 F5 */ bl OSSleepThread /* 80050220 0004C060 7F C3 F3 78 */ mr r3, r30 /* 80050224 0004C064 4B FD 16 3D */ bl OSRestoreInterrupts /* 80050228 0004C068 80 6D E9 14 */ lwz r3, __relnchRpc@sda21(r13) /* 8005022C 0004C06C 83 E3 00 04 */ lwz r31, 0x4(r3) .global lbl_80050230 lbl_80050230: /* 80050230 0004C070 80 81 00 08 */ lwz r4, 0x8(r1) /* 80050234 0004C074 38 00 00 00 */ li r0, 0x0 /* 80050238 0004C078 90 0D E9 10 */ stw r0, __relnchFl@sda21(r13) /* 8005023C 0004C07C 2C 04 00 00 */ cmpwi r4, 0x0 /* 80050240 0004C080 90 0D E9 18 */ stw r0, __relnchRpcSave@sda21(r13) /* 80050244 0004C084 41 82 00 14 */ beq lbl_80050258 /* 80050248 0004C088 2C 1F 00 00 */ cmpwi r31, 0x0 /* 8005024C 0004C08C 41 82 00 0C */ beq lbl_80050258 /* 80050250 0004C090 80 6D 83 8C */ lwz r3, hid@sda21(r13) /* 80050254 0004C094 48 00 03 6D */ bl iosFree .global lbl_80050258 lbl_80050258: /* 80050258 0004C098 39 61 00 30 */ addi r11, r1, 0x30 /* 8005025C 0004C09C 7F E3 FB 78 */ mr r3, r31 /* 80050260 0004C0A0 4B FB 71 25 */ bl lbl_80007384 /* 80050264 0004C0A4 80 01 00 34 */ lwz r0, 0x34(r1) /* 80050268 0004C0A8 7C 08 03 A6 */ mtlr r0 /* 8005026C 0004C0AC 38 21 00 30 */ addi r1, r1, 0x30 /* 80050270 0004C0B0 4E 80 00 20 */ blr /* 80050274 0004C0B4 00 00 00 00 */ .4byte 0x00000000 /* 80050278 0004C0B8 00 00 00 00 */ .4byte 0x00000000 /* 8005027C 0004C0BC 00 00 00 00 */ .4byte 0x00000000 .include "macros.inc" .section .bss, "", @nobits # 0x80496700 - 0x80556420 ; 0x000BFD20 .global __responses __responses: .skip 0xD0 .global __timeout_alarm __timeout_alarm: .skip 0x30 .global __rpcBuf __rpcBuf: .skip 0x40 .include "macros.inc" .section .sdata, "wa" # 0x80556420 - 0x8055C6E0 ; 0x000062C0 .global __mailboxAck __mailboxAck: .4byte 0x00000001 .global hid hid: .4byte 0xFFFFFFFF .include "macros.inc" .section .sbss, "", @nobits # 0x8055C6E0 - 0x8055DF80 ; 0x000018A0 .global __relnchFl __relnchFl: .skip 0x4 .global __relnchRpc __relnchRpc: .skip 0x4 .global __relnchRpcSave __relnchRpcSave: .skip 0x4 .global "@LOCAL@IPCCltInit__Fv@initialized" "@LOCAL@IPCCltInit__Fv@initialized": .skip 0x4