	.file	"extr_netplay_discovery.c_init_lan_ad_server_socket.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"[discovery] Failed to initialize netplay advertisement socket\n"
	.text
	.p2align 4
	.type	init_lan_ad_server_socket, @function
init_lan_ad_server_socket:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	edx, edx
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	ecx, DWORD PTR SOCKET_TYPE_DATAGRAM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rdi, rsp
	mov	QWORD PTR [rsp], 0
	call	socket_init@PLT
	test	eax, eax
	js	.L2
	mov	rsi, QWORD PTR [rsp]
	mov	edi, eax
	mov	ebp, eax
	call	socket_bind@PLT
	test	eax, eax
	je	.L12
	mov	rdi, QWORD PTR [rsp]
	mov	DWORD PTR lan_ad_server_fd[rip], ebp
	call	freeaddrinfo_retro@PLT
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, ebp
	call	socket_close@PLT
.L2:
	mov	rdi, QWORD PTR [rsp]
	test	rdi, rdi
	je	.L5
	call	freeaddrinfo_retro@PLT
.L5:
	lea	rdi, .LC0[rip]
	call	RARCH_ERR@PLT
	xor	eax, eax
.L1:
	mov	rdx, QWORD PTR 8[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L13
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	init_lan_ad_server_socket, .-init_lan_ad_server_socket
	.comm	lan_ad_server_fd,4,4
	.comm	SOCKET_TYPE_DATAGRAM,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_netplay_discovery.c_init_lan_ad_server_socket.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[discovery] Failed to initialize netplay advertisem"
	.ascii	"ent socket\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_lan_ad_server_socket, %function
init_lan_ad_server_socket:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #0
	push	{r4, lr}
	ldr	r3, .L14
	sub	sp, sp, #8
	ldr	ip, .L14+4
	mov	r0, sp
	ldr	r3, [r3]
	ldr	ip, [ip]
	str	ip, [sp, #4]
	mov	ip,#0
	str	r2, [sp]
	bl	socket_init
	subs	r4, r0, #0
	blt	.L2
	ldr	r1, [sp]
	bl	socket_bind
	cmp	r0, #0
	beq	.L12
	ldr	r3, .L14+8
	ldr	r0, [sp]
	str	r4, [r3]
	bl	freeaddrinfo_retro
	mov	r0, #1
	b	.L1
.L12:
	mov	r0, r4
	bl	socket_close
.L2:
	ldr	r0, [sp]
	cmp	r0, #0
	beq	.L5
	bl	freeaddrinfo_retro
.L5:
	ldr	r0, .L14+12
	bl	RARCH_ERR
	mov	r0, #0
.L1:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	SOCKET_TYPE_DATAGRAM
	.word	.LC1
	.word	lan_ad_server_fd
	.word	.LC0
	.size	init_lan_ad_server_socket, .-init_lan_ad_server_socket
	.comm	lan_ad_server_fd,4,4
	.comm	SOCKET_TYPE_DATAGRAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
