	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bte_read_stored_link_key_complete ## -- Begin function bte_read_stored_link_key_complete
	.p2align	4, 0x90
_bte_read_stored_link_key_complete:     ## @bte_read_stored_link_key_complete
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rsi), %rdx
	leaq	L_.str(%rip), %rdi
	movq	%r8, %rsi
	xorl	%eax, %eax
	callq	_LOG
	testq	%r15, %r15
	je	LBB0_3
## %bb.4:
	movq	_HCI_HC_BB_OGF@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	_HCI_R_STORED_LINK_KEY_OCF@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_6
## %bb.8:
	movq	_HCI_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_19
## %bb.9:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rbx
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.10:
	movq	8(%r15), %r14
	testq	%r14, %r14
	je	LBB0_17
## %bb.11:
	cmpq	$0, (%r15)
	jle	LBB0_12
## %bb.13:
	addq	$4, %r14
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leaq	12(%rbx), %rsi
	movq	%r14, %rdi
	callq	_bd_addr_set
	movl	-4(%r14), %edi
	movl	8(%rbx), %esi
	movl	$16, %edx
	callq	_memcpy
	incq	%r13
	cmpq	(%r15), %r13
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rbx), %rbx
	addq	$8, %r14
	testq	%rbx, %rbx
	jne	LBB0_14
LBB0_16:
	movq	(%r12), %rbx
	jmp	LBB0_17
LBB0_1:
	movq	_ERR_CONN@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_3:
	movq	_ERR_VAL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_6:
	movq	_ERR_CONN@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_19:
	movq	_ERR_VAL@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rsi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___bte_cmdfinish                ## TAILCALL
LBB0_12:
	xorl	%r13d, %r13d
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_LOG
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	___bte_cmdfinish
	movq	_ERR_OK@GOTPCREL(%rip), %rax
LBB0_18:
	movq	(%rax), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_CONN,8,3                   ## @ERR_CONN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bte_read_stored_link_key_complete(%02x,%p)\n"

	.comm	_ERR_VAL,8,3                    ## @ERR_VAL
	.comm	_HCI_HC_BB_OGF,8,3              ## @HCI_HC_BB_OGF
	.comm	_HCI_R_STORED_LINK_KEY_OCF,8,3  ## @HCI_R_STORED_LINK_KEY_OCF
	.comm	_HCI_SUCCESS,8,3                ## @HCI_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"bte_read_stored_link_key_complete(%02x,%p,%d)\n"

	.comm	_ERR_OK,8,3                     ## @ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bte_read_stored_link_key_complete ; -- Begin function bte_read_stored_link_key_complete
	.p2align	2
_bte_read_stored_link_key_complete:     ; @bte_read_stored_link_key_complete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x1, LBB0_4
; %bb.1:
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x2, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x4
	bl	_LOG
	cbz	x19, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _HCI_HC_BB_OGF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HCI_HC_BB_OGF@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _HCI_R_STORED_LINK_KEY_OCF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HCI_R_STORED_LINK_KEY_OCF@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x23
	ccmp	x9, x22, #0, eq
	b.eq	LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, _ERR_CONN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_CONN@GOTPAGEOFF]
	b	LBB0_14
LBB0_4:
Lloh10:
	adrp	x8, _ERR_CONN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERR_CONN@GOTPAGEOFF]
	b	LBB0_17
LBB0_5:
Lloh12:
	adrp	x8, _ERR_VAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERR_VAL@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
Lloh14:
	adrp	x8, _HCI_SUCCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HCI_SUCCESS@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_13
; %bb.7:
	mov	x23, #0
	ldr	x22, [x21]
	cbz	x22, LBB0_16
; %bb.8:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_16
; %bb.9:
	ldr	x9, [x19]
	cmp	x9, #1
	b.lt	LBB0_15
; %bb.10:
	mov	x23, #0
	add	x24, x8, #4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x1, x22, #12
	mov	x0, x24
	bl	_bd_addr_set
	ldur	w0, [x24, #-4]
	ldr	w1, [x22, #8]
	mov	w2, #16
	bl	_memcpy
	ldr	x22, [x22]
	add	x23, x23, #1
	ldr	x8, [x19]
	add	x24, x24, #8
	cmp	x23, x8
	ccmp	x22, #0, #4, lt
	b.ne	LBB0_11
; %bb.12:
	ldr	x22, [x21]
	b	LBB0_16
LBB0_13:
Lloh17:
	adrp	x8, _ERR_VAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERR_VAL@GOTPAGEOFF]
LBB0_14:
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	___bte_cmdfinish
LBB0_15:
	mov	x23, #0
LBB0_16:
	str	x23, [sp]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x22
	bl	_LOG
	mov	x0, x19
	mov	x1, x23
	bl	___bte_cmdfinish
Lloh21:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
LBB0_17:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_CONN,8,3                   ; @ERR_CONN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bte_read_stored_link_key_complete(%02x,%p)\n"

	.comm	_ERR_VAL,8,3                    ; @ERR_VAL
	.comm	_HCI_HC_BB_OGF,8,3              ; @HCI_HC_BB_OGF
	.comm	_HCI_R_STORED_LINK_KEY_OCF,8,3  ; @HCI_R_STORED_LINK_KEY_OCF
	.comm	_HCI_SUCCESS,8,3                ; @HCI_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"bte_read_stored_link_key_complete(%02x,%p,%d)\n"

	.comm	_ERR_OK,8,3                     ; @ERR_OK
.subsections_via_symbols
