	.file	"extr_proto_tls.c_tls_connect_wait.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Connection terminated."
	.text
	.p2align 4
	.type	tls_connect_wait, @function
tls_connect_wait:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	setne	dil
	movzx	edi, dil
	call	PJDLOG_ASSERT@PLT
	mov	rax, QWORD PTR TLS_CTX_MAGIC[rip]
	xor	edi, edi
	cmp	QWORD PTR [rbx], rax
	sete	dil
	call	PJDLOG_ASSERT@PLT
	mov	rax, QWORD PTR TLS_SIDE_CLIENT[rip]
	xor	edi, edi
	cmp	QWORD PTR 8[rbx], rax
	sete	dil
	call	PJDLOG_ASSERT@PLT
	xor	edi, edi
	cmp	QWORD PTR 24[rbx], 0
	setne	dil
	call	PJDLOG_ASSERT@PLT
	mov	eax, DWORD PTR 16[rbx]
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	PJDLOG_ASSERT@PLT
	mov	edi, r12d
	not	edi
	shr	edi, 31
	call	PJDLOG_ASSERT@PLT
	mov	rdi, QWORD PTR 24[rbx]
	call	proto_descriptor@PLT
	mov	esi, r12d
	mov	edi, eax
	mov	ebp, eax
	call	wait_for_fd@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	lea	r13, 4[rsp]
.L7:
	mov	ecx, DWORD PTR MSG_WAITALL[rip]
	mov	edx, 4
	mov	rsi, r13
	mov	edi, ebp
	call	recv@PLT
	test	eax, eax
	je	.L3
	cmp	eax, 1
	je	.L4
	cmp	eax, -1
	je	.L10
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR errno[rip]
	cmp	eax, DWORD PTR EINTR[rip]
	je	.L7
	cmp	eax, DWORD PTR ENOBUFS[rip]
	je	.L7
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	DWORD PTR 16[rbx], 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	pjdlog_debug@PLT
	mov	r12d, DWORD PTR ENOTCONN[rip]
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tls_connect_wait, .-tls_connect_wait
	.comm	errno,4,4
	.comm	TLS_SIDE_CLIENT,8,8
	.comm	TLS_CTX_MAGIC,8,8
	.comm	MSG_WAITALL,4,4
	.comm	ENOTCONN,4,4
	.comm	ENOBUFS,4,4
	.comm	EINTR,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_proto_tls.c_tls_connect_wait.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Connection terminated.\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tls_connect_wait, %function
tls_connect_wait:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r3, .L12
	subs	r0, r0, #0
	sub	sp, sp, #8
	movne	r0, #1
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	PJDLOG_ASSERT
	ldr	r3, .L12+4
	ldr	r0, [r4]
	ldr	r3, [r3]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	PJDLOG_ASSERT
	ldr	r3, .L12+8
	ldr	r0, [r4, #4]
	ldr	r3, [r3]
	sub	r0, r0, r3
	clz	r0, r0
	lsr	r0, r0, #5
	bl	PJDLOG_ASSERT
	ldr	r0, [r4, #12]
	subs	r0, r0, #0
	movne	r0, #1
	bl	PJDLOG_ASSERT
	ldr	r0, [r4, #8]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	PJDLOG_ASSERT
	mvn	r0, r5
	lsr	r0, r0, #31
	bl	PJDLOG_ASSERT
	ldr	r0, [r4, #12]
	bl	proto_descriptor
	mov	r1, r5
	mov	r6, r0
	bl	wait_for_fd
	subs	r5, r0, #0
	bne	.L1
	ldr	r7, .L12+12
	ldr	r9, .L12+16
	ldr	r8, .L12+20
	ldr	r10, .L12+24
.L7:
	ldr	r3, [r7]
	mov	r2, #4
	mov	r1, sp
	mov	r0, r6
	bl	recv
	subs	r3, r0, #0
	beq	.L3
	cmp	r3, #1
	beq	.L4
	cmn	r3, #1
	beq	.L10
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	ldr	r3, [r9]
	ldr	r2, [r8]
	cmp	r3, r2
	beq	.L7
	ldr	r2, [r10]
	cmp	r3, r2
	beq	.L7
	mov	r5, r3
	b	.L1
.L4:
	str	r3, [r4, #8]
	b	.L1
.L3:
	mov	r0, #1
	ldr	r1, .L12+28
	bl	pjdlog_debug
	ldr	r3, .L12+32
	ldr	r5, [r3]
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC1
	.word	TLS_CTX_MAGIC
	.word	TLS_SIDE_CLIENT
	.word	MSG_WAITALL
	.word	errno
	.word	EINTR
	.word	ENOBUFS
	.word	.LC0
	.word	ENOTCONN
	.size	tls_connect_wait, .-tls_connect_wait
	.comm	errno,4,4
	.comm	TLS_SIDE_CLIENT,4,4
	.comm	TLS_CTX_MAGIC,4,4
	.comm	MSG_WAITALL,4,4
	.comm	ENOTCONN,4,4
	.comm	ENOBUFS,4,4
	.comm	EINTR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
