	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TryMergeLeaves                 ## -- Begin function TryMergeLeaves
	.p2align	4, 0x90
_TryMergeLeaves:                        ## @TryMergeLeaves
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_PORTALS_ON_LEAF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rsi
	movslq	%r14d, %r13
	movb	$1, %dl
	movq	_leafs@GOTPCREL(%rip), %rax
	movq	_faceleafs@GOTPCREL(%rip), %rdi
	shlq	$4, %rsi
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##       Child Loop BB0_17 Depth 3
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	testb	$1, %dl
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rdi, %rax
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rax), %rdx
	movl	(%rdx,%rsi), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%rdx,%rsi), %rbx
	addq	$8, %rbx
	addq	%rsi, %rdx
	xorl	%r12d, %r12d
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=2
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movl	(%rdx), %eax
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	_faceleafs@GOTPCREL(%rip), %rdi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=2
	incq	%r12
	movslq	%eax, %rcx
	cmpq	%rcx, %r12
	jge	LBB0_20
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##       Child Loop BB0_17 Depth 3
	movq	(%rbx), %rcx
	movq	(%rcx,%r12,8), %r15
	cmpl	%r14d, (%r15)
	je	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	(%rdi), %r14
	shlq	$4, %r13
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	(%r14,%r13), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%r14,%rcx), %rbx
	addq	$8, %rbx
	addq	%rcx, %r14
	xorl	%r13d, %r13d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=3
	movl	(%r14), %eax
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=3
	incq	%r13
	movslq	%eax, %rcx
	cmpq	%rcx, %r13
	jge	LBB0_14
LBB0_12:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%rbx), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=3
	movl	8(%r15), %edi
	movl	12(%r15), %r8d
	movl	16(%r15), %edx
	movl	8(%rcx), %esi
	movl	12(%rcx), %r9d
	movl	16(%rcx), %ecx
	callq	_Winding_PlanesConcave
	testq	%rax, %rax
	je	LBB0_10
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	_leafs@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rcx,%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=2
	leaq	(%rcx,%rdx), %r14
	leaq	(%rcx,%rdx), %r13
	addq	$8, %r13
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=3
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_5
LBB0_17:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r13), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	je	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=3
	movl	8(%r15), %edi
	movl	12(%r15), %r8d
	movl	16(%r15), %edx
	movl	8(%rcx), %esi
	movl	12(%rcx), %r9d
	movl	16(%rcx), %ecx
	callq	_Winding_PlanesConcave
	testq	%rax, %rax
	jne	LBB0_28
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=3
	movl	(%r14), %eax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r11d, %r11d
	testb	$1, -56(%rbp)                   ## 1-byte Folded Reload
	movl	$0, %edx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	_leafs@GOTPCREL(%rip), %rax
	jne	LBB0_1
## %bb.21:
	movq	_faceleafs@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r8,%rsi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_40
## %bb.22:
	movq	8(%r8,%rsi), %rdi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	cmpl	$1, %r9d
	jne	LBB0_31
## %bb.23:
	xorl	%eax, %eax
	xorl	%r11d, %r11d
LBB0_24:
	testb	$1, %r9b
	je	LBB0_40
## %bb.25:
	movq	(%rdi,%rax,8), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_39
## %bb.26:
	movl	%r10d, 4(%rax)
	jmp	LBB0_40
LBB0_28:
	movq	_qfalse@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_101
## %bb.30:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_31:
	movl	%r9d, %r15d
	andl	$-2, %r15d
	xorl	%eax, %eax
	xorl	%r11d, %r11d
	jmp	LBB0_34
LBB0_32:                                ##   in Loop: Header=BB0_34 Depth=1
	movl	%r10d, 4(%rbx)
LBB0_33:                                ##   in Loop: Header=BB0_34 Depth=1
	addq	$2, %rax
	cmpq	%rax, %r15
	je	LBB0_24
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rax,8), %rbx
	cmpl	%r14d, (%rbx)
	jne	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_34 Depth=1
	movl	%r10d, 4(%rbx)
	jmp	LBB0_37
LBB0_36:                                ##   in Loop: Header=BB0_34 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
LBB0_37:                                ##   in Loop: Header=BB0_34 Depth=1
	movq	8(%rdi,%rax,8), %rbx
	cmpl	%r14d, (%rbx)
	je	LBB0_32
## %bb.38:                              ##   in Loop: Header=BB0_34 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
	jmp	LBB0_33
