	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CalcPHS                        ## -- Begin function CalcPHS
	.p2align	4, 0x90
_CalcPHS:                               ## @CalcPHS
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_MAP_LEAFS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	__printf
	movq	_portalclusters@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_38
## %bb.1:
	movq	_leafbytes@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r10d, %r10d
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %r10                 ## 8-byte Reload
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%r10d
	cmpl	%r8d, %r10d
	jge	LBB0_38
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_10 Depth 3
                                        ##         Child Loop BB0_21 Depth 4
                                        ##         Child Loop BB0_27 Depth 4
                                        ##         Child Loop BB0_30 Depth 4
                                        ##     Child Loop BB0_35 Depth 2
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%edx, %eax
	movq	%r10, -64(%rbp)                 ## 8-byte Spill
	imull	%r10d, %eax
	movslq	%eax, %rsi
	shlq	$2, %rsi
	movq	_visBytes@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%rbx, %rdi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	callq	_memcpy
	movq	_leafbytes@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_32
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=2
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movslq	%edx, %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	$8, %ecx
	cmpq	%rax, %rsi
	jge	LBB0_32
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_10 Depth 3
                                        ##         Child Loop BB0_21 Depth 4
                                        ##         Child Loop BB0_27 Depth 4
                                        ##         Child Loop BB0_30 Depth 4
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rsi,4), %r13d
	testl	%r13d, %r13d
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	leal	(,%rsi,8), %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movl	%ecx, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=3
	incl	%r15d
	incl	%r14d
	cmpl	$8, %r15d
	je	LBB0_6
LBB0_10:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_21 Depth 4
                                        ##         Child Loop BB0_27 Depth 4
                                        ##         Child Loop BB0_30 Depth 4
	btl	%r15d, %r13d
	jae	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	(%r15,%rax), %r12d
	movq	_portalclusters@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=3
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	_leafbytes@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=3
	movq	_leaflongs@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	testl	%r11d, %r11d
	jle	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	_visBytes@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	cmpl	$4, %r11d
	jb	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=3
	imull	%edx, %r12d
	movslq	%r12d, %rax
	leaq	(%r9,%rax,4), %r8
	leaq	(%rax,%r11,2), %rax
	leaq	(%r9,%rax,4), %rax
	cmpq	%rax, %rbx
	jae	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=3
	leaq	(%rbx,%r11,8), %rax
	cmpq	%rax, %r8
	jae	LBB0_19
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=3
	xorl	%esi, %esi
LBB0_25:                                ##   in Loop: Header=BB0_10 Depth=3
	movq	%rsi, %r8
	notq	%r8
	addq	%r11, %r8
	movq	%r11, %rax
	andq	$3, %rax
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_10 Depth=3
	movl	%edx, %edi
	imull	%r14d, %edi
	movslq	%edi, %rdi
	leaq	(%r9,%rdi,4), %rdi
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ##       Parent Loop BB0_10 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	(%rdi,%rsi,8), %rcx
	orq	%rcx, (%rbx,%rsi,8)
	incq	%rsi
	decq	%rax
	jne	LBB0_27
LBB0_28:                                ##   in Loop: Header=BB0_10 Depth=3
	cmpq	$3, %r8
	jb	LBB0_9
