	.file	"extr_netcat.c_build_ports.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"port number %s: %s"
.LC1:
	.string	"%d"
	.text
	.p2align 4
	.globl	build_ports
	.type	build_ports, @function
build_ports:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	esi, 45
	mov	r15, rdi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	strchr@PLT
	test	rax, rax
	je	.L2
	mov	BYTE PTR [rax], 0
	lea	r13, 1[rax]
	mov	edx, DWORD PTR PORT_MAX[rip]
	mov	r14, rsp
	mov	rcx, r14
	mov	esi, 1
	mov	rdi, r13
	call	strtonum@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	r12d, eax
	test	rdx, rdx
	je	.L3
	mov	rcx, r13
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	errx@PLT
.L3:
	mov	edx, DWORD PTR PORT_MAX[rip]
	mov	rcx, r14
	mov	esi, 1
	mov	rdi, r15
	call	strtonum@PLT
	mov	rdx, QWORD PTR [rsp]
	mov	r14d, eax
	test	rdx, rdx
	je	.L4
	mov	rcx, r15
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	errx@PLT
.L4:
	cmp	r12d, r14d
	jl	.L5
.L6:
	mov	ebp, r14d
	xor	ebx, ebx
	lea	r13, .LC1[rip]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR PORT_MAX_LEN[rip]
	mov	ecx, ebp
	mov	rdx, r13
	add	ebp, 1
	add	rbx, 8
	call	snprintf@PLT
	cmp	r12d, ebp
	jl	.L30
.L8:
	mov	r15, QWORD PTR portlist[rip]
	mov	esi, DWORD PTR PORT_MAX_LEN[rip]
	mov	edi, 1
	call	calloc@PLT
	add	r15, rbx
	mov	QWORD PTR [r15], rax
	mov	rax, QWORD PTR portlist[rip]
	mov	rdi, QWORD PTR [rax+rbx]
	test	rdi, rdi
	jne	.L7
	mov	edi, 1
	xor	esi, esi
	call	err@PLT
	mov	rax, QWORD PTR portlist[rip]
	mov	rdi, QWORD PTR [rax+rbx]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L30:
	cmp	QWORD PTR rflag[rip], 0
	je	.L1
	sub	r12d, r14d
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L10:
	xor	eax, eax
	call	arc4random@PLT
	mov	rsi, QWORD PTR portlist[rip]
	movzx	eax, ax
	cdq
	lea	rcx, [rsi+rbp*8]
	add	rbp, 1
	idiv	r12d
	mov	rdi, QWORD PTR [rcx]
	movsx	rax, edx
	lea	rax, [rsi+rax*8]
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR [rcx], rdx
	mov	QWORD PTR [rax], rdi
	cmp	r12d, ebp
	jge	.L10
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L31
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	eax, r12d
	mov	r12d, r14d
	mov	r14d, eax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edx, DWORD PTR PORT_MAX[rip]
	mov	rcx, rsp
	mov	esi, 1
	mov	rdi, r15
	call	strtonum@PLT
	mov	rdx, QWORD PTR [rsp]
	test	rdx, rdx
	je	.L12
	mov	rcx, r15
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	errx@PLT
.L12:
	mov	rbx, QWORD PTR portlist[rip]
	mov	rdi, r15
	call	strdup@PLT
	mov	QWORD PTR [rbx], rax
	test	rax, rax
	jne	.L1
	xor	esi, esi
	mov	edi, 1
	call	err@PLT
	jmp	.L1
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	build_ports, .-build_ports
	.comm	rflag,8,8
	.comm	portlist,8,8
	.comm	PORT_MAX_LEN,4,4
	.comm	PORT_MAX,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_netcat.c_build_ports.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"port number %s: %s\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.global	__aeabi_idivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	build_ports
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_ports, %function
build_ports:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L32
	sub	sp, sp, #20
	mov	r1, #45
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r5, r0
	bl	strchr
	subs	r4, r0, #0
	beq	.L2
	mov	r3, #0
	ldr	r8, .L32+4
	strb	r3, [r4], #1
	ldr	r2, [r8]
	mov	r0, r4
	mov	r1, #1
	add	r3, sp, #8
	bl	strtonum
	ldr	r2, [sp, #8]
	mov	r7, r0
	cmp	r2, #0
	beq	.L3
	mov	r3, r4
	mov	r0, #1
	ldr	r1, .L32+8
	bl	errx
.L3:
	ldr	r2, [r8]
	mov	r1, #1
	mov	r0, r5
	add	r3, sp, #8
	bl	strtonum
	ldr	r2, [sp, #8]
	mov	r6, r0
	cmp	r2, #0
	beq	.L4
	mov	r3, r5
	mov	r0, #1
	ldr	r1, .L32+8
	bl	errx
.L4:
	cmp	r7, r6
	movlt	r4, r7
	movge	r4, r6
	mov	r5, #0
	movge	r6, r7
	ldr	r8, .L32+12
	ldr	r7, .L32+16
	ldr	r9, .L32+20
	str	r4, [sp, #4]
.L8:
	ldr	r10, [r8]
	mov	r0, #1
	mov	r1, r10
	ldr	fp, [r7]
	bl	calloc
	cmp	r0, #0
	str	r0, [fp, r5]
	beq	.L30
.L7:
	mov	r3, r4
	mov	r1, r10
	mov	r2, r9
	add	r4, r4, #1
	bl	snprintf
	cmp	r6, r4
	add	r5, r5, #4
	bge	.L8
	ldr	r3, .L32+24
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L1
	mov	r4, #0
	ldr	r3, [sp, #4]
	ldr	r5, .L32+28
	sub	r6, r6, r3
.L10:
	bl	arc4random
	mov	r1, r6
	and	r0, r0, r5
	bl	__aeabi_idivmod
	ldr	r3, [r7]
	ldr	r0, [r3, r1, lsl #2]
	ldr	r2, [r3, r4, lsl #2]
	str	r0, [r3, r4, lsl #2]
	add	r4, r4, #1
	cmp	r6, r4
	str	r2, [r3, r1, lsl #2]
	bge	.L10
.L1:
	ldr	r3, .L32
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r2, .L32+4
	mov	r1, #1
	ldr	r2, [r2]
	mov	r0, r5
	add	r3, sp, #8
	bl	strtonum
	ldr	r2, [sp, #8]
	cmp	r2, #0
	beq	.L12
	mov	r3, r5
	mov	r0, #1
	ldr	r1, .L32+8
	bl	errx
.L12:
	ldr	r3, .L32+16
	mov	r0, r5
	ldr	r4, [r3]
	bl	strdup
	cmp	r0, #0
	str	r0, [r4]
	bne	.L1
	mov	r1, r0
	mov	r0, #1
	bl	err
	b	.L1
.L30:
	mov	r1, r0
	mov	r0, #1
	bl	err
	ldr	r3, [r7]
	ldr	r10, [r8]
	ldr	r0, [r3, r5]
	b	.L7
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	.LC2
	.word	PORT_MAX
	.word	.LC0
	.word	PORT_MAX_LEN
	.word	portlist
	.word	.LC1
	.word	rflag
	.word	65535
	.size	build_ports, .-build_ports
	.comm	rflag,4,4
	.comm	portlist,4,4
	.comm	PORT_MAX_LEN,4,4
	.comm	PORT_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
