	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_build_ports                    ## -- Begin function build_ports
	.p2align	4, 0x90
_build_ports:                           ## @build_ports
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$45, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %rbx
	movb	$0, (%rax)
	incq	%rbx
	movq	_PORT_MAX@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_strtonum
	movl	%eax, %r12d
	movq	-48(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%rbx, %rcx
	callq	_errx
LBB0_3:
	movl	(%r15), %edx
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_strtonum
	movl	%eax, %ebx
	movq	-48(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rcx
	callq	_errx
LBB0_5:
	cmpl	%r12d, %ebx
	movl	%r12d, %eax
	cmovll	%ebx, %eax
	cmovgl	%ebx, %r12d
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movl	%r12d, %r13d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	subl	%eax, %r13d
	incl	%r13d
	xorl	%r14d, %r14d
	movq	_portlist@GOTPCREL(%rip), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %ecx
	callq	_snprintf
	incq	%r14
	cmpq	%r14, %r13
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %r12
	movq	_PORT_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %edi
	movl	%ebx, %esi
	callq	_calloc
	movq	(%r15), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	testq	%rdi, %rdi
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_err
	movq	(%r15), %rax
	movq	(%rax,%r14,8), %rdi
	movq	_PORT_MAX_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_8
LBB0_9:
	movq	_rflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_17
## %bb.10:
	subl	-64(%rbp), %r14d                ## 4-byte Folded Reload
	js	LBB0_17
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_arc4random
	movzwl	%ax, %eax
	xorl	%edx, %edx
	idivl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rcx
	movq	(%rax,%rdx,8), %rsi
	movq	%rsi, (%rax,%rbx,8)
	movq	(%r15), %rax
	movq	%rcx, (%rax,%rdx,8)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_12
	jmp	LBB0_17
LBB0_13:
	movq	_PORT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_strtonum
	movq	-48(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rcx
	callq	_errx
LBB0_15:
	movq	%r14, %rdi
	callq	_strdup
	movq	_portlist@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rax, (%rdx)
	movq	(%rcx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_17
## %bb.16:
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_err
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORT_MAX,4,2                   ## @PORT_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"port number %s: %s"

	.comm	_PORT_MAX_LEN,4,2               ## @PORT_MAX_LEN
	.comm	_portlist,8,3                   ## @portlist
L_.str.1:                               ## @.str.1
	.asciz	"%d"

	.comm	_rflag,8,3                      ## @rflag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_build_ports                    ; -- Begin function build_ports
	.p2align	2
_build_ports:                           ; @build_ports
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	w1, #45
	bl	_strchr
	cbz	x0, LBB0_13
; %bb.1:
	mov	x21, x0
	strb	wzr, [x21], #1
Lloh0:
	adrp	x22, _PORT_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PORT_MAX@GOTPAGEOFF]
	ldr	w2, [x22]
	add	x3, sp, #8
	mov	x0, x21
	mov	w1, #1
	bl	_strtonum
	mov	x20, x0
	ldr	x2, [sp, #8]
	cbz	x2, LBB0_3
; %bb.2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x21
	bl	_errx
LBB0_3:
	ldr	w2, [x22]
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_strtonum
	mov	x21, x0
	ldr	x2, [sp, #8]
	cbz	x2, LBB0_5
; %bb.4:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x19
	bl	_errx
LBB0_5:
	mov	x25, #0
	cmp	w21, w20
	csel	w23, w21, w20, lt
	csel	w24, w21, w20, gt
	sub	w8, w24, w23
	add	w21, w8, #1
Lloh6:
	adrp	x26, _PORT_MAX_LEN@GOTPAGE
Lloh7:
	ldr	x26, [x26, _PORT_MAX_LEN@GOTPAGEOFF]
Lloh8:
	adrp	x22, _portlist@GOTPAGE
Lloh9:
	ldr	x22, [x22, _portlist@GOTPAGEOFF]
Lloh10:
	adrp	x19, l_.str.1@PAGE
Lloh11:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x3, x23, x25
	mov	x1, x20
	mov	x2, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_snprintf
	add	x25, x25, #1
	cmp	x21, x25
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x26]
	mov	w0, #1
	mov	x1, x20
	bl	_calloc
	ldr	x8, [x22]
	lsl	x9, x25, #3
	str	x0, [x8, x9]
	ldr	x8, [x22]
	ldr	x0, [x8, x9]
	cbnz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1
	mov	x1, #0
	bl	_err
	ldr	x8, [x22]
	ldr	x0, [x8, x25, lsl #3]
	ldr	w20, [x26]
	b	LBB0_6
LBB0_9:
Lloh12:
	adrp	x8, _rflag@GOTPAGE
Lloh13:
	ldr	x8, [x8, _rflag@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.10:
	subs	w19, w24, w23
	b.mi	LBB0_17
; %bb.11:
	mov	x20, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	bl	_arc4random
	and	w8, w0, #0xffff
	sdiv	w9, w8, w19
	ldr	x10, [x22]
	lsl	x11, x20, #3
	ldr	x12, [x10, x11]
	msub	w8, w9, w19, w8
	lsl	x8, x8, #3
	ldr	x9, [x10, x8]
	str	x9, [x10, x11]
	ldr	x9, [x22]
	str	x12, [x9, x8]
	add	x20, x20, #1
	cmp	x21, x20
	b.ne	LBB0_12
	b	LBB0_17
LBB0_13:
Lloh15:
	adrp	x8, _PORT_MAX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PORT_MAX@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #1
	bl	_strtonum
	ldr	x2, [sp, #8]
	cbz	x2, LBB0_15
; %bb.14:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x3, x19
	bl	_errx
LBB0_15:
	mov	x0, x19
	bl	_strdup
Lloh20:
	adrp	x8, _portlist@GOTPAGE
Lloh21:
	ldr	x8, [x8, _portlist@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x0, [x9]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbnz	x8, LBB0_17
; %bb.16:
	mov	w0, #1
	mov	x1, #0
	bl	_err
LBB0_17:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PORT_MAX,4,2                   ; @PORT_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"port number %s: %s"

	.comm	_PORT_MAX_LEN,4,2               ; @PORT_MAX_LEN
	.comm	_portlist,8,3                   ; @portlist
l_.str.1:                               ; @.str.1
	.asciz	"%d"

	.comm	_rflag,8,3                      ; @rflag
.subsections_via_symbols
