	.file	"extr_net.c_vlclua_net_listen_tcp.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Cannot listen on %s:%d"
.LC1:
	.string	"net_listen"
.LC2:
	.string	"__index"
.LC3:
	.string	"__gc"
	.text
	.p2align 4
	.type	vlclua_net_listen_tcp, @function
vlclua_net_listen_tcp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	vlclua_get_this@PLT
	mov	esi, 1
	mov	rdi, rbp
	mov	r12, rax
	call	luaL_checkstring@PLT
	mov	esi, 2
	mov	rdi, rbp
	mov	r13, rax
	call	luaL_checkinteger@PLT
	mov	rsi, r13
	mov	rdi, r12
	mov	edx, eax
	mov	r14d, eax
	call	net_ListenTCP@PLT
	test	rax, rax
	je	.L20
	mov	esi, DWORD PTR [rax]
	mov	r12, rax
	xor	ebx, ebx
	cmp	esi, -1
	jne	.L3
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	lea	eax, 1[rbx]
	mov	esi, DWORD PTR [r12+rax*4]
	mov	rbx, rax
	cmp	esi, -1
	je	.L4
.L3:
	mov	rdi, rbp
	call	vlclua_fd_map@PLT
	cmp	eax, -1
	jne	.L5
	test	ebx, ebx
	je	.L6
	lea	eax, -1[rbx]
	lea	rbx, [r12+rax*4]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR [rbx]
	mov	rdi, rbp
	call	vlclua_fd_get_lua@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	vlclua_fd_unmap@PLT
	mov	rax, rbx
	sub	rbx, 4
	cmp	r12, rax
	jne	.L7
.L6:
	mov	rdi, r12
	call	net_ListenClose@PLT
.L20:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	ecx, r14d
	mov	rdx, r13
	mov	rdi, rbp
	lea	rsi, .LC0[rip]
	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
	jmp	luaL_error@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	esi, 8
	mov	rdi, rbp
	call	lua_newuserdata@PLT
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	mov	QWORD PTR [rax], r12
	call	luaL_newmetatable@PLT
	test	rax, rax
	jne	.L22
.L8:
	mov	rdi, rbp
	mov	esi, -2
	call	lua_setmetatable@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, 1
	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
.L22:
	.cfi_restore_state
	mov	rdi, rbp
	call	lua_newtable@PLT
	mov	edx, DWORD PTR vlclua_net_listen_reg[rip]
	xor	esi, esi
	mov	rdi, rbp
	call	luaL_register@PLT
	lea	rdx, .LC2[rip]
	mov	rdi, rbp
	mov	esi, -2
	call	lua_setfield@PLT
	mov	esi, DWORD PTR vlclua_net_listen_close[rip]
	mov	rdi, rbp
	call	lua_pushcfunction@PLT
	lea	rdx, .LC3[rip]
	mov	esi, -2
	mov	rdi, rbp
	call	lua_setfield@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	vlclua_net_listen_tcp, .-vlclua_net_listen_tcp
	.comm	vlclua_net_listen_reg,4,4
	.comm	vlclua_net_listen_close,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_net.c_vlclua_net_listen_tcp.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Cannot listen on %s:%d\000"
	.align	2
.LC1:
	.ascii	"net_listen\000"
	.align	2
.LC2:
	.ascii	"__index\000"
	.align	2
.LC3:
	.ascii	"__gc\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vlclua_net_listen_tcp, %function
vlclua_net_listen_tcp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	bl	vlclua_get_this
	mov	r1, #1
	mov	r4, r0
	mov	r0, r5
	bl	luaL_checkstring
	mov	r1, #2
	mov	r7, r0
	mov	r0, r5
	bl	luaL_checkinteger
	mov	r8, r0
	mov	r1, r7
	mov	r0, r4
	mov	r2, r8
	bl	net_ListenTCP
	subs	r6, r0, #0
	beq	.L19
	ldr	r1, [r6]
	cmn	r1, #1
	movne	r9, r6
	movne	r4, #0
	bne	.L8
	b	.L4
.L5:
	ldr	r1, [r9, #4]!
	add	r4, r4, #1
	cmn	r1, #1
	beq	.L4
.L8:
	mov	r0, r5
	bl	vlclua_fd_map
	cmn	r0, #1
	bne	.L5
	cmp	r4, #0
	beq	.L6
	add	r4, r6, r4, lsl #2
.L7:
	ldr	r1, [r4, #-4]!
	mov	r0, r5
	bl	vlclua_fd_get_lua
	mov	r1, r0
	mov	r0, r5
	bl	vlclua_fd_unmap
	cmp	r4, r6
	bne	.L7
.L6:
	mov	r0, r6
	bl	net_ListenClose
.L19:
	mov	r3, r8
	mov	r2, r7
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, .L22
	b	luaL_error
.L4:
	mov	r1, #4
	mov	r0, r5
	bl	lua_newuserdata
	ldr	r1, .L22+4
	str	r6, [r0]
	mov	r0, r5
	bl	luaL_newmetatable
	cmp	r0, #0
	bne	.L21
.L9:
	mov	r0, r5
	mvn	r1, #1
	bl	lua_setmetatable
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	mov	r0, r5
	bl	lua_newtable
	ldr	r3, .L22+8
	mov	r1, #0
	ldr	r2, [r3]
	mov	r0, r5
	bl	luaL_register
	ldr	r2, .L22+12
	mvn	r1, #1
	mov	r0, r5
	bl	lua_setfield
	ldr	r3, .L22+16
	mov	r0, r5
	ldr	r1, [r3]
	bl	lua_pushcfunction
	mvn	r1, #1
	mov	r0, r5
	ldr	r2, .L22+20
	bl	lua_setfield
	b	.L9
.L23:
	.align	2
.L22:
	.word	.LC0
	.word	.LC1
	.word	vlclua_net_listen_reg
	.word	.LC2
	.word	vlclua_net_listen_close
	.word	.LC3
	.size	vlclua_net_listen_tcp, .-vlclua_net_listen_tcp
	.comm	vlclua_net_listen_reg,4,4
	.comm	vlclua_net_listen_close,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
