	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FilterSideIntoTree_r           ## -- Begin function FilterSideIntoTree_r
	.p2align	4, 0x90
_FilterSideIntoTree_r:                  ## @FilterSideIntoTree_r
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rcx, %r13
	movq	%rdi, %r14
	movslq	(%rcx), %rax
	movq	_PLANENUM_LEAF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.8:
	cmpq	$0, 16(%r13)
	jne	LBB0_10
## %bb.9:
	movl	$16, %edi
	callq	_malloc
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	8(%r13), %rcx
	movq	%rcx, (%rax)
	movq	%rax, 8(%r13)
	movq	%r14, %rdi
	callq	_FreeWinding
	movl	$1, %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%rdx, %r15
	movq	%rsi, %r12
	movl	(%rsi), %ecx
	cmpl	%eax, %ecx
	jne	LBB0_5
## %bb.3:
	movq	24(%r13), %rax
	movq	(%rax), %rcx
	jmp	LBB0_4
LBB0_5:
	movl	%eax, %edx
	xorl	$1, %edx
	cmpl	%edx, %ecx
	jne	LBB0_7
## %bb.6:
	movq	24(%r13), %rax
	movq	8(%rax), %rcx
LBB0_4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FilterSideIntoTree_r           ## TAILCALL
LBB0_7:
	movq	_mapplanes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,8), %edx
	movl	4(%rcx,%rax,8), %esi
	movq	_ON_EPSILON@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %r8
	leaq	-56(%rbp), %r9
	movq	%r14, %rdi
	callq	_ClipWindingEpsilon
	movq	-64(%rbp), %rdi
	movq	24(%r13), %rax
	movq	(%rax), %rcx
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_FilterSideIntoTree_r
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rdi
	movq	24(%r13), %rax
	movq	8(%rax), %rcx
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_FilterSideIntoTree_r
	movl	%eax, %ebx
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	%r14, %rdi
	callq	_FreeWinding
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANENUM_LEAF,4,2              ## @PLANENUM_LEAF
	.comm	_mapplanes,8,3                  ## @mapplanes
	.comm	_ON_EPSILON,4,2                 ## @ON_EPSILON
	.comm	_numDrawSurfaces,4,2            ## @numDrawSurfaces
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FilterSideIntoTree_r           ; -- Begin function FilterSideIntoTree_r
	.p2align	2
_FilterSideIntoTree_r:                  ; @FilterSideIntoTree_r
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x3
	mov	x19, x0
	ldrsw	x8, [x3]
Lloh0:
	adrp	x9, _PLANENUM_LEAF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PLANENUM_LEAF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_10
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	mov	x21, x2
	mov	x22, x1
	ldr	w9, [x1]
	cmp	w9, w8
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x20, #24]
	ldr	x3, [x8]
	b	LBB0_9
LBB0_7:
	eor	w10, w8, #0x1
	cmp	w9, w10
	b.ne	LBB0_11
; %bb.8:
	ldr	x8, [x20, #24]
	ldr	x3, [x8, #8]
LBB0_9:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_FilterSideIntoTree_r
LBB0_10:
	mov	w0, #16
	bl	_malloc
Lloh3:
	adrp	x8, _numDrawSurfaces@GOTPAGE
Lloh4:
	ldr	x8, [x8, _numDrawSurfaces@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	ldr	x8, [x20, #8]
	str	x8, [x0]
	str	x0, [x20, #8]
	mov	x0, x19
	bl	_FreeWinding
	mov	w20, #1
	b	LBB0_4
LBB0_11:
Lloh6:
	adrp	x9, _mapplanes@GOTPAGE
Lloh7:
	ldr	x9, [x9, _mapplanes@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x8, x9, x8, lsl #3
	ldp	w2, w1, [x8]
Lloh9:
	adrp	x8, _ON_EPSILON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ON_EPSILON@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	add	x4, sp, #8
	mov	x5, sp
	mov	x0, x19
	bl	_ClipWindingEpsilon
	ldr	x0, [sp, #8]
	ldr	x8, [x20, #24]
	ldr	x3, [x8]
	mov	x1, x22
	mov	x2, x21
	bl	_FilterSideIntoTree_r
	mov	x23, x0
	ldr	x0, [sp]
	ldr	x8, [x20, #24]
	ldr	x3, [x8, #8]
	mov	x1, x22
	mov	x2, x21
	bl	_FilterSideIntoTree_r
	add	w20, w0, w23
	mov	x0, x19
	bl	_FreeWinding
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANENUM_LEAF,4,2              ; @PLANENUM_LEAF
	.comm	_mapplanes,8,3                  ; @mapplanes
	.comm	_ON_EPSILON,4,2                 ; @ON_EPSILON
	.comm	_numDrawSurfaces,4,2            ; @numDrawSurfaces
.subsections_via_symbols
