	.file	"extr_caamalg_qi2.c_ahash_final_ctx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"unable to map S/G table\n"
	.text
	.p2align 4
	.type	ahash_final_ctx, @function
ahash_final_ctx:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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, 40
	.cfi_def_cfa_offset 96
	call	crypto_ahash_reqtfm@PLT
	mov	rdi, rax
	mov	r15, rax
	call	crypto_ahash_ctx@PLT
	mov	rdi, r13
	mov	r12, rax
	call	ahash_request_ctx@PLT
	mov	ebp, DWORD PTR GFP_KERNEL[rip]
	mov	rbx, rax
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rbx
	mov	QWORD PTR [rsp], rax
	mov	eax, DWORD PTR 0[r13]
	test	DWORD PTR CRYPTO_TFM_REQ_MAY_SLEEP[rip], eax
	cmove	ebp, DWORD PTR GFP_ATOMIC[rip]
	call	current_buflen@PLT
	mov	rdi, r15
	mov	r14d, DWORD PTR [rax]
	call	crypto_ahash_digestsize@PLT
	mov	edi, DWORD PTR GFP_DMA[rip]
	mov	DWORD PTR 12[rsp], eax
	or	edi, ebp
	call	qi_cache_zalloc@PLT
	mov	r8d, DWORD PTR ENOMEM[rip]
	neg	r8d
	test	rax, rax
	je	.L1
	xor	edi, edi
	test	r14d, r14d
	mov	rbp, rax
	setne	dil
	add	edi, 1
	call	pad_sg_nents@PLT
	mov	r15, QWORD PTR 8[rbp]
	mov	edx, DWORD PTR [r12]
	mov	rsi, rbx
	mov	r8d, DWORD PTR DMA_BIDIRECTIONAL[rip]
	mov	edi, DWORD PTR 4[r12]
	mov	DWORD PTR 16[rsp], eax
	mov	rcx, r15
	call	ctx_map_to_qm_sg@PLT
	mov	r8d, eax
	test	eax, eax
	je	.L13
