	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg_condense_ports             ## -- Begin function cfg_condense_ports
	.p2align	4, 0x90
_cfg_condense_ports:                    ## @cfg_condense_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_cfg_scan_ports
	movq	$0, (%r12)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r14d
	movslq	%eax, %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movl	$4, %edx
	callq	_reallocarray
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	(%r15), %rcx
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rdx
	cmpq	$65536, %rdx                    ## imm = 0x10000
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx,4), %edi
	testl	%edi, %edi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%esi, %rbx
	incl	%esi
	movl	%edi, (%rax,%rbx,4)
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	4(%rcx,%rdx,4), %edi
	testl	%edi, %edi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	%esi, %rbx
	incl	%esi
	movl	%edi, (%rax,%rbx,4)
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_9:
	xorl	%edi, %edi
	cmpl	%r14d, %esi
	sete	%dil
	callq	_log_assert
	movl	%r14d, %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cfg_condense_ports             ; -- Begin function cfg_condense_ports
	.p2align	2
_cfg_condense_ports:                    ; @cfg_condense_ports
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
	mov	w1, #65536
	bl	_cfg_scan_ports
	mov	x19, x0
	str	xzr, [x21]
	cbz	w0, LBB0_8
; %bb.1:
	sxtw	x1, w19
	mov	x0, #0
	mov	w2, #4
	bl	_reallocarray
	str	x0, [x21]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x9, #0
	mov	w8, #0
	ldr	x10, [x20]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #4
	cmp	x9, #64, lsl #12                ; =262144
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10, x9]
	cbz	w11, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w11, [x0, w8, sxtw #2]
	add	w8, w8, #1
	b	LBB0_3
LBB0_6:
	cmp	w8, w19
	cset	w0, eq
	bl	_log_assert
	b	LBB0_8
LBB0_7:
	mov	w19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
