	.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, %rbx
	movq	(%rdi), %rax
	movq	_PLANENUM_LEAF@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_EmitLeaf
	movq	_numleafs@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_2:
	movq	_numnodes@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
	movq	_MAX_MAP_NODES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	_numnodes@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
LBB0_4:
	movq	_dnodes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r15
	leaq	(%rax,%rax,2), %r13
	leaq	(%r15,%r13,8), %r14
	incq	%rax
	movq	%rax, (%rdx)
	movl	20(%rbx), %edi
	movl	20(%r15,%r13,8), %esi
	callq	_VectorCopy
	movl	16(%rbx), %edi
	movl	16(%r15,%r13,8), %esi
	callq	_VectorCopy
	movq	(%rbx), %rax
	testb	$1, %al
	je	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	(%rbx), %rax
LBB0_6:
	movl	%eax, (%r14)
	leaq	(%r15,%r13,8), %r15
	addq	$8, %r15
	movq	8(%rbx), %rax
	movq	(%rax), %rdi
	movq	(%rdi), %rax
	cmpq	(%r12), %rax
	jne	LBB0_8
## %bb.7:
	movq	_numleafs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	callq	_EmitLeaf
	jmp	LBB0_9
LBB0_8:
	movq	_numnodes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	callq	_EmitDrawNode_r
LBB0_9:
	movq	8(%rbx), %rax
	movq	8(%rax), %rdi
	movq	(%rdi), %rax
	cmpq	(%r12), %rax
	jne	LBB0_10
## %bb.11:
	movq	_numleafs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx)
	callq	_EmitLeaf
	jmp	LBB0_12
LBB0_10:
	movq	_numnodes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx)
	callq	_EmitDrawNode_r
LBB0_12:
	movq	_dnodes@GOTPCREL(%rip), %rax
	subq	(%rax), %r14
	shrq	$3, %r14
	imull	$-1431655765, %r14d, %eax       ## imm = 0xAAAAAAAB
LBB0_13:
	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
L_.str.1:                               ## @.str.1
	.asciz	"WriteDrawNodes_r: odd planenum"

.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _PLANENUM_LEAF@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PLANENUM_LEAF@GOTPAGEOFF]
	ldr	x9, [x20]
	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_13
LBB0_2:
Lloh5:
	adrp	x21, _numnodes@GOTPAGE
Lloh6:
	ldr	x21, [x21, _numnodes@GOTPAGEOFF]
	ldr	x24, [x21]
Lloh7:
	adrp	x8, _MAX_MAP_NODES@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_MAP_NODES@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x24, x8
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x24, [x21]
LBB0_4:
Lloh12:
	adrp	x22, _dnodes@GOTPAGE
Lloh13:
	ldr	x22, [x22, _dnodes@GOTPAGEOFF]
	ldr	x25, [x22]
	mov	w8, #24
	madd	x23, x24, x8, x25
	add	x8, x24, #1
	str	x8, [x21]
	ldr	w0, [x19, #20]
	ldr	w1, [x23, #20]
	bl	_VectorCopy
	ldr	w0, [x19, #16]
	ldr	w1, [x23, #16]
	bl	_VectorCopy
	ldr	x8, [x19]
	tbz	w8, #0, LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
	ldr	x8, [x19]
LBB0_6:
	str	w8, [x23]
	mov	w8, #24
	madd	x8, x24, x8, x25
	add	x24, x8, #8
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	ldr	x8, [x0]
	ldr	x9, [x20]
Lloh16:
	adrp	x25, _numleafs@GOTPAGE
Lloh17:
	ldr	x25, [x25, _numleafs@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [x25]
	mvn	w8, w8
	ldr	x9, [x24]
	str	w8, [x9]
	bl	_EmitLeaf
	b	LBB0_9
LBB0_8:
	ldr	x8, [x21]
	ldr	x9, [x24]
	str	w8, [x9]
	bl	_EmitDrawNode_r
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	ldr	x8, [x0]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x25]
	mvn	w8, w8
	ldr	x9, [x24]
	str	w8, [x9, #4]
	bl	_EmitLeaf
	b	LBB0_12
LBB0_11:
	ldr	x8, [x21]
	ldr	x9, [x24]
	str	w8, [x9, #4]
	bl	_EmitDrawNode_r
LBB0_12:
	ldr	x8, [x22]
	sub	x8, x23, x8
	lsr	x8, x8, #3
	mov	w9, #43691
	movk	w9, #43690, lsl #16
	mul	w0, w8, w9
LBB0_13:
	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
	ldp	x26, x25, [sp], #80             ; 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 AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.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
l_.str.1:                               ; @.str.1
	.asciz	"WriteDrawNodes_r: odd planenum"

.subsections_via_symbols