.L7:
	mov	edi, DWORD PTR 4[r12]
	mov	rdx, r13
	mov	rsi, rbp
	mov	DWORD PTR [rsp], r8d
	mov	ecx, DWORD PTR DMA_BIDIRECTIONAL[rip]
	call	ahash_unmap_ctx@PLT
	mov	rdi, rbp
	call	qi_cache_free@PLT
	mov	r8d, DWORD PTR [rsp]
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L13:
	.cfi_restore_state
	lea	r10, 4[r15]
	mov	edi, DWORD PTR 4[r12]
	mov	rdx, rbx
	mov	rsi, r10
	mov	QWORD PTR 24[rsp], r10
	call	buf_map_to_qm_sg@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L7
	mov	r10, QWORD PTR 24[rsp]
	test	r14d, r14d
	mov	eax, DWORD PTR 16[rsp]
	mov	esi, 1
	cmove	r10, r15
	sal	eax, 2
	mov	DWORD PTR 16[rsp], eax
	mov	rdi, r10
	call	dpaa2_sg_set_final@PLT
	mov	edi, DWORD PTR 4[r12]
	mov	edx, DWORD PTR 16[rsp]
	mov	rsi, r15
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	call	dma_map_single@PLT
	mov	edi, DWORD PTR 4[r12]
	mov	DWORD PTR 4[rbp], eax
	mov	esi, eax
	call	dma_mapping_error@PLT
	test	rax, rax
	jne	.L14
	mov	ecx, DWORD PTR 16[rsp]
	mov	rax, QWORD PTR [rsp]
	lea	r8, 8[rbx]
	xor	esi, esi
	mov	edx, 8
	lea	rdi, 40[rbx]
	mov	QWORD PTR 16[rsp], r8
	mov	DWORD PTR 0[rbp], ecx
	lea	r15, 4[rax]
	call	memset@PLT
	mov	esi, 1
	mov	rdi, r15
	call	dpaa2_fl_set_final@PLT
	mov	esi, DWORD PTR dpaa2_fl_sg[rip]
	mov	rdi, r15
	call	dpaa2_fl_set_format@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	rdi, r15
	call	dpaa2_fl_set_addr@PLT
	mov	esi, DWORD PTR [r12]
	mov	rdi, r15
	add	esi, r14d
	call	dpaa2_fl_set_len@PLT
	mov	r14, QWORD PTR [rsp]
	mov	esi, DWORD PTR dpaa2_fl_single[rip]
	mov	rdi, r14
	call	dpaa2_fl_set_format@PLT
	mov	esi, DWORD PTR [rbx]
	mov	rdi, r14
	call	dpaa2_fl_set_addr@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	rdi, r14
	call	dpaa2_fl_set_len@PLT
	mov	rdx, QWORD PTR 16[r12]
	mov	r8, QWORD PTR 16[rsp]
	mov	rax, QWORD PTR FINALIZE[rip]
	mov	edi, DWORD PTR 4[r12]
	mov	rsi, r8
	lea	rdx, [rdx+rax*4]
	mov	QWORD PTR 32[rbx], rdx
	mov	rdx, QWORD PTR 8[r12]
	mov	eax, DWORD PTR [rdx+rax*4]
	mov	QWORD PTR 16[rbx], r13
	mov	QWORD PTR 8[rbx], rbp
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR ahash_done_ctx_src[rip]
	mov	DWORD PTR 24[rbx], eax
	call	dpaa2_caam_enqueue@PLT
	mov	r8d, eax
	add	eax, DWORD PTR EINPROGRESS[rip]
	je	.L1
	mov	eax, r8d
	add	eax, DWORD PTR EBUSY[rip]
	jne	.L7
	mov	eax, DWORD PTR 0[r13]
	test	DWORD PTR CRYPTO_TFM_REQ_MAY_BACKLOG[rip], eax
	je	.L7
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 4[r12]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r8d, DWORD PTR ENOMEM[rip]
	neg	r8d
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	ahash_final_ctx, .-ahash_final_ctx
	.comm	dpaa2_fl_single,4,4
	.comm	dpaa2_fl_sg,4,4
	.comm	ahash_done_ctx_src,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_DMA,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	FINALIZE,8,8
	.comm	ENOMEM,4,4
	.comm	EINPROGRESS,4,4
	.comm	EBUSY,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.comm	CRYPTO_TFM_REQ_MAY_SLEEP,4,4
	.comm	CRYPTO_TFM_REQ_MAY_BACKLOG,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_caamalg_qi2.c_ahash_final_ctx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to map S/G table\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahash_final_ctx, %function
