	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_return_link_key_evt
_hci_return_link_key_evt:               ## @hci_return_link_key_evt
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movl	(%r13), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_9
## %bb.1:
	movq	_MEMB_NUM_HCI_LINK_KEY@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.2:
	movl	$1, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_hci_link_key_results@GOTPCREL(%rip), %rdi
	callq	_btmemb_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rbx
	movl	%r12d, %r14d
	andl	$-2, %r14d
	shlq	$2, %r14
	leaq	(%r14,%r13), %rsi
	addq	$4, %rsi
	movq	%rax, %rdi
	addq	$12, %rdi
	callq	_bd_addr_set
	movl	8(%rbx), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	leaq	(%rax,%r14), %rsi
	addq	$28, %rsi
	movl	$16, %edx
	callq	_memcpy
	movq	$0, (%rbx)
	movq	_hci_dev@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_HCI_REG
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	jb	LBB0_7
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_ERROR
	cmpq	-56(%rbp), %r15                 ## 8-byte Folded Reload
	jae	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_MEMB_NUM_HCI_LINK_KEY@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r13
	addq	$22, %r12
	incq	%r15
	jmp	LBB0_3
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEMB_NUM_HCI_LINK_KEY,4,2      ## @MEMB_NUM_HCI_LINK_KEY
	.comm	_hci_link_key_results,4,2       ## @hci_link_key_results
	.comm	_hci_dev,8,3                    ## @hci_dev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hci_return_link_key_evt: Could not allocate memory for link key result\n"

	.no_dead_strip	_hci_return_link_key_evt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_return_link_key_evt
_hci_return_link_key_evt:               ; @hci_return_link_key_evt
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x28, [x0]
	ldr	w23, [x28]
Lloh0:
	adrp	x24, _MEMB_NUM_HCI_LINK_KEY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MEMB_NUM_HCI_LINK_KEY@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w23, #1
	ccmp	w8, #1, #8, ge
	b.ge	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	mov	x25, #0
	mov	w26, #1
Lloh2:
	adrp	x20, _hci_link_key_results@GOTPAGE
Lloh3:
	ldr	x20, [x20, _hci_link_key_results@GOTPAGEOFF]
Lloh4:
	adrp	x27, _hci_dev@GOTPAGE
Lloh5:
	ldr	x27, [x27, _hci_dev@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_btmemb_alloc
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	lsl	x8, x25, #2
	and	x21, x8, #0x3fffffff8
	add	x8, x28, x21
	add	x1, x8, #4
	add	x0, x0, #12
	bl	_bd_addr_set
	ldr	w0, [x22, #8]
	ldr	x8, [x19]
	add	x8, x8, x21
	add	x1, x8, #28
	mov	w2, #16
	bl	_memcpy
	str	xzr, [x22]
	ldr	x0, [x27]
	mov	x1, x22
	bl	_HCI_REG
	cmp	x26, x23
	b.lo	LBB0_6
	b	LBB0_1
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERROR
	cmp	x26, x23
	b.hs	LBB0_1
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x8, [x24]
	cmp	x26, x8
	b.ge	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x28, [x19]
	add	x25, x25, #22
	add	x26, x26, #1
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MEMB_NUM_HCI_LINK_KEY,4,2      ; @MEMB_NUM_HCI_LINK_KEY
	.comm	_hci_link_key_results,4,2       ; @hci_link_key_results
	.comm	_hci_dev,8,3                    ; @hci_dev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hci_return_link_key_evt: Could not allocate memory for link key result\n"

	.no_dead_strip	_hci_return_link_key_evt
.subsections_via_symbols
