	.file	"extr_chcr_algo.c_chcr_ahash_finup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	chcr_ahash_finup, @function
chcr_ahash_finup:
.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
	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, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	ahash_request_ctx@PLT
	mov	rdi, r12
	mov	rbx, rax
	call	crypto_ahash_reqtfm@PLT
	mov	rbp, rax
	mov	rdi, rax
	call	h_ctx@PLT
	mov	rdi, rbp
	mov	r15, QWORD PTR 8[rax]
	call	crypto_ahash_tfm@PLT
	mov	edi, eax
	call	crypto_tfm_alg_blocksize@PLT
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rax
	call	h_ctx@PLT
	mov	rdi, rax
	call	ULD_CTX@PLT
	mov	rdi, r15
	mov	r14, rax
	call	chcr_inc_wrcount@PLT
	test	eax, eax
	je	.L2
	mov	r13d, DWORD PTR ENXIO[rip]
	neg	r13d
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	mov	r13d, eax
	call	h_ctx@PLT
	mov	rdx, QWORD PTR 8[r14]
	mov	esi, DWORD PTR [rax]
	mov	edi, DWORD PTR [rdx]
	call	cxgb4_is_crypto_q_full@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	je	.L4
	mov	eax, DWORD PTR 12[r12]
	mov	r13d, 1
	test	DWORD PTR CRYPTO_TFM_REQ_MAY_BACKLOG[rip], eax
	je	.L26
.L4:
	mov	rdi, rbx
	call	chcr_init_hctx_per_wr@PLT
	mov	rdi, QWORD PTR [r14]
	mov	rsi, r12
	call	chcr_hash_dma_map@PLT
	test	eax, eax
	je	.L6
	mov	r13d, DWORD PTR ENOMEM[rip]
	neg	r13d
.L5:
	mov	rdi, r15
	call	chcr_dec_wrcount@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	call	crypto_ahash_digestsize@PLT
	lea	rdi, 60[rsp]
	mov	esi, eax
	call	get_alg_config@PLT
	mov	edi, DWORD PTR 60[rsp]
	mov	esi, 16
	call	roundup@PLT
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], eax
	call	crypto_ahash_tfm@PLT
	mov	edi, eax
	call	is_hmac@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR 16[rsp]
	mov	DWORD PTR 20[rsp], 1
	lea	edi, [rax+rax]
	mov	DWORD PTR 16[rsp], edi
.L8:
	call	HASH_SPACE_LEFT@PLT
	xor	esi, esi
	mov	edi, DWORD PTR 8[r12]
	cmp	QWORD PTR [rbx], 0
	mov	edx, eax
	setne	sil
	xor	ecx, ecx
	call	chcr_hash_ent_in_wr@PLT
	mov	rdx, QWORD PTR [r12]
	mov	QWORD PTR 24[rsp], rax
	cmp	rax, rdx
	jge	.L9
	mov	rdi, rbp
	call	crypto_ahash_tfm@PLT
	mov	edi, eax
	call	is_hmac@PLT
	test	rax, rax
	jne	.L27
.L10:
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdi, QWORD PTR [rbx]
	movabs	rax, 4294967296
	add	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR 32[rsp], rax
	call	rounddown@PLT
	mov	rcx, QWORD PTR [rbx]
	mov	QWORD PTR 40[rsp], 0
	mov	rdx, rax
	sub	rdx, rcx
	mov	QWORD PTR 24[rsp], rdx
	mov	edx, DWORD PTR 60[rsp]
	mov	DWORD PTR 56[rsp], edx
	mov	rdx, QWORD PTR 8[rbx]
.L11:
	add	rdx, rax
	mov	eax, DWORD PTR 8[r12]
	mov	QWORD PTR 48[rsp], rcx
	add	rcx, QWORD PTR [r12]
	mov	QWORD PTR 8[rbx], rdx
	mov	DWORD PTR 16[rbx], 1
	mov	DWORD PTR 24[rbx], eax
	je	.L28
