	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitLeaf                       ## -- Begin function EmitLeaf
	.p2align	4, 0x90
_EmitLeaf:                              ## @EmitLeaf
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_numleafs@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_MAX_MAP_LEAFS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%rbx), %rax
LBB0_2:
	movq	_dleafs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	leaq	1(%rax), %rcx
	movq	%rcx, (%rbx)
	movl	36(%r13), %ecx
	leaq	(%rax,%rax,2), %r12
	shlq	$4, %r12
	movl	%ecx, 44(%r14,%r12)
	movl	32(%r13), %eax
	movl	%eax, 40(%r14,%r12)
	movl	28(%r13), %edi
	movl	36(%r14,%r12), %esi
	callq	_VectorCopy
	movl	24(%r13), %edi
	movl	32(%r14,%r12), %esi
	callq	_VectorCopy
	movq	_numleafbrushes@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	%rcx, (%r14,%r12)
	movq	16(%r13), %r15
	movq	(%rbx), %rax
	testq	%r15, %r15
	je	LBB0_8
## %bb.3:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r12), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	_MAX_MAP_LEAFBRUSHES@GOTPCREL(%rip), %r14
	movq	_dleafbrushes@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r15), %rcx
	movl	(%rcx), %ecx
	movq	(%r12), %rdx
	movl	%ecx, (%rdx,%rax,4)
	incq	%rax
	movq	%rax, (%rbx)
	movq	8(%r15), %r15
	testq	%r15, %r15
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r14), %rax
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_Error
	movq	(%rbx), %rax
	jmp	LBB0_6
LBB0_7:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_8:
	subq	%rcx, %rax
	movq	%rax, 8(%r14,%r12)
	cmpq	$0, 8(%r13)
	jne	LBB0_16
## %bb.9:
	movq	_numleafsurfaces@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movq	%rcx, 16(%r14,%r12)
	movq	(%r13), %rbx
	movq	(%r15), %rax
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.10:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r12), %rcx
	addq	$16, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_MAX_MAP_LEAFFACES@GOTPCREL(%rip), %r12
	movq	_dleafsurfaces@GOTPCREL(%rip), %r13
	leaq	L_.str.2(%rip), %r14
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%rbx), %ecx
	movq	(%r13), %rdx
	movl	%ecx, (%rdx,%rax,4)
	incq	%rax
	movq	%rax, (%r15)
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%r12), %rax
	jb	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r14, %rdi
	callq	_Error
	movq	(%r15), %rax
	jmp	LBB0_13
LBB0_14:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_15:
	subq	%rcx, %rax
	movq	%rax, 24(%r14,%r12)
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numleafs,8,3                   ## @numleafs
	.comm	_MAX_MAP_LEAFS,8,3              ## @MAX_MAP_LEAFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_MAP_LEAFS"

	.comm	_dleafs,8,3                     ## @dleafs
	.comm	_numleafbrushes,8,3             ## @numleafbrushes
	.comm	_MAX_MAP_LEAFBRUSHES,8,3        ## @MAX_MAP_LEAFBRUSHES
L_.str.1:                               ## @.str.1
	.asciz	"MAX_MAP_LEAFBRUSHES"

	.comm	_dleafbrushes,8,3               ## @dleafbrushes
	.comm	_numleafsurfaces,8,3            ## @numleafsurfaces
	.comm	_MAX_MAP_LEAFFACES,8,3          ## @MAX_MAP_LEAFFACES
L_.str.2:                               ## @.str.2
	.asciz	"MAX_MAP_LEAFFACES"

	.comm	_dleafsurfaces,8,3              ## @dleafsurfaces
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitLeaf                       ; -- Begin function EmitLeaf
	.p2align	2
_EmitLeaf:                              ; @EmitLeaf
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _numleafs@GOTPAGE
Lloh1:
	ldr	x20, [x20, _numleafs@GOTPAGEOFF]
	ldr	x21, [x20]
Lloh2:
	adrp	x8, _MAX_MAP_LEAFS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_MAP_LEAFS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x21, x8
	b.lo	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x21, [x20]
LBB0_2:
Lloh7:
	adrp	x8, _dleafs@GOTPAGE
Lloh8:
	ldr	x8, [x8, _dleafs@GOTPAGEOFF]