## %bb.29:                              ##   in Loop: Header=BB0_10 Depth=3
	movl	%edx, %eax
	imull	%r14d, %eax
	cltq
	leaq	(%r9,%rax,4), %rax
	addq	$24, %rax
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ##       Parent Loop BB0_10 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	-24(%rax,%rsi,8), %rcx
	orq	%rcx, (%rbx,%rsi,8)
	movq	-16(%rax,%rsi,8), %rcx
	orq	%rcx, 8(%rbx,%rsi,8)
	movq	-8(%rax,%rsi,8), %rcx
	orq	%rcx, 16(%rbx,%rsi,8)
	movq	(%rax,%rsi,8), %rcx
	orq	%rcx, 24(%rbx,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %r11
	jne	LBB0_30
	jmp	LBB0_9
LBB0_19:                                ##   in Loop: Header=BB0_10 Depth=3
	movl	%r11d, %esi
	andl	$-4, %esi
	leaq	-4(%rsi), %rax
	movq	%rax, %r10
	shrq	$2, %r10
	incq	%r10
	testq	%rax, %rax
	je	LBB0_31
## %bb.20:                              ##   in Loop: Header=BB0_10 Depth=3
	movq	%r10, %rdi
	andq	$-2, %rdi
	movl	%edx, %eax
	imull	%r14d, %eax
	cltq
	leaq	(%r9,%rax,4), %rax
	addq	$48, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ##       Parent Loop BB0_10 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movups	-48(%rax,%rcx,8), %xmm0
	movups	-32(%rax,%rcx,8), %xmm1
	orps	(%rbx,%rcx,8), %xmm0
	orps	16(%rbx,%rcx,8), %xmm1
	movaps	%xmm0, (%rbx,%rcx,8)
	movaps	%xmm1, 16(%rbx,%rcx,8)
	movups	-16(%rax,%rcx,8), %xmm0
	movups	(%rax,%rcx,8), %xmm1
	orps	32(%rbx,%rcx,8), %xmm0
	orps	48(%rbx,%rcx,8), %xmm1
	movaps	%xmm0, 32(%rbx,%rcx,8)
	movaps	%xmm1, 48(%rbx,%rcx,8)
	addq	$8, %rcx
	addq	$-2, %rdi
	jne	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=3
	testb	$1, %r10b
	je	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=3
	movups	(%r8,%rcx,8), %xmm0
	movups	16(%r8,%rcx,8), %xmm1
	orps	(%rbx,%rcx,8), %xmm0
	orps	16(%rbx,%rcx,8), %xmm1
	movaps	%xmm0, (%rbx,%rcx,8)
	movaps	%xmm1, 16(%rbx,%rcx,8)
LBB0_24:                                ##   in Loop: Header=BB0_10 Depth=3
	cmpq	%r11, %rsi
	je	LBB0_9
	jmp	LBB0_25
LBB0_31:                                ##   in Loop: Header=BB0_10 Depth=3
	xorl	%ecx, %ecx
	testb	$1, %r10b
	jne	LBB0_23
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_portalclusters@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_2
## %bb.33:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ecx, %ecx
	cmpl	$1, %r8d
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %r10                 ## 8-byte Reload
	je	LBB0_36
## %bb.34:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_35:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ecx, %edi
	shrl	$3, %edi
	movl	(%rbx,%rdi,4), %edi
	movl	%ecx, %eax
	andl	$6, %eax
	xorl	%esi, %esi
	btl	%eax, %edi
	setb	%sil
	orl	$1, %eax
	btl	%eax, %edi
	adcl	%esi, %r14d
	addl	$2, %ecx
	cmpl	%ecx, %r9d
	jne	LBB0_35
LBB0_36:                                ##   in Loop: Header=BB0_4 Depth=1
	testb	$1, %r8b
	je	LBB0_3
## %bb.37:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%ecx, %eax
	shrl	$3, %eax
	movl	(%rbx,%rax,4), %eax
	andl	$7, %ecx
	btl	%ecx, %eax
	adcl	$0, %r14d
	jmp	LBB0_3
LBB0_38:
	movl	%r14d, %eax
	cltd
	idivl	%r8d
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	__printf
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_40
## %bb.39:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_40:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MAP_LEAFS,4,2              ## @MAX_MAP_LEAFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Building PHS...\n"

	.comm	_portalclusters,4,2             ## @portalclusters
	.comm	_visBytes,8,3                   ## @visBytes
	.comm	_leafbytes,4,2                  ## @leafbytes
L_.str.1:                               ## @.str.1
	.asciz	"Bad bit in PVS"

	.comm	_leaflongs,4,2                  ## @leaflongs
L_.str.2:                               ## @.str.2
	.asciz	"Average clusters hearable: %i\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CalcPHS                        ; -- Begin function CalcPHS
	.p2align	2
_CalcPHS:                               ; @CalcPHS
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_MAP_LEAFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_MAP_LEAFS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	lsl	x9, x8, #2
	add	x8, x9, #15
	and	x8, x8, #0x7fffffff0
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	__printf
Lloh10:
	adrp	x8, _portalclusters@GOTPAGE
Lloh11:
	ldr	x8, [x8, _portalclusters@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.1:
	mov	w15, #0
	mov	w22, #0
Lloh13:
	adrp	x8, _leafbytes@GOTPAGE
Lloh14:
	ldr	x8, [x8, _leafbytes@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	add	x8, x19, #32
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
Lloh16:
	adrp	x28, _leaflongs@GOTPAGE
Lloh17:
	ldr	x28, [x28, _leaflongs@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldur	w15, [x29, #-108]               ; 4-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w15, w15, #1
	cmp	w15, w8
	b.ge	LBB0_31
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;         Child Loop BB0_17 Depth 4
                                        ;         Child Loop BB0_21 Depth 4
                                        ;     Child Loop BB0_26 Depth 2
Lloh18:
	adrp	x8, _visBytes@GOTPAGE
Lloh19:
	ldr	x8, [x8, _visBytes@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	stur	w15, [x29, #-108]               ; 4-byte Folded Spill
	mul	w9, w2, w15
	add	x1, x8, w9, sxtw #2
	mov	x0, x19
	stur	x1, [x29, #-104]                ; 8-byte Folded Spill
	bl	_memcpy
Lloh21:
	adrp	x8, _leafbytes@GOTPAGE
Lloh22:
	ldr	x8, [x8, _leafbytes@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	cmp	w2, #1
	b.lt	LBB0_22
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #0
	mov	x21, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x21, x21, #1
	add	w27, w27, #8
	cmp	x21, w2, sxtw
	b.ge	LBB0_22
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;         Child Loop BB0_17 Depth 4
                                        ;         Child Loop BB0_21 Depth 4
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	ldr	w26, [x8, x21, lsl #2]
	cbz	w26, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	w25, #0
	lsl	w20, w21, #3
	mov	x24, x27
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=3
	add	w25, w25, #1
	add	w24, w24, #1
	cmp	w25, #8
	b.eq	LBB0_6
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_17 Depth 4
                                        ;         Child Loop BB0_21 Depth 4
	lsr	w8, w26, w25
	tbz	w8, #0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=3
Lloh24:
	adrp	x8, _portalclusters@GOTPAGE
Lloh25:
	ldr	x8, [x8, _portalclusters@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	add	w23, w25, w20
	cmp	w23, w8
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=3
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
Lloh29:
	adrp	x8, _leafbytes@GOTPAGE
Lloh30:
	ldr	x8, [x8, _leafbytes@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=3
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=3
Lloh32:
	adrp	x9, _visBytes@GOTPAGE
Lloh33:
	ldr	x9, [x9, _visBytes@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	w8, #8
	b.lo	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=3
	mul	w10, w2, w23
	sxtw	x11, w10
	add	x10, x9, w10, sxtw #2
	add	x12, x19, x8, lsl #3
	add	x11, x11, x8, lsl #1
	add	x11, x9, x11, lsl #2
	cmp	x19, x11
	ccmp	x10, x12, #2, lo
	b.lo	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=3
	and	x10, x8, #0xfffffff8
	mul	w11, w2, w24
	add	x11, x9, w11, sxtw #2
	add	x11, x11, #32
	ldur	x12, [x29, #-96]                ; 8-byte Folded Reload
	mov	x13, x10
LBB0_17:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ;       Parent Loop BB0_10 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldp	q0, q1, [x11, #-32]
	ldp	q2, q3, [x11], #64
	ldp	q4, q5, [x12, #-32]
	ldp	q6, q7, [x12]
	orr.16b	v0, v4, v0
	orr.16b	v1, v5, v1
	orr.16b	v2, v6, v2
	orr.16b	v3, v7, v3
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	subs	x13, x13, #8
	b.ne	LBB0_17
; %bb.18:                               ;   in Loop: Header=BB0_10 Depth=3
	cmp	x10, x8
	b.eq	LBB0_9
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_10 Depth=3
	mov	x10, #0
LBB0_20:                                ;   in Loop: Header=BB0_10 Depth=3
	lsl	x12, x10, #1
	add	x11, x19, x10, lsl #3
	mul	w13, w2, w24
	add	x12, x12, w13, sxtw
	add	x9, x9, x12, lsl #2
	sub	x8, x8, x10
LBB0_21:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ;       Parent Loop BB0_10 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	x10, [x9], #8
	ldr	x12, [x11]
	orr	x10, x12, x10
	str	x10, [x11], #8
	subs	x8, x8, #1
	b.ne	LBB0_21
	b	LBB0_9
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh35:
	adrp	x8, _portalclusters@GOTPAGE
Lloh36:
	ldr	x8, [x8, _portalclusters@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.23:                               ;   in Loop: Header=BB0_4 Depth=1
	ldur	w15, [x29, #-108]               ; 4-byte Folded Reload
	b.ne	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #0
	b	LBB0_28
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w11, #0
	mov	w10, #0
	and	w9, w8, #0xfffffffe
LBB0_26:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsr	w12, w11, #3
	ldr	w12, [x19, w12, uxtw #2]
	and	w13, w11, #0x6
	orr	w14, w13, #0x1
	lsr	w13, w12, w13
	lsr	w12, w12, w14
	and	w13, w13, #0x1
	and	w12, w12, #0x1
	add	w22, w13, w22
	add	w10, w12, w10
	add	w11, w11, #2
	cmp	w9, w11
	b.ne	LBB0_26
; %bb.27:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w10, w22
	b	LBB0_29
LBB0_28:                                ;   in Loop: Header=BB0_4 Depth=1
	lsr	w10, w9, #3
	ldr	w10, [x19, w10, uxtw #2]
	and	w11, w9, #0x7
	lsr	w10, w10, w11
	and	w10, w10, #0x1
	add	w22, w10, w22
	add	w9, w9, #1
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, w9
	b.ne	LBB0_28
	b	LBB0_3
LBB0_30:
	mov	w22, #0
LBB0_31:
	sdiv	w8, w22, w8
	str	x8, [sp, #-16]!
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__printf
	add	sp, sp, #16
	ldur	x8, [x29, #-88]
Lloh40:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh41:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_33
; %bb.32:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_33:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MAP_LEAFS,4,2              ; @MAX_MAP_LEAFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Building PHS...\n"

	.comm	_portalclusters,4,2             ; @portalclusters
	.comm	_visBytes,8,3                   ; @visBytes
	.comm	_leafbytes,4,2                  ; @leafbytes
l_.str.1:                               ; @.str.1
	.asciz	"Bad bit in PVS"

	.comm	_leaflongs,4,2                  ; @leaflongs
l_.str.2:                               ; @.str.2
	.asciz	"Average clusters hearable: %i\n"

.subsections_via_symbols
