	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function RecursiveLeafFlow
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_RecursiveLeafFlow
	.p2align	4, 0x90
_RecursiveLeafFlow:                     ## @RecursiveLeafFlow
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r8
	incl	16(%rsi)
	movq	_leafs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %r9
	leaq	-168(%rbp), %rsi
	movq	%rsi, 24(%rdx)
	movq	$0, -144(%rbp)
	movq	%r9, -88(%rbp)
	movq	$0, -112(%rbp)
	movq	72(%rdx), %rsi
	incq	%rsi
	movq	%rsi, -96(%rbp)
	cmpl	$0, (%rax,%rcx)
	jle	LBB0_22
## %bb.1:
	leaq	(%rax,%rcx), %rbx
	addq	$8, %rbx
	leaq	8(%r8), %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	_portals@GOTPCREL(%rip), %r10
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8), %rax
	movq	(%rax), %rax
	orl	%r13d, (%rax,%r12,4)
	movl	12(%r14), %edi
	movq	%r8, %rsi
	leaq	-168(%rbp), %rdx
	callq	_RecursiveLeafFlow
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	_portals@GOTPCREL(%rip), %r10
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movslq	(%r9), %rax
	cmpq	%rax, %r15
	jge	LBB0_22
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	(%rax,%r15,8), %r14
	cmpq	$0, 56(%r14)
	jne	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rcx
	subq	(%r10), %rcx
	shrq	$6, %rcx
	movq	8(%rdx), %rax
	movl	%ecx, %esi
	sarl	$3, %esi
	andb	$7, %cl
	movl	$1, %r13d
	shll	%cl, %r13d
	movslq	%esi, %r12
	movl	(%rax,%r12,4), %eax
	movzbl	%cl, %ecx
	btl	%ecx, %eax
	jae	LBB0_21
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_portallongs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jg	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8), %rax
	movq	(%rax), %rax
	testl	%r13d, (%rax,%r12,4)
	jne	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %rax
	movq	%rax, -104(%rbp)
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r14), %esi
	movl	-76(%rbp), %edx
	callq	_VectorSubtract
	movss	16(%r14), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm0
	movss	%xmm0, -80(%rbp)
	movq	%r14, -112(%rbp)
	movq	$0, -144(%rbp)
	movq	-152(%rbp), %rax
	movabsq	$4294967297, %rcx               ## imm = 0x100000001
	movq	%rcx, (%rax)
	movl	$1, 8(%rax)
	movl	32(%r14), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %esi
	callq	_DotProduct
	movq	_portals@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	subss	8(%r8), %xmm0
	movss	8(%r14), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_0(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	ucomiss	%xmm1, %xmm0
	movq	24(%r14), %rdi
	jbe	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -136(%rbp)
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	-168(%rbp), %rsi
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	callq	_VisChopWinding
	movq	_portals@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rax, -136(%rbp)
	testq	%rax, %rax
	je	LBB0_21
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8), %rax
	movl	12(%rax), %edi
	movl	20(%r14), %esi
	callq	_DotProduct
	movq	_portals@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	subss	16(%r14), %xmm0
	movq	(%r8), %rax
	movss	8(%rax), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	ja	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	xorps	LCPI0_0(%rip), %xmm1
	ucomiss	%xmm0, %xmm1
	movq	40(%rdx), %rdi
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -128(%rbp)
	jmp	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	-168(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	callq	_VisChopWinding
	movq	_portals@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rax, %rdi
	movq	%rax, -128(%rbp)
	testq	%rax, %rax
	je	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rdx), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-136(%rbp), %rdx
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-168(%rbp), %r8
	callq	_ClipToSeperators
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rax, -136(%rbp)
	testq	%rax, %rax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	_portals@GOTPCREL(%rip), %r10
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rdx), %rdi
	movq	-128(%rbp), %rsi
	movq	_qtrue@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rdx
	leaq	-168(%rbp), %r8
	callq	_ClipToSeperators
	movq	_portals@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%rax, -136(%rbp)
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8), %rax
	movq	(%rax), %rax
	orl	%r13d, (%rax,%r12,4)
	movl	12(%r14), %edi
	movq	%r8, %rsi
	leaq	-168(%rbp), %rdx
	callq	_RecursiveLeafFlow
	movq	_portals@GOTPCREL(%rip), %r10
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	$0, -144(%rbp)
	jmp	LBB0_21
LBB0_22:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	decq	%rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	decq	%rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_leafs,8,3                      ## @leafs
	.comm	_portals,8,3                    ## @portals
	.comm	_stat_done,8,3                  ## @stat_done
	.comm	_portallongs,4,2                ## @portallongs
	.comm	_vec3_origin,4,2                ## @vec3_origin
	.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	_RecursiveLeafFlow              ; -- Begin function RecursiveLeafFlow
	.p2align	2
