	.file	"extr_safexcel_cipher.c_safexcel_aead_setkey.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"aead: unsupported cipher algorithm\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"safexcel-sha1"
.LC2:
	.string	"safexcel-sha224"
.LC3:
	.string	"safexcel-sha256"
.LC4:
	.string	"safexcel-sha384"
.LC5:
	.string	"safexcel-sha512"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"aead: unsupported hash algorithm\n"
	.text
	.p2align 4
	.type	safexcel_aead_setkey, @function
safexcel_aead_setkey:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	lea	rbp, 48[rsp]
	call	crypto_aead_tfm@PLT
	mov	rdi, rax
	call	crypto_tfm_ctx@PLT
	mov	edx, r15d
	mov	rsi, r14
	mov	rdi, rbp
	mov	r12d, DWORD PTR EINVAL[rip]
	mov	rbx, rax
	mov	rax, QWORD PTR 72[rax]
	neg	r12d
	mov	QWORD PTR 8[rsp], rax
	call	crypto_authenc_extractkeys@PLT
	test	rax, rax
	jne	.L2
	mov	rax, QWORD PTR CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD[rip]
	cmp	QWORD PTR [rbx], rax
	je	.L31
	mov	eax, DWORD PTR 8[rbx]
	cmp	eax, 128
	je	.L4
.L34:
	cmp	eax, 129
	jne	.L5
	mov	rdx, QWORD PTR 48[rsp]
	mov	rsi, QWORD PTR 56[rsp]
	mov	rdi, r13
	call	verify_aead_des3_key@PLT
	mov	edi, eax
	mov	r12d, eax
	call	unlikely@PLT
	test	eax, eax
	jne	.L6
.L7:
	mov	rax, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR EIP197_TRC_CACHE[rip], eax
	je	.L9
	cmp	QWORD PTR 56[rbx], 0
	jne	.L32
.L9:
	mov	eax, DWORD PTR 12[rbx]
	sub	eax, 130
	cmp	eax, 4
	ja	.L11
	lea	rdx, .L13[rip]
	lea	r14, 40[rsp]
	mov	esi, DWORD PTR 68[rsp]
	movsx	rax, DWORD PTR [rdx+rax*4]
	lea	r15, 32[rsp]
	mov	r8, r14
	mov	rcx, r15
	add	rax, rdx
	mov	edx, DWORD PTR 64[rsp]
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L13:
	.long	.L17-.L13
	.long	.L16-.L13
	.long	.L15-.L13
	.long	.L14-.L13
	.long	.L12-.L13
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR 4[rax]
	call	dev_err@PLT
.L2:
	mov	esi, DWORD PTR CRYPTO_TFM_RES_BAD_KEY_LEN[rip]
	mov	rdi, r13
	call	crypto_aead_set_flags@PLT
.L6:
	mov	esi, 24
	mov	rdi, rbp
	call	memzero_explicit@PLT
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L33
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	rcx, QWORD PTR CTR_RFC3686_NONCE_SIZE[rip]
	mov	rsi, QWORD PTR AES_MIN_KEY_SIZE[rip]
	mov	rdx, QWORD PTR 48[rsp]
	add	rsi, rcx
	cmp	rdx, rsi
	jl	.L2
	mov	rsi, QWORD PTR 56[rsp]
	add	rsi, rdx
	sub	rdx, rax
	mov	eax, DWORD PTR 8[rbx]
	sub	rsi, rcx
	mov	ecx, DWORD PTR [rsi]
	mov	QWORD PTR 48[rsp], rdx
	mov	DWORD PTR 64[rbx], ecx
	cmp	eax, 128
	jne	.L34
.L4:
	mov	rdx, QWORD PTR 48[rsp]
	mov	rsi, QWORD PTR 56[rsp]
	lea	rdi, 28[rsp]
	call	aes_expandkey@PLT
	mov	edi, eax
	mov	r12d, eax
	call	unlikely@PLT
	test	eax, eax
	je	.L7
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rdi, .LC2[rip]
	call	safexcel_hmac_setkey@PLT
	test	eax, eax
	jne	.L2
.L18:
	mov	rdi, r13
	call	crypto_aead_get_flags@PLT
	and	eax, DWORD PTR CRYPTO_TFM_RES_MASK[rip]
	mov	rdi, r13
	mov	esi, eax
	call	crypto_aead_set_flags@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR EIP197_TRC_CACHE[rip], eax
	je	.L20
	cmp	QWORD PTR 56[rbx], 0
	jne	.L35
