donut-decomp/asm/bte/sdp_main_8009f53c.s

860 lines
40 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global sdp_init
sdp_init:
/* 8009F53C 0009B37C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009F540 0009B380 7C 08 02 A6 */ mflr r0
/* 8009F544 0009B384 38 80 00 00 */ li r4, 0x0
/* 8009F548 0009B388 38 A0 46 34 */ li r5, 0x4634
/* 8009F54C 0009B38C 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009F550 0009B390 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009F554 0009B394 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009F558 0009B398 3F C0 80 44 */ lis r30, "@1261"@ha
/* 8009F55C 0009B39C 3B DE FB 98 */ addi r30, r30, "@1261"@l
/* 8009F560 0009B3A0 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009F564 0009B3A4 3F A0 80 50 */ lis r29, sdp_cb@ha
/* 8009F568 0009B3A8 38 7D 9C 20 */ addi r3, r29, sdp_cb@l
/* 8009F56C 0009B3AC 4B F6 4D E5 */ bl memset
/* 8009F570 0009B3B0 3C 60 00 01 */ lis r3, 0x1
/* 8009F574 0009B3B4 3B FD 9C 20 */ addi r31, r29, -0x63e0
/* 8009F578 0009B3B8 38 E0 00 01 */ li r7, 0x1
/* 8009F57C 0009B3BC 38 A0 01 00 */ li r5, 0x100
/* 8009F580 0009B3C0 39 63 FF FF */ addi r11, r3, -0x1
/* 8009F584 0009B3C4 39 40 00 F0 */ li r10, 0xf0
/* 8009F588 0009B3C8 38 00 00 15 */ li r0, 0x15
/* 8009F58C 0009B3CC B0 BF 00 04 */ sth r5, 0x4(r31)
/* 8009F590 0009B3D0 38 9E 00 00 */ addi r4, r30, 0x0
/* 8009F594 0009B3D4 3B A0 00 00 */ li r29, 0x0
/* 8009F598 0009B3D8 98 FF 00 02 */ stb r7, 0x2(r31)
/* 8009F59C 0009B3DC 38 60 00 00 */ li r3, 0x0
/* 8009F5A0 0009B3E0 38 A0 00 00 */ li r5, 0x0
/* 8009F5A4 0009B3E4 38 C0 00 00 */ li r6, 0x0
/* 8009F5A8 0009B3E8 98 FF 00 20 */ stb r7, 0x20(r31)
/* 8009F5AC 0009B3EC 38 E0 00 01 */ li r7, 0x1
/* 8009F5B0 0009B3F0 39 00 00 00 */ li r8, 0x0
/* 8009F5B4 0009B3F4 39 20 00 00 */ li r9, 0x0
/* 8009F5B8 0009B3F8 B1 7F 00 22 */ sth r11, 0x22(r31)
/* 8009F5BC 0009B3FC B1 5F 46 2C */ sth r10, 0x462c(r31)
/* 8009F5C0 0009B400 B0 1F 46 2E */ sth r0, 0x462e(r31)
/* 8009F5C4 0009B404 4B FE 5E 71 */ bl BTM_SetSecurityLevel
/* 8009F5C8 0009B408 54 60 06 3F */ clrlwi. r0, r3, 24
/* 8009F5CC 0009B40C 40 82 00 20 */ bne lbl_8009F5EC
/* 8009F5D0 0009B410 88 1F 46 30 */ lbz r0, 0x4630(r31)
/* 8009F5D4 0009B414 28 00 00 01 */ cmplwi r0, 0x1
/* 8009F5D8 0009B418 41 80 00 E8 */ blt lbl_8009F6C0
/* 8009F5DC 0009B41C 38 9E 00 14 */ addi r4, r30, 0x14
/* 8009F5E0 0009B420 3C 60 00 0A */ lis r3, 0xa
/* 8009F5E4 0009B424 4B FD 83 7D */ bl LogMsg_0
/* 8009F5E8 0009B428 48 00 00 D8 */ b lbl_8009F6C0
.global lbl_8009F5EC
lbl_8009F5EC:
/* 8009F5EC 0009B42C 38 9E 00 00 */ addi r4, r30, 0x0
/* 8009F5F0 0009B430 38 60 00 01 */ li r3, 0x1
/* 8009F5F4 0009B434 38 A0 00 00 */ li r5, 0x0
/* 8009F5F8 0009B438 38 C0 00 00 */ li r6, 0x0
/* 8009F5FC 0009B43C 38 E0 00 01 */ li r7, 0x1
/* 8009F600 0009B440 39 00 00 00 */ li r8, 0x0
/* 8009F604 0009B444 39 20 00 00 */ li r9, 0x0
/* 8009F608 0009B448 4B FE 5E 2D */ bl BTM_SetSecurityLevel
/* 8009F60C 0009B44C 54 60 06 3F */ clrlwi. r0, r3, 24
/* 8009F610 0009B450 40 82 00 20 */ bne lbl_8009F630
/* 8009F614 0009B454 88 1F 46 30 */ lbz r0, 0x4630(r31)
/* 8009F618 0009B458 28 00 00 01 */ cmplwi r0, 0x1
/* 8009F61C 0009B45C 41 80 00 A4 */ blt lbl_8009F6C0
/* 8009F620 0009B460 38 9E 00 38 */ addi r4, r30, 0x38
/* 8009F624 0009B464 3C 60 00 0A */ lis r3, 0xa
/* 8009F628 0009B468 4B FD 83 39 */ bl LogMsg_0
/* 8009F62C 0009B46C 48 00 00 94 */ b lbl_8009F6C0
.global lbl_8009F630
lbl_8009F630:
/* 8009F630 0009B470 3D 60 80 0A */ lis r11, sdp_connect_ind@ha
/* 8009F634 0009B474 3D 40 80 0A */ lis r10, sdp_connect_cfm@ha
/* 8009F638 0009B478 3D 20 80 0A */ lis r9, sdp_config_ind@ha
/* 8009F63C 0009B47C 3D 00 80 0A */ lis r8, sdp_config_cfm@ha
/* 8009F640 0009B480 3C E0 80 0A */ lis r7, sdp_disconnect_ind@ha
/* 8009F644 0009B484 3C C0 80 0A */ lis r6, sdp_disconnect_cfm@ha
/* 8009F648 0009B488 3C A0 80 0A */ lis r5, sdp_data_ind@ha
/* 8009F64C 0009B48C 39 6B F6 DC */ addi r11, r11, sdp_connect_ind@l
/* 8009F650 0009B490 39 4A F7 A0 */ addi r10, r10, sdp_connect_cfm@l
/* 8009F654 0009B494 39 29 F9 30 */ addi r9, r9, sdp_config_ind@l
/* 8009F658 0009B498 39 08 FA 6C */ addi r8, r8, sdp_config_cfm@l
/* 8009F65C 0009B49C 38 E7 FB E8 */ addi r7, r7, sdp_disconnect_ind@l
/* 8009F660 0009B4A0 38 C6 FF 64 */ addi r6, r6, sdp_disconnect_cfm@l
/* 8009F664 0009B4A4 38 A5 FC E0 */ addi r5, r5, sdp_data_ind@l
/* 8009F668 0009B4A8 9B BF 46 30 */ stb r29, 0x4630(r31)
/* 8009F66C 0009B4AC 38 9F 46 04 */ addi r4, r31, 0x4604
/* 8009F670 0009B4B0 38 60 00 01 */ li r3, 0x1
/* 8009F674 0009B4B4 91 7F 46 04 */ stw r11, 0x4604(r31)
/* 8009F678 0009B4B8 91 5F 46 08 */ stw r10, 0x4608(r31)
/* 8009F67C 0009B4BC 93 BF 46 0C */ stw r29, 0x460c(r31)
/* 8009F680 0009B4C0 91 3F 46 10 */ stw r9, 0x4610(r31)
/* 8009F684 0009B4C4 91 1F 46 14 */ stw r8, 0x4614(r31)
/* 8009F688 0009B4C8 90 FF 46 18 */ stw r7, 0x4618(r31)
/* 8009F68C 0009B4CC 90 DF 46 1C */ stw r6, 0x461c(r31)
/* 8009F690 0009B4D0 93 BF 46 20 */ stw r29, 0x4620(r31)
/* 8009F694 0009B4D4 90 BF 46 24 */ stw r5, 0x4624(r31)
/* 8009F698 0009B4D8 93 BF 46 28 */ stw r29, 0x4628(r31)
/* 8009F69C 0009B4DC 4B FF 0B 45 */ bl L2CA_Register
/* 8009F6A0 0009B4E0 54 60 06 3F */ clrlwi. r0, r3, 24
/* 8009F6A4 0009B4E4 40 82 00 1C */ bne lbl_8009F6C0
/* 8009F6A8 0009B4E8 88 1F 46 30 */ lbz r0, 0x4630(r31)
/* 8009F6AC 0009B4EC 28 00 00 01 */ cmplwi r0, 0x1
/* 8009F6B0 0009B4F0 41 80 00 10 */ blt lbl_8009F6C0
/* 8009F6B4 0009B4F4 38 9E 00 60 */ addi r4, r30, 0x60
/* 8009F6B8 0009B4F8 3C 60 00 0A */ lis r3, 0xa
/* 8009F6BC 0009B4FC 4B FD 82 A5 */ bl LogMsg_0
.global lbl_8009F6C0
lbl_8009F6C0:
/* 8009F6C0 0009B500 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009F6C4 0009B504 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009F6C8 0009B508 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009F6CC 0009B50C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009F6D0 0009B510 7C 08 03 A6 */ mtlr r0
/* 8009F6D4 0009B514 38 21 00 20 */ addi r1, r1, 0x20
/* 8009F6D8 0009B518 4E 80 00 20 */ blr
.global sdp_connect_ind
sdp_connect_ind:
/* 8009F6DC 0009B51C 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009F6E0 0009B520 7C 08 02 A6 */ mflr r0
/* 8009F6E4 0009B524 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009F6E8 0009B528 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009F6EC 0009B52C 7C DF 33 78 */ mr r31, r6
/* 8009F6F0 0009B530 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009F6F4 0009B534 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009F6F8 0009B538 7C 9D 23 78 */ mr r29, r4
/* 8009F6FC 0009B53C 93 81 00 10 */ stw r28, 0x10(r1)
/* 8009F700 0009B540 7C 7C 1B 78 */ mr r28, r3
/* 8009F704 0009B544 48 00 17 45 */ bl sdpu_allocate_ccb
/* 8009F708 0009B548 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009F70C 0009B54C 7C 7E 1B 78 */ mr r30, r3
/* 8009F710 0009B550 41 82 00 70 */ beq lbl_8009F780
/* 8009F714 0009B554 38 00 00 02 */ li r0, 0x2
/* 8009F718 0009B558 7F 84 E3 78 */ mr r4, r28
/* 8009F71C 0009B55C 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009F720 0009B560 38 A0 00 06 */ li r5, 0x6
/* 8009F724 0009B564 38 63 00 02 */ addi r3, r3, 0x2
/* 8009F728 0009B568 4B F6 48 D9 */ bl memcpy
/* 8009F72C 0009B56C B3 BE 00 22 */ sth r29, 0x22(r30)
/* 8009F730 0009B570 7F 83 E3 78 */ mr r3, r28
/* 8009F734 0009B574 7F E4 FB 78 */ mr r4, r31
/* 8009F738 0009B578 7F A5 EB 78 */ mr r5, r29
/* 8009F73C 0009B57C 38 C0 00 00 */ li r6, 0x0
/* 8009F740 0009B580 38 E0 00 00 */ li r7, 0x0
/* 8009F744 0009B584 4B FF 0E FD */ bl L2CA_ConnectRsp
/* 8009F748 0009B588 3F E0 80 50 */ lis r31, sdp_cb@ha
/* 8009F74C 0009B58C 7F A3 EB 78 */ mr r3, r29
/* 8009F750 0009B590 38 9F 9C 20 */ addi r4, r31, sdp_cb@l
/* 8009F754 0009B594 4B FF 10 7D */ bl L2CA_ConfigReq
/* 8009F758 0009B598 38 7F 9C 20 */ addi r3, r31, -0x63e0
/* 8009F75C 0009B59C 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F760 0009B5A0 28 00 00 04 */ cmplwi r0, 0x4
/* 8009F764 0009B5A4 41 80 00 1C */ blt lbl_8009F780
/* 8009F768 0009B5A8 3C 60 00 0A */ lis r3, 0xa
/* 8009F76C 0009B5AC 3C 80 80 44 */ lis r4, "@1274"@ha
/* 8009F770 0009B5B0 A0 BE 00 22 */ lhz r5, 0x22(r30)
/* 8009F774 0009B5B4 38 63 00 03 */ addi r3, r3, 0x3
/* 8009F778 0009B5B8 38 84 FC 10 */ addi r4, r4, "@1274"@l
/* 8009F77C 0009B5BC 4B FD 81 E5 */ bl LogMsg_0
.global lbl_8009F780
lbl_8009F780:
/* 8009F780 0009B5C0 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009F784 0009B5C4 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009F788 0009B5C8 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009F78C 0009B5CC 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009F790 0009B5D0 83 81 00 10 */ lwz r28, 0x10(r1)
/* 8009F794 0009B5D4 7C 08 03 A6 */ mtlr r0
/* 8009F798 0009B5D8 38 21 00 20 */ addi r1, r1, 0x20
/* 8009F79C 0009B5DC 4E 80 00 20 */ blr
.global sdp_connect_cfm
sdp_connect_cfm:
/* 8009F7A0 0009B5E0 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009F7A4 0009B5E4 7C 08 02 A6 */ mflr r0
/* 8009F7A8 0009B5E8 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009F7AC 0009B5EC 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009F7B0 0009B5F0 7C 9F 23 78 */ mr r31, r4
/* 8009F7B4 0009B5F4 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009F7B8 0009B5F8 3F C0 80 44 */ lis r30, "@1261"@ha
/* 8009F7BC 0009B5FC 3B DE FB 98 */ addi r30, r30, "@1261"@l
/* 8009F7C0 0009B600 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009F7C4 0009B604 93 81 00 10 */ stw r28, 0x10(r1)
/* 8009F7C8 0009B608 7C 7C 1B 78 */ mr r28, r3
/* 8009F7CC 0009B60C 48 00 15 ED */ bl sdpu_find_ccb_by_cid
/* 8009F7D0 0009B610 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009F7D4 0009B614 7C 7D 1B 78 */ mr r29, r3
/* 8009F7D8 0009B618 40 82 00 30 */ bne lbl_8009F808
/* 8009F7DC 0009B61C 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F7E0 0009B620 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F7E4 0009B624 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F7E8 0009B628 28 00 00 02 */ cmplwi r0, 0x2
/* 8009F7EC 0009B62C 41 80 01 24 */ blt lbl_8009F910
/* 8009F7F0 0009B630 3C 60 00 0A */ lis r3, 0xa
/* 8009F7F4 0009B634 7F 85 E3 78 */ mr r5, r28
/* 8009F7F8 0009B638 38 63 00 01 */ addi r3, r3, 0x1
/* 8009F7FC 0009B63C 38 9E 00 B0 */ addi r4, r30, 0xb0
/* 8009F800 0009B640 4B FD 81 61 */ bl LogMsg_0
/* 8009F804 0009B644 48 00 01 0C */ b lbl_8009F910
.global lbl_8009F808
lbl_8009F808:
/* 8009F808 0009B648 2C 1F 00 00 */ cmpwi r31, 0x0
/* 8009F80C 0009B64C 40 82 00 50 */ bne lbl_8009F85C
/* 8009F810 0009B650 88 03 00 00 */ lbz r0, 0x0(r3)
/* 8009F814 0009B654 28 00 00 01 */ cmplwi r0, 0x1
/* 8009F818 0009B658 40 82 00 44 */ bne lbl_8009F85C
/* 8009F81C 0009B65C 38 00 00 02 */ li r0, 0x2
/* 8009F820 0009B660 3F E0 80 50 */ lis r31, sdp_cb@ha
/* 8009F824 0009B664 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009F828 0009B668 7F 83 E3 78 */ mr r3, r28
/* 8009F82C 0009B66C 38 9F 9C 20 */ addi r4, r31, sdp_cb@l
/* 8009F830 0009B670 4B FF 0F A1 */ bl L2CA_ConfigReq
/* 8009F834 0009B674 38 7F 9C 20 */ addi r3, r31, -0x63e0
/* 8009F838 0009B678 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F83C 0009B67C 28 00 00 04 */ cmplwi r0, 0x4
/* 8009F840 0009B680 41 80 00 D0 */ blt lbl_8009F910
/* 8009F844 0009B684 3C 60 00 0A */ lis r3, 0xa
/* 8009F848 0009B688 A0 BD 00 22 */ lhz r5, 0x22(r29)
/* 8009F84C 0009B68C 38 63 00 03 */ addi r3, r3, 0x3
/* 8009F850 0009B690 38 9E 00 DC */ addi r4, r30, 0xdc
/* 8009F854 0009B694 4B FD 81 0D */ bl LogMsg_0
/* 8009F858 0009B698 48 00 00 B8 */ b lbl_8009F910
.global lbl_8009F85C
lbl_8009F85C:
/* 8009F85C 0009B69C 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F860 0009B6A0 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F864 0009B6A4 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F868 0009B6A8 28 00 00 02 */ cmplwi r0, 0x2
/* 8009F86C 0009B6AC 41 80 00 1C */ blt lbl_8009F888
/* 8009F870 0009B6B0 3C 60 00 0A */ lis r3, 0xa
/* 8009F874 0009B6B4 A0 DD 00 22 */ lhz r6, 0x22(r29)
/* 8009F878 0009B6B8 7F E5 FB 78 */ mr r5, r31
/* 8009F87C 0009B6BC 38 9E 01 08 */ addi r4, r30, 0x108
/* 8009F880 0009B6C0 38 63 00 01 */ addi r3, r3, 0x1
/* 8009F884 0009B6C4 4B FD 80 DD */ bl LogMsg_0
.global lbl_8009F888
lbl_8009F888:
/* 8009F888 0009B6C8 81 9D 04 14 */ lwz r12, 0x414(r29)
/* 8009F88C 0009B6CC 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8009F890 0009B6D0 41 82 00 78 */ beq lbl_8009F908
/* 8009F894 0009B6D4 28 1F 00 0E */ cmplwi r31, 0xe
/* 8009F898 0009B6D8 41 82 00 24 */ beq lbl_8009F8BC
/* 8009F89C 0009B6DC 28 1F 00 05 */ cmplwi r31, 0x5
/* 8009F8A0 0009B6E0 41 82 00 1C */ beq lbl_8009F8BC
/* 8009F8A4 0009B6E4 28 1F 00 18 */ cmplwi r31, 0x18
/* 8009F8A8 0009B6E8 41 82 00 14 */ beq lbl_8009F8BC
/* 8009F8AC 0009B6EC 28 1F 00 29 */ cmplwi r31, 0x29
/* 8009F8B0 0009B6F0 41 82 00 0C */ beq lbl_8009F8BC
/* 8009F8B4 0009B6F4 28 1F 00 06 */ cmplwi r31, 0x6
/* 8009F8B8 0009B6F8 40 82 00 1C */ bne lbl_8009F8D4
.global lbl_8009F8BC
lbl_8009F8BC:
/* 8009F8BC 0009B6FC 3C 60 00 01 */ lis r3, 0x1
/* 8009F8C0 0009B700 38 03 FF F6 */ addi r0, r3, -0xa
/* 8009F8C4 0009B704 54 03 04 3E */ clrlwi r3, r0, 16
/* 8009F8C8 0009B708 7D 89 03 A6 */ mtctr r12
/* 8009F8CC 0009B70C 4E 80 04 21 */ bctrl
/* 8009F8D0 0009B710 48 00 00 38 */ b lbl_8009F908
.global lbl_8009F8D4
lbl_8009F8D4:
/* 8009F8D4 0009B714 28 1F 00 0F */ cmplwi r31, 0xf
/* 8009F8D8 0009B718 40 82 00 1C */ bne lbl_8009F8F4
/* 8009F8DC 0009B71C 3C 60 00 01 */ lis r3, 0x1
/* 8009F8E0 0009B720 38 03 FF F7 */ addi r0, r3, -0x9
/* 8009F8E4 0009B724 54 03 04 3E */ clrlwi r3, r0, 16
/* 8009F8E8 0009B728 7D 89 03 A6 */ mtctr r12
/* 8009F8EC 0009B72C 4E 80 04 21 */ bctrl
/* 8009F8F0 0009B730 48 00 00 18 */ b lbl_8009F908
.global lbl_8009F8F4
lbl_8009F8F4:
/* 8009F8F4 0009B734 3C 60 00 01 */ lis r3, 0x1
/* 8009F8F8 0009B738 38 03 FF F1 */ addi r0, r3, -0xf
/* 8009F8FC 0009B73C 54 03 04 3E */ clrlwi r3, r0, 16
/* 8009F900 0009B740 7D 89 03 A6 */ mtctr r12
/* 8009F904 0009B744 4E 80 04 21 */ bctrl
.global lbl_8009F908
lbl_8009F908:
/* 8009F908 0009B748 7F A3 EB 78 */ mr r3, r29
/* 8009F90C 0009B74C 48 00 15 B1 */ bl sdpu_release_ccb
.global lbl_8009F910
lbl_8009F910:
/* 8009F910 0009B750 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009F914 0009B754 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009F918 0009B758 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009F91C 0009B75C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009F920 0009B760 83 81 00 10 */ lwz r28, 0x10(r1)
/* 8009F924 0009B764 7C 08 03 A6 */ mtlr r0
/* 8009F928 0009B768 38 21 00 20 */ addi r1, r1, 0x20
/* 8009F92C 0009B76C 4E 80 00 20 */ blr
.global sdp_config_ind
sdp_config_ind:
/* 8009F930 0009B770 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009F934 0009B774 7C 08 02 A6 */ mflr r0
/* 8009F938 0009B778 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009F93C 0009B77C 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009F940 0009B780 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009F944 0009B784 7C 9E 23 78 */ mr r30, r4
/* 8009F948 0009B788 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009F94C 0009B78C 7C 7D 1B 78 */ mr r29, r3
/* 8009F950 0009B790 48 00 14 69 */ bl sdpu_find_ccb_by_cid
/* 8009F954 0009B794 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009F958 0009B798 7C 7F 1B 78 */ mr r31, r3
/* 8009F95C 0009B79C 40 82 00 34 */ bne lbl_8009F990
/* 8009F960 0009B7A0 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F964 0009B7A4 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F968 0009B7A8 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F96C 0009B7AC 28 00 00 02 */ cmplwi r0, 0x2
/* 8009F970 0009B7B0 41 80 00 E0 */ blt lbl_8009FA50
/* 8009F974 0009B7B4 3C 60 00 0A */ lis r3, 0xa
/* 8009F978 0009B7B8 3C 80 80 44 */ lis r4, "@1306"@ha
/* 8009F97C 0009B7BC 7F A5 EB 78 */ mr r5, r29
/* 8009F980 0009B7C0 38 63 00 01 */ addi r3, r3, 0x1
/* 8009F984 0009B7C4 38 84 FC D0 */ addi r4, r4, "@1306"@l
/* 8009F988 0009B7C8 4B FD 7F D9 */ bl LogMsg_0
/* 8009F98C 0009B7CC 48 00 00 C4 */ b lbl_8009FA50
.global lbl_8009F990
lbl_8009F990:
/* 8009F990 0009B7D0 88 1E 00 02 */ lbz r0, 0x2(r30)
/* 8009F994 0009B7D4 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009F998 0009B7D8 40 82 00 10 */ bne lbl_8009F9A8
/* 8009F99C 0009B7DC 38 00 01 00 */ li r0, 0x100
/* 8009F9A0 0009B7E0 B0 03 00 20 */ sth r0, 0x20(r3)
/* 8009F9A4 0009B7E4 48 00 00 20 */ b lbl_8009F9C4
.global lbl_8009F9A8
lbl_8009F9A8:
/* 8009F9A8 0009B7E8 A0 1E 00 04 */ lhz r0, 0x4(r30)
/* 8009F9AC 0009B7EC 28 00 01 00 */ cmplwi r0, 0x100
/* 8009F9B0 0009B7F0 40 81 00 10 */ ble lbl_8009F9C0
/* 8009F9B4 0009B7F4 38 00 01 00 */ li r0, 0x100
/* 8009F9B8 0009B7F8 B0 03 00 20 */ sth r0, 0x20(r3)
/* 8009F9BC 0009B7FC 48 00 00 08 */ b lbl_8009F9C4
.global lbl_8009F9C0
lbl_8009F9C0:
/* 8009F9C0 0009B800 B0 03 00 20 */ sth r0, 0x20(r3)
.global lbl_8009F9C4
lbl_8009F9C4:
/* 8009F9C4 0009B804 38 00 00 00 */ li r0, 0x0
/* 8009F9C8 0009B808 7F A3 EB 78 */ mr r3, r29
/* 8009F9CC 0009B80C 98 1E 00 20 */ stb r0, 0x20(r30)
/* 8009F9D0 0009B810 7F C4 F3 78 */ mr r4, r30
/* 8009F9D4 0009B814 98 1E 00 02 */ stb r0, 0x2(r30)
/* 8009F9D8 0009B818 B0 1E 00 00 */ sth r0, 0x0(r30)
/* 8009F9DC 0009B81C 4B FF 0E AD */ bl L2CA_ConfigRsp
/* 8009F9E0 0009B820 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009F9E4 0009B824 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009F9E8 0009B828 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009F9EC 0009B82C 28 00 00 04 */ cmplwi r0, 0x4
/* 8009F9F0 0009B830 41 80 00 1C */ blt lbl_8009FA0C
/* 8009F9F4 0009B834 3C 60 00 0A */ lis r3, 0xa
/* 8009F9F8 0009B838 3C 80 80 44 */ lis r4, "@1307"@ha
/* 8009F9FC 0009B83C 7F A5 EB 78 */ mr r5, r29
/* 8009FA00 0009B840 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FA04 0009B844 38 84 FC FC */ addi r4, r4, "@1307"@l
/* 8009FA08 0009B848 4B FD 7F 59 */ bl LogMsg_0
.global lbl_8009FA0C
lbl_8009FA0C:
/* 8009FA0C 0009B84C 88 1F 00 01 */ lbz r0, 0x1(r31)
/* 8009FA10 0009B850 60 03 00 02 */ ori r3, r0, 0x2
/* 8009FA14 0009B854 54 60 07 7B */ rlwinm. r0, r3, 0, 29, 29
/* 8009FA18 0009B858 98 7F 00 01 */ stb r3, 0x1(r31)
/* 8009FA1C 0009B85C 41 82 00 34 */ beq lbl_8009FA50
/* 8009FA20 0009B860 38 00 00 03 */ li r0, 0x3
/* 8009FA24 0009B864 98 1F 00 00 */ stb r0, 0x0(r31)
/* 8009FA28 0009B868 88 1F 00 01 */ lbz r0, 0x1(r31)
/* 8009FA2C 0009B86C 54 00 07 FF */ clrlwi. r0, r0, 31
/* 8009FA30 0009B870 41 82 00 10 */ beq lbl_8009FA40
/* 8009FA34 0009B874 7F E3 FB 78 */ mr r3, r31
/* 8009FA38 0009B878 4B FF EA A9 */ bl sdp_disc_connected
/* 8009FA3C 0009B87C 48 00 00 14 */ b lbl_8009FA50
.global lbl_8009FA40
lbl_8009FA40:
/* 8009FA40 0009B880 38 7F 00 08 */ addi r3, r31, 0x8
/* 8009FA44 0009B884 38 80 00 05 */ li r4, 0x5
/* 8009FA48 0009B888 38 A0 00 1E */ li r5, 0x1e
/* 8009FA4C 0009B88C 4B FD 84 65 */ bl btu_start_timer
.global lbl_8009FA50
lbl_8009FA50:
/* 8009FA50 0009B890 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009FA54 0009B894 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009FA58 0009B898 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009FA5C 0009B89C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009FA60 0009B8A0 7C 08 03 A6 */ mtlr r0
/* 8009FA64 0009B8A4 38 21 00 20 */ addi r1, r1, 0x20
/* 8009FA68 0009B8A8 4E 80 00 20 */ blr
.global sdp_config_cfm
sdp_config_cfm:
/* 8009FA6C 0009B8AC 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009FA70 0009B8B0 7C 08 02 A6 */ mflr r0
/* 8009FA74 0009B8B4 3C A0 80 50 */ lis r5, sdp_cb@ha
/* 8009FA78 0009B8B8 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009FA7C 0009B8BC 38 A5 9C 20 */ addi r5, r5, sdp_cb@l
/* 8009FA80 0009B8C0 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009FA84 0009B8C4 3F E0 80 44 */ lis r31, "@1261"@ha
/* 8009FA88 0009B8C8 3B FF FB 98 */ addi r31, r31, "@1261"@l
/* 8009FA8C 0009B8CC 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009FA90 0009B8D0 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009FA94 0009B8D4 7C 9D 23 78 */ mr r29, r4
/* 8009FA98 0009B8D8 93 81 00 10 */ stw r28, 0x10(r1)
/* 8009FA9C 0009B8DC 7C 7C 1B 78 */ mr r28, r3
/* 8009FAA0 0009B8E0 88 05 46 30 */ lbz r0, 0x4630(r5)
/* 8009FAA4 0009B8E4 28 00 00 04 */ cmplwi r0, 0x4
/* 8009FAA8 0009B8E8 41 80 00 1C */ blt lbl_8009FAC4
/* 8009FAAC 0009B8EC 3C 60 00 0A */ lis r3, 0xa
/* 8009FAB0 0009B8F0 A0 DD 00 00 */ lhz r6, 0x0(r29)
/* 8009FAB4 0009B8F4 7F 85 E3 78 */ mr r5, r28
/* 8009FAB8 0009B8F8 38 9F 01 90 */ addi r4, r31, 0x190
/* 8009FABC 0009B8FC 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FAC0 0009B900 4B FD 7E A1 */ bl LogMsg_0
.global lbl_8009FAC4
lbl_8009FAC4:
/* 8009FAC4 0009B904 7F 83 E3 78 */ mr r3, r28
/* 8009FAC8 0009B908 48 00 12 F1 */ bl sdpu_find_ccb_by_cid
/* 8009FACC 0009B90C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009FAD0 0009B910 7C 7E 1B 78 */ mr r30, r3
/* 8009FAD4 0009B914 40 82 00 30 */ bne lbl_8009FB04
/* 8009FAD8 0009B918 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FADC 0009B91C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FAE0 0009B920 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FAE4 0009B924 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FAE8 0009B928 41 80 00 E0 */ blt lbl_8009FBC8
/* 8009FAEC 0009B92C 3C 60 00 0A */ lis r3, 0xa
/* 8009FAF0 0009B930 7F 85 E3 78 */ mr r5, r28
/* 8009FAF4 0009B934 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FAF8 0009B938 38 9F 01 38 */ addi r4, r31, 0x138
/* 8009FAFC 0009B93C 4B FD 7E 65 */ bl LogMsg_0
/* 8009FB00 0009B940 48 00 00 C8 */ b lbl_8009FBC8
.global lbl_8009FB04
lbl_8009FB04:
/* 8009FB04 0009B944 A0 1D 00 00 */ lhz r0, 0x0(r29)
/* 8009FB08 0009B948 2C 00 00 00 */ cmpwi r0, 0x0
/* 8009FB0C 0009B94C 40 82 00 48 */ bne lbl_8009FB54
/* 8009FB10 0009B950 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009FB14 0009B954 60 04 00 04 */ ori r4, r0, 0x4
/* 8009FB18 0009B958 54 80 07 BD */ rlwinm. r0, r4, 0, 30, 30
/* 8009FB1C 0009B95C 98 83 00 01 */ stb r4, 0x1(r3)
/* 8009FB20 0009B960 41 82 00 A8 */ beq lbl_8009FBC8
/* 8009FB24 0009B964 38 00 00 03 */ li r0, 0x3
/* 8009FB28 0009B968 98 03 00 00 */ stb r0, 0x0(r3)
/* 8009FB2C 0009B96C 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009FB30 0009B970 54 00 07 FF */ clrlwi. r0, r0, 31
/* 8009FB34 0009B974 41 82 00 0C */ beq lbl_8009FB40
/* 8009FB38 0009B978 4B FF E9 A9 */ bl sdp_disc_connected
/* 8009FB3C 0009B97C 48 00 00 8C */ b lbl_8009FBC8
.global lbl_8009FB40
lbl_8009FB40:
/* 8009FB40 0009B980 38 80 00 05 */ li r4, 0x5
/* 8009FB44 0009B984 38 A0 00 1E */ li r5, 0x1e
/* 8009FB48 0009B988 38 63 00 08 */ addi r3, r3, 0x8
/* 8009FB4C 0009B98C 4B FD 83 65 */ bl btu_start_timer
/* 8009FB50 0009B990 48 00 00 78 */ b lbl_8009FBC8
.global lbl_8009FB54
lbl_8009FB54:
/* 8009FB54 0009B994 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FB58 0009B998 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FB5C 0009B99C 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FB60 0009B9A0 28 00 00 04 */ cmplwi r0, 0x4
/* 8009FB64 0009B9A4 41 80 00 18 */ blt lbl_8009FB7C
/* 8009FB68 0009B9A8 3C 60 00 0A */ lis r3, 0xa
/* 8009FB6C 0009B9AC A0 BE 00 22 */ lhz r5, 0x22(r30)
/* 8009FB70 0009B9B0 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FB74 0009B9B4 38 9F 01 BC */ addi r4, r31, 0x1bc
/* 8009FB78 0009B9B8 4B FD 7D E9 */ bl LogMsg_0
.global lbl_8009FB7C
lbl_8009FB7C:
/* 8009FB7C 0009B9BC 88 1E 00 00 */ lbz r0, 0x0(r30)
/* 8009FB80 0009B9C0 28 00 00 01 */ cmplwi r0, 0x1
/* 8009FB84 0009B9C4 41 82 00 1C */ beq lbl_8009FBA0
/* 8009FB88 0009B9C8 A0 7E 00 22 */ lhz r3, 0x22(r30)
/* 8009FB8C 0009B9CC 4B FF 0D CD */ bl L2CA_DisconnectReq
/* 8009FB90 0009B9D0 3C 60 00 01 */ lis r3, 0x1
/* 8009FB94 0009B9D4 38 03 FF F2 */ addi r0, r3, -0xe
/* 8009FB98 0009B9D8 B0 1E 04 72 */ sth r0, 0x472(r30)
/* 8009FB9C 0009B9DC 48 00 00 2C */ b lbl_8009FBC8
.global lbl_8009FBA0
lbl_8009FBA0:
/* 8009FBA0 0009B9E0 81 9E 04 14 */ lwz r12, 0x414(r30)
/* 8009FBA4 0009B9E4 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8009FBA8 0009B9E8 41 82 00 18 */ beq lbl_8009FBC0
/* 8009FBAC 0009B9EC 3C 60 00 01 */ lis r3, 0x1
/* 8009FBB0 0009B9F0 38 03 FF F2 */ addi r0, r3, -0xe
/* 8009FBB4 0009B9F4 54 03 04 3E */ clrlwi r3, r0, 16
/* 8009FBB8 0009B9F8 7D 89 03 A6 */ mtctr r12
/* 8009FBBC 0009B9FC 4E 80 04 21 */ bctrl
.global lbl_8009FBC0
lbl_8009FBC0:
/* 8009FBC0 0009BA00 7F C3 F3 78 */ mr r3, r30
/* 8009FBC4 0009BA04 48 00 12 F9 */ bl sdpu_release_ccb
.global lbl_8009FBC8
lbl_8009FBC8:
/* 8009FBC8 0009BA08 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009FBCC 0009BA0C 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009FBD0 0009BA10 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009FBD4 0009BA14 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009FBD8 0009BA18 83 81 00 10 */ lwz r28, 0x10(r1)
/* 8009FBDC 0009BA1C 7C 08 03 A6 */ mtlr r0
/* 8009FBE0 0009BA20 38 21 00 20 */ addi r1, r1, 0x20
/* 8009FBE4 0009BA24 4E 80 00 20 */ blr
.global sdp_disconnect_ind
sdp_disconnect_ind:
/* 8009FBE8 0009BA28 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009FBEC 0009BA2C 7C 08 02 A6 */ mflr r0
/* 8009FBF0 0009BA30 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009FBF4 0009BA34 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009FBF8 0009BA38 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009FBFC 0009BA3C 7C 9E 23 78 */ mr r30, r4
/* 8009FC00 0009BA40 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009FC04 0009BA44 7C 7D 1B 78 */ mr r29, r3
/* 8009FC08 0009BA48 48 00 11 B1 */ bl sdpu_find_ccb_by_cid
/* 8009FC0C 0009BA4C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009FC10 0009BA50 7C 7F 1B 78 */ mr r31, r3
/* 8009FC14 0009BA54 40 82 00 34 */ bne lbl_8009FC48
/* 8009FC18 0009BA58 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FC1C 0009BA5C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FC20 0009BA60 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FC24 0009BA64 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FC28 0009BA68 41 80 00 9C */ blt lbl_8009FCC4
/* 8009FC2C 0009BA6C 3C 60 00 0A */ lis r3, 0xa
/* 8009FC30 0009BA70 3C 80 80 44 */ lis r4, "@1337"@ha
/* 8009FC34 0009BA74 7F A5 EB 78 */ mr r5, r29
/* 8009FC38 0009BA78 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FC3C 0009BA7C 38 84 FD 70 */ addi r4, r4, "@1337"@l
/* 8009FC40 0009BA80 4B FD 7D 21 */ bl LogMsg_0
/* 8009FC44 0009BA84 48 00 00 80 */ b lbl_8009FCC4
.global lbl_8009FC48
lbl_8009FC48:
/* 8009FC48 0009BA88 2C 1E 00 00 */ cmpwi r30, 0x0
/* 8009FC4C 0009BA8C 41 82 00 0C */ beq lbl_8009FC58
/* 8009FC50 0009BA90 7F A3 EB 78 */ mr r3, r29
/* 8009FC54 0009BA94 4B FF 0D A9 */ bl L2CA_DisconnectRsp
.global lbl_8009FC58
lbl_8009FC58:
/* 8009FC58 0009BA98 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FC5C 0009BA9C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FC60 0009BAA0 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FC64 0009BAA4 28 00 00 04 */ cmplwi r0, 0x4
/* 8009FC68 0009BAA8 41 80 00 1C */ blt lbl_8009FC84
/* 8009FC6C 0009BAAC 3C 60 00 0A */ lis r3, 0xa
/* 8009FC70 0009BAB0 3C 80 80 44 */ lis r4, "@1338"@ha
/* 8009FC74 0009BAB4 7F A5 EB 78 */ mr r5, r29
/* 8009FC78 0009BAB8 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FC7C 0009BABC 38 84 FD 9C */ addi r4, r4, "@1338"@l
/* 8009FC80 0009BAC0 4B FD 7C E1 */ bl LogMsg_0
.global lbl_8009FC84
lbl_8009FC84:
/* 8009FC84 0009BAC4 81 9F 04 14 */ lwz r12, 0x414(r31)
/* 8009FC88 0009BAC8 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8009FC8C 0009BACC 41 82 00 30 */ beq lbl_8009FCBC
/* 8009FC90 0009BAD0 88 BF 00 00 */ lbz r5, 0x0(r31)
/* 8009FC94 0009BAD4 3C 60 00 01 */ lis r3, 0x1
/* 8009FC98 0009BAD8 38 03 FF F1 */ addi r0, r3, -0xf
/* 8009FC9C 0009BADC 38 85 FF FD */ addi r4, r5, -0x3
/* 8009FCA0 0009BAE0 20 65 00 03 */ subfic r3, r5, 0x3
/* 8009FCA4 0009BAE4 7C 83 18 F8 */ nor r3, r4, r3
/* 8009FCA8 0009BAE8 7C 63 FE 70 */ srawi r3, r3, 31
/* 8009FCAC 0009BAEC 7C 00 18 78 */ andc r0, r0, r3
/* 8009FCB0 0009BAF0 54 03 04 3E */ clrlwi r3, r0, 16
/* 8009FCB4 0009BAF4 7D 89 03 A6 */ mtctr r12
/* 8009FCB8 0009BAF8 4E 80 04 21 */ bctrl
.global lbl_8009FCBC
lbl_8009FCBC:
/* 8009FCBC 0009BAFC 7F E3 FB 78 */ mr r3, r31
/* 8009FCC0 0009BB00 48 00 11 FD */ bl sdpu_release_ccb
.global lbl_8009FCC4
lbl_8009FCC4:
/* 8009FCC4 0009BB04 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009FCC8 0009BB08 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009FCCC 0009BB0C 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009FCD0 0009BB10 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009FCD4 0009BB14 7C 08 03 A6 */ mtlr r0
/* 8009FCD8 0009BB18 38 21 00 20 */ addi r1, r1, 0x20
/* 8009FCDC 0009BB1C 4E 80 00 20 */ blr
.global sdp_data_ind
sdp_data_ind:
/* 8009FCE0 0009BB20 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009FCE4 0009BB24 7C 08 02 A6 */ mflr r0
/* 8009FCE8 0009BB28 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009FCEC 0009BB2C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009FCF0 0009BB30 7C 9F 23 78 */ mr r31, r4
/* 8009FCF4 0009BB34 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8009FCF8 0009BB38 7C 7E 1B 78 */ mr r30, r3
/* 8009FCFC 0009BB3C 48 00 10 BD */ bl sdpu_find_ccb_by_cid
/* 8009FD00 0009BB40 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009FD04 0009BB44 41 82 00 64 */ beq lbl_8009FD68
/* 8009FD08 0009BB48 88 A3 00 00 */ lbz r5, 0x0(r3)
/* 8009FD0C 0009BB4C 28 05 00 03 */ cmplwi r5, 0x3
/* 8009FD10 0009BB50 40 82 00 28 */ bne lbl_8009FD38
/* 8009FD14 0009BB54 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8009FD18 0009BB58 54 00 07 FF */ clrlwi. r0, r0, 31
/* 8009FD1C 0009BB5C 41 82 00 10 */ beq lbl_8009FD2C
/* 8009FD20 0009BB60 7F E4 FB 78 */ mr r4, r31
/* 8009FD24 0009BB64 4B FF E7 F1 */ bl sdp_disc_server_rsp
/* 8009FD28 0009BB68 48 00 00 6C */ b lbl_8009FD94
.global lbl_8009FD2C
lbl_8009FD2C:
/* 8009FD2C 0009BB6C 7F E4 FB 78 */ mr r4, r31
/* 8009FD30 0009BB70 48 00 03 79 */ bl sdp_server_handle_client_req
/* 8009FD34 0009BB74 48 00 00 60 */ b lbl_8009FD94
.global lbl_8009FD38
lbl_8009FD38:
/* 8009FD38 0009BB78 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FD3C 0009BB7C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FD40 0009BB80 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FD44 0009BB84 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FD48 0009BB88 41 80 00 4C */ blt lbl_8009FD94
/* 8009FD4C 0009BB8C 3C 60 00 0A */ lis r3, 0xa
/* 8009FD50 0009BB90 3C 80 80 44 */ lis r4, "@1347"@ha
/* 8009FD54 0009BB94 7F C6 F3 78 */ mr r6, r30
/* 8009FD58 0009BB98 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FD5C 0009BB9C 38 84 FD C0 */ addi r4, r4, "@1347"@l
/* 8009FD60 0009BBA0 4B FD 7C 01 */ bl LogMsg_0
/* 8009FD64 0009BBA4 48 00 00 30 */ b lbl_8009FD94
.global lbl_8009FD68
lbl_8009FD68:
/* 8009FD68 0009BBA8 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FD6C 0009BBAC 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FD70 0009BBB0 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FD74 0009BBB4 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FD78 0009BBB8 41 80 00 1C */ blt lbl_8009FD94
/* 8009FD7C 0009BBBC 3C 60 00 0A */ lis r3, 0xa
/* 8009FD80 0009BBC0 3C 80 80 44 */ lis r4, "@1348"@ha
/* 8009FD84 0009BBC4 7F C5 F3 78 */ mr r5, r30
/* 8009FD88 0009BBC8 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FD8C 0009BBCC 38 84 FD F8 */ addi r4, r4, "@1348"@l
/* 8009FD90 0009BBD0 4B FD 7B D1 */ bl LogMsg_0
.global lbl_8009FD94
lbl_8009FD94:
/* 8009FD94 0009BBD4 7F E3 FB 78 */ mr r3, r31
/* 8009FD98 0009BBD8 4B FD 51 79 */ bl GKI_freebuf
/* 8009FD9C 0009BBDC 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009FDA0 0009BBE0 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009FDA4 0009BBE4 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8009FDA8 0009BBE8 7C 08 03 A6 */ mtlr r0
/* 8009FDAC 0009BBEC 38 21 00 10 */ addi r1, r1, 0x10
/* 8009FDB0 0009BBF0 4E 80 00 20 */ blr
.global sdp_conn_originate
sdp_conn_originate:
/* 8009FDB4 0009BBF4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 8009FDB8 0009BBF8 7C 08 02 A6 */ mflr r0
/* 8009FDBC 0009BBFC 90 01 00 24 */ stw r0, 0x24(r1)
/* 8009FDC0 0009BC00 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 8009FDC4 0009BC04 3F E0 80 44 */ lis r31, "@1261"@ha
/* 8009FDC8 0009BC08 3B FF FB 98 */ addi r31, r31, "@1261"@l
/* 8009FDCC 0009BC0C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 8009FDD0 0009BC10 93 A1 00 14 */ stw r29, 0x14(r1)
/* 8009FDD4 0009BC14 7C 7D 1B 78 */ mr r29, r3
/* 8009FDD8 0009BC18 48 00 10 71 */ bl sdpu_allocate_ccb
/* 8009FDDC 0009BC1C 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009FDE0 0009BC20 7C 7E 1B 78 */ mr r30, r3
/* 8009FDE4 0009BC24 40 82 00 30 */ bne lbl_8009FE14
/* 8009FDE8 0009BC28 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FDEC 0009BC2C 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FDF0 0009BC30 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FDF4 0009BC34 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FDF8 0009BC38 41 80 00 14 */ blt lbl_8009FE0C
/* 8009FDFC 0009BC3C 3C 60 00 0A */ lis r3, 0xa
/* 8009FE00 0009BC40 38 9F 02 8C */ addi r4, r31, 0x28c
/* 8009FE04 0009BC44 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FE08 0009BC48 4B FD 7B 59 */ bl LogMsg_0
.global lbl_8009FE0C
lbl_8009FE0C:
/* 8009FE0C 0009BC4C 38 60 00 00 */ li r3, 0x0
/* 8009FE10 0009BC50 48 00 00 9C */ b lbl_8009FEAC
.global lbl_8009FE14
lbl_8009FE14:
/* 8009FE14 0009BC54 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FE18 0009BC58 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FE1C 0009BC5C 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FE20 0009BC60 28 00 00 04 */ cmplwi r0, 0x4
/* 8009FE24 0009BC64 41 80 00 14 */ blt lbl_8009FE38
/* 8009FE28 0009BC68 3C 60 00 0A */ lis r3, 0xa
/* 8009FE2C 0009BC6C 38 9F 02 A8 */ addi r4, r31, 0x2a8
/* 8009FE30 0009BC70 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FE34 0009BC74 4B FD 7B 2D */ bl LogMsg_0
.global lbl_8009FE38
lbl_8009FE38:
/* 8009FE38 0009BC78 88 1E 00 01 */ lbz r0, 0x1(r30)
/* 8009FE3C 0009BC7C 7F A4 EB 78 */ mr r4, r29
/* 8009FE40 0009BC80 38 7E 00 02 */ addi r3, r30, 0x2
/* 8009FE44 0009BC84 38 A0 00 06 */ li r5, 0x6
/* 8009FE48 0009BC88 60 00 00 01 */ ori r0, r0, 0x1
/* 8009FE4C 0009BC8C 98 1E 00 01 */ stb r0, 0x1(r30)
/* 8009FE50 0009BC90 4B F6 41 B1 */ bl memcpy
/* 8009FE54 0009BC94 38 00 00 01 */ li r0, 0x1
/* 8009FE58 0009BC98 7F A4 EB 78 */ mr r4, r29
/* 8009FE5C 0009BC9C 98 1E 00 00 */ stb r0, 0x0(r30)
/* 8009FE60 0009BCA0 38 60 00 01 */ li r3, 0x1
/* 8009FE64 0009BCA4 4B FF 05 A9 */ bl L2CA_ConnectReq
/* 8009FE68 0009BCA8 54 60 04 3F */ clrlwi. r0, r3, 16
/* 8009FE6C 0009BCAC 41 82 00 10 */ beq lbl_8009FE7C
/* 8009FE70 0009BCB0 B0 7E 00 22 */ sth r3, 0x22(r30)
/* 8009FE74 0009BCB4 7F C3 F3 78 */ mr r3, r30
/* 8009FE78 0009BCB8 48 00 00 34 */ b lbl_8009FEAC
.global lbl_8009FE7C
lbl_8009FE7C:
/* 8009FE7C 0009BCBC 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FE80 0009BCC0 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FE84 0009BCC4 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FE88 0009BCC8 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FE8C 0009BCCC 41 80 00 14 */ blt lbl_8009FEA0
/* 8009FE90 0009BCD0 3C 60 00 0A */ lis r3, 0xa
/* 8009FE94 0009BCD4 38 9F 02 C0 */ addi r4, r31, 0x2c0
/* 8009FE98 0009BCD8 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FE9C 0009BCDC 4B FD 7A C5 */ bl LogMsg_0
.global lbl_8009FEA0
lbl_8009FEA0:
/* 8009FEA0 0009BCE0 7F C3 F3 78 */ mr r3, r30
/* 8009FEA4 0009BCE4 48 00 10 19 */ bl sdpu_release_ccb
/* 8009FEA8 0009BCE8 38 60 00 00 */ li r3, 0x0
.global lbl_8009FEAC
lbl_8009FEAC:
/* 8009FEAC 0009BCEC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 8009FEB0 0009BCF0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 8009FEB4 0009BCF4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 8009FEB8 0009BCF8 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8009FEBC 0009BCFC 7C 08 03 A6 */ mtlr r0
/* 8009FEC0 0009BD00 38 21 00 20 */ addi r1, r1, 0x20
/* 8009FEC4 0009BD04 4E 80 00 20 */ blr
.global sdp_disconnect
sdp_disconnect:
/* 8009FEC8 0009BD08 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009FECC 0009BD0C 7C 08 02 A6 */ mflr r0
/* 8009FED0 0009BD10 3C A0 80 50 */ lis r5, sdp_cb@ha
/* 8009FED4 0009BD14 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009FED8 0009BD18 38 A5 9C 20 */ addi r5, r5, sdp_cb@l
/* 8009FEDC 0009BD1C 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009FEE0 0009BD20 7C 9F 23 78 */ mr r31, r4
/* 8009FEE4 0009BD24 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8009FEE8 0009BD28 7C 7E 1B 78 */ mr r30, r3
/* 8009FEEC 0009BD2C 88 05 46 30 */ lbz r0, 0x4630(r5)
/* 8009FEF0 0009BD30 28 00 00 04 */ cmplwi r0, 0x4
/* 8009FEF4 0009BD34 41 80 00 1C */ blt lbl_8009FF10
/* 8009FEF8 0009BD38 3C 60 00 0A */ lis r3, 0xa
/* 8009FEFC 0009BD3C 3C 80 80 44 */ lis r4, "@1323"@ha
/* 8009FF00 0009BD40 A0 BE 00 22 */ lhz r5, 0x22(r30)
/* 8009FF04 0009BD44 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FF08 0009BD48 38 84 FD 54 */ addi r4, r4, "@1323"@l
/* 8009FF0C 0009BD4C 4B FD 7A 55 */ bl LogMsg_0
.global lbl_8009FF10
lbl_8009FF10:
/* 8009FF10 0009BD50 88 1E 00 00 */ lbz r0, 0x0(r30)
/* 8009FF14 0009BD54 28 00 00 01 */ cmplwi r0, 0x1
/* 8009FF18 0009BD58 41 82 00 14 */ beq lbl_8009FF2C
/* 8009FF1C 0009BD5C A0 7E 00 22 */ lhz r3, 0x22(r30)
/* 8009FF20 0009BD60 4B FF 0A 39 */ bl L2CA_DisconnectReq
/* 8009FF24 0009BD64 B3 FE 04 72 */ sth r31, 0x472(r30)
/* 8009FF28 0009BD68 48 00 00 24 */ b lbl_8009FF4C
.global lbl_8009FF2C
lbl_8009FF2C:
/* 8009FF2C 0009BD6C 81 9E 04 14 */ lwz r12, 0x414(r30)
/* 8009FF30 0009BD70 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8009FF34 0009BD74 41 82 00 10 */ beq lbl_8009FF44
/* 8009FF38 0009BD78 7F E3 FB 78 */ mr r3, r31
/* 8009FF3C 0009BD7C 7D 89 03 A6 */ mtctr r12
/* 8009FF40 0009BD80 4E 80 04 21 */ bctrl
.global lbl_8009FF44
lbl_8009FF44:
/* 8009FF44 0009BD84 7F C3 F3 78 */ mr r3, r30
/* 8009FF48 0009BD88 48 00 0F 75 */ bl sdpu_release_ccb
.global lbl_8009FF4C
lbl_8009FF4C:
/* 8009FF4C 0009BD8C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8009FF50 0009BD90 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8009FF54 0009BD94 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8009FF58 0009BD98 7C 08 03 A6 */ mtlr r0
/* 8009FF5C 0009BD9C 38 21 00 10 */ addi r1, r1, 0x10
/* 8009FF60 0009BDA0 4E 80 00 20 */ blr
.global sdp_disconnect_cfm
sdp_disconnect_cfm:
/* 8009FF64 0009BDA4 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8009FF68 0009BDA8 7C 08 02 A6 */ mflr r0
/* 8009FF6C 0009BDAC 90 01 00 14 */ stw r0, 0x14(r1)
/* 8009FF70 0009BDB0 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8009FF74 0009BDB4 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8009FF78 0009BDB8 7C 7E 1B 78 */ mr r30, r3
/* 8009FF7C 0009BDBC 48 00 0E 3D */ bl sdpu_find_ccb_by_cid
/* 8009FF80 0009BDC0 2C 03 00 00 */ cmpwi r3, 0x0
/* 8009FF84 0009BDC4 7C 7F 1B 78 */ mr r31, r3
/* 8009FF88 0009BDC8 40 82 00 34 */ bne lbl_8009FFBC
/* 8009FF8C 0009BDCC 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FF90 0009BDD0 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FF94 0009BDD4 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FF98 0009BDD8 28 00 00 02 */ cmplwi r0, 0x2
/* 8009FF9C 0009BDDC 41 80 00 6C */ blt lbl_800A0008
/* 8009FFA0 0009BDE0 3C 60 00 0A */ lis r3, 0xa
/* 8009FFA4 0009BDE4 3C 80 80 44 */ lis r4, "@1375"@ha
/* 8009FFA8 0009BDE8 7F C5 F3 78 */ mr r5, r30
/* 8009FFAC 0009BDEC 38 63 00 01 */ addi r3, r3, 0x1
/* 8009FFB0 0009BDF0 38 84 FE 70 */ addi r4, r4, "@1375"@l
/* 8009FFB4 0009BDF4 4B FD 79 AD */ bl LogMsg_0
/* 8009FFB8 0009BDF8 48 00 00 50 */ b lbl_800A0008
.global lbl_8009FFBC
lbl_8009FFBC:
/* 8009FFBC 0009BDFC 3C 60 80 50 */ lis r3, sdp_cb@ha
/* 8009FFC0 0009BE00 38 63 9C 20 */ addi r3, r3, sdp_cb@l
/* 8009FFC4 0009BE04 88 03 46 30 */ lbz r0, 0x4630(r3)
/* 8009FFC8 0009BE08 28 00 00 04 */ cmplwi r0, 0x4
/* 8009FFCC 0009BE0C 41 80 00 1C */ blt lbl_8009FFE8
/* 8009FFD0 0009BE10 3C 60 00 0A */ lis r3, 0xa
/* 8009FFD4 0009BE14 3C 80 80 44 */ lis r4, "@1376"@ha
/* 8009FFD8 0009BE18 7F C5 F3 78 */ mr r5, r30
/* 8009FFDC 0009BE1C 38 63 00 03 */ addi r3, r3, 0x3
/* 8009FFE0 0009BE20 38 84 FE A0 */ addi r4, r4, "@1376"@l
/* 8009FFE4 0009BE24 4B FD 79 7D */ bl LogMsg_0
.global lbl_8009FFE8
lbl_8009FFE8:
/* 8009FFE8 0009BE28 81 9F 04 14 */ lwz r12, 0x414(r31)
/* 8009FFEC 0009BE2C 2C 0C 00 00 */ cmpwi r12, 0x0
/* 8009FFF0 0009BE30 41 82 00 10 */ beq lbl_800A0000
/* 8009FFF4 0009BE34 A0 7F 04 72 */ lhz r3, 0x472(r31)
/* 8009FFF8 0009BE38 7D 89 03 A6 */ mtctr r12
/* 8009FFFC 0009BE3C 4E 80 04 21 */ bctrl
.global lbl_800A0000
lbl_800A0000:
/* 800A0000 0009BE40 7F E3 FB 78 */ mr r3, r31
/* 800A0004 0009BE44 48 00 0E B9 */ bl sdpu_release_ccb
.global lbl_800A0008
lbl_800A0008:
/* 800A0008 0009BE48 80 01 00 14 */ lwz r0, 0x14(r1)
/* 800A000C 0009BE4C 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 800A0010 0009BE50 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 800A0014 0009BE54 7C 08 03 A6 */ mtlr r0
/* 800A0018 0009BE58 38 21 00 10 */ addi r1, r1, 0x10
/* 800A001C 0009BE5C 4E 80 00 20 */ blr
.global sdp_conn_timeout
sdp_conn_timeout:
/* 800A0020 0009BE60 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 800A0024 0009BE64 7C 08 02 A6 */ mflr r0
/* 800A0028 0009BE68 3C 80 80 50 */ lis r4, sdp_cb@ha
/* 800A002C 0009BE6C 90 01 00 14 */ stw r0, 0x14(r1)
/* 800A0030 0009BE70 38 84 9C 20 */ addi r4, r4, sdp_cb@l
/* 800A0034 0009BE74 93 E1 00 0C */ stw r31, 0xc(r1)
/* 800A0038 0009BE78 7C 7F 1B 78 */ mr r31, r3
/* 800A003C 0009BE7C 88 04 46 30 */ lbz r0, 0x4630(r4)
/* 800A0040 0009BE80 28 00 00 04 */ cmplwi r0, 0x4
/* 800A0044 0009BE84 41 80 00 20 */ blt lbl_800A0064
/* 800A0048 0009BE88 3C 60 00 0A */ lis r3, 0xa
/* 800A004C 0009BE8C 3C 80 80 44 */ lis r4, "@1382"@ha
/* 800A0050 0009BE90 88 BF 00 00 */ lbz r5, 0x0(r31)
/* 800A0054 0009BE94 38 63 00 03 */ addi r3, r3, 0x3
/* 800A0058 0009BE98 A0 DF 00 22 */ lhz r6, 0x22(r31)
/* 800A005C 0009BE9C 38 84 FE C8 */ addi r4, r4, "@1382"@l
/* 800A0060 0009BEA0 4B FD 79 01 */ bl LogMsg_0
.global lbl_800A0064
lbl_800A0064:
/* 800A0064 0009BEA4 A0 7F 00 22 */ lhz r3, 0x22(r31)
/* 800A0068 0009BEA8 4B FF 08 F1 */ bl L2CA_DisconnectReq
/* 800A006C 0009BEAC 81 9F 04 14 */ lwz r12, 0x414(r31)
/* 800A0070 0009BEB0 2C 0C 00 00 */ cmpwi r12, 0x0
/* 800A0074 0009BEB4 41 82 00 18 */ beq lbl_800A008C
/* 800A0078 0009BEB8 3C 60 00 01 */ lis r3, 0x1
/* 800A007C 0009BEBC 38 03 FF F1 */ addi r0, r3, -0xf
/* 800A0080 0009BEC0 54 03 04 3E */ clrlwi r3, r0, 16
/* 800A0084 0009BEC4 7D 89 03 A6 */ mtctr r12
/* 800A0088 0009BEC8 4E 80 04 21 */ bctrl
.global lbl_800A008C
lbl_800A008C:
/* 800A008C 0009BECC 7F E3 FB 78 */ mr r3, r31
/* 800A0090 0009BED0 48 00 0E 2D */ bl sdpu_release_ccb
/* 800A0094 0009BED4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 800A0098 0009BED8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 800A009C 0009BEDC 7C 08 03 A6 */ mtlr r0
/* 800A00A0 0009BEE0 38 21 00 10 */ addi r1, r1, 0x10
/* 800A00A4 0009BEE4 4E 80 00 20 */ blr