	.file	"extr_tls13_enc.c_tls13_export_keying_material_early.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	tls13_export_keying_material_early
	.type	tls13_export_keying_material_early, @function
tls13_export_keying_material_early:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rcx
	push	r13
	.cfi_offset 13, -40
	mov	r13, r9
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -56
	mov	QWORD PTR -88[rbp], rdx
	mov	QWORD PTR -80[rbp], rsi
	mov	rbx, rsp
	mov	QWORD PTR -72[rbp], r8
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR EVP_MAX_MD_SIZE[rip]
	add	rax, 15
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rbx, rcx
	mov	rcx, rbx
	cmp	rsp, rcx
	je	.L3
.L34:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L34
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L35
.L4:
	mov	rcx, rax
	mov	rbx, rsp
	mov	rdx, rax
	mov	QWORD PTR -96[rbp], rsp
	and	rcx, -4096
	and	rdx, -16
	sub	rbx, rcx
	mov	rcx, rbx
	cmp	rsp, rcx
	je	.L6
.L36:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L36
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L37
.L7:
	mov	rdx, rax
	mov	rsi, rsp
	and	rax, -4096
	mov	QWORD PTR -104[rbp], rsp
	sub	rsi, rax
	and	rdx, -16
	mov	rax, rsi
	cmp	rsp, rax
	je	.L9
.L38:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L38
.L9:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L10
	or	QWORD PTR -8[rsp+rdx], 0
.L10:
	xor	eax, eax
	mov	QWORD PTR -112[rbp], rsp
	call	EVP_MD_CTX_new@PLT
	mov	r15, rax
	test	rax, rax
	je	.L13
	mov	rdi, r12
	call	ossl_statem_export_early_allowed@PLT
	test	eax, eax
	je	.L13
	mov	eax, DWORD PTR 32[r12]
	mov	rdi, QWORD PTR 16[r12]
	test	eax, eax
	jne	.L14
	cmp	QWORD PTR [r12], 0
	jle	.L14
	cmp	QWORD PTR [rdi], 0
	je	.L39
.L14:
	call	SSL_SESSION_get0_cipher@PLT
