	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_cryp_prepare_req
_stm32_cryp_prepare_req:                ## @stm32_cryp_prepare_req
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	testq	%rdi, %rdi
	jne	LBB0_4
## %bb.1:
	testq	%r14, %r14
	jne	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_4:
	testq	%r15, %r15
	je	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_crypto_ablkcipher_reqtfm
	movl	%eax, %edi
	callq	_crypto_ablkcipher_ctx
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.6:
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_ablkcipher_request_ctx
	jmp	LBB0_10
LBB0_7:
	movq	%r14, %rdi
	callq	_crypto_aead_reqtfm
	movl	%eax, %edi
	callq	_crypto_aead_ctx
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_aead_request_ctx
LBB0_10:
	movq	_FLG_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rax), %edx
	andl	(%rcx), %edx
	movl	%edx, (%rax)
	movq	%rbx, (%r12)
	movl	(%rcx), %eax
	notl	%eax
	andl	(%rbx), %eax
	orl	%edx, %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_is_aes
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:
	movq	_DES_BLOCK_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_AES_BLOCK_SIZE@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movl	%eax, 112(%rbx)
	movq	%r12, 104(%rbx)
	testq	%r15, %r15
	je	LBB0_15
## %bb.14:
	movq	%r15, 96(%rbx)
	movq	$0, 16(%rbx)
	movq	8(%r15), %rcx
	movq	%rcx, 56(%rbx)
	movq	%rcx, %rsi
	jmp	LBB0_18
