donut-decomp/asm/bte/btm_sco.s
2022-10-17 09:41:13 +01:00

1337 lines
55 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global btm_sco_init
btm_sco_init:
/* 80084430 00080270 3C 60 80 41 */ lis r3, btm_esco_defaults@ha
/* 80084434 00080274 84 C3 81 08 */ lwzu r6, btm_esco_defaults@l(r3)
/* 80084438 00080278 3C 80 00 01 */ lis r4, 0x1
/* 8008443C 0008027C 3C E0 80 4F */ lis r7, btm_cb@ha
/* 80084440 00080280 39 04 FF FF */ addi r8, r4, -0x1
/* 80084444 00080284 80 A3 00 04 */ lwz r5, 0x4(r3)
/* 80084448 00080288 38 E7 5F 58 */ addi r7, r7, btm_cb@l
/* 8008444C 0008028C 80 83 00 08 */ lwz r4, 0x8(r3)
/* 80084450 00080290 80 63 00 0C */ lwz r3, 0xc(r3)
/* 80084454 00080294 38 00 00 02 */ li r0, 0x2
/* 80084458 00080298 B1 07 18 F6 */ sth r8, 0x18f6(r7)
/* 8008445C 0008029C 90 C7 18 F8 */ stw r6, 0x18f8(r7)
/* 80084460 000802A0 90 A7 18 FC */ stw r5, 0x18fc(r7)
/* 80084464 000802A4 90 87 19 00 */ stw r4, 0x1900(r7)
/* 80084468 000802A8 90 67 19 04 */ stw r3, 0x1904(r7)
/* 8008446C 000802AC 98 07 19 09 */ stb r0, 0x1909(r7)
/* 80084470 000802B0 4E 80 00 20 */ blr
.global btm_esco_conn_rsp
btm_esco_conn_rsp:
/* 80084474 000802B4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80084478 000802B8 7C 08 02 A6 */ mflr r0
/* 8008447C 000802BC 90 01 00 24 */ stw r0, 0x24(r1)
/* 80084480 000802C0 39 61 00 20 */ addi r11, r1, 0x20
/* 80084484 000802C4 4B F8 2E B5 */ bl lbl_80007338
/* 80084488 000802C8 7C 7A 1B 78 */ mr r26, r3
/* 8008448C 000802CC 7C 9B 23 78 */ mr r27, r4
/* 80084490 000802D0 7C BD 2B 78 */ mr r29, r5
/* 80084494 000802D4 7C DC 33 78 */ mr r28, r6
/* 80084498 000802D8 3B E0 00 00 */ li r31, 0x0
/* 8008449C 000802DC 38 60 00 02 */ li r3, 0x2
/* 800844A0 000802E0 4B FF 09 81 */ bl GKI_getpoolbuf
/* 800844A4 000802E4 2C 03 00 00 */ cmpwi r3, 0x0
/* 800844A8 000802E8 7C 7E 1B 78 */ mr r30, r3
/* 800844AC 000802EC 40 82 00 2C */ bne lbl_800844D8
/* 800844B0 000802F0 3C 60 80 4F */ lis r3, btm_cb@ha
/* 800844B4 000802F4 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 800844B8 000802F8 88 03 27 C0 */ lbz r0, 0x27c0(r3)
/* 800844BC 000802FC 28 00 00 01 */ cmplwi r0, 0x1
/* 800844C0 00080300 41 80 01 78 */ blt lbl_80084638
/* 800844C4 00080304 3C 80 80 44 */ lis r4, "@1903"@ha
/* 800844C8 00080308 3C 60 00 0D */ lis r3, 0xd
/* 800844CC 0008030C 38 84 BF 80 */ addi r4, r4, "@1903"@l
/* 800844D0 00080310 4B FF 34 91 */ bl LogMsg_0
/* 800844D4 00080314 48 00 01 64 */ b lbl_80084638
.global lbl_800844D8
lbl_800844D8:
/* 800844D8 00080318 28 1A 00 03 */ cmplwi r26, 0x3
/* 800844DC 0008031C 40 80 00 18 */ bge lbl_800844F4
/* 800844E0 00080320 1C 1A 00 34 */ mulli r0, r26, 0x34
/* 800844E4 00080324 3C 60 80 4F */ lis r3, btm_cb@ha
/* 800844E8 00080328 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 800844EC 0008032C 7C 63 02 14 */ add r3, r3, r0
/* 800844F0 00080330 3B E3 18 54 */ addi r31, r3, 0x1854
.global lbl_800844F4
lbl_800844F4:
/* 800844F4 00080334 2C 1B 00 00 */ cmpwi r27, 0x0
/* 800844F8 00080338 41 82 00 5C */ beq lbl_80084554
/* 800844FC 0008033C 2C 1F 00 00 */ cmpwi r31, 0x0
/* 80084500 00080340 41 82 00 18 */ beq lbl_80084518
/* 80084504 00080344 A0 7F 00 08 */ lhz r3, 0x8(r31)
/* 80084508 00080348 38 03 FF FE */ addi r0, r3, -0x2
/* 8008450C 0008034C 7C 00 00 34 */ cntlzw r0, r0
/* 80084510 00080350 54 00 DC 3E */ extrwi r0, r0, 16, 11
/* 80084514 00080354 B0 1F 00 08 */ sth r0, 0x8(r31)
.global lbl_80084518
lbl_80084518:
/* 80084518 00080358 3C 60 80 4F */ lis r3, btm_cb@ha
/* 8008451C 0008035C 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084520 00080360 88 03 19 08 */ lbz r0, 0x1908(r3)
/* 80084524 00080364 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084528 00080368 40 82 00 18 */ bne lbl_80084540
/* 8008452C 0008036C 7F C3 F3 78 */ mr r3, r30
/* 80084530 00080370 7F A4 EB 78 */ mr r4, r29
/* 80084534 00080374 7F 65 DB 78 */ mr r5, r27
/* 80084538 00080378 48 00 66 7D */ bl btsnd_hcic_reject_conn
/* 8008453C 0008037C 48 00 00 FC */ b lbl_80084638
.global lbl_80084540
lbl_80084540:
/* 80084540 00080380 7F C3 F3 78 */ mr r3, r30
/* 80084544 00080384 7F A4 EB 78 */ mr r4, r29
/* 80084548 00080388 7F 65 DB 78 */ mr r5, r27
/* 8008454C 0008038C 48 00 71 F1 */ bl btsnd_hcic_reject_esco_conn
/* 80084550 00080390 48 00 00 E8 */ b lbl_80084638
.global lbl_80084554
lbl_80084554:
/* 80084554 00080394 38 60 00 01 */ li r3, 0x1
/* 80084558 00080398 4B FF B3 B1 */ bl btm_chg_all_acl_pkt_types
/* 8008455C 0008039C 38 00 00 03 */ li r0, 0x3
/* 80084560 000803A0 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084564 000803A4 B0 1F 00 08 */ sth r0, 0x8(r31)
/* 80084568 000803A8 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 8008456C 000803AC 88 03 19 08 */ lbz r0, 0x1908(r3)
/* 80084570 000803B0 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084574 000803B4 41 82 00 B4 */ beq lbl_80084628
/* 80084578 000803B8 88 1F 00 2E */ lbz r0, 0x2e(r31)
/* 8008457C 000803BC 28 00 00 02 */ cmplwi r0, 0x2
/* 80084580 000803C0 40 82 00 A8 */ bne lbl_80084628
/* 80084584 000803C4 2C 1C 00 00 */ cmpwi r28, 0x0
/* 80084588 000803C8 41 82 00 24 */ beq lbl_800845AC
/* 8008458C 000803CC 80 7C 00 00 */ lwz r3, 0x0(r28)
/* 80084590 000803D0 80 1C 00 04 */ lwz r0, 0x4(r28)
/* 80084594 000803D4 90 7F 00 14 */ stw r3, 0x14(r31)
/* 80084598 000803D8 90 1F 00 18 */ stw r0, 0x18(r31)
/* 8008459C 000803DC 80 7C 00 08 */ lwz r3, 0x8(r28)
/* 800845A0 000803E0 80 1C 00 0C */ lwz r0, 0xc(r28)
/* 800845A4 000803E4 90 7F 00 1C */ stw r3, 0x1c(r31)
/* 800845A8 000803E8 90 1F 00 20 */ stw r0, 0x20(r31)
.global lbl_800845AC
lbl_800845AC:
/* 800845AC 000803EC 3C 60 80 4F */ lis r3, btm_cb@ha
/* 800845B0 000803F0 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 800845B4 000803F4 A0 83 19 04 */ lhz r4, 0x1904(r3)
/* 800845B8 000803F8 B0 9F 00 20 */ sth r4, 0x20(r31)
/* 800845BC 000803FC A0 A3 06 56 */ lhz r5, 0x656(r3)
/* 800845C0 00080400 7C 83 28 38 */ and r3, r4, r5
/* 800845C4 00080404 54 60 06 B9 */ rlwinm. r0, r3, 0, 26, 28
/* 800845C8 00080408 54 7C 06 BE */ clrlwi r28, r3, 26
/* 800845CC 0008040C 40 82 00 0C */ bne lbl_800845D8
/* 800845D0 00080410 63 80 00 08 */ ori r0, r28, 0x8
/* 800845D4 00080414 54 1C 04 3E */ clrlwi r28, r0, 16
.global lbl_800845D8
lbl_800845D8:
/* 800845D8 00080418 3C 60 80 4F */ lis r3, btm_cb@ha
/* 800845DC 0008041C 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 800845E0 00080420 88 03 06 36 */ lbz r0, 0x636(r3)
/* 800845E4 00080424 28 00 00 03 */ cmplwi r0, 0x3
/* 800845E8 00080428 41 80 00 14 */ blt lbl_800845FC
/* 800845EC 0008042C 7C 80 2B 78 */ or r0, r4, r5
/* 800845F0 00080430 54 00 05 B2 */ rlwinm r0, r0, 0, 22, 25
/* 800845F4 00080434 7F 80 03 78 */ or r0, r28, r0
/* 800845F8 00080438 54 1C 04 3E */ clrlwi r28, r0, 16
.global lbl_800845FC
lbl_800845FC:
/* 800845FC 0008043C 80 BF 00 14 */ lwz r5, 0x14(r31)
/* 80084600 00080440 7F C3 F3 78 */ mr r3, r30
/* 80084604 00080444 80 DF 00 18 */ lwz r6, 0x18(r31)
/* 80084608 00080448 7F A4 EB 78 */ mr r4, r29
/* 8008460C 0008044C A0 FF 00 1C */ lhz r7, 0x1c(r31)
/* 80084610 00080450 57 8A 04 3E */ clrlwi r10, r28, 16
/* 80084614 00080454 A1 1F 00 1E */ lhz r8, 0x1e(r31)
/* 80084618 00080458 89 3F 00 22 */ lbz r9, 0x22(r31)
/* 8008461C 0008045C 48 00 70 39 */ bl btsnd_hcic_accept_esco_conn
/* 80084620 00080460 B3 9F 00 20 */ sth r28, 0x20(r31)
/* 80084624 00080464 48 00 00 14 */ b lbl_80084638
.global lbl_80084628
lbl_80084628:
/* 80084628 00080468 7F C3 F3 78 */ mr r3, r30
/* 8008462C 0008046C 7F A4 EB 78 */ mr r4, r29
/* 80084630 00080470 38 A0 00 00 */ li r5, 0x0
/* 80084634 00080474 48 00 65 21 */ bl btsnd_hcic_accept_conn
.global lbl_80084638
lbl_80084638:
/* 80084638 00080478 39 61 00 20 */ addi r11, r1, 0x20
/* 8008463C 0008047C 4B F8 2D 49 */ bl lbl_80007384
/* 80084640 00080480 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80084644 00080484 7C 08 03 A6 */ mtlr r0
/* 80084648 00080488 38 21 00 20 */ addi r1, r1, 0x20
/* 8008464C 0008048C 4E 80 00 20 */ blr
.global btm_sco_chk_pend_unpark
btm_sco_chk_pend_unpark:
/* 80084650 00080490 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80084654 00080494 7C 08 02 A6 */ mflr r0
/* 80084658 00080498 90 01 00 44 */ stw r0, 0x44(r1)
/* 8008465C 0008049C 39 61 00 40 */ addi r11, r1, 0x40
/* 80084660 000804A0 4B F8 2C C1 */ bl lbl_80007320
/* 80084664 000804A4 3F 80 80 4F */ lis r28, btm_cb@ha
/* 80084668 000804A8 7C 77 1B 78 */ mr r23, r3
/* 8008466C 000804AC 3B 9C 5F 58 */ addi r28, r28, btm_cb@l
/* 80084670 000804B0 7C 98 23 78 */ mr r24, r4
/* 80084674 000804B4 7C B9 2B 78 */ mr r25, r5
/* 80084678 000804B8 3B 60 00 00 */ li r27, 0x0
/* 8008467C 000804BC 3B 5C 18 54 */ addi r26, r28, 0x1854
/* 80084680 000804C0 3F C0 00 0D */ lis r30, 0xd
/* 80084684 000804C4 3F E0 80 44 */ lis r31, "@1995"@ha
/* 80084688 000804C8 3E A0 80 44 */ lis r21, "@1974"@ha
/* 8008468C 000804CC 3A C0 00 03 */ li r22, 0x3
.global lbl_80084690
lbl_80084690:
/* 80084690 000804D0 A0 1A 00 08 */ lhz r0, 0x8(r26)
/* 80084694 000804D4 28 00 00 06 */ cmplwi r0, 0x6
/* 80084698 000804D8 40 82 01 1C */ bne lbl_800847B4
/* 8008469C 000804DC 2C 19 00 00 */ cmpwi r25, 0x0
/* 800846A0 000804E0 40 82 01 14 */ bne lbl_800847B4
/* 800846A4 000804E4 2C 17 00 00 */ cmpwi r23, 0x0
/* 800846A8 000804E8 40 82 01 0C */ bne lbl_800847B4
/* 800846AC 000804EC 38 7A 00 28 */ addi r3, r26, 0x28
/* 800846B0 000804F0 4B FF A6 AD */ bl BTM_GetHCIConnHandle
/* 800846B4 000804F4 54 65 04 3E */ clrlwi r5, r3, 16
/* 800846B8 000804F8 7C 7D 1B 78 */ mr r29, r3
/* 800846BC 000804FC 7C 18 28 40 */ cmplw r24, r5
/* 800846C0 00080500 40 82 00 F4 */ bne lbl_800847B4
/* 800846C4 00080504 88 1C 27 C0 */ lbz r0, 0x27c0(r28)
/* 800846C8 00080508 28 00 00 03 */ cmplwi r0, 0x3
/* 800846CC 0008050C 41 80 00 14 */ blt lbl_800846E0
/* 800846D0 00080510 88 DC 19 09 */ lbz r6, 0x1909(r28)
/* 800846D4 00080514 38 7E 00 02 */ addi r3, r30, 0x2
/* 800846D8 00080518 38 9F C0 5C */ addi r4, r31, "@1995"@l
/* 800846DC 0008051C 4B FF 32 85 */ bl LogMsg_0
.global lbl_800846E0
lbl_800846E0:
/* 800846E0 00080520 38 60 00 01 */ li r3, 0x1
/* 800846E4 00080524 4B FF B2 25 */ bl btm_chg_all_acl_pkt_types
/* 800846E8 00080528 88 1C 19 08 */ lbz r0, 0x1908(r28)
/* 800846EC 0008052C 2C 00 00 00 */ cmpwi r0, 0x0
/* 800846F0 00080530 40 82 00 24 */ bne lbl_80084714
/* 800846F4 00080534 A0 1A 00 20 */ lhz r0, 0x20(r26)
/* 800846F8 00080538 57 A3 04 3E */ clrlwi r3, r29, 16
/* 800846FC 0008053C 54 04 2E 34 */ rlwinm r4, r0, 5, 24, 26
/* 80084700 00080540 48 00 63 C9 */ bl btsnd_hcic_add_SCO_conn
/* 80084704 00080544 54 60 06 3F */ clrlwi. r0, r3, 24
/* 80084708 00080548 40 82 00 9C */ bne lbl_800847A4
/* 8008470C 0008054C 38 00 00 03 */ li r0, 0x3
/* 80084710 00080550 48 00 00 98 */ b lbl_800847A8
.global lbl_80084714
lbl_80084714:
/* 80084714 00080554 88 1C 06 36 */ lbz r0, 0x636(r28)
/* 80084718 00080558 A0 7C 06 56 */ lhz r3, 0x656(r28)
/* 8008471C 0008055C A0 9A 00 20 */ lhz r4, 0x20(r26)
/* 80084720 00080560 28 00 00 03 */ cmplwi r0, 0x3
/* 80084724 00080564 7C 80 18 38 */ and r0, r4, r3
/* 80084728 00080568 54 14 06 BE */ clrlwi r20, r0, 26
/* 8008472C 0008056C 41 80 00 14 */ blt lbl_80084740
/* 80084730 00080570 7C 80 1B 78 */ or r0, r4, r3
/* 80084734 00080574 54 00 05 B2 */ rlwinm r0, r0, 0, 22, 25
/* 80084738 00080578 7E 80 03 78 */ or r0, r20, r0
/* 8008473C 0008057C 54 14 04 3E */ clrlwi r20, r0, 16
.global lbl_80084740
lbl_80084740:
/* 80084740 00080580 88 1C 27 C0 */ lbz r0, 0x27c0(r28)
/* 80084744 00080584 28 00 00 03 */ cmplwi r0, 0x3
/* 80084748 00080588 41 80 00 28 */ blt lbl_80084770
/* 8008474C 0008058C 80 BA 00 14 */ lwz r5, 0x14(r26)
/* 80084750 00080590 38 7E 00 02 */ addi r3, r30, 0x2
/* 80084754 00080594 80 DA 00 18 */ lwz r6, 0x18(r26)
/* 80084758 00080598 38 95 C0 0C */ addi r4, r21, "@1974"@l
/* 8008475C 0008059C A0 FA 00 1C */ lhz r7, 0x1c(r26)
/* 80084760 000805A0 56 8A 04 3E */ clrlwi r10, r20, 16
/* 80084764 000805A4 A1 1A 00 1E */ lhz r8, 0x1e(r26)
/* 80084768 000805A8 89 3A 00 22 */ lbz r9, 0x22(r26)
/* 8008476C 000805AC 4B FF 31 F5 */ bl LogMsg_0
.global lbl_80084770
lbl_80084770:
/* 80084770 000805B0 80 9A 00 14 */ lwz r4, 0x14(r26)
/* 80084774 000805B4 57 A3 04 3E */ clrlwi r3, r29, 16
/* 80084778 000805B8 80 BA 00 18 */ lwz r5, 0x18(r26)
/* 8008477C 000805BC 56 89 04 3E */ clrlwi r9, r20, 16
/* 80084780 000805C0 A0 DA 00 1C */ lhz r6, 0x1c(r26)
/* 80084784 000805C4 A0 FA 00 1E */ lhz r7, 0x1e(r26)
/* 80084788 000805C8 89 1A 00 22 */ lbz r8, 0x22(r26)
/* 8008478C 000805CC 48 00 6D CD */ bl btsnd_hcic_setup_esco_conn
/* 80084790 000805D0 54 60 06 3F */ clrlwi. r0, r3, 24
/* 80084794 000805D4 40 82 00 0C */ bne lbl_800847A0
/* 80084798 000805D8 38 00 00 03 */ li r0, 0x3
/* 8008479C 000805DC 48 00 00 0C */ b lbl_800847A8
.global lbl_800847A0
lbl_800847A0:
/* 800847A0 000805E0 B2 9A 00 20 */ sth r20, 0x20(r26)
.global lbl_800847A4
lbl_800847A4:
/* 800847A4 000805E4 38 00 00 01 */ li r0, 0x1
.global lbl_800847A8
lbl_800847A8:
/* 800847A8 000805E8 28 00 00 01 */ cmplwi r0, 0x1
/* 800847AC 000805EC 40 82 00 08 */ bne lbl_800847B4
/* 800847B0 000805F0 B2 DA 00 08 */ sth r22, 0x8(r26)
.global lbl_800847B4
lbl_800847B4:
/* 800847B4 000805F4 3B 7B 00 01 */ addi r27, r27, 0x1
/* 800847B8 000805F8 3B 5A 00 34 */ addi r26, r26, 0x34
/* 800847BC 000805FC 28 1B 00 03 */ cmplwi r27, 0x3
/* 800847C0 00080600 41 80 FE D0 */ blt lbl_80084690
/* 800847C4 00080604 39 61 00 40 */ addi r11, r1, 0x40
/* 800847C8 00080608 4B F8 2B A5 */ bl lbl_8000736C
/* 800847CC 0008060C 80 01 00 44 */ lwz r0, 0x44(r1)
/* 800847D0 00080610 7C 08 03 A6 */ mtlr r0
/* 800847D4 00080614 38 21 00 40 */ addi r1, r1, 0x40
/* 800847D8 00080618 4E 80 00 20 */ blr
.global btm_sco_conn_req
btm_sco_conn_req:
/* 800847DC 0008061C 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 800847E0 00080620 7C 08 02 A6 */ mflr r0
/* 800847E4 00080624 90 01 00 34 */ stw r0, 0x34(r1)
/* 800847E8 00080628 39 61 00 30 */ addi r11, r1, 0x30
/* 800847EC 0008062C 4B F8 2B 51 */ bl lbl_8000733C
/* 800847F0 00080630 3C C0 80 4F */ lis r6, btm_cb@ha
/* 800847F4 00080634 7C 7E 1B 78 */ mr r30, r3
/* 800847F8 00080638 38 C6 5F 58 */ addi r6, r6, btm_cb@l
/* 800847FC 0008063C 7C 9D 23 78 */ mr r29, r4
/* 80084800 00080640 7C BF 2B 78 */ mr r31, r5
/* 80084804 00080644 3B 80 00 00 */ li r28, 0x0
/* 80084808 00080648 3B 66 18 54 */ addi r27, r6, 0x1854
.global lbl_8008480C
lbl_8008480C:
/* 8008480C 0008064C A0 7B 00 08 */ lhz r3, 0x8(r27)
/* 80084810 00080650 28 03 00 01 */ cmplwi r3, 0x1
/* 80084814 00080654 40 82 00 10 */ bne lbl_80084824
/* 80084818 00080658 88 1B 00 0D */ lbz r0, 0xd(r27)
/* 8008481C 0008065C 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084820 00080660 40 82 00 0C */ bne lbl_8008482C
.global lbl_80084824
lbl_80084824:
/* 80084824 00080664 28 03 00 03 */ cmplwi r3, 0x3
/* 80084828 00080668 40 82 00 A4 */ bne lbl_800848CC
.global lbl_8008482C
lbl_8008482C:
/* 8008482C 0008066C 7F C4 F3 78 */ mr r4, r30
/* 80084830 00080670 38 7B 00 28 */ addi r3, r27, 0x28
/* 80084834 00080674 38 A0 00 06 */ li r5, 0x6
/* 80084838 00080678 4B F8 66 39 */ bl memcmp
/* 8008483C 0008067C 2C 03 00 00 */ cmpwi r3, 0x0
/* 80084840 00080680 40 82 00 8C */ bne lbl_800848CC
/* 80084844 00080684 38 00 00 01 */ li r0, 0x1
/* 80084848 00080688 7F C4 F3 78 */ mr r4, r30
/* 8008484C 0008068C 98 1B 00 0D */ stb r0, 0xd(r27)
/* 80084850 00080690 38 7B 00 28 */ addi r3, r27, 0x28
/* 80084854 00080694 38 A0 00 06 */ li r5, 0x6
/* 80084858 00080698 9B FB 00 2E */ stb r31, 0x2e(r27)
/* 8008485C 0008069C 4B F7 F7 A5 */ bl memcpy
/* 80084860 000806A0 80 1B 00 10 */ lwz r0, 0x10(r27)
/* 80084864 000806A4 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084868 000806A8 40 82 00 1C */ bne lbl_80084884
/* 8008486C 000806AC 7F C5 F3 78 */ mr r5, r30
/* 80084870 000806B0 57 83 04 3E */ clrlwi r3, r28, 16
/* 80084874 000806B4 38 80 00 00 */ li r4, 0x0
/* 80084878 000806B8 38 C0 00 00 */ li r6, 0x0
/* 8008487C 000806BC 4B FF FB F9 */ bl btm_esco_conn_rsp
/* 80084880 000806C0 48 00 01 24 */ b lbl_800849A4
.global lbl_80084884
lbl_80084884:
/* 80084884 000806C4 7F C4 F3 78 */ mr r4, r30
/* 80084888 000806C8 38 61 00 0A */ addi r3, r1, 0xa
/* 8008488C 000806CC 38 A0 00 06 */ li r5, 0x6
/* 80084890 000806D0 4B F7 F7 71 */ bl memcpy
/* 80084894 000806D4 7F A4 EB 78 */ mr r4, r29
/* 80084898 000806D8 38 61 00 10 */ addi r3, r1, 0x10
/* 8008489C 000806DC 38 A0 00 03 */ li r5, 0x3
/* 800848A0 000806E0 4B F7 F7 61 */ bl memcpy
/* 800848A4 000806E4 38 00 00 02 */ li r0, 0x2
/* 800848A8 000806E8 9B E1 00 13 */ stb r31, 0x13(r1)
/* 800848AC 000806EC 38 81 00 08 */ addi r4, r1, 0x8
/* 800848B0 000806F0 38 60 00 02 */ li r3, 0x2
/* 800848B4 000806F4 B0 1B 00 08 */ sth r0, 0x8(r27)
/* 800848B8 000806F8 81 9B 00 10 */ lwz r12, 0x10(r27)
/* 800848BC 000806FC B3 81 00 08 */ sth r28, 0x8(r1)
/* 800848C0 00080700 7D 89 03 A6 */ mtctr r12
/* 800848C4 00080704 4E 80 04 21 */ bctrl
/* 800848C8 00080708 48 00 00 DC */ b lbl_800849A4
.global lbl_800848CC
lbl_800848CC:
/* 800848CC 0008070C 3B 9C 00 01 */ addi r28, r28, 0x1
/* 800848D0 00080710 3B 7B 00 34 */ addi r27, r27, 0x34
/* 800848D4 00080714 28 1C 00 03 */ cmplwi r28, 0x3
/* 800848D8 00080718 41 80 FF 34 */ blt lbl_8008480C
/* 800848DC 0008071C 3C 60 80 4F */ lis r3, btm_cb@ha
/* 800848E0 00080720 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 800848E4 00080724 80 03 18 50 */ lwz r0, 0x1850(r3)
/* 800848E8 00080728 2C 00 00 00 */ cmpwi r0, 0x0
/* 800848EC 0008072C 41 82 00 7C */ beq lbl_80084968
/* 800848F0 00080730 38 00 00 03 */ li r0, 0x3
/* 800848F4 00080734 3B 83 18 54 */ addi r28, r3, 0x1854
/* 800848F8 00080738 3B 60 00 00 */ li r27, 0x0
/* 800848FC 0008073C 7C 09 03 A6 */ mtctr r0
.global lbl_80084900
lbl_80084900:
/* 80084900 00080740 A0 1C 00 08 */ lhz r0, 0x8(r28)
/* 80084904 00080744 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084908 00080748 40 82 00 30 */ bne lbl_80084938
/* 8008490C 0008074C 38 00 00 00 */ li r0, 0x0
/* 80084910 00080750 3B A0 00 01 */ li r29, 0x1
/* 80084914 00080754 98 1C 00 0C */ stb r0, 0xc(r28)
/* 80084918 00080758 7F C4 F3 78 */ mr r4, r30
/* 8008491C 0008075C 38 7C 00 28 */ addi r3, r28, 0x28
/* 80084920 00080760 38 A0 00 06 */ li r5, 0x6
/* 80084924 00080764 B3 BC 00 08 */ sth r29, 0x8(r28)
/* 80084928 00080768 9B FC 00 2E */ stb r31, 0x2e(r28)
/* 8008492C 0008076C 4B F7 F6 D5 */ bl memcpy
/* 80084930 00080770 9B BC 00 0D */ stb r29, 0xd(r28)
/* 80084934 00080774 48 00 00 10 */ b lbl_80084944
.global lbl_80084938
lbl_80084938:
/* 80084938 00080778 3B 7B 00 01 */ addi r27, r27, 0x1
/* 8008493C 0008077C 3B 9C 00 34 */ addi r28, r28, 0x34
/* 80084940 00080780 42 00 FF C0 */ bdnz lbl_80084900
.global lbl_80084944
lbl_80084944:
/* 80084944 00080784 57 63 04 3E */ clrlwi r3, r27, 16
/* 80084948 00080788 28 03 00 03 */ cmplwi r3, 0x3
/* 8008494C 0008078C 40 80 00 1C */ bge lbl_80084968
/* 80084950 00080790 3C 80 80 4F */ lis r4, btm_cb@ha
/* 80084954 00080794 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 80084958 00080798 81 84 18 50 */ lwz r12, 0x1850(r4)
/* 8008495C 0008079C 7D 89 03 A6 */ mtctr r12
/* 80084960 000807A0 4E 80 04 21 */ bctrl
/* 80084964 000807A4 48 00 00 40 */ b lbl_800849A4
.global lbl_80084968
lbl_80084968:
/* 80084968 000807A8 3C 60 80 4F */ lis r3, btm_cb@ha
/* 8008496C 000807AC 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084970 000807B0 88 03 27 C0 */ lbz r0, 0x27c0(r3)
/* 80084974 000807B4 28 00 00 02 */ cmplwi r0, 0x2
/* 80084978 000807B8 41 80 00 18 */ blt lbl_80084990
/* 8008497C 000807BC 3C 60 00 0D */ lis r3, 0xd
/* 80084980 000807C0 3C 80 80 44 */ lis r4, "@2023"@ha
/* 80084984 000807C4 38 63 00 01 */ addi r3, r3, 0x1
/* 80084988 000807C8 38 84 C0 AC */ addi r4, r4, "@2023"@l
/* 8008498C 000807CC 4B FF 2F D5 */ bl LogMsg_0
.global lbl_80084990
lbl_80084990:
/* 80084990 000807D0 7F C5 F3 78 */ mr r5, r30
/* 80084994 000807D4 38 60 00 03 */ li r3, 0x3
/* 80084998 000807D8 38 80 00 0D */ li r4, 0xd
/* 8008499C 000807DC 38 C0 00 00 */ li r6, 0x0
/* 800849A0 000807E0 4B FF FA D5 */ bl btm_esco_conn_rsp
.global lbl_800849A4
lbl_800849A4:
/* 800849A4 000807E4 39 61 00 30 */ addi r11, r1, 0x30
/* 800849A8 000807E8 4B F8 29 E1 */ bl lbl_80007388
/* 800849AC 000807EC 80 01 00 34 */ lwz r0, 0x34(r1)
/* 800849B0 000807F0 7C 08 03 A6 */ mtlr r0
/* 800849B4 000807F4 38 21 00 30 */ addi r1, r1, 0x30
/* 800849B8 000807F8 4E 80 00 20 */ blr
.global btm_sco_connected
btm_sco_connected:
/* 800849BC 000807FC 94 21 FF D0 */ stwu r1, -0x30(r1)
/* 800849C0 00080800 7C 08 02 A6 */ mflr r0
/* 800849C4 00080804 90 01 00 34 */ stw r0, 0x34(r1)
/* 800849C8 00080808 39 61 00 30 */ addi r11, r1, 0x30
/* 800849CC 0008080C 4B F8 29 65 */ bl lbl_80007330
/* 800849D0 00080810 3C E0 80 4F */ lis r7, btm_cb@ha
/* 800849D4 00080814 7C 78 1B 78 */ mr r24, r3
/* 800849D8 00080818 38 E7 5F 58 */ addi r7, r7, btm_cb@l
/* 800849DC 0008081C 7C 99 23 78 */ mr r25, r4
/* 800849E0 00080820 B0 67 18 F6 */ sth r3, 0x18f6(r7)
/* 800849E4 00080824 7C BA 2B 78 */ mr r26, r5
/* 800849E8 00080828 7C DD 33 78 */ mr r29, r6
/* 800849EC 0008082C 3B E7 18 54 */ addi r31, r7, 0x1854
/* 800849F0 00080830 3B 60 00 00 */ li r27, 0x0
/* 800849F4 00080834 3B C0 00 00 */ li r30, 0x0
.global lbl_800849F8
lbl_800849F8:
/* 800849F8 00080838 A3 9F 00 08 */ lhz r28, 0x8(r31)
/* 800849FC 0008083C 3C 7C 00 01 */ addis r3, r28, 0x1
/* 80084A00 00080840 38 03 FF FF */ addi r0, r3, -0x1
/* 80084A04 00080844 54 00 04 3E */ clrlwi r0, r0, 16
/* 80084A08 00080848 28 00 00 02 */ cmplwi r0, 0x2
/* 80084A0C 0008084C 41 81 01 28 */ bgt lbl_80084B34
/* 80084A10 00080850 88 1F 00 0D */ lbz r0, 0xd(r31)
/* 80084A14 00080854 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084A18 00080858 41 82 01 1C */ beq lbl_80084B34
/* 80084A1C 0008085C 2C 19 00 00 */ cmpwi r25, 0x0
/* 80084A20 00080860 41 82 00 1C */ beq lbl_80084A3C
/* 80084A24 00080864 7F 24 CB 78 */ mr r4, r25
/* 80084A28 00080868 38 7F 00 28 */ addi r3, r31, 0x28
/* 80084A2C 0008086C 38 A0 00 06 */ li r5, 0x6
/* 80084A30 00080870 4B F8 64 41 */ bl memcmp
/* 80084A34 00080874 2C 03 00 00 */ cmpwi r3, 0x0
/* 80084A38 00080878 40 82 00 FC */ bne lbl_80084B34
.global lbl_80084A3C
lbl_80084A3C:
/* 80084A3C 0008087C 2C 18 00 00 */ cmpwi r24, 0x0
/* 80084A40 00080880 41 82 00 3C */ beq lbl_80084A7C
/* 80084A44 00080884 28 1C 00 03 */ cmplwi r28, 0x3
/* 80084A48 00080888 40 82 00 28 */ bne lbl_80084A70
/* 80084A4C 0008088C 28 18 00 23 */ cmplwi r24, 0x23
/* 80084A50 00080890 41 82 00 F4 */ beq lbl_80084B44
/* 80084A54 00080894 38 00 00 00 */ li r0, 0x0
/* 80084A58 00080898 57 C3 04 3E */ clrlwi r3, r30, 16
/* 80084A5C 0008089C B0 1F 00 08 */ sth r0, 0x8(r31)
/* 80084A60 000808A0 81 9F 00 04 */ lwz r12, 0x4(r31)
/* 80084A64 000808A4 7D 89 03 A6 */ mtctr r12
/* 80084A68 000808A8 4E 80 04 21 */ bctrl
/* 80084A6C 000808AC 48 00 00 D8 */ b lbl_80084B44
.global lbl_80084A70
lbl_80084A70:
/* 80084A70 000808B0 38 00 00 01 */ li r0, 0x1
/* 80084A74 000808B4 B0 1F 00 08 */ sth r0, 0x8(r31)
/* 80084A78 000808B8 48 00 00 CC */ b lbl_80084B44
.global lbl_80084A7C
lbl_80084A7C:
/* 80084A7C 000808BC 28 1C 00 01 */ cmplwi r28, 0x1
/* 80084A80 000808C0 40 82 00 08 */ bne lbl_80084A88
/* 80084A84 000808C4 3B 60 00 01 */ li r27, 0x1
.global lbl_80084A88
lbl_80084A88:
/* 80084A88 000808C8 38 00 00 04 */ li r0, 0x4
/* 80084A8C 000808CC 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084A90 000808D0 B0 1F 00 08 */ sth r0, 0x8(r31)
/* 80084A94 000808D4 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084A98 000808D8 B3 5F 00 0A */ sth r26, 0xa(r31)
/* 80084A9C 000808DC 88 03 19 08 */ lbz r0, 0x1908(r3)
/* 80084AA0 000808E0 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084AA4 000808E4 40 82 00 3C */ bne lbl_80084AE0
/* 80084AA8 000808E8 38 00 00 00 */ li r0, 0x0
/* 80084AAC 000808EC 2C 1B 00 00 */ cmpwi r27, 0x0
/* 80084AB0 000808F0 98 1F 00 2E */ stb r0, 0x2e(r31)
/* 80084AB4 000808F4 41 82 00 6C */ beq lbl_80084B20
/* 80084AB8 000808F8 A0 DF 00 20 */ lhz r6, 0x20(r31)
/* 80084ABC 000808FC 57 C3 04 3E */ clrlwi r3, r30, 16
/* 80084AC0 00080900 A0 BF 00 1C */ lhz r5, 0x1c(r31)
/* 80084AC4 00080904 38 81 00 08 */ addi r4, r1, 0x8
/* 80084AC8 00080908 88 1F 00 22 */ lbz r0, 0x22(r31)
/* 80084ACC 0008090C B0 C1 00 0A */ sth r6, 0xa(r1)
/* 80084AD0 00080910 B0 A1 00 08 */ sth r5, 0x8(r1)
/* 80084AD4 00080914 98 01 00 0C */ stb r0, 0xc(r1)
/* 80084AD8 00080918 48 00 03 8D */ bl BTM_ChangeEScoLinkParms
/* 80084ADC 0008091C 48 00 00 44 */ b lbl_80084B20
.global lbl_80084AE0
lbl_80084AE0:
/* 80084AE0 00080920 2C 1D 00 00 */ cmpwi r29, 0x0
/* 80084AE4 00080924 41 82 00 3C */ beq lbl_80084B20
/* 80084AE8 00080928 A0 7D 00 00 */ lhz r3, 0x0(r29)
/* 80084AEC 0008092C A0 1D 00 02 */ lhz r0, 0x2(r29)
/* 80084AF0 00080930 B0 7F 00 24 */ sth r3, 0x24(r31)
/* 80084AF4 00080934 B0 1F 00 26 */ sth r0, 0x26(r31)
/* 80084AF8 00080938 A0 7D 00 04 */ lhz r3, 0x4(r29)
/* 80084AFC 0008093C A0 1D 00 06 */ lhz r0, 0x6(r29)
/* 80084B00 00080940 B0 7F 00 28 */ sth r3, 0x28(r31)
/* 80084B04 00080944 B0 1F 00 2A */ sth r0, 0x2a(r31)
/* 80084B08 00080948 A0 1D 00 08 */ lhz r0, 0x8(r29)
/* 80084B0C 0008094C B0 1F 00 2C */ sth r0, 0x2c(r31)
/* 80084B10 00080950 A0 1D 00 0A */ lhz r0, 0xa(r29)
/* 80084B14 00080954 B0 1F 00 2E */ sth r0, 0x2e(r31)
/* 80084B18 00080958 A0 1D 00 0C */ lhz r0, 0xc(r29)
/* 80084B1C 0008095C B0 1F 00 30 */ sth r0, 0x30(r31)
.global lbl_80084B20
lbl_80084B20:
/* 80084B20 00080960 81 9F 00 00 */ lwz r12, 0x0(r31)
/* 80084B24 00080964 57 C3 04 3E */ clrlwi r3, r30, 16
/* 80084B28 00080968 7D 89 03 A6 */ mtctr r12
/* 80084B2C 0008096C 4E 80 04 21 */ bctrl
/* 80084B30 00080970 48 00 00 14 */ b lbl_80084B44
.global lbl_80084B34
lbl_80084B34:
/* 80084B34 00080974 3B DE 00 01 */ addi r30, r30, 0x1
/* 80084B38 00080978 3B FF 00 34 */ addi r31, r31, 0x34
/* 80084B3C 0008097C 28 1E 00 03 */ cmplwi r30, 0x3
/* 80084B40 00080980 41 80 FE B8 */ blt lbl_800849F8
.global lbl_80084B44
lbl_80084B44:
/* 80084B44 00080984 39 61 00 30 */ addi r11, r1, 0x30
/* 80084B48 00080988 4B F8 28 35 */ bl lbl_8000737C
/* 80084B4C 0008098C 80 01 00 34 */ lwz r0, 0x34(r1)
/* 80084B50 00080990 7C 08 03 A6 */ mtlr r0
/* 80084B54 00080994 38 21 00 30 */ addi r1, r1, 0x30
/* 80084B58 00080998 4E 80 00 20 */ blr
.global BTM_RemoveSco
BTM_RemoveSco:
/* 80084B5C 0008099C 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80084B60 000809A0 7C 08 02 A6 */ mflr r0
/* 80084B64 000809A4 3C 80 80 4F */ lis r4, btm_cb@ha
/* 80084B68 000809A8 28 03 00 03 */ cmplwi r3, 0x3
/* 80084B6C 000809AC 90 01 00 14 */ stw r0, 0x14(r1)
/* 80084B70 000809B0 1C 03 00 34 */ mulli r0, r3, 0x34
/* 80084B74 000809B4 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 80084B78 000809B8 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80084B7C 000809BC 7F E4 02 14 */ add r31, r4, r0
/* 80084B80 000809C0 93 C1 00 08 */ stw r30, 0x8(r1)
/* 80084B84 000809C4 40 80 00 10 */ bge lbl_80084B94
/* 80084B88 000809C8 A3 DF 18 5C */ lhz r30, 0x185c(r31)
/* 80084B8C 000809CC 2C 1E 00 00 */ cmpwi r30, 0x0
/* 80084B90 000809D0 40 82 00 0C */ bne lbl_80084B9C
.global lbl_80084B94
lbl_80084B94:
/* 80084B94 000809D4 38 60 00 07 */ li r3, 0x7
/* 80084B98 000809D8 48 00 00 64 */ b lbl_80084BFC
.global lbl_80084B9C
lbl_80084B9C:
/* 80084B9C 000809DC A0 1F 18 5E */ lhz r0, 0x185e(r31)
/* 80084BA0 000809E0 28 00 FF FF */ cmplwi r0, 0xffff
/* 80084BA4 000809E4 41 82 00 0C */ beq lbl_80084BB0
/* 80084BA8 000809E8 28 1E 00 06 */ cmplwi r30, 0x6
/* 80084BAC 000809EC 40 82 00 24 */ bne lbl_80084BD0
.global lbl_80084BB0
lbl_80084BB0:
/* 80084BB0 000809F0 3C 60 00 01 */ lis r3, 0x1
/* 80084BB4 000809F4 38 00 00 00 */ li r0, 0x0
/* 80084BB8 000809F8 38 83 FF FF */ addi r4, r3, -0x1
/* 80084BBC 000809FC B0 9F 18 5E */ sth r4, 0x185e(r31)
/* 80084BC0 00080A00 38 60 00 00 */ li r3, 0x0
/* 80084BC4 00080A04 B0 1F 18 5C */ sth r0, 0x185c(r31)
/* 80084BC8 00080A08 90 1F 18 64 */ stw r0, 0x1864(r31)
/* 80084BCC 00080A0C 48 00 00 30 */ b lbl_80084BFC
.global lbl_80084BD0
lbl_80084BD0:
/* 80084BD0 00080A10 38 00 00 05 */ li r0, 0x5
/* 80084BD4 00080A14 38 80 00 13 */ li r4, 0x13
/* 80084BD8 00080A18 B0 1F 18 5C */ sth r0, 0x185c(r31)
/* 80084BDC 00080A1C A0 7F 18 5E */ lhz r3, 0x185e(r31)
/* 80084BE0 00080A20 48 00 5E 61 */ bl btsnd_hcic_disconnect
/* 80084BE4 00080A24 54 60 06 3F */ clrlwi. r0, r3, 24
/* 80084BE8 00080A28 40 82 00 10 */ bne lbl_80084BF8
/* 80084BEC 00080A2C B3 DF 18 5C */ sth r30, 0x185c(r31)
/* 80084BF0 00080A30 38 60 00 03 */ li r3, 0x3
/* 80084BF4 00080A34 48 00 00 08 */ b lbl_80084BFC
.global lbl_80084BF8
lbl_80084BF8:
/* 80084BF8 00080A38 38 60 00 01 */ li r3, 0x1
.global lbl_80084BFC
lbl_80084BFC:
/* 80084BFC 00080A3C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80084C00 00080A40 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80084C04 00080A44 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 80084C08 00080A48 7C 08 03 A6 */ mtlr r0
/* 80084C0C 00080A4C 38 21 00 10 */ addi r1, r1, 0x10
/* 80084C10 00080A50 4E 80 00 20 */ blr
.global btm_remove_sco_links
btm_remove_sco_links:
/* 80084C14 00080A54 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80084C18 00080A58 7C 08 02 A6 */ mflr r0
/* 80084C1C 00080A5C 3C 80 80 4F */ lis r4, btm_cb@ha
/* 80084C20 00080A60 90 01 00 24 */ stw r0, 0x24(r1)
/* 80084C24 00080A64 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 80084C28 00080A68 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80084C2C 00080A6C 3B E4 18 54 */ addi r31, r4, 0x1854
/* 80084C30 00080A70 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80084C34 00080A74 3B C0 00 00 */ li r30, 0x0
/* 80084C38 00080A78 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80084C3C 00080A7C 7C 7D 1B 78 */ mr r29, r3
.global lbl_80084C40
lbl_80084C40:
/* 80084C40 00080A80 88 1F 00 0D */ lbz r0, 0xd(r31)
/* 80084C44 00080A84 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084C48 00080A88 41 82 00 24 */ beq lbl_80084C6C
/* 80084C4C 00080A8C 7F A4 EB 78 */ mr r4, r29
/* 80084C50 00080A90 38 7F 00 28 */ addi r3, r31, 0x28
/* 80084C54 00080A94 38 A0 00 06 */ li r5, 0x6
/* 80084C58 00080A98 4B F8 62 19 */ bl memcmp
/* 80084C5C 00080A9C 2C 03 00 00 */ cmpwi r3, 0x0
/* 80084C60 00080AA0 40 82 00 0C */ bne lbl_80084C6C
/* 80084C64 00080AA4 57 C3 04 3E */ clrlwi r3, r30, 16
/* 80084C68 00080AA8 4B FF FE F5 */ bl BTM_RemoveSco
.global lbl_80084C6C
lbl_80084C6C:
/* 80084C6C 00080AAC 3B DE 00 01 */ addi r30, r30, 0x1
/* 80084C70 00080AB0 3B FF 00 34 */ addi r31, r31, 0x34
/* 80084C74 00080AB4 28 1E 00 03 */ cmplwi r30, 0x3
/* 80084C78 00080AB8 41 80 FF C8 */ blt lbl_80084C40
/* 80084C7C 00080ABC 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80084C80 00080AC0 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80084C84 00080AC4 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80084C88 00080AC8 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80084C8C 00080ACC 7C 08 03 A6 */ mtlr r0
/* 80084C90 00080AD0 38 21 00 20 */ addi r1, r1, 0x20
/* 80084C94 00080AD4 4E 80 00 20 */ blr
.global btm_sco_removed
btm_sco_removed:
/* 80084C98 00080AD8 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 80084C9C 00080ADC 7C 08 02 A6 */ mflr r0
/* 80084CA0 00080AE0 3C A0 80 4F */ lis r5, btm_cb@ha
/* 80084CA4 00080AE4 90 01 00 14 */ stw r0, 0x14(r1)
/* 80084CA8 00080AE8 38 A5 5F 58 */ addi r5, r5, btm_cb@l
/* 80084CAC 00080AEC 93 E1 00 0C */ stw r31, 0xc(r1)
/* 80084CB0 00080AF0 7C 7F 1B 78 */ mr r31, r3
/* 80084CB4 00080AF4 38 60 00 00 */ li r3, 0x0
/* 80084CB8 00080AF8 B0 85 18 F6 */ sth r4, 0x18f6(r5)
/* 80084CBC 00080AFC A0 05 18 5C */ lhz r0, 0x185c(r5)
/* 80084CC0 00080B00 2C 00 00 07 */ cmpwi r0, 0x7
/* 80084CC4 00080B04 40 80 00 14 */ bge lbl_80084CD8
/* 80084CC8 00080B08 2C 00 00 02 */ cmpwi r0, 0x2
/* 80084CCC 00080B0C 40 80 00 08 */ bge lbl_80084CD4
/* 80084CD0 00080B10 48 00 00 08 */ b lbl_80084CD8
.global lbl_80084CD4
lbl_80084CD4:
/* 80084CD4 00080B14 38 60 00 01 */ li r3, 0x1
.global lbl_80084CD8
lbl_80084CD8:
/* 80084CD8 00080B18 A0 05 18 90 */ lhz r0, 0x1890(r5)
/* 80084CDC 00080B1C 2C 00 00 07 */ cmpwi r0, 0x7
/* 80084CE0 00080B20 40 80 00 14 */ bge lbl_80084CF4
/* 80084CE4 00080B24 2C 00 00 02 */ cmpwi r0, 0x2
/* 80084CE8 00080B28 40 80 00 08 */ bge lbl_80084CF0
/* 80084CEC 00080B2C 48 00 00 08 */ b lbl_80084CF4
.global lbl_80084CF0
lbl_80084CF0:
/* 80084CF0 00080B30 38 63 00 01 */ addi r3, r3, 0x1
.global lbl_80084CF4
lbl_80084CF4:
/* 80084CF4 00080B34 A0 05 18 C4 */ lhz r0, 0x18c4(r5)
/* 80084CF8 00080B38 2C 00 00 07 */ cmpwi r0, 0x7
/* 80084CFC 00080B3C 40 80 00 14 */ bge lbl_80084D10
/* 80084D00 00080B40 2C 00 00 02 */ cmpwi r0, 0x2
/* 80084D04 00080B44 40 80 00 08 */ bge lbl_80084D0C
/* 80084D08 00080B48 48 00 00 08 */ b lbl_80084D10
.global lbl_80084D0C
lbl_80084D0C:
/* 80084D0C 00080B4C 38 63 00 01 */ addi r3, r3, 0x1
.global lbl_80084D10
lbl_80084D10:
/* 80084D10 00080B50 54 60 06 3E */ clrlwi r0, r3, 24
/* 80084D14 00080B54 28 00 00 01 */ cmplwi r0, 0x1
/* 80084D18 00080B58 41 81 00 0C */ bgt lbl_80084D24
/* 80084D1C 00080B5C 38 60 00 00 */ li r3, 0x0
/* 80084D20 00080B60 4B FF AB E9 */ bl btm_chg_all_acl_pkt_types
.global lbl_80084D24
lbl_80084D24:
/* 80084D24 00080B64 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084D28 00080B68 38 00 00 03 */ li r0, 0x3
/* 80084D2C 00080B6C 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084D30 00080B70 38 C0 00 00 */ li r6, 0x0
/* 80084D34 00080B74 38 A3 18 54 */ addi r5, r3, 0x1854
/* 80084D38 00080B78 7C 09 03 A6 */ mtctr r0
.global lbl_80084D3C
lbl_80084D3C:
/* 80084D3C 00080B7C A0 05 00 08 */ lhz r0, 0x8(r5)
/* 80084D40 00080B80 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084D44 00080B84 41 82 00 48 */ beq lbl_80084D8C
/* 80084D48 00080B88 28 00 00 01 */ cmplwi r0, 0x1
/* 80084D4C 00080B8C 41 82 00 40 */ beq lbl_80084D8C
/* 80084D50 00080B90 A0 05 00 0A */ lhz r0, 0xa(r5)
/* 80084D54 00080B94 7C 00 F8 40 */ cmplw r0, r31
/* 80084D58 00080B98 40 82 00 34 */ bne lbl_80084D8C
/* 80084D5C 00080B9C 38 80 00 00 */ li r4, 0x0
/* 80084D60 00080BA0 3C 60 00 01 */ lis r3, 0x1
/* 80084D64 00080BA4 B0 85 00 08 */ sth r4, 0x8(r5)
/* 80084D68 00080BA8 38 03 FF FF */ addi r0, r3, -0x1
/* 80084D6C 00080BAC 54 C3 04 3E */ clrlwi r3, r6, 16
/* 80084D70 00080BB0 B0 05 00 0A */ sth r0, 0xa(r5)
/* 80084D74 00080BB4 98 85 00 0D */ stb r4, 0xd(r5)
/* 80084D78 00080BB8 90 85 00 10 */ stw r4, 0x10(r5)
/* 80084D7C 00080BBC 81 85 00 04 */ lwz r12, 0x4(r5)
/* 80084D80 00080BC0 7D 89 03 A6 */ mtctr r12
/* 80084D84 00080BC4 4E 80 04 21 */ bctrl
/* 80084D88 00080BC8 48 00 00 10 */ b lbl_80084D98
.global lbl_80084D8C
lbl_80084D8C:
/* 80084D8C 00080BCC 38 C6 00 01 */ addi r6, r6, 0x1
/* 80084D90 00080BD0 38 A5 00 34 */ addi r5, r5, 0x34
/* 80084D94 00080BD4 42 00 FF A8 */ bdnz lbl_80084D3C
.global lbl_80084D98
lbl_80084D98:
/* 80084D98 00080BD8 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80084D9C 00080BDC 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80084DA0 00080BE0 7C 08 03 A6 */ mtlr r0
/* 80084DA4 00080BE4 38 21 00 10 */ addi r1, r1, 0x10
/* 80084DA8 00080BE8 4E 80 00 20 */ blr
.global btm_sco_acl_removed
btm_sco_acl_removed:
/* 80084DAC 00080BEC 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80084DB0 00080BF0 7C 08 02 A6 */ mflr r0
/* 80084DB4 00080BF4 3C 80 80 4F */ lis r4, btm_cb@ha
/* 80084DB8 00080BF8 90 01 00 24 */ stw r0, 0x24(r1)
/* 80084DBC 00080BFC 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 80084DC0 00080C00 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 80084DC4 00080C04 3B E0 00 00 */ li r31, 0x0
/* 80084DC8 00080C08 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80084DCC 00080C0C 3B C4 18 54 */ addi r30, r4, 0x1854
/* 80084DD0 00080C10 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80084DD4 00080C14 3B A0 00 00 */ li r29, 0x0
/* 80084DD8 00080C18 93 81 00 10 */ stw r28, 0x10(r1)
/* 80084DDC 00080C1C 7C 7C 1B 78 */ mr r28, r3
.global lbl_80084DE0
lbl_80084DE0:
/* 80084DE0 00080C20 A0 1E 00 08 */ lhz r0, 0x8(r30)
/* 80084DE4 00080C24 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084DE8 00080C28 41 82 00 48 */ beq lbl_80084E30
/* 80084DEC 00080C2C 2C 1C 00 00 */ cmpwi r28, 0x0
/* 80084DF0 00080C30 41 82 00 28 */ beq lbl_80084E18
/* 80084DF4 00080C34 7F 84 E3 78 */ mr r4, r28
/* 80084DF8 00080C38 38 7E 00 28 */ addi r3, r30, 0x28
/* 80084DFC 00080C3C 38 A0 00 06 */ li r5, 0x6
/* 80084E00 00080C40 4B F8 60 71 */ bl memcmp
/* 80084E04 00080C44 2C 03 00 00 */ cmpwi r3, 0x0
/* 80084E08 00080C48 40 82 00 28 */ bne lbl_80084E30
/* 80084E0C 00080C4C 88 1E 00 0D */ lbz r0, 0xd(r30)
/* 80084E10 00080C50 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084E14 00080C54 41 82 00 1C */ beq lbl_80084E30
.global lbl_80084E18
lbl_80084E18:
/* 80084E18 00080C58 B3 FE 00 08 */ sth r31, 0x8(r30)
/* 80084E1C 00080C5C 57 A3 04 3E */ clrlwi r3, r29, 16
/* 80084E20 00080C60 93 FE 00 10 */ stw r31, 0x10(r30)
/* 80084E24 00080C64 81 9E 00 04 */ lwz r12, 0x4(r30)
/* 80084E28 00080C68 7D 89 03 A6 */ mtctr r12
/* 80084E2C 00080C6C 4E 80 04 21 */ bctrl
.global lbl_80084E30
lbl_80084E30:
/* 80084E30 00080C70 3B BD 00 01 */ addi r29, r29, 0x1
/* 80084E34 00080C74 3B DE 00 34 */ addi r30, r30, 0x34
/* 80084E38 00080C78 28 1D 00 03 */ cmplwi r29, 0x3
/* 80084E3C 00080C7C 41 80 FF A4 */ blt lbl_80084DE0
/* 80084E40 00080C80 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80084E44 00080C84 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80084E48 00080C88 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80084E4C 00080C8C 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 80084E50 00080C90 83 81 00 10 */ lwz r28, 0x10(r1)
/* 80084E54 00080C94 7C 08 03 A6 */ mtlr r0
/* 80084E58 00080C98 38 21 00 20 */ addi r1, r1, 0x20
/* 80084E5C 00080C9C 4E 80 00 20 */ blr
.global btm_route_sco_data
btm_route_sco_data:
/* 80084E60 00080CA0 4B FF 00 B0 */ b GKI_freebuf
.global BTM_ChangeEScoLinkParms
BTM_ChangeEScoLinkParms:
/* 80084E64 00080CA4 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 80084E68 00080CA8 7C 08 02 A6 */ mflr r0
/* 80084E6C 00080CAC 90 01 00 24 */ stw r0, 0x24(r1)
/* 80084E70 00080CB0 39 61 00 20 */ addi r11, r1, 0x20
/* 80084E74 00080CB4 4B F8 24 C9 */ bl lbl_8000733C
/* 80084E78 00080CB8 28 03 00 03 */ cmplwi r3, 0x3
/* 80084E7C 00080CBC 3F C0 80 44 */ lis r30, "@1903"@ha
/* 80084E80 00080CC0 7C 9C 23 78 */ mr r28, r4
/* 80084E84 00080CC4 3B DE BF 80 */ addi r30, r30, "@1903"@l
/* 80084E88 00080CC8 40 80 00 20 */ bge lbl_80084EA8
/* 80084E8C 00080CCC 1C 03 00 34 */ mulli r0, r3, 0x34
/* 80084E90 00080CD0 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084E94 00080CD4 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084E98 00080CD8 7F E3 02 14 */ add r31, r3, r0
/* 80084E9C 00080CDC A0 1F 18 5C */ lhz r0, 0x185c(r31)
/* 80084EA0 00080CE0 28 00 00 04 */ cmplwi r0, 0x4
/* 80084EA4 00080CE4 41 82 00 0C */ beq lbl_80084EB0
.global lbl_80084EA8
lbl_80084EA8:
/* 80084EA8 00080CE8 38 60 00 06 */ li r3, 0x6
/* 80084EAC 00080CEC 48 00 01 48 */ b lbl_80084FF4
.global lbl_80084EB0
lbl_80084EB0:
/* 80084EB0 00080CF0 88 1F 18 82 */ lbz r0, 0x1882(r31)
/* 80084EB4 00080CF4 3B BF 18 68 */ addi r29, r31, 0x1868
/* 80084EB8 00080CF8 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084EBC 00080CFC 41 82 00 10 */ beq lbl_80084ECC
/* 80084EC0 00080D00 88 03 19 08 */ lbz r0, 0x1908(r3)
/* 80084EC4 00080D04 2C 00 00 00 */ cmpwi r0, 0x0
/* 80084EC8 00080D08 40 82 00 64 */ bne lbl_80084F2C
.global lbl_80084ECC
lbl_80084ECC:
/* 80084ECC 00080D0C 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084ED0 00080D10 A0 84 00 02 */ lhz r4, 0x2(r4)
/* 80084ED4 00080D14 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084ED8 00080D18 A0 03 06 56 */ lhz r0, 0x656(r3)
/* 80084EDC 00080D1C 54 00 07 7E */ clrlwi r0, r0, 29
/* 80084EE0 00080D20 7C 80 00 38 */ and r0, r4, r0
/* 80084EE4 00080D24 B0 1D 00 0C */ sth r0, 0xc(r29)
/* 80084EE8 00080D28 88 03 27 C0 */ lbz r0, 0x27c0(r3)
/* 80084EEC 00080D2C 28 00 00 03 */ cmplwi r0, 0x3
/* 80084EF0 00080D30 41 80 00 1C */ blt lbl_80084F0C
/* 80084EF4 00080D34 3C 60 00 0D */ lis r3, 0xd
/* 80084EF8 00080D38 A0 BF 18 5E */ lhz r5, 0x185e(r31)
/* 80084EFC 00080D3C A0 DD 00 0C */ lhz r6, 0xc(r29)
/* 80084F00 00080D40 38 63 00 02 */ addi r3, r3, 0x2
/* 80084F04 00080D44 38 9E 02 48 */ addi r4, r30, 0x248
/* 80084F08 00080D48 4B FF 2A 59 */ bl LogMsg_0
.global lbl_80084F0C
lbl_80084F0C:
/* 80084F0C 00080D4C A0 1D 00 0C */ lhz r0, 0xc(r29)
/* 80084F10 00080D50 A0 7F 18 5E */ lhz r3, 0x185e(r31)
/* 80084F14 00080D54 54 04 2E 34 */ rlwinm r4, r0, 5, 24, 26
/* 80084F18 00080D58 48 00 61 BD */ bl btsnd_hcic_change_conn_type
/* 80084F1C 00080D5C 54 60 06 3F */ clrlwi. r0, r3, 24
/* 80084F20 00080D60 40 82 00 D0 */ bne lbl_80084FF0
/* 80084F24 00080D64 38 60 00 03 */ li r3, 0x3
/* 80084F28 00080D68 48 00 00 CC */ b lbl_80084FF4
.global lbl_80084F2C
lbl_80084F2C:
/* 80084F2C 00080D6C 88 03 06 36 */ lbz r0, 0x636(r3)
/* 80084F30 00080D70 A0 63 06 56 */ lhz r3, 0x656(r3)
/* 80084F34 00080D74 A0 84 00 02 */ lhz r4, 0x2(r4)
/* 80084F38 00080D78 28 00 00 03 */ cmplwi r0, 0x3
/* 80084F3C 00080D7C 7C 80 18 38 */ and r0, r4, r3
/* 80084F40 00080D80 54 1B 06 BE */ clrlwi r27, r0, 26
/* 80084F44 00080D84 41 80 00 14 */ blt lbl_80084F58
/* 80084F48 00080D88 7C 80 1B 78 */ or r0, r4, r3
/* 80084F4C 00080D8C 54 00 05 B2 */ rlwinm r0, r0, 0, 22, 25
/* 80084F50 00080D90 7F 60 03 78 */ or r0, r27, r0
/* 80084F54 00080D94 54 1B 04 3E */ clrlwi r27, r0, 16
.global lbl_80084F58
lbl_80084F58:
/* 80084F58 00080D98 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084F5C 00080D9C 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084F60 00080DA0 88 03 27 C0 */ lbz r0, 0x27c0(r3)
/* 80084F64 00080DA4 28 00 00 03 */ cmplwi r0, 0x3
/* 80084F68 00080DA8 41 80 00 18 */ blt lbl_80084F80
/* 80084F6C 00080DAC 3C 60 00 0D */ lis r3, 0xd
/* 80084F70 00080DB0 A0 BF 18 5E */ lhz r5, 0x185e(r31)
/* 80084F74 00080DB4 38 63 00 02 */ addi r3, r3, 0x2
/* 80084F78 00080DB8 38 9E 02 8C */ addi r4, r30, 0x28c
/* 80084F7C 00080DBC 4B FF 29 E5 */ bl LogMsg_0
.global lbl_80084F80
lbl_80084F80:
/* 80084F80 00080DC0 3C 60 80 4F */ lis r3, btm_cb@ha
/* 80084F84 00080DC4 38 63 5F 58 */ addi r3, r3, btm_cb@l
/* 80084F88 00080DC8 88 03 27 C0 */ lbz r0, 0x27c0(r3)
/* 80084F8C 00080DCC 28 00 00 03 */ cmplwi r0, 0x3
/* 80084F90 00080DD0 41 80 00 2C */ blt lbl_80084FBC
/* 80084F94 00080DD4 3C 60 00 0D */ lis r3, 0xd
/* 80084F98 00080DD8 80 BD 00 00 */ lwz r5, 0x0(r29)
/* 80084F9C 00080DDC 80 DD 00 04 */ lwz r6, 0x4(r29)
/* 80084FA0 00080DE0 38 63 00 02 */ addi r3, r3, 0x2
/* 80084FA4 00080DE4 A0 FC 00 00 */ lhz r7, 0x0(r28)
/* 80084FA8 00080DE8 38 9E 00 8C */ addi r4, r30, 0x8c
/* 80084FAC 00080DEC A1 1D 00 0A */ lhz r8, 0xa(r29)
/* 80084FB0 00080DF0 57 6A 04 3E */ clrlwi r10, r27, 16
/* 80084FB4 00080DF4 89 3C 00 04 */ lbz r9, 0x4(r28)
/* 80084FB8 00080DF8 4B FF 29 A9 */ bl LogMsg_0
.global lbl_80084FBC
lbl_80084FBC:
/* 80084FBC 00080DFC A0 7F 18 5E */ lhz r3, 0x185e(r31)
/* 80084FC0 00080E00 57 69 04 3E */ clrlwi r9, r27, 16
/* 80084FC4 00080E04 80 9D 00 00 */ lwz r4, 0x0(r29)
/* 80084FC8 00080E08 80 BD 00 04 */ lwz r5, 0x4(r29)
/* 80084FCC 00080E0C A0 DC 00 00 */ lhz r6, 0x0(r28)
/* 80084FD0 00080E10 A0 FD 00 0A */ lhz r7, 0xa(r29)
/* 80084FD4 00080E14 89 1C 00 04 */ lbz r8, 0x4(r28)
/* 80084FD8 00080E18 48 00 65 81 */ bl btsnd_hcic_setup_esco_conn
/* 80084FDC 00080E1C 54 60 06 3F */ clrlwi. r0, r3, 24
/* 80084FE0 00080E20 40 82 00 0C */ bne lbl_80084FEC
/* 80084FE4 00080E24 38 60 00 03 */ li r3, 0x3
/* 80084FE8 00080E28 48 00 00 0C */ b lbl_80084FF4
.global lbl_80084FEC
lbl_80084FEC:
/* 80084FEC 00080E2C B3 7C 00 02 */ sth r27, 0x2(r28)
.global lbl_80084FF0
lbl_80084FF0:
/* 80084FF0 00080E30 38 60 00 01 */ li r3, 0x1
.global lbl_80084FF4
lbl_80084FF4:
/* 80084FF4 00080E34 39 61 00 20 */ addi r11, r1, 0x20
/* 80084FF8 00080E38 4B F8 23 91 */ bl lbl_80007388
/* 80084FFC 00080E3C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80085000 00080E40 7C 08 03 A6 */ mtlr r0
/* 80085004 00080E44 38 21 00 20 */ addi r1, r1, 0x20
/* 80085008 00080E48 4E 80 00 20 */ blr
.global btm_esco_proc_conn_chg
btm_esco_proc_conn_chg:
/* 8008500C 00080E4C 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 80085010 00080E50 7C 08 02 A6 */ mflr r0
/* 80085014 00080E54 90 01 00 44 */ stw r0, 0x44(r1)
/* 80085018 00080E58 39 61 00 40 */ addi r11, r1, 0x40
/* 8008501C 00080E5C 4B F8 23 15 */ bl lbl_80007330
/* 80085020 00080E60 3D 20 80 4F */ lis r9, btm_cb@ha
/* 80085024 00080E64 7C 78 1B 78 */ mr r24, r3
/* 80085028 00080E68 39 29 5F 58 */ addi r9, r9, btm_cb@l
/* 8008502C 00080E6C 7C 99 23 78 */ mr r25, r4
/* 80085030 00080E70 88 09 27 C0 */ lbz r0, 0x27c0(r9)
/* 80085034 00080E74 7C BA 2B 78 */ mr r26, r5
/* 80085038 00080E78 7C DB 33 78 */ mr r27, r6
/* 8008503C 00080E7C 7C FC 3B 78 */ mr r28, r7
/* 80085040 00080E80 28 00 00 04 */ cmplwi r0, 0x4
/* 80085044 00080E84 7D 1D 43 78 */ mr r29, r8
/* 80085048 00080E88 3B E9 18 54 */ addi r31, r9, 0x1854
/* 8008504C 00080E8C 41 80 00 20 */ blt lbl_8008506C
/* 80085050 00080E90 3C 60 00 0D */ lis r3, 0xd
/* 80085054 00080E94 3C 80 80 44 */ lis r4, "@2157"@ha
/* 80085058 00080E98 7F 25 CB 78 */ mr r5, r25
/* 8008505C 00080E9C 7F 06 C3 78 */ mr r6, r24
/* 80085060 00080EA0 38 63 00 03 */ addi r3, r3, 0x3
/* 80085064 00080EA4 38 84 C2 44 */ addi r4, r4, "@2157"@l
/* 80085068 00080EA8 4B FF 28 F9 */ bl LogMsg_0
.global lbl_8008506C
lbl_8008506C:
/* 8008506C 00080EAC 38 00 00 03 */ li r0, 0x3
/* 80085070 00080EB0 3B C0 00 00 */ li r30, 0x0
/* 80085074 00080EB4 7C 09 03 A6 */ mtctr r0
.global lbl_80085078
lbl_80085078:
/* 80085078 00080EB8 A0 1F 00 08 */ lhz r0, 0x8(r31)
/* 8008507C 00080EBC 28 00 00 04 */ cmplwi r0, 0x4
/* 80085080 00080EC0 40 82 00 6C */ bne lbl_800850EC
/* 80085084 00080EC4 A0 1F 00 0A */ lhz r0, 0xa(r31)
/* 80085088 00080EC8 7C 19 00 40 */ cmplw r25, r0
/* 8008508C 00080ECC 40 82 00 60 */ bne lbl_800850EC
/* 80085090 00080ED0 80 1F 00 10 */ lwz r0, 0x10(r31)
/* 80085094 00080ED4 2C 00 00 00 */ cmpwi r0, 0x0
/* 80085098 00080ED8 41 82 00 60 */ beq lbl_800850F8
/* 8008509C 00080EDC 38 61 00 0E */ addi r3, r1, 0xe
/* 800850A0 00080EE0 38 9F 00 28 */ addi r4, r31, 0x28
/* 800850A4 00080EE4 38 A0 00 06 */ li r5, 0x6
/* 800850A8 00080EE8 4B F7 EF 59 */ bl memcpy
/* 800850AC 00080EEC B3 9F 00 24 */ sth r28, 0x24(r31)
/* 800850B0 00080EF0 38 81 00 08 */ addi r4, r1, 0x8
/* 800850B4 00080EF4 38 60 00 01 */ li r3, 0x1
/* 800850B8 00080EF8 B3 BF 00 26 */ sth r29, 0x26(r31)
/* 800850BC 00080EFC 9B 5F 00 2F */ stb r26, 0x2f(r31)
/* 800850C0 00080F00 9B 7F 00 30 */ stb r27, 0x30(r31)
/* 800850C4 00080F04 81 9F 00 10 */ lwz r12, 0x10(r31)
/* 800850C8 00080F08 9B 01 00 14 */ stb r24, 0x14(r1)
/* 800850CC 00080F0C B3 C1 00 08 */ sth r30, 0x8(r1)
/* 800850D0 00080F10 B3 81 00 0A */ sth r28, 0xa(r1)
/* 800850D4 00080F14 B3 A1 00 0C */ sth r29, 0xc(r1)
/* 800850D8 00080F18 9B 41 00 15 */ stb r26, 0x15(r1)
/* 800850DC 00080F1C 9B 61 00 16 */ stb r27, 0x16(r1)
/* 800850E0 00080F20 7D 89 03 A6 */ mtctr r12
/* 800850E4 00080F24 4E 80 04 21 */ bctrl
/* 800850E8 00080F28 48 00 00 10 */ b lbl_800850F8
.global lbl_800850EC
lbl_800850EC:
/* 800850EC 00080F2C 3B DE 00 01 */ addi r30, r30, 0x1
/* 800850F0 00080F30 3B FF 00 34 */ addi r31, r31, 0x34
/* 800850F4 00080F34 42 00 FF 84 */ bdnz lbl_80085078
.global lbl_800850F8
lbl_800850F8:
/* 800850F8 00080F38 39 61 00 40 */ addi r11, r1, 0x40
/* 800850FC 00080F3C 4B F8 22 81 */ bl lbl_8000737C
/* 80085100 00080F40 80 01 00 44 */ lwz r0, 0x44(r1)
/* 80085104 00080F44 7C 08 03 A6 */ mtlr r0
/* 80085108 00080F48 38 21 00 40 */ addi r1, r1, 0x40
/* 8008510C 00080F4C 4E 80 00 20 */ blr
.global btm_is_sco_active
btm_is_sco_active:
/* 80085110 00080F50 3C 80 80 4F */ lis r4, btm_cb@ha
/* 80085114 00080F54 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 80085118 00080F58 A0 04 18 5E */ lhz r0, 0x185e(r4)
/* 8008511C 00080F5C 7C 03 00 40 */ cmplw r3, r0
/* 80085120 00080F60 40 82 00 18 */ bne lbl_80085138
/* 80085124 00080F64 A0 04 18 5C */ lhz r0, 0x185c(r4)
/* 80085128 00080F68 28 00 00 04 */ cmplwi r0, 0x4
/* 8008512C 00080F6C 40 82 00 0C */ bne lbl_80085138
/* 80085130 00080F70 38 60 00 01 */ li r3, 0x1
/* 80085134 00080F74 4E 80 00 20 */ blr
.global lbl_80085138
lbl_80085138:
/* 80085138 00080F78 A0 04 18 92 */ lhz r0, 0x1892(r4)
/* 8008513C 00080F7C 7C 03 00 40 */ cmplw r3, r0
/* 80085140 00080F80 40 82 00 18 */ bne lbl_80085158
/* 80085144 00080F84 A0 04 18 90 */ lhz r0, 0x1890(r4)
/* 80085148 00080F88 28 00 00 04 */ cmplwi r0, 0x4
/* 8008514C 00080F8C 40 82 00 0C */ bne lbl_80085158
/* 80085150 00080F90 38 60 00 01 */ li r3, 0x1
/* 80085154 00080F94 4E 80 00 20 */ blr
.global lbl_80085158
lbl_80085158:
/* 80085158 00080F98 A0 04 18 C6 */ lhz r0, 0x18c6(r4)
/* 8008515C 00080F9C 7C 03 00 40 */ cmplw r3, r0
/* 80085160 00080FA0 40 82 00 18 */ bne lbl_80085178
/* 80085164 00080FA4 A0 04 18 C4 */ lhz r0, 0x18c4(r4)
/* 80085168 00080FA8 28 00 00 04 */ cmplwi r0, 0x4
/* 8008516C 00080FAC 40 82 00 0C */ bne lbl_80085178
/* 80085170 00080FB0 38 60 00 01 */ li r3, 0x1
/* 80085174 00080FB4 4E 80 00 20 */ blr
.global lbl_80085178
lbl_80085178:
/* 80085178 00080FB8 38 60 00 00 */ li r3, 0x0
/* 8008517C 00080FBC 4E 80 00 20 */ blr
.global btm_num_sco_links_active
btm_num_sco_links_active:
/* 80085180 00080FC0 3C 80 80 4F */ lis r4, btm_cb@ha
/* 80085184 00080FC4 38 60 00 00 */ li r3, 0x0
/* 80085188 00080FC8 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 8008518C 00080FCC A0 04 18 5C */ lhz r0, 0x185c(r4)
/* 80085190 00080FD0 2C 00 00 07 */ cmpwi r0, 0x7
/* 80085194 00080FD4 40 80 00 14 */ bge lbl_800851A8
/* 80085198 00080FD8 2C 00 00 02 */ cmpwi r0, 0x2
/* 8008519C 00080FDC 40 80 00 08 */ bge lbl_800851A4
/* 800851A0 00080FE0 48 00 00 08 */ b lbl_800851A8
.global lbl_800851A4
lbl_800851A4:
/* 800851A4 00080FE4 38 60 00 01 */ li r3, 0x1
.global lbl_800851A8
lbl_800851A8:
/* 800851A8 00080FE8 A0 04 18 90 */ lhz r0, 0x1890(r4)
/* 800851AC 00080FEC 2C 00 00 07 */ cmpwi r0, 0x7
/* 800851B0 00080FF0 40 80 00 14 */ bge lbl_800851C4
/* 800851B4 00080FF4 2C 00 00 02 */ cmpwi r0, 0x2
/* 800851B8 00080FF8 40 80 00 08 */ bge lbl_800851C0
/* 800851BC 00080FFC 48 00 00 08 */ b lbl_800851C4
.global lbl_800851C0
lbl_800851C0:
/* 800851C0 00081000 38 63 00 01 */ addi r3, r3, 0x1
.global lbl_800851C4
lbl_800851C4:
/* 800851C4 00081004 A0 04 18 C4 */ lhz r0, 0x18c4(r4)
/* 800851C8 00081008 2C 00 00 07 */ cmpwi r0, 0x7
/* 800851CC 0008100C 4C 80 00 20 */ bgelr
/* 800851D0 00081010 2C 00 00 02 */ cmpwi r0, 0x2
/* 800851D4 00081014 4D 80 00 20 */ bltlr
/* 800851D8 00081018 38 63 00 01 */ addi r3, r3, 0x1
/* 800851DC 0008101C 4E 80 00 20 */ blr
.global btm_is_sco_active_by_bdaddr
btm_is_sco_active_by_bdaddr:
/* 800851E0 00081020 94 21 FF E0 */ stwu r1, -0x20(r1)
/* 800851E4 00081024 7C 08 02 A6 */ mflr r0
/* 800851E8 00081028 3C 80 80 4F */ lis r4, btm_cb@ha
/* 800851EC 0008102C 90 01 00 24 */ stw r0, 0x24(r1)
/* 800851F0 00081030 38 84 5F 58 */ addi r4, r4, btm_cb@l
/* 800851F4 00081034 93 E1 00 1C */ stw r31, 0x1c(r1)
/* 800851F8 00081038 3B E0 00 00 */ li r31, 0x0
/* 800851FC 0008103C 93 C1 00 18 */ stw r30, 0x18(r1)
/* 80085200 00081040 3B C4 18 54 */ addi r30, r4, 0x1854
/* 80085204 00081044 93 A1 00 14 */ stw r29, 0x14(r1)
/* 80085208 00081048 7C 7D 1B 78 */ mr r29, r3
.global lbl_8008520C
lbl_8008520C:
/* 8008520C 0008104C 7F A4 EB 78 */ mr r4, r29
/* 80085210 00081050 38 7E 00 28 */ addi r3, r30, 0x28
/* 80085214 00081054 38 A0 00 06 */ li r5, 0x6
/* 80085218 00081058 4B F8 5C 59 */ bl memcmp
/* 8008521C 0008105C 2C 03 00 00 */ cmpwi r3, 0x0
/* 80085220 00081060 40 82 00 18 */ bne lbl_80085238
/* 80085224 00081064 A0 1E 00 08 */ lhz r0, 0x8(r30)
/* 80085228 00081068 28 00 00 04 */ cmplwi r0, 0x4
/* 8008522C 0008106C 40 82 00 0C */ bne lbl_80085238
/* 80085230 00081070 38 60 00 01 */ li r3, 0x1
/* 80085234 00081074 48 00 00 18 */ b lbl_8008524C
.global lbl_80085238
lbl_80085238:
/* 80085238 00081078 3B FF 00 01 */ addi r31, r31, 0x1
/* 8008523C 0008107C 3B DE 00 34 */ addi r30, r30, 0x34
/* 80085240 00081080 28 1F 00 03 */ cmplwi r31, 0x3
/* 80085244 00081084 41 80 FF C8 */ blt lbl_8008520C
/* 80085248 00081088 38 60 00 00 */ li r3, 0x0
.global lbl_8008524C
lbl_8008524C:
/* 8008524C 0008108C 80 01 00 24 */ lwz r0, 0x24(r1)
/* 80085250 00081090 83 E1 00 1C */ lwz r31, 0x1c(r1)
/* 80085254 00081094 83 C1 00 18 */ lwz r30, 0x18(r1)
/* 80085258 00081098 83 A1 00 14 */ lwz r29, 0x14(r1)
/* 8008525C 0008109C 7C 08 03 A6 */ mtlr r0
/* 80085260 000810A0 38 21 00 20 */ addi r1, r1, 0x20
/* 80085264 000810A4 4E 80 00 20 */ blr
.include "macros.inc"
.section .rodata, "wa" # 0x80406560 - 0x80421040 ; 0x0001AAE0
.global btm_esco_defaults
btm_esco_defaults:
.4byte 0x00001F40
.4byte 0x00001F40
.4byte 0x000A0060
.4byte 0x003F0100
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global "@1903"
"@1903":
.4byte 0x62746D5F
.4byte 0x6573636F
.4byte 0x5F636F6E
.4byte 0x6E5F7273
.4byte 0x70202D3E
.4byte 0x204E6F20
.4byte 0x5265736F
.4byte 0x75726365
.4byte 0x73000000
.4byte 0x54435320
.4byte 0x61636365
.4byte 0x70742053
.4byte 0x434F3A20
.4byte 0x5061636B
.4byte 0x65742054
.4byte 0x79706573
.4byte 0x20307825
.4byte 0x30347800
.4byte 0x42544D5F
.4byte 0x43726561
.4byte 0x74655363
.4byte 0x6F202D3E
.4byte 0x20286529
.4byte 0x53434F20
.4byte 0x4C696E6B
.4byte 0x20666F72
.4byte 0x2041434C
.4byte 0x2068616E
.4byte 0x646C6520
.4byte 0x30782530
.4byte 0x34782C20
.4byte 0x44657369
.4byte 0x72656420
.4byte 0x54797065
.4byte 0x20256400
.global "@1974"
"@1974":
.4byte 0x20202020
.4byte 0x20207478
.4byte 0x62772030
.4byte 0x7825782C
.4byte 0x20727862
.4byte 0x77203078
.4byte 0x25782C20
.4byte 0x6C617420
.4byte 0x30782578
.4byte 0x2C20766F
.4byte 0x69636520
.4byte 0x30782578
.4byte 0x2C207265
.4byte 0x7472616E
.4byte 0x73203078
.4byte 0x25303278
.4byte 0x2C20706B
.4byte 0x74203078
.4byte 0x25303478
.4byte 0
.global "@1995"
"@1995":
.4byte 0x62746D5F
.4byte 0x73636F5F
.4byte 0x63686B5F
.4byte 0x70656E64
.4byte 0x5F756E70
.4byte 0x61726B20
.4byte 0x2D3E2028
.4byte 0x65295343
.4byte 0x4F204C69
.4byte 0x6E6B2066
.4byte 0x6F722041
.4byte 0x434C2068
.4byte 0x616E646C
.4byte 0x65203078
.4byte 0x25303478
.4byte 0x2C204465
.4byte 0x73697265
.4byte 0x64205479
.4byte 0x70652025
.4byte 0x64000000
.global "@2023"
"@2023":
.4byte 0x62746D5F
.4byte 0x73636F5F
.4byte 0x636F6E6E
.4byte 0x5F726571
.4byte 0x3A204E6F
.4byte 0x206F6E65
.4byte 0x2077616E
.4byte 0x74732074
.4byte 0x68697320
.4byte 0x53434F20
.4byte 0x636F6E6E
.4byte 0x65637469
.4byte 0x6F6E3B20
.4byte 0x72656A65
.4byte 0x6374696E
.4byte 0x67206974
.4byte 0
.4byte 0x42544D5F
.4byte 0x53657445
.4byte 0x53636F4D
.4byte 0x6F646520
.4byte 0x2D3E206D
.4byte 0x6F646520
.4byte 0x25640000
.4byte 0x42544D5F
.4byte 0x53657445
.4byte 0x53636F4D
.4byte 0x6F646520
.4byte 0x2D3E206D
.4byte 0x6F646520
.4byte 0x53434F20
.4byte 0x28655343
.4byte 0x4F206E6F
.4byte 0x74207375
.4byte 0x70706F72
.4byte 0x74656429
.4byte 0
.4byte 0x20202020
.4byte 0x74786277
.4byte 0x20307825
.4byte 0x3038782C
.4byte 0x20727862
.4byte 0x77203078
.4byte 0x25303878
.4byte 0x2C206D61
.4byte 0x785F6C61
.4byte 0x74203078
.4byte 0x25303478
.4byte 0x2C20766F
.4byte 0x69636520
.4byte 0x30782530
.4byte 0x34782C20
.4byte 0x706B7420
.4byte 0x30782530
.4byte 0x34782C20
.4byte 0x72747820
.4byte 0x6566666F
.4byte 0x72742030
.4byte 0x78253032
.4byte 0x78000000
.4byte 0
.4byte 0x42544D5F
.4byte 0x52656164
.4byte 0x4553636F
.4byte 0x4C696E6B
.4byte 0x5061726D
.4byte 0x73202D3E
.4byte 0x2073636F
.4byte 0x5F696E78
.4byte 0x20307825
.4byte 0x30347800
.4byte 0x42544D5F
.4byte 0x4368616E
.4byte 0x67654553
.4byte 0x636F4C69
.4byte 0x6E6B5061
.4byte 0x726D7320
.4byte 0x2D3E2053
.4byte 0x434F204C
.4byte 0x696E6B20
.4byte 0x666F7220
.4byte 0x68616E64
.4byte 0x6C652030
.4byte 0x78253034
.4byte 0x782C2070
.4byte 0x6B742030
.4byte 0x78253034
.4byte 0x78000000
.4byte 0x42544D5F
.4byte 0x4368616E
.4byte 0x67654553
.4byte 0x636F4C69
.4byte 0x6E6B5061
.4byte 0x726D7320
.4byte 0x2D3E2065
.4byte 0x53434F20
.4byte 0x4C696E6B
.4byte 0x20666F72
.4byte 0x2068616E
.4byte 0x646C6520
.4byte 0x30782530
.4byte 0x34780000
.global "@2157"
"@2157":
.4byte 0x62746D5F
.4byte 0x6573636F
.4byte 0x5F70726F
.4byte 0x635F636F
.4byte 0x6E6E5F63
.4byte 0x6867202D
.4byte 0x3E206861
.4byte 0x6E646C65
.4byte 0x20307825
.4byte 0x3034782C
.4byte 0x20737461
.4byte 0x74757320
.4byte 0x30782530
.4byte 0x32780000
.4byte 0