.L20:
	mov	edi, DWORD PTR 40[rbx]
	mov	rdx, QWORD PTR 48[rsp]
	xor	r12d, r12d
	mov	rsi, QWORD PTR 56[rsp]
	call	memcpy@PLT
	mov	rax, QWORD PTR 48[rsp]
	mov	edi, DWORD PTR 36[rbx]
	mov	rsi, r15
	mov	rdx, QWORD PTR 16[rbx]
	mov	QWORD PTR 24[rbx], rax
	call	memcpy@PLT
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 32[rbx]
	mov	rsi, r14
	call	memcpy@PLT
	mov	esi, 24
	mov	rdi, rbp
	call	memzero_explicit@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	lea	rdi, .LC1[rip]
	call	safexcel_hmac_setkey@PLT
	test	eax, eax
	je	.L18
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC4[rip]
	call	safexcel_hmac_setkey@PLT
	test	eax, eax
	je	.L18
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L17:
	lea	rdi, .LC5[rip]
	call	safexcel_hmac_setkey@PLT
	test	eax, eax
	je	.L18
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rdi, .LC3[rip]
	call	safexcel_hmac_setkey@PLT
	test	eax, eax
	je	.L18
	jmp	.L2
.L11:
	mov	rax, QWORD PTR 8[rsp]
	lea	rsi, .LC6[rip]
	mov	edi, DWORD PTR 4[rax]
	call	dev_err@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L32:
	mov	edi, DWORD PTR 40[rbx]
	mov	rdx, QWORD PTR 48[rsp]
	mov	rsi, QWORD PTR 56[rsp]
	call	memcmp@PLT
	test	rax, rax
	je	.L9
	mov	DWORD PTR 48[rbx], 1
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 36[rbx]
	mov	rsi, QWORD PTR 32[rsp]
	call	memcmp@PLT
	test	rax, rax
	je	.L22
.L23:
	mov	DWORD PTR 48[rbx], 1
	jmp	.L20
.L22:
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 32[rbx]
	mov	rsi, QWORD PTR 40[rsp]
	call	memcmp@PLT
	test	rax, rax
	jne	.L23
	jmp	.L20
.L33:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	safexcel_aead_setkey, .-safexcel_aead_setkey
	.comm	EIP197_TRC_CACHE,4,4
	.comm	EINVAL,4,4
	.comm	CTR_RFC3686_NONCE_SIZE,8,8
	.comm	CRYPTO_TFM_RES_MASK,4,4
	.comm	CRYPTO_TFM_RES_BAD_KEY_LEN,4,4
	.comm	CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD,8,8
	.comm	AES_MIN_KEY_SIZE,8,8
	.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_safexcel_cipher.c_safexcel_aead_setkey.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"aead: unsupported cipher algorithm\012\000"
	.align	2
.LC1:
	.ascii	"safexcel-sha1\000"
	.align	2
.LC2:
	.ascii	"safexcel-sha224\000"
	.align	2
.LC3:
	.ascii	"safexcel-sha256\000"
	.align	2
.LC4:
	.ascii	"safexcel-sha384\000"
	.align	2
.LC5:
	.ascii	"safexcel-sha512\000"
	.align	2
.LC6:
	.ascii	"aead: unsupported hash algorithm\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	safexcel_aead_setkey, %function
