	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_AASLinkEntity              ## -- Begin function AAS_AASLinkEntity
	.p2align	4, 0x90
_AAS_AASLinkEntity:                     ## @AAS_AASLinkEntity
	.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
	subq	$536, %rsp                      ## imm = 0x218
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, -576(%rbp)                ## 4-byte Spill
	movl	%edi, -572(%rbp)                ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_aasworld@GOTPCREL(%rip), %rax
	cmpl	$0, 24(%rax)
	je	LBB0_1
## %bb.2:
	movl	%edx, %ebx
	leaq	-560(%rbp), %r14
	movl	$1, -560(%rbp)
	leaq	-556(%rbp), %r12
	movq	%r14, %rcx
	xorl	%eax, %eax
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_13 Depth 3
	movq	%r12, %r15
	movq	%rax, -568(%rbp)                ## 8-byte Spill
	movq	%rcx, %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=2
	leaq	-560(%rbp), %r14
	movq	%r15, %r12
	leaq	-52(%rbp), %rax
	cmpq	%rax, %r15
	jae	LBB0_24
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%r12, %r15
	addq	$-4, %r12
	cmpq	%r14, %r12
	jb	LBB0_25
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_13 Depth 3
	movl	(%r12), %r13d
	testl	%r13d, %r13d
	js	LBB0_5
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=2
	testq	%r13, %r13
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_aasworld@GOTPCREL(%rip), %rax
	movq	8(%rax), %r14
	shlq	$4, %r13
	movq	(%r14,%r13), %rdx
	shlq	$2, %rdx
	addq	(%rax), %rdx
	movl	-572(%rbp), %edi                ## 4-byte Reload
	movl	-576(%rbp), %esi                ## 4-byte Reload
	callq	_AAS_BoxOnPlaneSide2
	testb	$1, %al
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%r12, %r15
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	_aasworld@GOTPCREL(%rip), %rax
	movq	16(%rax), %rax
	negl	%r13d
	movq	(%rax,%r13,8), %rax
	testq	%rax, %rax
	je	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	cmpl	%ebx, (%rax)
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=3
	movq	16(%rax), %rax
	testq	%rax, %rax
	jne	LBB0_13
	jmp	LBB0_7
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%r14,%r13), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r12)
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=2
	leaq	-52(%rbp), %rcx
	cmpq	%rcx, %r15
	jae	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_4 Depth=2
	testb	$2, %al
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%r14,%r13), %rax
	movl	4(%rax), %eax
	movl	%eax, (%r15)
	addq	$4, %r15
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %r15d
	xorl	%eax, %eax
	callq	_AAS_AllocAASLink
	testq	%rax, %rax
	je	LBB0_25
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, (%rax)
	movl	%r13d, 4(%rax)
	movq	$0, 24(%rax)
	movq	-568(%rbp), %rcx                ## 8-byte Reload
	movq	%rcx, 32(%rax)
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, 24(%rcx)
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 8(%rax)
	movq	_aasworld@GOTPCREL(%rip), %rcx
	movq	16(%rcx), %rcx
	movq	(%rcx,%r15,8), %rdx
	movq	%rdx, 16(%rax)
	movq	(%rcx,%r15,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, 8(%rdx)
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, (%rcx,%r15,8)
	leaq	-4(%r12), %rcx
	cmpq	%r14, %rcx
	jae	LBB0_3
	jmp	LBB0_26
LBB0_1:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	_PRT_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_24:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	_PRT_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	*(%rax)
LBB0_25:
	movq	-568(%rbp), %rax                ## 8-byte Reload
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_28
## %bb.27:
	addq	$536, %rsp                      ## imm = 0x218
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,32,3                  ## @aasworld
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_ERROR,4,2                  ## @PRT_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_LinkEntity: aas not loaded\n"

L_.str.1:                               ## @.str.1
	.asciz	"AAS_LinkEntity: stack overflow\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_AASLinkEntity              ; -- Begin function AAS_AASLinkEntity
	.p2align	2
_AAS_AASLinkEntity:                     ; @AAS_AASLinkEntity
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #544
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x22, _aasworld@GOTPAGE
Lloh4:
	ldr	x22, [x22, _aasworld@GOTPAGEOFF]
	ldr	w8, [x22, #24]
	cbz	w8, LBB0_21
; %bb.1:
	mov	x19, x2
	mov	x21, x0
	mov	x0, #0
	add	x23, sp, #16
	mov	w8, #1
	str	w8, [sp, #16]
	orr	x26, x23, #0x4
	add	x24, x23, #508
	add	x8, sp, #16
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
	mov	x27, x26
	mov	x25, x0
	mov	x26, x8
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x26, x27
	cmp	x27, x24
	b.hs	LBB0_22
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	x27, x26
	sub	x26, x26, #4
	cmp	x26, x23
	b.lo	LBB0_23
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	w28, [x26]
	tbnz	w28, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	cbz	w28, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldp	x8, x20, [x22]
	lsl	x9, x28, #4
	ldr	x9, [x20, x9]
	add	x2, x8, x9, lsl #2
	mov	x0, x21
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_AAS_BoxOnPlaneSide2
	tbnz	w0, #0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x27, x26
	cmp	x27, x24
	b.lo	LBB0_13
	b	LBB0_22
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldr	x8, [x22, #16]
	neg	w27, w28
	ldr	x8, [x8, w27, uxtw #3]
	cbz	x8, LBB0_15
LBB0_10:                                ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_5 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w9, [x8]
	cmp	w9, w19
	b.eq	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=3
	ldr	x8, [x8, #16]
	cbnz	x8, LBB0_10
	b	LBB0_15
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x8, x20, x28, lsl #4
	ldr	x8, [x8, #8]
	ldr	w8, [x8]
	str	w8, [x26]
	cmp	x27, x24
	b.hs	LBB0_22
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=2
	tbz	w0, #1, LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=2
	add	x8, x20, x28, lsl #4
	ldr	x8, [x8, #8]
	ldr	w8, [x8, #4]
	str	w8, [x27], #4
	b	LBB0_3
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_AAS_AllocAASLink
	cbz	x0, LBB0_23
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	stp	w19, w27, [x0]
	stp	xzr, x25, [x0, #24]
	cbz	x25, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x25, #24]
LBB0_18:                                ;   in Loop: Header=BB0_2 Depth=1
	str	xzr, [x0, #8]
	ldr	x8, [x22, #16]
	lsl	x9, x27, #3
	ldr	x10, [x8, x9]
	str	x10, [x0, #16]
	ldr	x9, [x8, x9]
	cbz	x9, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x9, #8]
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=1
	str	x0, [x8, x27, lsl #3]
	sub	x8, x26, #4
	cmp	x8, x23
	b.hs	LBB0_2
	b	LBB0_24
LBB0_21:
Lloh5:
	adrp	x8, _botimport@GOTPAGE
Lloh6:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _PRT_ERROR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PRT_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x9]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	mov	x0, #0
	b	LBB0_24
LBB0_22:
Lloh13:
	adrp	x8, _botimport@GOTPAGE
Lloh14:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _PRT_ERROR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PRT_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x9]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	blr	x8
LBB0_23:
	mov	x0, x25
LBB0_24:
	ldur	x8, [x29, #-96]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	add	sp, sp, #544
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,32,3                  ; @aasworld
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_ERROR,4,2                  ; @PRT_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_LinkEntity: aas not loaded\n"

l_.str.1:                               ; @.str.1
	.asciz	"AAS_LinkEntity: stack overflow\n"

.subsections_via_symbols
