	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hci_read_remote_name           ## -- Begin function hci_read_remote_name
	.p2align	4, 0x90
_hci_read_remote_name:                  ## @hci_read_remote_name
	.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
	movq	%rdi, %r12
	movq	_hci_dev@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movl	$1, %r15d
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	12(%rbx), %rdi
	movq	%r12, %rsi
	callq	_bd_addr_cmp
	testq	%rax, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_2
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_3:
	movl	(%rbx), %r15d
	movl	4(%rbx), %r13d
	movl	8(%rbx), %r14d
LBB0_6:
	movq	_PBUF_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HCI_R_REMOTE_NAME_PLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_PBUF_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_btpbuf_alloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	_HCI_R_REMOTE_NAME_OCF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_HCI_LINK_CTRL_OGF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rbx), %ecx
	movq	%rax, %rdi
	callq	_hci_cmd_ass
	movl	%r15d, %ebx
	movq	%rax, %r15
	movq	8(%rax), %rdi
	addq	$16, %rdi
	movl	(%r12), %esi
	movl	$6, %edx
	callq	_memcpy
	movq	8(%r15), %rax
	movl	%ebx, 40(%rax)
	movl	%r13d, 44(%rax)
	movl	%r14d, %edi
	callq	_htole16
	movq	8(%r15), %rcx
	movl	%eax, 24(%rcx)
	movl	(%r15), %esi
	movq	%r15, %rdi
	callq	_physbusif_output
	movq	%r15, %rdi
	callq	_btpbuf_free
	movq	_ERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_ERROR
	movq	_ERR_MEM@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hci_dev,8,3                    ## @hci_dev
	.comm	_PBUF_RAW,4,2                   ## @PBUF_RAW
	.comm	_HCI_R_REMOTE_NAME_PLEN,4,2     ## @HCI_R_REMOTE_NAME_PLEN
	.comm	_PBUF_RAM,4,2                   ## @PBUF_RAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hci_read_remote_name: Could not allocate memory for pbuf\n"

	.comm	_ERR_MEM,4,2                    ## @ERR_MEM
	.comm	_HCI_R_REMOTE_NAME_OCF,4,2      ## @HCI_R_REMOTE_NAME_OCF
	.comm	_HCI_LINK_CTRL_OGF,4,2          ## @HCI_LINK_CTRL_OGF
	.comm	_ERR_OK,4,2                     ## @ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hci_read_remote_name
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_hci_read_remote_name
	.p2align	2
_hci_read_remote_name:                  ; @hci_read_remote_name
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 b8, -56
	.cfi_offset b9, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _hci_dev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hci_dev@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x20, [x8]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
	cbz	x20, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x20, #12
	mov	x1, x19
	bl	_bd_addr_cmp
	cbnz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x20, [x20, #16]
	cbnz	x20, LBB0_1
	b	LBB0_4
LBB0_3:
	ldr	d8, [x20]
	ldr	w20, [x20, #8]
LBB0_4:
Lloh5:
	adrp	x8, _PBUF_RAW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PBUF_RAW@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x21, _HCI_R_REMOTE_NAME_PLEN@GOTPAGE
Lloh9:
	ldr	x21, [x21, _HCI_R_REMOTE_NAME_PLEN@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _PBUF_RAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PBUF_RAM@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_btpbuf_alloc
	cbz	x0, LBB0_6
; %bb.5:
Lloh13:
	adrp	x8, _HCI_R_REMOTE_NAME_OCF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HCI_R_REMOTE_NAME_OCF@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _HCI_LINK_CTRL_OGF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HCI_LINK_CTRL_OGF@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	ldr	w3, [x21]
	bl	_hci_cmd_ass
	mov	x21, x0
	ldr	x8, [x0, #8]
	add	x0, x8, #16
	ldr	w1, [x19]
	mov	w2, #6
	bl	_memcpy
	ldr	x8, [x21, #8]
	str	d8, [x8, #40]
	mov	x0, x20
	bl	_htole16
	ldr	x8, [x21, #8]
	str	w0, [x8, #24]
	ldr	w1, [x21]
	mov	x0, x21
	bl	_physbusif_output
	mov	x0, x21
	bl	_btpbuf_free
Lloh19:
	adrp	x8, _ERR_OK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERR_OK@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERROR
Lloh23:
	adrp	x8, _ERR_MEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERR_MEM@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_hci_dev,8,3                    ; @hci_dev
	.comm	_PBUF_RAW,4,2                   ; @PBUF_RAW
	.comm	_HCI_R_REMOTE_NAME_PLEN,4,2     ; @HCI_R_REMOTE_NAME_PLEN
	.comm	_PBUF_RAM,4,2                   ; @PBUF_RAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hci_read_remote_name: Could not allocate memory for pbuf\n"

	.comm	_ERR_MEM,4,2                    ; @ERR_MEM
	.comm	_HCI_R_REMOTE_NAME_OCF,4,2      ; @HCI_R_REMOTE_NAME_OCF
	.comm	_HCI_LINK_CTRL_OGF,4,2          ; @HCI_LINK_CTRL_OGF
	.comm	_ERR_OK,4,2                     ; @ERR_OK
.subsections_via_symbols
