	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function swapgeom_close
_swapgeom_close:                        ## @swapgeom_close
	.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	%rsi, %rbx
	movq	_sw_dev_mtx@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mtx_lock
	movq	(%rbx), %r14
	movq	$0, (%rbx)
	movq	%r15, %rdi
	callq	_mtx_unlock
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	_swapgeom_close_ev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_g_waitfor_event                ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sw_dev_mtx,4,2                 ## @sw_dev_mtx
	.comm	_swapgeom_close_ev,4,2          ## @swapgeom_close_ev
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.no_dead_strip	_swapgeom_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function swapgeom_close
_swapgeom_close:                        ; @swapgeom_close
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
Lloh0:
	adrp	x21, _sw_dev_mtx@GOTPAGE
Lloh1:
	ldr	x21, [x21, _sw_dev_mtx@GOTPAGEOFF]
	mov	x0, x21
	bl	_mtx_lock
	ldr	x19, [x20]
	str	xzr, [x20]
	mov	x0, x21
	bl	_mtx_unlock
	cbz	x19, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _swapgeom_close_ev@GOTPAGE
Lloh3:
	ldr	x8, [x8, _swapgeom_close_ev@GOTPAGEOFF]
Lloh4:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh5:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	ldr	w2, [x9]
	mov	x1, x19
	mov	x3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_g_waitfor_event
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_sw_dev_mtx,4,2                 ; @sw_dev_mtx
	.comm	_swapgeom_close_ev,4,2          ; @swapgeom_close_ev
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.no_dead_strip	_swapgeom_close
.subsections_via_symbols