LBB0_39:
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rax, (%rcx,%rdx,8)
LBB0_40:
	shlq	$4, %r13
	movl	(%r8,%r13), %r9d
	testl	%r9d, %r9d
	jle	LBB0_55
## %bb.41:
	movq	8(%r8,%r13), %rdi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	cmpl	$1, %r9d
	jne	LBB0_46
## %bb.42:
	xorl	%eax, %eax
LBB0_43:
	testb	$1, %r9b
	je	LBB0_55
## %bb.44:
	movq	(%rdi,%rax,8), %rax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rax)
	jne	LBB0_54
## %bb.45:
	movl	%r10d, 4(%rax)
	jmp	LBB0_55
LBB0_46:
	movl	%r9d, %r15d
	andl	$-2, %r15d
	xorl	%eax, %eax
	jmp	LBB0_49
LBB0_47:                                ##   in Loop: Header=BB0_49 Depth=1
	movl	%r10d, 4(%rbx)
LBB0_48:                                ##   in Loop: Header=BB0_49 Depth=1
	addq	$2, %rax
	cmpq	%rax, %r15
	je	LBB0_43
LBB0_49:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rax,8), %rbx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rbx)
	jne	LBB0_51
## %bb.50:                              ##   in Loop: Header=BB0_49 Depth=1
	movl	%r10d, 4(%rbx)
	jmp	LBB0_52
LBB0_51:                                ##   in Loop: Header=BB0_49 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
LBB0_52:                                ##   in Loop: Header=BB0_49 Depth=1
	movq	8(%rdi,%rax,8), %rbx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rbx)
	je	LBB0_47
## %bb.53:                              ##   in Loop: Header=BB0_49 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
	jmp	LBB0_48
LBB0_54:
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rax, (%rcx,%rdx,8)
LBB0_55:
	leaq	(%r8,%r13), %r9
	testl	%r11d, %r11d
	jle	LBB0_62
## %bb.56:
	leaq	(%r8,%r13), %r15
	addq	$8, %r15
	movl	%r11d, %r10d
	leaq	-1(%r10), %rdi
	movl	%r10d, %eax
	andl	$3, %eax
	cmpq	$3, %rdi
	jae	LBB0_58
## %bb.57:
	xorl	%edi, %edi
	jmp	LBB0_60
LBB0_58:
	andl	$-4, %r10d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_59:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, (%rbx,%rdi,8)
	movq	8(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, 8(%rbx,%rdi,8)
	movq	16(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, 16(%rbx,%rdi,8)
	movq	24(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, 24(%rbx,%rdi,8)
	addq	$4, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_59
LBB0_60:
	testq	%rax, %rax
	je	LBB0_62
	.p2align	4, 0x90
LBB0_61:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, (%rbx,%rdi,8)
	incq	%rdi
	decq	%rax
	jne	LBB0_61
LBB0_62:
	movl	%r11d, (%r9)
	movl	%r14d, 4(%r8,%rsi)
	movq	_leafs@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	(%r8,%rsi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_68
## %bb.63:
	movq	8(%r8,%rsi), %rdi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	cmpl	$1, %r9d
	jne	LBB0_69
## %bb.64:
	xorl	%eax, %eax
	xorl	%r11d, %r11d
LBB0_65:
	testb	$1, %r9b
	je	LBB0_78
## %bb.66:
	movq	(%rdi,%rax,8), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_77
## %bb.67:
	movl	%r10d, 4(%rax)
	jmp	LBB0_78
LBB0_68:
	xorl	%r11d, %r11d
	jmp	LBB0_78
LBB0_69:
	movl	%r9d, %r15d
	andl	$-2, %r15d
	xorl	%eax, %eax
	xorl	%r11d, %r11d
	jmp	LBB0_72
LBB0_70:                                ##   in Loop: Header=BB0_72 Depth=1
	movl	%r10d, 4(%rbx)
LBB0_71:                                ##   in Loop: Header=BB0_72 Depth=1
	addq	$2, %rax
	cmpq	%rax, %r15
	je	LBB0_65
LBB0_72:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rax,8), %rbx
	cmpl	%r14d, (%rbx)
	jne	LBB0_74
## %bb.73:                              ##   in Loop: Header=BB0_72 Depth=1
	movl	%r10d, 4(%rbx)
	jmp	LBB0_75
LBB0_74:                                ##   in Loop: Header=BB0_72 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
LBB0_75:                                ##   in Loop: Header=BB0_72 Depth=1
	movq	8(%rdi,%rax,8), %rbx
	cmpl	%r14d, (%rbx)
	je	LBB0_70
## %bb.76:                              ##   in Loop: Header=BB0_72 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
	jmp	LBB0_71
LBB0_77:
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rax, (%rcx,%rdx,8)
LBB0_78:
	movl	(%r8,%r13), %r9d
	testl	%r9d, %r9d
	jle	LBB0_93
## %bb.79:
	movq	8(%r8,%r13), %rdi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	cmpl	$1, %r9d
	jne	LBB0_84
## %bb.80:
	xorl	%eax, %eax
LBB0_81:
	testb	$1, %r9b
	je	LBB0_93
## %bb.82:
	movq	(%rdi,%rax,8), %rax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rax)
	jne	LBB0_92
## %bb.83:
	movl	%r10d, 4(%rax)
	jmp	LBB0_93
LBB0_84:
	movl	%r9d, %r15d
	andl	$-2, %r15d
	xorl	%eax, %eax
	jmp	LBB0_87
LBB0_85:                                ##   in Loop: Header=BB0_87 Depth=1
	movl	%r10d, 4(%rbx)
LBB0_86:                                ##   in Loop: Header=BB0_87 Depth=1
	addq	$2, %rax
	cmpq	%rax, %r15
	je	LBB0_81
LBB0_87:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rax,8), %rbx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rbx)
	jne	LBB0_89
