	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_hci_disconnect
_ng_hci_disconnect:                     ## @ng_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_NG_HOOK_NODE
	movl	%eax, %edi
	callq	_NG_NODE_PRIVATE
	movslq	%eax, %rbx
	cmpq	%r15, 32(%rbx)
	je	LBB0_1
## %bb.2:
	cmpq	%r15, 24(%rbx)
	je	LBB0_3
## %bb.4:
	cmpq	%r15, 16(%rbx)
	je	LBB0_5
## %bb.6:
	cmpq	%r15, 8(%rbx)
	je	LBB0_7
## %bb.12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_1:
	movq	$0, 32(%rbx)
	jmp	LBB0_8
LBB0_3:
	movq	$0, 24(%rbx)
	jmp	LBB0_8
LBB0_5:
	movq	$0, 16(%rbx)
	jmp	LBB0_8
LBB0_7:
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	movl	$22, %esi
	callq	_ng_hci_unit_clean
	movq	_NG_HCI_UNIT_CONNECTED@GOTPCREL(%rip), %rax
	movq	_NG_HCI_UNIT_INITED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, (%rbx)
LBB0_8:
	movq	%r15, %rdi
	callq	_NG_HOOK_NODE
	movl	%eax, %edi
	callq	_NG_NODE_NUMHOOKS
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_11
## %bb.9:
	movq	%r15, %rdi
	callq	_NG_HOOK_NODE
	movl	%eax, %edi
	callq	_NG_NODE_IS_VALID
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_NG_HOOK_NODE
	movl	%eax, %edi
	callq	_ng_rmnode_self
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NG_HCI_UNIT_CONNECTED,4,2      ## @NG_HCI_UNIT_CONNECTED
	.comm	_NG_HCI_UNIT_INITED,4,2         ## @NG_HCI_UNIT_INITED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ng_hci_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_hci_disconnect
_ng_hci_disconnect:                     ; @ng_hci_disconnect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_NG_HOOK_NODE
	bl	_NG_NODE_PRIVATE
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x20, w0
	ldr	x8, [x20, #32]
	cmp	x8, x19
	b.eq	LBB0_5
; %bb.1:
	ldr	x8, [x20, #24]
	cmp	x8, x19
	b.eq	LBB0_6
; %bb.2:
	ldr	x8, [x20, #16]
	cmp	x8, x19
	b.eq	LBB0_7
; %bb.3:
	ldr	x8, [x20, #8]
	cmp	x8, x19
	b.eq	LBB0_8
; %bb.4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_5:
	str	xzr, [x20, #32]
	b	LBB0_9
LBB0_6:
	str	xzr, [x20, #24]
	b	LBB0_9
LBB0_7:
	str	xzr, [x20, #16]
	b	LBB0_9
LBB0_8:
	str	xzr, [x20, #8]
	mov	x0, x20
	mov	w1, #22
	bl	_ng_hci_unit_clean
Lloh3:
	adrp	x8, _NG_HCI_UNIT_CONNECTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NG_HCI_UNIT_CONNECTED@GOTPAGEOFF]
Lloh5:
	adrp	x9, _NG_HCI_UNIT_INITED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NG_HCI_UNIT_INITED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_9:
	mov	x0, x19
	bl	_NG_HOOK_NODE
	bl	_NG_NODE_NUMHOOKS
	cbnz	x0, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_NG_HOOK_NODE
	bl	_NG_NODE_IS_VALID
	cbz	x0, LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_NG_HOOK_NODE
	bl	_ng_rmnode_self
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NG_HCI_UNIT_CONNECTED,4,2      ; @NG_HCI_UNIT_CONNECTED
	.comm	_NG_HCI_UNIT_INITED,4,2         ; @NG_HCI_UNIT_INITED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ng_hci_disconnect
.subsections_via_symbols
