	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetPlane                   ## -- Begin function AAS_GetPlane
	.p2align	4, 0x90
_AAS_GetPlane:                          ## @AAS_GetPlane
	.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	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %ebx
	callq	_AAS_FindHashedPlane
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jne	LBB0_4
## %bb.1:
	movq	_aasworld@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movq	_max_aas@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leal	-1(%rsi), %ecx
	cmpl	%ecx, %eax
	jl	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_Error
	movl	(%r12), %eax
LBB0_3:
	movq	8(%r12), %r13
	cltq
	leaq	(%rax,%rax,2), %r12
	movq	(%r13,%r12,8), %rsi
	movl	%ebx, %edi
	callq	_VectorCopy
	movq	%r15, 16(%r13,%r12,8)
	movl	%ebx, %edi
	callq	_AAS_PlaneTypeForNormal
	movl	%eax, 8(%r13,%r12,8)
	movq	_aasworld@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	movl	%eax, (%r14)
	movl	(%rcx), %edi
	leal	1(%rdi), %eax
	movl	%eax, (%rcx)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_AAS_AddPlaneToHash
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,16,3                  ## @aasworld
	.comm	_max_aas,4,2                    ## @max_aas
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_MAX_PLANES = %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetPlane                   ; -- Begin function AAS_GetPlane
	.p2align	2
_AAS_GetPlane:                          ; @AAS_GetPlane
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_AAS_FindHashedPlane
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_5
LBB0_2:
Lloh0:
	adrp	x22, _aasworld@GOTPAGE
Lloh1:
	ldr	x22, [x22, _aasworld@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _max_aas@GOTPAGE
Lloh3:
	ldr	x9, [x9, _max_aas@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x9]
	sub	w9, w1, #1
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [x22]
LBB0_4:
	ldr	x9, [x22, #8]
	mov	w10, #24
	smaddl	x23, w8, w10, x9
	ldr	x1, [x23]
	mov	x0, x20
	bl	_VectorCopy
	str	x21, [x23, #16]
	mov	x0, x20
	bl	_AAS_PlaneTypeForNormal
	str	w0, [x23, #8]
	ldr	w8, [x22]
	str	w8, [x19]
	ldr	w0, [x22]
	add	w8, w0, #1
	str	w8, [x22]
	bl	_AAS_AddPlaneToHash
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,16,3                  ; @aasworld
	.comm	_max_aas,4,2                    ; @max_aas
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_MAX_PLANES = %d"

.subsections_via_symbols
