	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_MergeAreas                 ## -- Begin function AAS_MergeAreas
	.p2align	4, 0x90
_AAS_MergeAreas:                        ## @AAS_MergeAreas
	.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
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_Write
	leaq	L_.str.1(%rip), %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_qprintf
	xorl	%r15d, %r15d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	testl	%r14d, %r14d
	je	LBB0_14
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	movq	_tmpaasworld@GOTPCREL(%rip), %rax
	movq	8(%rax), %r12
	testq	%r12, %r12
	je	LBB0_14
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=2
	movq	16(%r12), %r12
	testq	%r12, %r12
	je	LBB0_13
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	cmpq	$0, 8(%r12)
	jne	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	%r12, %rdi
	callq	_AAS_GroundArea
	testl	%eax, %eax
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	(%r12), %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_6 Depth=3
	xorl	%eax, %eax
	cmpq	%r12, %r13
	setne	%al
	movq	16(%rbx), %rcx
	movq	(%rcx,%rax,8), %rbx
LBB0_6:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_3 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	movq	(%rbx), %r13
	testq	%r13, %r13
	je	LBB0_26
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=3
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=3
	cmpq	%r12, %r13
	cmovneq	%r13, %rdi
	callq	_AAS_GroundArea
	testl	%eax, %eax
	je	LBB0_26
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%rbx, %rdi
	callq	_AAS_TryMergeFaceAreas
	testq	%rax, %rax
	je	LBB0_26
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=2
	incl	%r15d
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_qprintf
	incl	%r14d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_14 Depth=1
	testl	%r13d, %r13d
	je	LBB0_25
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
                                        ##       Child Loop BB0_18 Depth 3
	movq	_tmpaasworld@GOTPCREL(%rip), %rax
	movq	8(%rax), %r12
	testq	%r12, %r12
	je	LBB0_25
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=2
	movq	16(%r12), %r12
	testq	%r12, %r12
	je	LBB0_24
LBB0_16:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_18 Depth 3
	cmpq	$0, 8(%r12)
	jne	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	(%r12), %rbx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_18 Depth=3
	xorl	%eax, %eax
	cmpq	%r12, %r14
	setne	%al
	movq	16(%rbx), %rcx
	movq	(%rcx,%rax,8), %rbx
LBB0_18:                                ##   Parent Loop BB0_14 Depth=1
                                        ##     Parent Loop BB0_16 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_27
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=3
	cmpq	$0, 8(%rbx)
	je	LBB0_27
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=3
	movq	%rbx, %rdi
	callq	_AAS_TryMergeFaceAreas
	testq	%rax, %rax
	je	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=2
	incl	%r15d
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_qprintf
	incl	%r13d
	jmp	LBB0_23
LBB0_25:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_qprintf
	leaq	L_.str.4(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_Log_Write
	movq	_tmpaasworld@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AAS_RefreshMergedTree_r        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_MergeAreas\r\n"

L_.str.1:                               ## @.str.1
	.asciz	"%6d areas merged"

	.comm	_tmpaasworld,16,3               ## @tmpaasworld
L_.str.2:                               ## @.str.2
	.asciz	"\r%6d"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

L_.str.4:                               ## @.str.4
	.asciz	"%6d areas merged\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_MergeAreas                 ; -- Begin function AAS_MergeAreas
	.p2align	2
_AAS_MergeAreas:                        ; @AAS_MergeAreas
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Write
	mov	w8, #1
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_qprintf
	mov	w23, #0
Lloh4:
	adrp	x22, _tmpaasworld@GOTPAGE
Lloh5:
	ldr	x22, [x22, _tmpaasworld@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str.2@PAGE
Lloh7:
	add	x19, x19, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbz	w24, LBB0_14
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	x20, [x22, #8]
	cbz	x20, LBB0_14
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w24, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldr	x20, [x20, #16]
	cbz	x20, LBB0_1
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x0, x20
	bl	_AAS_GroundArea
	cbz	w0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x21, [x20]
	cbnz	x21, LBB0_9
	b	LBB0_4
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=3
	cmp	x25, x20
	cset	w8, ne
	ldr	x9, [x21, #16]
	ldr	x21, [x9, w8, uxtw #3]
	cbz	x21, LBB0_4
LBB0_9:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x25, [x21]
	cbz	x25, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=3
	cmp	x25, x20
	csel	x0, x8, x25, eq
	bl	_AAS_GroundArea
	cbz	w0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x21
	bl	_AAS_TryMergeFaceAreas
	cbz	x0, LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=2
	add	w23, w23, #1
	str	x23, [sp]
	mov	x0, x19
	bl	_qprintf
	add	w24, w24, #1
	b	LBB0_4
LBB0_14:
Lloh8:
	adrp	x19, l_.str.2@PAGE
Lloh9:
	add	x19, x19, l_.str.2@PAGEOFF
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	cbz	w24, LBB0_26
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
                                        ;       Child Loop BB0_22 Depth 3
	ldr	x21, [x22, #8]
	cbz	x21, LBB0_26
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w24, #0
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=2
	ldr	x21, [x21, #16]
	cbz	x21, LBB0_15
LBB0_19:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_22 Depth 3
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	ldr	x20, [x21]
	cbnz	x20, LBB0_22
	b	LBB0_18
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=3
	cmp	x25, x21
	cset	w8, ne
	ldr	x9, [x20, #16]
	ldr	x20, [x9, w8, uxtw #3]
	cbz	x20, LBB0_18
LBB0_22:                                ;   Parent Loop BB0_16 Depth=1
                                        ;     Parent Loop BB0_19 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x25, [x20]
	cbz	x25, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=3
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_21
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=3
	mov	x0, x20
	bl	_AAS_TryMergeFaceAreas
	cbz	x0, LBB0_21
; %bb.25:                               ;   in Loop: Header=BB0_19 Depth=2
	add	w23, w23, #1
	str	x23, [sp]
	mov	x0, x19
	bl	_qprintf
	add	w24, w24, #1
	b	LBB0_18
LBB0_26:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_qprintf
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	str	x23, [sp]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Log_Write
	ldr	w0, [x22]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_AAS_RefreshMergedTree_r
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_MergeAreas\r\n"

l_.str.1:                               ; @.str.1
	.asciz	"%6d areas merged"

	.comm	_tmpaasworld,16,3               ; @tmpaasworld
l_.str.2:                               ; @.str.2
	.asciz	"\r%6d"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

l_.str.4:                               ; @.str.4
	.asciz	"%6d areas merged\r\n"

.subsections_via_symbols
