	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitDrawNode_r                 ## -- Begin function EmitDrawNode_r
	.p2align	4, 0x90
_EmitDrawNode_r:                        ## @EmitDrawNode_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_PLANENUM_LEAF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_EmitLeaf
	movq	_numleafs@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_2:
	movq	_numnodes@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_MAX_MAP_NODES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%rbx), %rax
LBB0_4:
	movq	_dnodes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	leaq	(%rax,%rax,4), %r13
	leaq	(%r12,%r13,8), %r15
	incq	%rax
	movq	%rax, (%rbx)
	movl	28(%r14), %edi
	movl	36(%r12,%r13,8), %esi
	callq	_VectorCopy
	movl	24(%r14), %edi
	movl	32(%r12,%r13,8), %esi
	callq	_VectorCopy
	movq	_planeused@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	(%r14), %rax
	incl	(%rcx,%rax,4)
	movq	%rax, %rdx
	xorq	$1, %rdx
	incl	(%rcx,%rdx,4)
	testb	$1, %al
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	(%r14), %rax
LBB0_6:
	movl	%eax, (%r15)
	movq	_numfaces@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
	movq	%rax, 8(%r12,%r13,8)
	movq	16(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.8:
	leaq	(%r12,%r13,8), %rax
	addq	$8, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_c_facenodes@GOTPCREL(%rip), %rax
	incl	(%rax)
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_EmitFace
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_numfaces@GOTPCREL(%rip), %rdx
	jmp	LBB0_11
LBB0_7:
	movq	_c_nofaces@GOTPCREL(%rip), %rcx
	incl	(%rcx)
LBB0_11:
	movq	(%rdx), %rcx
	subq	%rax, %rcx
	movq	%rcx, 24(%r12,%r13,8)
	leaq	(%r12,%r13,8), %rbx
	addq	$16, %rbx
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	movq	_PLANENUM_LEAF@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_13
## %bb.12:
	movq	_numleafs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	callq	_EmitLeaf
	jmp	LBB0_14
LBB0_13:
	movq	_numnodes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	callq	_EmitDrawNode_r
LBB0_14:
	movq	8(%r14), %rax
	movq	8(%rax), %rdi
	movq	(%rdi), %rax
	cmpq	(%r12), %rax
	jne	LBB0_15
## %bb.16:
	movq	_numleafs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
	callq	_EmitLeaf
	jmp	LBB0_17
LBB0_15:
	movq	_numnodes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rbx), %rcx
	movl	%eax, 4(%rcx)
	callq	_EmitDrawNode_r
LBB0_17:
	movq	_dnodes@GOTPCREL(%rip), %rax
	subq	(%rax), %r15
	shrq	$3, %r15
	imull	$-858993459, %r15d, %eax        ## imm = 0xCCCCCCCD
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANENUM_LEAF,8,3              ## @PLANENUM_LEAF
	.comm	_numleafs,4,2                   ## @numleafs
	.comm	_numnodes,8,3                   ## @numnodes
	.comm	_MAX_MAP_NODES,8,3              ## @MAX_MAP_NODES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_MAP_NODES"

	.comm	_dnodes,8,3                     ## @dnodes
	.comm	_planeused,8,3                  ## @planeused
L_.str.1:                               ## @.str.1
	.asciz	"WriteDrawNodes_r: odd planenum"

	.comm	_numfaces,8,3                   ## @numfaces
	.comm	_c_nofaces,4,2                  ## @c_nofaces
	.comm	_c_facenodes,4,2                ## @c_facenodes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitDrawNode_r                 ; -- Begin function EmitDrawNode_r
	.p2align	2
_EmitDrawNode_r:                        ; @EmitDrawNode_r
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _PLANENUM_LEAF@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PLANENUM_LEAF@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_EmitLeaf
Lloh2:
	adrp	x8, _numleafs@GOTPAGE
