	.file	"extr_1813.c_do_connect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"gethostbyname() failed"
.LC1:
	.string	"socket() failed"
.LC2:
	.string	"connect() failed"
	.text
	.p2align 4
	.globl	do_connect
	.type	do_connect, @function
do_connect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, esi
	lea	rsi, addr.1954[rip+8]
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	inet_aton@PLT
	test	eax, eax
	jne	.L2
	cmp	DWORD PTR done.1955[rip], 1
	jne	.L10
.L2:
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, DWORD PTR PF_INET[rip]
	xor	edx, edx
	call	socket@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L11
	mov	edi, ebx
	call	htons@PLT
	mov	edx, 12
	lea	rsi, addr.1954[rip]
	mov	edi, r12d
	mov	DWORD PTR addr.1954[rip+4], eax
	mov	eax, DWORD PTR AF_INET[rip]
	mov	DWORD PTR addr.1954[rip], eax
	call	connect@PLT
	cmp	eax, -1
	je	.L12
	mov	DWORD PTR done.1955[rip], 1
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, r12
	call	gethostbyname@PLT
	test	rax, rax
	je	.L13
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR addr.1954[rip+8], eax
	jmp	.L2
.L11:
	mov	edi, -1
	call	close@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	jmp	.L1
.L12:
	mov	edi, r12d
	mov	r12d, -1
	call	close@PLT
	cmp	DWORD PTR POP3PORT[rip], ebx
	jne	.L1
	lea	rdi, .LC2[rip]
	call	perror@PLT
	jmp	.L1
.L13:
	lea	rdi, .LC0[rip]
	or	r12d, -1
	call	perror@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	do_connect, .-do_connect
	.local	done.1955
	.comm	done.1955,4,4
	.local	addr.1954
	.comm	addr.1954,12,8
	.comm	SOCK_STREAM,4,4
	.comm	POP3PORT,4,4
	.comm	PF_INET,4,4
	.comm	AF_INET,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_1813.c_do_connect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"gethostbyname() failed\000"
	.align	2
.LC1:
	.ascii	"socket() failed\000"
	.align	2
.LC2:
	.ascii	"connect() failed\000"
	.text
	.align	2
	.global	do_connect
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_connect, %function
do_connect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, .L17
	mov	r6, r1
	add	r1, r5, #8
	mov	r4, r0
	bl	inet_aton
	cmp	r0, #0
	bne	.L2
	ldr	r3, [r5, #12]
	cmp	r3, #1
	bne	.L13
.L2:
	ldr	r2, .L17+4
	ldr	r3, .L17+8
	ldr	r1, [r2]
	ldr	r0, [r3]
	mov	r2, #0
	bl	socket
	cmn	r0, #1
	mov	r4, r0
	beq	.L14
	mov	r0, r6
	bl	htons
	ldr	r3, .L17+12
	str	r0, [r5, #4]
	ldr	r3, [r3]
	mov	r2, #12
	mov	r0, r4
	ldr	r1, .L17
	str	r3, [r5]
	bl	connect
	cmn	r0, #1
	movne	r3, #1
	mov	r7, r0
	strne	r3, [r5, #12]
	beq	.L15
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r0, r4
	bl	gethostbyname
	cmp	r0, #0
	beq	.L16
	ldr	r3, [r0]
	ldr	r3, [r3]
	str	r3, [r5, #8]
	b	.L2
.L14:
	bl	close
	ldr	r0, .L17+16
	bl	perror
	b	.L1
.L15:
	mov	r0, r4
	bl	close
	ldr	r3, .L17+20
	ldr	r3, [r3]
	cmp	r3, r6
	movne	r4, r7
	bne	.L1
	ldr	r0, .L17+24
	mov	r4, r7
	bl	perror
	b	.L1
.L16:
	ldr	r0, .L17+28
	bl	perror
	mvn	r4, #0
	b	.L1
.L18:
	.align	2
.L17:
	.word	.LANCHOR0
	.word	SOCK_STREAM
	.word	PF_INET
	.word	AF_INET
	.word	.LC1
	.word	POP3PORT
	.word	.LC2
	.word	.LC0
	.size	do_connect, .-do_connect
	.comm	SOCK_STREAM,4,4
	.comm	POP3PORT,4,4
	.comm	PF_INET,4,4
	.comm	AF_INET,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	addr.4238, %object
	.size	addr.4238, 12
addr.4238:
	.space	12
	.type	done.4239, %object
	.size	done.4239, 4
done.4239:
	.space	4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
