	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function virtio_crypto_alg_ablkcipher_init_session
_virtio_crypto_alg_ablkcipher_init_session: ## @virtio_crypto_alg_ablkcipher_init_session
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movl	%ecx, %r13d
	movq	%rdx, %rax
	movl	%esi, -88(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -48(%rbp)
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	16(%rdi), %rbx
	movq	_VIRTIO_CRYPTO_OP_ENCRYPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	_VIRTIO_CRYPTO_OP_DECRYPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	%r13d, %esi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	%r14d, -84(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	cmovel	%r15d, %r12d
	movq	%rbx, %rdi
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	callq	_spin_lock
	movq	_VIRTIO_CRYPTO_CIPHER_CREATE_SESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	leaq	88(%rbx), %r15
	movq	%rax, 152(%rbx)
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le32
	movq	%rax, 136(%rbx)
	movq	$0, 144(%rbx)
	movq	_VIRTIO_CRYPTO_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	leaq	8(%rbx), %r14
	movq	%rax, 16(%rbx)
	movq	_VIRTIO_CRYPTO_SYM_OP_CIPHER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le32
	movq	%rax, 128(%rbx)
	movq	136(%rbx), %rax
	movq	%rax, 120(%rbx)
	movl	%r13d, %edi
	callq	_cpu_to_le32
	movq	%rax, 112(%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_le32
	movq	%rax, 104(%rbx)
	leaq	-136(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$72, %edx
	callq	_sg_init_one
	movq	%r12, -80(%rbp)
	leaq	-128(%rbp), %r15
	movq	%r15, %rdi
	movq	-112(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_sg_init_one
	movq	%r15, -72(%rbp)
	leaq	-120(%rbp), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	$72, %edx
	callq	_sg_init_one
	movq	%r15, -64(%rbp)
	movl	80(%rbx), %edi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	movl	$1, %ecx
	movq	%rbx, %r8
	callq	_virtqueue_add_sgs
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	80(%rbx), %edi
	callq	_virtqueue_kick
	movl	80(%rbx), %edi
	leaq	-92(%rbp), %rsi
	callq	_virtqueue_get_buf
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	leaq	-92(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	80(%rbx), %edi
	callq	_virtqueue_is_broken
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movl	80(%rbx), %edi
	movq	%r14, %rsi
	callq	_virtqueue_get_buf
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movq	16(%rbx), %rdi
	callq	_le32_to_cpu
	movq	_VIRTIO_CRYPTO_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-84(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_10
## %bb.11:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	setne	%r14b
	movl	8(%rbx), %edi
	callq	_le64_to_cpu
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx,%r14,8)
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r12, %rdi
	callq	_kzfree
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r12, %rdi
	callq	_kzfree
	jmp	LBB0_12
LBB0_10:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	16(%rbx), %rdi
	callq	_le32_to_cpu
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_pr_err
	movq	%r12, %rdi
	callq	_kzfree
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r14d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_VIRTIO_CRYPTO_OP_ENCRYPT,4,2   ## @VIRTIO_CRYPTO_OP_ENCRYPT
	.comm	_VIRTIO_CRYPTO_OP_DECRYPT,4,2   ## @VIRTIO_CRYPTO_OP_DECRYPT
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_VIRTIO_CRYPTO_CIPHER_CREATE_SESSION,4,2 ## @VIRTIO_CRYPTO_CIPHER_CREATE_SESSION
	.comm	_VIRTIO_CRYPTO_ERR,4,2          ## @VIRTIO_CRYPTO_ERR
	.comm	_VIRTIO_CRYPTO_SYM_OP_CIPHER,4,2 ## @VIRTIO_CRYPTO_SYM_OP_CIPHER
	.comm	_VIRTIO_CRYPTO_OK,8,3           ## @VIRTIO_CRYPTO_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"virtio_crypto: Create session failed status: %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_virtio_crypto_alg_ablkcipher_init_session
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function virtio_crypto_alg_ablkcipher_init_session
_virtio_crypto_alg_ablkcipher_init_session: ; @virtio_crypto_alg_ablkcipher_init_session
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x4
	mov	x23, x3
	mov	x8, x2
	mov	x24, x1
	mov	x21, x0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	str	x9, [sp, #56]
	ldr	x20, [x0, #16]
Lloh3:
	adrp	x9, _VIRTIO_CRYPTO_OP_ENCRYPT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VIRTIO_CRYPTO_OP_ENCRYPT@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x9]
Lloh6:
	adrp	x9, _VIRTIO_CRYPTO_OP_DECRYPT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VIRTIO_CRYPTO_OP_DECRYPT@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x9]
Lloh9:
	adrp	x27, _GFP_ATOMIC@GOTPAGE
Lloh10:
	ldr	x27, [x27, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x8
	mov	x1, x3
	bl	_kmemdup
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	cmp	w22, #0
	csel	w25, w26, w25, eq
	mov	x0, x20
	bl	_spin_lock
Lloh11:
	adrp	x8, _VIRTIO_CRYPTO_CIPHER_CREATE_SESSION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VIRTIO_CRYPTO_CIPHER_CREATE_SESSION@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	add	x26, x20, #88
	str	x0, [x20, #152]
	mov	x0, x24
	bl	_cpu_to_le32
	stp	x0, xzr, [x20, #136]
Lloh14:
	adrp	x8, _VIRTIO_CRYPTO_ERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VIRTIO_CRYPTO_ERR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	add	x24, x20, #8
	str	x0, [x20, #16]
Lloh17:
	adrp	x8, _VIRTIO_CRYPTO_SYM_OP_CIPHER@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VIRTIO_CRYPTO_SYM_OP_CIPHER@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	ldr	x8, [x20, #136]
	stp	x8, x0, [x20, #120]
	mov	x0, x23
	bl	_cpu_to_le32
	str	x0, [x20, #112]
	mov	x0, x25
	bl	_cpu_to_le32
	str	x0, [x20, #104]
	add	x25, sp, #24
	add	x0, sp, #24
	mov	x1, x26
	mov	w2, #72
	bl	_sg_init_one
	str	x25, [sp, #32]
	add	x25, sp, #16
	add	x0, sp, #16
	mov	x1, x19
	mov	x2, x23
	bl	_sg_init_one
	str	x25, [sp, #40]
	add	x23, sp, #8
	add	x0, sp, #8
	mov	x1, x24
	mov	w2, #72
	bl	_sg_init_one
	str	x23, [sp, #48]
	ldr	w0, [x20, #80]
	ldr	w5, [x27]
	add	x1, sp, #32
	mov	w2, #2
	mov	w3, #1
	mov	x4, x20
	bl	_virtqueue_add_sgs
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	w0, [x20, #80]
	bl	_virtqueue_kick
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #80]
	add	x1, sp, #4
	bl	_virtqueue_get_buf
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x20, #80]
	bl	_virtqueue_is_broken
	cbnz	w0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_cpu_relax
	b	LBB0_3
LBB0_6:
	ldr	x0, [x20, #16]
	bl	_le32_to_cpu
Lloh20:
	adrp	x8, _VIRTIO_CRYPTO_OK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VIRTIO_CRYPTO_OK@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.7:
	cmp	w22, #0
	cset	w22, ne
	ldr	w0, [x20, #8]
	bl	_le64_to_cpu
	str	x0, [x21, w22, uxtw #3]
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_kzfree
	mov	w23, #0
	b	LBB0_12
LBB0_8:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
	mov	x23, x0
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_kzfree
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	bl	_spin_unlock
	ldr	x0, [x20, #16]
	bl	_le32_to_cpu
	mov	x1, x0
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	mov	x0, x19
	bl	_kzfree
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_12:
	ldr	x8, [sp, #56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_VIRTIO_CRYPTO_OP_ENCRYPT,4,2   ; @VIRTIO_CRYPTO_OP_ENCRYPT
	.comm	_VIRTIO_CRYPTO_OP_DECRYPT,4,2   ; @VIRTIO_CRYPTO_OP_DECRYPT
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_VIRTIO_CRYPTO_CIPHER_CREATE_SESSION,4,2 ; @VIRTIO_CRYPTO_CIPHER_CREATE_SESSION
	.comm	_VIRTIO_CRYPTO_ERR,4,2          ; @VIRTIO_CRYPTO_ERR
	.comm	_VIRTIO_CRYPTO_SYM_OP_CIPHER,4,2 ; @VIRTIO_CRYPTO_SYM_OP_CIPHER
	.comm	_VIRTIO_CRYPTO_OK,8,3           ; @VIRTIO_CRYPTO_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"virtio_crypto: Create session failed status: %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_virtio_crypto_alg_ablkcipher_init_session
.subsections_via_symbols
