	.file	"extr_ftpd.c_getdatasock.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Failed to seteuid"
	.text
	.p2align 4
	.type	getdatasock, @function
getdatasock:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rdi, QWORD PTR data[rip]
	test	rdi, rdi
	jns	.L13
	xor	edi, edi
	mov	ebp, esi
	call	seteuid@PLT
	test	rax, rax
	js	.L14
.L3:
	mov	esi, DWORD PTR SOCK_STREAM[rip]
	mov	edi, ebp
	xor	edx, edx
	call	socket@PLT
	mov	ebp, eax
	test	eax, eax
	js	.L4
	mov	esi, 1
	mov	edi, eax
	mov	ebx, 1
	call	socket_set_reuseaddr@PLT
	mov	edi, DWORD PTR data_source[rip]
	call	socket_get_port@PLT
	mov	edi, DWORD PTR ctrl_addr[rip]
	mov	r12d, eax
	call	socket_get_address@PLT
	mov	edi, DWORD PTR data_source[rip]
	mov	edx, r12d
	mov	esi, eax
	call	socket_set_address_and_port@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	ebx, 11
	je	.L6
	mov	edi, ebx
	add	ebx, 1
	call	sleep@PLT
.L7:
	mov	edi, DWORD PTR data_source[rip]
	call	socket_sockaddr_size@PLT
	mov	esi, DWORD PTR data_source[rip]
	mov	edi, ebp
	mov	edx, eax
	call	bind@PLT
	test	rax, rax
	jns	.L5
	mov	r12d, DWORD PTR errno[rip]
	cmp	DWORD PTR EADDRINUSE[rip], r12d
	je	.L15
.L6:
	mov	rax, QWORD PTR pw[rip]
	mov	rdi, QWORD PTR [rax]
	call	seteuid@PLT
	test	rax, rax
	js	.L16
.L9:
	mov	edi, ebp
	call	close@PLT
	mov	DWORD PTR errno[rip], r12d
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	fdopen@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	fatal@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	r12d, DWORD PTR errno[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC0[rip]
	call	fatal@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR pw[rip]
	mov	rdi, QWORD PTR [rax]
	call	seteuid@PLT
	test	rax, rax
	js	.L17
.L8:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rsi, r13
	mov	edi, ebp
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	fdopen@PLT
.L17:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	fatal@PLT
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	getdatasock, .-getdatasock
	.comm	pw,8,8
	.comm	errno,4,4
	.comm	data_source,4,4
	.comm	data,8,8
	.comm	ctrl_addr,4,4
	.comm	SOCK_STREAM,4,4
	.comm	IPTOS_THROUGHPUT,4,4
	.comm	EADDRINUSE,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_ftpd.c_getdatasock.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to seteuid\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getdatasock, %function
getdatasock:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L17
	mov	r8, r0
	ldr	r0, [r3]
	cmp	r0, #0
	bge	.L12
	mov	r0, #0
	mov	r4, r1
	bl	seteuid
	cmp	r0, #0
	blt	.L13
.L3:
	ldr	r3, .L17+4
	mov	r0, r4
	mov	r2, #0
	ldr	r1, [r3]
	bl	socket
	subs	r6, r0, #0
	blt	.L4
	mov	r1, #1
	bl	socket_set_reuseaddr
	ldr	r3, .L17+8
	ldr	r7, .L17+12
	ldr	r0, [r3]
	ldr	r5, [r7]
	bl	socket_get_address
	mov	r4, r0
	ldr	r0, [r7]
	bl	socket_get_port
	mov	r1, r4
	mov	r2, r0
	mov	r0, r5
	bl	socket_set_address_and_port
	mov	r4, #1
	ldr	r5, .L17+16
	ldr	r9, .L17+20
	b	.L7
.L14:
	mov	r0, r4
	bl	sleep
	add	r4, r4, #1
.L7:
	ldr	r10, [r7]
	mov	r0, r10
	bl	socket_sockaddr_size
	mov	r1, r10
	mov	r2, r0
	mov	r0, r6
	bl	bind
	cmp	r0, #0
	bge	.L5
	sub	r3, r4, #11
	clz	r3, r3
	ldr	r10, [r5]
	ldr	r2, [r9]
	lsr	r3, r3, #5
	cmp	r2, r10
	orrne	r3, r3, #1
	cmp	r3, #0
	mov	fp, r5
	beq	.L14
.L6:
	ldr	r3, .L17+24
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	seteuid
	cmp	r0, #0
	blt	.L15
.L9:
	mov	r0, r6
	bl	close
	mov	r0, #0
	str	r10, [fp]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r1, r8
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	fdopen
.L13:
	ldr	r0, .L17+28
	bl	fatal
	b	.L3
.L4:
	ldr	fp, .L17+16
	ldr	r10, [fp]
	b	.L6
.L15:
	ldr	r0, .L17+28
	bl	fatal
	b	.L9
.L5:
	ldr	r3, .L17+24
	ldr	r3, [r3]
	ldr	r0, [r3]
	bl	seteuid
	cmp	r0, #0
	blt	.L16
.L8:
	mov	r1, r8
	mov	r0, r6
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	fdopen
.L16:
	ldr	r0, .L17+28
	bl	fatal
	b	.L8
.L18:
	.align	2
.L17:
	.word	data
	.word	SOCK_STREAM
	.word	ctrl_addr
	.word	data_source
	.word	errno
	.word	EADDRINUSE
	.word	pw
	.word	.LC0
	.size	getdatasock, .-getdatasock
	.comm	pw,4,4
	.comm	errno,4,4
	.comm	data_source,4,4
	.comm	data,4,4
	.comm	ctrl_addr,4,4
	.comm	SOCK_STREAM,4,4
	.comm	IPTOS_THROUGHPUT,4,4
	.comm	EADDRINUSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
