	.file	"extr_picotls.c_client_setup_esni.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	client_setup_esni, @function
client_setup_esni:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	mov	edi, 56
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, r8
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	malloc@PLT
	mov	QWORD PTR 0[rbp], rax
	test	rax, rax
	je	.L9
	mov	rdi, rax
	mov	edx, 56
	xor	esi, esi
	call	memset@PLT
	push	r12
	.cfi_def_cfa_offset 72
	mov	rax, QWORD PTR 0[rbp]
	mov	rdi, r13
	push	r14
	.cfi_def_cfa_offset 80
	lea	rcx, 24[rax]
	lea	rdx, 8[rax]
	lea	rsi, 52[rax]
	lea	r9, 32[rax]
	lea	r8, 16[rsp]
	call	parse_esni_keys@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR 0[rbp]
	mov	esi, 4
	mov	edi, DWORD PTR 48[rax]
	call	[QWORD PTR 0[r13]]
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, r12
	mov	ecx, r12d
	sar	rdx, 32
	mov	esi, DWORD PTR 16[rax]
	mov	rax, QWORD PTR 24[rax]
	mov	edi, DWORD PTR [rax]
	call	ptls_calc_hash@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	mov	rsi, QWORD PTR 0[rbp]
	mov	rcx, QWORD PTR [rsp]
	mov	rax, QWORD PTR 8[rsi]
	lea	rdx, 44[rsi]
	mov	rdi, rax
	call	[QWORD PTR [rax]]
	mov	r12d, eax
	test	eax, eax
	je	.L11
.L5:
	xor	esi, esi
	mov	rdi, rbp
	call	free_esni_secret@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r12d, DWORD PTR PTLS_ERROR_NO_MEMORY[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	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
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR 0[rbp]
	mov	r9, rbx
	mov	rdx, QWORD PTR 8[rax]
	mov	rdi, QWORD PTR 24[rax]
	mov	esi, DWORD PTR 40[rax]
	mov	r8d, DWORD PTR [rax]
	mov	ecx, DWORD PTR 8[rdx]
	mov	edi, DWORD PTR [rdi]
	mov	edx, DWORD PTR 16[rax]
	call	build_esni_contents_hash@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, QWORD PTR 0[rbp]
	xor	r12d, r12d
	call	free@PLT
	mov	QWORD PTR 0[rbp], 0
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	client_setup_esni, .-client_setup_esni
	.comm	PTLS_ERROR_NO_MEMORY,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_picotls.c_client_setup_esni.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	client_setup_esni, %function
client_setup_esni:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r1
	sub	sp, sp, #52
	ldr	r1, .L12
	mov	r8, r0
	add	r7, sp, #24
	mov	r0, #36
	ldr	r1, [r1]
	str	r1, [sp, #44]
	mov	r1,#0
	ldr	r9, [sp, #80]
	stm	r7, {r2, r3}
	ldr	r6, [sp, #84]
	bl	malloc
	cmp	r0, #0
	ldreq	r3, .L12+4
	str	r0, [r5]
	ldreq	r4, [r3]
	beq	.L1
	mov	r4, r0
	mov	r2, #36
	mov	r1, #0
	bl	memset
	ldm	r7, {r0, r1}
	add	r3, sp, #12
	add	ip, r4, #16
	add	r2, sp, #36
	stm	r3, {r0, r1}
	stm	sp, {r2, ip}
	mov	r0, r8
	add	r3, r4, #12
	str	r9, [sp, #8]
	add	r2, r4, #4
	add	r1, r4, #32
	bl	parse_esni_keys
	cmp	r0, #0
	bne	.L9
	ldr	r2, [r5]
	mov	r1, #4
	ldr	r3, [r8]
	ldr	r0, [r2, #28]
	blx	r3
	ldr	r2, [r5]
	ldr	r3, [sp, #24]
	ldr	r0, [r2, #12]
	ldr	r1, [r2, #8]
	ldr	r0, [r0]
	ldr	r2, [sp, #28]
	bl	ptls_calc_hash
	subs	r4, r0, #0
	bne	.L5
	ldr	r1, [r5]
	ldr	r3, [sp, #40]
	ldr	r0, [r1, #4]
	str	r3, [sp]
	ldr	r4, [r0]
	ldr	r3, [sp, #36]
	add	r2, r1, #24
	blx	r4
	subs	r4, r0, #0
	beq	.L10
.L5:
	mov	r0, r5
	mov	r1, #0
	bl	free_esni_secret
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r4
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	ldr	ip, [r5]
	ldr	r2, [ip, #12]
	ldr	r3, [ip, #4]
	ldr	r0, [r2]
	ldr	r1, [ip, #20]
	ldr	r2, [ip, #8]
	ldr	r3, [r3, #4]
	str	r6, [sp, #4]
	ldr	ip, [ip]
	str	ip, [sp]
	bl	build_esni_contents_hash
	subs	r4, r0, #0
	beq	.L1
	b	.L5
.L9:
	mov	r4, #0
	ldr	r0, [r5]
	bl	free
	str	r4, [r5]
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	PTLS_ERROR_NO_MEMORY
	.size	client_setup_esni, .-client_setup_esni
	.comm	PTLS_ERROR_NO_MEMORY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
