	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CountActivePortals             ## -- Begin function CountActivePortals
	.p2align	4, 0x90
_CountActivePortals:                    ## @CountActivePortals
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_numportals@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	addl	%edx, %edx
	movq	_portals@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, %ecx
	cmpl	$2, %edx
	cmovgel	%edx, %ecx
	jge	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
LBB0_10:
	testb	$1, %cl
	je	LBB0_13
## %bb.11:
	shlq	$4, %rdx
	cmpq	$0, 8(%rax,%rdx)
	jne	LBB0_13
## %bb.12:
	cmpq	$1, (%rax,%rdx)
	sbbl	$-1, %r14d
	incl	%ebx
	jmp	LBB0_13
LBB0_1:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
LBB0_13:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	__printf
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	__printf
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	%ecx, %esi
	andl	$2147483646, %esi               ## imm = 0x7FFFFFFE
	leaq	24(%rax), %rdi
	xorl	%edx, %edx
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$2, %rdx
	addq	$32, %rdi
	cmpq	%rdx, %rsi
	je	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -16(%rdi)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, (%rdi)
	jne	LBB0_9
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$1, -24(%rdi)
	sbbl	$-1, %r14d
	incl	%ebx
	cmpq	$0, (%rdi)
	jne	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$1, -8(%rdi)
	sbbl	$-1, %r14d
	incl	%ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_numportals,4,2                 ## @numportals
	.comm	_portals,8,3                    ## @portals
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%6d active portals\n"

L_.str.1:                               ## @.str.1
	.asciz	"%6d hint portals\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CountActivePortals             ; -- Begin function CountActivePortals
	.p2align	2
_CountActivePortals:                    ; @CountActivePortals
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _numportals@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numportals@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w19, #0
	mov	w20, #0
	lsl	w8, w8, #1
Lloh3:
	adrp	x9, _portals@GOTPAGE
Lloh4:
	ldr	x9, [x9, _portals@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w8, #1
	csinc	w8, w8, wzr, gt
	add	x9, x9, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbnz	x10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x10, [x9, #-8]
	cmp	x10, #0
	cinc	w20, w20, ne
	add	w19, w19, #1
	b	LBB0_2
LBB0_5:
	mov	w20, #0
	mov	w19, #0
LBB0_6:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	__printf
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	__printf
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_numportals,4,2                 ; @numportals
	.comm	_portals,8,3                    ; @portals
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%6d active portals\n"

l_.str.1:                               ; @.str.1
	.asciz	"%6d hint portals\n"

.subsections_via_symbols
