.include "macros.inc" .section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860 .global uusb_CloseDeviceCB uusb_CloseDeviceCB: /* 80076B30 00072970 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80076B34 00072974 7C 08 02 A6 */ mflr r0 /* 80076B38 00072978 3C 80 80 4F */ lis r4, usb@ha /* 80076B3C 0007297C 90 01 00 24 */ stw r0, 0x24(r1) /* 80076B40 00072980 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80076B44 00072984 3B E4 21 C0 */ addi r31, r4, usb@l /* 80076B48 00072988 93 C1 00 18 */ stw r30, 0x18(r1) /* 80076B4C 0007298C 3B C0 00 00 */ li r30, 0x0 /* 80076B50 00072990 93 A1 00 14 */ stw r29, 0x14(r1) /* 80076B54 00072994 7C 7D 1B 78 */ mr r29, r3 /* 80076B58 00072998 93 C4 21 C0 */ stw r30, 0x21c0(r4) /* 80076B5C 0007299C 9B DF 00 10 */ stb r30, 0x10(r31) /* 80076B60 000729A0 9B DF 00 11 */ stb r30, 0x11(r31) /* 80076B64 000729A4 9B DF 00 12 */ stb r30, 0x12(r31) /* 80076B68 000729A8 9B DF 00 13 */ stb r30, 0x13(r31) /* 80076B6C 000729AC 9B CD EA C0 */ stb r30, uusb_g_usb_devid_found@sda21(r13) /* 80076B70 000729B0 4B FD D2 81 */ bl __wpadNoAlloc /* 80076B74 000729B4 4B FF F8 6D */ bl GKI_disable /* 80076B78 000729B8 38 00 00 05 */ li r0, 0x5 /* 80076B7C 000729BC 98 1F 00 29 */ stb r0, 0x29(r31) /* 80076B80 000729C0 9B DF 00 28 */ stb r30, 0x28(r31) /* 80076B84 000729C4 9B CD EA C1 */ stb r30, uusb_g_trace_state_initialized@sda21(r13) /* 80076B88 000729C8 4B FF F8 29 */ bl GKI_enable /* 80076B8C 000729CC 81 9F 00 20 */ lwz r12, 0x20(r31) /* 80076B90 000729D0 2C 0C 00 00 */ cmpwi r12, 0x0 /* 80076B94 000729D4 41 82 00 14 */ beq lbl_80076BA8 /* 80076B98 000729D8 7F A4 07 74 */ extsb r4, r29 /* 80076B9C 000729DC 38 60 00 04 */ li r3, 0x4 /* 80076BA0 000729E0 7D 89 03 A6 */ mtctr r12 /* 80076BA4 000729E4 4E 80 04 21 */ bctrl .global lbl_80076BA8 lbl_80076BA8: /* 80076BA8 000729E8 80 01 00 24 */ lwz r0, 0x24(r1) /* 80076BAC 000729EC 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80076BB0 000729F0 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80076BB4 000729F4 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80076BB8 000729F8 7C 08 03 A6 */ mtlr r0 /* 80076BBC 000729FC 38 21 00 20 */ addi r1, r1, 0x20 /* 80076BC0 00072A00 4E 80 00 20 */ blr /* 80076BC4 00072A04 00 00 00 00 */ .4byte 0x00000000 /* 80076BC8 00072A08 00 00 00 00 */ .4byte 0x00000000 /* 80076BCC 00072A0C 00 00 00 00 */ .4byte 0x00000000 .global uusb_ReadIntrDataCB uusb_ReadIntrDataCB: /* 80076BD0 00072A10 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80076BD4 00072A14 7C 08 02 A6 */ mflr r0 /* 80076BD8 00072A18 38 A0 00 00 */ li r5, 0x0 /* 80076BDC 00072A1C 90 01 00 24 */ stw r0, 0x24(r1) /* 80076BE0 00072A20 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80076BE4 00072A24 7C 7F 1B 78 */ mr r31, r3 /* 80076BE8 00072A28 93 C1 00 18 */ stw r30, 0x18(r1) /* 80076BEC 00072A2C 3F C0 80 4F */ lis r30, usb@ha /* 80076BF0 00072A30 3B DE 21 C0 */ addi r30, r30, usb@l /* 80076BF4 00072A34 93 A1 00 14 */ stw r29, 0x14(r1) /* 80076BF8 00072A38 7C 9D 23 78 */ mr r29, r4 /* 80076BFC 00072A3C 93 81 00 10 */ stw r28, 0x10(r1) /* 80076C00 00072A40 88 1E 00 29 */ lbz r0, 0x29(r30) /* 80076C04 00072A44 98 BE 00 2B */ stb r5, 0x2b(r30) /* 80076C08 00072A48 28 00 00 02 */ cmplwi r0, 0x2 /* 80076C0C 00072A4C 41 82 00 20 */ beq lbl_80076C2C /* 80076C10 00072A50 7F A3 EB 78 */ mr r3, r29 /* 80076C14 00072A54 4B FF E2 FD */ bl GKI_freebuf /* 80076C18 00072A58 88 7E 00 1C */ lbz r3, 0x1c(r30) /* 80076C1C 00072A5C 4B FF EE A5 */ bl GKI_delete_pool /* 80076C20 00072A60 38 00 00 FF */ li r0, 0xff /* 80076C24 00072A64 98 1E 00 1C */ stb r0, 0x1c(r30) /* 80076C28 00072A68 48 00 01 30 */ b lbl_80076D58 .global lbl_80076C2C lbl_80076C2C: /* 80076C2C 00072A6C 38 00 00 00 */ li r0, 0x0 /* 80076C30 00072A70 7C 04 00 40 */ cmplw r4, r0 /* 80076C34 00072A74 41 82 00 94 */ beq lbl_80076CC8 /* 80076C38 00072A78 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076C3C 00072A7C 41 81 00 10 */ bgt lbl_80076C4C /* 80076C40 00072A80 7F A3 EB 78 */ mr r3, r29 /* 80076C44 00072A84 4B FF E2 CD */ bl GKI_freebuf /* 80076C48 00072A88 48 00 00 80 */ b lbl_80076CC8 .global lbl_80076C4C lbl_80076C4C: /* 80076C4C 00072A8C 38 60 00 02 */ li r3, 0x2 /* 80076C50 00072A90 4B FF E1 D1 */ bl GKI_getpoolbuf /* 80076C54 00072A94 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076C58 00072A98 7C 7C 1B 78 */ mr r28, r3 /* 80076C5C 00072A9C 40 82 00 10 */ bne lbl_80076C6C /* 80076C60 00072AA0 7F A3 EB 78 */ mr r3, r29 /* 80076C64 00072AA4 4B FF E2 AD */ bl GKI_freebuf /* 80076C68 00072AA8 48 00 00 60 */ b lbl_80076CC8 .global lbl_80076C6C lbl_80076C6C: /* 80076C6C 00072AAC A0 1D 00 04 */ lhz r0, 0x4(r29) /* 80076C70 00072AB0 38 A0 10 00 */ li r5, 0x1000 /* 80076C74 00072AB4 57 E4 04 3E */ clrlwi r4, r31, 16 /* 80076C78 00072AB8 B0 BD 00 00 */ sth r5, 0x0(r29) /* 80076C7C 00072ABC 7C A4 02 14 */ add r5, r4, r0 /* 80076C80 00072AC0 38 05 00 08 */ addi r0, r5, 0x8 /* 80076C84 00072AC4 B3 FD 00 02 */ sth r31, 0x2(r29) /* 80076C88 00072AC8 54 05 00 3A */ clrrwi r5, r0, 2 /* 80076C8C 00072ACC 7F A4 EB 78 */ mr r4, r29 /* 80076C90 00072AD0 38 A5 00 04 */ addi r5, r5, 0x4 /* 80076C94 00072AD4 4B F8 D3 6D */ bl memcpy /* 80076C98 00072AD8 3C A0 80 4F */ lis r5, __uusb_ppc_stack1@ha /* 80076C9C 00072ADC 3C E0 80 07 */ lis r7, bta_ci_hci_msg_handler@ha /* 80076CA0 00072AE0 38 A5 22 20 */ addi r5, r5, __uusb_ppc_stack1@l /* 80076CA4 00072AE4 7F 83 E3 78 */ mr r3, r28 /* 80076CA8 00072AE8 39 05 10 00 */ addi r8, r5, 0x1000 /* 80076CAC 00072AEC 38 E7 78 60 */ addi r7, r7, bta_ci_hci_msg_handler@l /* 80076CB0 00072AF0 38 80 00 00 */ li r4, 0x0 /* 80076CB4 00072AF4 38 A0 00 00 */ li r5, 0x0 /* 80076CB8 00072AF8 38 C0 00 00 */ li r6, 0x0 /* 80076CBC 00072AFC 4B FA 67 55 */ bl OSSwitchFiberEx /* 80076CC0 00072B00 7F A3 EB 78 */ mr r3, r29 /* 80076CC4 00072B04 4B FF E2 4D */ bl GKI_freebuf .global lbl_80076CC8 lbl_80076CC8: /* 80076CC8 00072B08 3F C0 80 4F */ lis r30, usb@ha /* 80076CCC 00072B0C 3B FE 21 C0 */ addi r31, r30, usb@l .global lbl_80076CD0 lbl_80076CD0: /* 80076CD0 00072B10 88 7F 00 1C */ lbz r3, 0x1c(r31) /* 80076CD4 00072B14 4B FF E1 4D */ bl GKI_getpoolbuf /* 80076CD8 00072B18 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076CDC 00072B1C 7C 7C 1B 78 */ mr r28, r3 /* 80076CE0 00072B20 41 82 FF F0 */ beq lbl_80076CD0 /* 80076CE4 00072B24 38 00 10 00 */ li r0, 0x1000 /* 80076CE8 00072B28 B0 03 00 00 */ sth r0, 0x0(r3) /* 80076CEC 00072B2C 38 03 00 27 */ addi r0, r3, 0x27 /* 80076CF0 00072B30 38 80 00 00 */ li r4, 0x0 /* 80076CF4 00072B34 B0 83 00 02 */ sth r4, 0x2(r3) /* 80076CF8 00072B38 54 1D 00 34 */ clrrwi r29, r0, 5 /* 80076CFC 00072B3C 38 03 00 08 */ addi r0, r3, 0x8 /* 80076D00 00072B40 7C 00 E8 50 */ subf r0, r0, r29 /* 80076D04 00072B44 B0 03 00 04 */ sth r0, 0x4(r3) /* 80076D08 00072B48 4B FF E3 79 */ bl GKI_get_buf_size /* 80076D0C 00072B4C 54 63 04 3E */ clrlwi r3, r3, 16 /* 80076D10 00072B50 A0 1C 00 04 */ lhz r0, 0x4(r28) /* 80076D14 00072B54 38 A3 FF D8 */ addi r5, r3, -0x28 /* 80076D18 00072B58 3C E0 80 07 */ lis r7, uusb_ReadIntrDataCB@ha /* 80076D1C 00072B5C 80 7E 21 C0 */ lwz r3, 0x21c0(r30) /* 80076D20 00072B60 7F A6 EB 78 */ mr r6, r29 /* 80076D24 00072B64 88 9F 00 12 */ lbz r4, 0x12(r31) /* 80076D28 00072B68 7F 88 E3 78 */ mr r8, r28 /* 80076D2C 00072B6C 7C A0 28 50 */ subf r5, r0, r5 /* 80076D30 00072B70 38 E7 6B D0 */ addi r7, r7, uusb_ReadIntrDataCB@l /* 80076D34 00072B74 4B FF D2 5D */ bl IUSB_ReadIntrMsgAsync /* 80076D38 00072B78 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076D3C 00072B7C 41 82 00 0C */ beq lbl_80076D48 /* 80076D40 00072B80 7F 83 E3 78 */ mr r3, r28 /* 80076D44 00072B84 4B FF E1 CD */ bl GKI_freebuf .global lbl_80076D48 lbl_80076D48: /* 80076D48 00072B88 3C 60 80 4F */ lis r3, usb@ha /* 80076D4C 00072B8C 38 00 00 01 */ li r0, 0x1 /* 80076D50 00072B90 38 63 21 C0 */ addi r3, r3, usb@l /* 80076D54 00072B94 98 03 00 2B */ stb r0, 0x2b(r3) .global lbl_80076D58 lbl_80076D58: /* 80076D58 00072B98 80 01 00 24 */ lwz r0, 0x24(r1) /* 80076D5C 00072B9C 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80076D60 00072BA0 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80076D64 00072BA4 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80076D68 00072BA8 83 81 00 10 */ lwz r28, 0x10(r1) /* 80076D6C 00072BAC 7C 08 03 A6 */ mtlr r0 /* 80076D70 00072BB0 38 21 00 20 */ addi r1, r1, 0x20 /* 80076D74 00072BB4 4E 80 00 20 */ blr /* 80076D78 00072BB8 00 00 00 00 */ .4byte 0x00000000 /* 80076D7C 00072BBC 00 00 00 00 */ .4byte 0x00000000 .global uusb_ReadBulkDataCB uusb_ReadBulkDataCB: /* 80076D80 00072BC0 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80076D84 00072BC4 7C 08 02 A6 */ mflr r0 /* 80076D88 00072BC8 90 01 00 24 */ stw r0, 0x24(r1) /* 80076D8C 00072BCC 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80076D90 00072BD0 93 C1 00 18 */ stw r30, 0x18(r1) /* 80076D94 00072BD4 3F C0 80 4F */ lis r30, usb@ha /* 80076D98 00072BD8 3B DE 21 C0 */ addi r30, r30, usb@l /* 80076D9C 00072BDC 93 A1 00 14 */ stw r29, 0x14(r1) /* 80076DA0 00072BE0 7C 9D 23 78 */ mr r29, r4 /* 80076DA4 00072BE4 93 81 00 10 */ stw r28, 0x10(r1) /* 80076DA8 00072BE8 88 1E 00 29 */ lbz r0, 0x29(r30) /* 80076DAC 00072BEC 28 00 00 02 */ cmplwi r0, 0x2 /* 80076DB0 00072BF0 41 82 00 20 */ beq lbl_80076DD0 /* 80076DB4 00072BF4 7F A3 EB 78 */ mr r3, r29 /* 80076DB8 00072BF8 4B FF E1 59 */ bl GKI_freebuf /* 80076DBC 00072BFC 88 7E 00 1D */ lbz r3, 0x1d(r30) /* 80076DC0 00072C00 4B FF ED 01 */ bl GKI_delete_pool /* 80076DC4 00072C04 38 00 00 FF */ li r0, 0xff /* 80076DC8 00072C08 98 1E 00 1D */ stb r0, 0x1d(r30) /* 80076DCC 00072C0C 48 00 01 30 */ b lbl_80076EFC .global lbl_80076DD0 lbl_80076DD0: /* 80076DD0 00072C10 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076DD4 00072C14 41 81 00 10 */ bgt lbl_80076DE4 /* 80076DD8 00072C18 7F A3 EB 78 */ mr r3, r29 /* 80076DDC 00072C1C 4B FF E1 35 */ bl GKI_freebuf /* 80076DE0 00072C20 48 00 00 9C */ b lbl_80076E7C .global lbl_80076DE4 lbl_80076DE4: /* 80076DE4 00072C24 B0 64 00 02 */ sth r3, 0x2(r4) /* 80076DE8 00072C28 38 60 00 03 */ li r3, 0x3 /* 80076DEC 00072C2C 4B FF E0 35 */ bl GKI_getpoolbuf /* 80076DF0 00072C30 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076DF4 00072C34 7C 7C 1B 78 */ mr r28, r3 /* 80076DF8 00072C38 40 82 00 10 */ bne lbl_80076E08 /* 80076DFC 00072C3C 7F A3 EB 78 */ mr r3, r29 /* 80076E00 00072C40 4B FF E1 11 */ bl GKI_freebuf /* 80076E04 00072C44 48 00 00 78 */ b lbl_80076E7C .global lbl_80076E08 lbl_80076E08: /* 80076E08 00072C48 A0 BD 00 02 */ lhz r5, 0x2(r29) /* 80076E0C 00072C4C 7F A4 EB 78 */ mr r4, r29 /* 80076E10 00072C50 A0 1D 00 04 */ lhz r0, 0x4(r29) /* 80076E14 00072C54 7C A5 02 14 */ add r5, r5, r0 /* 80076E18 00072C58 38 05 00 08 */ addi r0, r5, 0x8 /* 80076E1C 00072C5C 54 05 00 3A */ clrrwi r5, r0, 2 /* 80076E20 00072C60 38 A5 00 04 */ addi r5, r5, 0x4 /* 80076E24 00072C64 4B F8 D1 DD */ bl memcpy /* 80076E28 00072C68 7F 83 E3 78 */ mr r3, r28 /* 80076E2C 00072C6C 48 01 C1 9D */ bl l2cap_link_chk_pkt_start /* 80076E30 00072C70 38 00 00 00 */ li r0, 0x0 /* 80076E34 00072C74 7C 7C 1B 78 */ mr r28, r3 /* 80076E38 00072C78 7C 03 00 40 */ cmplw r3, r0 /* 80076E3C 00072C7C 41 82 00 38 */ beq lbl_80076E74 /* 80076E40 00072C80 48 01 C3 59 */ bl l2cap_link_chk_pkt_end /* 80076E44 00072C84 54 60 06 3F */ clrlwi. r0, r3, 24 /* 80076E48 00072C88 41 82 00 2C */ beq lbl_80076E74 /* 80076E4C 00072C8C 3C A0 80 4F */ lis r5, __uusb_ppc_stack2@ha /* 80076E50 00072C90 3C E0 80 07 */ lis r7, bta_ci_hci_msg_handler@ha /* 80076E54 00072C94 38 A5 32 20 */ addi r5, r5, __uusb_ppc_stack2@l /* 80076E58 00072C98 7F 83 E3 78 */ mr r3, r28 /* 80076E5C 00072C9C 39 05 10 00 */ addi r8, r5, 0x1000 /* 80076E60 00072CA0 38 E7 78 60 */ addi r7, r7, bta_ci_hci_msg_handler@l /* 80076E64 00072CA4 38 80 00 00 */ li r4, 0x0 /* 80076E68 00072CA8 38 A0 00 00 */ li r5, 0x0 /* 80076E6C 00072CAC 38 C0 00 00 */ li r6, 0x0 /* 80076E70 00072CB0 4B FA 65 A1 */ bl OSSwitchFiberEx .global lbl_80076E74 lbl_80076E74: /* 80076E74 00072CB4 7F A3 EB 78 */ mr r3, r29 /* 80076E78 00072CB8 4B FF E0 99 */ bl GKI_freebuf .global lbl_80076E7C lbl_80076E7C: /* 80076E7C 00072CBC 3F C0 80 4F */ lis r30, usb@ha /* 80076E80 00072CC0 3B FE 21 C0 */ addi r31, r30, usb@l .global lbl_80076E84 lbl_80076E84: /* 80076E84 00072CC4 88 7F 00 1D */ lbz r3, 0x1d(r31) /* 80076E88 00072CC8 4B FF DF 99 */ bl GKI_getpoolbuf /* 80076E8C 00072CCC 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076E90 00072CD0 7C 7C 1B 78 */ mr r28, r3 /* 80076E94 00072CD4 41 82 FF F0 */ beq lbl_80076E84 /* 80076E98 00072CD8 38 00 11 00 */ li r0, 0x1100 /* 80076E9C 00072CDC B0 03 00 00 */ sth r0, 0x0(r3) /* 80076EA0 00072CE0 38 03 00 27 */ addi r0, r3, 0x27 /* 80076EA4 00072CE4 38 80 00 00 */ li r4, 0x0 /* 80076EA8 00072CE8 B0 83 00 02 */ sth r4, 0x2(r3) /* 80076EAC 00072CEC 54 1D 00 34 */ clrrwi r29, r0, 5 /* 80076EB0 00072CF0 38 03 00 08 */ addi r0, r3, 0x8 /* 80076EB4 00072CF4 7C 00 E8 50 */ subf r0, r0, r29 /* 80076EB8 00072CF8 B0 03 00 04 */ sth r0, 0x4(r3) /* 80076EBC 00072CFC 4B FF E1 C5 */ bl GKI_get_buf_size /* 80076EC0 00072D00 54 63 04 3E */ clrlwi r3, r3, 16 /* 80076EC4 00072D04 A0 1C 00 04 */ lhz r0, 0x4(r28) /* 80076EC8 00072D08 38 A3 FF D8 */ addi r5, r3, -0x28 /* 80076ECC 00072D0C 3C E0 80 07 */ lis r7, uusb_ReadBulkDataCB@ha /* 80076ED0 00072D10 80 7E 21 C0 */ lwz r3, 0x21c0(r30) /* 80076ED4 00072D14 7F A6 EB 78 */ mr r6, r29 /* 80076ED8 00072D18 88 9F 00 11 */ lbz r4, 0x11(r31) /* 80076EDC 00072D1C 7F 88 E3 78 */ mr r8, r28 /* 80076EE0 00072D20 7C A0 28 50 */ subf r5, r0, r5 /* 80076EE4 00072D24 38 E7 6D 80 */ addi r7, r7, uusb_ReadBulkDataCB@l /* 80076EE8 00072D28 4B FF D1 29 */ bl IUSB_ReadBlkMsgAsync /* 80076EEC 00072D2C 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076EF0 00072D30 41 82 00 0C */ beq lbl_80076EFC /* 80076EF4 00072D34 7F 83 E3 78 */ mr r3, r28 /* 80076EF8 00072D38 4B FF E0 19 */ bl GKI_freebuf .global lbl_80076EFC lbl_80076EFC: /* 80076EFC 00072D3C 80 01 00 24 */ lwz r0, 0x24(r1) /* 80076F00 00072D40 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80076F04 00072D44 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80076F08 00072D48 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80076F0C 00072D4C 83 81 00 10 */ lwz r28, 0x10(r1) /* 80076F10 00072D50 7C 08 03 A6 */ mtlr r0 /* 80076F14 00072D54 38 21 00 20 */ addi r1, r1, 0x20 /* 80076F18 00072D58 4E 80 00 20 */ blr /* 80076F1C 00072D5C 00 00 00 00 */ .4byte 0x00000000 .global uusb_WriteCtrlDataCB uusb_WriteCtrlDataCB: /* 80076F20 00072D60 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80076F24 00072D64 7C 08 02 A6 */ mflr r0 /* 80076F28 00072D68 2C 04 00 00 */ cmpwi r4, 0x0 /* 80076F2C 00072D6C 90 01 00 24 */ stw r0, 0x24(r1) /* 80076F30 00072D70 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80076F34 00072D74 93 C1 00 18 */ stw r30, 0x18(r1) /* 80076F38 00072D78 93 A1 00 14 */ stw r29, 0x14(r1) /* 80076F3C 00072D7C 41 82 00 28 */ beq lbl_80076F64 /* 80076F40 00072D80 7C 83 23 78 */ mr r3, r4 /* 80076F44 00072D84 4B FF DF CD */ bl GKI_freebuf /* 80076F48 00072D88 4B FF F4 99 */ bl GKI_disable /* 80076F4C 00072D8C 3C 80 80 4F */ lis r4, usb@ha /* 80076F50 00072D90 38 84 21 C0 */ addi r4, r4, usb@l /* 80076F54 00072D94 88 64 00 48 */ lbz r3, 0x48(r4) /* 80076F58 00072D98 38 03 FF FF */ addi r0, r3, -0x1 /* 80076F5C 00072D9C 98 04 00 48 */ stb r0, 0x48(r4) /* 80076F60 00072DA0 4B FF F4 51 */ bl GKI_enable .global lbl_80076F64 lbl_80076F64: /* 80076F64 00072DA4 3F C0 80 4F */ lis r30, usb@ha /* 80076F68 00072DA8 3B FE 21 C0 */ addi r31, r30, usb@l /* 80076F6C 00072DAC 88 1F 00 48 */ lbz r0, 0x48(r31) /* 80076F70 00072DB0 28 00 00 05 */ cmplwi r0, 0x5 /* 80076F74 00072DB4 40 80 00 7C */ bge lbl_80076FF0 /* 80076F78 00072DB8 A0 1F 00 44 */ lhz r0, 0x44(r31) /* 80076F7C 00072DBC 2C 00 00 00 */ cmpwi r0, 0x0 /* 80076F80 00072DC0 41 82 00 70 */ beq lbl_80076FF0 /* 80076F84 00072DC4 38 7F 00 3C */ addi r3, r31, 0x3c /* 80076F88 00072DC8 4B FF E6 39 */ bl GKI_dequeue /* 80076F8C 00072DCC 90 61 00 08 */ stw r3, 0x8(r1) /* 80076F90 00072DD0 7C 7D 1B 78 */ mr r29, r3 /* 80076F94 00072DD4 3D 40 80 07 */ lis r10, uusb_WriteCtrlDataCB@ha /* 80076F98 00072DD8 38 80 00 20 */ li r4, 0x20 /* 80076F9C 00072DDC A0 03 00 04 */ lhz r0, 0x4(r3) /* 80076FA0 00072DE0 39 4A 6F 20 */ addi r10, r10, uusb_WriteCtrlDataCB@l /* 80076FA4 00072DE4 80 7E 21 C0 */ lwz r3, 0x21c0(r30) /* 80076FA8 00072DE8 38 A0 00 00 */ li r5, 0x0 /* 80076FAC 00072DEC 7C DD 02 14 */ add r6, r29, r0 /* 80076FB0 00072DF0 A1 1D 00 02 */ lhz r8, 0x2(r29) /* 80076FB4 00072DF4 39 26 00 08 */ addi r9, r6, 0x8 /* 80076FB8 00072DF8 38 E0 00 00 */ li r7, 0x0 /* 80076FBC 00072DFC 38 C0 00 00 */ li r6, 0x0 /* 80076FC0 00072E00 4B FF D7 41 */ bl IUSB_WriteCtrlMsgAsync /* 80076FC4 00072E04 2C 03 00 00 */ cmpwi r3, 0x0 /* 80076FC8 00072E08 40 80 00 14 */ bge lbl_80076FDC /* 80076FCC 00072E0C 7F A4 EB 78 */ mr r4, r29 /* 80076FD0 00072E10 38 7F 00 3C */ addi r3, r31, 0x3c /* 80076FD4 00072E14 4B FF E4 AD */ bl GKI_enqueue_head /* 80076FD8 00072E18 48 00 00 18 */ b lbl_80076FF0 .global lbl_80076FDC lbl_80076FDC: /* 80076FDC 00072E1C 4B FF F4 05 */ bl GKI_disable /* 80076FE0 00072E20 88 7F 00 48 */ lbz r3, 0x48(r31) /* 80076FE4 00072E24 38 03 00 01 */ addi r0, r3, 0x1 /* 80076FE8 00072E28 98 1F 00 48 */ stb r0, 0x48(r31) /* 80076FEC 00072E2C 4B FF F3 C5 */ bl GKI_enable .global lbl_80076FF0 lbl_80076FF0: /* 80076FF0 00072E30 80 01 00 24 */ lwz r0, 0x24(r1) /* 80076FF4 00072E34 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80076FF8 00072E38 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80076FFC 00072E3C 83 A1 00 14 */ lwz r29, 0x14(r1) /* 80077000 00072E40 7C 08 03 A6 */ mtlr r0 /* 80077004 00072E44 38 21 00 20 */ addi r1, r1, 0x20 /* 80077008 00072E48 4E 80 00 20 */ blr /* 8007700C 00072E4C 00 00 00 00 */ .4byte 0x00000000 .global uusb_WriteBulkDataCB uusb_WriteBulkDataCB: /* 80077010 00072E50 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80077014 00072E54 7C 08 02 A6 */ mflr r0 /* 80077018 00072E58 2C 04 00 00 */ cmpwi r4, 0x0 /* 8007701C 00072E5C 90 01 00 24 */ stw r0, 0x24(r1) /* 80077020 00072E60 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80077024 00072E64 93 C1 00 18 */ stw r30, 0x18(r1) /* 80077028 00072E68 93 A1 00 14 */ stw r29, 0x14(r1) /* 8007702C 00072E6C 41 82 00 28 */ beq lbl_80077054 /* 80077030 00072E70 7C 83 23 78 */ mr r3, r4 /* 80077034 00072E74 4B FF DE DD */ bl GKI_freebuf /* 80077038 00072E78 4B FF F3 A9 */ bl GKI_disable /* 8007703C 00072E7C 3C 80 80 4F */ lis r4, usb@ha /* 80077040 00072E80 38 84 21 C0 */ addi r4, r4, usb@l /* 80077044 00072E84 88 64 00 38 */ lbz r3, 0x38(r4) /* 80077048 00072E88 38 03 FF FF */ addi r0, r3, -0x1 /* 8007704C 00072E8C 98 04 00 38 */ stb r0, 0x38(r4) /* 80077050 00072E90 4B FF F3 61 */ bl GKI_enable .global lbl_80077054 lbl_80077054: /* 80077054 00072E94 3F C0 80 4F */ lis r30, usb@ha /* 80077058 00072E98 3B FE 21 C0 */ addi r31, r30, usb@l /* 8007705C 00072E9C 88 1F 00 38 */ lbz r0, 0x38(r31) /* 80077060 00072EA0 28 00 00 05 */ cmplwi r0, 0x5 /* 80077064 00072EA4 40 80 00 70 */ bge lbl_800770D4 /* 80077068 00072EA8 A0 1F 00 34 */ lhz r0, 0x34(r31) /* 8007706C 00072EAC 2C 00 00 00 */ cmpwi r0, 0x0 /* 80077070 00072EB0 41 82 00 64 */ beq lbl_800770D4 /* 80077074 00072EB4 38 7F 00 2C */ addi r3, r31, 0x2c /* 80077078 00072EB8 4B FF E5 49 */ bl GKI_dequeue /* 8007707C 00072EBC A0 03 00 04 */ lhz r0, 0x4(r3) /* 80077080 00072EC0 7C 7D 1B 78 */ mr r29, r3 /* 80077084 00072EC4 3C E0 80 07 */ lis r7, uusb_WriteBulkDataCB@ha /* 80077088 00072EC8 80 7E 21 C0 */ lwz r3, 0x21c0(r30) /* 8007708C 00072ECC 7C DD 02 14 */ add r6, r29, r0 /* 80077090 00072ED0 88 9F 00 10 */ lbz r4, 0x10(r31) /* 80077094 00072ED4 A0 BD 00 02 */ lhz r5, 0x2(r29) /* 80077098 00072ED8 7F A8 EB 78 */ mr r8, r29 /* 8007709C 00072EDC 38 E7 70 10 */ addi r7, r7, uusb_WriteBulkDataCB@l /* 800770A0 00072EE0 38 C6 00 08 */ addi r6, r6, 0x8 /* 800770A4 00072EE4 4B FF D0 0D */ bl IUSB_WriteBlkMsgAsync /* 800770A8 00072EE8 2C 03 00 00 */ cmpwi r3, 0x0 /* 800770AC 00072EEC 40 80 00 14 */ bge lbl_800770C0 /* 800770B0 00072EF0 7F A4 EB 78 */ mr r4, r29 /* 800770B4 00072EF4 38 7F 00 2C */ addi r3, r31, 0x2c /* 800770B8 00072EF8 4B FF E3 C9 */ bl GKI_enqueue_head /* 800770BC 00072EFC 48 00 00 18 */ b lbl_800770D4 .global lbl_800770C0 lbl_800770C0: /* 800770C0 00072F00 4B FF F3 21 */ bl GKI_disable /* 800770C4 00072F04 88 7F 00 38 */ lbz r3, 0x38(r31) /* 800770C8 00072F08 38 03 00 01 */ addi r0, r3, 0x1 /* 800770CC 00072F0C 98 1F 00 38 */ stb r0, 0x38(r31) /* 800770D0 00072F10 4B FF F2 E1 */ bl GKI_enable .global lbl_800770D4 lbl_800770D4: /* 800770D4 00072F14 80 01 00 24 */ lwz r0, 0x24(r1) /* 800770D8 00072F18 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 800770DC 00072F1C 83 C1 00 18 */ lwz r30, 0x18(r1) /* 800770E0 00072F20 83 A1 00 14 */ lwz r29, 0x14(r1) /* 800770E4 00072F24 7C 08 03 A6 */ mtlr r0 /* 800770E8 00072F28 38 21 00 20 */ addi r1, r1, 0x20 /* 800770EC 00072F2C 4E 80 00 20 */ blr .global UUSB_Register UUSB_Register: /* 800770F0 00072F30 94 21 FF F0 */ stwu r1, -0x10(r1) /* 800770F4 00072F34 7C 08 02 A6 */ mflr r0 /* 800770F8 00072F38 38 80 00 00 */ li r4, 0x0 /* 800770FC 00072F3C 38 A0 00 4C */ li r5, 0x4c /* 80077100 00072F40 90 01 00 14 */ stw r0, 0x14(r1) /* 80077104 00072F44 93 E1 00 0C */ stw r31, 0xc(r1) /* 80077108 00072F48 7C 7F 1B 78 */ mr r31, r3 /* 8007710C 00072F4C 93 C1 00 08 */ stw r30, 0x8(r1) /* 80077110 00072F50 3F C0 80 4F */ lis r30, usb@ha /* 80077114 00072F54 38 7E 21 C0 */ addi r3, r30, usb@l /* 80077118 00072F58 4B F8 D2 39 */ bl memset /* 8007711C 00072F5C 4B FF F2 C5 */ bl GKI_disable /* 80077120 00072F60 3B DE 21 C0 */ addi r30, r30, 0x21c0 /* 80077124 00072F64 38 00 00 05 */ li r0, 0x5 /* 80077128 00072F68 98 1E 00 29 */ stb r0, 0x29(r30) /* 8007712C 00072F6C 4B FF F2 85 */ bl GKI_enable /* 80077130 00072F70 88 0D EA C1 */ lbz r0, uusb_g_trace_state_initialized@sda21(r13) /* 80077134 00072F74 2C 00 00 00 */ cmpwi r0, 0x0 /* 80077138 00072F78 40 82 00 14 */ bne lbl_8007714C /* 8007713C 00072F7C 38 60 00 00 */ li r3, 0x0 /* 80077140 00072F80 38 00 00 01 */ li r0, 0x1 /* 80077144 00072F84 98 7E 00 28 */ stb r3, 0x28(r30) /* 80077148 00072F88 98 0D EA C1 */ stb r0, uusb_g_trace_state_initialized@sda21(r13) .global lbl_8007714C lbl_8007714C: /* 8007714C 00072F8C 4B FD 7B 25 */ bl IPCCltInit /* 80077150 00072F90 2C 03 00 00 */ cmpwi r3, 0x0 /* 80077154 00072F94 40 82 01 8C */ bne lbl_800772E0 /* 80077158 00072F98 4B FF C2 59 */ bl IUSB_OpenLib /* 8007715C 00072F9C 2C 03 00 00 */ cmpwi r3, 0x0 /* 80077160 00072FA0 40 82 01 80 */ bne lbl_800772E0 /* 80077164 00072FA4 88 0D EA CC */ lbz r0, __ntd_pid_vid_specified@sda21(r13) /* 80077168 00072FA8 3C 80 80 4F */ lis r4, usb@ha /* 8007716C 00072FAC 38 84 21 C0 */ addi r4, r4, usb@l /* 80077170 00072FB0 28 00 00 01 */ cmplwi r0, 0x1 /* 80077174 00072FB4 93 E4 00 24 */ stw r31, 0x24(r4) /* 80077178 00072FB8 40 82 00 18 */ bne lbl_80077190 /* 8007717C 00072FBC 80 6D EA D0 */ lwz r3, __ntd_vid@sda21(r13) /* 80077180 00072FC0 80 0D EA D4 */ lwz r0, __ntd_pid@sda21(r13) /* 80077184 00072FC4 90 64 00 14 */ stw r3, 0x14(r4) /* 80077188 00072FC8 90 04 00 18 */ stw r0, 0x18(r4) /* 8007718C 00072FCC 48 00 00 14 */ b lbl_800771A0 .global lbl_80077190 lbl_80077190: /* 80077190 00072FD0 38 60 05 7E */ li r3, 0x57e /* 80077194 00072FD4 38 00 03 05 */ li r0, 0x305 /* 80077198 00072FD8 90 64 00 14 */ stw r3, 0x14(r4) /* 8007719C 00072FDC 90 04 00 18 */ stw r0, 0x18(r4) .global lbl_800771A0 lbl_800771A0: /* 800771A0 00072FE0 80 0D EA C8 */ lwz r0, __ntd_ohci_init_flag@sda21(r13) /* 800771A4 00072FE4 3C C0 80 4F */ lis r6, usb@ha /* 800771A8 00072FE8 38 C6 21 C0 */ addi r6, r6, usb@l /* 800771AC 00072FEC 38 60 00 00 */ li r3, 0x0 /* 800771B0 00072FF0 28 00 00 01 */ cmplwi r0, 0x1 /* 800771B4 00072FF4 98 66 00 10 */ stb r3, 0x10(r6) /* 800771B8 00072FF8 80 A6 00 18 */ lwz r5, 0x18(r6) /* 800771BC 00072FFC 98 66 00 11 */ stb r3, 0x11(r6) /* 800771C0 00073000 80 06 00 14 */ lwz r0, 0x14(r6) /* 800771C4 00073004 98 66 00 12 */ stb r3, 0x12(r6) /* 800771C8 00073008 98 66 00 13 */ stb r3, 0x13(r6) /* 800771CC 0007300C 40 82 00 48 */ bne lbl_80077214 /* 800771D0 00073010 80 6D EA C4 */ lwz r3, __ntd_ohci@sda21(r13) /* 800771D4 00073014 2C 03 00 00 */ cmpwi r3, 0x0 /* 800771D8 00073018 40 82 00 1C */ bne lbl_800771F4 /* 800771DC 0007301C 54 04 04 3E */ clrlwi r4, r0, 16 /* 800771E0 00073020 54 A5 04 3E */ clrlwi r5, r5, 16 /* 800771E4 00073024 38 6D 84 88 */ addi r3, r13, "@3103"@sda21 /* 800771E8 00073028 4B FF C4 69 */ bl IUSB_OpenDeviceIds /* 800771EC 0007302C 7C 7E 1B 78 */ mr r30, r3 /* 800771F0 00073030 48 00 00 38 */ b lbl_80077228 .global lbl_800771F4 lbl_800771F4: /* 800771F4 00073034 28 03 00 01 */ cmplwi r3, 0x1 /* 800771F8 00073038 40 82 00 30 */ bne lbl_80077228 /* 800771FC 0007303C 54 04 04 3E */ clrlwi r4, r0, 16 /* 80077200 00073040 54 A5 04 3E */ clrlwi r5, r5, 16 /* 80077204 00073044 38 6D 84 8C */ addi r3, r13, "@3104"@sda21 /* 80077208 00073048 4B FF C4 49 */ bl IUSB_OpenDeviceIds /* 8007720C 0007304C 7C 7E 1B 78 */ mr r30, r3 /* 80077210 00073050 48 00 00 18 */ b lbl_80077228 .global lbl_80077214 lbl_80077214: /* 80077214 00073054 54 04 04 3E */ clrlwi r4, r0, 16 /* 80077218 00073058 54 A5 04 3E */ clrlwi r5, r5, 16 /* 8007721C 0007305C 38 6D 84 8C */ addi r3, r13, "@3104"@sda21 /* 80077220 00073060 4B FF C4 31 */ bl IUSB_OpenDeviceIds /* 80077224 00073064 7C 7E 1B 78 */ mr r30, r3 .global lbl_80077228 lbl_80077228: /* 80077228 00073068 2C 1E 00 00 */ cmpwi r30, 0x0 /* 8007722C 0007306C 41 80 00 08 */ blt lbl_80077234 /* 80077230 00073070 93 CD 84 84 */ stw r30, __ntd_ios_file_descriptor@sda21(r13) .global lbl_80077234 lbl_80077234: /* 80077234 00073074 2C 1E 00 00 */ cmpwi r30, 0x0 /* 80077238 00073078 41 80 00 A8 */ blt lbl_800772E0 /* 8007723C 0007307C 3F C0 80 4F */ lis r30, usb@ha /* 80077240 00073080 38 60 00 02 */ li r3, 0x2 /* 80077244 00073084 3B DE 21 C0 */ addi r30, r30, usb@l /* 80077248 00073088 38 80 00 82 */ li r4, 0x82 /* 8007724C 0007308C 38 00 00 81 */ li r0, 0x81 /* 80077250 00073090 3B E0 00 00 */ li r31, 0x0 /* 80077254 00073094 98 7E 00 10 */ stb r3, 0x10(r30) /* 80077258 00073098 38 7E 00 2C */ addi r3, r30, 0x2c /* 8007725C 0007309C 98 9E 00 11 */ stb r4, 0x11(r30) /* 80077260 000730A0 98 1E 00 12 */ stb r0, 0x12(r30) /* 80077264 000730A4 9B FE 00 13 */ stb r31, 0x13(r30) /* 80077268 000730A8 4B FF D9 F9 */ bl GKI_init_q /* 8007726C 000730AC 9B FE 00 38 */ stb r31, 0x38(r30) /* 80077270 000730B0 38 7E 00 3C */ addi r3, r30, 0x3c /* 80077274 000730B4 4B FF D9 ED */ bl GKI_init_q /* 80077278 000730B8 9B FE 00 48 */ stb r31, 0x48(r30) /* 8007727C 000730BC 38 60 02 94 */ li r3, 0x294 /* 80077280 000730C0 38 80 00 2D */ li r4, 0x2d /* 80077284 000730C4 38 A0 00 01 */ li r5, 0x1 /* 80077288 000730C8 38 C0 00 00 */ li r6, 0x0 /* 8007728C 000730CC 4B FF E4 E5 */ bl GKI_create_pool /* 80077290 000730D0 98 7E 00 1C */ stb r3, 0x1c(r30) /* 80077294 000730D4 38 60 07 08 */ li r3, 0x708 /* 80077298 000730D8 38 80 00 1E */ li r4, 0x1e /* 8007729C 000730DC 38 A0 00 01 */ li r5, 0x1 /* 800772A0 000730E0 38 C0 00 00 */ li r6, 0x0 /* 800772A4 000730E4 4B FF E4 CD */ bl GKI_create_pool /* 800772A8 000730E8 88 1E 00 1C */ lbz r0, 0x1c(r30) /* 800772AC 000730EC 98 7E 00 1D */ stb r3, 0x1d(r30) /* 800772B0 000730F0 28 00 00 FF */ cmplwi r0, 0xff /* 800772B4 000730F4 41 82 00 2C */ beq lbl_800772E0 /* 800772B8 000730F8 54 60 06 3E */ clrlwi r0, r3, 24 /* 800772BC 000730FC 28 00 00 FF */ cmplwi r0, 0xff /* 800772C0 00073100 40 82 00 08 */ bne lbl_800772C8 /* 800772C4 00073104 48 00 00 1C */ b lbl_800772E0 .global lbl_800772C8 lbl_800772C8: /* 800772C8 00073108 4B FF F1 19 */ bl GKI_disable /* 800772CC 0007310C 38 00 00 04 */ li r0, 0x4 /* 800772D0 00073110 98 1E 00 29 */ stb r0, 0x29(r30) /* 800772D4 00073114 4B FF F0 DD */ bl GKI_enable /* 800772D8 00073118 38 00 00 01 */ li r0, 0x1 /* 800772DC 0007311C 90 0D 84 80 */ stw r0, wait4hci@sda21(r13) .global lbl_800772E0 lbl_800772E0: /* 800772E0 00073120 80 01 00 14 */ lwz r0, 0x14(r1) /* 800772E4 00073124 83 E1 00 0C */ lwz r31, 0xc(r1) /* 800772E8 00073128 83 C1 00 08 */ lwz r30, 0x8(r1) /* 800772EC 0007312C 7C 08 03 A6 */ mtlr r0 /* 800772F0 00073130 38 21 00 10 */ addi r1, r1, 0x10 /* 800772F4 00073134 4E 80 00 20 */ blr /* 800772F8 00073138 00 00 00 00 */ .4byte 0x00000000 /* 800772FC 0007313C 00 00 00 00 */ .4byte 0x00000000 .global UUSB_Open UUSB_Open: /* 80077300 00073140 94 21 FF E0 */ stwu r1, -0x20(r1) /* 80077304 00073144 7C 08 02 A6 */ mflr r0 /* 80077308 00073148 90 01 00 24 */ stw r0, 0x24(r1) /* 8007730C 0007314C 93 E1 00 1C */ stw r31, 0x1c(r1) /* 80077310 00073150 3F E0 80 4F */ lis r31, usb@ha /* 80077314 00073154 93 C1 00 18 */ stw r30, 0x18(r1) /* 80077318 00073158 3B DF 21 C0 */ addi r30, r31, usb@l /* 8007731C 0007315C 93 A1 00 14 */ stw r29, 0x14(r1) /* 80077320 00073160 93 81 00 10 */ stw r28, 0x10(r1) /* 80077324 00073164 7C 9C 23 78 */ mr r28, r4 /* 80077328 00073168 88 1E 00 29 */ lbz r0, 0x29(r30) /* 8007732C 0007316C 28 00 00 04 */ cmplwi r0, 0x4 /* 80077330 00073170 40 82 01 3C */ bne lbl_8007746C /* 80077334 00073174 88 1E 00 1C */ lbz r0, 0x1c(r30) /* 80077338 00073178 28 00 00 FF */ cmplwi r0, 0xff /* 8007733C 0007317C 41 82 01 30 */ beq lbl_8007746C /* 80077340 00073180 88 1E 00 1D */ lbz r0, 0x1d(r30) /* 80077344 00073184 28 00 00 FF */ cmplwi r0, 0xff /* 80077348 00073188 40 82 00 08 */ bne lbl_80077350 /* 8007734C 0007318C 48 00 01 20 */ b lbl_8007746C .global lbl_80077350 lbl_80077350: /* 80077350 00073190 4B FF F0 91 */ bl GKI_disable /* 80077354 00073194 38 00 00 02 */ li r0, 0x2 /* 80077358 00073198 93 9E 00 20 */ stw r28, 0x20(r30) /* 8007735C 0007319C 98 1E 00 29 */ stb r0, 0x29(r30) /* 80077360 000731A0 4B FF F0 51 */ bl GKI_enable .global lbl_80077364 lbl_80077364: /* 80077364 000731A4 88 7E 00 1C */ lbz r3, 0x1c(r30) /* 80077368 000731A8 4B FF DA B9 */ bl GKI_getpoolbuf /* 8007736C 000731AC 2C 03 00 00 */ cmpwi r3, 0x0 /* 80077370 000731B0 7C 7C 1B 78 */ mr r28, r3 /* 80077374 000731B4 41 82 FF F0 */ beq lbl_80077364 /* 80077378 000731B8 38 00 10 00 */ li r0, 0x1000 /* 8007737C 000731BC B0 03 00 00 */ sth r0, 0x0(r3) /* 80077380 000731C0 38 03 00 27 */ addi r0, r3, 0x27 /* 80077384 000731C4 38 80 00 00 */ li r4, 0x0 /* 80077388 000731C8 B0 83 00 02 */ sth r4, 0x2(r3) /* 8007738C 000731CC 54 1D 00 34 */ clrrwi r29, r0, 5 /* 80077390 000731D0 38 03 00 08 */ addi r0, r3, 0x8 /* 80077394 000731D4 7C 00 E8 50 */ subf r0, r0, r29 /* 80077398 000731D8 B0 03 00 04 */ sth r0, 0x4(r3) /* 8007739C 000731DC 4B FF DC E5 */ bl GKI_get_buf_size /* 800773A0 000731E0 54 63 04 3E */ clrlwi r3, r3, 16 /* 800773A4 000731E4 A0 1C 00 04 */ lhz r0, 0x4(r28) /* 800773A8 000731E8 38 A3 FF D8 */ addi r5, r3, -0x28 /* 800773AC 000731EC 3C E0 80 07 */ lis r7, uusb_ReadIntrDataCB@ha /* 800773B0 000731F0 80 7F 21 C0 */ lwz r3, 0x21c0(r31) /* 800773B4 000731F4 7F A6 EB 78 */ mr r6, r29 /* 800773B8 000731F8 88 9E 00 12 */ lbz r4, 0x12(r30) /* 800773BC 000731FC 7F 88 E3 78 */ mr r8, r28 /* 800773C0 00073200 7C A0 28 50 */ subf r5, r0, r5 /* 800773C4 00073204 38 E7 6B D0 */ addi r7, r7, uusb_ReadIntrDataCB@l /* 800773C8 00073208 4B FF CB C9 */ bl IUSB_ReadIntrMsgAsync /* 800773CC 0007320C 2C 03 00 00 */ cmpwi r3, 0x0 /* 800773D0 00073210 41 82 00 0C */ beq lbl_800773DC /* 800773D4 00073214 7F 83 E3 78 */ mr r3, r28 /* 800773D8 00073218 4B FF DB 39 */ bl GKI_freebuf .global lbl_800773DC lbl_800773DC: /* 800773DC 0007321C 3F C0 80 4F */ lis r30, usb@ha /* 800773E0 00073220 38 00 00 01 */ li r0, 0x1 /* 800773E4 00073224 3B FE 21 C0 */ addi r31, r30, usb@l /* 800773E8 00073228 98 1F 00 2B */ stb r0, 0x2b(r31) .global lbl_800773EC lbl_800773EC: /* 800773EC 0007322C 88 7F 00 1D */ lbz r3, 0x1d(r31) /* 800773F0 00073230 4B FF DA 31 */ bl GKI_getpoolbuf /* 800773F4 00073234 2C 03 00 00 */ cmpwi r3, 0x0 /* 800773F8 00073238 7C 7D 1B 78 */ mr r29, r3 /* 800773FC 0007323C 41 82 FF F0 */ beq lbl_800773EC /* 80077400 00073240 38 00 11 00 */ li r0, 0x1100 /* 80077404 00073244 B0 03 00 00 */ sth r0, 0x0(r3) /* 80077408 00073248 38 03 00 27 */ addi r0, r3, 0x27 /* 8007740C 0007324C 38 80 00 00 */ li r4, 0x0 /* 80077410 00073250 B0 83 00 02 */ sth r4, 0x2(r3) /* 80077414 00073254 54 1C 00 34 */ clrrwi r28, r0, 5 /* 80077418 00073258 38 03 00 08 */ addi r0, r3, 0x8 /* 8007741C 0007325C 7C 00 E0 50 */ subf r0, r0, r28 /* 80077420 00073260 B0 03 00 04 */ sth r0, 0x4(r3) /* 80077424 00073264 4B FF DC 5D */ bl GKI_get_buf_size /* 80077428 00073268 54 63 04 3E */ clrlwi r3, r3, 16 /* 8007742C 0007326C A0 1D 00 04 */ lhz r0, 0x4(r29) /* 80077430 00073270 38 A3 FF D8 */ addi r5, r3, -0x28 /* 80077434 00073274 3C E0 80 07 */ lis r7, uusb_ReadBulkDataCB@ha /* 80077438 00073278 80 7E 21 C0 */ lwz r3, 0x21c0(r30) /* 8007743C 0007327C 7F 86 E3 78 */ mr r6, r28 /* 80077440 00073280 88 9F 00 11 */ lbz r4, 0x11(r31) /* 80077444 00073284 7F A8 EB 78 */ mr r8, r29 /* 80077448 00073288 7C A0 28 50 */ subf r5, r0, r5 /* 8007744C 0007328C 38 E7 6D 80 */ addi r7, r7, uusb_ReadBulkDataCB@l /* 80077450 00073290 4B FF CB C1 */ bl IUSB_ReadBlkMsgAsync /* 80077454 00073294 2C 03 00 00 */ cmpwi r3, 0x0 /* 80077458 00073298 41 82 00 0C */ beq lbl_80077464 /* 8007745C 0007329C 7F A3 EB 78 */ mr r3, r29 /* 80077460 000732A0 4B FF DA B1 */ bl GKI_freebuf .global lbl_80077464 lbl_80077464: /* 80077464 000732A4 38 00 00 00 */ li r0, 0x0 /* 80077468 000732A8 90 0D 84 80 */ stw r0, wait4hci@sda21(r13) .global lbl_8007746C lbl_8007746C: /* 8007746C 000732AC 80 01 00 24 */ lwz r0, 0x24(r1) /* 80077470 000732B0 83 E1 00 1C */ lwz r31, 0x1c(r1) /* 80077474 000732B4 83 C1 00 18 */ lwz r30, 0x18(r1) /* 80077478 000732B8 83 A1 00 14 */ lwz r29, 0x14(r1) /* 8007747C 000732BC 83 81 00 10 */ lwz r28, 0x10(r1) /* 80077480 000732C0 7C 08 03 A6 */ mtlr r0 /* 80077484 000732C4 38 21 00 20 */ addi r1, r1, 0x20 /* 80077488 000732C8 4E 80 00 20 */ blr /* 8007748C 000732CC 00 00 00 00 */ .4byte 0x00000000 .global UUSB_Write UUSB_Write: /* 80077490 000732D0 94 21 FF D0 */ stwu r1, -0x30(r1) /* 80077494 000732D4 7C 08 02 A6 */ mflr r0 /* 80077498 000732D8 90 01 00 34 */ stw r0, 0x34(r1) /* 8007749C 000732DC 39 61 00 30 */ addi r11, r1, 0x30 /* 800774A0 000732E0 4B F8 FE 95 */ bl lbl_80007334 /* 800774A4 000732E4 3F A0 80 4F */ lis r29, usb@ha /* 800774A8 000732E8 7C 99 23 78 */ mr r25, r4 /* 800774AC 000732EC 3B DD 21 C0 */ addi r30, r29, usb@l /* 800774B0 000732F0 7C BF 2B 78 */ mr r31, r5 /* 800774B4 000732F4 88 1E 00 29 */ lbz r0, 0x29(r30) /* 800774B8 000732F8 3B 80 00 00 */ li r28, 0x0 /* 800774BC 000732FC 28 00 00 02 */ cmplwi r0, 0x2 /* 800774C0 00073300 41 82 00 0C */ beq lbl_800774CC /* 800774C4 00073304 38 60 00 00 */ li r3, 0x0 /* 800774C8 00073308 48 00 01 BC */ b lbl_80077684 .global lbl_800774CC lbl_800774CC: /* 800774CC 0007330C 2C 03 00 00 */ cmpwi r3, 0x0 /* 800774D0 00073310 41 82 00 10 */ beq lbl_800774E0 /* 800774D4 00073314 2C 03 00 02 */ cmpwi r3, 0x2 /* 800774D8 00073318 41 82 00 E0 */ beq lbl_800775B8 /* 800774DC 0007331C 48 00 01 A4 */ b lbl_80077680 .global lbl_800774E0 lbl_800774E0: /* 800774E0 00073320 88 7E 00 1C */ lbz r3, 0x1c(r30) /* 800774E4 00073324 4B FF D9 3D */ bl GKI_getpoolbuf /* 800774E8 00073328 2C 03 00 00 */ cmpwi r3, 0x0 /* 800774EC 0007332C 7C 7A 1B 78 */ mr r26, r3 /* 800774F0 00073330 40 82 00 0C */ bne lbl_800774FC /* 800774F4 00073334 38 60 00 00 */ li r3, 0x0 /* 800774F8 00073338 48 00 01 8C */ b lbl_80077684 .global lbl_800774FC lbl_800774FC: /* 800774FC 0007333C 38 03 00 27 */ addi r0, r3, 0x27 /* 80077500 00073340 B3 E3 00 02 */ sth r31, 0x2(r3) /* 80077504 00073344 54 1B 00 34 */ clrrwi r27, r0, 5 /* 80077508 00073348 7F 24 CB 78 */ mr r4, r25 /* 8007750C 0007334C 38 03 00 08 */ addi r0, r3, 0x8 /* 80077510 00073350 7F E5 FB 78 */ mr r5, r31 /* 80077514 00073354 7C 00 D8 50 */ subf r0, r0, r27 /* 80077518 00073358 B0 03 00 04 */ sth r0, 0x4(r3) /* 8007751C 0007335C 7F 63 DB 78 */ mr r3, r27 /* 80077520 00073360 4B F8 CA E1 */ bl memcpy /* 80077524 00073364 88 1E 00 48 */ lbz r0, 0x48(r30) /* 80077528 00073368 28 00 00 05 */ cmplwi r0, 0x5 /* 8007752C 0007336C 40 80 00 44 */ bge lbl_80077570 /* 80077530 00073370 A0 1E 00 44 */ lhz r0, 0x44(r30) /* 80077534 00073374 2C 00 00 00 */ cmpwi r0, 0x0 /* 80077538 00073378 40 82 00 38 */ bne lbl_80077570 /* 8007753C 0007337C 93 41 00 08 */ stw r26, 0x8(r1) /* 80077540 00073380 3D 40 80 07 */ lis r10, uusb_WriteCtrlDataCB@ha /* 80077544 00073384 7F E8 FB 78 */ mr r8, r31 /* 80077548 00073388 7F 69 DB 78 */ mr r9, r27 /* 8007754C 0007338C 80 7D 21 C0 */ lwz r3, 0x21c0(r29) /* 80077550 00073390 39 4A 6F 20 */ addi r10, r10, uusb_WriteCtrlDataCB@l /* 80077554 00073394 38 80 00 20 */ li r4, 0x20 /* 80077558 00073398 38 A0 00 00 */ li r5, 0x0 /* 8007755C 0007339C 38 C0 00 00 */ li r6, 0x0 /* 80077560 000733A0 38 E0 00 00 */ li r7, 0x0 /* 80077564 000733A4 4B FF D1 9D */ bl IUSB_WriteCtrlMsgAsync /* 80077568 000733A8 7C 7C 1B 78 */ mr r28, r3 /* 8007756C 000733AC 48 00 00 20 */ b lbl_8007758C .global lbl_80077570 lbl_80077570: /* 80077570 000733B0 3C 60 80 4F */ lis r3, usb@ha /* 80077574 000733B4 7F 44 D3 78 */ mr r4, r26 /* 80077578 000733B8 38 63 21 C0 */ addi r3, r3, usb@l /* 8007757C 000733BC 38 63 00 3C */ addi r3, r3, 0x3c /* 80077580 000733C0 4B FF DD C1 */ bl GKI_enqueue /* 80077584 000733C4 38 60 00 00 */ li r3, 0x0 /* 80077588 000733C8 48 00 00 FC */ b lbl_80077684 .global lbl_8007758C lbl_8007758C: /* 8007758C 000733CC 2C 03 00 00 */ cmpwi r3, 0x0 /* 80077590 000733D0 41 82 00 10 */ beq lbl_800775A0 /* 80077594 000733D4 7F 43 D3 78 */ mr r3, r26 /* 80077598 000733D8 4B FF D9 79 */ bl GKI_freebuf /* 8007759C 000733DC 48 00 00 E4 */ b lbl_80077680 .global lbl_800775A0 lbl_800775A0: /* 800775A0 000733E0 4B FF EE 41 */ bl GKI_disable /* 800775A4 000733E4 88 7E 00 48 */ lbz r3, 0x48(r30) /* 800775A8 000733E8 38 03 00 01 */ addi r0, r3, 0x1 /* 800775AC 000733EC 98 1E 00 48 */ stb r0, 0x48(r30) /* 800775B0 000733F0 4B FF EE 01 */ bl GKI_enable /* 800775B4 000733F4 48 00 00 CC */ b lbl_80077680 .global lbl_800775B8 lbl_800775B8: /* 800775B8 000733F8 88 7E 00 1D */ lbz r3, 0x1d(r30) /* 800775BC 000733FC 4B FF D8 65 */ bl GKI_getpoolbuf /* 800775C0 00073400 2C 03 00 00 */ cmpwi r3, 0x0 /* 800775C4 00073404 7C 7B 1B 78 */ mr r27, r3 /* 800775C8 00073408 40 82 00 0C */ bne lbl_800775D4 /* 800775CC 0007340C 38 60 00 00 */ li r3, 0x0 /* 800775D0 00073410 48 00 00 B4 */ b lbl_80077684 .global lbl_800775D4 lbl_800775D4: /* 800775D4 00073414 38 03 00 27 */ addi r0, r3, 0x27 /* 800775D8 00073418 B3 E3 00 02 */ sth r31, 0x2(r3) /* 800775DC 0007341C 54 1C 00 34 */ clrrwi r28, r0, 5 /* 800775E0 00073420 7F 24 CB 78 */ mr r4, r25 /* 800775E4 00073424 38 03 00 08 */ addi r0, r3, 0x8 /* 800775E8 00073428 7F E5 FB 78 */ mr r5, r31 /* 800775EC 0007342C 7C 00 E0 50 */ subf r0, r0, r28 /* 800775F0 00073430 B0 03 00 04 */ sth r0, 0x4(r3) /* 800775F4 00073434 7F 83 E3 78 */ mr r3, r28 /* 800775F8 00073438 4B F8 CA 09 */ bl memcpy /* 800775FC 0007343C 88 1E 00 38 */ lbz r0, 0x38(r30) /* 80077600 00073440 28 00 00 05 */ cmplwi r0, 0x5 /* 80077604 00073444 40 80 00 38 */ bge lbl_8007763C /* 80077608 00073448 A0 1E 00 34 */ lhz r0, 0x34(r30) /* 8007760C 0007344C 2C 00 00 00 */ cmpwi r0, 0x0 /* 80077610 00073450 40 82 00 2C */ bne lbl_8007763C /* 80077614 00073454 3C E0 80 07 */ lis r7, uusb_WriteBulkDataCB@ha /* 80077618 00073458 80 7D 21 C0 */ lwz r3, 0x21c0(r29) /* 8007761C 0007345C 88 9E 00 10 */ lbz r4, 0x10(r30) /* 80077620 00073460 7F E5 FB 78 */ mr r5, r31 /* 80077624 00073464 7F 86 E3 78 */ mr r6, r28 /* 80077628 00073468 7F 68 DB 78 */ mr r8, r27 /* 8007762C 0007346C 38 E7 70 10 */ addi r7, r7, uusb_WriteBulkDataCB@l /* 80077630 00073470 4B FF CA 81 */ bl IUSB_WriteBlkMsgAsync /* 80077634 00073474 7C 7C 1B 78 */ mr r28, r3 /* 80077638 00073478 48 00 00 20 */ b lbl_80077658 .global lbl_8007763C lbl_8007763C: /* 8007763C 0007347C 3C 60 80 4F */ lis r3, usb@ha /* 80077640 00073480 7F 64 DB 78 */ mr r4, r27 /* 80077644 00073484 38 63 21 C0 */ addi r3, r3, usb@l /* 80077648 00073488 38 63 00 2C */ addi r3, r3, 0x2c /* 8007764C 0007348C 4B FF DC F5 */ bl GKI_enqueue /* 80077650 00073490 38 60 00 00 */ li r3, 0x0 /* 80077654 00073494 48 00 00 30 */ b lbl_80077684 .global lbl_80077658 lbl_80077658: /* 80077658 00073498 2C 03 00 00 */ cmpwi r3, 0x0 /* 8007765C 0007349C 41 82 00 10 */ beq lbl_8007766C /* 80077660 000734A0 7F 63 DB 78 */ mr r3, r27 /* 80077664 000734A4 4B FF D8 AD */ bl GKI_freebuf /* 80077668 000734A8 48 00 00 18 */ b lbl_80077680 .global lbl_8007766C lbl_8007766C: /* 8007766C 000734AC 4B FF ED 75 */ bl GKI_disable /* 80077670 000734B0 88 7E 00 38 */ lbz r3, 0x38(r30) /* 80077674 000734B4 38 03 00 01 */ addi r0, r3, 0x1 /* 80077678 000734B8 98 1E 00 38 */ stb r0, 0x38(r30) /* 8007767C 000734BC 4B FF ED 35 */ bl GKI_enable .global lbl_80077680 lbl_80077680: /* 80077680 000734C0 57 83 04 3E */ clrlwi r3, r28, 16 .global lbl_80077684 lbl_80077684: /* 80077684 000734C4 39 61 00 30 */ addi r11, r1, 0x30 /* 80077688 000734C8 4B F8 FC F9 */ bl lbl_80007380 /* 8007768C 000734CC 80 01 00 34 */ lwz r0, 0x34(r1) /* 80077690 000734D0 7C 08 03 A6 */ mtlr r0 /* 80077694 000734D4 38 21 00 30 */ addi r1, r1, 0x30 /* 80077698 000734D8 4E 80 00 20 */ blr /* 8007769C 000734DC 00 00 00 00 */ .4byte 0x00000000 .global UUSB_Close UUSB_Close: /* 800776A0 000734E0 94 21 FF F0 */ stwu r1, -0x10(r1) /* 800776A4 000734E4 7C 08 02 A6 */ mflr r0 /* 800776A8 000734E8 90 01 00 14 */ stw r0, 0x14(r1) /* 800776AC 000734EC 93 E1 00 0C */ stw r31, 0xc(r1) /* 800776B0 000734F0 4B FF ED 31 */ bl GKI_disable /* 800776B4 000734F4 3C 60 80 4F */ lis r3, usb@ha /* 800776B8 000734F8 38 00 00 00 */ li r0, 0x0 /* 800776BC 000734FC 3B E3 21 C0 */ addi r31, r3, usb@l /* 800776C0 00073500 98 1F 00 29 */ stb r0, 0x29(r31) /* 800776C4 00073504 4B FF EC ED */ bl GKI_enable /* 800776C8 00073508 A0 1F 00 34 */ lhz r0, 0x34(r31) /* 800776CC 0007350C 2C 00 00 00 */ cmpwi r0, 0x0 /* 800776D0 00073510 41 82 00 20 */ beq lbl_800776F0 /* 800776D4 00073514 48 00 00 10 */ b lbl_800776E4 .global lbl_800776D8 lbl_800776D8: /* 800776D8 00073518 38 7F 00 2C */ addi r3, r31, 0x2c /* 800776DC 0007351C 4B FF DE E5 */ bl GKI_dequeue /* 800776E0 00073520 4B FF D8 31 */ bl GKI_freebuf .global lbl_800776E4 lbl_800776E4: /* 800776E4 00073524 A0 1F 00 34 */ lhz r0, 0x34(r31) /* 800776E8 00073528 2C 00 00 00 */ cmpwi r0, 0x0 /* 800776EC 0007352C 40 82 FF EC */ bne lbl_800776D8 .global lbl_800776F0 lbl_800776F0: /* 800776F0 00073530 3C 60 80 4F */ lis r3, usb@ha /* 800776F4 00073534 3B E3 21 C0 */ addi r31, r3, usb@l /* 800776F8 00073538 A0 1F 00 44 */ lhz r0, 0x44(r31) /* 800776FC 0007353C 2C 00 00 00 */ cmpwi r0, 0x0 /* 80077700 00073540 41 82 00 20 */ beq lbl_80077720 /* 80077704 00073544 48 00 00 10 */ b lbl_80077714 .global lbl_80077708 lbl_80077708: /* 80077708 00073548 38 7F 00 3C */ addi r3, r31, 0x3c /* 8007770C 0007354C 4B FF DE B5 */ bl GKI_dequeue /* 80077710 00073550 4B FF D8 01 */ bl GKI_freebuf .global lbl_80077714 lbl_80077714: /* 80077714 00073554 A0 1F 00 44 */ lhz r0, 0x44(r31) /* 80077718 00073558 2C 00 00 00 */ cmpwi r0, 0x0 /* 8007771C 0007355C 40 82 FF EC */ bne lbl_80077708 .global lbl_80077720 lbl_80077720: /* 80077720 00073560 3C 60 80 4F */ lis r3, usb@ha /* 80077724 00073564 3C 80 80 07 */ lis r4, uusb_CloseDeviceCB@ha /* 80077728 00073568 80 63 21 C0 */ lwz r3, usb@l(r3) /* 8007772C 0007356C 38 84 6B 30 */ addi r4, r4, uusb_CloseDeviceCB@l /* 80077730 00073570 38 A0 00 00 */ li r5, 0x0 /* 80077734 00073574 4B FF C0 6D */ bl IUSB_CloseDeviceAsync /* 80077738 00073578 80 01 00 14 */ lwz r0, 0x14(r1) /* 8007773C 0007357C 83 E1 00 0C */ lwz r31, 0xc(r1) /* 80077740 00073580 7C 08 03 A6 */ mtlr r0 /* 80077744 00073584 38 21 00 10 */ addi r1, r1, 0x10 /* 80077748 00073588 4E 80 00 20 */ blr /* 8007774C 0007358C 00 00 00 00 */ .4byte 0x00000000 .global UUSB_Unregister UUSB_Unregister: /* 80077750 00073590 94 21 FF F0 */ stwu r1, -0x10(r1) /* 80077754 00073594 7C 08 02 A6 */ mflr r0 /* 80077758 00073598 90 01 00 14 */ stw r0, 0x14(r1) /* 8007775C 0007359C 4B FD C6 95 */ bl __wpadNoAlloc /* 80077760 000735A0 4B FF EC 81 */ bl GKI_disable /* 80077764 000735A4 3C 60 80 4F */ lis r3, usb@ha /* 80077768 000735A8 38 00 00 00 */ li r0, 0x0 /* 8007776C 000735AC 38 63 21 C0 */ addi r3, r3, usb@l /* 80077770 000735B0 38 80 00 05 */ li r4, 0x5 /* 80077774 000735B4 98 83 00 29 */ stb r4, 0x29(r3) /* 80077778 000735B8 98 03 00 28 */ stb r0, 0x28(r3) /* 8007777C 000735BC 98 0D EA C1 */ stb r0, uusb_g_trace_state_initialized@sda21(r13) /* 80077780 000735C0 4B FF EC 31 */ bl GKI_enable /* 80077784 000735C4 80 01 00 14 */ lwz r0, 0x14(r1) /* 80077788 000735C8 7C 08 03 A6 */ mtlr r0 /* 8007778C 000735CC 38 21 00 10 */ addi r1, r1, 0x10 /* 80077790 000735D0 4E 80 00 20 */ blr /* 80077794 000735D4 00 00 00 00 */ .4byte 0x00000000 /* 80077798 000735D8 00 00 00 00 */ .4byte 0x00000000 /* 8007779C 000735DC 00 00 00 00 */ .4byte 0x00000000 .include "macros.inc" .section .bss, "", @nobits # 0x80496700 - 0x80556420 ; 0x000BFD20 .global usb usb: .skip 0x60 .global __uusb_ppc_stack1 __uusb_ppc_stack1: .skip 0x1000 .global __uusb_ppc_stack2 __uusb_ppc_stack2: .skip 0x1000 .include "macros.inc" .section .sdata, "wa" # 0x80556420 - 0x8055C6E0 ; 0x000062C0 .global wait4hci wait4hci: .4byte 0x00000001 .global __ntd_ios_file_descriptor __ntd_ios_file_descriptor: .4byte 0xFFFFFFFF .global "@3103" "@3103": .4byte 0x6F683000 .global "@3104" "@3104": .4byte 0x6F683100 .include "macros.inc" .section .sbss, "", @nobits # 0x8055C6E0 - 0x8055DF80 ; 0x000018A0 .global uusb_g_usb_devid_found uusb_g_usb_devid_found: .skip 0x1 .global uusb_g_trace_state_initialized uusb_g_trace_state_initialized: .skip 0x3 .global __ntd_ohci __ntd_ohci: .skip 0x4 .global __ntd_ohci_init_flag __ntd_ohci_init_flag: .skip 0x4 .global __ntd_pid_vid_specified __ntd_pid_vid_specified: .skip 0x4 .global __ntd_vid __ntd_vid: .skip 0x4 .global __ntd_pid __ntd_pid: .skip 0x4