	.file	"extr_mtk-aes.c_mtk_aes_handle_queue.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mtk_aes_handle_queue, @function
mtk_aes_handle_queue:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	r15d, r15d
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR [rdi]
	mov	rbp, QWORD PTR [rax+rsi*8]
	xor	esi, esi
	lea	r14, 24[rbp]
	mov	rdi, r14
	call	spin_lock_irqsave@PLT
	test	r13, r13
	je	.L2
	lea	rdi, 28[rbp]
	mov	rsi, r13
	call	crypto_enqueue_request@PLT
	mov	r15d, eax
.L2:
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR AES_FLAGS_BUSY[rip], eax
	jne	.L5
	lea	rbx, 28[rbp]
	mov	rdi, rbx
	call	crypto_get_backlog@PLT
	mov	rdi, rbx
	mov	r13, rax
	call	crypto_dequeue_request@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR AES_FLAGS_BUSY[rip]
	or	DWORD PTR 0[rbp], eax
	xor	esi, esi
	mov	rdi, r14
	call	spin_unlock_irqrestore@PLT
	test	r13, r13
	je	.L6
	mov	esi, DWORD PTR EINPROGRESS[rip]
	mov	rdi, r13
	neg	esi
	call	[QWORD PTR 8[r13]]
.L6:
	mov	edi, DWORD PTR [rbx]
	call	crypto_tfm_ctx@PLT
	mov	edx, 4
	mov	esi, DWORD PTR 8[rax]
	mov	edi, DWORD PTR 12[rax]
	mov	r13, rax
	call	memcpy@PLT
	mov	QWORD PTR 16[rbp], rbx
	mov	rax, QWORD PTR 0[r13]
	mov	rsi, rbp
	mov	QWORD PTR 8[rbp], r13
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r12
	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
	jmp	rax
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, r14
	xor	esi, esi
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	eax, r15d
	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
	.cfi_endproc
.LFE0:
	.size	mtk_aes_handle_queue, .-mtk_aes_handle_queue
	.comm	EINPROGRESS,4,4
	.comm	AES_FLAGS_BUSY,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_handle_queue.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mtk_aes_handle_queue, %function
mtk_aes_handle_queue:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	mov	r0, r1
	mov	r4, r2
	ldr	r3, [r6]
	mov	r1, #0
	ldr	r5, [r3, r0, lsl #2]
	add	r9, r5, #12
	mov	r0, r9
	bl	spin_lock_irqsave
	cmp	r4, #0
	beq	.L2
	mov	r1, r4
	add	r0, r5, #16
	bl	crypto_enqueue_request
	mov	r4, r0
.L2:
	ldr	r10, .L13
	ldr	r2, [r5]
	ldr	r3, [r10]
	tst	r2, r3
	bne	.L5
	add	r7, r5, #16
	mov	r0, r7
	bl	crypto_get_backlog
	mov	r8, r0
	mov	r0, r7
	bl	crypto_dequeue_request
	subs	r7, r0, #0
	beq	.L5
	ldr	r2, [r10]
	ldr	r3, [r5]
	mov	r0, r9
	orr	r3, r3, r2
	mov	r1, #0
	str	r3, [r5]
	bl	spin_unlock_irqrestore
	cmp	r8, #0
	beq	.L6
	ldr	r2, .L13+4
	mov	r0, r8
	ldr	r1, [r2]
	ldr	r3, [r8, #4]
	rsb	r1, r1, #0
	blx	r3
.L6:
	ldr	r0, [r7]
	bl	crypto_tfm_ctx
	mov	r4, r0
	ldr	r1, [r0, #4]
	mov	r2, #4
	ldr	r0, [r0, #8]
	bl	memcpy
	ldr	r3, [r4]
	mov	r1, r5
	mov	r0, r6
	str	r4, [r5, #4]
	str	r7, [r5, #8]
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	bx	r3
.L5:
	mov	r0, r9
	mov	r1, #0
	bl	spin_unlock_irqrestore
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	.align	2
.L13:
	.word	AES_FLAGS_BUSY
	.word	EINPROGRESS
	.size	mtk_aes_handle_queue, .-mtk_aes_handle_queue
	.comm	EINPROGRESS,4,4
	.comm	AES_FLAGS_BUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
