	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FilterDrawsurfsIntoTree        ## -- Begin function FilterDrawsurfsIntoTree
	.p2align	4, 0x90
_FilterDrawsurfsIntoTree:               ## @FilterDrawsurfsIntoTree
	.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
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	callq	_qprintf
	movslq	(%rbx), %r14
	movq	_numMapDrawSurfs@GOTPCREL(%rip), %rax
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	cmpl	(%rax), %r14d
	jge	LBB0_16
## %bb.1:
	leaq	(,%r14,8), %rax
	leaq	(%rax,%rax,4), %r15
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r14
	movq	_numMapDrawSurfs@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$40, %r15
	cmpq	%rax, %r14
	jge	LBB0_16
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_mapDrawSurfs@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	cmpl	$0, 32(%r12,%r15)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%r12,%r15)
	je	LBB0_15
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%r15), %rbx
	cmpq	$0, 24(%r12,%r15)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FilterMiscModelSurfIntoTree
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_EmitModelSurf
	testl	%r13d, %r13d
	jg	LBB0_14
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 16(%r12,%r15)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FilterPatchSurfIntoTree
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_EmitPatchSurf
	testl	%r13d, %r13d
	jg	LBB0_14
	jmp	LBB0_15
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, 8(%r12,%r15)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FilterFlareSurfIntoTree
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_EmitFlareSurf
	testl	%r13d, %r13d
	jg	LBB0_14
	jmp	LBB0_15
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_FilterFaceIntoTree
	movl	%eax, %r13d
	movq	(%r12,%r15), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_CreateFlareSurface
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_EmitPlanarSurf
	testl	%r13d, %r13d
	jle	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	addl	%r13d, -48(%rbp)                ## 4-byte Folded Spill
	jmp	LBB0_15
LBB0_16:
	leaq	L_.str.1(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_qprintf
	leaq	L_.str.2(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_qprintf
	movq	_c_stripSurfaces@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	movq	_c_fanSurfaces@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"----- FilterDrawsurfsIntoTree -----\n"

	.comm	_numMapDrawSurfs,4,2            ## @numMapDrawSurfs
	.comm	_mapDrawSurfs,8,3               ## @mapDrawSurfs
L_.str.1:                               ## @.str.1
	.asciz	"%5i emited drawsurfs\n"

L_.str.2:                               ## @.str.2
	.asciz	"%5i references\n"

L_.str.3:                               ## @.str.3
	.asciz	"%5i stripfaces\n"

	.comm	_c_stripSurfaces,4,2            ## @c_stripSurfaces
L_.str.4:                               ## @.str.4
	.asciz	"%5i fanfaces\n"

	.comm	_c_fanSurfaces,4,2              ## @c_fanSurfaces
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FilterDrawsurfsIntoTree        ; -- Begin function FilterDrawsurfsIntoTree
	.p2align	2
_FilterDrawsurfsIntoTree:               ; @FilterDrawsurfsIntoTree
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
	ldrsw	x24, [x20]
Lloh2:
	adrp	x25, _numMapDrawSurfs@GOTPAGE
Lloh3:
	ldr	x25, [x25, _numMapDrawSurfs@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w24, w8
	b.ge	LBB0_15
; %bb.1:
	mov	w22, #0
	mov	w23, #0
	add	x8, x24, x24, lsl #2
	lsl	x26, x8, #3
Lloh4:
	adrp	x27, _mapDrawSurfs@GOTPAGE
Lloh5:
	ldr	x27, [x27, _mapDrawSurfs@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_FilterMiscModelSurfIntoTree
	mov	x21, x0
	mov	x0, x20
	bl	_EmitModelSurf
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w21, w22
	cmp	w21, #1
	csel	w22, w22, w8, lt
	cinc	w23, w23, ge
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x25]
	add	x26, x26, #40
	cmp	x24, x8
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x27]
	add	x20, x28, x26
	ldr	w8, [x20, #32]
	cbnz	w8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x28, x26
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_FilterPatchSurfIntoTree
	mov	x21, x0
	mov	x0, x20
	bl	_EmitPatchSurf
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_FilterFlareSurfIntoTree
	mov	x21, x0
	mov	x0, x20
	bl	_EmitFlareSurf
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_FilterFaceIntoTree
	mov	x21, x0
	ldr	x8, [x28, x26]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_CreateFlareSurface
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_EmitPlanarSurf
	b	LBB0_3
LBB0_15:
	mov	w23, #0
	mov	w22, #0
LBB0_16:
	str	x23, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_qprintf
	str	x22, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_qprintf
Lloh10:
	adrp	x8, _c_stripSurfaces@GOTPAGE
Lloh11:
	ldr	x8, [x8, _c_stripSurfaces@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_qprintf
Lloh15:
	adrp	x8, _c_fanSurfaces@GOTPAGE
Lloh16:
	ldr	x8, [x8, _c_fanSurfaces@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_qprintf
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"----- FilterDrawsurfsIntoTree -----\n"

	.comm	_numMapDrawSurfs,4,2            ; @numMapDrawSurfs
	.comm	_mapDrawSurfs,8,3               ; @mapDrawSurfs
l_.str.1:                               ; @.str.1
	.asciz	"%5i emited drawsurfs\n"

l_.str.2:                               ; @.str.2
	.asciz	"%5i references\n"

l_.str.3:                               ; @.str.3
	.asciz	"%5i stripfaces\n"

	.comm	_c_stripSurfaces,4,2            ; @c_stripSurfaces
l_.str.4:                               ; @.str.4
	.asciz	"%5i fanfaces\n"

	.comm	_c_fanSurfaces,4,2              ; @c_fanSurfaces
.subsections_via_symbols
