	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_AllocMaxAAS                ## -- Begin function AAS_AllocMaxAAS
	.p2align	4, 0x90
_AAS_AllocMaxAAS:                       ## @AAS_AllocMaxAAS
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_AAS_InitMaxAAS
	movq	_aasworld@GOTPCREL(%rip), %r14
	movq	$0, 216(%r14)
	movq	_max_aas@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	(%rbx), %ecx
	shll	$2, %ecx
	movq	_allocatedaasmem@GOTPCREL(%rip), %r15
	addl	%ecx, (%r15)
	movq	%rax, 208(%r14)
	movl	4(%rbx), %edi
	movq	$0, 200(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	4(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 192(%r14)
	movl	8(%rbx), %edi
	movq	$0, 184(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	8(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 176(%r14)
	movl	12(%rbx), %edi
	movq	$0, 168(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	12(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 160(%r14)
	movl	16(%rbx), %edi
	movq	$0, 152(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	16(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 144(%r14)
	movl	20(%rbx), %edi
	movq	$0, 136(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	20(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 128(%r14)
	movl	24(%rbx), %edi
	movq	$0, 120(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	24(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 112(%r14)
	movl	28(%rbx), %edi
	movq	$0, 104(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	28(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 96(%r14)
	movl	32(%rbx), %edi
	movq	$0, 88(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	32(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 80(%r14)
	movl	36(%rbx), %edi
	movq	$0, 72(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	36(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 64(%r14)
	movl	40(%rbx), %edi
	movq	$0, 56(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	40(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 48(%r14)
	movl	44(%rbx), %edi
	movq	$0, 40(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	44(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 32(%r14)
	movl	48(%rbx), %edi
	movq	$0, 24(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movl	48(%rbx), %ecx
	shll	$2, %ecx
	addl	%ecx, (%r15)
	movq	%rax, 16(%r14)
	movl	52(%rbx), %edi
	movq	$0, 8(%r14)
	shll	$2, %edi
	callq	_GetClearedMemory
	movq	%rax, (%r14)
	movl	52(%rbx), %eax
	shll	$2, %eax
	addl	%eax, (%r15)
	leaq	L_.str(%rip), %rdi
	callq	_Log_Print
	movl	(%r15), %edi
	callq	_PrintMemorySize
	leaq	L_.str.1(%rip), %rdi
	callq	_Log_Print
	movl	4(%rbx), %edi
	shll	$2, %edi
	callq	_GetClearedMemory
	movq	_aas_vertexchain@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	movl	8(%rbx), %edi
	shll	$2, %edi
	callq	_GetClearedMemory
	movq	_aas_planechain@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	movl	12(%rbx), %edi
	shll	$2, %edi
	callq	_GetClearedMemory
	movq	_aas_edgechain@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpl	$0, 4(%rbx)
	jle	LBB0_3
## %bb.1:
	movq	(%r15), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rcx,%rdx,4)
	incq	%rdx
	movslq	4(%rbx), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_2
LBB0_3:
	movq	_VERTEX_HASH_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	imull	%edx, %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.4:
	movq	_aas_hashverts@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rdx,%rsi,4)
	incq	%rsi
	movl	(%rcx), %edi
	imull	%edi, %edi
	cmpq	%rdi, %rsi
	jb	LBB0_5
LBB0_6:
	cmpl	$0, 8(%rbx)
	jle	LBB0_9
## %bb.7:
	movq	(%r14), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rcx,%rdx,4)
	incq	%rdx
	movslq	8(%rbx), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_8
LBB0_9:
	movq	_PLANE_HASH_SIZE@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_12
## %bb.10:
	movq	_aas_hashplanes@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rdx,%rsi,4)
	incq	%rsi
	movslq	(%rcx), %rdi
	cmpq	%rdi, %rsi
	jl	LBB0_11
LBB0_12:
	cmpl	$0, 12(%rbx)
	jle	LBB0_15
## %bb.13:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rax,%rcx,4)
	incq	%rcx
	movslq	12(%rbx), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_14
LBB0_15:
	movq	_EDGE_HASH_SIZE@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_18
## %bb.16:
	movq	_aas_hashedges@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	$-1, (%rcx,%rdx,4)
	incq	%rdx
	movslq	(%rax), %rsi
	cmpq	%rsi, %rdx
	jl	LBB0_17
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,224,3                 ## @aasworld
	.comm	_max_aas,56,2                   ## @max_aas
	.comm	_allocatedaasmem,4,2            ## @allocatedaasmem
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocated "

L_.str.1:                               ## @.str.1
	.asciz	" of AAS memory\n"

	.comm	_aas_vertexchain,8,3            ## @aas_vertexchain
	.comm	_aas_planechain,8,3             ## @aas_planechain
	.comm	_aas_edgechain,8,3              ## @aas_edgechain
	.comm	_VERTEX_HASH_SIZE,4,2           ## @VERTEX_HASH_SIZE
	.comm	_aas_hashverts,8,3              ## @aas_hashverts
	.comm	_PLANE_HASH_SIZE,4,2            ## @PLANE_HASH_SIZE
	.comm	_aas_hashplanes,8,3             ## @aas_hashplanes
	.comm	_EDGE_HASH_SIZE,4,2             ## @EDGE_HASH_SIZE
	.comm	_aas_hashedges,8,3              ## @aas_hashedges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_AllocMaxAAS                ; -- Begin function AAS_AllocMaxAAS
	.p2align	2
_AAS_AllocMaxAAS:                       ; @AAS_AllocMaxAAS
	.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
	bl	_AAS_InitMaxAAS
Lloh0:
	adrp	x20, _aasworld@GOTPAGE
Lloh1:
	ldr	x20, [x20, _aasworld@GOTPAGEOFF]
	str	xzr, [x20, #216]
Lloh2:
	adrp	x19, _max_aas@GOTPAGE
Lloh3:
	ldr	x19, [x19, _max_aas@GOTPAGEOFF]
	ldr	w8, [x19]
	lsl	w0, w8, #2
	bl	_GetClearedMemory
Lloh4:
	adrp	x21, _allocatedaasmem@GOTPAGE
Lloh5:
	ldr	x21, [x21, _allocatedaasmem@GOTPAGEOFF]
	ldr	w8, [x21]
	ldp	w9, w10, [x19]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #200]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #4]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #184]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #8]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #168]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #12]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #152]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #16]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #136]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #20]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #120]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #24]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #104]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #28]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #88]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #32]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #72]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #36]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #56]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #40]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #40]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #44]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #24]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	ldr	w8, [x21]
	ldp	w9, w10, [x19, #48]
	add	w8, w8, w9, lsl #2
	str	w8, [x21]
	stp	xzr, x0, [x20, #8]
	lsl	w0, w10, #2
	bl	_GetClearedMemory
	str	x0, [x20]
	ldr	w8, [x19, #52]
	ldr	w9, [x21]
	add	w8, w9, w8, lsl #2
	str	w8, [x21]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Print
	ldr	w0, [x21]
	bl	_PrintMemorySize
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_Print
	ldr	w8, [x19, #4]
	lsl	w0, w8, #2
	bl	_GetClearedMemory
Lloh10:
	adrp	x21, _aas_vertexchain@GOTPAGE
Lloh11:
	ldr	x21, [x21, _aas_vertexchain@GOTPAGEOFF]
	str	x0, [x21]
	ldr	w8, [x19, #8]
	lsl	w0, w8, #2
	bl	_GetClearedMemory
Lloh12:
	adrp	x20, _aas_planechain@GOTPAGE
Lloh13:
	ldr	x20, [x20, _aas_planechain@GOTPAGEOFF]
	str	x0, [x20]
	ldr	w8, [x19, #12]
	lsl	w0, w8, #2
	bl	_GetClearedMemory
Lloh14:
	adrp	x8, _aas_edgechain@GOTPAGE
Lloh15:
	ldr	x8, [x8, _aas_edgechain@GOTPAGEOFF]
Lloh16:
	str	x0, [x8]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x8, #0
	ldr	x9, [x21]
	mov	w10, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	w10, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x11, [x19, #4]
	cmp	x8, x11
	b.lt	LBB0_2
LBB0_3:
Lloh17:
	adrp	x8, _VERTEX_HASH_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VERTEX_HASH_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
	mul	w9, w9, w9
	cbz	w9, LBB0_6
; %bb.4:
	mov	x9, #0
Lloh19:
	adrp	x10, _aas_hashverts@GOTPAGE
Lloh20:
	ldr	x10, [x10, _aas_hashverts@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	mov	w11, #-1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldr	w12, [x8]
	mul	w12, w12, w12
	cmp	x9, x12
	b.lo	LBB0_5
LBB0_6:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x8, #0
	ldr	x9, [x20]
	mov	w10, #-1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	w10, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x11, [x19, #8]
	cmp	x8, x11
	b.lt	LBB0_8
LBB0_9:
Lloh22:
	adrp	x8, _PLANE_HASH_SIZE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PLANE_HASH_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x9, #0
Lloh24:
	adrp	x10, _aas_hashplanes@GOTPAGE
Lloh25:
	ldr	x10, [x10, _aas_hashplanes@GOTPAGEOFF]
Lloh26:
	ldr	x10, [x10]
	mov	w11, #-1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_11
LBB0_12:
	ldr	w8, [x19, #12]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x8, #0
	mov	w9, #-1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	str	w9, [x0, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x10, [x19, #12]
	cmp	x8, x10
	b.lt	LBB0_14
LBB0_15:
Lloh27:
	adrp	x8, _EDGE_HASH_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EDGE_HASH_SIZE@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x9, #0
Lloh29:
	adrp	x10, _aas_hashedges@GOTPAGE
Lloh30:
	ldr	x10, [x10, _aas_hashedges@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	mov	w11, #-1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	str	w11, [x10, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_17
LBB0_18:
	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 AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,224,3                 ; @aasworld
	.comm	_max_aas,56,2                   ; @max_aas
	.comm	_allocatedaasmem,4,2            ; @allocatedaasmem
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocated "

l_.str.1:                               ; @.str.1
	.asciz	" of AAS memory\n"

	.comm	_aas_vertexchain,8,3            ; @aas_vertexchain
	.comm	_aas_planechain,8,3             ; @aas_planechain
	.comm	_aas_edgechain,8,3              ; @aas_edgechain
	.comm	_VERTEX_HASH_SIZE,4,2           ; @VERTEX_HASH_SIZE
	.comm	_aas_hashverts,8,3              ; @aas_hashverts
	.comm	_PLANE_HASH_SIZE,4,2            ; @PLANE_HASH_SIZE
	.comm	_aas_hashplanes,8,3             ; @aas_hashplanes
	.comm	_EDGE_HASH_SIZE,4,2             ; @EDGE_HASH_SIZE
	.comm	_aas_hashedges,8,3              ; @aas_hashedges
.subsections_via_symbols
