	.file	"extr_lua-clientsocket.c_lconnect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Connect %s %d failed"
	.text
	.p2align 4
	.type	lconnect, @function
lconnect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	esi, 1
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	luaL_checkstring@PLT
	mov	esi, 2
	mov	rdi, r12
	mov	r13, rax
	call	luaL_checkinteger@PLT
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, DWORD PTR AF_INET[rip]
	xor	edx, edx
	mov	r14d, eax
	call	socket@PLT
	mov	rdi, r13
	mov	ebp, eax
	call	inet_addr@PLT
	mov	edi, r14d
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR AF_INET[rip]
	mov	DWORD PTR 16[rsp], eax
	call	htons@PLT
	lea	rsi, 12[rsp]
	mov	edx, 12
	mov	edi, ebp
	mov	DWORD PTR 12[rsp], eax
	call	connect@PLT
	cmp	eax, -1
	je	.L7
	mov	esi, DWORD PTR F_GETFL[rip]
	xor	edx, edx
	mov	edi, ebp
	call	fcntl@PLT
	mov	esi, DWORD PTR F_SETFL[rip]
	or	eax, DWORD PTR O_NONBLOCK[rip]
	mov	edi, ebp
	mov	edx, eax
	call	fcntl@PLT
	mov	esi, ebp
	mov	rdi, r12
	call	lua_pushinteger@PLT
	mov	eax, 1
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	ecx, r14d
	mov	rdx, r13
	lea	rsi, .LC0[rip]
	mov	rdi, r12
	call	luaL_error@PLT
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lconnect, .-lconnect
	.comm	SOCK_STREAM,4,4
	.comm	O_NONBLOCK,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,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_lua-clientsocket.c_lconnect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Connect %s %d failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lconnect, %function
lconnect:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L9
	sub	sp, sp, #16
	mov	r1, #1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	luaL_checkstring
	mov	r1, #2
	mov	r6, r0
	mov	r0, r5
	bl	luaL_checkinteger
	ldr	r8, .L9+4
	ldr	r3, .L9+8
	mov	r2, #0
	ldr	r1, [r3]
	mov	r7, r0
	ldr	r0, [r8]
	bl	socket
	mov	r4, r0
	mov	r0, r6
	bl	inet_addr
	mov	r3, r0
	ldr	r2, [r8]
	mov	r0, r7
	stmib	sp, {r2, r3}
	bl	htons
	mov	r3, r0
	mov	r2, #12
	mov	r0, r4
	mov	r1, sp
	str	r3, [sp]
	bl	connect
	cmn	r0, #1
	beq	.L7
	ldr	r3, .L9+12
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	fcntl
	ldr	r3, .L9+16
	ldr	r2, .L9+20
	ldr	r3, [r3]
	ldr	r1, [r2]
	orr	r2, r0, r3
	mov	r0, r4
	bl	fcntl
	mov	r1, r4
	mov	r0, r5
	bl	lua_pushinteger
	mov	r0, #1
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r3, r7
	mov	r2, r6
	mov	r0, r5
	ldr	r1, .L9+24
	bl	luaL_error
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC1
	.word	AF_INET
	.word	SOCK_STREAM
	.word	F_GETFL
	.word	O_NONBLOCK
	.word	F_SETFL
	.word	.LC0
	.size	lconnect, .-lconnect
	.comm	SOCK_STREAM,4,4
	.comm	O_NONBLOCK,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,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
