	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_kdone                   ## -- Begin function crypto_kdone
	.p2align	4, 0x90
_crypto_kdone:                          ## @crypto_kdone
	.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, %r14
	cmpq	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	_cryptostats@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_2:
	xorl	%eax, %eax
	callq	_CRYPTO_DRIVER_LOCK
	movq	8(%r14), %rbx
	movq	_crypto_drivers_num@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jae	LBB0_5
## %bb.3:
	movq	_crypto_drivers@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	shlq	$4, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%r15,%rbx)
	setg	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	decq	(%r15,%rbx)
	movq	_CRYPTOCAP_F_CLEANUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15,%rbx)
	je	LBB0_5
## %bb.4:
	addq	%rbx, %r15
	movq	%r15, %rdi
	callq	_crypto_remove
LBB0_5:
	xorl	%eax, %eax
	callq	_CRYPTO_DRIVER_UNLOCK
	xorl	%edi, %edi
	callq	_CRYPTO_RETW
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_CRYPTO_RETW_LOCK
	movq	%rbx, %rdi
	callq	_CRYPTO_RETW_EMPTY
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_wakeup_one
LBB0_7:
	movq	_krp_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CRYPTO_RETW_UNLOCK             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cryptostats,4,2                ## @cryptostats
	.comm	_crypto_drivers_num,8,3         ## @crypto_drivers_num
	.comm	_crypto_drivers,8,3             ## @crypto_drivers
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cc_koperations == 0"

	.comm	_CRYPTOCAP_F_CLEANUP,4,2        ## @CRYPTOCAP_F_CLEANUP
	.comm	_krp_next,4,2                   ## @krp_next
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_kdone                   ; -- Begin function crypto_kdone
	.p2align	2
_crypto_kdone:                          ; @crypto_kdone
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _cryptostats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cryptostats@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_2:
	bl	_CRYPTO_DRIVER_LOCK
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _crypto_drivers_num@GOTPAGE
Lloh3:
	ldr	x9, [x9, _crypto_drivers_num@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_5
; %bb.3:
Lloh5:
	adrp	x9, _crypto_drivers@GOTPAGE
Lloh6:
	ldr	x9, [x9, _crypto_drivers@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x20, x9, x8, lsl #4
	ldr	x8, [x20]
	cmp	x8, #0
	cset	w0, gt
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	ldr	x8, [x20]
	sub	x8, x8, #1
	str	x8, [x20]
	ldr	w8, [x20, #8]
Lloh10:
	adrp	x9, _CRYPTOCAP_F_CLEANUP@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CRYPTOCAP_F_CLEANUP@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_crypto_remove
LBB0_5:
	bl	_CRYPTO_DRIVER_UNLOCK
	mov	w0, #0
	bl	_CRYPTO_RETW
	mov	x20, x0
	bl	_CRYPTO_RETW_LOCK
	mov	x0, x20
	bl	_CRYPTO_RETW_EMPTY
	cbz	x0, LBB0_7
; %bb.6:
	add	x0, x20, #4
	bl	_wakeup_one
LBB0_7:
Lloh13:
	adrp	x8, _krp_next@GOTPAGE
Lloh14:
	ldr	x8, [x8, _krp_next@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_TAILQ_INSERT_TAIL
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CRYPTO_RETW_UNLOCK
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_cryptostats,4,2                ; @cryptostats
	.comm	_crypto_drivers_num,8,3         ; @crypto_drivers_num
	.comm	_crypto_drivers,8,3             ; @crypto_drivers
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cc_koperations == 0"

	.comm	_CRYPTOCAP_F_CLEANUP,4,2        ; @CRYPTOCAP_F_CLEANUP
	.comm	_krp_next,4,2                   ; @krp_next
.subsections_via_symbols
