	.file	"extr_ctcp.c_nn_ctcp_start_connecting.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"*"
	.text
	.p2align 4
	.type	nn_ctcp_start_connecting, @function
nn_ctcp_start_connecting:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	edi, DWORD PTR [rdi]
	mov	QWORD PTR [rsp], rsi
	lea	r15, 32[rsp]
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	call	nn_ep_getaddr@PLT
	mov	edx, 8
	xor	esi, esi
	mov	rdi, r15
	mov	r14, rax
	call	memset@PLT
	mov	rdi, r14
	call	strlen@PLT
	mov	esi, 58
	mov	rdi, r14
	movsx	rbx, eax
	call	strrchr@PLT
	add	rbx, r14
	sub	rbx, rax
	lea	rdi, 1[rax]
	lea	esi, -1[rbx]
	lea	rbx, 40[rsp]
	call	nn_port_resolve@PLT
	xor	edi, edi
	mov	esi, eax
	mov	r12d, eax
	neg	esi
	test	eax, eax
	setg	dil
	call	errnum_assert@PLT
	mov	edx, DWORD PTR NN_IPV4ONLY[rip]
	mov	esi, DWORD PTR NN_SOL_SOCKET[rip]
	lea	rcx, 24[rsp]
	mov	edi, DWORD PTR 0[rbp]
	lea	r8, 56[rsp]
	mov	QWORD PTR 56[rsp], 4
	call	nn_ep_getopt@PLT
	xor	edi, edi
	cmp	QWORD PTR 56[rsp], 4
	sete	dil
	call	nn_assert@PLT
	mov	esi, 59
	mov	rdi, r14
	call	strchr@PLT
	xor	esi, esi
	mov	edx, 8
	mov	rdi, rbx
	mov	r13, rax
	call	memset@PLT
	test	r13, r13
	je	.L2
	mov	edx, DWORD PTR 24[rsp]
	mov	rsi, r13
	mov	rdi, r14
	lea	r8, 48[rsp]
	sub	rsi, r14
	mov	rcx, rbx
	call	nn_iface_resolve@PLT
	mov	edi, eax
.L3:
	shr	edi, 31
	call	nn_slow@PLT
	test	rax, rax
	jne	.L15
	mov	rax, QWORD PTR [rsp]
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR AF_INET[rip]
	mov	QWORD PTR 32[rsp], rax
	je	.L14
	cmp	rax, QWORD PTR AF_INET6[rip]
	je	.L14
	xor	edi, edi
	call	nn_assert@PLT
.L7:
	mov	edx, DWORD PTR SOCK_STREAM[rip]
	mov	rsi, QWORD PTR 32[rsp]
	lea	r12, 16[rbp]
	xor	ecx, ecx
	mov	rdi, r12
	call	nn_usock_start@PLT
	shr	eax, 31
	mov	edi, eax
	call	nn_slow@PLT
	test	rax, rax
	jne	.L15
	lea	r13, 28[rsp]
	mov	edx, DWORD PTR NN_SNDBUF[rip]
	lea	r14, 64[rsp]
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, DWORD PTR NN_SOL_SOCKET[rip]
	mov	r8, r14
	mov	rcx, r13
	mov	QWORD PTR 64[rsp], 4
	call	nn_ep_getopt@PLT
	xor	edi, edi
	cmp	QWORD PTR 64[rsp], 4
	sete	dil
	call	nn_assert@PLT
	mov	edx, DWORD PTR SO_SNDBUF[rip]
	mov	rcx, r13
	mov	rdi, r12
	mov	esi, DWORD PTR SOL_SOCKET[rip]
	mov	r8d, 4
	call	nn_usock_setsockopt@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	r8, r14
	mov	rcx, r13
	mov	edx, DWORD PTR NN_RCVBUF[rip]
	mov	esi, DWORD PTR NN_SOL_SOCKET[rip]
	mov	QWORD PTR 64[rsp], 4
	call	nn_ep_getopt@PLT
	xor	edi, edi
	cmp	QWORD PTR 64[rsp], 4
	sete	dil
	call	nn_assert@PLT
	mov	edx, DWORD PTR SO_RCVBUF[rip]
	mov	rcx, r13
	mov	rdi, r12
	mov	esi, DWORD PTR SOL_SOCKET[rip]
	mov	r8d, 4
	call	nn_usock_setsockopt@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	r8, r14
	mov	rcx, r13
	mov	edx, DWORD PTR NN_TCP_NODELAY[rip]
	mov	esi, DWORD PTR NN_TCP[rip]
	mov	QWORD PTR 64[rsp], 4
	call	nn_ep_getopt@PLT
	xor	edi, edi
	cmp	QWORD PTR 64[rsp], 4
	sete	dil
	call	nn_assert@PLT
	mov	edx, DWORD PTR TCP_NODELAY[rip]
	mov	rcx, r13
	mov	rdi, r12
	mov	esi, DWORD PTR IPPROTO_TCP[rip]
	mov	r8d, 4
	call	nn_usock_setsockopt@PLT
	mov	rdx, QWORD PTR 48[rsp]
	mov	rdi, r12
	mov	rsi, rbx
	call	nn_usock_bind@PLT
	xor	edi, edi
	test	eax, eax
	setne	dil
	call	nn_slow@PLT
	test	rax, rax
	jne	.L15
	mov	rdx, QWORD PTR 8[rsp]
	mov	rsi, r15
	mov	rdi, r12
	call	nn_usock_connect@PLT
	mov	rax, QWORD PTR NN_CTCP_STATE_CONNECTING[rip]
	mov	esi, DWORD PTR NN_STAT_INPROGRESS_CONNECTIONS[rip]
	mov	edx, 1
	mov	edi, DWORD PTR 0[rbp]
	mov	QWORD PTR 8[rbp], rax
	call	nn_ep_stat_increment@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rdi, 20[rbp]
	call	nn_backoff_start@PLT
	mov	rax, QWORD PTR NN_CTCP_STATE_WAITING[rip]
	mov	QWORD PTR 8[rbp], rax
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 88
	.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
