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

29 lines
1.4 KiB
ArmAsm

.include "macros.inc"
.section .text, "ax" # 0x80006A00 - 0x80406260 ; 0x003FF860
.global GAP_Init
GAP_Init:
/* 800895E0 00085420 94 21 FF F0 */ stwu r1, -0x10(r1)
/* 800895E4 00085424 7C 08 02 A6 */ mflr r0
/* 800895E8 00085428 38 80 00 00 */ li r4, 0x0
/* 800895EC 0008542C 38 A0 03 AC */ li r5, 0x3ac
/* 800895F0 00085430 90 01 00 14 */ stw r0, 0x14(r1)
/* 800895F4 00085434 93 E1 00 0C */ stw r31, 0xc(r1)
/* 800895F8 00085438 3F E0 80 50 */ lis r31, gap_cb@ha
/* 800895FC 0008543C 38 7F 87 20 */ addi r3, r31, gap_cb@l
/* 80089600 00085440 4B F7 AD 51 */ bl memset
/* 80089604 00085444 3C A0 80 09 */ lis r5, gap_btm_cback0@ha
/* 80089608 00085448 3C 60 80 09 */ lis r3, gap_btm_cback1@ha
/* 8008960C 0008544C 38 A5 A3 54 */ addi r5, r5, gap_btm_cback0@l
/* 80089610 00085450 38 9F 87 20 */ addi r4, r31, -0x78e0
/* 80089614 00085454 38 63 A3 60 */ addi r3, r3, gap_btm_cback1@l
/* 80089618 00085458 38 00 00 05 */ li r0, 0x5
/* 8008961C 0008545C 90 A4 00 20 */ stw r5, 0x20(r4)
/* 80089620 00085460 90 64 00 24 */ stw r3, 0x24(r4)
/* 80089624 00085464 98 04 00 28 */ stb r0, 0x28(r4)
/* 80089628 00085468 48 00 00 19 */ bl gap_conn_init
/* 8008962C 0008546C 80 01 00 14 */ lwz r0, 0x14(r1)
/* 80089630 00085470 83 E1 00 0C */ lwz r31, 0xc(r1)
/* 80089634 00085474 7C 08 03 A6 */ mtlr r0
/* 80089638 00085478 38 21 00 10 */ addi r1, r1, 0x10
/* 8008963C 0008547C 4E 80 00 20 */ blr