540 lines
24 KiB
ArmAsm
540 lines
24 KiB
ArmAsm
.include "macros.inc"
|
|
|
|
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
|
|
.global BTM_SecAddDevice
|
|
BTM_SecAddDevice:
|
|
/* 8007FB28 0007B968 94 21 FF D0 */ stwu r1, -0x30(r1)
|
|
/* 8007FB2C 0007B96C 7C 08 02 A6 */ mflr r0
|
|
/* 8007FB30 0007B970 90 01 00 34 */ stw r0, 0x34(r1)
|
|
/* 8007FB34 0007B974 39 61 00 30 */ addi r11, r1, 0x30
|
|
/* 8007FB38 0007B978 4B F8 77 F9 */ bl lbl_80007330
|
|
/* 8007FB3C 0007B97C 3D 20 80 4F */ lis r9, btm_cb@ha
|
|
/* 8007FB40 0007B980 7C 78 1B 78 */ mr r24, r3
|
|
/* 8007FB44 0007B984 39 29 5F 58 */ addi r9, r9, btm_cb@l
|
|
/* 8007FB48 0007B988 7C 99 23 78 */ mr r25, r4
|
|
/* 8007FB4C 0007B98C 7C BA 2B 78 */ mr r26, r5
|
|
/* 8007FB50 0007B990 7C DB 33 78 */ mr r27, r6
|
|
/* 8007FB54 0007B994 7C FC 3B 78 */ mr r28, r7
|
|
/* 8007FB58 0007B998 7D 1D 43 78 */ mr r29, r8
|
|
/* 8007FB5C 0007B99C 3B C9 1F 30 */ addi r30, r9, 0x1f30
|
|
/* 8007FB60 0007B9A0 3B E0 00 00 */ li r31, 0x0
|
|
.global lbl_8007FB64
|
|
lbl_8007FB64:
|
|
/* 8007FB64 0007B9A4 88 1E 00 76 */ lbz r0, 0x76(r30)
|
|
/* 8007FB68 0007B9A8 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FB6C 0007B9AC 41 82 00 20 */ beq lbl_8007FB8C
|
|
/* 8007FB70 0007B9B0 7F 04 C3 78 */ mr r4, r24
|
|
/* 8007FB74 0007B9B4 38 7E 00 1C */ addi r3, r30, 0x1c
|
|
/* 8007FB78 0007B9B8 38 A0 00 06 */ li r5, 0x6
|
|
/* 8007FB7C 0007B9BC 4B F8 B2 F5 */ bl memcmp
|
|
/* 8007FB80 0007B9C0 2C 03 00 00 */ cmpwi r3, 0x0
|
|
/* 8007FB84 0007B9C4 40 82 00 08 */ bne lbl_8007FB8C
|
|
/* 8007FB88 0007B9C8 48 00 00 18 */ b lbl_8007FBA0
|
|
.global lbl_8007FB8C
|
|
lbl_8007FB8C:
|
|
/* 8007FB8C 0007B9CC 3B FF 00 01 */ addi r31, r31, 0x1
|
|
/* 8007FB90 0007B9D0 3B DE 00 88 */ addi r30, r30, 0x88
|
|
/* 8007FB94 0007B9D4 2C 1F 00 10 */ cmpwi r31, 0x10
|
|
/* 8007FB98 0007B9D8 41 80 FF CC */ blt lbl_8007FB64
|
|
/* 8007FB9C 0007B9DC 3B C0 00 00 */ li r30, 0x0
|
|
.global lbl_8007FBA0
|
|
lbl_8007FBA0:
|
|
/* 8007FBA0 0007B9E0 2C 1E 00 00 */ cmpwi r30, 0x0
|
|
/* 8007FBA4 0007B9E4 40 82 00 20 */ bne lbl_8007FBC4
|
|
/* 8007FBA8 0007B9E8 7F 03 C3 78 */ mr r3, r24
|
|
/* 8007FBAC 0007B9EC 48 00 02 51 */ bl btm_sec_alloc_dev
|
|
/* 8007FBB0 0007B9F0 2C 03 00 00 */ cmpwi r3, 0x0
|
|
/* 8007FBB4 0007B9F4 7C 7E 1B 78 */ mr r30, r3
|
|
/* 8007FBB8 0007B9F8 40 82 00 24 */ bne lbl_8007FBDC
|
|
/* 8007FBBC 0007B9FC 38 60 00 00 */ li r3, 0x0
|
|
/* 8007FBC0 0007BA00 48 00 00 D8 */ b lbl_8007FC98
|
|
.global lbl_8007FBC4
|
|
lbl_8007FBC4:
|
|
/* 8007FBC4 0007BA04 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FBC8 0007BA08 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FBCC 0007BA0C 80 64 19 74 */ lwz r3, 0x1974(r4)
|
|
/* 8007FBD0 0007BA10 90 7E 00 0C */ stw r3, 0xc(r30)
|
|
/* 8007FBD4 0007BA14 38 03 00 01 */ addi r0, r3, 0x1
|
|
/* 8007FBD8 0007BA18 90 04 19 74 */ stw r0, 0x1974(r4)
|
|
.global lbl_8007FBDC
|
|
lbl_8007FBDC:
|
|
/* 8007FBDC 0007BA1C 2C 19 00 00 */ cmpwi r25, 0x0
|
|
/* 8007FBE0 0007BA20 41 82 00 14 */ beq lbl_8007FBF4
|
|
/* 8007FBE4 0007BA24 7F 24 CB 78 */ mr r4, r25
|
|
/* 8007FBE8 0007BA28 38 7E 00 22 */ addi r3, r30, 0x22
|
|
/* 8007FBEC 0007BA2C 38 A0 00 03 */ li r5, 0x3
|
|
/* 8007FBF0 0007BA30 4B F8 44 11 */ bl memcpy
|
|
.global lbl_8007FBF4
|
|
lbl_8007FBF4:
|
|
/* 8007FBF4 0007BA34 38 7E 00 35 */ addi r3, r30, 0x35
|
|
/* 8007FBF8 0007BA38 38 80 00 00 */ li r4, 0x0
|
|
/* 8007FBFC 0007BA3C 38 A0 00 41 */ li r5, 0x41
|
|
/* 8007FC00 0007BA40 4B F8 47 51 */ bl memset
|
|
/* 8007FC04 0007BA44 2C 1A 00 00 */ cmpwi r26, 0x0
|
|
/* 8007FC08 0007BA48 41 82 00 2C */ beq lbl_8007FC34
|
|
/* 8007FC0C 0007BA4C 88 1A 00 00 */ lbz r0, 0x0(r26)
|
|
/* 8007FC10 0007BA50 2C 00 00 00 */ cmpwi r0, 0x0
|
|
/* 8007FC14 0007BA54 41 82 00 20 */ beq lbl_8007FC34
|
|
/* 8007FC18 0007BA58 88 1E 00 76 */ lbz r0, 0x76(r30)
|
|
/* 8007FC1C 0007BA5C 7F 44 D3 78 */ mr r4, r26
|
|
/* 8007FC20 0007BA60 38 7E 00 35 */ addi r3, r30, 0x35
|
|
/* 8007FC24 0007BA64 38 A0 00 40 */ li r5, 0x40
|
|
/* 8007FC28 0007BA68 60 00 00 08 */ ori r0, r0, 0x8
|
|
/* 8007FC2C 0007BA6C 98 1E 00 76 */ stb r0, 0x76(r30)
|
|
/* 8007FC30 0007BA70 4B F8 DE 51 */ bl strncpy
|
|
.global lbl_8007FC34
|
|
lbl_8007FC34:
|
|
/* 8007FC34 0007BA74 2C 1B 00 00 */ cmpwi r27, 0x0
|
|
/* 8007FC38 0007BA78 41 82 00 18 */ beq lbl_8007FC50
|
|
/* 8007FC3C 0007BA7C 7F 64 DB 78 */ mr r4, r27
|
|
/* 8007FC40 0007BA80 38 7E 00 77 */ addi r3, r30, 0x77
|
|
/* 8007FC44 0007BA84 38 A0 00 08 */ li r5, 0x8
|
|
/* 8007FC48 0007BA88 4B F8 43 B9 */ bl memcpy
|
|
/* 8007FC4C 0007BA8C 48 00 00 14 */ b lbl_8007FC60
|
|
.global lbl_8007FC50
|
|
lbl_8007FC50:
|
|
/* 8007FC50 0007BA90 38 7E 00 77 */ addi r3, r30, 0x77
|
|
/* 8007FC54 0007BA94 38 80 00 00 */ li r4, 0x0
|
|
/* 8007FC58 0007BA98 38 A0 00 08 */ li r5, 0x8
|
|
/* 8007FC5C 0007BA9C 4B F8 46 F5 */ bl memset
|
|
.global lbl_8007FC60
|
|
lbl_8007FC60:
|
|
/* 8007FC60 0007BAA0 80 1C 00 00 */ lwz r0, 0x0(r28)
|
|
/* 8007FC64 0007BAA4 2C 1D 00 00 */ cmpwi r29, 0x0
|
|
/* 8007FC68 0007BAA8 90 1E 00 10 */ stw r0, 0x10(r30)
|
|
/* 8007FC6C 0007BAAC 80 1C 00 04 */ lwz r0, 0x4(r28)
|
|
/* 8007FC70 0007BAB0 90 1E 00 14 */ stw r0, 0x14(r30)
|
|
/* 8007FC74 0007BAB4 41 82 00 20 */ beq lbl_8007FC94
|
|
/* 8007FC78 0007BAB8 88 1E 00 76 */ lbz r0, 0x76(r30)
|
|
/* 8007FC7C 0007BABC 7F A4 EB 78 */ mr r4, r29
|
|
/* 8007FC80 0007BAC0 38 7E 00 25 */ addi r3, r30, 0x25
|
|
/* 8007FC84 0007BAC4 38 A0 00 10 */ li r5, 0x10
|
|
/* 8007FC88 0007BAC8 60 00 00 10 */ ori r0, r0, 0x10
|
|
/* 8007FC8C 0007BACC 98 1E 00 76 */ stb r0, 0x76(r30)
|
|
/* 8007FC90 0007BAD0 4B F8 43 71 */ bl memcpy
|
|
.global lbl_8007FC94
|
|
lbl_8007FC94:
|
|
/* 8007FC94 0007BAD4 38 60 00 01 */ li r3, 0x1
|
|
.global lbl_8007FC98
|
|
lbl_8007FC98:
|
|
/* 8007FC98 0007BAD8 39 61 00 30 */ addi r11, r1, 0x30
|
|
/* 8007FC9C 0007BADC 4B F8 76 E1 */ bl lbl_8000737C
|
|
/* 8007FCA0 0007BAE0 80 01 00 34 */ lwz r0, 0x34(r1)
|
|
/* 8007FCA4 0007BAE4 7C 08 03 A6 */ mtlr r0
|
|
/* 8007FCA8 0007BAE8 38 21 00 30 */ addi r1, r1, 0x30
|
|
/* 8007FCAC 0007BAEC 4E 80 00 20 */ blr
|
|
.global BTM_SecDeleteDevice
|
|
BTM_SecDeleteDevice:
|
|
/* 8007FCB0 0007BAF0 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
/* 8007FCB4 0007BAF4 7C 08 02 A6 */ mflr r0
|
|
/* 8007FCB8 0007BAF8 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FCBC 0007BAFC 90 01 00 24 */ stw r0, 0x24(r1)
|
|
/* 8007FCC0 0007BB00 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FCC4 0007BB04 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
/* 8007FCC8 0007BB08 3B E0 00 00 */ li r31, 0x0
|
|
/* 8007FCCC 0007BB0C 93 C1 00 18 */ stw r30, 0x18(r1)
|
|
/* 8007FCD0 0007BB10 3B C4 1F 30 */ addi r30, r4, 0x1f30
|
|
/* 8007FCD4 0007BB14 93 A1 00 14 */ stw r29, 0x14(r1)
|
|
/* 8007FCD8 0007BB18 7C 7D 1B 78 */ mr r29, r3
|
|
.global lbl_8007FCDC
|
|
lbl_8007FCDC:
|
|
/* 8007FCDC 0007BB1C 88 1E 00 76 */ lbz r0, 0x76(r30)
|
|
/* 8007FCE0 0007BB20 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FCE4 0007BB24 41 82 00 20 */ beq lbl_8007FD04
|
|
/* 8007FCE8 0007BB28 7F A4 EB 78 */ mr r4, r29
|
|
/* 8007FCEC 0007BB2C 38 7E 00 1C */ addi r3, r30, 0x1c
|
|
/* 8007FCF0 0007BB30 38 A0 00 06 */ li r5, 0x6
|
|
/* 8007FCF4 0007BB34 4B F8 B1 7D */ bl memcmp
|
|
/* 8007FCF8 0007BB38 2C 03 00 00 */ cmpwi r3, 0x0
|
|
/* 8007FCFC 0007BB3C 40 82 00 08 */ bne lbl_8007FD04
|
|
/* 8007FD00 0007BB40 48 00 00 18 */ b lbl_8007FD18
|
|
.global lbl_8007FD04
|
|
lbl_8007FD04:
|
|
/* 8007FD04 0007BB44 3B FF 00 01 */ addi r31, r31, 0x1
|
|
/* 8007FD08 0007BB48 3B DE 00 88 */ addi r30, r30, 0x88
|
|
/* 8007FD0C 0007BB4C 2C 1F 00 10 */ cmpwi r31, 0x10
|
|
/* 8007FD10 0007BB50 41 80 FF CC */ blt lbl_8007FCDC
|
|
/* 8007FD14 0007BB54 3B C0 00 00 */ li r30, 0x0
|
|
.global lbl_8007FD18
|
|
lbl_8007FD18:
|
|
/* 8007FD18 0007BB58 2C 1E 00 00 */ cmpwi r30, 0x0
|
|
/* 8007FD1C 0007BB5C 40 82 00 0C */ bne lbl_8007FD28
|
|
/* 8007FD20 0007BB60 38 60 00 00 */ li r3, 0x0
|
|
/* 8007FD24 0007BB64 48 00 00 1C */ b lbl_8007FD40
|
|
.global lbl_8007FD28
|
|
lbl_8007FD28:
|
|
/* 8007FD28 0007BB68 38 00 00 00 */ li r0, 0x0
|
|
/* 8007FD2C 0007BB6C 7F A3 EB 78 */ mr r3, r29
|
|
/* 8007FD30 0007BB70 98 1E 00 76 */ stb r0, 0x76(r30)
|
|
/* 8007FD34 0007BB74 38 80 00 00 */ li r4, 0x0
|
|
/* 8007FD38 0007BB78 48 00 1A 89 */ bl BTM_DeleteStoredLinkKey
|
|
/* 8007FD3C 0007BB7C 38 60 00 01 */ li r3, 0x1
|
|
.global lbl_8007FD40
|
|
lbl_8007FD40:
|
|
/* 8007FD40 0007BB80 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
/* 8007FD44 0007BB84 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
/* 8007FD48 0007BB88 83 C1 00 18 */ lwz r30, 0x18(r1)
|
|
/* 8007FD4C 0007BB8C 83 A1 00 14 */ lwz r29, 0x14(r1)
|
|
/* 8007FD50 0007BB90 7C 08 03 A6 */ mtlr r0
|
|
/* 8007FD54 0007BB94 38 21 00 20 */ addi r1, r1, 0x20
|
|
/* 8007FD58 0007BB98 4E 80 00 20 */ blr
|
|
.global BTM_SecReadDevName
|
|
BTM_SecReadDevName:
|
|
/* 8007FD5C 0007BB9C 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
/* 8007FD60 0007BBA0 7C 08 02 A6 */ mflr r0
|
|
/* 8007FD64 0007BBA4 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FD68 0007BBA8 90 01 00 24 */ stw r0, 0x24(r1)
|
|
/* 8007FD6C 0007BBAC 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FD70 0007BBB0 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
/* 8007FD74 0007BBB4 3B E0 00 00 */ li r31, 0x0
|
|
/* 8007FD78 0007BBB8 93 C1 00 18 */ stw r30, 0x18(r1)
|
|
/* 8007FD7C 0007BBBC 3B C4 1F 30 */ addi r30, r4, 0x1f30
|
|
/* 8007FD80 0007BBC0 93 A1 00 14 */ stw r29, 0x14(r1)
|
|
/* 8007FD84 0007BBC4 3B A0 00 00 */ li r29, 0x0
|
|
/* 8007FD88 0007BBC8 93 81 00 10 */ stw r28, 0x10(r1)
|
|
/* 8007FD8C 0007BBCC 7C 7C 1B 78 */ mr r28, r3
|
|
.global lbl_8007FD90
|
|
lbl_8007FD90:
|
|
/* 8007FD90 0007BBD0 88 1E 00 76 */ lbz r0, 0x76(r30)
|
|
/* 8007FD94 0007BBD4 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FD98 0007BBD8 41 82 00 20 */ beq lbl_8007FDB8
|
|
/* 8007FD9C 0007BBDC 7F 84 E3 78 */ mr r4, r28
|
|
/* 8007FDA0 0007BBE0 38 7E 00 1C */ addi r3, r30, 0x1c
|
|
/* 8007FDA4 0007BBE4 38 A0 00 06 */ li r5, 0x6
|
|
/* 8007FDA8 0007BBE8 4B F8 B0 C9 */ bl memcmp
|
|
/* 8007FDAC 0007BBEC 2C 03 00 00 */ cmpwi r3, 0x0
|
|
/* 8007FDB0 0007BBF0 40 82 00 08 */ bne lbl_8007FDB8
|
|
/* 8007FDB4 0007BBF4 48 00 00 18 */ b lbl_8007FDCC
|
|
.global lbl_8007FDB8
|
|
lbl_8007FDB8:
|
|
/* 8007FDB8 0007BBF8 3B FF 00 01 */ addi r31, r31, 0x1
|
|
/* 8007FDBC 0007BBFC 3B DE 00 88 */ addi r30, r30, 0x88
|
|
/* 8007FDC0 0007BC00 2C 1F 00 10 */ cmpwi r31, 0x10
|
|
/* 8007FDC4 0007BC04 41 80 FF CC */ blt lbl_8007FD90
|
|
/* 8007FDC8 0007BC08 3B C0 00 00 */ li r30, 0x0
|
|
.global lbl_8007FDCC
|
|
lbl_8007FDCC:
|
|
/* 8007FDCC 0007BC0C 2C 1E 00 00 */ cmpwi r30, 0x0
|
|
/* 8007FDD0 0007BC10 41 82 00 08 */ beq lbl_8007FDD8
|
|
/* 8007FDD4 0007BC14 3B BE 00 35 */ addi r29, r30, 0x35
|
|
.global lbl_8007FDD8
|
|
lbl_8007FDD8:
|
|
/* 8007FDD8 0007BC18 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
/* 8007FDDC 0007BC1C 7F A3 EB 78 */ mr r3, r29
|
|
/* 8007FDE0 0007BC20 83 C1 00 18 */ lwz r30, 0x18(r1)
|
|
/* 8007FDE4 0007BC24 83 A1 00 14 */ lwz r29, 0x14(r1)
|
|
/* 8007FDE8 0007BC28 83 81 00 10 */ lwz r28, 0x10(r1)
|
|
/* 8007FDEC 0007BC2C 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
/* 8007FDF0 0007BC30 7C 08 03 A6 */ mtlr r0
|
|
/* 8007FDF4 0007BC34 38 21 00 20 */ addi r1, r1, 0x20
|
|
/* 8007FDF8 0007BC38 4E 80 00 20 */ blr
|
|
.global btm_sec_alloc_dev
|
|
btm_sec_alloc_dev:
|
|
/* 8007FDFC 0007BC3C 94 21 FF F0 */ stwu r1, -0x10(r1)
|
|
/* 8007FE00 0007BC40 7C 08 02 A6 */ mflr r0
|
|
/* 8007FE04 0007BC44 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FE08 0007BC48 90 01 00 14 */ stw r0, 0x14(r1)
|
|
/* 8007FE0C 0007BC4C 38 00 00 10 */ li r0, 0x10
|
|
/* 8007FE10 0007BC50 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FE14 0007BC54 93 E1 00 0C */ stw r31, 0xc(r1)
|
|
/* 8007FE18 0007BC58 3B E0 00 00 */ li r31, 0x0
|
|
/* 8007FE1C 0007BC5C 93 C1 00 08 */ stw r30, 0x8(r1)
|
|
/* 8007FE20 0007BC60 7C 7E 1B 78 */ mr r30, r3
|
|
/* 8007FE24 0007BC64 38 60 00 00 */ li r3, 0x0
|
|
/* 8007FE28 0007BC68 7C 09 03 A6 */ mtctr r0
|
|
.global lbl_8007FE2C
|
|
lbl_8007FE2C:
|
|
/* 8007FE2C 0007BC6C 88 04 1F A6 */ lbz r0, 0x1fa6(r4)
|
|
/* 8007FE30 0007BC70 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FE34 0007BC74 40 82 00 1C */ bne lbl_8007FE50
|
|
/* 8007FE38 0007BC78 1C 03 00 88 */ mulli r0, r3, 0x88
|
|
/* 8007FE3C 0007BC7C 3C 60 80 4F */ lis r3, btm_cb@ha
|
|
/* 8007FE40 0007BC80 38 63 5F 58 */ addi r3, r3, btm_cb@l
|
|
/* 8007FE44 0007BC84 7C 63 02 14 */ add r3, r3, r0
|
|
/* 8007FE48 0007BC88 3B E3 1F 30 */ addi r31, r3, 0x1f30
|
|
/* 8007FE4C 0007BC8C 48 00 00 10 */ b lbl_8007FE5C
|
|
.global lbl_8007FE50
|
|
lbl_8007FE50:
|
|
/* 8007FE50 0007BC90 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 8007FE54 0007BC94 38 63 00 01 */ addi r3, r3, 0x1
|
|
/* 8007FE58 0007BC98 42 00 FF D4 */ bdnz lbl_8007FE2C
|
|
.global lbl_8007FE5C
|
|
lbl_8007FE5C:
|
|
/* 8007FE5C 0007BC9C 2C 1F 00 00 */ cmpwi r31, 0x0
|
|
/* 8007FE60 0007BCA0 40 82 00 0C */ bne lbl_8007FE6C
|
|
/* 8007FE64 0007BCA4 48 00 01 F9 */ bl btm_find_oldest_dev
|
|
/* 8007FE68 0007BCA8 7C 7F 1B 78 */ mr r31, r3
|
|
.global lbl_8007FE6C
|
|
lbl_8007FE6C:
|
|
/* 8007FE6C 0007BCAC 7F E3 FB 78 */ mr r3, r31
|
|
/* 8007FE70 0007BCB0 38 80 00 00 */ li r4, 0x0
|
|
/* 8007FE74 0007BCB4 38 A0 00 88 */ li r5, 0x88
|
|
/* 8007FE78 0007BCB8 4B F8 44 D9 */ bl memset
|
|
/* 8007FE7C 0007BCBC 38 60 00 80 */ li r3, 0x80
|
|
/* 8007FE80 0007BCC0 38 00 00 00 */ li r0, 0x0
|
|
/* 8007FE84 0007BCC4 98 7F 00 76 */ stb r3, 0x76(r31)
|
|
/* 8007FE88 0007BCC8 7F C3 F3 78 */ mr r3, r30
|
|
/* 8007FE8C 0007BCCC 98 1F 00 85 */ stb r0, 0x85(r31)
|
|
/* 8007FE90 0007BCD0 48 00 28 4D */ bl BTM_InqDbRead
|
|
/* 8007FE94 0007BCD4 2C 03 00 00 */ cmpwi r3, 0x0
|
|
/* 8007FE98 0007BCD8 7C 64 1B 78 */ mr r4, r3
|
|
/* 8007FE9C 0007BCDC 41 82 00 18 */ beq lbl_8007FEB4
|
|
/* 8007FEA0 0007BCE0 38 7F 00 22 */ addi r3, r31, 0x22
|
|
/* 8007FEA4 0007BCE4 38 84 00 08 */ addi r4, r4, 0x8
|
|
/* 8007FEA8 0007BCE8 38 A0 00 03 */ li r5, 0x3
|
|
/* 8007FEAC 0007BCEC 4B F8 41 55 */ bl memcpy
|
|
/* 8007FEB0 0007BCF0 48 00 00 1C */ b lbl_8007FECC
|
|
.global lbl_8007FEB4
|
|
lbl_8007FEB4:
|
|
/* 8007FEB4 0007BCF4 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FEB8 0007BCF8 38 7F 00 22 */ addi r3, r31, 0x22
|
|
/* 8007FEBC 0007BCFC 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FEC0 0007BD00 38 A0 00 03 */ li r5, 0x3
|
|
/* 8007FEC4 0007BD04 38 84 27 BA */ addi r4, r4, 0x27ba
|
|
/* 8007FEC8 0007BD08 4B F8 41 39 */ bl memcpy
|
|
.global lbl_8007FECC
|
|
lbl_8007FECC:
|
|
/* 8007FECC 0007BD0C 7F C4 F3 78 */ mr r4, r30
|
|
/* 8007FED0 0007BD10 38 7F 00 1C */ addi r3, r31, 0x1c
|
|
/* 8007FED4 0007BD14 38 A0 00 06 */ li r5, 0x6
|
|
/* 8007FED8 0007BD18 4B F8 41 29 */ bl memcpy
|
|
/* 8007FEDC 0007BD1C 7F C3 F3 78 */ mr r3, r30
|
|
/* 8007FEE0 0007BD20 4B FF EE 7D */ bl BTM_GetHCIConnHandle
|
|
/* 8007FEE4 0007BD24 B0 7F 00 18 */ sth r3, 0x18(r31)
|
|
/* 8007FEE8 0007BD28 3C A0 80 4F */ lis r5, btm_cb@ha
|
|
/* 8007FEEC 0007BD2C 38 A5 5F 58 */ addi r5, r5, btm_cb@l
|
|
/* 8007FEF0 0007BD30 7F E3 FB 78 */ mr r3, r31
|
|
/* 8007FEF4 0007BD34 80 85 19 74 */ lwz r4, 0x1974(r5)
|
|
/* 8007FEF8 0007BD38 90 9F 00 0C */ stw r4, 0xc(r31)
|
|
/* 8007FEFC 0007BD3C 38 04 00 01 */ addi r0, r4, 0x1
|
|
/* 8007FF00 0007BD40 90 05 19 74 */ stw r0, 0x1974(r5)
|
|
/* 8007FF04 0007BD44 83 E1 00 0C */ lwz r31, 0xc(r1)
|
|
/* 8007FF08 0007BD48 83 C1 00 08 */ lwz r30, 0x8(r1)
|
|
/* 8007FF0C 0007BD4C 80 01 00 14 */ lwz r0, 0x14(r1)
|
|
/* 8007FF10 0007BD50 7C 08 03 A6 */ mtlr r0
|
|
/* 8007FF14 0007BD54 38 21 00 10 */ addi r1, r1, 0x10
|
|
/* 8007FF18 0007BD58 4E 80 00 20 */ blr
|
|
.global btm_find_dev_by_handle
|
|
btm_find_dev_by_handle:
|
|
/* 8007FF1C 0007BD5C 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FF20 0007BD60 38 00 00 04 */ li r0, 0x4
|
|
/* 8007FF24 0007BD64 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FF28 0007BD68 38 A0 00 00 */ li r5, 0x0
|
|
/* 8007FF2C 0007BD6C 38 84 1F 30 */ addi r4, r4, 0x1f30
|
|
/* 8007FF30 0007BD70 7C 09 03 A6 */ mtctr r0
|
|
.global lbl_8007FF34
|
|
lbl_8007FF34:
|
|
/* 8007FF34 0007BD74 88 04 00 76 */ lbz r0, 0x76(r4)
|
|
/* 8007FF38 0007BD78 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FF3C 0007BD7C 41 82 00 18 */ beq lbl_8007FF54
|
|
/* 8007FF40 0007BD80 A0 04 00 18 */ lhz r0, 0x18(r4)
|
|
/* 8007FF44 0007BD84 7C 00 18 40 */ cmplw r0, r3
|
|
/* 8007FF48 0007BD88 40 82 00 0C */ bne lbl_8007FF54
|
|
/* 8007FF4C 0007BD8C 7C 83 23 78 */ mr r3, r4
|
|
/* 8007FF50 0007BD90 4E 80 00 20 */ blr
|
|
.global lbl_8007FF54
|
|
lbl_8007FF54:
|
|
/* 8007FF54 0007BD94 88 04 00 FE */ lbz r0, 0xfe(r4)
|
|
/* 8007FF58 0007BD98 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 8007FF5C 0007BD9C 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FF60 0007BDA0 41 82 00 18 */ beq lbl_8007FF78
|
|
/* 8007FF64 0007BDA4 A0 04 00 18 */ lhz r0, 0x18(r4)
|
|
/* 8007FF68 0007BDA8 7C 00 18 40 */ cmplw r0, r3
|
|
/* 8007FF6C 0007BDAC 40 82 00 0C */ bne lbl_8007FF78
|
|
/* 8007FF70 0007BDB0 7C 83 23 78 */ mr r3, r4
|
|
/* 8007FF74 0007BDB4 4E 80 00 20 */ blr
|
|
.global lbl_8007FF78
|
|
lbl_8007FF78:
|
|
/* 8007FF78 0007BDB8 88 04 00 FE */ lbz r0, 0xfe(r4)
|
|
/* 8007FF7C 0007BDBC 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 8007FF80 0007BDC0 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FF84 0007BDC4 41 82 00 18 */ beq lbl_8007FF9C
|
|
/* 8007FF88 0007BDC8 A0 04 00 18 */ lhz r0, 0x18(r4)
|
|
/* 8007FF8C 0007BDCC 7C 00 18 40 */ cmplw r0, r3
|
|
/* 8007FF90 0007BDD0 40 82 00 0C */ bne lbl_8007FF9C
|
|
/* 8007FF94 0007BDD4 7C 83 23 78 */ mr r3, r4
|
|
/* 8007FF98 0007BDD8 4E 80 00 20 */ blr
|
|
.global lbl_8007FF9C
|
|
lbl_8007FF9C:
|
|
/* 8007FF9C 0007BDDC 88 04 00 FE */ lbz r0, 0xfe(r4)
|
|
/* 8007FFA0 0007BDE0 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 8007FFA4 0007BDE4 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 8007FFA8 0007BDE8 41 82 00 18 */ beq lbl_8007FFC0
|
|
/* 8007FFAC 0007BDEC A0 04 00 18 */ lhz r0, 0x18(r4)
|
|
/* 8007FFB0 0007BDF0 7C 00 18 40 */ cmplw r0, r3
|
|
/* 8007FFB4 0007BDF4 40 82 00 0C */ bne lbl_8007FFC0
|
|
/* 8007FFB8 0007BDF8 7C 83 23 78 */ mr r3, r4
|
|
/* 8007FFBC 0007BDFC 4E 80 00 20 */ blr
|
|
.global lbl_8007FFC0
|
|
lbl_8007FFC0:
|
|
/* 8007FFC0 0007BE00 38 A5 00 03 */ addi r5, r5, 0x3
|
|
/* 8007FFC4 0007BE04 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 8007FFC8 0007BE08 42 00 FF 6C */ bdnz lbl_8007FF34
|
|
/* 8007FFCC 0007BE0C 38 60 00 00 */ li r3, 0x0
|
|
/* 8007FFD0 0007BE10 4E 80 00 20 */ blr
|
|
.global btm_find_dev
|
|
btm_find_dev:
|
|
/* 8007FFD4 0007BE14 94 21 FF E0 */ stwu r1, -0x20(r1)
|
|
/* 8007FFD8 0007BE18 7C 08 02 A6 */ mflr r0
|
|
/* 8007FFDC 0007BE1C 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 8007FFE0 0007BE20 90 01 00 24 */ stw r0, 0x24(r1)
|
|
/* 8007FFE4 0007BE24 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8007FFE8 0007BE28 93 E1 00 1C */ stw r31, 0x1c(r1)
|
|
/* 8007FFEC 0007BE2C 3B E4 1F 30 */ addi r31, r4, 0x1f30
|
|
/* 8007FFF0 0007BE30 93 C1 00 18 */ stw r30, 0x18(r1)
|
|
/* 8007FFF4 0007BE34 3B C0 00 00 */ li r30, 0x0
|
|
/* 8007FFF8 0007BE38 93 A1 00 14 */ stw r29, 0x14(r1)
|
|
/* 8007FFFC 0007BE3C 7C 7D 1B 78 */ mr r29, r3
|
|
.global lbl_80080000
|
|
lbl_80080000:
|
|
/* 80080000 0007BE40 88 1F 00 76 */ lbz r0, 0x76(r31)
|
|
/* 80080004 0007BE44 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 80080008 0007BE48 41 82 00 24 */ beq lbl_8008002C
|
|
/* 8008000C 0007BE4C 7F A4 EB 78 */ mr r4, r29
|
|
/* 80080010 0007BE50 38 7F 00 1C */ addi r3, r31, 0x1c
|
|
/* 80080014 0007BE54 38 A0 00 06 */ li r5, 0x6
|
|
/* 80080018 0007BE58 4B F8 AE 59 */ bl memcmp
|
|
/* 8008001C 0007BE5C 2C 03 00 00 */ cmpwi r3, 0x0
|
|
/* 80080020 0007BE60 40 82 00 0C */ bne lbl_8008002C
|
|
/* 80080024 0007BE64 7F E3 FB 78 */ mr r3, r31
|
|
/* 80080028 0007BE68 48 00 00 18 */ b lbl_80080040
|
|
.global lbl_8008002C
|
|
lbl_8008002C:
|
|
/* 8008002C 0007BE6C 3B DE 00 01 */ addi r30, r30, 0x1
|
|
/* 80080030 0007BE70 3B FF 00 88 */ addi r31, r31, 0x88
|
|
/* 80080034 0007BE74 2C 1E 00 10 */ cmpwi r30, 0x10
|
|
/* 80080038 0007BE78 41 80 FF C8 */ blt lbl_80080000
|
|
/* 8008003C 0007BE7C 38 60 00 00 */ li r3, 0x0
|
|
.global lbl_80080040
|
|
lbl_80080040:
|
|
/* 80080040 0007BE80 80 01 00 24 */ lwz r0, 0x24(r1)
|
|
/* 80080044 0007BE84 83 E1 00 1C */ lwz r31, 0x1c(r1)
|
|
/* 80080048 0007BE88 83 C1 00 18 */ lwz r30, 0x18(r1)
|
|
/* 8008004C 0007BE8C 83 A1 00 14 */ lwz r29, 0x14(r1)
|
|
/* 80080050 0007BE90 7C 08 03 A6 */ mtlr r0
|
|
/* 80080054 0007BE94 38 21 00 20 */ addi r1, r1, 0x20
|
|
/* 80080058 0007BE98 4E 80 00 20 */ blr
|
|
.global btm_find_oldest_dev
|
|
btm_find_oldest_dev:
|
|
/* 8008005C 0007BE9C 3C 60 80 4F */ lis r3, btm_cb@ha
|
|
/* 80080060 0007BEA0 38 00 00 04 */ li r0, 0x4
|
|
/* 80080064 0007BEA4 38 63 5F 58 */ addi r3, r3, btm_cb@l
|
|
/* 80080068 0007BEA8 38 C0 FF FF */ li r6, -0x1
|
|
/* 8008006C 0007BEAC 38 A3 1F 30 */ addi r5, r3, 0x1f30
|
|
/* 80080070 0007BEB0 38 E0 00 00 */ li r7, 0x0
|
|
/* 80080074 0007BEB4 7C A3 2B 78 */ mr r3, r5
|
|
/* 80080078 0007BEB8 7C 09 03 A6 */ mtctr r0
|
|
.global lbl_8008007C
|
|
lbl_8008007C:
|
|
/* 8008007C 0007BEBC 88 85 00 76 */ lbz r4, 0x76(r5)
|
|
/* 80080080 0007BEC0 54 80 06 31 */ rlwinm. r0, r4, 0, 24, 24
|
|
/* 80080084 0007BEC4 41 82 00 20 */ beq lbl_800800A4
|
|
/* 80080088 0007BEC8 54 80 06 F7 */ rlwinm. r0, r4, 0, 27, 27
|
|
/* 8008008C 0007BECC 40 82 00 18 */ bne lbl_800800A4
|
|
/* 80080090 0007BED0 80 05 00 0C */ lwz r0, 0xc(r5)
|
|
/* 80080094 0007BED4 7C 00 30 40 */ cmplw r0, r6
|
|
/* 80080098 0007BED8 40 80 00 0C */ bge lbl_800800A4
|
|
/* 8008009C 0007BEDC 7C A3 2B 78 */ mr r3, r5
|
|
/* 800800A0 0007BEE0 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_800800A4
|
|
lbl_800800A4:
|
|
/* 800800A4 0007BEE4 88 85 00 FE */ lbz r4, 0xfe(r5)
|
|
/* 800800A8 0007BEE8 38 A5 00 88 */ addi r5, r5, 0x88
|
|
/* 800800AC 0007BEEC 54 80 06 31 */ rlwinm. r0, r4, 0, 24, 24
|
|
/* 800800B0 0007BEF0 41 82 00 20 */ beq lbl_800800D0
|
|
/* 800800B4 0007BEF4 54 80 06 F7 */ rlwinm. r0, r4, 0, 27, 27
|
|
/* 800800B8 0007BEF8 40 82 00 18 */ bne lbl_800800D0
|
|
/* 800800BC 0007BEFC 80 05 00 0C */ lwz r0, 0xc(r5)
|
|
/* 800800C0 0007BF00 7C 00 30 40 */ cmplw r0, r6
|
|
/* 800800C4 0007BF04 40 80 00 0C */ bge lbl_800800D0
|
|
/* 800800C8 0007BF08 7C A3 2B 78 */ mr r3, r5
|
|
/* 800800CC 0007BF0C 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_800800D0
|
|
lbl_800800D0:
|
|
/* 800800D0 0007BF10 88 85 00 FE */ lbz r4, 0xfe(r5)
|
|
/* 800800D4 0007BF14 38 A5 00 88 */ addi r5, r5, 0x88
|
|
/* 800800D8 0007BF18 54 80 06 31 */ rlwinm. r0, r4, 0, 24, 24
|
|
/* 800800DC 0007BF1C 41 82 00 20 */ beq lbl_800800FC
|
|
/* 800800E0 0007BF20 54 80 06 F7 */ rlwinm. r0, r4, 0, 27, 27
|
|
/* 800800E4 0007BF24 40 82 00 18 */ bne lbl_800800FC
|
|
/* 800800E8 0007BF28 80 05 00 0C */ lwz r0, 0xc(r5)
|
|
/* 800800EC 0007BF2C 7C 00 30 40 */ cmplw r0, r6
|
|
/* 800800F0 0007BF30 40 80 00 0C */ bge lbl_800800FC
|
|
/* 800800F4 0007BF34 7C A3 2B 78 */ mr r3, r5
|
|
/* 800800F8 0007BF38 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_800800FC
|
|
lbl_800800FC:
|
|
/* 800800FC 0007BF3C 88 85 00 FE */ lbz r4, 0xfe(r5)
|
|
/* 80080100 0007BF40 38 A5 00 88 */ addi r5, r5, 0x88
|
|
/* 80080104 0007BF44 54 80 06 31 */ rlwinm. r0, r4, 0, 24, 24
|
|
/* 80080108 0007BF48 41 82 00 20 */ beq lbl_80080128
|
|
/* 8008010C 0007BF4C 54 80 06 F7 */ rlwinm. r0, r4, 0, 27, 27
|
|
/* 80080110 0007BF50 40 82 00 18 */ bne lbl_80080128
|
|
/* 80080114 0007BF54 80 05 00 0C */ lwz r0, 0xc(r5)
|
|
/* 80080118 0007BF58 7C 00 30 40 */ cmplw r0, r6
|
|
/* 8008011C 0007BF5C 40 80 00 0C */ bge lbl_80080128
|
|
/* 80080120 0007BF60 7C A3 2B 78 */ mr r3, r5
|
|
/* 80080124 0007BF64 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_80080128
|
|
lbl_80080128:
|
|
/* 80080128 0007BF68 38 E7 00 03 */ addi r7, r7, 0x3
|
|
/* 8008012C 0007BF6C 38 A5 00 88 */ addi r5, r5, 0x88
|
|
/* 80080130 0007BF70 42 00 FF 4C */ bdnz lbl_8008007C
|
|
/* 80080134 0007BF74 3C 06 00 01 */ addis r0, r6, 0x1
|
|
/* 80080138 0007BF78 28 00 FF FF */ cmplwi r0, 0xffff
|
|
/* 8008013C 0007BF7C 4C 82 00 20 */ bnelr
|
|
/* 80080140 0007BF80 3C 80 80 4F */ lis r4, btm_cb@ha
|
|
/* 80080144 0007BF84 38 00 00 04 */ li r0, 0x4
|
|
/* 80080148 0007BF88 38 84 5F 58 */ addi r4, r4, btm_cb@l
|
|
/* 8008014C 0007BF8C 38 A0 00 00 */ li r5, 0x0
|
|
/* 80080150 0007BF90 38 84 1F 30 */ addi r4, r4, 0x1f30
|
|
/* 80080154 0007BF94 7C 09 03 A6 */ mtctr r0
|
|
.global lbl_80080158
|
|
lbl_80080158:
|
|
/* 80080158 0007BF98 88 04 00 76 */ lbz r0, 0x76(r4)
|
|
/* 8008015C 0007BF9C 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 80080160 0007BFA0 41 82 00 18 */ beq lbl_80080178
|
|
/* 80080164 0007BFA4 80 04 00 0C */ lwz r0, 0xc(r4)
|
|
/* 80080168 0007BFA8 7C 00 30 40 */ cmplw r0, r6
|
|
/* 8008016C 0007BFAC 40 80 00 0C */ bge lbl_80080178
|
|
/* 80080170 0007BFB0 7C 83 23 78 */ mr r3, r4
|
|
/* 80080174 0007BFB4 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_80080178
|
|
lbl_80080178:
|
|
/* 80080178 0007BFB8 88 04 00 FE */ lbz r0, 0xfe(r4)
|
|
/* 8008017C 0007BFBC 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 80080180 0007BFC0 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 80080184 0007BFC4 41 82 00 18 */ beq lbl_8008019C
|
|
/* 80080188 0007BFC8 80 04 00 0C */ lwz r0, 0xc(r4)
|
|
/* 8008018C 0007BFCC 7C 00 30 40 */ cmplw r0, r6
|
|
/* 80080190 0007BFD0 40 80 00 0C */ bge lbl_8008019C
|
|
/* 80080194 0007BFD4 7C 83 23 78 */ mr r3, r4
|
|
/* 80080198 0007BFD8 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_8008019C
|
|
lbl_8008019C:
|
|
/* 8008019C 0007BFDC 88 04 00 FE */ lbz r0, 0xfe(r4)
|
|
/* 800801A0 0007BFE0 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 800801A4 0007BFE4 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 800801A8 0007BFE8 41 82 00 18 */ beq lbl_800801C0
|
|
/* 800801AC 0007BFEC 80 04 00 0C */ lwz r0, 0xc(r4)
|
|
/* 800801B0 0007BFF0 7C 00 30 40 */ cmplw r0, r6
|
|
/* 800801B4 0007BFF4 40 80 00 0C */ bge lbl_800801C0
|
|
/* 800801B8 0007BFF8 7C 83 23 78 */ mr r3, r4
|
|
/* 800801BC 0007BFFC 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_800801C0
|
|
lbl_800801C0:
|
|
/* 800801C0 0007C000 88 04 00 FE */ lbz r0, 0xfe(r4)
|
|
/* 800801C4 0007C004 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 800801C8 0007C008 54 00 06 31 */ rlwinm. r0, r0, 0, 24, 24
|
|
/* 800801CC 0007C00C 41 82 00 18 */ beq lbl_800801E4
|
|
/* 800801D0 0007C010 80 04 00 0C */ lwz r0, 0xc(r4)
|
|
/* 800801D4 0007C014 7C 00 30 40 */ cmplw r0, r6
|
|
/* 800801D8 0007C018 40 80 00 0C */ bge lbl_800801E4
|
|
/* 800801DC 0007C01C 7C 83 23 78 */ mr r3, r4
|
|
/* 800801E0 0007C020 7C 06 03 78 */ mr r6, r0
|
|
.global lbl_800801E4
|
|
lbl_800801E4:
|
|
/* 800801E4 0007C024 38 A5 00 03 */ addi r5, r5, 0x3
|
|
/* 800801E8 0007C028 38 84 00 88 */ addi r4, r4, 0x88
|
|
/* 800801EC 0007C02C 42 00 FF 6C */ bdnz lbl_80080158
|
|
/* 800801F0 0007C030 4E 80 00 20 */ blr
|