	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_freesession             ## -- Begin function crypto_freesession
	.p2align	4, 0x90
_crypto_freesession:                    ## @crypto_freesession
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_CRYPTO_DRIVER_LOCK
	movq	%r12, %rdi
	callq	_crypto_ses2hid
	movq	%rax, %rbx
	movq	_crypto_drivers_num@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	(%rax), %rbx
	setb	%dil
	movq	%rbx, %rsi
	callq	_KASSERT
	movq	_crypto_drivers@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	(%rbx,%rbx,2), %rbx
	movq	(%r12), %r14
	movq	(%r13,%rbx,8), %r15
	movq	16(%r13,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	16(,%rbx,8), %rcx
	addq	%r13, %rcx
	decq	%rax
	movq	%rax, (%rcx)
LBB0_3:
	movl	12(%r13,%rbx,8), %edi
	movq	%r12, %rsi
	callq	_CRYPTODEV_FREESESSION
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_explicit_bzero
	movq	_M_CRYPTO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_free
	movq	_cryptoses_zone@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_uma_zfree
	movq	_CRYPTOCAP_F_CLEANUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r13,%rbx,8)
	je	LBB0_5
## %bb.4:
	leaq	(,%rbx,8), %rdi
	addq	%r13, %rdi
	callq	_crypto_remove
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CRYPTO_DRIVER_UNLOCK           ## TAILCALL
LBB0_6:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_crypto_drivers_num,8,3         ## @crypto_drivers_num
	.comm	_crypto_drivers,8,3             ## @crypto_drivers
	.comm	_M_CRYPTO_DATA,4,2              ## @M_CRYPTO_DATA
	.comm	_cryptoses_zone,4,2             ## @cryptoses_zone
	.comm	_CRYPTOCAP_F_CLEANUP,4,2        ## @CRYPTOCAP_F_CLEANUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_freesession             ; -- Begin function crypto_freesession
	.p2align	2
_crypto_freesession:                    ; @crypto_freesession
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_6
; %bb.1:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_CRYPTO_DRIVER_LOCK
	mov	x0, x19
	bl	_crypto_ses2hid
	mov	x22, x0
Lloh0:
	adrp	x8, _crypto_drivers_num@GOTPAGE
Lloh1:
	ldr	x8, [x8, _crypto_drivers_num@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, lo
	mov	x1, x22
	bl	_KASSERT
Lloh3:
	adrp	x8, _crypto_drivers@GOTPAGE
Lloh4:
	ldr	x8, [x8, _crypto_drivers@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, #24
	madd	x20, x22, x9, x8
	ldr	x21, [x19]
	ldr	x23, [x20]
	mov	x9, x20
	ldr	x10, [x9, #16]!
	cbz	x10, LBB0_3
; %bb.2:
	sub	x10, x10, #1
	str	x10, [x9]
LBB0_3:
	mov	w9, #24
	madd	x22, x22, x9, x8
	ldr	w0, [x22, #12]
	mov	x1, x19
	bl	_CRYPTODEV_FREESESSION
	mov	x0, x21
	mov	x1, x23
	bl	_explicit_bzero
Lloh6:
	adrp	x8, _M_CRYPTO_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_CRYPTO_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_free
Lloh9:
	adrp	x8, _cryptoses_zone@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cryptoses_zone@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_uma_zfree
	ldr	w8, [x22, #8]
Lloh12:
	adrp	x9, _CRYPTOCAP_F_CLEANUP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CRYPTOCAP_F_CLEANUP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_crypto_remove
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_CRYPTO_DRIVER_UNLOCK
LBB0_6:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_crypto_drivers_num,8,3         ; @crypto_drivers_num
	.comm	_crypto_drivers,8,3             ; @crypto_drivers
	.comm	_M_CRYPTO_DATA,4,2              ; @M_CRYPTO_DATA
	.comm	_cryptoses_zone,4,2             ; @cryptoses_zone
	.comm	_CRYPTOCAP_F_CLEANUP,4,2        ; @CRYPTOCAP_F_CLEANUP
.subsections_via_symbols
