	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetFace                    ## -- Begin function AAS_GetFace
	.p2align	4, 0x90
_AAS_GetFace:                           ## @AAS_GetFace
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_aasworld@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$1, (%r12)
	movl	$1, %eax
LBB0_2:
	movq	_max_aas@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmpl	%esi, %eax
	jl	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movl	(%r12), %eax
LBB0_4:
	movq	16(%r12), %r13
	cltq
	movl	(%r14), %esi
	movl	4(%r14), %edi
	leaq	(%rax,%rax,4), %rbx
	leaq	32(,%rbx,8), %rdx
	addq	%r13, %rdx
	callq	_AAS_GetPlane
	movq	$0, 24(%r13,%rbx,8)
	movl	4(%r12), %eax
	movl	%eax, (%r13,%rbx,8)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 4(%r13,%rbx,8)
	movl	$0, 20(%r13,%rbx,8)
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.5:
	leaq	4(,%rbx,8), %rdx
	addq	%r13, %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_max_aas@GOTPCREL(%rip), %rdx
	movl	4(%rdx), %esi
	cmpl	%esi, %eax
	jl	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movl	(%r15), %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %r14d
	movq	8(%r15), %rax
	movl	-4(%rax,%rbx,4), %edi
	movl	(%rax,%r14,4), %esi
	leaq	-44(%rbp), %rdx
	callq	_AAS_GetEdge
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r12), %rcx
	movslq	4(%r12), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 4(%r12)
	movl	%eax, (%rcx,%rdx,4)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%r12), %rsi
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_Log_Write
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%r15), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r12), %eax
	incl	%r13d
	incq	%rbx
	jmp	LBB0_6
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	jle	LBB0_15
## %bb.16:
	movl	(%r12), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	incl	(%r12)
	movl	$1, %ebx
	jmp	LBB0_17
LBB0_15:
	movslq	(%r12), %rax
	leaq	(%rax,%rax,4), %rdi
	shlq	$3, %rdi
	addq	16(%r12), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movslq	(%r12), %rsi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_Write
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,24,3                  ## @aasworld
	.comm	_max_aas,8,2                    ## @max_aas
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_MAX_FACES = %d"

L_.str.1:                               ## @.str.1
	.asciz	"AAS_MAX_EDGEINDEXSIZE = %d"

	.comm	_verbose,8,3                    ## @verbose
L_.str.2:                               ## @.str.2
	.asciz	"AAS_GetFace: face %d had degenerate edge %d-%d\r\n"

L_.str.3:                               ## @.str.3
	.asciz	"AAS_GetFace: face %d was tiny\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetFace                    ; -- Begin function AAS_GetFace
	.p2align	2
_AAS_GetFace:                           ; @AAS_GetFace
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x3
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _aasworld@GOTPAGE
Lloh1:
	ldr	x23, [x23, _aasworld@GOTPAGEOFF]
	ldr	w8, [x23]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x23]
LBB0_2:
Lloh2:
	adrp	x24, _max_aas@GOTPAGE
Lloh3:
	ldr	x24, [x24, _max_aas@GOTPAGEOFF]
	ldr	w1, [x24]
	cmp	w8, w1
	b.lt	LBB0_4
; %bb.3:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [x23]
LBB0_4:
	ldr	x9, [x23, #16]
	ldp	w1, w0, [x21]
	mov	w10, #40
	smaddl	x19, w8, w10, x9
	add	x2, x19, #32
	bl	_AAS_GetPlane
	str	xzr, [x19, #24]
	ldr	w9, [x23, #4]
	str	w9, [x19]
	mov	x25, x19
	str	xzr, [x25, #4]!
	stur	xzr, [x19, #12]
	str	wzr, [x19, #20]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.5:
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
	mov	x26, #0
Lloh6:
	adrp	x27, _verbose@GOTPAGE
Lloh7:
	ldr	x27, [x27, _verbose@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str.2@PAGE
Lloh9:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh10:
	adrp	x22, l_.str.1@PAGE
Lloh11:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24, #4]
	cmp	w9, w1
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_Error
	ldr	w8, [x20]
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x26, #1
	sdiv	w9, w28, w8
	msub	w19, w9, w8, w28
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x26, lsl #2]
	ldr	w1, [x8, w19, uxtw #2]
	add	x2, sp, #28
	bl	_AAS_GetEdge
	ldr	w8, [sp, #28]
	cbz	w8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x23, #8]
	ldrsw	x10, [x23, #4]
	add	w11, w10, #1
	str	w11, [x23, #4]
	str	w8, [x9, x10, lsl #2]
	ldr	w8, [x25]
	add	w8, w8, #1
	str	w8, [x25]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	cbz	x8, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x1, [x23]
	stp	x26, x19, [sp]
	mov	x0, x21
	bl	_Log_Write
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x8, [x20]
	cmp	x28, x8
	b.ge	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x23, #4]
	add	x26, x26, #1
	b	LBB0_6
LBB0_14:
	ldr	w8, [x25]
	cmp	w8, #0
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	b.le	LBB0_16
; %bb.15:
	ldr	w8, [x23]
	str	w8, [x9]
	ldr	w8, [x23]
	add	w8, w8, #1
	str	w8, [x23]
	mov	w0, #1
	b	LBB0_17
LBB0_16:
	ldr	x8, [x23, #16]
	ldrsw	x9, [x23]
	mov	w10, #40
	madd	x0, x9, x10, x8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldrsw	x1, [x23]
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Log_Write
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,24,3                  ; @aasworld
	.comm	_max_aas,8,2                    ; @max_aas
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_MAX_FACES = %d"

l_.str.1:                               ; @.str.1
	.asciz	"AAS_MAX_EDGEINDEXSIZE = %d"

	.comm	_verbose,8,3                    ; @verbose
l_.str.2:                               ; @.str.2
	.asciz	"AAS_GetFace: face %d had degenerate edge %d-%d\r\n"

l_.str.3:                               ; @.str.3
	.asciz	"AAS_GetFace: face %d was tiny\r\n"

.subsections_via_symbols