.L14:
	.cfi_restore_state
	mov	edi, r12d
	call	htons@PLT
	mov	QWORD PTR 32[rsp], rax
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edx, DWORD PTR 24[rsp]
	lea	r8, 48[rsp]
	mov	rcx, rbx
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	nn_iface_resolve@PLT
	mov	edi, eax
	jmp	.L3
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nn_ctcp_start_connecting, .-nn_ctcp_start_connecting
	.comm	TCP_NODELAY,4,4
	.comm	SO_SNDBUF,4,4
	.comm	SO_RCVBUF,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	NN_TCP_NODELAY,4,4
	.comm	NN_TCP,4,4
	.comm	NN_STAT_INPROGRESS_CONNECTIONS,4,4
	.comm	NN_SOL_SOCKET,4,4
	.comm	NN_SNDBUF,4,4
	.comm	NN_RCVBUF,4,4
	.comm	NN_IPV4ONLY,4,4
	.comm	NN_CTCP_STATE_WAITING,8,8
	.comm	NN_CTCP_STATE_CONNECTING,8,8
	.comm	IPPROTO_TCP,4,4
	.comm	AF_INET6,8,8
	.comm	AF_INET,8,8
	.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_ctcp.c_nn_ctcp_start_connecting.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"*\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nn_ctcp_start_connecting, %function
