	.file	"extr_mtk-aes.c_mtk_aes_setkey.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mtk_aes_setkey, @function
mtk_aes_setkey:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	crypto_ablkcipher_ctx@PLT
	mov	rbx, rax
	cmp	r12d, 129
	je	.L2
	cmp	r12d, 130
	je	.L3
	cmp	r12d, 128
	je	.L11
	mov	esi, DWORD PTR CRYPTO_TFM_RES_BAD_KEY_LEN[rip]
	mov	rdi, rbp
	call	crypto_ablkcipher_set_flags@PLT
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR AES_TFM_192BITS[rip]
	mov	DWORD PTR 8[rbx], eax
.L6:
	mov	edi, r12d
	call	SIZE_IN_WORDS@PLT
	mov	edi, DWORD PTR [rbx]
	mov	edx, r12d
	mov	rsi, r13
	mov	DWORD PTR 4[rbx], eax
	call	mtk_aes_write_state_le@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	eax, DWORD PTR AES_TFM_256BITS[rip]
	mov	DWORD PTR 8[rbx], eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	mov	eax, DWORD PTR AES_TFM_128BITS[rip]
	mov	DWORD PTR 8[rbx], eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	mtk_aes_setkey, .-mtk_aes_setkey
	.comm	EINVAL,4,4
	.comm	CRYPTO_TFM_RES_BAD_KEY_LEN,4,4
	.comm	AES_TFM_256BITS,4,4
	.comm	AES_TFM_192BITS,4,4
	.comm	AES_TFM_128BITS,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_mtk-aes.c_mtk_aes_setkey.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_aes_setkey, %function
mtk_aes_setkey:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r2
	mov	r7, r1
	mov	r6, r0
	bl	crypto_ablkcipher_ctx
	cmp	r4, #129
	mov	r5, r0
	beq	.L2
	cmp	r4, #130
	beq	.L3
	cmp	r4, #128
	beq	.L11
	ldr	r3, .L12
	mov	r0, r6
	ldr	r1, [r3]
	bl	crypto_ablkcipher_set_flags
	ldr	r3, .L12+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L12+8
	ldr	r3, [r3]
	str	r3, [r0, #8]
.L6:
	mov	r0, r4
	bl	SIZE_IN_WORDS
	mov	r2, r4
	str	r0, [r5, #4]
	mov	r1, r7
	ldr	r0, [r5]
	bl	mtk_aes_write_state_le
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L12+12
	ldr	r3, [r3]
	str	r3, [r0, #8]
	b	.L6
.L3:
	ldr	r3, .L12+16
	ldr	r3, [r3]
	str	r3, [r0, #8]
	b	.L6
.L13:
	.align	2
.L12:
	.word	CRYPTO_TFM_RES_BAD_KEY_LEN
	.word	EINVAL
	.word	AES_TFM_192BITS
	.word	AES_TFM_256BITS
	.word	AES_TFM_128BITS
	.size	mtk_aes_setkey, .-mtk_aes_setkey
	.comm	EINVAL,4,4
	.comm	CRYPTO_TFM_RES_BAD_KEY_LEN,4,4
	.comm	AES_TFM_256BITS,4,4
	.comm	AES_TFM_192BITS,4,4
	.comm	AES_TFM_128BITS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
