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

757 lines
25 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global bta_hh_sm_execute
bta_hh_sm_execute:
/* 8007D4E4 00079324 94 21 FF C0 */ stwu r1, -0x40(r1)
/* 8007D4E8 00079328 7C 08 02 A6 */ mflr r0
/* 8007D4EC 0007932C 90 01 00 44 */ stw r0, 0x44(r1)
/* 8007D4F0 00079330 39 61 00 40 */ addi r11, r1, 0x40
/* 8007D4F4 00079334 4B F8 9E 45 */ bl lbl_80007338
/* 8007D4F8 00079338 3F E0 80 44 */ lis r31, "@811_8043B110"@ha
/* 8007D4FC 0007933C 7C 7B 1B 78 */ mr r27, r3
/* 8007D500 00079340 7C 9C 23 78 */ mr r28, r4
/* 8007D504 00079344 7C BD 2B 78 */ mr r29, r5
/* 8007D508 00079348 3B FF B1 10 */ addi r31, r31, "@811_8043B110"@l
/* 8007D50C 0007934C 38 61 00 08 */ addi r3, r1, 0x8
/* 8007D510 00079350 3B C0 00 00 */ li r30, 0x0
/* 8007D514 00079354 38 80 00 00 */ li r4, 0x0
/* 8007D518 00079358 38 A0 00 20 */ li r5, 0x20
/* 8007D51C 0007935C 4B F8 6E 35 */ bl memset
/* 8007D520 00079360 2C 1B 00 00 */ cmpwi r27, 0x0
/* 8007D524 00079364 40 82 01 58 */ bne lbl_8007D67C
/* 8007D528 00079368 3C 60 80 4F */ lis r3, bta_hh_cb@ha
/* 8007D52C 0007936C 38 63 5D 28 */ addi r3, r3, bta_hh_cb@l
/* 8007D530 00079370 80 03 02 24 */ lwz r0, 0x224(r3)
/* 8007D534 00079374 2C 00 00 00 */ cmpwi r0, 0x0
/* 8007D538 00079378 41 82 02 E8 */ beq lbl_8007D820
/* 8007D53C 0007937C 2C 1C 17 08 */ cmpwi r28, 0x1708
/* 8007D540 00079380 41 82 00 90 */ beq lbl_8007D5D0
/* 8007D544 00079384 40 80 00 1C */ bge lbl_8007D560
/* 8007D548 00079388 2C 1C 17 01 */ cmpwi r28, 0x1701
/* 8007D54C 0007938C 41 82 00 D8 */ beq lbl_8007D624
/* 8007D550 00079390 40 80 00 EC */ bge lbl_8007D63C
/* 8007D554 00079394 2C 1C 17 00 */ cmpwi r28, 0x1700
/* 8007D558 00079398 40 80 00 14 */ bge lbl_8007D56C
/* 8007D55C 0007939C 48 00 00 E0 */ b lbl_8007D63C
.global lbl_8007D560
lbl_8007D560:
/* 8007D560 000793A0 2C 1C 17 0A */ cmpwi r28, 0x170a
/* 8007D564 000793A4 41 82 00 2C */ beq lbl_8007D590
/* 8007D568 000793A8 48 00 00 D4 */ b lbl_8007D63C
.global lbl_8007D56C
lbl_8007D56C:
/* 8007D56C 000793AC 38 61 00 08 */ addi r3, r1, 0x8
/* 8007D570 000793B0 38 9D 00 08 */ addi r4, r29, 0x8
/* 8007D574 000793B4 3B C0 00 02 */ li r30, 0x2
/* 8007D578 000793B8 4B FF A9 BD */ bl bdcpy
/* 8007D57C 000793BC 38 60 00 09 */ li r3, 0x9
/* 8007D580 000793C0 38 00 00 FF */ li r0, 0xff
/* 8007D584 000793C4 98 61 00 0E */ stb r3, 0xe(r1)
/* 8007D588 000793C8 98 01 00 0F */ stb r0, 0xf(r1)
/* 8007D58C 000793CC 48 00 00 CC */ b lbl_8007D658
.global lbl_8007D590
lbl_8007D590:
/* 8007D590 000793D0 A3 DD 00 10 */ lhz r30, 0x10(r29)
/* 8007D594 000793D4 28 1E 00 0B */ cmplwi r30, 0xb
/* 8007D598 000793D8 40 82 00 24 */ bne lbl_8007D5BC
/* 8007D59C 000793DC 38 61 00 08 */ addi r3, r1, 0x8
/* 8007D5A0 000793E0 38 9D 00 08 */ addi r4, r29, 0x8
/* 8007D5A4 000793E4 4B FF A9 91 */ bl bdcpy
/* 8007D5A8 000793E8 38 60 00 09 */ li r3, 0x9
/* 8007D5AC 000793EC 38 00 00 FF */ li r0, 0xff
/* 8007D5B0 000793F0 98 61 00 0E */ stb r3, 0xe(r1)
/* 8007D5B4 000793F4 98 01 00 0F */ stb r0, 0xf(r1)
/* 8007D5B8 000793F8 48 00 00 A0 */ b lbl_8007D658
.global lbl_8007D5BC
lbl_8007D5BC:
/* 8007D5BC 000793FC 38 00 00 0D */ li r0, 0xd
/* 8007D5C0 00079400 98 01 00 0E */ stb r0, 0xe(r1)
/* 8007D5C4 00079404 A0 1D 00 06 */ lhz r0, 0x6(r29)
/* 8007D5C8 00079408 98 01 00 0F */ stb r0, 0xf(r1)
/* 8007D5CC 0007940C 48 00 00 8C */ b lbl_8007D658
.global lbl_8007D5D0
lbl_8007D5D0:
/* 8007D5D0 00079410 8B DD 00 08 */ lbz r30, 0x8(r29)
/* 8007D5D4 00079414 28 1E 00 07 */ cmplwi r30, 0x7
/* 8007D5D8 00079418 41 82 00 14 */ beq lbl_8007D5EC
/* 8007D5DC 0007941C 28 1E 00 05 */ cmplwi r30, 0x5
/* 8007D5E0 00079420 41 82 00 0C */ beq lbl_8007D5EC
/* 8007D5E4 00079424 28 1E 00 09 */ cmplwi r30, 0x9
/* 8007D5E8 00079428 40 82 00 18 */ bne lbl_8007D600
.global lbl_8007D5EC
lbl_8007D5EC:
/* 8007D5EC 0007942C 38 00 00 0D */ li r0, 0xd
/* 8007D5F0 00079430 98 01 00 08 */ stb r0, 0x8(r1)
/* 8007D5F4 00079434 A0 1D 00 06 */ lhz r0, 0x6(r29)
/* 8007D5F8 00079438 98 01 00 09 */ stb r0, 0x9(r1)
/* 8007D5FC 0007943C 48 00 00 5C */ b lbl_8007D658
.global lbl_8007D600
lbl_8007D600:
/* 8007D600 00079440 28 1E 00 0A */ cmplwi r30, 0xa
/* 8007D604 00079444 41 82 00 54 */ beq lbl_8007D658
/* 8007D608 00079448 28 1E 00 01 */ cmplwi r30, 0x1
/* 8007D60C 0007944C 41 82 00 4C */ beq lbl_8007D658
/* 8007D610 00079450 A0 7D 00 06 */ lhz r3, 0x6(r29)
/* 8007D614 00079454 38 00 00 0D */ li r0, 0xd
/* 8007D618 00079458 98 61 00 09 */ stb r3, 0x9(r1)
/* 8007D61C 0007945C 98 01 00 08 */ stb r0, 0x8(r1)
/* 8007D620 00079460 48 00 00 38 */ b lbl_8007D658
.global lbl_8007D624
lbl_8007D624:
/* 8007D624 00079464 38 00 00 0D */ li r0, 0xd
/* 8007D628 00079468 3B C0 00 03 */ li r30, 0x3
/* 8007D62C 0007946C 98 01 00 08 */ stb r0, 0x8(r1)
/* 8007D630 00079470 A0 1D 00 06 */ lhz r0, 0x6(r29)
/* 8007D634 00079474 98 01 00 09 */ stb r0, 0x9(r1)
/* 8007D638 00079478 48 00 00 20 */ b lbl_8007D658
.global lbl_8007D63C
lbl_8007D63C:
/* 8007D63C 0007947C 88 0D EA F0 */ lbz r0, appl_trace_level@sda21(r13)
/* 8007D640 00079480 28 00 00 01 */ cmplwi r0, 0x1
/* 8007D644 00079484 41 80 00 14 */ blt lbl_8007D658
/* 8007D648 00079488 A0 BD 00 06 */ lhz r5, 0x6(r29)
/* 8007D64C 0007948C 38 9F 00 00 */ addi r4, r31, 0x0
/* 8007D650 00079490 38 60 05 00 */ li r3, 0x500
/* 8007D654 00079494 4B FF A3 0D */ bl LogMsg_0
.global lbl_8007D658
lbl_8007D658:
/* 8007D658 00079498 57 C3 04 3F */ clrlwi. r3, r30, 16
/* 8007D65C 0007949C 41 82 01 C4 */ beq lbl_8007D820
/* 8007D660 000794A0 3C A0 80 4F */ lis r5, bta_hh_cb@ha
/* 8007D664 000794A4 38 81 00 08 */ addi r4, r1, 0x8
/* 8007D668 000794A8 38 A5 5D 28 */ addi r5, r5, bta_hh_cb@l
/* 8007D66C 000794AC 81 85 02 24 */ lwz r12, 0x224(r5)
/* 8007D670 000794B0 7D 89 03 A6 */ mtctr r12
/* 8007D674 000794B4 4E 80 04 21 */ bctrl
/* 8007D678 000794B8 48 00 01 A8 */ b lbl_8007D820
.global lbl_8007D67C
lbl_8007D67C:
/* 8007D67C 000794BC 88 0D EA F0 */ lbz r0, appl_trace_level@sda21(r13)
/* 8007D680 000794C0 8B DB 00 1C */ lbz r30, 0x1c(r27)
/* 8007D684 000794C4 28 00 00 04 */ cmplwi r0, 0x4
/* 8007D688 000794C8 41 80 00 70 */ blt lbl_8007D6F8
/* 8007D68C 000794CC 2C 1E 00 02 */ cmpwi r30, 0x2
/* 8007D690 000794D0 41 82 00 34 */ beq lbl_8007D6C4
/* 8007D694 000794D4 40 80 00 14 */ bge lbl_8007D6A8
/* 8007D698 000794D8 2C 1E 00 00 */ cmpwi r30, 0x0
/* 8007D69C 000794DC 41 82 00 18 */ beq lbl_8007D6B4
/* 8007D6A0 000794E0 40 80 00 1C */ bge lbl_8007D6BC
/* 8007D6A4 000794E4 48 00 00 30 */ b lbl_8007D6D4
.global lbl_8007D6A8
lbl_8007D6A8:
/* 8007D6A8 000794E8 2C 1E 00 04 */ cmpwi r30, 0x4
/* 8007D6AC 000794EC 40 80 00 28 */ bge lbl_8007D6D4
/* 8007D6B0 000794F0 48 00 00 1C */ b lbl_8007D6CC
.global lbl_8007D6B4
lbl_8007D6B4:
/* 8007D6B4 000794F4 3B 5F 00 1C */ addi r26, r31, 0x1c
/* 8007D6B8 000794F8 48 00 00 20 */ b lbl_8007D6D8
.global lbl_8007D6BC
lbl_8007D6BC:
/* 8007D6BC 000794FC 3B 5F 00 2C */ addi r26, r31, 0x2c
/* 8007D6C0 00079500 48 00 00 18 */ b lbl_8007D6D8
.global lbl_8007D6C4
lbl_8007D6C4:
/* 8007D6C4 00079504 3B 5F 00 3C */ addi r26, r31, 0x3c
/* 8007D6C8 00079508 48 00 00 10 */ b lbl_8007D6D8
.global lbl_8007D6CC
lbl_8007D6CC:
/* 8007D6CC 0007950C 3B 5F 00 50 */ addi r26, r31, 0x50
/* 8007D6D0 00079510 48 00 00 08 */ b lbl_8007D6D8
.global lbl_8007D6D4
lbl_8007D6D4:
/* 8007D6D4 00079514 3B 5F 00 60 */ addi r26, r31, 0x60
.global lbl_8007D6D8
lbl_8007D6D8:
/* 8007D6D8 00079518 7F 83 E3 78 */ mr r3, r28
/* 8007D6DC 0007951C 48 00 02 A9 */ bl bta_hh_evt_code
/* 8007D6E0 00079520 7C 67 1B 78 */ mr r7, r3
/* 8007D6E4 00079524 7F C5 F3 78 */ mr r5, r30
/* 8007D6E8 00079528 7F 46 D3 78 */ mr r6, r26
/* 8007D6EC 0007952C 38 9F 00 78 */ addi r4, r31, 0x78
/* 8007D6F0 00079530 38 60 05 03 */ li r3, 0x503
/* 8007D6F4 00079534 4B FF A2 6D */ bl LogMsg_0
.global lbl_8007D6F8
lbl_8007D6F8:
/* 8007D6F8 00079538 88 9B 00 1C */ lbz r4, 0x1c(r27)
/* 8007D6FC 0007953C 3C 60 80 41 */ lis r3, bta_hh_st_tbl@ha
/* 8007D700 00079540 38 63 80 E8 */ addi r3, r3, bta_hh_st_tbl@l
/* 8007D704 00079544 57 9C 06 3E */ clrlwi r28, r28, 24
/* 8007D708 00079548 38 04 FF FF */ addi r0, r4, -0x1
/* 8007D70C 0007954C 54 00 10 3A */ slwi r0, r0, 2
/* 8007D710 00079550 57 84 08 3C */ slwi r4, r28, 1
/* 8007D714 00079554 7C A3 00 2E */ lwzx r5, r3, r0
/* 8007D718 00079558 7C 65 22 14 */ add r3, r5, r4
/* 8007D71C 0007955C 88 03 00 01 */ lbz r0, 0x1(r3)
/* 8007D720 00079560 98 1B 00 1C */ stb r0, 0x1c(r27)
/* 8007D724 00079564 7C 05 20 AE */ lbzx r0, r5, r4
/* 8007D728 00079568 28 00 00 0C */ cmplwi r0, 0xc
/* 8007D72C 0007956C 41 82 00 24 */ beq lbl_8007D750
/* 8007D730 00079570 3C 80 80 41 */ lis r4, bta_hh_action@ha
/* 8007D734 00079574 54 00 15 BA */ rlwinm r0, r0, 2, 22, 29
/* 8007D738 00079578 38 84 80 70 */ addi r4, r4, bta_hh_action@l
/* 8007D73C 0007957C 7F 63 DB 78 */ mr r3, r27
/* 8007D740 00079580 7D 84 00 2E */ lwzx r12, r4, r0
/* 8007D744 00079584 7F A4 EB 78 */ mr r4, r29
/* 8007D748 00079588 7D 89 03 A6 */ mtctr r12
/* 8007D74C 0007958C 4E 80 04 21 */ bctrl
.global lbl_8007D750
lbl_8007D750:
/* 8007D750 00079590 88 7B 00 1C */ lbz r3, 0x1c(r27)
/* 8007D754 00079594 7C 1E 18 40 */ cmplw r30, r3
/* 8007D758 00079598 41 82 00 C8 */ beq lbl_8007D820
/* 8007D75C 0007959C 88 0D EA F0 */ lbz r0, appl_trace_level@sda21(r13)
/* 8007D760 000795A0 28 00 00 05 */ cmplwi r0, 0x5
/* 8007D764 000795A4 41 80 00 BC */ blt lbl_8007D820
/* 8007D768 000795A8 2C 1E 00 02 */ cmpwi r30, 0x2
/* 8007D76C 000795AC 41 82 00 34 */ beq lbl_8007D7A0
/* 8007D770 000795B0 40 80 00 14 */ bge lbl_8007D784
/* 8007D774 000795B4 2C 1E 00 00 */ cmpwi r30, 0x0
/* 8007D778 000795B8 41 82 00 18 */ beq lbl_8007D790
/* 8007D77C 000795BC 40 80 00 1C */ bge lbl_8007D798
/* 8007D780 000795C0 48 00 00 30 */ b lbl_8007D7B0
.global lbl_8007D784
lbl_8007D784:
/* 8007D784 000795C4 2C 1E 00 04 */ cmpwi r30, 0x4
/* 8007D788 000795C8 40 80 00 28 */ bge lbl_8007D7B0
/* 8007D78C 000795CC 48 00 00 1C */ b lbl_8007D7A8
.global lbl_8007D790
lbl_8007D790:
/* 8007D790 000795D0 3B 5F 00 1C */ addi r26, r31, 0x1c
/* 8007D794 000795D4 48 00 00 20 */ b lbl_8007D7B4
.global lbl_8007D798
lbl_8007D798:
/* 8007D798 000795D8 3B 5F 00 2C */ addi r26, r31, 0x2c
/* 8007D79C 000795DC 48 00 00 18 */ b lbl_8007D7B4
.global lbl_8007D7A0
lbl_8007D7A0:
/* 8007D7A0 000795E0 3B 5F 00 3C */ addi r26, r31, 0x3c
/* 8007D7A4 000795E4 48 00 00 10 */ b lbl_8007D7B4
.global lbl_8007D7A8
lbl_8007D7A8:
/* 8007D7A8 000795E8 3B 5F 00 50 */ addi r26, r31, 0x50
/* 8007D7AC 000795EC 48 00 00 08 */ b lbl_8007D7B4
.global lbl_8007D7B0
lbl_8007D7B0:
/* 8007D7B0 000795F0 3B 5F 00 60 */ addi r26, r31, 0x60
.global lbl_8007D7B4
lbl_8007D7B4:
/* 8007D7B4 000795F4 2C 03 00 02 */ cmpwi r3, 0x2
/* 8007D7B8 000795F8 41 82 00 34 */ beq lbl_8007D7EC
/* 8007D7BC 000795FC 40 80 00 14 */ bge lbl_8007D7D0
/* 8007D7C0 00079600 2C 03 00 00 */ cmpwi r3, 0x0
/* 8007D7C4 00079604 41 82 00 18 */ beq lbl_8007D7DC
/* 8007D7C8 00079608 40 80 00 1C */ bge lbl_8007D7E4
/* 8007D7CC 0007960C 48 00 00 30 */ b lbl_8007D7FC
.global lbl_8007D7D0
lbl_8007D7D0:
/* 8007D7D0 00079610 2C 03 00 04 */ cmpwi r3, 0x4
/* 8007D7D4 00079614 40 80 00 28 */ bge lbl_8007D7FC
/* 8007D7D8 00079618 48 00 00 1C */ b lbl_8007D7F4
.global lbl_8007D7DC
lbl_8007D7DC:
/* 8007D7DC 0007961C 3B 7F 00 1C */ addi r27, r31, 0x1c
/* 8007D7E0 00079620 48 00 00 20 */ b lbl_8007D800
.global lbl_8007D7E4
lbl_8007D7E4:
/* 8007D7E4 00079624 3B 7F 00 2C */ addi r27, r31, 0x2c
/* 8007D7E8 00079628 48 00 00 18 */ b lbl_8007D800
.global lbl_8007D7EC
lbl_8007D7EC:
/* 8007D7EC 0007962C 3B 7F 00 3C */ addi r27, r31, 0x3c
/* 8007D7F0 00079630 48 00 00 10 */ b lbl_8007D800
.global lbl_8007D7F4
lbl_8007D7F4:
/* 8007D7F4 00079634 3B 7F 00 50 */ addi r27, r31, 0x50
/* 8007D7F8 00079638 48 00 00 08 */ b lbl_8007D800
.global lbl_8007D7FC
lbl_8007D7FC:
/* 8007D7FC 0007963C 3B 7F 00 60 */ addi r27, r31, 0x60
.global lbl_8007D800
lbl_8007D800:
/* 8007D800 00079640 7F 83 E3 78 */ mr r3, r28
/* 8007D804 00079644 48 00 01 81 */ bl bta_hh_evt_code
/* 8007D808 00079648 7C 67 1B 78 */ mr r7, r3
/* 8007D80C 0007964C 7F 45 D3 78 */ mr r5, r26
/* 8007D810 00079650 7F 66 DB 78 */ mr r6, r27
/* 8007D814 00079654 38 9F 00 AC */ addi r4, r31, 0xac
/* 8007D818 00079658 38 60 05 04 */ li r3, 0x504
/* 8007D81C 0007965C 4B FF A1 45 */ bl LogMsg_0
.global lbl_8007D820
lbl_8007D820:
/* 8007D820 00079660 39 61 00 40 */ addi r11, r1, 0x40
/* 8007D824 00079664 4B F8 9B 61 */ bl lbl_80007384
/* 8007D828 00079668 80 01 00 44 */ lwz r0, 0x44(r1)
/* 8007D82C 0007966C 7C 08 03 A6 */ mtlr r0
/* 8007D830 00079670 38 21 00 40 */ addi r1, r1, 0x40
/* 8007D834 00079674 4E 80 00 20 */ blr
.global bta_hh_hdl_event
bta_hh_hdl_event:
/* 8007D838 00079678 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 8007D83C 0007967C 7C 08 02 A6 */ mflr r0
/* 8007D840 00079680 38 C0 00 10 */ li r6, 0x10
/* 8007D844 00079684 90 01 00 14 */ stw r0, 0x14(r1)
/* 8007D848 00079688 93 E1 00 0C */ stw r31, 0xc(r1)
/* 8007D84C 0007968C 3B E0 00 00 */ li r31, 0x0
/* 8007D850 00079690 93 C1 00 08 */ stw r30, 0x8(r1)
/* 8007D854 00079694 7C 7E 1B 78 */ mr r30, r3
/* 8007D858 00079698 A0 03 00 00 */ lhz r0, 0x0(r3)
/* 8007D85C 0007969C 2C 00 17 0E */ cmpwi r0, 0x170e
/* 8007D860 000796A0 41 82 00 3C */ beq lbl_8007D89C
/* 8007D864 000796A4 40 80 00 14 */ bge lbl_8007D878
/* 8007D868 000796A8 2C 00 17 0C */ cmpwi r0, 0x170c
/* 8007D86C 000796AC 41 82 00 18 */ beq lbl_8007D884
/* 8007D870 000796B0 40 80 00 1C */ bge lbl_8007D88C
/* 8007D874 000796B4 48 00 00 30 */ b lbl_8007D8A4
.global lbl_8007D878
lbl_8007D878:
/* 8007D878 000796B8 2C 00 17 10 */ cmpwi r0, 0x1710
/* 8007D87C 000796BC 40 80 00 28 */ bge lbl_8007D8A4
/* 8007D880 000796C0 48 00 00 14 */ b lbl_8007D894
.global lbl_8007D884
lbl_8007D884:
/* 8007D884 000796C4 4B FF E1 49 */ bl bta_hh_api_enable
/* 8007D888 000796C8 48 00 00 E0 */ b lbl_8007D968
.global lbl_8007D88C
lbl_8007D88C:
/* 8007D88C 000796CC 4B FF E2 B5 */ bl bta_hh_api_disable
/* 8007D890 000796D0 48 00 00 D8 */ b lbl_8007D968
.global lbl_8007D894
lbl_8007D894:
/* 8007D894 000796D4 4B FF E3 B1 */ bl bta_hh_disc_cmpl
/* 8007D898 000796D8 48 00 00 D0 */ b lbl_8007D968
.global lbl_8007D89C
lbl_8007D89C:
/* 8007D89C 000796DC 4B FF F2 FD */ bl bta_hh_get_acl_q_info
/* 8007D8A0 000796E0 48 00 00 C8 */ b lbl_8007D968
.global lbl_8007D8A4
lbl_8007D8A4:
/* 8007D8A4 000796E4 28 00 17 00 */ cmplwi r0, 0x1700
/* 8007D8A8 000796E8 40 82 00 14 */ bne lbl_8007D8BC
/* 8007D8AC 000796EC 38 63 00 08 */ addi r3, r3, 0x8
/* 8007D8B0 000796F0 48 00 01 89 */ bl bta_hh_find_cb
/* 8007D8B4 000796F4 7C 66 1B 78 */ mr r6, r3
/* 8007D8B8 000796F8 48 00 00 5C */ b lbl_8007D914
.global lbl_8007D8BC
lbl_8007D8BC:
/* 8007D8BC 000796FC 28 00 17 0A */ cmplwi r0, 0x170a
/* 8007D8C0 00079700 40 82 00 38 */ bne lbl_8007D8F8
/* 8007D8C4 00079704 A0 03 00 10 */ lhz r0, 0x10(r3)
/* 8007D8C8 00079708 28 00 00 0B */ cmplwi r0, 0xb
/* 8007D8CC 0007970C 40 82 00 14 */ bne lbl_8007D8E0
/* 8007D8D0 00079710 38 63 00 08 */ addi r3, r3, 0x8
/* 8007D8D4 00079714 48 00 01 65 */ bl bta_hh_find_cb
/* 8007D8D8 00079718 7C 66 1B 78 */ mr r6, r3
/* 8007D8DC 0007971C 48 00 00 38 */ b lbl_8007D914
.global lbl_8007D8E0
lbl_8007D8E0:
/* 8007D8E0 00079720 3C 80 80 4F */ lis r4, bta_hh_cb@ha
/* 8007D8E4 00079724 A0 03 00 06 */ lhz r0, 0x6(r3)
/* 8007D8E8 00079728 38 84 5D 28 */ addi r4, r4, bta_hh_cb@l
/* 8007D8EC 0007972C 7C 64 02 14 */ add r3, r4, r0
/* 8007D8F0 00079730 88 C3 02 14 */ lbz r6, 0x214(r3)
/* 8007D8F4 00079734 48 00 00 20 */ b lbl_8007D914
.global lbl_8007D8F8
lbl_8007D8F8:
/* 8007D8F8 00079738 A0 03 00 06 */ lhz r0, 0x6(r3)
/* 8007D8FC 0007973C 28 00 00 10 */ cmplwi r0, 0x10
/* 8007D900 00079740 40 80 00 14 */ bge lbl_8007D914
/* 8007D904 00079744 3C 60 80 4F */ lis r3, bta_hh_cb@ha
/* 8007D908 00079748 38 63 5D 28 */ addi r3, r3, bta_hh_cb@l
/* 8007D90C 0007974C 7C 63 02 14 */ add r3, r3, r0
/* 8007D910 00079750 88 C3 02 14 */ lbz r6, 0x214(r3)
.global lbl_8007D914
lbl_8007D914:
/* 8007D914 00079754 54 C0 06 3E */ clrlwi r0, r6, 24
/* 8007D918 00079758 28 00 00 10 */ cmplwi r0, 0x10
/* 8007D91C 0007975C 41 82 00 18 */ beq lbl_8007D934
/* 8007D920 00079760 3C 60 80 4F */ lis r3, bta_hh_cb@ha
/* 8007D924 00079764 54 C0 2C F4 */ rlwinm r0, r6, 5, 19, 26
/* 8007D928 00079768 38 63 5D 28 */ addi r3, r3, bta_hh_cb@l
/* 8007D92C 0007976C 7C 63 02 14 */ add r3, r3, r0
/* 8007D930 00079770 3B E3 00 10 */ addi r31, r3, 0x10
.global lbl_8007D934
lbl_8007D934:
/* 8007D934 00079774 88 0D EA F0 */ lbz r0, appl_trace_level@sda21(r13)
/* 8007D938 00079778 28 00 00 05 */ cmplwi r0, 0x5
/* 8007D93C 0007977C 41 80 00 1C */ blt lbl_8007D958
/* 8007D940 00079780 3C 80 80 44 */ lis r4, "@840_8043B1EC"@ha
/* 8007D944 00079784 A0 BE 00 06 */ lhz r5, 0x6(r30)
/* 8007D948 00079788 38 84 B1 EC */ addi r4, r4, "@840_8043B1EC"@l
/* 8007D94C 0007978C 54 C6 06 3E */ clrlwi r6, r6, 24
/* 8007D950 00079790 38 60 05 04 */ li r3, 0x504
/* 8007D954 00079794 4B FF A0 0D */ bl LogMsg_0
.global lbl_8007D958
lbl_8007D958:
/* 8007D958 00079798 A0 9E 00 00 */ lhz r4, 0x0(r30)
/* 8007D95C 0007979C 7F E3 FB 78 */ mr r3, r31
/* 8007D960 000797A0 7F C5 F3 78 */ mr r5, r30
/* 8007D964 000797A4 4B FF FB 81 */ bl bta_hh_sm_execute
.global lbl_8007D968
lbl_8007D968:
/* 8007D968 000797A8 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 8007D96C 000797AC 38 60 00 01 */ li r3, 0x1
/* 8007D970 000797B0 83 C1 00 08 */ lwz r30, 0x8(r1)
/* 8007D974 000797B4 80 01 00 14 */ lwz r0, 0x14(r1)
/* 8007D978 000797B8 7C 08 03 A6 */ mtlr r0
/* 8007D97C 000797BC 38 21 00 10 */ addi r1, r1, 0x10
/* 8007D980 000797C0 4E 80 00 20 */ blr
.global bta_hh_evt_code
bta_hh_evt_code:
/* 8007D984 000797C4 38 03 E9 00 */ addi r0, r3, -0x1700
/* 8007D988 000797C8 3C 80 80 44 */ lis r4, "@811_8043B110"@ha
/* 8007D98C 000797CC 28 00 00 0F */ cmplwi r0, 0xf
/* 8007D990 000797D0 38 84 B1 10 */ addi r4, r4, "@811_8043B110"@l
/* 8007D994 000797D4 41 81 00 9C */ bgt lbl_8007DA30
/* 8007D998 000797D8 3C 60 80 44 */ lis r3, "@877"@ha
/* 8007D99C 000797DC 54 00 10 3A */ slwi r0, r0, 2
/* 8007D9A0 000797E0 38 63 B3 B0 */ addi r3, r3, "@877"@l
/* 8007D9A4 000797E4 7C 63 00 2E */ lwzx r3, r3, r0
/* 8007D9A8 000797E8 7C 69 03 A6 */ mtctr r3
/* 8007D9AC 000797EC 4E 80 04 20 */ bctr
.global lbl_8007D9B0
lbl_8007D9B0:
/* 8007D9B0 000797F0 38 64 01 08 */ addi r3, r4, 0x108
/* 8007D9B4 000797F4 4E 80 00 20 */ blr
.global lbl_8007D9B8
lbl_8007D9B8:
/* 8007D9B8 000797F8 38 64 01 20 */ addi r3, r4, 0x120
/* 8007D9BC 000797FC 4E 80 00 20 */ blr
.global lbl_8007D9C0
lbl_8007D9C0:
/* 8007D9C0 00079800 38 64 01 38 */ addi r3, r4, 0x138
/* 8007D9C4 00079804 4E 80 00 20 */ blr
.global lbl_8007D9C8
lbl_8007D9C8:
/* 8007D9C8 00079808 38 64 01 4C */ addi r3, r4, 0x14c
/* 8007D9CC 0007980C 4E 80 00 20 */ blr
.global lbl_8007D9D0
lbl_8007D9D0:
/* 8007D9D0 00079810 38 64 01 64 */ addi r3, r4, 0x164
/* 8007D9D4 00079814 4E 80 00 20 */ blr
.global lbl_8007D9D8
lbl_8007D9D8:
/* 8007D9D8 00079818 38 64 01 78 */ addi r3, r4, 0x178
/* 8007D9DC 0007981C 4E 80 00 20 */ blr
.global lbl_8007D9E0
lbl_8007D9E0:
/* 8007D9E0 00079820 38 64 01 90 */ addi r3, r4, 0x190
/* 8007D9E4 00079824 4E 80 00 20 */ blr
.global lbl_8007D9E8
lbl_8007D9E8:
/* 8007D9E8 00079828 38 64 01 A8 */ addi r3, r4, 0x1a8
/* 8007D9EC 0007982C 4E 80 00 20 */ blr
.global lbl_8007D9F0
lbl_8007D9F0:
/* 8007D9F0 00079830 38 64 01 BC */ addi r3, r4, 0x1bc
/* 8007D9F4 00079834 4E 80 00 20 */ blr
.global lbl_8007D9F8
lbl_8007D9F8:
/* 8007D9F8 00079838 38 64 01 D4 */ addi r3, r4, 0x1d4
/* 8007D9FC 0007983C 4E 80 00 20 */ blr
.global lbl_8007DA00
lbl_8007DA00:
/* 8007DA00 00079840 38 64 01 F0 */ addi r3, r4, 0x1f0
/* 8007DA04 00079844 4E 80 00 20 */ blr
.global lbl_8007DA08
lbl_8007DA08:
/* 8007DA08 00079848 38 64 02 04 */ addi r3, r4, 0x204
/* 8007DA0C 0007984C 4E 80 00 20 */ blr
.global lbl_8007DA10
lbl_8007DA10:
/* 8007DA10 00079850 38 64 02 1C */ addi r3, r4, 0x21c
/* 8007DA14 00079854 4E 80 00 20 */ blr
.global lbl_8007DA18
lbl_8007DA18:
/* 8007DA18 00079858 38 64 02 38 */ addi r3, r4, 0x238
/* 8007DA1C 0007985C 4E 80 00 20 */ blr
.global lbl_8007DA20
lbl_8007DA20:
/* 8007DA20 00079860 38 64 02 50 */ addi r3, r4, 0x250
/* 8007DA24 00079864 4E 80 00 20 */ blr
.global lbl_8007DA28
lbl_8007DA28:
/* 8007DA28 00079868 38 64 02 68 */ addi r3, r4, 0x268
/* 8007DA2C 0007986C 4E 80 00 20 */ blr
.global lbl_8007DA30
lbl_8007DA30:
/* 8007DA30 00079870 38 64 02 84 */ addi r3, r4, 0x284
/* 8007DA34 00079874 4E 80 00 20 */ blr
.include "macros.inc"
.section .rodata, "wa" # 0x80406560 - 0x80421040 ; 0x0001AAE0
.global bta_hh_action
bta_hh_action:
.4byte bta_hh_api_disc_act
.4byte bta_hh_open_act
.4byte bta_hh_close_act
.4byte bta_hh_data_act
.4byte bta_hh_ctrl_dat_act
.4byte bta_hh_handsk_act
.4byte bta_hh_start_sdp
.4byte bta_hh_sdp_cmpl
.4byte bta_hh_write_dev_act
.4byte bta_hh_get_dscp_act
.4byte bta_hh_maint_dev_act
.4byte bta_hh_open_cmpl_act
.global bta_hh_st_idle
bta_hh_st_idle:
.4byte 0x06020C01
.4byte 0x01020201
.4byte 0x0C010C01
.4byte 0x0C010C01
.4byte 0x0C010C01
.4byte 0x0A010C01
.global bta_hh_st_w4_conn
bta_hh_st_w4_conn:
.4byte 0x0C020C01
.4byte 0x01020201
.4byte 0x0C020C02
.4byte 0x0C020702
.4byte 0x0C020C02
.4byte 0x0A010B03
.global bta_hh_st_connected
bta_hh_st_connected:
.4byte 0x0C030003
.4byte 0x01030201
.4byte 0x03030403
.4byte 0x05030C03
.4byte 0x08030903
.4byte 0x0A030C03
.global bta_hh_st_tbl
bta_hh_st_tbl:
.4byte bta_hh_st_idle
.4byte bta_hh_st_w4_conn
.4byte bta_hh_st_connected
.4byte 0
.include "macros.inc"
.section .data, "wa" # 0x80421040 - 0x80496700 ; 0x000756C0
.global "@811_8043B110"
"@811_8043B110":
.4byte 0x77726F6E
.4byte 0x67206465
.4byte 0x76696365
.4byte 0x2068616E
.4byte 0x646C653A
.4byte 0x205B2564
.4byte 0x5D000000
.4byte 0x4254415F
.4byte 0x48485F4E
.4byte 0x554C4C5F
.4byte 0x53540000
.4byte 0x4254415F
.4byte 0x48485F49
.4byte 0x444C455F
.4byte 0x53540000
.4byte 0x4254415F
.4byte 0x48485F57
.4byte 0x345F434F
.4byte 0x4E4E5F53
.4byte 0x54000000
.4byte 0x4254415F
.4byte 0x48485F43
.4byte 0x4F4E4E5F
.4byte 0x53540000
.4byte 0x756E6B6E
.4byte 0x6F776E20
.4byte 0x48494420
.4byte 0x486F7374
.4byte 0x20737461
.4byte 0x74650000
.4byte 0x6274615F
.4byte 0x68685F73
.4byte 0x6D5F6578
.4byte 0x65637574
.4byte 0x653A2053
.4byte 0x74617465
.4byte 0x20307825
.4byte 0x30327820
.4byte 0x5B25735D
.4byte 0x2C204576
.4byte 0x656E7420
.4byte 0x5B25735D
.4byte 0
.4byte 0x48482053
.4byte 0x74617465
.4byte 0x20436861
.4byte 0x6E67653A
.4byte 0x205B2573
.4byte 0x5D202D3E
.4byte 0x205B2573
.4byte 0x5D206166
.4byte 0x74657220
.4byte 0x4576656E
.4byte 0x74205B25
.4byte 0x735D0000
.global "@840_8043B1EC"
"@840_8043B1EC":
.4byte 0x6274615F
.4byte 0x68685F68
.4byte 0x646C5F65
.4byte 0x76656E74
.4byte 0x3A3A2068
.4byte 0x616E646C
.4byte 0x65203D20
.4byte 0x25642064
.4byte 0x65765F63
.4byte 0x625B2564
.4byte 0x5D200000
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F44
.4byte 0x49534142
.4byte 0x4C455F45
.4byte 0x56540000
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F45
.4byte 0x4E41424C
.4byte 0x455F4556
.4byte 0x54000000
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F4F
.4byte 0x50454E5F
.4byte 0x45565400
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F43
.4byte 0x4C4F5345
.4byte 0x5F455654
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F49
.4byte 0x4E545F4F
.4byte 0x50454E5F
.4byte 0x45565400
.4byte 0x4254415F
.4byte 0x48485F49
.4byte 0x4E545F43
.4byte 0x4C4F5345
.4byte 0x5F455654
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F49
.4byte 0x4E545F48
.4byte 0x414E4453
.4byte 0x4B5F4556
.4byte 0x54000000
.4byte 0x4254415F
.4byte 0x48485F49
.4byte 0x4E545F44
.4byte 0x4154415F
.4byte 0x45565400
.4byte 0x4254415F
.4byte 0x48485F49
.4byte 0x4E545F43
.4byte 0x54524C5F
.4byte 0x44415441
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F57
.4byte 0x52495445
.4byte 0x5F444556
.4byte 0x5F455654
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F53
.4byte 0x44505F43
.4byte 0x4D504C5F
.4byte 0x45565400
.4byte 0x4254415F
.4byte 0x48485F44
.4byte 0x4953435F
.4byte 0x434D504C
.4byte 0x5F455654
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F4D
.4byte 0x41494E54
.4byte 0x5F444556
.4byte 0x5F455654
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F47
.4byte 0x45545F44
.4byte 0x5343505F
.4byte 0x45565400
.4byte 0x4254415F
.4byte 0x48485F4F
.4byte 0x50454E5F
.4byte 0x434D504C
.4byte 0x5F455654
.4byte 0
.4byte 0x4254415F
.4byte 0x48485F41
.4byte 0x50495F47
.4byte 0x45545F41
.4byte 0x434C5F51
.4byte 0x5F455654
.4byte 0
.4byte 0x756E6B6E
.4byte 0x6F776E20
.4byte 0x48494420
.4byte 0x486F7374
.4byte 0x20657665
.4byte 0x6E742063
.4byte 0x6F646500
.global "@877"
"@877":
.4byte lbl_8007D9C0
.4byte lbl_8007D9C8
.4byte lbl_8007D9D0
.4byte lbl_8007D9D8
.4byte lbl_8007D9E8
.4byte lbl_8007D9F0
.4byte lbl_8007D9E0
.4byte lbl_8007DA00
.4byte lbl_8007D9F8
.4byte lbl_8007DA18
.4byte lbl_8007DA10
.4byte lbl_8007DA20
.4byte lbl_8007D9B8
.4byte lbl_8007D9B0
.4byte lbl_8007DA28
.4byte lbl_8007DA08
.include "macros.inc"
.section .bss, "", @nobits # 0x80496700 - 0x80556420 ; 0x000BFD20
.global bta_hh_cb
bta_hh_cb:
.skip 0x230