_RecursiveLeafFlow:                     ; @RecursiveLeafFlow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	d9, d8, [sp, #112]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x1, #16]
	add	w8, w8, #1
	str	w8, [x1, #16]
Lloh0:
	adrp	x8, _leafs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _leafs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x22, x8, w0, sxtw #4
	add	x9, sp, #24
	str	x9, [x2, #24]
	str	xzr, [sp, #48]
	str	xzr, [sp, #80]
	ldr	x9, [x2, #72]
	add	x9, x9, #1
	stp	x9, x22, [sp, #96]
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_20
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x23, #0
	sxtw	x9, w0
	add	x8, x8, x9, lsl #4
	add	x24, x8, #8
	add	x8, x1, #8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh3:
	adrp	x25, _portals@GOTPAGE
Lloh4:
	ldr	x25, [x25, _portals@GOTPAGEOFF]
	mov	w28, #1
	movi.2s	v8, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8]
	lsl	x9, x26, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, w27
	str	w10, [x8, x9]
	ldr	w0, [x21, #12]
	add	x2, sp, #24
	mov	x1, x20
	bl	_RecursiveLeafFlow
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x21, [x8, x23, lsl #3]
	ldr	x8, [x21, #56]
	cbnz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	sub	x9, x21, x8
	lsr	x8, x9, #6
	ldr	x10, [x19, #8]
	asr	w11, w8, #3
	ldr	w10, [x10, w11, sxtw #2]
	ubfx	x9, x9, #6, #3
	lsl	w27, w28, w9
	tst	w27, w10
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh5:
	adrp	x9, _portallongs@GOTPAGE
Lloh6:
	ldr	x9, [x9, _portallongs@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w9, #1
	b.ge	LBB0_21
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sbfx	x26, x8, #3, #29
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w8, [x8, x26, lsl #2]
	tst	w8, w27
	b.ne	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21, #16]
	str	x8, [sp, #88]
Lloh8:
	adrp	x8, _vec3_origin@GOTPAGE
Lloh9:
	ldr	x8, [x8, _vec3_origin@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x21, #20]
	ldr	w2, [sp, #20]
	bl	_VectorSubtract
	ldr	s0, [x21, #16]
	fneg	s0, s0
	str	s0, [sp, #16]
	str	x21, [sp, #80]
	str	xzr, [sp, #48]
	ldr	x8, [sp, #40]
	str	d8, [x8]
	str	w28, [x8, #8]
	ldr	w0, [x21, #32]
	ldr	w1, [x20, #12]
	bl	_DotProduct
	ldr	s1, [x20, #8]
	fsub	s0, s0, s1
	ldr	s1, [x21, #8]
	fneg	s2, s1
	fcmp	s0, s2
	b.mi	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x21, #24]
	fcmp	s0, s1
	b.le	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	str	x0, [sp, #56]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #24
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	bl	_VisChopWinding
	str	x0, [sp, #56]
	cbz	x0, LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8, #12]
	ldr	w1, [x21, #20]
	bl	_DotProduct
	ldr	s1, [x21, #16]
	fsub	s0, s0, s1
	ldr	x8, [x20]
	ldr	s1, [x8, #8]
	fcmp	s0, s1
	b.gt	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	fneg	s1, s1
	ldr	x0, [x19, #40]
	fcmp	s0, s1
	b.pl	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	str	x0, [sp, #64]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #24
	add	x2, sp, #16
	bl	_VisChopWinding
	str	x0, [sp, #64]
	cbz	x0, LBB0_3
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_2
; %bb.17:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x2, [sp, #56]
Lloh11:
	adrp	x8, _qfalse@GOTPAGE
Lloh12:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	add	x4, sp, #24
	bl	_ClipToSeperators
	str	x0, [sp, #56]
	cbz	x0, LBB0_3
; %bb.18:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x0
	ldr	x0, [x19, #32]
	ldr	x1, [sp, #64]
Lloh14:
	adrp	x8, _qtrue@GOTPAGE
Lloh15:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x4, sp, #24
	bl	_ClipToSeperators
	str	x0, [sp, #56]
	cbz	x0, LBB0_3
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8]
	lsl	x9, x26, #2
	ldr	w10, [x8, x9]
	orr	w10, w10, w27
	str	w10, [x8, x9]
	ldr	w0, [x21, #12]
	add	x2, sp, #24
	mov	x1, x20
	bl	_RecursiveLeafFlow
	str	xzr, [sp, #48]
	b	LBB0_3
LBB0_20:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #112]              ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_21:
	sub	x8, x9, #1
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	sub	x8, x8, #1
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_leafs,8,3                      ; @leafs
	.comm	_portals,8,3                    ; @portals
	.comm	_stat_done,8,3                  ; @stat_done
	.comm	_portallongs,4,2                ; @portallongs
	.comm	_vec3_origin,4,2                ; @vec3_origin
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
