	.file	"extr_23038.c_socket_listen.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	socket_listen
	.type	socket_listen, @function
socket_listen:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 64
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR PF_INET[rip]
	lea	rcx, 8[rsp]
	lea	rdx, 16[rsp]
	mov	QWORD PTR 24[rsp], 0
	mov	DWORD PTR 36[rsp], eax
	mov	eax, DWORD PTR SOCK_STREAM[rip]
	mov	DWORD PTR 32[rsp], eax
	mov	eax, DWORD PTR AI_PASSIVE[rip]
	mov	DWORD PTR 48[rsp], eax
	call	getaddrinfo@PLT
	mov	DWORD PTR gai_errno[rip], eax
	test	eax, eax
	jne	.L9
	mov	rbp, QWORD PTR 8[rsp]
	test	rbp, rbp
	je	.L3
	lea	rbx, 4[rsp]
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR 16[rbp]
	mov	edi, DWORD PTR 20[rbp]
	call	socket@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L4
	mov	edx, DWORD PTR SO_REUSEADDR[rip]
	mov	esi, DWORD PTR SOL_SOCKET[rip]
	mov	edi, eax
	mov	rcx, rbx
	mov	r8d, 4
	mov	DWORD PTR 4[rsp], 1
	call	setsockopt@PLT
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	mov	edi, r12d
	call	bind@PLT
	test	rax, rax
	jne	.L6
	mov	esi, DWORD PTR INT_MAX[rip]
	mov	edi, r12d
	call	listen@PLT
	test	rax, rax
	je	.L19
.L6:
	mov	edi, r12d
	call	close@PLT
.L4:
	mov	rbp, QWORD PTR 24[rbp]
	test	rbp, rbp
	jne	.L7
	mov	rbp, QWORD PTR 8[rsp]
.L3:
	mov	rdi, rbp
	mov	r12d, -1
	call	freeaddrinfo@PLT
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L20
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L19:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rsp]
	call	freeaddrinfo@PLT
	jmp	.L1
.L9:
	mov	r12d, -1
	jmp	.L1
.L20:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	socket_listen, .-socket_listen
	.comm	gai_errno,4,4
	.comm	SO_REUSEADDR,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	PF_INET,4,4
	.comm	INT_MAX,4,4
	.comm	AI_PASSIVE,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_23038.c_socket_listen.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	socket_listen
	.syntax unified
	.arm
	.fpu softvfp
	.type	socket_listen, %function
socket_listen:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, #0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L21
	ldr	r2, .L21+4
	ldr	lr, .L21+8
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r4, .L21+12
	sub	sp, sp, #48
	ldr	lr, [lr]
	ldr	r4, [r4]
	str	r4, [sp, #44]
	mov	r4,#0
	str	r3, [sp, #32]
	str	r2, [sp, #28]
	add	r3, sp, #8
	add	r2, sp, #16
	str	lr, [sp, #40]
	str	ip, [sp, #24]
	bl	getaddrinfo
	ldr	r3, .L21+16
	cmp	r0, #0
	str	r0, [r3]
	bne	.L9
	ldr	r4, [sp, #8]
	cmp	r4, #0
	beq	.L3
	ldr	r7, .L21+20
	ldr	r6, .L21+24
	ldr	r8, .L21+28
.L7:
	ldr	r2, [r4, #8]
	ldr	r1, [r4, #12]
	ldr	r0, [r4, #16]
	bl	socket
	cmn	r0, #1
	mov	r5, r0
	beq	.L4
	mov	r3, #4
	mov	ip, #1
	ldr	r2, [r7]
	ldr	r1, [r6]
	str	r3, [sp]
	add	r3, sp, #12
	str	ip, [sp, #12]
	bl	setsockopt
	mov	r0, r5
	ldr	r2, [r4]
	ldr	r1, [r4, #4]
	bl	bind
	cmp	r0, #0
	bne	.L6
	mov	r0, r5
	ldr	r1, [r8]
	bl	listen
	cmp	r0, #0
	beq	.L19
.L6:
	mov	r0, r5
	bl	close
.L4:
	ldr	r4, [r4, #20]
	cmp	r4, #0
	bne	.L7
	ldr	r4, [sp, #8]
.L3:
	mov	r0, r4
	bl	freeaddrinfo
	mvn	r5, #0
.L1:
	ldr	r3, .L21+12
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	mov	r0, r5
	add	sp, sp, #48
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	ldr	r0, [sp, #8]
	bl	freeaddrinfo
	b	.L1
.L9:
	mvn	r5, #0
	b	.L1
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	PF_INET
	.word	SOCK_STREAM
	.word	AI_PASSIVE
	.word	.LC0
	.word	gai_errno
	.word	SO_REUSEADDR
	.word	SOL_SOCKET
	.word	INT_MAX
	.size	socket_listen, .-socket_listen
	.comm	gai_errno,4,4
	.comm	SO_REUSEADDR,4,4
	.comm	SOL_SOCKET,4,4
	.comm	SOCK_STREAM,4,4
	.comm	PF_INET,4,4
	.comm	INT_MAX,4,4
	.comm	AI_PASSIVE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
