	.file	"extr_net-events.c_new_socket.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"socket()"
.LC1:
	.string	"setting IPV6_V6ONLY"
.LC2:
	.string	"setting O_NONBLOCK"
	.text
	.p2align 4
	.globl	new_socket
	.type	new_socket, @function
new_socket:
.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
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, edi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR SOCK_DGRAM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	test	DWORD PTR SM_UDP[rip], edi
	cmove	esi, DWORD PTR SOCK_STREAM[rip]
	test	DWORD PTR SM_IPV6[rip], edi
	mov	edi, DWORD PTR AF_INET6[rip]
	cmove	edi, DWORD PTR AF_INET[rip]
	xor	edx, edx
	call	socket@PLT
	mov	r12d, eax
	cmp	eax, -1
	je	.L20
	test	DWORD PTR SM_IPV6[rip], ebx
	jne	.L21
.L8:
	test	ebp, ebp
	jne	.L22
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 16
	.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
.L22:
	.cfi_restore_state
	mov	esi, DWORD PTR F_GETFL[rip]
	xor	edx, edx
	mov	edi, r12d
	call	fcntl@PLT
	mov	DWORD PTR 4[rsp], eax
	test	eax, eax
	js	.L10
	or	eax, DWORD PTR O_NONBLOCK[rip]
	mov	esi, DWORD PTR F_SETFL[rip]
	mov	edi, r12d
	mov	edx, eax
	call	fcntl@PLT
	test	eax, eax
	jns	.L1
.L10:
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, r12d
	mov	r12d, -1
	call	close@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	xor	eax, eax
	mov	edx, DWORD PTR IPV6_V6ONLY[rip]
	lea	rcx, 4[rsp]
	mov	edi, r12d
	test	DWORD PTR SM_IPV6_ONLY[rip], ebx
	mov	esi, DWORD PTR IPPROTO_IPV6[rip]
	mov	r8d, 4
	setne	al
	mov	DWORD PTR 4[rsp], eax
	call	setsockopt@PLT
	test	rax, rax
	jns	.L8
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, r12d
	mov	r12d, -1
	call	close@PLT
	jmp	.L1
.L20:
	lea	rdi, .LC0[rip]
	call	perror@PLT
	jmp	.L1
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	new_socket, .-new_socket
	.comm	SOCK_STREAM,4,4
	.comm	SOCK_DGRAM,4,4
	.comm	SM_UDP,4,4
	.comm	SM_IPV6_ONLY,4,4
	.comm	SM_IPV6,4,4
	.comm	O_NONBLOCK,4,4
	.comm	IPV6_V6ONLY,4,4
	.comm	IPPROTO_IPV6,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,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
	.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-events.c_new_socket.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"socket()\000"
	.align	2
.LC1:
	.ascii	"setting IPV6_V6ONLY\000"
	.align	2
.LC2:
	.ascii	"setting O_NONBLOCK\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	new_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_socket, %function
new_socket:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	ldr	r7, .L24
	ldr	r2, .L24+4
	ldr	r3, [r7]
	sub	sp, sp, #20
	tst	r0, r3
	ldrne	r3, .L24+8
	ldreq	r3, .L24+12
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	ldr	r0, [r3]
	ldr	r3, .L24+16
	mov	r6, r1
	ldr	r3, [r3]
	mov	r2, #0
	tst	r4, r3
	ldrne	r3, .L24+20
	ldreq	r3, .L24+24
	ldr	r1, [r3]
	bl	socket
	cmn	r0, #1
	mov	r5, r0
	beq	.L20
	ldr	r3, [r7]
	tst	r4, r3
	bne	.L21
.L8:
	cmp	r6, #0
	bne	.L22
.L1:
	ldr	r3, .L24+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L22:
	ldr	r3, .L24+28
	mov	r2, #0
	mov	r0, r5
	ldr	r1, [r3]
	bl	fcntl
	cmp	r0, #0
	str	r0, [sp, #8]
	blt	.L10
	ldr	r2, .L24+32
	ldr	r3, .L24+36
	ldr	r2, [r2]
	ldr	r1, [r3]
	orr	r2, r0, r2
	mov	r0, r5
	bl	fcntl
	cmp	r0, #0
	bge	.L1
.L10:
	ldr	r0, .L24+40
	bl	perror
	mov	r0, r5
	bl	close
	mvn	r5, #0
	b	.L1
.L21:
	ldr	r3, .L24+44
	mov	r2, #4
	ldr	r3, [r3]
	str	r2, [sp]
	tst	r4, r3
	movne	ip, #1
	moveq	ip, #0
	ldr	r3, .L24+48
	ldr	r2, .L24+52
	ldr	r1, [r3]
	ldr	r2, [r2]
	add	r3, sp, #8
	str	ip, [sp, #8]
	bl	setsockopt
	cmp	r0, #0
	bge	.L8
	ldr	r0, .L24+56
	bl	perror
	mov	r0, r5
	bl	close
	mvn	r5, #0
	b	.L1
.L20:
	ldr	r0, .L24+60
	bl	perror
	b	.L1
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	SM_IPV6
	.word	.LC3
	.word	AF_INET6
	.word	AF_INET
	.word	SM_UDP
	.word	SOCK_DGRAM
	.word	SOCK_STREAM
	.word	F_GETFL
	.word	O_NONBLOCK
	.word	F_SETFL
	.word	.LC2
	.word	SM_IPV6_ONLY
	.word	IPPROTO_IPV6
	.word	IPV6_V6ONLY
	.word	.LC1
	.word	.LC0
	.size	new_socket, .-new_socket
	.comm	SOCK_STREAM,4,4
	.comm	SOCK_DGRAM,4,4
	.comm	SM_UDP,4,4
	.comm	SM_IPV6_ONLY,4,4
	.comm	SM_IPV6,4,4
	.comm	O_NONBLOCK,4,4
	.comm	IPV6_V6ONLY,4,4
	.comm	IPPROTO_IPV6,4,4
	.comm	F_SETFL,4,4
	.comm	F_GETFL,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
