	.file	"extr_taclib.c_conn_server.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Cannot create socket: %s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Cannot set non-blocking mode on socket: %s"
	.section	.rodata.str1.1
.LC2:
	.string	"select: %s"
.LC3:
	.string	"connect: timed out"
.LC4:
	.string	"getpeername: %s"
.LC5:
	.string	"connect: %s"
	.text
	.p2align 4
	.type	conn_server, @function
conn_server:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 64
	.cfi_def_cfa_offset 96
	mov	rdx, QWORD PTR [rdi]
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR PF_INET[rip]
	lea	rbx, [rax+rdx*8]
	mov	edx, DWORD PTR IPPROTO_TCP[rip]
	call	socket@PLT
	mov	DWORD PTR 8[rbp], eax
	mov	r12d, eax
	cmp	eax, -1
	je	.L22
	mov	esi, DWORD PTR F_GETFL[rip]
	xor	edx, edx
	mov	edi, eax
	call	fcntl@PLT
	cmp	eax, -1
	je	.L5
	or	eax, DWORD PTR O_NONBLOCK[rip]
	mov	edi, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR F_SETFL[rip]
	mov	edx, eax
	call	fcntl@PLT
	cmp	eax, -1
	je	.L5
	mov	edi, DWORD PTR 8[rbp]
	lea	rsi, 4[rbx]
	mov	edx, 4
	xor	r12d, r12d
	call	connect@PLT
	test	rax, rax
	je	.L1
	mov	edi, DWORD PTR errno[rip]
	cmp	edi, DWORD PTR EINPROGRESS[rip]
	jne	.L6
	lea	r12, 12[rsp]
	mov	rdi, r12
	call	FD_ZERO@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	rsi, r12
	call	FD_SET@PLT
	mov	eax, DWORD PTR [rbx]
	mov	rdx, r12
	lea	r8, 32[rsp]
	mov	QWORD PTR 32[rsp], 0
	xor	ecx, ecx
	xor	esi, esi
	mov	DWORD PTR 40[rsp], eax
	mov	eax, DWORD PTR 8[rbp]
	lea	edi, 1[rax]
	call	select@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L23
	test	eax, eax
	je	.L24
	mov	edi, DWORD PTR 8[rbp]
	lea	rdx, 24[rsp]
	lea	rsi, 16[rsp]
	xor	r12d, r12d
	mov	DWORD PTR 24[rsp], 4
	call	getpeername@PLT
	test	rax, rax
	je	.L1
	mov	edi, DWORD PTR errno[rip]
	cmp	edi, DWORD PTR ENOTCONN[rip]
	je	.L10
	call	strerror@PLT
	lea	rsi, .LC4[rip]
	mov	edx, eax
.L20:
	mov	rdi, rbp
	xor	eax, eax
	mov	r12d, -1
	call	generr@PLT
	mov	edi, DWORD PTR 8[rbp]
	call	close@PLT
	mov	DWORD PTR 8[rbp], -1
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	xor	eax, eax
	mov	r12d, -1
	call	generr@PLT
	mov	edi, DWORD PTR 8[rbp]
	call	close@PLT
	mov	DWORD PTR 8[rbp], -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	lea	rsi, .LC2[rip]
	mov	rdi, rbp
	mov	edx, eax
	xor	eax, eax
	call	generr@PLT
	mov	edi, DWORD PTR 8[rbp]
	call	close@PLT
	mov	DWORD PTR 8[rbp], -1
	jmp	.L1
.L10:
	mov	edi, DWORD PTR 8[rbp]
	mov	edx, DWORD PTR SO_ERROR[rip]
	lea	rcx, 28[rsp]
	lea	r8, 20[rsp]
	mov	esi, DWORD PTR SOL_SOCKET[rip]
	mov	DWORD PTR 20[rsp], 4
	call	getsockopt@PLT
	mov	edi, DWORD PTR 28[rsp]
	mov	DWORD PTR errno[rip], edi
	.p2align 4,,10
	.p2align 3
.L6:
	call	strerror@PLT
	lea	rsi, .LC5[rip]
	mov	edx, eax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	lea	rsi, .LC1[rip]
	mov	edx, eax
	jmp	.L20
.L22:
	mov	edi, DWORD PTR errno[rip]
	call	strerror@PLT
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	mov	edx, eax
	xor	eax, eax
	call	generr@PLT
	jmp	.L1
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	conn_server, .-conn_server
	.comm	errno,4,4
	.comm	SO_ERROR,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	PF_INET,4,4
	.comm	O_NONBLOCK,4,4
	.comm	IPPROTO_TCP,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,4,4
	.comm	ENOTCONN,4,4
	.comm	EINPROGRESS,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_taclib.c_conn_server.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Cannot create socket: %s\000"
	.align	2
.LC1:
	.ascii	"Cannot set non-blocking mode on socket: %s\000"
	.align	2
.LC2:
	.ascii	"select: %s\000"
	.align	2
