	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vscsi_detach
_vscsi_detach:                          ## @vscsi_detach
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_device_get_softc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	cmpq	$0, 16(%rax)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_mtx_lock
	movq	16(%rbx), %rdi
	callq	_cam_sim_path
	movl	%eax, %edi
	callq	_xpt_bus_deregister
	movq	16(%rbx), %rdi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_cam_sim_free
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	callq	_mtx_unlock
LBB0_4:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_cam_simq_free
	movq	$0, 8(%rbx)
LBB0_6:
	movq	%rbx, %rdi
	callq	_mtx_destroy
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_vscsi_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vscsi_detach
_vscsi_detach:                          ; @vscsi_detach
	.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
	bl	_device_get_softc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_mtx_lock
	ldr	x0, [x19, #16]
	bl	_cam_sim_path
	bl	_xpt_bus_deregister
	ldr	x0, [x19, #16]
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_cam_sim_free
	str	xzr, [x19, #16]
	mov	x0, x19
	bl	_mtx_unlock
LBB0_3:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_cam_simq_free
	str	xzr, [x19, #8]
LBB0_5:
	mov	x0, x19
	bl	_mtx_destroy
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_vscsi_detach
.subsections_via_symbols
