	.file	"extr_kex.c_derive_key.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	derive_key, @function
derive_key:
.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, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r15, QWORD PTR [rdi]
	mov	rax, QWORD PTR 112[rsp]
	mov	QWORD PTR [rsp], rcx
	mov	QWORD PTR 8[rsp], r8
	mov	edi, DWORD PTR 16[r15]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	BYTE PTR 39[rsp], sil
	call	ssh_digest_bytes@PLT
	test	rax, rax
	jne	.L2
	mov	r12d, DWORD PTR SSH_ERR_INVALID_ARGUMENT[rip]
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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	rsi, rax
	mov	rdi, rbp
	mov	rbx, rax
	call	ROUNDUP@PLT
	mov	edi, 1
	mov	esi, eax
	call	calloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L20
	mov	edi, DWORD PTR 16[r15]
	call	ssh_digest_start@PLT
	mov	r13, rax
	test	rax, rax
	je	.L9
	mov	rsi, r12
	mov	rdi, rax
	call	ssh_digest_update_buffer@PLT
	test	rax, rax
	je	.L21
.L9:
	mov	r12d, DWORD PTR SSH_ERR_LIBCRYPTO_ERROR[rip]
.L5:
	mov	rdi, r14
	call	free@PLT
	mov	rdi, r13
	call	ssh_digest_free@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdx, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, r13
	call	ssh_digest_update@PLT
	test	rax, rax
	jne	.L9
	lea	rsi, 39[rsp]
	mov	edx, 1
	mov	rdi, r13
	call	ssh_digest_update@PLT
	test	rax, rax
	jne	.L9
	mov	rdx, QWORD PTR 8[r15]
	mov	rsi, QWORD PTR [r15]
	mov	rdi, r13
	call	ssh_digest_update@PLT
	test	rax, rax
	jne	.L9
	mov	rdx, rbx
	mov	rsi, r14
	mov	rdi, r13
	call	ssh_digest_final@PLT
	test	rax, rax
	jne	.L9
	mov	rdi, r13
	call	ssh_digest_free@PLT
	cmp	rbx, rbp
	jnb	.L8
	mov	QWORD PTR 24[rsp], rbx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rsi, r12
	mov	rdi, rax
	call	ssh_digest_update_buffer@PLT
	test	rax, rax
	jne	.L9
	mov	rdx, QWORD PTR 8[rsp]
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, r13
	call	ssh_digest_update@PLT
	test	rax, rax
	jne	.L9
	mov	rdx, QWORD PTR 24[rsp]
	mov	rsi, r14
	mov	rdi, r13
	call	ssh_digest_update@PLT
	test	rax, rax
	jne	.L9
	mov	rax, QWORD PTR 24[rsp]
	mov	rdx, rbx
	mov	rdi, r13
	lea	rsi, [r14+rax]
	call	ssh_digest_final@PLT
	test	rax, rax
	jne	.L9
	mov	rdi, r13
	call	ssh_digest_free@PLT
	add	QWORD PTR 24[rsp], rbx
	mov	rax, QWORD PTR 24[rsp]
	cmp	rbp, rax
	jbe	.L8
.L11:
	mov	edi, DWORD PTR 16[r15]
	call	ssh_digest_start@PLT
	mov	r13, rax
	test	rax, rax
	jne	.L22
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L20:
	mov	r12d, DWORD PTR SSH_ERR_ALLOC_FAIL[rip]
	xor	r13d, r13d
	jmp	.L5
.L8:
	mov	rax, QWORD PTR 16[rsp]
	xor	r12d, r12d
	xor	r13d, r13d
	mov	QWORD PTR [rax], r14
	xor	r14d, r14d
	jmp	.L5
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	derive_key, .-derive_key
	.comm	stderr,4,4
	.comm	SSH_ERR_LIBCRYPTO_ERROR,4,4
	.comm	SSH_ERR_INVALID_ARGUMENT,4,4
	.comm	SSH_ERR_ALLOC_FAIL,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_kex.c_derive_key.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	derive_key, %function
derive_key:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r3
	sub	sp, sp, #20
	ldr	r3, .L24
	ldr	r8, [r0]
	strb	r1, [sp, #11]
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r3, [sp, #64]
	ldr	r0, [r8, #8]
	mov	r5, r2
	ldr	r10, [sp, #60]
	str	r3, [sp]
	bl	ssh_digest_bytes
	subs	r4, r0, #0
	bne	.L2
	ldr	r3, .L24+4
	ldr	fp, [r3]
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, fp
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r1, r4
	mov	r0, r5
	bl	ROUNDUP
	mov	r1, r0
	mov	r0, #1
	bl	calloc
	subs	r9, r0, #0
	ldreq	r3, .L24+8
	moveq	r6, r9
	ldreq	fp, [r3]
	beq	.L5
	ldr	r0, [r8, #8]
	bl	ssh_digest_start
	subs	r6, r0, #0
	beq	.L18
	mov	r1, r10
	bl	ssh_digest_update_buffer
	cmp	r0, #0
	beq	.L21
.L18:
	ldr	r3, .L24+12
	ldr	fp, [r3]
.L5:
	mov	r0, r9
	bl	free
	mov	r0, r6
	bl	ssh_digest_free
	b	.L1
.L21:
	mov	r1, r7
	mov	r0, r6
	ldr	r2, [sp, #56]
	bl	ssh_digest_update
	cmp	r0, #0
	bne	.L18
	mov	r2, #1
	mov	r0, r6
	add	r1, sp, #11
	bl	ssh_digest_update
	cmp	r0, #0
	bne	.L18
	ldm	r8, {r1, r2}
	mov	r0, r6
	bl	ssh_digest_update
	cmp	r0, #0
	bne	.L18
	mov	r2, r4
	mov	r1, r9
	mov	r0, r6
	bl	ssh_digest_final
	subs	fp, r0, #0
	bne	.L18
	mov	r0, r6
	bl	ssh_digest_free
	cmp	r4, r5
	bcs	.L8
	mov	r6, r4
	str	fp, [sp, #4]
	b	.L11
.L23:
	mov	r1, r10
	bl	ssh_digest_update_buffer
	cmp	r0, #0
	bne	.L9
	mov	r1, r7
	mov	r0, fp
	ldr	r2, [sp, #56]
	bl	ssh_digest_update
	cmp	r0, #0
	bne	.L9
	mov	r2, r6
	mov	r1, r9
	mov	r0, fp
	bl	ssh_digest_update
	cmp	r0, #0
	bne	.L9
	mov	r2, r4
	mov	r0, fp
	add	r1, r9, r6
	bl	ssh_digest_final
	cmp	r0, #0
	bne	.L9
	mov	r0, fp
	add	r6, r6, r4
	bl	ssh_digest_free
	cmp	r5, r6
	bls	.L22
.L11:
	ldr	r0, [r8, #8]
	bl	ssh_digest_start
	subs	fp, r0, #0
	bne	.L23
.L9:
	mov	r6, fp
	b	.L18
.L22:
	ldr	fp, [sp, #4]
.L8:
	ldr	r3, [sp]
	str	r9, [r3]
	mov	r9, #0
	mov	r6, r9
	b	.L5
.L20:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.word	SSH_ERR_INVALID_ARGUMENT
	.word	SSH_ERR_ALLOC_FAIL
	.word	SSH_ERR_LIBCRYPTO_ERROR
	.size	derive_key, .-derive_key
	.comm	stderr,4,4
	.comm	SSH_ERR_LIBCRYPTO_ERROR,4,4
	.comm	SSH_ERR_INVALID_ARGUMENT,4,4
	.comm	SSH_ERR_ALLOC_FAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
