	.file	"extr_trans_fd.c_p9_bind_privport.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	p9_bind_privport, @function
p9_bind_privport:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	esi, esi
	mov	edx, 12
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	ebx, DWORD PTR EINVAL[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	lea	r13, 12[rsp]
	mov	rdi, r13
	call	memset@PLT
	mov	eax, DWORD PTR AF_INET[rip]
	mov	ebp, DWORD PTR p9_ipport_resv_max[rip]
	cmp	ebp, DWORD PTR p9_ipport_resv_min[rip]
	mov	DWORD PTR 20[rsp], eax
	mov	eax, DWORD PTR INADDR_ANY[rip]
	mov	DWORD PTR 16[rsp], eax
	jge	.L4
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	sub	ebp, 1
	cmp	DWORD PTR p9_ipport_resv_min[rip], ebp
	jg	.L1
.L4:
	mov	edi, ebp
	call	htons@PLT
	mov	edx, 12
	mov	rsi, r13
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], eax
	call	kernel_bind@PLT
	mov	ecx, eax
	add	ecx, DWORD PTR EADDRINUSE[rip]
	je	.L9
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
.L2:
	.cfi_restore_state
	mov	eax, ebx
	neg	eax
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	p9_bind_privport, .-p9_bind_privport
	.comm	p9_ipport_resv_min,4,4
	.comm	p9_ipport_resv_max,4,4
	.comm	INADDR_ANY,4,4
	.comm	EINVAL,4,4
	.comm	EADDRINUSE,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_trans_fd.c_p9_bind_privport.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	p9_bind_privport, %function
p9_bind_privport:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #0
	push	{r4, r5, r6, r7, lr}
	ldr	r1, .L11
	ldr	r3, .L11+4
	ldr	r6, .L11+8
	ldr	r4, [r1]
	ldr	r3, [r3]
	mov	r5, r0
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	sub	sp, sp, #20
	ldr	ip, [r6]
	ldr	r0, [r0]
	str	r0, [sp, #12]
	mov	r0,#0
	ldr	r1, [r1]
	str	r3, [sp, #8]
	ldr	r3, .L11+20
	cmp	r4, ip
	ldr	r3, [r3]
	str	r1, [sp, #4]
	str	r2, [sp]
	blt	.L2
	ldr	r7, .L11+24
	b	.L4
.L9:
	ldr	r3, [r6]
	sub	r4, r4, #1
	cmp	r3, r4
	bgt	.L1
.L4:
	mov	r0, r4
	bl	htons
	mov	r3, r0
	mov	r2, #12
	mov	r1, sp
	mov	r0, r5
	str	r3, [sp]
	bl	kernel_bind
	ldr	r3, [r7]
	cmn	r0, r3
	beq	.L9
.L1:
	ldr	r3, .L11+16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	rsb	r0, r3, #0
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	p9_ipport_resv_max
	.word	AF_INET
	.word	p9_ipport_resv_min
	.word	INADDR_ANY
	.word	.LC0
	.word	EINVAL
	.word	EADDRINUSE
	.size	p9_bind_privport, .-p9_bind_privport
	.comm	p9_ipport_resv_min,4,4
	.comm	p9_ipport_resv_max,4,4
	.comm	INADDR_ANY,4,4
	.comm	EINVAL,4,4
	.comm	EADDRINUSE,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