ahash_final_ctx:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	mov	r8, r0
	bl	crypto_ahash_reqtfm
	mov	r4, r0
	bl	crypto_ahash_ctx
	mov	r7, r0
	mov	r0, r8
	bl	ahash_request_ctx
	ldr	r3, .L16
	ldr	r2, [r8]
	ldr	r3, [r3]
	ldr	r1, [r0, #24]
	tst	r2, r3
	ldrne	r3, .L16+4
	ldreq	r3, .L16+8
	str	r1, [sp, #8]
	ldr	r6, [r3]
	mov	r5, r0
	bl	current_buflen
	mov	r3, r0
	mov	r0, r4
	ldr	r10, [r3]
	bl	crypto_ahash_digestsize
	ldr	r3, .L16+12
	str	r0, [sp, #12]
	ldr	r0, [r3]
	orr	r0, r6, r0
	bl	qi_cache_zalloc
	subs	r6, r0, #0
	beq	.L13
	cmp	r10, #0
	movne	r0, #2
	moveq	r0, #1
	bl	pad_sg_nents
	mov	ip, r0
	ldr	r9, .L16+16
	ldr	fp, [r6, #8]
	ldr	r1, [r9]
	ldr	r2, [r7]
	ldr	r0, [r7, #4]
	mov	r3, fp
	str	r1, [sp]
	mov	r1, r5
	str	ip, [sp, #16]
	bl	ctx_map_to_qm_sg
	subs	r4, r0, #0
	beq	.L14
.L7:
	mov	r2, r8
	mov	r1, r6
	ldr	r3, [r9]
	ldr	r0, [r7, #4]
	bl	ahash_unmap_ctx
	mov	r0, r6
	bl	qi_cache_free
.L1:
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	add	r1, fp, #4
	mov	r2, r5
	ldr	r0, [r7, #4]
	str	r1, [sp, #20]
	bl	buf_map_to_qm_sg
	subs	r4, r0, #0
	bne	.L7
	ldr	r1, [sp, #20]
	cmp	r10, #0
	movne	r0, r1
	moveq	r0, fp
	mov	r1, #1
	bl	dpaa2_sg_set_final
	ldr	r3, [sp, #16]
	ldr	r0, .L16+20
	lsl	r2, r3, #2
	mov	r1, fp
	ldr	r3, [r0]
	ldr	r0, [r7, #4]
	str	r2, [sp, #16]
	bl	dma_map_single
	mov	r1, r0
	ldr	r0, [r7, #4]
	str	r1, [r6, #4]
	bl	dma_mapping_error
	cmp	r0, #0
	ldr	r2, [sp, #16]
	bne	.L15
	ldr	fp, [sp, #8]
	str	r2, [r6]
	add	r3, fp, #4
	mov	r0, r3
	mov	r1, #1
	strb	r4, [r5, #24]
	strb	r4, [r5, #25]
	strb	r4, [r5, #26]
	strb	r4, [r5, #27]
	str	r3, [sp, #8]
	bl	dpaa2_fl_set_final
	ldr	r2, .L16+24
	ldr	r3, [sp, #8]
	ldr	r1, [r2]
	mov	r0, r3
	bl	dpaa2_fl_set_format
	ldr	r3, [sp, #8]
	ldr	r1, [r6, #4]
	mov	r0, r3
	bl	dpaa2_fl_set_addr
	ldr	r3, [sp, #8]
	ldr	r1, [r7]
	mov	r0, r3
	add	r1, r10, r1
	bl	dpaa2_fl_set_len
	ldr	r3, .L16+28
	mov	r0, fp
	ldr	r1, [r3]
	bl	dpaa2_fl_set_format
	ldr	r1, [r5]
	mov	r0, fp
	bl	dpaa2_fl_set_addr
	ldr	r1, [sp, #12]
	mov	r0, fp
	bl	dpaa2_fl_set_len
	ldr	r3, .L16+32
	ldr	r0, [r7, #8]
	ldr	r2, [r3]
	ldr	r1, .L16+36
	ldr	r3, [r7, #12]
	ldr	ip, [r0, r2, lsl #2]
	ldr	r0, [r1]
	add	r3, r3, r2, lsl #2
	str	r3, [r5, #20]
	str	r0, [r5, #12]
	stmib	r5, {r6, r8}
	ldr	r0, [r7, #4]
	add	r1, r5, #4
	str	ip, [r5, #16]
	bl	dpaa2_caam_enqueue
	ldr	r3, .L16+40
	mov	r4, r0
	ldr	r3, [r3]
	cmn	r0, r3
	beq	.L1
	ldr	r3, .L16+44
	ldr	r3, [r3]
	cmn	r0, r3
	bne	.L7
	ldr	r3, .L16+48
	ldr	r2, [r8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L7
	b	.L1
.L15:
	ldr	r1, .L16+52
	ldr	r0, [r7, #4]
	bl	dev_err
	ldr	r3, .L16+56
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L7
.L13:
	ldr	r3, .L16+56
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	CRYPTO_TFM_REQ_MAY_SLEEP
	.word	GFP_KERNEL
	.word	GFP_ATOMIC
	.word	GFP_DMA
	.word	DMA_BIDIRECTIONAL
	.word	DMA_TO_DEVICE
	.word	dpaa2_fl_sg
	.word	dpaa2_fl_single
	.word	FINALIZE
	.word	ahash_done_ctx_src
	.word	EINPROGRESS
	.word	EBUSY
	.word	CRYPTO_TFM_REQ_MAY_BACKLOG
	.word	.LC0
	.word	ENOMEM
	.size	ahash_final_ctx, .-ahash_final_ctx
	.comm	dpaa2_fl_single,4,4
	.comm	dpaa2_fl_sg,4,4
	.comm	ahash_done_ctx_src,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_DMA,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	FINALIZE,4,4
	.comm	ENOMEM,4,4
	.comm	EINPROGRESS,4,4
	.comm	EBUSY,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.comm	CRYPTO_TFM_REQ_MAY_SLEEP,4,4
	.comm	CRYPTO_TFM_REQ_MAY_BACKLOG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
