	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hci_disconnect
_hci_disconnect:                        ## @hci_disconnect
	.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	$536, %rsp                      ## imm = 0x218
	.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	-576(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	$19, -576(%rbp)
	cmpl	$1, %ebx
	je	LBB0_7
## %bb.1:
	cmpl	$2, %ebx
	jne	LBB0_5
## %bb.2:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.3:
	movl	-564(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	cmpl	$256, %eax                      ## imm = 0x100
	jge	LBB0_5
## %bb.6:
	movl	%eax, -576(%rbp)
LBB0_7:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-564(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.8:
	movl	-564(%rbp), %edi
	testl	%edi, %edi
	jle	LBB0_5
## %bb.9:
	cmpl	$3840, %edi                     ## imm = 0xF00
	jge	LBB0_5
## %bb.10:
	movl	%edi, -572(%rbp)
	callq	_htole16
	movl	%eax, -572(%rbp)
	movl	$512, -564(%rbp)                ## imm = 0x200
	movq	_NG_HCI_OGF_LINK_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NG_HCI_OCF_DISCON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_NG_HCI_OPCODE
	leaq	-576(%rbp), %rdx
	leaq	-560(%rbp), %r8
	leaq	-564(%rbp), %r9
	movl	%r14d, %edi
	movl	%eax, %esi
	movl	$8, %ecx
	callq	_hci_request
	movq	_ERROR@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_23
## %bb.11:
	cmpb	$0, -560(%rbp)
	je	LBB0_12
## %bb.25:
	movq	_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_5:
	movq	_USAGE@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_26
## %bb.24:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	-560(%rbp), %r15
	leaq	-564(%rbp), %r12
	movq	_NG_HCI_EVENT_DISCON_COMPL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_13:                                ## =>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_23
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	$7, -564(%rbp)
	jbe	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-560(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_13
## %bb.17:
	movl	-552(%rbp), %ebx
	movq	_stdout@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	testl	%ebx, %ebx
	je	LBB0_19
## %bb.18:
	movl	%ebx, %edi
	callq	_hci_status2str
	movl	-552(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_20
LBB0_15:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	movl	%ecx, %eax
	jmp	LBB0_23
LBB0_19:
	movl	-544(%rbp), %edi
	callq	_le16toh
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r15), %r14d
	movl	-548(%rbp), %edi
	callq	_hci_status2str
	movl	-548(%rbp), %ecx
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
                                        ## implicit-def: $eax
LBB0_20:
	testl	%ebx, %ebx
	jne	LBB0_23
## %bb.21:
	movq	_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_USAGE,4,2                      ## @USAGE
	.comm	_NG_HCI_OGF_LINK_CONTROL,4,2    ## @NG_HCI_OGF_LINK_CONTROL
	.comm	_NG_HCI_OCF_DISCON,4,2          ## @NG_HCI_OCF_DISCON
	.comm	_ERROR,8,3                      ## @ERROR
	.comm	_FAILED,4,2                     ## @FAILED
	.comm	_EIO,4,2                        ## @EIO
	.comm	_errno,4,2                      ## @errno
	.comm	_NG_HCI_EVENT_DISCON_COMPL,8,3  ## @NG_HCI_EVENT_DISCON_COMPL
	.comm	_stdout,4,2                     ## @stdout
L_.str.1:                               ## @.str.1
	.asciz	"Status: %s [%#02x]\n"

L_.str.2:                               ## @.str.2
	.asciz	"Connection handle: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Reason: %s [%#02x]\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hci_disconnect
_hci_disconnect:                        ; @hci_disconnect
	.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, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	w8, #19
	str	w8, [sp, #24]
	cmp	w21, #1
	b.eq	LBB0_5
; %bb.1:
	cmp	w21, #2
	b.ne	LBB0_10
; %bb.2:
	ldr	x0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	ldr	w8, [sp, #36]
	cmp	w0, #1
	ccmp	w8, #1, #8, eq
	b.lt	LBB0_10
; %bb.3:
	cmp	w8, #256
	b.ge	LBB0_10
; %bb.4:
	str	w8, [sp, #24]
LBB0_5:
	ldr	x0, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #36
	bl	_sscanf
	mov	x8, x0
	ldr	w0, [sp, #36]
	cmp	w8, #1
	ccmp	w0, #1, #8, eq
	b.lt	LBB0_10
; %bb.6:
	cmp	w0, #3840
	b.ge	LBB0_10
; %bb.7:
	str	w0, [sp, #28]
	bl	_htole16
	str	w0, [sp, #28]
	mov	w8, #512
	str	w8, [sp, #36]
Lloh7:
	adrp	x8, _NG_HCI_OGF_LINK_CONTROL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NG_HCI_OGF_LINK_CONTROL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _NG_HCI_OCF_DISCON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NG_HCI_OCF_DISCON@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_NG_HCI_OPCODE
	mov	x1, x0
	add	x2, sp, #24
	add	x4, sp, #40
	add	x5, sp, #36
	mov	x0, x19
	mov	w3, #8
	bl	_hci_request
Lloh13:
	adrp	x20, _ERROR@GOTPAGE
Lloh14:
	ldr	x20, [x20, _ERROR@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_12
; %bb.8:
	ldrb	w8, [sp, #40]
	cbz	w8, LBB0_14
; %bb.9:
Lloh15:
	adrp	x8, _FAILED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh17:
	adrp	x8, _USAGE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _USAGE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.13:
                                        ; 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_14:
	mov	w21, #512
Lloh22:
	adrp	x22, _NG_HCI_EVENT_DISCON_COMPL@GOTPAGE
Lloh23:
	ldr	x22, [x22, _NG_HCI_EVENT_DISCON_COMPL@GOTPAGEOFF]
LBB0_15:                                ; =>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_20
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w9, [sp, #36]
	cmp	w9, #7
	b.ls	LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [sp, #40]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.18:
	ldr	w19, [sp, #48]
Lloh24:
	adrp	x21, _stdout@GOTPAGE
Lloh25:
	ldr	x21, [x21, _stdout@GOTPAGEOFF]
	ldr	w20, [x21]
	cbz	w19, LBB0_22
; %bb.19:
	mov	x0, x19
	bl	_hci_status2str
	ldr	w8, [sp, #48]
	stp	x0, x8, [sp]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_fprintf
Lloh28:
	adrp	x8, _FAILED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FAILED@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	b	LBB0_23
LBB0_20:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_12
LBB0_21:
Lloh31:
	adrp	x9, _EIO@GOTPAGE
Lloh32:
	ldr	x9, [x9, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
Lloh34:
	adrp	x10, _errno@GOTPAGE
Lloh35:
	ldr	x10, [x10, _errno@GOTPAGEOFF]
Lloh36:
	str	w9, [x10]
	mov	x0, x8
	b	LBB0_12
LBB0_22:
	ldr	w0, [sp, #56]
	bl	_le16toh
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	ldr	w20, [x21]
	ldr	w0, [sp, #52]
	bl	_hci_status2str
	ldr	w8, [sp, #52]
	stp	x0, x8, [sp]
Lloh39:
	adrp	x1, l_.str.3@PAGE
Lloh40:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_fprintf
                                        ; implicit-def: $w8
LBB0_23:
Lloh41:
	adrp	x9, _OK@GOTPAGE
Lloh42:
	ldr	x9, [x9, _OK@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w0, w9, w8, eq
	b	LBB0_12
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_USAGE,4,2                      ; @USAGE
	.comm	_NG_HCI_OGF_LINK_CONTROL,4,2    ; @NG_HCI_OGF_LINK_CONTROL
	.comm	_NG_HCI_OCF_DISCON,4,2          ; @NG_HCI_OCF_DISCON
	.comm	_ERROR,8,3                      ; @ERROR
	.comm	_FAILED,4,2                     ; @FAILED
	.comm	_EIO,4,2                        ; @EIO
	.comm	_errno,4,2                      ; @errno
	.comm	_NG_HCI_EVENT_DISCON_COMPL,8,3  ; @NG_HCI_EVENT_DISCON_COMPL
	.comm	_stdout,4,2                     ; @stdout
l_.str.1:                               ; @.str.1
	.asciz	"Status: %s [%#02x]\n"

l_.str.2:                               ; @.str.2
	.asciz	"Connection handle: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Reason: %s [%#02x]\n"

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