.L15:
	mov	edi, DWORD PTR [rax]
	call	ssl_md@PLT
	xor	edx, edx
	mov	rdi, r15
	mov	rsi, rax
	mov	rbx, rax
	call	EVP_DigestInit_ex@PLT
	test	rax, rax
	jle	.L13
	mov	rdx, QWORD PTR 16[rbp]
	mov	rsi, r13
	mov	rdi, r15
	call	EVP_DigestUpdate@PLT
	test	rax, rax
	jle	.L13
	mov	r13, QWORD PTR -104[rbp]
	lea	rdx, -64[rbp]
	mov	rdi, r15
	mov	rsi, r13
	call	EVP_DigestFinal_ex@PLT
	test	rax, rax
	jle	.L13
	xor	edx, edx
	mov	rsi, rbx
	mov	rdi, r15
	call	EVP_DigestInit_ex@PLT
	test	rax, rax
	jle	.L13
	mov	rsi, QWORD PTR -112[rbp]
	lea	rdx, -60[rbp]
	mov	rdi, r15
	call	EVP_DigestFinal_ex@PLT
	test	rax, rax
	jle	.L13
	mov	eax, DWORD PTR -64[rbp]
	mov	rdx, QWORD PTR 8[r12]
	push	0
	mov	rcx, r14
	mov	r9, QWORD PTR -112[rbp]
	mov	r8d, DWORD PTR -72[rbp]
	mov	rsi, rbx
	mov	rdi, r12
	push	rax
	mov	eax, DWORD PTR -60[rbp]
	push	QWORD PTR -96[rbp]
	push	rax
	call	tls13_hkdf_expand@PLT
	add	rsp, 32
	test	eax, eax
	je	.L13
	mov	eax, DWORD PTR -64[rbp]
	push	0
	mov	rdi, r12
	mov	r9, r13
	push	QWORD PTR -88[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	mov	r8d, 8
	mov	rsi, rbx
	push	QWORD PTR -80[rbp]
	lea	rcx, exporterlabel.1978[rip]
	xor	r12d, r12d
	push	rax
	call	tls13_hkdf_expand@PLT
	add	rsp, 32
	test	eax, eax
	setne	r12b
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, r15
	call	EVP_MD_CTX_free@PLT
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L40
	lea	rsp, -40[rbp]
	mov	eax, r12d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L37:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	xor	r12d, r12d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L39:
	mov	rdi, QWORD PTR 24[r12]
	call	SSL_SESSION_get0_cipher@PLT
	jmp	.L15
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tls13_export_keying_material_early, .-tls13_export_keying_material_early
	.section	.rodata
	.align 8
	.type	exporterlabel.1978, @object
	.size	exporterlabel.1978, 9
exporterlabel.1978:
	.string	"exporter"
	.comm	EVP_MAX_MD_SIZE,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_tls13_enc.c_tls13_export_keying_material_early.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	tls13_export_keying_material_early
	.syntax unified
	.arm
	.fpu softvfp
	.type	tls13_export_keying_material_early, %function
tls13_export_keying_material_early:
	@ args = 12, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #60
	ldr	ip, .L18
	mov	r5, r0
	ldr	r0, [ip]
	str	r1, [fp, #-60]
	add	r1, r0, #7
	bic	r1, r1, #7
	sub	sp, sp, r1
	str	r3, [fp, #-56]
	add	r10, sp, #24
	ldr	r3, .L18+4
	sub	sp, sp, r1
	str	r2, [fp, #-64]
	add	r8, sp, #24
	sub	sp, sp, r1
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	ldr	r7, [fp, #8]
	bl	EVP_MD_CTX_new
	subs	r4, r0, #0
	beq	.L4
	mov	r0, r5
	bl	ossl_statem_export_early_allowed
	cmp	r0, #0
	beq	.L4
	ldr	r3, [r5, #16]
	ldr	r0, [r5, #8]
	cmp	r3, #0
	add	r9, sp, #24
	bne	.L5
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L5
	ldr	r3, [r0]
	cmp	r3, #0
	bne	.L5
	ldr	r0, [r5, #12]
	bl	SSL_SESSION_get0_cipher
	b	.L6
.L5:
	bl	SSL_SESSION_get0_cipher
.L6:
	ldr	r0, [r0]
	bl	ssl_md
	mov	r2, #0
	mov	r1, r0
	mov	r6, r0
	mov	r0, r4
	bl	EVP_DigestInit_ex
	cmp	r0, #0
	ble	.L4
	mov	r1, r7
	mov	r0, r4
	ldr	r2, [fp, #12]
	bl	EVP_DigestUpdate
	cmp	r0, #0
	ble	.L4
	mov	r1, r8
	mov	r0, r4
	sub	r2, fp, #48
	bl	EVP_DigestFinal_ex
	cmp	r0, #0
	ble	.L4
	mov	r2, #0
	mov	r1, r6
	mov	r0, r4
	bl	EVP_DigestInit_ex
	cmp	r0, #0
	ble	.L4
	mov	r1, r9
	mov	r0, r4
	sub	r2, fp, #44
	bl	EVP_DigestFinal_ex
	cmp	r0, #0
	bgt	.L16
.L4:
	mov	r5, #0
.L3:
	mov	r0, r4
	bl	EVP_MD_CTX_free
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r7, #0
	ldr	r1, [fp, #-48]
	ldr	r2, [fp, #-44]
	ldr	r3, [fp, #4]
	str	r1, [sp, #16]
	str	r3, [sp]
	str	r10, [sp, #12]
	str	r9, [sp, #4]
	str	r7, [sp, #20]
	str	r2, [sp, #8]
	mov	r1, r6
	mov	r0, r5
	ldr	r3, [fp, #-56]
	ldr	r2, [r5, #4]
	bl	tls13_hkdf_expand
	cmp	r0, r7
	beq	.L4
	mov	ip, #8
	ldr	r2, [fp, #-64]
	ldr	r3, [fp, #-48]
	str	r2, [sp, #16]
	ldr	r2, [fp, #-60]
	mov	r0, r5
	str	r2, [sp, #12]
	str	r3, [sp, #8]
	mov	r2, r10
	mov	r1, r6
	ldr	r3, .L18+8
	str	r7, [sp, #20]
	str	r8, [sp, #4]
	str	ip, [sp]
	bl	tls13_hkdf_expand
	subs	r5, r0, r7
	movne	r5, #1
	b	.L3
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	EVP_MAX_MD_SIZE
	.word	.LC0
	.word	.LANCHOR0
	.size	tls13_export_keying_material_early, .-tls13_export_keying_material_early
	.comm	EVP_MAX_MD_SIZE,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	exporterlabel.4262, %object
	.size	exporterlabel.4262, 9
exporterlabel.4262:
	.ascii	"exporter\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