Lloh3:
	ldr	x8, [x8, _numleafs@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_2:
Lloh5:
	adrp	x22, _numnodes@GOTPAGE
Lloh6:
	ldr	x22, [x22, _numnodes@GOTPAGEOFF]
	ldr	x25, [x22]
Lloh7:
	adrp	x8, _MAX_MAP_NODES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_MAP_NODES@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x25, x8
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x25, [x22]
LBB0_4:
Lloh12:
	adrp	x23, _dnodes@GOTPAGE
Lloh13:
	ldr	x23, [x23, _dnodes@GOTPAGEOFF]
	ldr	x26, [x23]
	mov	w8, #40
	madd	x24, x25, x8, x26
	add	x8, x25, #1
	str	x8, [x22]
	ldr	w0, [x19, #28]
	ldr	w1, [x24, #36]
	bl	_VectorCopy
	ldr	w0, [x19, #24]
	ldr	w1, [x24, #32]
	bl	_VectorCopy
Lloh14:
	adrp	x8, _planeused@GOTPAGE
Lloh15:
	ldr	x8, [x8, _planeused@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x8]
	ldr	x8, [x19]
	lsl	x10, x8, #2
	ldr	w11, [x9, x10]
	add	w11, w11, #1
	str	w11, [x9, x10]
	eor	x10, x8, #0x1
	lsl	x10, x10, #2
	ldr	w11, [x9, x10]
	add	w11, w11, #1
	str	w11, [x9, x10]
	tbz	w8, #0, LBB0_6
; %bb.5:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
	ldr	x8, [x19]
LBB0_6:
	str	w8, [x24]
Lloh19:
	adrp	x27, _numfaces@GOTPAGE
Lloh20:
	ldr	x27, [x27, _numfaces@GOTPAGEOFF]
	ldr	x8, [x27]
	mov	w9, #40
	madd	x28, x25, x9, x26
	str	x8, [x28, #8]!
	ldr	x20, [x19, #16]
	cbz	x20, LBB0_10
; %bb.7:
Lloh21:
	adrp	x8, _c_facenodes@GOTPAGE
Lloh22:
	ldr	x8, [x8, _c_facenodes@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_EmitFace
	ldr	x20, [x20]
	cbnz	x20, LBB0_8
; %bb.9:
	ldr	x8, [x28]
	b	LBB0_11
LBB0_10:
Lloh23:
	adrp	x9, _c_nofaces@GOTPAGE
Lloh24:
	ldr	x9, [x9, _c_nofaces@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w10, w10, #1
	str	w10, [x9]
LBB0_11:
	ldr	x9, [x27]
	sub	x8, x9, x8
	mov	w9, #40
	mul	x9, x25, x9
	add	x9, x26, x9
	str	x8, [x9, #24]
	add	x20, x9, #16
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	x8, [x0]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
Lloh25:
	adrp	x8, _numleafs@GOTPAGE
Lloh26:
	ldr	x8, [x8, _numleafs@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	mvn	w8, w8
	ldr	x9, [x20]
	str	w8, [x9]
	bl	_EmitLeaf
	b	LBB0_14
LBB0_13:
	ldr	x8, [x22]
	ldr	x9, [x20]
	str	w8, [x9]
	bl	_EmitDrawNode_r
LBB0_14:
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	ldr	x8, [x0]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
Lloh28:
	adrp	x8, _numleafs@GOTPAGE
Lloh29:
	ldr	x8, [x8, _numleafs@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	mvn	w8, w8
	ldr	x9, [x20]
	str	w8, [x9, #4]
	bl	_EmitLeaf
	b	LBB0_17
LBB0_16:
	ldr	x8, [x22]
	ldr	x9, [x20]
	str	w8, [x9, #4]
	bl	_EmitDrawNode_r
LBB0_17:
	ldr	x8, [x23]
	sub	x8, x24, x8
	lsr	x8, x8, #3
	mov	w9, #52429
	movk	w9, #52428, lsl #16
	mul	w0, w8, w9
LBB0_18:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANENUM_LEAF,8,3              ; @PLANENUM_LEAF
	.comm	_numleafs,4,2                   ; @numleafs
	.comm	_numnodes,8,3                   ; @numnodes
	.comm	_MAX_MAP_NODES,8,3              ; @MAX_MAP_NODES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_MAP_NODES"

	.comm	_dnodes,8,3                     ; @dnodes
	.comm	_planeused,8,3                  ; @planeused
l_.str.1:                               ; @.str.1
	.asciz	"WriteDrawNodes_r: odd planenum"

	.comm	_numfaces,8,3                   ; @numfaces
	.comm	_c_nofaces,4,2                  ; @c_nofaces
	.comm	_c_facenodes,4,2                ; @c_facenodes
.subsections_via_symbols
