	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_MergePlaneFaces            ## -- Begin function AAS_MergePlaneFaces
	.p2align	4, 0x90
_AAS_MergePlaneFaces:                   ## @AAS_MergePlaneFaces
	.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), %r13
	testq	%r13, %r13
	je	LBB0_14
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8,%r14,8), %r13
	testq	%r13, %r13
	je	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	xorl	%r14d, %r14d
	cmpq	%rdi, 24(%r13)
	setne	%r14b
	movq	8(%r13), %r8
	cmpl	%r15d, (%r13)
	jne	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r8,%r14,8), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	movb	%dl, %cl
	shlq	$3, %rcx
	addq	8(%rbx), %rcx
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%ecx, %ecx
	cmpq	%rdi, 24(%rbx)
	setne	%dl
	movl	(%rbx), %eax
	xorl	%r15d, %eax
	cmpl	$1, %eax
	ja	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	32(%r13), %rdi
	movq	32(%rbx), %rsi
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%r13), %rcx
	movl	(%rax,%rcx,4), %edx
	callq	_MergeWindings
	movq	%rax, %r12
	movq	32(%r13), %rdi
	callq	_FreeWinding
	movq	%r12, 32(%r13)
	movq	24(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rdi
	callq	_AAS_RemoveFaceFromArea
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rdi
	callq	_AAS_RemoveFaceFromArea
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	%rbx, %rdi
	callq	_AAS_FreeTmpFace
	movq	8(%r13), %r8
	leaq	(%r8,%r14,8), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rcx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
	jmp	LBB0_13
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mapplanes,8,3                  ## @mapplanes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_MergePlaneFaces            ; -- Begin function AAS_MergePlaneFaces
	.p2align	2
_AAS_MergePlaneFaces:                   ; @AAS_MergePlaneFaces
	.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
	ldr	x24, [x0]
	cbz	x24, LBB0_12
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _mapplanes@GOTPAGE
Lloh1:
	ldr	x23, [x23, _mapplanes@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x24, [x8, x25, lsl #3]
	cbz	x24, LBB0_12
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x8, [x24, #24]
	cmp	x8, x20
	cset	w25, ne
	ldr	w9, [x24]
	ldr	x8, [x24, #8]
	cmp	w9, w19
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x21, [x8, x25, lsl #3]
	cbnz	x21, LBB0_6
	b	LBB0_2
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	x10, [x21, #8]
	add	x9, x10, w9, uxtw #3
	ldr	x21, [x9]
	cbz	x21, LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x21, #24]
	cmp	x9, x20
	cset	w9, ne
	ldr	w10, [x21]
	eor	w10, w10, w19
	cmp	w10, #1
	b.hi	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x0, [x24, #32]
	ldr	x1, [x21, #32]
	ldr	x8, [x23]
	ldrsw	x9, [x24]
	ldr	w2, [x8, x9, lsl #2]
	bl	_MergeWindings
	mov	x22, x0
	ldr	x0, [x24, #32]
	bl	_FreeWinding
	str	x22, [x24, #32]
	ldr	x1, [x21, #24]
	cbz	x1, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x21
	bl	_AAS_RemoveFaceFromArea
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldr	x1, [x21, #16]
	cbz	x1, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x21
	bl	_AAS_RemoveFaceFromArea
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x21
	bl	_AAS_FreeTmpFace
	ldr	x8, [x24, #8]
	add	x9, x8, x25, lsl #3
	ldr	x21, [x9]
	cbnz	x21, LBB0_6
	b	LBB0_2
LBB0_12:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_mapplanes,8,3                  ; @mapplanes
.subsections_via_symbols