.L12:
	lea	rsi, 16[rsp]
	mov	rdi, r12
	call	create_hash_wr@PLT
	mov	rdi, rax
	mov	QWORD PTR 8[rsp], rax
	call	IS_ERR@PLT
	mov	r8, QWORD PTR 8[rsp]
	test	rax, rax
	jne	.L29
	mov	rax, QWORD PTR 24[rsp]
	add	DWORD PTR 20[rbx], eax
	mov	rdi, rbp
	mov	rax, QWORD PTR 8[r14]
	mov	QWORD PTR [rbx], 0
	mov	QWORD PTR 8[rsp], r8
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR [r8], eax
	call	h_ctx@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR CPL_PRIORITY_DATA[rip]
	mov	edx, DWORD PTR [rax]
	mov	rdi, r8
	call	set_wr_txq@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdi, r8
	call	chcr_send_wr@PLT
	test	r13d, r13d
	je	.L14
	mov	r13d, DWORD PTR EBUSY[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L26:
	mov	r13d, DWORD PTR ENOSPC[rip]
	neg	r13d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, rbp
	mov	QWORD PTR 24[rsp], rdx
	mov	QWORD PTR 32[rsp], 1
	call	crypto_ahash_digestsize@PLT
	mov	rcx, QWORD PTR [rbx]
	mov	rdx, QWORD PTR 8[rbx]
	mov	DWORD PTR 56[rsp], eax
	mov	rax, QWORD PTR 24[rsp]
	lea	rsi, [rdx+rcx]
	add	rsi, rax
	add	rax, rcx
	mov	QWORD PTR 40[rsp], rsi
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L7:
	mov	DWORD PTR 20[rsp], 0
	mov	edi, DWORD PTR 16[rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r8
	call	PTR_ERR@PLT
	mov	rdi, QWORD PTR [r14]
	mov	rsi, r12
	mov	r13d, eax
	call	chcr_hash_dma_unmap@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	mov	edi, DWORD PTR 28[rbx]
	mov	rsi, QWORD PTR 8[rsp]
	call	create_last_hash_block@PLT
	mov	rax, QWORD PTR 8[rsp]
	movabs	rcx, 4294967296
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 32[rsp], rcx
	mov	QWORD PTR 48[rsp], rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L14:
	mov	r13d, DWORD PTR EINPROGRESS[rip]
	neg	r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edx, DWORD PTR 16[rsp]
	mov	DWORD PTR 20[rsp], 0
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR 16[rsp], eax
	jmp	.L10
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	chcr_ahash_finup, .-chcr_ahash_finup
	.comm	ENXIO,4,4
	.comm	ENOSPC,4,4
	.comm	ENOMEM,4,4
	.comm	EINPROGRESS,4,4
	.comm	EBUSY,4,4
	.comm	CRYPTO_TFM_REQ_MAY_BACKLOG,4,4
	.comm	CPL_PRIORITY_DATA,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_chcr_algo.c_chcr_ahash_finup.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	chcr_ahash_finup, %function
chcr_ahash_finup:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L30
	sub	sp, sp, #52
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	mov	r5, r0
	bl	ahash_request_ctx
	mov	r6, r0
	mov	r0, r5
	bl	crypto_ahash_reqtfm
	mov	r4, r0
	bl	h_ctx
	mov	r3, r0
	mov	r0, r4
	ldr	r8, [r3, #4]
	bl	crypto_ahash_tfm
	bl	crypto_tfm_alg_blocksize
	mov	r9, r0
	mov	r0, r4
	bl	h_ctx
	bl	ULD_CTX
	mov	r7, r0
	mov	r0, r8
	bl	chcr_inc_wrcount
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L30+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	ldr	r3, .L30
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L25
	mov	r0, r4
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, [r7, #4]
	mov	r0, r4
	ldr	r10, [r3]
	bl	h_ctx
	mov	r3, r0
	mov	r0, r10
	ldr	r1, [r3]
	bl	cxgb4_is_crypto_q_full
	bl	unlikely
	subs	r10, r0, #0
	beq	.L4
	ldr	r3, .L30+8
	ldr	r2, [r5, #8]
	ldr	r3, [r3]
	tst	r2, r3
	movne	r10, #1
	beq	.L26
.L4:
	mov	r0, r6
	bl	chcr_init_hctx_per_wr
	mov	r1, r5
	ldr	r0, [r7]
	bl	chcr_hash_dma_map
	cmp	r0, #0
	beq	.L6
	ldr	r3, .L30+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L5:
	mov	r0, r8
	bl	chcr_dec_wrcount
	b	.L1
.L6:
	mov	r0, r4
	bl	crypto_ahash_digestsize
	mov	r1, r0
	add	r0, sp, #40
	bl	get_alg_config
	mov	r1, #16
	ldr	r0, [sp, #40]
	bl	roundup
	mov	r3, r0
	mov	r0, r4
	str	r3, [sp, #8]
	bl	crypto_ahash_tfm
	bl	is_hmac
	subs	r3, r0, #0
	movne	r3, #1
	ldrne	r0, [sp, #8]
	ldr	fp, [r6]
	lslne	r0, r0, r3
	strne	r3, [sp, #12]
	streq	r3, [sp, #12]
	ldr	r3, [r5, #4]
	ldreq	r0, [sp, #8]
	strne	r0, [sp, #8]
	subs	fp, fp, #0
	movne	fp, #1
	str	r3, [sp, #4]
	bl	HASH_SPACE_LEFT
	ldr	r3, [sp, #4]
	mov	r2, r0
	mov	r1, fp
	mov	r0, r3
	mov	r3, #0
	bl	chcr_hash_ent_in_wr
	ldr	r3, [r5]
	str	r0, [sp, #16]
	cmp	r0, r3
	bge	.L9
	mov	r0, r4
	bl	crypto_ahash_tfm
	bl	is_hmac
	cmp	r0, #0
	bne	.L27
.L10:
	mov	r3, #1
	mov	fp, #0
	ldr	r2, [r6]
	ldr	r0, [sp, #16]
	mov	r1, r9
	add	r0, r0, r2
	str	r3, [sp, #24]
	str	fp, [sp, #20]
	bl	rounddown
	ldr	r1, [r6]
	ldr	r3, [sp, #40]
	sub	r2, r0, r1
	str	r2, [sp, #16]
	ldr	r2, [r6, #4]
	str	fp, [sp, #28]
	str	r3, [sp, #36]
.L11:
	mov	r3, #1
	ldr	fp, [r5]
	add	r2, r2, r0
	ldr	r0, [r5, #4]
	adds	fp, r1, fp
	str	r1, [sp, #32]
	stmib	r6, {r2, r3}
	str	r0, [r6, #16]
	beq	.L28
.L12:
	add	r1, sp, #8
	mov	r0, r5
	bl	create_hash_wr
	mov	r9, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L29
	ldr	r1, [sp, #16]
	ldr	r3, [r6, #12]
	ldr	r2, [r7, #4]
	add	r3, r3, r1
	str	r3, [r6, #12]
	ldr	r2, [r2]
	ldr	r3, .L30+16
	str	r0, [r6]
	str	r2, [r9]
	mov	r0, r4
	ldr	r4, [r3]
	bl	h_ctx
	mov	r1, r4
	ldr	r2, [r0]
	mov	r0, r9
	bl	set_wr_txq
	mov	r0, r9
	bl	chcr_send_wr
	cmp	r10, #0
	ldrne	r3, .L30+20
	ldreq	r3, .L30+24
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L26:
	ldr	r3, .L30+28
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L5
.L9:
	mov	r1, #1
	mov	r2, #0
	mov	r0, r4
	str	r3, [sp, #16]
	str	r1, [sp, #20]
	str	r2, [sp, #24]
	bl	crypto_ahash_digestsize
	ldm	r6, {r1, r2}
	ldr	ip, [sp, #16]
	add	r3, r2, r1
	add	r3, r3, ip
	str	r0, [sp, #36]
	str	r3, [sp, #28]
	add	r0, r1, ip
	b	.L11
.L29:
	mov	r0, r9
	bl	PTR_ERR
	mov	r1, r5
	mov	r4, r0
	ldr	r0, [r7]
	bl	chcr_hash_dma_unmap
	b	.L5
.L28:
	mov	r1, r9
	ldr	r0, [r6, #20]
	bl	create_last_hash_block
	mov	r3, #1
	str	fp, [sp, #20]
	str	r3, [sp, #24]
	str	fp, [sp, #28]
	str	r9, [sp, #32]
	b	.L12
.L27:
	mov	r2, #0
	ldr	r3, [sp, #8]
	str	r2, [sp, #12]
	add	r3, r3, r3, lsr #31
	asr	r3, r3, #1
	str	r3, [sp, #8]
	b	.L10
.L25:
	bl	__stack_chk_fail
.L31:
	.align	2
.L30:
	.word	.LC0
	.word	ENXIO
	.word	CRYPTO_TFM_REQ_MAY_BACKLOG
	.word	ENOMEM
	.word	CPL_PRIORITY_DATA
	.word	EBUSY
	.word	EINPROGRESS
	.word	ENOSPC
	.size	chcr_ahash_finup, .-chcr_ahash_finup
	.comm	ENXIO,4,4
	.comm	ENOSPC,4,4
	.comm	ENOMEM,4,4
	.comm	EINPROGRESS,4,4
	.comm	EBUSY,4,4
	.comm	CRYPTO_TFM_REQ_MAY_BACKLOG,4,4
	.comm	CPL_PRIORITY_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
