	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitMarkFace                   ## -- Begin function EmitMarkFace
	.p2align	4, 0x90
_EmitMarkFace:                          ## @EmitMarkFace
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, %rbx
	movq	16(%rsi), %rsi
	testq	%rsi, %rsi
	jne	LBB0_1
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_EmitMarkFace
	movq	8(%rbx), %rax
	movq	8(%rax), %rsi
	jmp	LBB0_1
LBB0_4:
	movl	(%rbx), %r14d
	cmpl	$-1, %r14d
	je	LBB0_16
## %bb.5:
	testl	%r14d, %r14d
	js	LBB0_7
## %bb.6:
	movq	_numfaces@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_8
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_Error
LBB0_8:
	movl	(%r15), %ecx
	movq	_numleaffaces@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	%eax, %ecx
	jge	LBB0_12
## %bb.9:
	movslq	%ecx, %rdx
	movq	_dleaffaces@GOTPCREL(%rip), %rsi
	shlq	$2, %rdx
	addq	(%rsi), %rdx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, (%rdx)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%ecx
	addq	$4, %rdx
	cmpl	%ecx, %eax
	jne	LBB0_10
	jmp	LBB0_13
LBB0_12:
	cmpl	%eax, %ecx
	jne	LBB0_16
LBB0_13:
	movq	_MAX_MAP_LEAFFACES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movl	(%rbx), %eax
LBB0_15:
	movq	_dleaffaces@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	%r14d, (%rcx,%rax,4)
	incl	(%rbx)
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numfaces,4,2                   ## @numfaces
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad leafface"

	.comm	_numleaffaces,4,2               ## @numleaffaces
	.comm	_dleaffaces,8,3                 ## @dleaffaces
	.comm	_MAX_MAP_LEAFFACES,4,2          ## @MAX_MAP_LEAFFACES
L_.str.1:                               ## @.str.1
	.asciz	"MAX_MAP_LEAFFACES"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitMarkFace                   ; -- Begin function EmitMarkFace
	.p2align	2
_EmitMarkFace:                          ; @EmitMarkFace
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x1
	ldr	x1, [x1, #16]
	cbnz	x1, LBB0_1
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20, #8]
	ldr	x1, [x8]
	cbz	x1, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_EmitMarkFace
	ldr	x8, [x20, #8]
	ldr	x1, [x8, #8]
	b	LBB0_1
LBB0_4:
	ldr	w20, [x20]
	cmn	w20, #1
	b.eq	LBB0_16
; %bb.5:
	tbnz	w20, #31, LBB0_7
; %bb.6:
Lloh0:
	adrp	x8, _numfaces@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numfaces@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.lt	LBB0_8
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
LBB0_8:
	ldr	w9, [x19]
Lloh5:
	adrp	x19, _numleaffaces@GOTPAGE
Lloh6:
	ldr	x19, [x19, _numleaffaces@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh7:
	adrp	x21, _dleaffaces@GOTPAGE
Lloh8:
	ldr	x21, [x21, _dleaffaces@GOTPAGEOFF]
	cmp	w9, w8
	b.ge	LBB0_12
; %bb.9:
	sxtw	x10, w9
	ldr	x11, [x21]
	add	x10, x11, x10, lsl #2
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cmp	w11, w20
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w9, w9, #1
	add	x10, x10, #4
	cmp	w8, w9
	b.ne	LBB0_10
	b	LBB0_13
LBB0_12:
	cmp	w9, w8
	b.ne	LBB0_16
LBB0_13:
Lloh9:
	adrp	x9, _MAX_MAP_LEAFFACES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX_MAP_LEAFFACES@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_15
; %bb.14:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
	ldr	w8, [x19]
LBB0_15:
	ldr	x9, [x21]
	str	w20, [x9, w8, sxtw #2]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_numfaces,4,2                   ; @numfaces
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad leafface"

	.comm	_numleaffaces,4,2               ; @numleaffaces
	.comm	_dleaffaces,8,3                 ; @dleaffaces
	.comm	_MAX_MAP_LEAFFACES,4,2          ; @MAX_MAP_LEAFFACES
l_.str.1:                               ; @.str.1
	.asciz	"MAX_MAP_LEAFFACES"

.subsections_via_symbols