nn_ctcp_start_connecting:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L18
	sub	sp, sp, #40
	mov	r4, r0
	ldr	r0, [r0]
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r7, r1
	mov	r9, #0
	bl	nn_ep_getaddr
	str	r9, [sp, #8]
	mov	r5, r0
	bl	strlen
	mov	r1, #58
	mov	r6, r0
	mov	r0, r5
	bl	strrchr
	add	r6, r5, r6
	sub	r6, r6, r0
	sub	r1, r6, #1
	add	r0, r0, #1
	bl	nn_port_resolve
	cmp	r0, r9
	rsb	r1, r0, #0
	mov	r6, r0
	movle	r0, #0
	movgt	r0, #1
	bl	errnum_assert
	mov	ip, #4
	ldr	r2, .L18+4
	ldr	r10, .L18+8
	add	r3, sp, #24
	ldr	r2, [r2]
	ldr	r1, [r10]
	ldr	r0, [r4]
	str	r3, [sp]
	add	r3, sp, #20
	str	ip, [sp, #24]
	bl	nn_ep_getopt
	ldr	r0, [sp, #24]
	sub	r0, r0, #4
	clz	r0, r0
	lsr	r0, r0, #5
	bl	nn_assert
	mov	r1, #59
	mov	r0, r5
	bl	strchr
	add	r3, sp, #16
	cmp	r0, #0
	subne	r1, r0, r5
	strne	r3, [sp]
	streq	r3, [sp]
	movne	r0, r5
	moveq	r1, #1
	ldrne	r2, [sp, #20]
	ldreq	r2, [sp, #20]
	ldreq	r0, .L18+12
	addne	r3, sp, #12
	addeq	r3, sp, #12
	str	r9, [sp, #12]
	bl	nn_iface_resolve
	lsr	r0, r0, #31
	bl	nn_slow
	cmp	r0, #0
	bne	.L15
	ldr	r2, .L18+16
	ldr	r3, [r7]
	ldr	r2, [r2]
	str	r3, [sp, #8]
	cmp	r3, r2
	beq	.L14
	ldr	r2, .L18+20
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L14
	bl	nn_assert
.L7:
	ldr	r3, .L18+24
	add	r5, r4, #8
	ldr	r2, [r3]
	ldr	r1, [sp, #8]
	mov	r3, #0
	mov	r0, r5
	bl	nn_usock_start
	lsr	r0, r0, #31
	bl	nn_slow
	cmp	r0, #0
	bne	.L15
	mov	r6, #4
	ldr	r3, .L18+28
	add	r7, sp, #32
	ldr	r2, [r3]
	str	r7, [sp]
	ldr	r1, [r10]
	add	r3, sp, #28
	ldr	r0, [r4]
	str	r6, [sp, #32]
	bl	nn_ep_getopt
	ldr	r0, [sp, #32]
	ldr	r9, .L18+32
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	nn_assert
	ldr	r2, .L18+36
	str	r6, [sp]
	ldr	r2, [r2]
	ldr	r1, [r9]
	add	r3, sp, #28
	mov	r0, r5
	bl	nn_usock_setsockopt
	ldr	r2, .L18+40
	str	r7, [sp]
	ldr	r1, [r10]
	ldr	r2, [r2]
	add	r3, sp, #28
	ldr	r0, [r4]
	str	r6, [sp, #32]
	bl	nn_ep_getopt
	ldr	r0, [sp, #32]
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	nn_assert
	ldr	r2, .L18+44
	str	r6, [sp]
	ldr	r1, [r9]
	ldr	r2, [r2]
	add	r3, sp, #28
	mov	r0, r5
	bl	nn_usock_setsockopt
	ldr	r2, .L18+48
	ldr	r1, .L18+52
	str	r7, [sp]
	ldr	r2, [r2]
	ldr	r1, [r1]
	add	r3, sp, #28
	ldr	r0, [r4]
	str	r6, [sp, #32]
	bl	nn_ep_getopt
	ldr	r0, [sp, #32]
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	nn_assert
	ldr	r2, .L18+56
	ldr	r1, .L18+60
	str	r6, [sp]
	add	r3, sp, #28
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	bl	nn_usock_setsockopt
	ldr	r2, [sp, #16]
	add	r1, sp, #12
	mov	r0, r5
	bl	nn_usock_bind
	subs	r0, r0, #0
	movne	r0, #1
	bl	nn_slow
	cmp	r0, #0
	bne	.L15
	mov	r2, r8
	add	r1, sp, #8
	mov	r0, r5
	bl	nn_usock_connect
	ldr	r2, .L18+64
	ldr	r3, .L18+68
	ldr	r2, [r2]
	ldr	r0, [r4]
	str	r2, [r4, #4]
	ldr	r1, [r3]
	mov	r2, #1
	bl	nn_ep_stat_increment
	b	.L1
.L15:
	add	r0, r4, #12
	bl	nn_backoff_start
	ldr	r3, .L18+72
	ldr	r3, [r3]
	str	r3, [r4, #4]
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	mov	r0, r6
	bl	htons
	str	r0, [sp, #8]
	b	.L7
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC1
	.word	NN_IPV4ONLY
	.word	NN_SOL_SOCKET
	.word	.LC0
	.word	AF_INET
	.word	AF_INET6
	.word	SOCK_STREAM
	.word	NN_SNDBUF
	.word	SOL_SOCKET
	.word	SO_SNDBUF
	.word	NN_RCVBUF
	.word	SO_RCVBUF
	.word	NN_TCP_NODELAY
	.word	NN_TCP
	.word	TCP_NODELAY
	.word	IPPROTO_TCP
	.word	NN_CTCP_STATE_CONNECTING
	.word	NN_STAT_INPROGRESS_CONNECTIONS
	.word	NN_CTCP_STATE_WAITING
	.size	nn_ctcp_start_connecting, .-nn_ctcp_start_connecting
	.comm	TCP_NODELAY,4,4
	.comm	SO_SNDBUF,4,4
	.comm	SO_RCVBUF,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	NN_TCP_NODELAY,4,4
	.comm	NN_TCP,4,4
	.comm	NN_STAT_INPROGRESS_CONNECTIONS,4,4
	.comm	NN_SOL_SOCKET,4,4
	.comm	NN_SNDBUF,4,4
	.comm	NN_RCVBUF,4,4
	.comm	NN_IPV4ONLY,4,4
	.comm	NN_CTCP_STATE_WAITING,4,4
	.comm	NN_CTCP_STATE_CONNECTING,4,4
	.comm	IPPROTO_TCP,4,4
	.comm	AF_INET6,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
