	.file	"extr_chcr_algo.c_chcr_ahash_setkey.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	chcr_ahash_setkey, @function
chcr_ahash_setkey:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	h_ctx@PLT
	mov	edi, eax
	call	HMAC_CTX@PLT
	mov	rdi, rbp
	mov	rbx, rax
	call	crypto_ahash_digestsize@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	crypto_ahash_tfm@PLT
	mov	edi, eax
	call	crypto_tfm_alg_blocksize@PLT
	mov	rdi, QWORD PTR shash[rip]
	mov	esi, DWORD PTR 16[rbx]
	mov	ebp, eax
	call	SHASH_DESC_ON_STACK@PLT
	mov	rdi, QWORD PTR shash[rip]
	mov	eax, DWORD PTR 16[rbx]
	mov	DWORD PTR [rdi], eax
	cmp	ebp, r13d
	jnb	.L2
	mov	rcx, QWORD PTR 8[rbx]
	mov	edx, r13d
	mov	rsi, r14
	call	crypto_shash_digest@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L3
	mov	r13d, r12d
.L4:
	mov	rax, QWORD PTR 8[rbx]
	mov	edx, ebp
	xor	esi, esi
	sub	edx, r13d
	lea	rdi, [rax+r13*4]
	call	memset@PLT
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR [rbx]
	mov	edx, ebp
	call	memcpy@PLT
	shr	ebp, 2
	je	.L9
	lea	eax, -1[rbp]
	mov	rdx, rbx
	lea	rcx, 4[rbx+rax*4]
	.p2align 4,,10
	.p2align 3
.L8:
	mov	eax, DWORD PTR IPAD_DATA[rip]
	xor	DWORD PTR 8[rdx], eax
	mov	eax, DWORD PTR OPAD_DATA[rip]
	xor	DWORD PTR [rdx], eax
	add	rdx, 4
	cmp	rcx, rdx
	jne	.L8
.L9:
	cmp	DWORD PTR SHA224_DIGEST_SIZE[rip], r12d
	mov	ebp, DWORD PTR SHA256_DIGEST_SIZE[rip]
	je	.L10
	cmp	DWORD PTR SHA384_DIGEST_SIZE[rip], r12d
	mov	ebp, r12d
	jne	.L10
	mov	ebp, DWORD PTR SHA512_DIGEST_SIZE[rip]
.L10:
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR shash[rip]
	mov	ecx, r12d
	mov	rdx, rsi
	call	chcr_compute_partial_hash@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L3
	mov	rdi, QWORD PTR 8[rbx]
	mov	esi, ebp
	call	chcr_change_order@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, QWORD PTR shash[rip]
	mov	ecx, r12d
	mov	rdx, rsi
	call	chcr_compute_partial_hash@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L16
.L3:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	mov	edx, r13d
	mov	rsi, r14
	call	memcpy@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, QWORD PTR [rbx]
	mov	esi, ebp
	call	chcr_change_order@PLT
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	chcr_ahash_setkey, .-chcr_ahash_setkey
	.comm	shash,8,8
	.comm	SHA512_DIGEST_SIZE,4,4
	.comm	SHA384_DIGEST_SIZE,4,4
	.comm	SHA256_DIGEST_SIZE,4,4
	.comm	SHA224_DIGEST_SIZE,4,4
	.comm	OPAD_DATA,4,4
	.comm	IPAD_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_setkey.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	chcr_ahash_setkey, %function
chcr_ahash_setkey:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r2
	mov	r9, r1
	mov	r6, r0
	bl	h_ctx
	bl	HMAC_CTX
	mov	r4, r0
	mov	r0, r6
	bl	crypto_ahash_digestsize
	mov	r5, r0
	mov	r0, r6
	bl	crypto_ahash_tfm
	bl	crypto_tfm_alg_blocksize
	mov	r7, r0
	ldr	r6, .L18
	ldr	r1, [r4, #8]
	ldr	r0, [r6]
	bl	SHASH_DESC_ON_STACK
	ldr	r3, [r4, #8]
	ldr	r0, [r6]
	cmp	r7, r8
	str	r3, [r0]
	bcs	.L2
	mov	r2, r8
	mov	r1, r9
	ldr	r3, [r4, #4]
	bl	crypto_shash_digest
	subs	r8, r0, #0
	moveq	r8, r5
	bne	.L3
.L4:
	ldr	r0, [r4, #4]
	mov	r1, #0
	sub	r2, r7, r8
	add	r0, r0, r8, lsl #2
	bl	memset
	ldm	r4, {r0, r1}
	mov	r2, r7
	bl	memcpy
	lsrs	r0, r7, #2
	beq	.L9
	mov	r3, r4
	ldr	r7, .L18+4
	ldr	lr, .L18+8
	add	r0, r4, r0, lsl #2
.L8:
	ldr	r1, [r3, #4]
	ldr	ip, [r7]
	ldr	r2, [r3]
	eor	r1, r1, ip
	str	r1, [r3, #4]
	ldr	r1, [lr]
	eor	r2, r2, r1
	str	r2, [r3], #4
	cmp	r0, r3
	bne	.L8
.L9:
	ldr	r3, .L18+12
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L16
	ldr	r3, .L18+16
	ldr	r3, [r3]
	cmp	r3, r5
	movne	r7, r5
	ldreq	r3, .L18+20
	ldreq	r7, [r3]
.L10:
	ldr	r2, [r4, #4]
	mov	r3, r5
	mov	r1, r2
	ldr	r0, [r6]
	bl	chcr_compute_partial_hash
	subs	r8, r0, #0
	beq	.L17
.L3:
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L17:
	mov	r1, r7
	ldr	r0, [r4, #4]
	bl	chcr_change_order
	ldr	r2, [r4]
	mov	r3, r5
	mov	r1, r2
	ldr	r0, [r6]
	bl	chcr_compute_partial_hash
	subs	r8, r0, #0
	bne	.L3
	mov	r1, r7
	ldr	r0, [r4]
	bl	chcr_change_order
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	mov	r1, r9
	mov	r2, r8
	ldr	r0, [r4, #4]
	bl	memcpy
	b	.L4
.L16:
	ldr	r3, .L18+24
	ldr	r7, [r3]
	b	.L10
.L19:
	.align	2
.L18:
	.word	shash
	.word	IPAD_DATA
	.word	OPAD_DATA
	.word	SHA224_DIGEST_SIZE
	.word	SHA384_DIGEST_SIZE
	.word	SHA512_DIGEST_SIZE
	.word	SHA256_DIGEST_SIZE
	.size	chcr_ahash_setkey, .-chcr_ahash_setkey
	.comm	shash,4,4
	.comm	SHA512_DIGEST_SIZE,4,4
	.comm	SHA384_DIGEST_SIZE,4,4
	.comm	SHA256_DIGEST_SIZE,4,4
	.comm	SHA224_DIGEST_SIZE,4,4
	.comm	OPAD_DATA,4,4
	.comm	IPAD_DATA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
