	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function AAS_FlipAreaFaces
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_AAS_FlipAreaFaces
	.p2align	4, 0x90
_AAS_FlipAreaFaces:                     ## @AAS_FlipAreaFaces
	.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, %r15
	movq	8(%rdi), %rbx
	xorps	%xmm1, %xmm1
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	cmpq	%r15, %rax
	setne	%r12b
	movl	8(%rbx), %edi
	callq	_WindingCenter
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_VectorAdd
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	addss	LCPI0_0(%rip), %xmm1
	movq	32(%rbx), %rax
	movq	(%rax,%r12,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movq	24(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	callq	_Error
	movq	24(%rbx), %rax
	jmp	LBB0_4
LBB0_5:
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_VectorScale
	movq	8(%r15), %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r15), %esi
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_Log_Print
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	cmpq	%r15, %r13
	setne	%al
	movq	32(%rbx), %rcx
	movq	(%rcx,%rax,8), %rbx
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rbx), %r13
	xorl	%eax, %eax
	cmpq	%r15, %r13
	setne	%al
	xorl	(%rbx), %eax
	movq	_mapplanes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	movslq	%eax, %r12
	shlq	$4, %r12
	movq	(%r14,%r12), %rdi
	xorl	%esi, %esi
	callq	_DotProduct
	cmpq	8(%r14,%r12), %rax
	jge	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%rbx), %rax
	xorl	%r8d, %r8d
	movl	$0, %ecx
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rax), %ecx
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%rax), %r8d
	jmp	LBB0_12
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"face %d has no front area\n"

	.comm	_mapplanes,8,3                  ## @mapplanes
L_.str.1:                               ## @.str.1
	.asciz	"area %d face %d flipped: front area %d, back area %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_FlipAreaFaces              ; -- Begin function AAS_FlipAreaFaces
	.p2align	2
_AAS_FlipAreaFaces:                     ; @AAS_FlipAreaFaces
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_5
; %bb.1:
	movi	d8, #0000000000000000
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
	fmov	s9, #1.00000000
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x8, x19
	cset	w22, ne
	ldr	w0, [x21, #8]
	bl	_WindingCenter
	mov	x0, #0
	mov	x2, #0
	bl	_VectorAdd
	fadd	s8, s8, s9
	ldr	x8, [x21, #32]
	ldr	x21, [x8, w22, uxtw #3]
	cbz	x21, LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #24]
	cbnz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x21, #4]
	mov	x0, x20
	bl	_Error
	ldr	x8, [x21, #24]
	b	LBB0_2
LBB0_5:
	movi	d8, #0000000000000000
LBB0_6:
	fmov	s0, #1.00000000
	fdiv	s0, s0, s8
	mov	x0, #0
	mov	x1, #0
	bl	_VectorScale
	ldr	x21, [x19, #8]
	cbz	x21, LBB0_16
; %bb.7:
Lloh2:
	adrp	x22, _mapplanes@GOTPAGE
Lloh3:
	ldr	x22, [x22, _mapplanes@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w4, [x8]
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w1, [x19]
	ldr	w2, [x21, #4]
	mov	x0, x20
	bl	_Log_Print
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	x23, x19
	cset	w8, ne
	ldr	x9, [x21, #32]
	ldr	x21, [x9, w8, uxtw #3]
	cbz	x21, LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x21, #24]
	cmp	x23, x19
	cset	w8, ne
	ldr	x9, [x22]
	ldr	w10, [x21]
	eor	w8, w10, w8
	add	x24, x9, w8, sxtw #4
	ldr	x0, [x24]
	mov	x1, #0
	bl	_DotProduct
	ldr	x8, [x24, #8]
	cmp	x0, x8
	b.ge	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w3, [x8]
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_8
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w3, #0
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_8
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w4, #0
	b	LBB0_9
LBB0_16:
	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	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"face %d has no front area\n"

	.comm	_mapplanes,8,3                  ; @mapplanes
l_.str.1:                               ; @.str.1
	.asciz	"area %d face %d flipped: front area %d, back area %d\n"

.subsections_via_symbols
