	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_remote_name_request
_hci_remote_name_request:               ## @hci_remote_name_request
	.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	$552, %rsp                      ## imm = 0x228
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-584(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_NG_HCI_SCAN_REP_MODE0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -584(%rbp)
	movq	_NG_HCI_MANDATORY_PAGE_SCAN_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -580(%rbp)
	decl	%ebx
	cmpl	$3, %ebx
	ja	LBB0_3
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	24(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.4:
	movzwl	-564(%rbp), %edi
	movl	%edi, -576(%rbp)
	callq	_htole16
	movl	%eax, -576(%rbp)
LBB0_5:
	movq	16(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.6:
	movl	-564(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:
	cmpl	$4, %eax
	jge	LBB0_3
## %bb.8:
	movl	%eax, -580(%rbp)
LBB0_9:
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.10:
	movl	-564(%rbp), %eax
	testl	%eax, %eax
	js	LBB0_3
## %bb.11:
	cmpl	$3, %eax
	jge	LBB0_3
## %bb.12:
	movl	%eax, -584(%rbp)
LBB0_13:
	movq	(%r15), %rdi
	leaq	-572(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_bt_aton
	testl	%eax, %eax
	jne	LBB0_16
## %bb.14:
	movq	(%r15), %rdi
	callq	_bt_gethostbyname
	testq	%rax, %rax
	je	LBB0_3
## %bb.15:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_memcpy
LBB0_16:
	movl	$512, -564(%rbp)                ## imm = 0x200
	movq	_NG_HCI_OGF_LINK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NG_HCI_OCF_REMOTE_NAME_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_NG_HCI_OPCODE
	leaq	-584(%rbp), %rdx
	leaq	-560(%rbp), %r8
	leaq	-564(%rbp), %r9
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	$16, %ecx
	callq	_hci_request
	movq	_ERROR@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_29
## %bb.17:
	cmpb	$0, -560(%rbp)
	je	LBB0_18
## %bb.31:
	movq	_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_3:
	movq	_USAGE@GOTPCREL(%rip), %rax
LBB0_28:
	movl	(%rax), %eax
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_32
## %bb.30:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$552, %rsp                      ## imm = 0x228
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	-560(%rbp), %r15
	leaq	-564(%rbp), %r12
	movq	_NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	$512, -564(%rbp)                ## imm = 0x200
	movl	%r14d, %edi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_hci_recv
	movq	(%rbx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_29
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$7, -564(%rbp)
	jbe	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-560(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_19
## %bb.23:
	movl	-552(%rbp), %ebx
	movq	_stdout@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	testl	%ebx, %ebx
	je	LBB0_25
## %bb.24:
	movl	%ebx, %edi
	callq	_hci_status2str
	movl	-552(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_26
LBB0_21:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	movl	%ecx, %eax
	jmp	LBB0_29
LBB0_25:
	leaq	-536(%rbp), %rdi
	callq	_hci_bdaddr2str
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r15), %edi
	movq	-544(%rbp), %rdx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
                                        ## implicit-def: $eax
LBB0_26:
	testl	%ebx, %ebx
	jne	LBB0_29
## %bb.27:
	movq	_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_28
LBB0_32:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_5
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_NG_HCI_SCAN_REP_MODE0,4,2      ## @NG_HCI_SCAN_REP_MODE0
	.comm	_NG_HCI_MANDATORY_PAGE_SCAN_MODE,4,2 ## @NG_HCI_MANDATORY_PAGE_SCAN_MODE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%x"

	.comm	_USAGE,4,2                      ## @USAGE
L_.str.1:                               ## @.str.1
	.asciz	"%d"

	.comm	_NG_HCI_OGF_LINK_CONTROL,4,2    ## @NG_HCI_OGF_LINK_CONTROL
	.comm	_NG_HCI_OCF_REMOTE_NAME_REQ,4,2 ## @NG_HCI_OCF_REMOTE_NAME_REQ
	.comm	_ERROR,8,3                      ## @ERROR
	.comm	_FAILED,4,2                     ## @FAILED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_errno,4,2                      ## @errno
	.comm	_NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL,8,3 ## @NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL
	.comm	_stdout,4,2                     ## @stdout
L_.str.2:                               ## @.str.2
	.asciz	"Status: %s [%#02x]\n"

L_.str.3:                               ## @.str.3
	.asciz	"BD_ADDR: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Name: %s\n"

	.comm	_OK,4,2                         ## @OK
	.no_dead_strip	_hci_remote_name_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_remote_name_request
_hci_remote_name_request:               ; @hci_remote_name_request
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #560
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh3:
	adrp	x8, _NG_HCI_SCAN_REP_MODE0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_HCI_SCAN_REP_MODE0@GOTPAGEOFF]
Lloh5:
	adrp	x9, _NG_HCI_MANDATORY_PAGE_SCAN_MODE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NG_HCI_MANDATORY_PAGE_SCAN_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #16]
	sub	w8, w21, #1
	cmp	w8, #3
	b.hi	LBB0_18
; %bb.1:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	x0, [x20, #24]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_18
; %bb.3:
	ldrh	w0, [sp, #36]
	str	w0, [sp, #24]
	bl	_htole16
	str	w0, [sp, #24]
LBB0_4:
	ldr	x0, [x20, #16]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_18
; %bb.5:
	ldr	w8, [sp, #36]
	tbnz	w8, #31, LBB0_18
; %bb.6:
	cmp	w8, #4
	b.ge	LBB0_18
; %bb.7:
	str	w8, [sp, #20]
LBB0_8:
	ldr	x0, [x20, #8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_18
; %bb.9:
	ldr	w8, [sp, #36]
	tbnz	w8, #31, LBB0_18
; %bb.10:
	cmp	w8, #3
	b.ge	LBB0_18
; %bb.11:
	str	w8, [sp, #16]
LBB0_12:
	ldr	x0, [x20]
	add	x8, sp, #16
	add	x21, x8, #12
	mov	x1, x21
	bl	_bt_aton
	cbnz	w0, LBB0_15
; %bb.13:
	ldr	x0, [x20]
	bl	_bt_gethostbyname
	cbz	x0, LBB0_18
; %bb.14:
	ldr	w1, [x0]
	mov	x0, x21
	mov	w2, #4
	bl	_memcpy
LBB0_15:
	mov	w8, #512
	str	w8, [sp, #36]
Lloh17:
	adrp	x8, _NG_HCI_OGF_LINK_CONTROL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NG_HCI_OGF_LINK_CONTROL@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _NG_HCI_OCF_REMOTE_NAME_REQ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NG_HCI_OCF_REMOTE_NAME_REQ@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_NG_HCI_OPCODE
	mov	x1, x0
	add	x2, sp, #16
	add	x4, sp, #40
	add	x5, sp, #36
	mov	x0, x19
	mov	w3, #16
	bl	_hci_request
Lloh23:
	adrp	x20, _ERROR@GOTPAGE
Lloh24:
	ldr	x20, [x20, _ERROR@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_20
; %bb.16:
	ldrb	w8, [sp, #40]
	cbz	w8, LBB0_22
; %bb.17:
Lloh25:
	adrp	x8, _FAILED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh27:
	adrp	x8, _USAGE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _USAGE@GOTPAGEOFF]
LBB0_19:
	ldr	w0, [x8]
LBB0_20:
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.21:
                                        ; kill: def $w0 killed $w0 killed $x0
	add	sp, sp, #560
	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	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	w21, #512
Lloh32:
	adrp	x22, _NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL@GOTPAGE
Lloh33:
	ldr	x22, [x22, _NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL@GOTPAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	str	w21, [sp, #36]
	add	x1, sp, #40
	add	x2, sp, #36
	mov	x0, x19
	bl	_hci_recv
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_28
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	w9, [sp, #36]
	cmp	w9, #7
	b.ls	LBB0_29
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	ldr	x8, [sp, #40]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.26:
	ldr	w19, [sp, #48]
Lloh34:
	adrp	x21, _stdout@GOTPAGE
Lloh35:
	ldr	x21, [x21, _stdout@GOTPAGEOFF]
	ldr	w20, [x21]
	cbz	w19, LBB0_30
; %bb.27:
	mov	x0, x19
	bl	_hci_status2str
	mov	x2, x0
	ldr	w8, [sp, #48]
	str	x8, [sp]
Lloh36:
	adrp	x1, l_.str.2@PAGE
Lloh37:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
Lloh38:
	adrp	x8, _FAILED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	b	LBB0_31
LBB0_28:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_20
LBB0_29:
Lloh41:
	adrp	x9, _EIO@GOTPAGE
Lloh42:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
Lloh44:
	adrp	x10, _errno@GOTPAGE
Lloh45:
	ldr	x10, [x10, _errno@GOTPAGEOFF]
Lloh46:
	str	w9, [x10]
	mov	x0, x8
	b	LBB0_20
LBB0_30:
	add	x8, sp, #40
	add	x0, x8, #24
	bl	_hci_bdaddr2str
	mov	x2, x0
Lloh47:
	adrp	x1, l_.str.3@PAGE
Lloh48:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w0, [x21]
	ldr	x2, [sp, #56]
Lloh49:
	adrp	x1, l_.str.4@PAGE
Lloh50:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
                                        ; implicit-def: $w8
LBB0_31:
Lloh51:
	adrp	x9, _OK@GOTPAGE
Lloh52:
	ldr	x9, [x9, _OK@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w0, w9, w8, eq
	b	LBB0_20
LBB0_32:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_NG_HCI_SCAN_REP_MODE0,4,2      ; @NG_HCI_SCAN_REP_MODE0
	.comm	_NG_HCI_MANDATORY_PAGE_SCAN_MODE,4,2 ; @NG_HCI_MANDATORY_PAGE_SCAN_MODE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x"

	.comm	_USAGE,4,2                      ; @USAGE
l_.str.1:                               ; @.str.1
	.asciz	"%d"

	.comm	_NG_HCI_OGF_LINK_CONTROL,4,2    ; @NG_HCI_OGF_LINK_CONTROL
	.comm	_NG_HCI_OCF_REMOTE_NAME_REQ,4,2 ; @NG_HCI_OCF_REMOTE_NAME_REQ
	.comm	_ERROR,8,3                      ; @ERROR
	.comm	_FAILED,4,2                     ; @FAILED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_errno,4,2                      ; @errno
	.comm	_NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL,8,3 ; @NG_HCI_EVENT_REMOTE_NAME_REQ_COMPL
	.comm	_stdout,4,2                     ; @stdout
l_.str.2:                               ; @.str.2
	.asciz	"Status: %s [%#02x]\n"

l_.str.3:                               ; @.str.3
	.asciz	"BD_ADDR: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Name: %s\n"

	.comm	_OK,4,2                         ; @OK
	.no_dead_strip	_hci_remote_name_request
.subsections_via_symbols