LBB0_15:
	movq	%r14, 16(%rbx)
	movq	$0, 96(%rbx)
	movq	%r14, %rdi
	callq	_crypto_aead_reqtfm
	movl	%eax, %edi
	callq	_crypto_aead_authsize
	movq	%rax, 88(%rbx)
	movq	16(%r14), %rax
	addq	(%r14), %rax
	movq	%rax, 56(%rbx)
	movq	%rbx, %rdi
	callq	_is_encrypt
	movq	56(%rbx), %rsi
	movq	88(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	addq	%rsi, %rcx
	jmp	LBB0_18
LBB0_17:
	movq	%rsi, %rax
	subq	%rcx, %rax
	movq	%rax, %rcx
LBB0_18:
	leaq	4(%r15), %rax
	leaq	12(%r14), %rdx
	addq	$8, %r14
	testq	%r15, %r15
	movq	%rcx, 24(%rbx)
	movq	%rsi, 80(%rbx)
	cmovneq	%rax, %rdx
	movq	%rcx, 72(%rbx)
	movl	(%rdx), %edi
	cmovneq	%r15, %r14
	movl	%edi, 40(%rbx)
	movl	(%r14), %eax
	movl	%eax, 36(%rbx)
	movl	%eax, 64(%rbx)
	callq	_sg_nents_for_len
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movl	36(%rbx), %edi
	movq	24(%rbx), %rsi
	callq	_sg_nents_for_len
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	js	LBB0_21
## %bb.23:
	movq	%rbx, %rdi
	callq	_stm32_cryp_copy_sgs
	testl	%eax, %eax
	jne	LBB0_22
## %bb.24:
	leaq	44(%rbx), %rdi
	movl	40(%rbx), %esi
	callq	_scatterwalk_start
	leaq	32(%rbx), %r14
	movl	36(%rbx), %esi
	movq	%r14, %rdi
	callq	_scatterwalk_start
	movq	%rbx, %rdi
	callq	_is_gcm
	testq	%rax, %rax
	jne	LBB0_26
## %bb.25:
	movq	%rbx, %rdi
	callq	_is_ccm
	testq	%rax, %rax
	je	LBB0_27
LBB0_26:
	movq	16(%rbx), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_scatterwalk_advance
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	subq	%rax, 24(%rbx)
LBB0_27:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stm32_cryp_hw_init             ## TAILCALL
LBB0_19:
	movl	48(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	4(%rbx), %eax
	jmp	LBB0_22
LBB0_21:
	movl	48(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movl	8(%rbx), %eax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_FLG_MODE_MASK,4,2              ## @FLG_MODE_MASK
	.comm	_AES_BLOCK_SIZE,4,2             ## @AES_BLOCK_SIZE
	.comm	_DES_BLOCK_SIZE,4,2             ## @DES_BLOCK_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot get in_sg_len\n"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot get out_sg_len\n"

	.no_dead_strip	_stm32_cryp_prepare_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_cryp_prepare_req
_stm32_cryp_prepare_req:                ; @stm32_cryp_prepare_req
	.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	x21, x1
	mov	x20, x0
	cbnz	x0, LBB0_3
; %bb.1:
	cbnz	x21, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_3:
	cbz	x20, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_crypto_ablkcipher_reqtfm
	bl	_crypto_ablkcipher_ctx
	ldr	x19, [x0]
	cbz	x19, LBB0_10
; %bb.5:
	mov	x22, x0
	mov	x0, x20
	bl	_ablkcipher_request_ctx
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	bl	_crypto_aead_reqtfm
	bl	_crypto_aead_ctx
	ldr	x19, [x0]
	cbz	x19, LBB0_10
; %bb.7:
	mov	x22, x0
	mov	x0, x21
	bl	_aead_request_ctx
LBB0_8:
Lloh2:
	adrp	x8, _FLG_MODE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FLG_MODE_MASK@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x0]
	and	w9, w10, w9
	str	w9, [x0]
	str	x19, [x22]
	ldr	w10, [x19]
	ldr	w8, [x8]
	bic	w8, w10, w8
	orr	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_is_aes
Lloh4:
	adrp	x8, _AES_BLOCK_SIZE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AES_BLOCK_SIZE@GOTPAGEOFF]
Lloh6:
	adrp	x9, _DES_BLOCK_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DES_BLOCK_SIZE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #112]
	str	x22, [x19, #104]
	cbz	x20, LBB0_13
; %bb.9:
	str	x20, [x19, #96]
	str	xzr, [x19, #16]
	ldr	x8, [x20, #8]
	str	x8, [x19, #56]
	mov	x1, x8
	b	LBB0_14
LBB0_10:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
LBB0_13:
	str	x21, [x19, #16]
	str	xzr, [x19, #96]
	mov	x0, x21
	bl	_crypto_aead_reqtfm
	bl	_crypto_aead_authsize
	str	x0, [x19, #88]
	ldr	x8, [x21]
	ldr	x9, [x21, #16]
	add	x8, x9, x8
	str	x8, [x19, #56]
	mov	x0, x19
	bl	_is_encrypt
	ldr	x1, [x19, #56]
	ldr	x8, [x19, #88]
	sub	x9, x1, x8
	add	x8, x8, x1
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_14:
	str	x8, [x19, #24]
	stp	x8, x1, [x19, #72]
	add	x8, x20, #4
	add	x9, x21, #12
	cmp	x20, #0
	csel	x8, x8, x9, ne
	ldr	w0, [x8]
	str	w0, [x19, #40]
	add	x8, x21, #8
	csel	x8, x20, x8, ne
	ldr	w8, [x8]
	str	w8, [x19, #36]
	str	w8, [x19, #64]
	bl	_sg_nents_for_len
	str	w0, [x19, #4]
	tbnz	w0, #31, LBB0_21
; %bb.15:
	ldr	w0, [x19, #36]
	ldr	x1, [x19, #24]
	bl	_sg_nents_for_len
	str	w0, [x19, #8]
	tbnz	w0, #31, LBB0_22
; %bb.16:
	mov	x0, x19
	bl	_stm32_cryp_copy_sgs
	cbnz	w0, LBB0_12
; %bb.17:
	add	x0, x19, #44
	ldr	w1, [x19, #40]
	bl	_scatterwalk_start
	add	x20, x19, #32
	ldr	w1, [x19, #36]
	mov	x0, x20
	bl	_scatterwalk_start
	mov	x0, x19
	bl	_is_gcm
	cbnz	x0, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_is_ccm
	cbz	x0, LBB0_20
LBB0_19:
	ldr	x8, [x19, #16]
	ldr	x1, [x8]
	mov	x0, x20
	bl	_scatterwalk_advance
	ldp	x8, x9, [x19, #16]
	ldr	x8, [x8]
	sub	x8, x9, x8
	str	x8, [x19, #24]
LBB0_20:
	mov	x0, x19
	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	_stm32_cryp_hw_init
LBB0_21:
	ldr	w0, [x19, #48]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #4]
	b	LBB0_12
LBB0_22:
	ldr	w0, [x19, #48]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #8]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_FLG_MODE_MASK,4,2              ; @FLG_MODE_MASK
	.comm	_AES_BLOCK_SIZE,4,2             ; @AES_BLOCK_SIZE
	.comm	_DES_BLOCK_SIZE,4,2             ; @DES_BLOCK_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot get in_sg_len\n"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot get out_sg_len\n"

	.no_dead_strip	_stm32_cryp_prepare_req
.subsections_via_symbols