.LC3:
	.ascii	"connect: timed out\000"
	.align	2
.LC4:
	.ascii	"getpeername: %s\000"
	.align	2
.LC5:
	.ascii	"connect: %s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	conn_server, %function
conn_server:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	ldr	r3, .L29
	ldr	r2, .L29+4
	ldr	r1, .L29+8
	ldr	r0, [r3]
	ldr	r3, .L29+12
	sub	sp, sp, #40
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r7, [r5]
	ldr	r6, [r5, #8]
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	socket
	cmn	r0, #1
	add	r8, r6, r7, lsl #3
	str	r0, [r5, #4]
	beq	.L25
	ldr	r3, .L29+16
	mov	r2, #0
	ldr	r1, [r3]
	bl	fcntl
	cmn	r0, #1
	beq	.L5
	ldr	r2, .L29+20
	ldr	r3, .L29+24
	ldr	r2, [r2]
	ldr	r1, [r3]
	orr	r2, r0, r2
	ldr	r0, [r5, #4]
	bl	fcntl
	cmn	r0, #1
	beq	.L5
	mov	r2, #4
	ldr	r0, [r5, #4]
	add	r1, r8, #4
	bl	connect
	subs	r4, r0, #0
	beq	.L1
	ldr	r8, .L29+28
	ldr	r3, .L29+32
	ldr	r0, [r8]
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L6
	add	r0, sp, #8
	bl	FD_ZERO
	add	r1, sp, #8
	ldr	r0, [r5, #4]
	bl	FD_SET
	mov	r3, #0
	ldr	r0, [r5, #4]
	ldr	ip, [r6, r7, lsl #3]
	add	r1, sp, #28
	str	r1, [sp]
	add	r2, sp, #8
	mov	r1, r3
	add	r0, r0, #1
	str	ip, [sp, #32]
	str	r3, [sp, #28]
	bl	select
	cmn	r0, #1
	mov	r4, r0
	beq	.L26
	cmp	r0, #0
	beq	.L27
	mov	r6, #4
	ldr	r0, [r5, #4]
	add	r2, sp, #20
	add	r1, sp, #12
	str	r6, [sp, #20]
	bl	getpeername
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, .L29+36
	ldr	r0, [r8]
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L10
	bl	strerror
	mov	r2, r0
	ldr	r1, .L29+40
.L23:
	mov	r0, r5
	bl	generr
.L22:
	ldr	r0, [r5, #4]
	bl	close
	mvn	r0, #0
	mov	r4, r0
	str	r0, [r5, #4]
.L1:
	ldr	r3, .L29+12
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L28
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L27:
	mov	r0, r5
	ldr	r1, .L29+44
	bl	generr
	b	.L22
.L26:
	ldr	r0, [r8]
	bl	strerror
	ldr	r1, .L29+48
	mov	r2, r0
	mov	r0, r5
	bl	generr
	ldr	r0, [r5, #4]
	bl	close
	str	r4, [r5, #4]
	b	.L1
.L10:
	ldr	r2, .L29+52
	ldr	r1, .L29+56
	add	r3, sp, #16
	ldr	r2, [r2]
	ldr	r1, [r1]
	str	r3, [sp]
	ldr	r0, [r5, #4]
	add	r3, sp, #24
	str	r6, [sp, #16]
	bl	getsockopt
	ldr	r0, [sp, #24]
	str	r0, [r8]
.L6:
	bl	strerror
	ldr	r1, .L29+60
	mov	r2, r0
	mov	r0, r5
	bl	generr
	ldr	r0, [r5, #4]
	bl	close
	mvn	r3, #0
	mov	r4, r3
	str	r3, [r5, #4]
	b	.L1
.L5:
	ldr	r3, .L29+28
	ldr	r0, [r3]
	bl	strerror
	ldr	r1, .L29+64
	mov	r2, r0
	b	.L23
.L25:
	ldr	r3, .L29+28
	mov	r4, r0
	ldr	r0, [r3]
	bl	strerror
	ldr	r1, .L29+68
	mov	r2, r0
	mov	r0, r5
	bl	generr
	b	.L1
.L28:
	bl	__stack_chk_fail
.L30:
	.align	2
.L29:
	.word	PF_INET
	.word	IPPROTO_TCP
	.word	SOCK_STREAM
	.word	.LC6
	.word	F_GETFL
	.word	O_NONBLOCK
	.word	F_SETFL
	.word	errno
	.word	EINPROGRESS
	.word	ENOTCONN
	.word	.LC4
	.word	.LC3
	.word	.LC2
	.word	SO_ERROR
	.word	SOL_SOCKET
	.word	.LC5
	.word	.LC1
	.word	.LC0
	.size	conn_server, .-conn_server
	.comm	errno,4,4
	.comm	SO_ERROR,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	PF_INET,4,4
	.comm	O_NONBLOCK,4,4
	.comm	IPPROTO_TCP,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,4,4
	.comm	ENOTCONN,4,4
	.comm	EINPROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
