	.file	"extr_extensions_clnt.c_tls_construct_ctos_psk.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	tls_construct_ctos_psk
	.type	tls_construct_ctos_psk, @function
tls_construct_ctos_psk:
.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
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rcx, QWORD PTR TLS1_3_VERSION[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 24[rdi]
	mov	QWORD PTR 32[rdi], 0
	mov	QWORD PTR 40[rsp], 0
	mov	QWORD PTR 48[rsp], 0
	cmp	QWORD PTR [rax], rcx
	jne	.L105
	cmp	QWORD PTR 8[rax], 0
	mov	r12, rdi
	mov	rbp, rsi
	jne	.L3
	mov	r14, QWORD PTR 16[rdi]
	test	r14, r14
	je	.L105
	mov	rax, QWORD PTR SSL_HRR_PENDING[rip]
	cmp	QWORD PTR [rdi], rax
	je	.L35
	mov	DWORD PTR 4[rsp], 0
	xor	r15d, r15d
	xor	r13d, r13d
	xor	ebx, ebx
	mov	QWORD PTR 8[rsp], 0
.L13:
	mov	rax, QWORD PTR 32[r14]
	mov	edi, DWORD PTR [rax]
	call	ssl_md@PLT
	mov	r14, rax
	test	rax, rax
	je	.L16
	mov	rax, QWORD PTR SSL_HRR_PENDING[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L40
	cmp	rbx, r14
	jne	.L16
.L40:
	mov	rdi, r14
	call	EVP_MD_size@PLT
	mov	rbx, rax
.L14:
	mov	esi, DWORD PTR TLSEXT_TYPE_psk[rip]
	mov	rdi, rbp
	call	WPACKET_put_bytes_u16@PLT
	test	eax, eax
	je	.L27
	mov	rdi, rbp
	call	WPACKET_start_sub_packet_u16@PLT
	test	eax, eax
	je	.L27
	mov	rdi, rbp
	call	WPACKET_start_sub_packet_u16@PLT
	test	eax, eax
	je	.L27
	test	r15d, r15d
	jne	.L109
.L20:
	cmp	QWORD PTR 16[r12], 0
	je	.L23
	mov	rdx, QWORD PTR 8[r12]
	mov	esi, DWORD PTR 40[r12]
	mov	rdi, rbp
	call	WPACKET_sub_memcpy_u16@PLT
	test	eax, eax
	je	.L27
	xor	esi, esi
	mov	rdi, rbp
	call	WPACKET_put_bytes_u32@PLT
	test	eax, eax
	je	.L27
	add	QWORD PTR 32[r12], 1
.L23:
	mov	rdi, rbp
	call	WPACKET_close@PLT
	test	eax, eax
	je	.L27
	lea	rsi, 24[rsp]
	mov	rdi, rbp
	call	WPACKET_get_total_written@PLT
	test	eax, eax
	je	.L27
	mov	rdi, rbp
	call	WPACKET_start_sub_packet_u16@PLT
	test	eax, eax
	je	.L27
	test	r15d, r15d
	jne	.L28
.L31:
	cmp	QWORD PTR 16[r12], 0
	je	.L30
	lea	rdx, 48[rsp]
	mov	rsi, rbx
	mov	rdi, rbp
	call	WPACKET_sub_allocate_bytes_u8@PLT
	test	eax, eax
	je	.L27
.L30:
	mov	rdi, rbp
	call	WPACKET_close@PLT
	test	eax, eax
	je	.L27
	mov	rdi, rbp
	call	WPACKET_close@PLT
	test	eax, eax
	je	.L27
	lea	rsi, 32[rsp]
	mov	rdi, rbp
	call	WPACKET_get_total_written@PLT
	test	eax, eax
	je	.L27
	mov	rdi, rbp
	call	WPACKET_fill_lengths@PLT
	test	eax, eax
	je	.L27
	mov	rdi, rbp
	call	WPACKET_get_curr@PLT
	cdqe
	sub	rax, QWORD PTR 32[rsp]
	mov	rbx, rax
	test	r15d, r15d
	jne	.L110
.L33:
	mov	rax, QWORD PTR 16[r12]
	test	rax, rax
	je	.L34
	push	rdx
	.cfi_def_cfa_offset 136
	xor	r8d, r8d
	mov	rdx, rbx
	mov	rsi, r14
	push	1
	.cfi_def_cfa_offset 144
	mov	rdi, r12
	push	1
	.cfi_def_cfa_offset 152
	push	rax
	.cfi_def_cfa_offset 160
	mov	r9, QWORD PTR 80[rsp]
	mov	rcx, QWORD PTR 56[rsp]
	call	tls_psk_do_binder@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 128
	sub	eax, 1
	jne	.L107
.L34:
	mov	eax, DWORD PTR EXT_RETURN_SENT[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR SSL_HRR_PENDING[rip]
	cmp	QWORD PTR [rdi], rdx
	je	.L35
	xor	ebx, ebx
.L36:
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	je	.L27
	mov	edi, DWORD PTR [rax]
	call	ssl_md@PLT
	mov	r13, rax
	test	rax, rax
	je	.L103
	mov	rax, QWORD PTR SSL_HRR_PENDING[rip]
	cmp	QWORD PTR [r12], rax
	jne	.L10
	cmp	r13, rbx
	jne	.L103
.L10:
	xor	edi, edi
	call	time@PLT
	mov	rdx, QWORD PTR 24[r12]
	xor	ecx, ecx
	sub	eax, DWORD PTR 40[rdx]
	test	eax, eax
	setg	cl
	sub	eax, ecx
	cmp	DWORD PTR 16[rdx], eax
	jge	.L12
.L103:
	mov	r14, QWORD PTR 16[r12]
.L9:
	test	r14, r14
	jne	.L39
	.p2align 4,,10
	.p2align 3
.L105:
	mov	eax, DWORD PTR EXT_RETURN_NOT_SENT[rip]
.L1:
	mov	rbx, QWORD PTR 56[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L111
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L35:
	.cfi_restore_state
	mov	rdi, r12
	call	ssl_handshake_md@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR 24[r12]
	cmp	QWORD PTR 8[rax], 0
	jne	.L36
	mov	r14, QWORD PTR 16[r12]
	xor	r13d, r13d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L109:
	mov	rax, QWORD PTR 24[r12]
	mov	rdi, rbp
	mov	rdx, QWORD PTR 8[rax]
	mov	esi, DWORD PTR 20[rax]
	call	WPACKET_sub_memcpy_u16@PLT
	test	eax, eax
	je	.L27
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	call	WPACKET_put_bytes_u32@PLT
	test	eax, eax
	jne	.L20
	.p2align 4,,10
	.p2align 3
.L27:
	mov	ecx, DWORD PTR ERR_R_INTERNAL_ERROR[rip]
.L106:
	mov	edx, DWORD PTR SSL_F_TLS_CONSTRUCT_CTOS_PSK[rip]
	mov	esi, DWORD PTR SSL_AD_INTERNAL_ERROR[rip]
	mov	rdi, r12
	call	SSLfatal@PLT
.L107:
	mov	eax, DWORD PTR EXT_RETURN_FAIL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	imul	eax, eax, 1000
	mov	rdi, r13
	add	eax, DWORD PTR 24[rdx]
	mov	r15d, 1
	mov	DWORD PTR 4[rsp], eax
	call	EVP_MD_size@PLT
	mov	r14, QWORD PTR 16[r12]
	add	QWORD PTR 32[r12], 1
	mov	QWORD PTR 8[rsp], rax
	test	r14, r14
	jne	.L13
	xor	ebx, ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L16:
	mov	ecx, DWORD PTR SSL_R_BAD_PSK[rip]
	jmp	.L106
.L39:
	mov	QWORD PTR 8[rsp], 0
	xor	r15d, r15d
	mov	DWORD PTR 4[rsp], 0
	jmp	.L13
.L28:
	mov	rsi, QWORD PTR 8[rsp]
	lea	rdx, 40[rsp]
	mov	rdi, rbp
	call	WPACKET_sub_allocate_bytes_u8@PLT
	test	eax, eax
	jne	.L31
	jmp	.L27
.L111:
	call	__stack_chk_fail@PLT
.L110:
	push	rcx
	.cfi_def_cfa_offset 136
	xor	r8d, r8d
	mov	rdx, rax
	mov	rsi, r13
	push	0
	.cfi_def_cfa_offset 144
	mov	rdi, r12
	push	1
	.cfi_def_cfa_offset 152
	push	QWORD PTR 24[r12]
	.cfi_def_cfa_offset 160
	mov	r9, QWORD PTR 72[rsp]
	mov	rcx, QWORD PTR 56[rsp]
	call	tls_psk_do_binder@PLT
	add	rsp, 32
	.cfi_def_cfa_offset 128
	sub	eax, 1
	je	.L33
	jmp	.L107
	.cfi_endproc
.LFE0:
	.size	tls_construct_ctos_psk, .-tls_construct_ctos_psk
	.comm	TLSEXT_TYPE_psk,4,4
	.comm	TLS1_3_VERSION,8,8
	.comm	SSL_R_BAD_PSK,4,4
	.comm	SSL_HRR_PENDING,8,8
	.comm	SSL_F_TLS_CONSTRUCT_CTOS_PSK,4,4
	.comm	SSL_AD_INTERNAL_ERROR,4,4
	.comm	EXT_RETURN_SENT,4,4
	.comm	EXT_RETURN_NOT_SENT,4,4
	.comm	EXT_RETURN_FAIL,4,4
	.comm	ERR_R_INTERNAL_ERROR,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_extensions_clnt.c_tls_construct_ctos_psk.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	tls_construct_ctos_psk
	.syntax unified
	.arm
	.fpu softvfp
	.type	tls_construct_ctos_psk, %function
tls_construct_ctos_psk:
	@ args = 4, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r3, #0
	mov	r4, r0
	ldr	r2, [r0, #12]
	ldr	r0, .L103
	ldr	ip, [r2]
	ldr	r0, [r0]
	mov	r6, r1
	ldr	r1, .L103+4
	sub	sp, sp, #60
	cmp	ip, r0
	ldr	r1, [r1]
	str	r1, [sp, #52]
	mov	r1,#0
	str	r3, [r4, #16]
	str	r3, [sp, #44]
	str	r3, [sp, #48]
	bne	.L96
	ldr	r8, [r2, #4]
	cmp	r8, r3
	bne	.L3
	ldr	r7, [r4, #8]
	cmp	r7, r3
	beq	.L96
	ldr	r10, .L103+8
	ldr	r2, [r4]
	ldr	r3, [r10]
	cmp	r2, r3
	beq	.L34
	mov	fp, r8
	mov	r9, r8
	mov	r5, r8
	str	r8, [sp, #28]
.L13:
	ldr	r3, [r7, #20]
	ldr	r0, [r3]
	bl	ssl_md
	subs	r7, r0, #0
	beq	.L16
	ldr	r2, [r10]
	ldr	r3, [r4]
	cmp	r5, r7
	sub	r3, r3, r2
	clz	r3, r3
	lsr	r3, r3, #5
	moveq	r3, #0
	cmp	r3, #0
	bne	.L16
	bl	EVP_MD_size
	mov	r5, r0
	b	.L14
.L3:
	ldr	r10, .L103+8
	ldr	ip, [r4]
	ldr	r0, [r10]
	cmp	ip, r0
	movne	r5, r3
	bne	.L35
.L34:
	mov	r0, r4
	bl	ssl_handshake_md
	ldr	r2, [r4, #12]
	mov	r5, r0
	ldr	r9, [r2, #4]
	cmp	r9, #0
	bne	.L35
.L6:
	ldr	r7, [r4, #8]
	cmp	r7, #0
	bne	.L38
.L96:
	ldr	r3, .L103+12
	ldr	r0, [r3]
.L1:
	ldr	r3, .L103+4
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L100
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L35:
	ldr	r3, [r2, #20]
	cmp	r3, #0
	beq	.L26
	ldr	r0, [r3]
	bl	ssl_md
	subs	r9, r0, #0
	beq	.L6
	ldr	r0, [r4]
	ldr	r3, [r10]
	cmp	r9, r5
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	moveq	r0, #0
	cmp	r0, #0
	bne	.L6
	bl	time
	ldr	r3, [r4, #12]
	ldr	r8, [r3, #24]
	ldr	r2, [r3, #8]
	sub	r0, r0, r8
	cmp	r0, #0
	subgt	r0, r0, #1
	cmp	r2, r0
	blt	.L6
	ldr	r3, [r3, #16]
	rsb	r8, r0, r0, lsl #5
	add	r8, r0, r8, lsl #2
	mov	r0, r9
	add	r8, r3, r8, lsl #3
	bl	EVP_MD_size
	ldr	r3, [r4, #16]
	ldr	r7, [r4, #8]
	add	r3, r3, #1
	cmp	r7, #0
	mov	fp, #1
	moveq	r5, r7
	str	r0, [sp, #28]
	str	r3, [r4, #16]
	bne	.L13
.L14:
	ldr	r3, .L103+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	WPACKET_put_bytes_u16
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	bl	WPACKET_start_sub_packet_u16
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	bl	WPACKET_start_sub_packet_u16
	cmp	r0, #0
	beq	.L26
	cmp	fp, #0
	bne	.L101
.L19:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L22
	mov	r0, r6
	ldr	r2, [r4, #4]
	ldr	r1, [r4, #20]
	bl	WPACKET_sub_memcpy_u16
	cmp	r0, #0
	beq	.L26
	mov	r1, #0
	mov	r0, r6
	bl	WPACKET_put_bytes_u32
	cmp	r0, #0
	beq	.L26
	ldr	r3, [r4, #16]
	add	r3, r3, #1
	str	r3, [r4, #16]
.L22:
	mov	r0, r6
	bl	WPACKET_close
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	add	r1, sp, #36
	bl	WPACKET_get_total_written
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	bl	WPACKET_start_sub_packet_u16
	cmp	r0, #0
	beq	.L26
	cmp	fp, #0
	bne	.L27
.L30:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L29
	mov	r1, r5
	mov	r0, r6
	add	r2, sp, #48
	bl	WPACKET_sub_allocate_bytes_u8
	cmp	r0, #0
	beq	.L26
.L29:
	mov	r0, r6
	bl	WPACKET_close
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	bl	WPACKET_close
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	add	r1, sp, #40
	bl	WPACKET_get_total_written
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	bl	WPACKET_fill_lengths
	cmp	r0, #0
	beq	.L26
	mov	r0, r6
	bl	WPACKET_get_curr
	ldr	r3, [sp, #40]
	cmp	fp, #0
	sub	r5, r0, r3
	bne	.L102
.L32:
	ldr	r2, [r4, #8]
	cmp	r2, #0
	beq	.L33
	mov	r3, #1
	mov	lr, #0
	ldr	ip, [sp, #48]
	str	r2, [sp, #8]
	str	r3, [sp, #16]
	str	r3, [sp, #12]
	mov	r2, r5
	mov	r1, r7
	mov	r0, r4
	ldr	r3, [sp, #36]
	str	lr, [sp]
	str	ip, [sp, #4]
	bl	tls_psk_do_binder
	cmp	r0, #1
	bne	.L98
.L33:
	ldr	r3, .L103+20
	ldr	r0, [r3]
	b	.L1
.L101:
	ldr	r3, [r4, #12]
	mov	r0, r6
	ldr	r2, [r3, #4]
	ldr	r1, [r3, #12]
	bl	WPACKET_sub_memcpy_u16
	cmp	r0, #0
	beq	.L26
	mov	r1, r8
	mov	r0, r6
	bl	WPACKET_put_bytes_u32
	cmp	r0, #0
	bne	.L19
.L26:
	ldr	r3, .L103+24
.L97:
	ldr	r2, .L103+28
	ldr	r1, .L103+32
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	bl	SSLfatal
.L98:
	ldr	r3, .L103+36
	ldr	r0, [r3]
	b	.L1
.L16:
	ldr	r3, .L103+40
	b	.L97
.L38:
	mov	fp, #0
	mov	r8, fp
	str	fp, [sp, #28]
	b	.L13
.L27:
	mov	r0, r6
	ldr	r1, [sp, #28]
	add	r2, sp, #44
	bl	WPACKET_sub_allocate_bytes_u8
	cmp	r0, #0
	bne	.L30
	b	.L26
.L100:
	bl	__stack_chk_fail
.L102:
	mov	r3, #0
	mov	ip, #1
	ldr	r0, [r4, #12]
	ldr	r2, [sp, #44]
	str	r3, [sp, #16]
	str	r3, [sp]
	str	r0, [sp, #8]
	str	r2, [sp, #4]
	mov	r1, r9
	mov	r2, r5
	mov	r0, r4
	ldr	r3, [sp, #36]
	str	ip, [sp, #12]
	bl	tls_psk_do_binder
	cmp	r0, #1
	beq	.L32
	b	.L98
.L104:
	.align	2
.L103:
	.word	TLS1_3_VERSION
	.word	.LC0
	.word	SSL_HRR_PENDING
	.word	EXT_RETURN_NOT_SENT
	.word	TLSEXT_TYPE_psk
	.word	EXT_RETURN_SENT
	.word	ERR_R_INTERNAL_ERROR
	.word	SSL_F_TLS_CONSTRUCT_CTOS_PSK
	.word	SSL_AD_INTERNAL_ERROR
	.word	EXT_RETURN_FAIL
	.word	SSL_R_BAD_PSK
	.size	tls_construct_ctos_psk, .-tls_construct_ctos_psk
	.comm	TLSEXT_TYPE_psk,4,4
	.comm	TLS1_3_VERSION,4,4
	.comm	SSL_R_BAD_PSK,4,4
	.comm	SSL_HRR_PENDING,4,4
	.comm	SSL_F_TLS_CONSTRUCT_CTOS_PSK,4,4
	.comm	SSL_AD_INTERNAL_ERROR,4,4
	.comm	EXT_RETURN_SENT,4,4
	.comm	EXT_RETURN_NOT_SENT,4,4
	.comm	EXT_RETURN_FAIL,4,4
	.comm	ERR_R_INTERNAL_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