## %bb.88:                              ##   in Loop: Header=BB0_87 Depth=1
	movl	%r10d, 4(%rbx)
	jmp	LBB0_90
LBB0_89:                                ##   in Loop: Header=BB0_87 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
LBB0_90:                                ##   in Loop: Header=BB0_87 Depth=1
	movq	8(%rdi,%rax,8), %rbx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rbx)
	je	LBB0_85
## %bb.91:                              ##   in Loop: Header=BB0_87 Depth=1
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rbx, (%rcx,%rdx,8)
	jmp	LBB0_86
LBB0_92:
	movslq	%r11d, %rdx
	incl	%r11d
	movq	%rax, (%rcx,%rdx,8)
LBB0_93:
	leaq	(%r8,%r13), %r9
	testl	%r11d, %r11d
	jle	LBB0_100
## %bb.94:
	leaq	(%r8,%r13), %r15
	addq	$8, %r15
	movl	%r11d, %r10d
	leaq	-1(%r10), %rdi
	movl	%r10d, %eax
	andl	$3, %eax
	cmpq	$3, %rdi
	jae	LBB0_96
## %bb.95:
	xorl	%edi, %edi
	jmp	LBB0_98
LBB0_96:
	andl	$-4, %r10d
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_97:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, (%rbx,%rdi,8)
	movq	8(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, 8(%rbx,%rdi,8)
	movq	16(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, 16(%rbx,%rdi,8)
	movq	24(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, 24(%rbx,%rdi,8)
	addq	$4, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_97
LBB0_98:
	testq	%rax, %rax
	je	LBB0_100
	.p2align	4, 0x90
LBB0_99:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rdx
	movq	(%r15), %rbx
	movq	%rdx, (%rbx,%rdi,8)
	incq	%rdi
	decq	%rax
	jne	LBB0_99
LBB0_100:
	movl	%r11d, (%r9)
	movl	%r14d, 4(%r8,%rsi)
	movq	_qtrue@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_101:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PORTALS_ON_LEAF,4,2        ## @MAX_PORTALS_ON_LEAF
	.comm	_leafs,8,3                      ## @leafs
	.comm	_faceleafs,8,3                  ## @faceleafs
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_qtrue,4,2                      ## @qtrue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TryMergeLeaves                 ; -- Begin function TryMergeLeaves
	.p2align	2
_TryMergeLeaves:                        ; @TryMergeLeaves
	.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, #48
	mov	x27, x1
	mov	x20, x0
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_PORTALS_ON_LEAF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_PORTALS_ON_LEAF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x8, x9, x8
	stur	x8, [x29, #-120]                ; 8-byte Folded Spill
	mov	sp, x8
	sxtw	x3, w20
	sxtw	x8, w27
	stur	x8, [x29, #-96]                 ; 8-byte Folded Spill
	mov	w8, #1
Lloh8:
	adrp	x2, _leafs@GOTPAGE
Lloh9:
	ldr	x2, [x2, _leafs@GOTPAGEOFF]
Lloh10:
	adrp	x10, _faceleafs@GOTPAGE
Lloh11:
	ldr	x10, [x10, _faceleafs@GOTPAGEOFF]
	stur	x3, [x29, #-112]                ; 8-byte Folded Spill
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;       Child Loop BB0_15 Depth 3
	stur	w8, [x29, #-100]                ; 4-byte Folded Spill
	tst	w8, #0x1
	csel	x8, x10, x2, ne
	ldr	x8, [x8]
	add	x28, x8, x3, lsl #4
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x22, #0
	add	x24, x28, #8
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldr	w8, [x28]
	mov	x10, x19
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_18
LBB0_5:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;       Child Loop BB0_15 Depth 3
	ldr	x9, [x24]
	ldr	x21, [x9, x22, lsl #3]
	ldr	w9, [x21]
	cmp	w9, w27
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x19, x10
	ldr	x8, [x10]
	ldur	x9, [x29, #-96]                 ; 8-byte Folded Reload
	add	x25, x8, x9, lsl #4
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x23, #0
	add	x26, x25, #8
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=3
	ldr	w8, [x25]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=3
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_12
LBB0_10:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x9, [x26]
	ldr	x9, [x9, x23, lsl #3]
	ldr	w10, [x9]
	cmp	w10, w20
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=3
	ldp	w4, w2, [x21, #12]
	ldp	w5, w3, [x9, #12]
	ldr	w0, [x21, #8]
	ldr	w1, [x9, #8]
	bl	_Winding_PlanesConcave
	cbz	x0, LBB0_8
	b	LBB0_21
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=2
Lloh12:
	adrp	x8, _leafs@GOTPAGE
Lloh13:
	ldr	x8, [x8, _leafs@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldur	x9, [x29, #-96]                 ; 8-byte Folded Reload
	add	x25, x8, x9, lsl #4
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	x23, #0
	add	x26, x25, #8
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=3
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_3
LBB0_15:                                ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x9, [x26]
	ldr	x9, [x9, x23, lsl #3]
	ldr	w10, [x9]
	cmp	w10, w20
	b.eq	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=3
	ldp	w4, w2, [x21, #12]
	ldp	w5, w3, [x9, #12]
	ldr	w0, [x21, #8]
	ldr	w1, [x9, #8]
	bl	_Winding_PlanesConcave
	cbnz	x0, LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=3
	ldr	w8, [x25]
	b	LBB0_14
LBB0_18:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w8, #0
	ldur	x3, [x29, #-112]                ; 8-byte Folded Reload
Lloh15:
	adrp	x2, _leafs@GOTPAGE
Lloh16:
	ldr	x2, [x2, _leafs@GOTPAGEOFF]
	ldur	w9, [x29, #-100]                ; 4-byte Folded Reload
	tbnz	w9, #0, LBB0_1
; %bb.19:
	ldr	x10, [x10]
	lsl	x9, x3, #4
	ldr	w12, [x10, x9]
Lloh17:
	adrp	x8, _qtrue@GOTPAGE
Lloh18:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	cmp	w12, #0
	b.le	LBB0_28
; %bb.20:
	mov	w11, #0
	add	x13, x10, x3, lsl #4
	ldr	x13, [x13, #8]
	ldr	w14, [x8]
	ldur	x0, [x29, #-120]                ; 8-byte Folded Reload
	b	LBB0_26
LBB0_21:
Lloh19:
	adrp	x8, _qfalse@GOTPAGE
Lloh20:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
LBB0_22:
	ldr	w0, [x8]
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_55
; %bb.23:
	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_24:                                ;   in Loop: Header=BB0_26 Depth=1
	str	x15, [x0, w11, sxtw #3]
	add	w11, w11, #1
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	add	x13, x13, #8
	subs	x12, x12, #1
	b.eq	LBB0_29
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldr	x15, [x13]
	ldr	w16, [x15]
	cmp	w16, w27
	b.ne	LBB0_24
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	str	w14, [x15, #4]
	b	LBB0_25
LBB0_28:
	mov	w11, #0
	ldur	x0, [x29, #-120]                ; 8-byte Folded Reload
LBB0_29:
	ldur	x12, [x29, #-96]                ; 8-byte Folded Reload
	add	x12, x10, x12, lsl #4
	ldr	w13, [x12]
	cmp	w13, #1
	b.lt	LBB0_35
; %bb.30:
	ldr	x14, [x12, #8]
	ldr	w15, [x8]
	b	LBB0_33
LBB0_31:                                ;   in Loop: Header=BB0_33 Depth=1
	str	x16, [x0, w11, sxtw #3]
	add	w11, w11, #1
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=1
	add	x14, x14, #8
	subs	x13, x13, #1
	b.eq	LBB0_35
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldr	x16, [x14]
	ldr	w17, [x16]
	cmp	w17, w20
	b.ne	LBB0_31
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	str	w15, [x16, #4]
	b	LBB0_32
LBB0_35:
	cmp	w11, #1
	b.lt	LBB0_38
; %bb.36:
	mov	x13, #0
	ldur	x14, [x29, #-96]                ; 8-byte Folded Reload
	add	x14, x10, x14, lsl #4
	add	x14, x14, #8
	mov	w15, w11
	lsl	x15, x15, #3
LBB0_37:                                ; =>This Inner Loop Header: Depth=1
	ldr	x16, [x0, x13]
	ldr	x17, [x14]
	str	x16, [x17, x13]
	add	x13, x13, #8
	cmp	x15, x13
	b.ne	LBB0_37
LBB0_38:
	str	w11, [x12]
	add	x10, x10, x9
	str	w27, [x10, #4]
	ldr	x10, [x2]
	ldr	w11, [x10, x9]
	cmp	w11, #1
	b.lt	LBB0_44
; %bb.39:
	mov	w9, #0
	add	x12, x10, x3, lsl #4
	ldr	x12, [x12, #8]
	ldr	w13, [x8]
	b	LBB0_42
LBB0_40:                                ;   in Loop: Header=BB0_42 Depth=1
	str	w13, [x14, #4]
LBB0_41:                                ;   in Loop: Header=BB0_42 Depth=1
	add	x12, x12, #8
	subs	x11, x11, #1
	b.eq	LBB0_45
LBB0_42:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x12]
	ldr	w15, [x14]
	cmp	w15, w27
	b.eq	LBB0_40
; %bb.43:                               ;   in Loop: Header=BB0_42 Depth=1
	str	x14, [x0, w9, sxtw #3]
	add	w9, w9, #1
	b	LBB0_41
LBB0_44:
	mov	w9, #0
LBB0_45:
	ldur	x11, [x29, #-96]                ; 8-byte Folded Reload
	add	x11, x10, x11, lsl #4
	ldr	w12, [x11]
	cmp	w12, #1
	b.lt	LBB0_51
; %bb.46:
	ldr	x13, [x11, #8]
	ldr	w8, [x8]
	b	LBB0_49
LBB0_47:                                ;   in Loop: Header=BB0_49 Depth=1
	str	w8, [x14, #4]
LBB0_48:                                ;   in Loop: Header=BB0_49 Depth=1
	add	x13, x13, #8
	subs	x12, x12, #1
	b.eq	LBB0_51
LBB0_49:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x13]
	ldr	w15, [x14]
	cmp	w15, w20
	b.eq	LBB0_47
; %bb.50:                               ;   in Loop: Header=BB0_49 Depth=1
	str	x14, [x0, w9, sxtw #3]
	add	w9, w9, #1
	b	LBB0_48
LBB0_51:
	cmp	w9, #1
	b.lt	LBB0_54
; %bb.52:
	mov	x8, #0
	ldur	x12, [x29, #-96]                ; 8-byte Folded Reload
	add	x12, x10, x12, lsl #4
	add	x12, x12, #8
	mov	w13, w9
	lsl	x13, x13, #3
LBB0_53:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x0, x8]
	ldr	x15, [x12]
	str	x14, [x15, x8]
	add	x8, x8, #8
	cmp	x13, x8
	b.ne	LBB0_53
LBB0_54:
	str	w9, [x11]
	add	x8, x10, x3, lsl #4
	str	w27, [x8, #4]
Lloh24:
	adrp	x8, _qtrue@GOTPAGE
Lloh25:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	b	LBB0_22
LBB0_55:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PORTALS_ON_LEAF,4,2        ; @MAX_PORTALS_ON_LEAF
	.comm	_leafs,8,3                      ; @leafs
	.comm	_faceleafs,8,3                  ; @faceleafs
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
