	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_SubdivideArea_r            ## -- Begin function AAS_SubdivideArea_r
	.p2align	4, 0x90
_AAS_SubdivideArea_r:                   ## @AAS_SubdivideArea_r
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	leaq	-28(%rbp), %rdx
	callq	_AAS_FindBestAreaSplitPlane
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_numgravitationalsubdivisions@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	incl	%esi
	movl	%esi, (%rax)
	leaq	L_.str(%rip), %rdi
	callq	_qprintf
	movss	-28(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	callq	_FindFloatPlane
	movq	8(%r14), %rdi
	leaq	-48(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movl	%eax, %esi
	callq	_AAS_SplitArea
	movq	$0, 8(%r14)
	movss	-28(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	callq	_FindFloatPlane
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	callq	_AAS_AllocTmpNode
	movq	%rax, %r15
	movq	$0, 16(%rax)
	movq	-48(%rbp), %rax
	movq	%rax, 8(%r15)
	xorl	%eax, %eax
	callq	_AAS_AllocTmpNode
	movq	%rax, %rbx
	movq	$0, 16(%rax)
	movq	-40(%rbp), %rax
	movq	%rax, 8(%rbx)
	movq	%r15, %rdi
	callq	_AAS_SubdivideArea_r
	movq	(%r14), %rax
	movq	%r15, (%rax)
	movq	%rbx, %rdi
	callq	_AAS_SubdivideArea_r
	movq	(%r14), %rax
	movq	%rbx, 8(%rax)
LBB0_2:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\r%6d"

	.comm	_numgravitationalsubdivisions,4,2 ## @numgravitationalsubdivisions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_SubdivideArea_r            ; -- Begin function AAS_SubdivideArea_r
	.p2align	2
_AAS_SubdivideArea_r:                   ; @AAS_SubdivideArea_r
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x0, [x0, #8]
	add	x2, sp, #12
	bl	_AAS_FindBestAreaSplitPlane
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _numgravitationalsubdivisions@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numgravitationalsubdivisions@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w1, w9, #1
	str	w1, [x8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
	ldr	s0, [sp, #12]
	bl	_FindFloatPlane
	mov	x1, x0
	ldr	x0, [x19, #8]
	add	x2, sp, #24
	add	x3, sp, #16
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_AAS_SplitArea
	str	xzr, [x19, #8]
	ldr	s0, [sp, #12]
	bl	_FindFloatPlane
	str	x0, [x19, #16]
	bl	_AAS_AllocTmpNode
	mov	x20, x0
	ldr	x8, [sp, #24]
	stp	x8, xzr, [x0, #8]
	bl	_AAS_AllocTmpNode
	mov	x21, x0
	ldr	x8, [sp, #16]
	stp	x8, xzr, [x0, #8]
	mov	x0, x20
	bl	_AAS_SubdivideArea_r
	ldr	x8, [x19]
	str	x20, [x8]
	mov	x0, x21
	bl	_AAS_SubdivideArea_r
	ldr	x8, [x19]
	str	x21, [x8, #8]
LBB0_2:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\r%6d"

	.comm	_numgravitationalsubdivisions,4,2 ; @numgravitationalsubdivisions
.subsections_via_symbols
