	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitFace                       ## -- Begin function EmitFace
	.p2align	4, 0x90
_EmitFace:                              ## @EmitFace
	.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
	movl	$-1, (%rdi)
	movl	4(%rdi), %ecx
	cmpl	$3, %ecx
	jl	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 40(%rdi)
	jne	LBB0_11
## %bb.2:
	movq	32(%rbx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_11
## %bb.3:
	cmpq	$0, 8(%rax)
	je	LBB0_4
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_numfaces@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	%eax, (%rbx)
	movq	_MAX_MAP_FACES@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jb	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%r14), %rax
	movl	4(%rbx), %ecx
LBB0_6:
	movq	_dfaces@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	leaq	1(%rax), %rsi
	movq	%rsi, (%r14)
	movl	8(%rbx), %esi
	movl	%esi, %edi
	andl	$-2, %edi
	leaq	(%rax,%rax,2), %rax
	movl	%edi, (%rdx,%rax,8)
	andl	$1, %esi
	movl	%esi, 4(%rdx,%rax,8)
	movq	_numsurfedges@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movq	%rsi, 8(%rdx,%rax,8)
	movl	%ecx, 16(%rdx,%rax,8)
	movl	24(%rbx), %esi
	movl	%esi, 20(%rdx,%rax,8)
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.7:
	xorl	%r14d, %r14d
	movq	_dsurfedges@GOTPCREL(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r15), %rcx
	movl	%r12d, (%rcx,%rax,4)
	incq	%rax
	movq	%rax, (%r13)
	movslq	4(%rbx), %rcx
	cmpq	%rcx, %r14
	jge	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rsi
	movl	(%rsi,%r14,4), %edi
	incq	%r14
	movl	%r14d, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	movl	(%rsi,%rdx,4), %esi
	movq	%rbx, %rdx
	callq	_GetEdge2
	movl	%eax, %r12d
	movq	(%r13), %rax
	movq	_MAX_MAP_SURFEDGES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jb	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	(%r13), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_numfaces,8,3                   ## @numfaces
	.comm	_MAX_MAP_FACES,8,3              ## @MAX_MAP_FACES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"numfaces == MAX_MAP_FACES"

	.comm	_dfaces,8,3                     ## @dfaces
	.comm	_numsurfedges,8,3               ## @numsurfedges
	.comm	_MAX_MAP_SURFEDGES,8,3          ## @MAX_MAP_SURFEDGES
L_.str.1:                               ## @.str.1
	.asciz	"numsurfedges == MAX_MAP_SURFEDGES"

	.comm	_dsurfedges,8,3                 ## @dsurfedges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function EmitFace
lCPI0_0:
	.long	4294967294                      ; 0xfffffffe
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_EmitFace
	.p2align	2
_EmitFace:                              ; @EmitFace
	.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	w8, #-1
	str	w8, [x0]
	ldr	w8, [x0, #4]
	cmp	w8, #3
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0, #40]
	cbnz	x9, LBB0_4
; %bb.2:
	ldr	x9, [x19, #32]
	ldr	x10, [x9]
	cbnz	x10, LBB0_4
; %bb.3:
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_5
LBB0_4:
	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
LBB0_5:
Lloh0:
	adrp	x20, _numfaces@GOTPAGE
Lloh1:
	ldr	x20, [x20, _numfaces@GOTPAGEOFF]
	ldr	x9, [x20]
	str	w9, [x19]
Lloh2:
	adrp	x10, _MAX_MAP_FACES@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MAX_MAP_FACES@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lo	LBB0_7
; %bb.6:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x9, [x20]
	ldr	w8, [x19, #4]
LBB0_7:
Lloh7:
	adrp	x10, _dfaces@GOTPAGE
Lloh8:
	ldr	x10, [x10, _dfaces@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	add	x11, x9, #1
	str	x11, [x20]
	add	x11, x19, #8
	mov	w12, #24
	madd	x9, x9, x12, x10
	ld1r.2s	{ v0 }, [x11]
Lloh10:
	adrp	x10, lCPI0_0@PAGE
Lloh11:
	ldr	d1, [x10, lCPI0_0@PAGEOFF]
	and.8b	v0, v0, v1
	str	d0, [x9]
Lloh12:
	adrp	x22, _numsurfedges@GOTPAGE
Lloh13:
	ldr	x22, [x22, _numsurfedges@GOTPAGEOFF]
	ldr	x10, [x22]
	str	x10, [x9, #8]
	ldr	w10, [x19, #24]
	stp	w8, w10, [x9, #16]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.8:
	mov	x23, #0
Lloh14:
	adrp	x24, _MAX_MAP_SURFEDGES@GOTPAGE
Lloh15:
	ldr	x24, [x24, _MAX_MAP_SURFEDGES@GOTPAGEOFF]
Lloh16:
	adrp	x25, _dsurfedges@GOTPAGE
Lloh17:
	ldr	x25, [x25, _dsurfedges@GOTPAGEOFF]
Lloh18:
	adrp	x20, l_.str.1@PAGE
Lloh19:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x25]
	str	w21, [x9, x8, lsl #2]
	add	x8, x8, #1
	str	x8, [x22]
	ldrsw	x8, [x19, #4]
	cmp	x23, x8
	b.ge	LBB0_4
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	w0, [x9, x23, lsl #2]
	add	x23, x23, #1
	sdiv	w10, w23, w8
	msub	w8, w10, w8, w23
	ldr	w1, [x9, w8, uxtw #2]
	mov	x2, x19
	bl	_GetEdge2
	mov	x21, x0
	ldr	x8, [x22]
	ldr	x9, [x24]
	cmp	x8, x9
	b.lo	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	bl	_Error
	ldr	x8, [x22]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdr	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_numfaces,8,3                   ; @numfaces
	.comm	_MAX_MAP_FACES,8,3              ; @MAX_MAP_FACES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"numfaces == MAX_MAP_FACES"

	.comm	_dfaces,8,3                     ; @dfaces
	.comm	_numsurfedges,8,3               ; @numsurfedges
	.comm	_MAX_MAP_SURFEDGES,8,3          ; @MAX_MAP_SURFEDGES
l_.str.1:                               ; @.str.1
	.asciz	"numsurfedges == MAX_MAP_SURFEDGES"

	.comm	_dsurfedges,8,3                 ; @dsurfedges
.subsections_via_symbols
