	.file	"extr_cryp.c_cryp_set_configuration.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cryp_set_configuration
	.type	cryp_set_configuration, @function
cryp_set_configuration:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L10
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	test	rsi, rsi
	je	.L1
	mov	eax, DWORD PTR [rsi]
	mov	ecx, DWORD PTR CRYP_CR_KEYSIZE_POS[rip]
	mov	rbp, rdi
	sal	eax, cl
	or	eax, DWORD PTR [rdx]
	mov	DWORD PTR [rdx], eax
	mov	esi, DWORD PTR 4[rsi]
	mov	edi, eax
	cmp	esi, DWORD PTR CRYP_ALGORITHM_DECRYPT[rip]
	mov	eax, DWORD PTR 8[rbx]
	je	.L5
.L6:
	mov	ecx, DWORD PTR CRYP_CR_ALGOMODE_POS[rip]
	sal	eax, cl
	mov	ecx, DWORD PTR CRYP_CR_ALGODIR_POS[rip]
	sal	esi, cl
	or	eax, esi
	or	eax, edi
	mov	DWORD PTR [rdx], eax
	xor	eax, eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	r8d, DWORD PTR CRYP_ALGO_AES_ECB[rip]
	cmp	eax, r8d
	je	.L7
	cmp	eax, DWORD PTR CRYP_ALGO_AES_CBC[rip]
	jne	.L6
.L7:
	mov	ecx, DWORD PTR CRYP_CR_ALGODIR_POS[rip]
	mov	eax, DWORD PTR CRYP_ALGORITHM_ENCRYPT[rip]
	mov	QWORD PTR 8[rsp], rdx
	mov	edx, DWORD PTR CRYP_CRYPEN_ENABLE[rip]
	mov	esi, DWORD PTR KSE_ENABLED[rip]
	sal	eax, cl
	mov	ecx, DWORD PTR CRYP_CR_ALGOMODE_POS[rip]
	sal	r8d, cl
	mov	ecx, DWORD PTR CRYP_CR_CRYPEN_POS[rip]
	or	eax, r8d
	sal	edx, cl
	mov	ecx, DWORD PTR CRYP_CR_KSE_POS[rip]
	or	eax, edx
	sal	esi, cl
	or	eax, esi
	mov	rsi, QWORD PTR 0[rbp]
	or	edi, eax
	call	writel_relaxed@PLT
	mov	rdi, rbp
	call	cryp_wait_until_done@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR [rdx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	cryp_set_configuration, .-cryp_set_configuration
	.comm	KSE_ENABLED,4,4
	.comm	EINVAL,4,4
	.comm	CRYP_CR_KSE_POS,4,4
	.comm	CRYP_CR_KEYSIZE_POS,4,4
	.comm	CRYP_CR_CRYPEN_POS,4,4
	.comm	CRYP_CR_ALGOMODE_POS,4,4
	.comm	CRYP_CR_ALGODIR_POS,4,4
	.comm	CRYP_CRYPEN_ENABLE,4,4
	.comm	CRYP_ALGO_AES_ECB,4,4
	.comm	CRYP_ALGO_AES_CBC,4,4
	.comm	CRYP_ALGORITHM_ENCRYPT,4,4
	.comm	CRYP_ALGORITHM_DECRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cryp.c_cryp_set_configuration.c"
	.text
	.align	2
	.global	cryp_set_configuration
	.syntax unified
	.arm
	.fpu softvfp
	.type	cryp_set_configuration, %function
cryp_set_configuration:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r1, #0
	cmpne	r0, #0
	beq	.L12
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	mov	r4, r1
	ldr	r3, .L13
	mov	r6, r0
	ldr	r0, [r1]
	ldr	r1, [r3]
	ldr	r3, [r2]
	ldr	r2, .L13+4
	orr	r1, r3, r0, lsl r1
	str	r1, [r5]
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L4
	ldr	r2, [r4, #8]
	ldr	r8, .L13+8
	ldr	r7, .L13+12
.L5:
	ldr	lr, [r8]
	ldr	ip, [r7]
	lsl	r3, r3, lr
	orr	r3, r3, r2, lsl ip
	orr	r3, r3, r1
	mov	r0, #0
	str	r3, [r5]
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	ldr	r0, .L13+16
	ldr	r2, [r4, #8]
	ldr	r0, [r0]
	cmp	r2, r0
	beq	.L6
	ldr	ip, .L13+20
	ldr	ip, [ip]
	cmp	r2, ip
	beq	.L6
	ldr	r8, .L13+8
	ldr	r7, .L13+12
	b	.L5
.L12:
	ldr	r3, .L13+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L6:
	ldr	r7, .L13+12
	ldr	r2, .L13+28
	ldr	r3, [r7]
	ldr	r8, .L13+8
	ldr	r2, [r2]
	lsl	r0, r0, r3
	ldr	r3, [r8]
	ldr	lr, .L13+32
	ldr	ip, .L13+36
	orr	r0, r0, r2, lsl r3
	ldr	r2, .L13+40
	ldr	r3, .L13+44
	ldr	lr, [lr]
	ldr	ip, [ip]
	ldr	r2, [r2]
	ldr	r3, [r3]
	orr	r0, r0, lr, lsl ip
	orr	r0, r0, r2, lsl r3
	orr	r0, r0, r1
	ldr	r1, [r6]
	bl	writel_relaxed
	mov	r0, r6
	bl	cryp_wait_until_done
	ldr	r1, [r5]
	ldr	r2, [r4, #8]
	ldr	r3, [r4, #4]
	b	.L5
.L14:
	.align	2
.L13:
	.word	CRYP_CR_KEYSIZE_POS
	.word	CRYP_ALGORITHM_DECRYPT
	.word	CRYP_CR_ALGODIR_POS
	.word	CRYP_CR_ALGOMODE_POS
	.word	CRYP_ALGO_AES_ECB
	.word	CRYP_ALGO_AES_CBC
	.word	EINVAL
	.word	CRYP_ALGORITHM_ENCRYPT
	.word	CRYP_CRYPEN_ENABLE
	.word	CRYP_CR_CRYPEN_POS
	.word	KSE_ENABLED
	.word	CRYP_CR_KSE_POS
	.size	cryp_set_configuration, .-cryp_set_configuration
	.comm	KSE_ENABLED,4,4
	.comm	EINVAL,4,4
	.comm	CRYP_CR_KSE_POS,4,4
	.comm	CRYP_CR_KEYSIZE_POS,4,4
	.comm	CRYP_CR_CRYPEN_POS,4,4
	.comm	CRYP_CR_ALGOMODE_POS,4,4
	.comm	CRYP_CR_ALGODIR_POS,4,4
	.comm	CRYP_CRYPEN_ENABLE,4,4
	.comm	CRYP_ALGO_AES_ECB,4,4
	.comm	CRYP_ALGO_AES_CBC,4,4
	.comm	CRYP_ALGORITHM_ENCRYPT,4,4
	.comm	CRYP_ALGORITHM_DECRYPT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