safexcel_aead_setkey:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L42
	sub	sp, sp, #40
	mov	r6, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r8, r0
	bl	crypto_aead_tfm
	bl	crypto_tfm_ctx
	mov	r4, r0
	ldr	r3, .L42+4
	mov	r1, r6
	mov	r2, r7
	add	r0, sp, #20
	ldr	r5, [r3]
	ldr	r6, [r4, #44]
	bl	crypto_authenc_extractkeys
	cmp	r0, #0
	rsb	r5, r5, #0
	bne	.L2
	ldr	r2, .L42+8
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L37
	ldr	r3, [r4, #4]
	cmp	r3, #128
	beq	.L4
.L40:
	cmp	r3, #129
	bne	.L5
	ldr	r2, [sp, #20]
	ldr	r1, [sp, #24]
	mov	r0, r8
	bl	verify_aead_des3_key
	mov	r5, r0
	bl	unlikely
	cmp	r0, #0
	bne	.L6
.L7:
	ldr	r7, .L42+12
	ldr	r2, [r6]
	ldr	r3, [r7]
	tst	r2, r3
	beq	.L9
	ldr	r3, [r4, #36]
	cmp	r3, #0
	bne	.L38
.L9:
	ldr	r3, [r4, #8]
	sub	r3, r3, #130
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L11
.L13:
	.word	.L17
	.word	.L16
	.word	.L15
	.word	.L14
	.word	.L12
.L5:
	ldr	r0, [r6, #4]
	ldr	r1, .L42+16
	bl	dev_err
.L2:
	ldr	r3, .L42+20
	mov	r0, r8
	ldr	r1, [r3]
	bl	crypto_aead_set_flags
.L6:
	mov	r1, #16
	add	r0, sp, #20
	bl	memzero_explicit
.L1:
	ldr	r3, .L42
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L39
	mov	r0, r5
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L37:
	ldr	r1, .L42+24
	ldr	r2, .L42+28
	ldr	r0, [r1]
	ldr	r1, [r2]
	ldr	r2, [sp, #20]
	add	r1, r0, r1
	cmp	r2, r1
	blt	.L2
	ldr	r1, [sp, #24]
	sub	r3, r2, r3
	add	r2, r2, r1
	sub	r2, r2, r0
	ldr	r2, [r2]
	str	r3, [sp, #20]
	ldr	r3, [r4, #4]
	str	r2, [r4, #40]
	cmp	r3, #128
	bne	.L40
.L4:
	ldr	r2, [sp, #20]
	ldr	r1, [sp, #24]
	add	r0, sp, #16
	bl	aes_expandkey
	mov	r5, r0
	bl	unlikely
	cmp	r0, #0
	beq	.L7
	b	.L2
.L12:
	add	r10, sp, #8
	add	r9, sp, #12
	mov	r3, r10
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #32]
	ldr	r0, .L42+32
	str	r9, [sp]
	bl	safexcel_hmac_setkey
	cmp	r0, #0
	bne	.L2
.L18:
	mov	r0, r8
	bl	crypto_aead_get_flags
	mov	r1, r0
	ldr	r3, .L42+36
	mov	r0, r8
	ldr	r3, [r3]
	and	r1, r1, r3
	bl	crypto_aead_set_flags
	ldr	r2, [r6]
	ldr	r3, [r7]
	tst	r2, r3
	beq	.L20
	ldr	r3, [r4, #36]
	cmp	r3, #0
	bne	.L41
.L20:
	ldr	r2, [sp, #20]
	ldr	r1, [sp, #24]
	ldr	r0, [r4, #28]
	bl	memcpy
	ldr	r3, [sp, #20]
	mov	r1, r10
	str	r3, [r4, #16]
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #24]
	bl	memcpy
	mov	r1, r9
	ldr	r2, [r4, #12]
	ldr	r0, [r4, #20]
	bl	memcpy
	mov	r1, #16
	add	r0, sp, #20
	bl	memzero_explicit
	mov	r5, #0
	b	.L1
.L17:
	add	r10, sp, #8
	add	r9, sp, #12
	mov	r3, r10
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #32]
	ldr	r0, .L42+40
	str	r9, [sp]
	bl	safexcel_hmac_setkey
	cmp	r0, #0
	beq	.L18
	b	.L2
.L15:
	add	r10, sp, #8
	add	r9, sp, #12
	mov	r3, r10
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #32]
	ldr	r0, .L42+44
	str	r9, [sp]
	bl	safexcel_hmac_setkey
	cmp	r0, #0
	beq	.L18
	b	.L2
.L16:
	add	r10, sp, #8
	add	r9, sp, #12
	mov	r3, r10
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #32]
	ldr	r0, .L42+48
	str	r9, [sp]
	bl	safexcel_hmac_setkey
	cmp	r0, #0
	beq	.L18
	b	.L2
.L14:
	add	r10, sp, #8
	add	r9, sp, #12
	mov	r3, r10
	ldr	r2, [sp, #28]
	ldr	r1, [sp, #32]
	ldr	r0, .L42+52
	str	r9, [sp]
	bl	safexcel_hmac_setkey
	cmp	r0, #0
	beq	.L18
	b	.L2
.L38:
	ldr	r2, [sp, #20]
	ldr	r1, [sp, #24]
	ldr	r0, [r4, #28]
	bl	memcmp
	cmp	r0, #0
	movne	r3, #1
	strne	r3, [r4, #32]
	b	.L9
.L41:
	ldr	r2, [r4, #12]
	ldr	r1, [sp, #8]
	ldr	r0, [r4, #24]
	bl	memcmp
	cmp	r0, #0
	beq	.L22
.L23:
	mov	r3, #1
	str	r3, [r4, #32]
	b	.L20
.L22:
	ldr	r2, [r4, #12]
	ldr	r1, [sp, #12]
	ldr	r0, [r4, #20]
	bl	memcmp
	cmp	r0, #0
	bne	.L23
	b	.L20
.L39:
	bl	__stack_chk_fail
.L11:
	ldr	r0, [r6, #4]
	ldr	r1, .L42+56
	bl	dev_err
	b	.L2
.L43:
	.align	2
.L42:
	.word	.LC7
	.word	EINVAL
	.word	CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD
	.word	EIP197_TRC_CACHE
	.word	.LC0
	.word	CRYPTO_TFM_RES_BAD_KEY_LEN
	.word	CTR_RFC3686_NONCE_SIZE
	.word	AES_MIN_KEY_SIZE
	.word	.LC1
	.word	CRYPTO_TFM_RES_MASK
	.word	.LC5
	.word	.LC3
	.word	.LC4
	.word	.LC2
	.word	.LC6
	.size	safexcel_aead_setkey, .-safexcel_aead_setkey
	.comm	EIP197_TRC_CACHE,4,4
	.comm	EINVAL,4,4
	.comm	CTR_RFC3686_NONCE_SIZE,4,4
	.comm	CRYPTO_TFM_RES_MASK,4,4
	.comm	CRYPTO_TFM_RES_BAD_KEY_LEN,4,4
	.comm	CONTEXT_CONTROL_CRYPTO_MODE_CTR_LOAD,4,4
	.comm	AES_MIN_KEY_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
