	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypto_terminate
_crypto_terminate:                      ## @crypto_terminate
	.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, %r14
	movq	%rdi, %rbx
	movq	_MA_OWNED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_crypto_drivers_mtx@GOTPCREL(%rip), %rdi
	callq	_mtx_assert
	movq	(%rbx), %r15
	movq	$0, (%rbx)
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_wakeup_one
	movq	%r15, %rdi
	callq	_PROC_LOCK
	xorl	%eax, %eax
	callq	_CRYPTO_DRIVER_UNLOCK
	movq	_PWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_msleep
	movq	%r15, %rdi
	callq	_PROC_UNLOCK
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CRYPTO_DRIVER_LOCK             ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_crypto_drivers_mtx,4,2         ## @crypto_drivers_mtx
	.comm	_MA_OWNED,4,2                   ## @MA_OWNED
	.comm	_PWAIT,4,2                      ## @PWAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crypto_destroy"

	.no_dead_strip	_crypto_terminate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypto_terminate
_crypto_terminate:                      ; @crypto_terminate
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _MA_OWNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MA_OWNED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _crypto_drivers_mtx@GOTPAGE
Lloh4:
	ldr	x0, [x0, _crypto_drivers_mtx@GOTPAGEOFF]
	bl	_mtx_assert
	ldr	x19, [x21]
	str	xzr, [x21]
	cbz	x19, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_wakeup_one
	mov	x0, x19
	bl	_PROC_LOCK
	bl	_CRYPTO_DRIVER_UNLOCK
Lloh5:
	adrp	x8, _PWAIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PWAIT@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x19
	mov	w4, #0
	bl	_msleep
	mov	x0, x19
	bl	_PROC_UNLOCK
	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	_CRYPTO_DRIVER_LOCK
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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_crypto_drivers_mtx,4,2         ; @crypto_drivers_mtx
	.comm	_MA_OWNED,4,2                   ; @MA_OWNED
	.comm	_PWAIT,4,2                      ; @PWAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crypto_destroy"

	.no_dead_strip	_crypto_terminate
.subsections_via_symbols
