	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_TryMergeFaces              ## -- Begin function AAS_TryMergeFaces
	.p2align	4, 0x90
_AAS_TryMergeFaces:                     ## @AAS_TryMergeFaces
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	xorl	%r14d, %r14d
	cmpq	(%rsi), %rax
	jne	LBB0_16
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	cmpq	8(%rsi), %rax
	jne	LBB0_16
## %bb.2:
	movq	16(%rbx), %rcx
	cmpq	16(%r15), %rcx
	jne	LBB0_16
## %bb.3:
	movq	24(%rbx), %r8
	movq	24(%r15), %rsi
	cmpq	%rsi, %r8
	jne	LBB0_14
## %bb.4:
	movq	40(%rbx), %rdi
	movq	40(%r15), %rsi
	movq	_mapplanes@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%r8,4), %edx
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	callq	_MergeWindings
	jmp	LBB0_8
LBB0_14:
	xorq	%r8, %rsi
	cmpq	$1, %rsi
	ja	LBB0_16
## %bb.15:
	movl	32(%rbx), %esi
	movl	32(%r15), %edx
	leaq	L_.str(%rip), %rdi
	callq	_Log_Write
	jmp	LBB0_16
LBB0_7:
	callq	_TryMergeWinding
LBB0_8:
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_16
## %bb.9:
	movq	40(%rbx), %rdi
	callq	_FreeWinding
	movq	%r12, 40(%rbx)
	movq	8(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	_AAS_RemoveFaceFromArea
LBB0_11:
	movq	16(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_AAS_RemoveFaceFromArea
LBB0_13:
	movq	%r15, %rdi
	callq	_AAS_FreeTmpFace
	movl	$1, %r14d
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mapplanes,8,3                  ## @mapplanes
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"face %d and %d, same front and back area but flipped planes\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_TryMergeFaces              ; -- Begin function AAS_TryMergeFaces
	.p2align	2
_AAS_TryMergeFaces:                     ; @AAS_TryMergeFaces
	.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
	ldr	x8, [x0]
	ldr	x9, [x1]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x1, #8]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.2:
	ldr	x9, [x20, #16]
	ldr	x10, [x19, #16]
	cmp	x9, x10
	b.ne	LBB0_15
; %bb.3:
	ldr	x10, [x20, #24]
	ldr	x11, [x19, #24]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.4:
	ldr	x0, [x20, #40]
	ldr	x1, [x19, #40]
Lloh0:
	adrp	x11, _mapplanes@GOTPAGE
Lloh1:
	ldr	x11, [x11, _mapplanes@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	ldr	w2, [x11, x10, lsl #2]
	cbz	x8, LBB0_9
; %bb.5:
	cbz	x9, LBB0_9
; %bb.6:
	bl	_MergeWindings
	mov	x21, x0
	cbnz	x0, LBB0_10
	b	LBB0_15
LBB0_7:
	eor	x8, x11, x10
	cmp	x8, #1
	b.hi	LBB0_15
; %bb.8:
	ldr	w1, [x20, #32]
	ldr	w2, [x19, #32]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Write
	b	LBB0_15
LBB0_9:
	bl	_TryMergeWinding
	mov	x21, x0
	cbz	x0, LBB0_15
LBB0_10:
	ldr	x0, [x20, #40]
	bl	_FreeWinding
	str	x21, [x20, #40]
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_AAS_RemoveFaceFromArea
LBB0_12:
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_AAS_RemoveFaceFromArea
LBB0_14:
	mov	x0, x19
	bl	_AAS_FreeTmpFace
	mov	w0, #1
	b	LBB0_16
LBB0_15:
	mov	w0, #0
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
	.cfi_endproc
                                        ; -- End function
	.comm	_mapplanes,8,3                  ; @mapplanes
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"face %d and %d, same front and back area but flipped planes\r\n"

.subsections_via_symbols