Lloh9:
	ldr	x22, [x8]
	add	x8, x21, #1
	str	x8, [x20]
	mov	w8, #48
	madd	x23, x21, x8, x22
	ldr	d0, [x19, #32]
	str	d0, [x23, #40]
	ldr	w0, [x19, #28]
	ldr	w1, [x23, #36]
	bl	_VectorCopy
	ldr	w0, [x19, #24]
	ldr	w1, [x23, #32]
	bl	_VectorCopy
Lloh10:
	adrp	x24, _numleafbrushes@GOTPAGE
Lloh11:
	ldr	x24, [x24, _numleafbrushes@GOTPAGEOFF]
	ldr	x9, [x24]
	str	x9, [x23]
	ldr	x25, [x19, #16]
	ldr	x8, [x24]
	cbz	x25, LBB0_8
; %bb.3:
Lloh12:
	adrp	x26, _MAX_MAP_LEAFBRUSHES@GOTPAGE
Lloh13:
	ldr	x26, [x26, _MAX_MAP_LEAFBRUSHES@GOTPAGEOFF]
Lloh14:
	adrp	x27, _dleafbrushes@GOTPAGE
Lloh15:
	ldr	x27, [x27, _dleafbrushes@GOTPAGEOFF]
Lloh16:
	adrp	x20, l_.str.1@PAGE
Lloh17:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x25]
	ldr	w9, [x9]
	ldr	x10, [x27]
	str	w9, [x10, x8, lsl #2]
	add	x8, x8, #1
	str	x8, [x24]
	ldr	x25, [x25, #8]
	cbz	x25, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x26]
	cmp	x8, x9
	b.lo	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_Error
	ldr	x8, [x24]
	b	LBB0_4
LBB0_7:
	ldr	x9, [x23]
LBB0_8:
	sub	x8, x8, x9
	mov	w9, #48
	madd	x9, x21, x9, x22
	str	x8, [x9, #8]
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_16
; %bb.9:
Lloh18:
	adrp	x20, _numleafsurfaces@GOTPAGE
Lloh19:
	ldr	x20, [x20, _numleafsurfaces@GOTPAGEOFF]
	ldr	x9, [x20]
	mov	w8, #48
	madd	x23, x21, x8, x22
	str	x9, [x23, #16]!
	ldr	x24, [x19]
	ldr	x8, [x20]
	cbz	x24, LBB0_15
; %bb.10:
Lloh20:
	adrp	x25, _MAX_MAP_LEAFFACES@GOTPAGE
Lloh21:
	ldr	x25, [x25, _MAX_MAP_LEAFFACES@GOTPAGEOFF]
Lloh22:
	adrp	x26, _dleafsurfaces@GOTPAGE
Lloh23:
	ldr	x26, [x26, _dleafsurfaces@GOTPAGEOFF]
Lloh24:
	adrp	x19, l_.str.2@PAGE
Lloh25:
	add	x19, x19, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w9, [x24]
	ldr	x10, [x26]
	str	w9, [x10, x8, lsl #2]
	add	x8, x8, #1
	str	x8, [x20]
	ldr	x24, [x24, #8]
	cbz	x24, LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.lo	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_Error
	ldr	x8, [x20]
	b	LBB0_11
LBB0_14:
	ldr	x9, [x23]
LBB0_15:
	sub	x8, x8, x9
	mov	w9, #48
	mul	x9, x21, x9
	add	x9, x22, x9
	str	x8, [x9, #24]
LBB0_16:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_numleafs,8,3                   ; @numleafs
	.comm	_MAX_MAP_LEAFS,8,3              ; @MAX_MAP_LEAFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_MAP_LEAFS"

	.comm	_dleafs,8,3                     ; @dleafs
	.comm	_numleafbrushes,8,3             ; @numleafbrushes
	.comm	_MAX_MAP_LEAFBRUSHES,8,3        ; @MAX_MAP_LEAFBRUSHES
l_.str.1:                               ; @.str.1
	.asciz	"MAX_MAP_LEAFBRUSHES"

	.comm	_dleafbrushes,8,3               ; @dleafbrushes
	.comm	_numleafsurfaces,8,3            ; @numleafsurfaces
	.comm	_MAX_MAP_LEAFFACES,8,3          ; @MAX_MAP_LEAFFACES
l_.str.2:                               ; @.str.2
	.asciz	"MAX_MAP_LEAFFACES"

	.comm	_dleafsurfaces,8,3              ; @dleafsurfaces
.subsections_via_symbols
