	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_UpdateEntity               ## -- Begin function AAS_UpdateEntity
	.p2align	4, 0x90
_AAS_UpdateEntity:                      ## @AAS_UpdateEntity
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_aasworld@GOTPCREL(%rip), %r15
	cmpl	$0, 16(%r15)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movl	%edi, %r14d
	movq	8(%r15), %r13
	movslq	%edi, %rbx
	shlq	$7, %rbx
	leaq	(%rbx,%r13), %rax
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.4:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_AAS_Time
	subq	16(%r13,%rbx), %rax
	movq	%rax, 120(%r13,%rbx)
	movl	72(%r12), %eax
	movl	%eax, 112(%r13,%rbx)
	movl	68(%r12), %eax
	movl	%eax, 108(%r13,%rbx)
	xorl	%eax, %eax
	callq	_AAS_Time
	movq	%rax, 16(%r13,%rbx)
	movl	36(%r13,%rbx), %edi
	movl	104(%r13,%rbx), %esi
	callq	_VectorCopy
	movl	64(%r12), %edi
	movl	100(%r13,%rbx), %esi
	callq	_VectorCopy
	movq	(%r12), %rax
	movq	%rax, 24(%r13,%rbx)
	movl	60(%r12), %ecx
	movl	%ecx, 96(%r13,%rbx)
	movl	56(%r12), %ecx
	movl	%ecx, 52(%r13,%rbx)
	movups	40(%r12), %xmm0
	movups	%xmm0, 80(%r13,%rbx)
	movups	24(%r12), %xmm0
	movups	%xmm0, 64(%r13,%rbx)
	movl	%r14d, 32(%r13,%rbx)
	movq	_qtrue@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, 56(%r13,%rbx)
	cmpl	$1, (%r15)
	je	LBB0_6
## %bb.5:
	movq	_qfalse@GOTPCREL(%rip), %rcx
LBB0_6:
	leaq	(%rbx,%r13), %r15
	addq	$36, %r15
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	_SOLID_BSP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.7:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r13), %r15
	addq	$52, %r15
	movl	12(%r12), %edi
	movl	48(%r13,%rbx), %esi
	callq	_VectorCompare
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movl	12(%r12), %edi
	movl	-4(%r15), %esi
	callq	_VectorCopy
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_9:
	movl	(%r15), %edi
	movl	-4(%r15), %esi
	movl	40(%r13,%rbx), %ecx
	movl	44(%r13,%rbx), %edx
	xorl	%r8d, %r8d
	callq	_AAS_BSPModelMinsMaxsOrigin
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_1:
	movq	_botimport@GOTPCREL(%rip), %rax
	movq	_PRT_MESSAGE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	callq	*(%rax)
	movq	_BLERR_NOAASFILE@GOTPCREL(%rip), %r12
	jmp	LBB0_20
LBB0_3:
	movq	8(%r13,%rbx), %rdi
	movq	%rax, %rbx
	callq	_AAS_UnlinkFromAreas
	movq	(%rbx), %rdi
	callq	_AAS_UnlinkFromBSPLeaves
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movq	_BLERR_NOERROR@GOTPCREL(%rip), %r12
	jmp	LBB0_20
LBB0_10:
	movq	_SOLID_BBOX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.11:
	movl	20(%r12), %edi
	movl	44(%r13,%rbx), %esi
	callq	_VectorCompare
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	16(%r12), %edi
	movl	40(%r13,%rbx), %esi
	callq	_VectorCompare
	testl	%eax, %eax
	jne	LBB0_14
LBB0_13:
	leaq	(%rbx,%r13), %rax
	addq	$44, %rax
	movl	20(%r12), %edi
	movl	(%rax), %esi
	callq	_VectorCopy
	movl	16(%r12), %edi
	movl	40(%r13,%rbx), %esi
	callq	_VectorCopy
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_14:
	movl	12(%r12), %edi
	movl	48(%r13,%rbx), %esi
	callq	_VectorCopy
LBB0_15:
	movl	8(%r12), %edi
	movl	(%r15), %esi
	callq	_VectorCompare
	testl	%eax, %eax
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_17
## %bb.16:
	movl	8(%r12), %edi
	movl	(%r15), %esi
	callq	_VectorCopy
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_17:
	movq	_BLERR_NOERROR@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	movq	_ENTITYNUM_WORLD@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_20
## %bb.19:
	movl	44(%r13,%rbx), %edi
	movl	(%r15), %esi
	callq	_VectorAdd
	movl	40(%r13,%rbx), %edi
	movl	(%r15), %esi
	callq	_VectorAdd
	movq	8(%r13,%rbx), %rdi
	callq	_AAS_UnlinkFromAreas
	movq	_PRESENCE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %edx
	callq	_AAS_LinkEntityClientBBox
	movq	%rax, 8(%r13,%rbx)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_AAS_UnlinkFromBSPLeaves
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_AAS_BSPLinkEntity
	movq	%rax, (%rbx)
LBB0_20:
	movl	(%r12), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,24,3                  ## @aasworld
	.comm	_botimport,8,3                  ## @botimport
	.comm	_PRT_MESSAGE,4,2                ## @PRT_MESSAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_UpdateEntity: not loaded\n"

	.comm	_BLERR_NOAASFILE,4,2            ## @BLERR_NOAASFILE
	.comm	_BLERR_NOERROR,4,2              ## @BLERR_NOERROR
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_SOLID_BSP,8,3                  ## @SOLID_BSP
	.comm	_SOLID_BBOX,8,3                 ## @SOLID_BBOX
	.comm	_ENTITYNUM_WORLD,4,2            ## @ENTITYNUM_WORLD
	.comm	_PRESENCE_NORMAL,4,2            ## @PRESENCE_NORMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_UpdateEntity               ; -- Begin function AAS_UpdateEntity
	.p2align	2
_AAS_UpdateEntity:                      ; @AAS_UpdateEntity
	.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
Lloh0:
	adrp	x26, _aasworld@GOTPAGE
Lloh1:
	ldr	x26, [x26, _aasworld@GOTPAGEOFF]
	ldr	w8, [x26, #16]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x26, #8]
	sxtw	x23, w19
	add	x21, x22, x23, lsl #7
	cbz	x1, LBB0_7
; %bb.2:
	bl	_AAS_Time
	ldr	x8, [x21, #16]
	sub	x8, x0, x8
	str	x8, [x21, #120]
	ldur	d0, [x20, #68]
	stur	d0, [x21, #108]
	bl	_AAS_Time
	str	x0, [x21, #16]
	mov	x24, x21
	ldr	w0, [x24, #36]!
	ldr	w1, [x21, #104]
	bl	_VectorCopy
	ldr	w0, [x20, #64]
	ldr	w1, [x21, #100]
	bl	_VectorCopy
	ldr	x8, [x20]
	mov	x27, x21
	ldp	w9, w10, [x20, #56]
	str	w9, [x27, #52]!
	stur	x8, [x27, #-28]
	str	w10, [x27, #44]
	ldur	q0, [x20, #40]
	stur	q0, [x27, #28]
	ldur	q0, [x20, #24]
	stur	q0, [x27, #12]
	stur	w19, [x27, #-20]
Lloh2:
	adrp	x28, _qtrue@GOTPAGE
Lloh3:
	ldr	x28, [x28, _qtrue@GOTPAGEOFF]
	ldr	x9, [x28]
	stur	x9, [x27, #4]
	ldr	w9, [x26]
Lloh4:
	adrp	x10, _qfalse@GOTPAGE
Lloh5:
	ldr	x10, [x10, _qfalse@GOTPAGEOFF]
	cmp	w9, #1
	csel	x9, x28, x10, eq
	ldr	w26, [x9]
Lloh6:
	adrp	x9, _SOLID_BSP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SOLID_BSP@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	w0, [x20, #12]
	add	x25, x22, x23, lsl #7
	mov	x28, x25
	ldr	w1, [x28, #48]!
	bl	_VectorCompare
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x20, #12]
	ldr	w1, [x28]
	bl	_VectorCopy
Lloh9:
	adrp	x8, _qtrue@GOTPAGE
Lloh10:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh11:
	ldr	w26, [x8]
LBB0_5:
	ldr	w0, [x27]
	ldr	w1, [x28]
	ldp	w3, w2, [x25, #40]
	mov	x4, #0
	bl	_AAS_BSPModelMinsMaxsOrigin
Lloh12:
	adrp	x28, _qtrue@GOTPAGE
Lloh13:
	ldr	x28, [x28, _qtrue@GOTPAGEOFF]
	b	LBB0_13
LBB0_6:
Lloh14:
	adrp	x8, _botimport@GOTPAGE
Lloh15:
	ldr	x8, [x8, _botimport@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _PRT_MESSAGE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PRT_MESSAGE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x9]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
Lloh22:
	adrp	x8, _BLERR_NOAASFILE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BLERR_NOAASFILE@GOTPAGEOFF]
	b	LBB0_19
LBB0_7:
	ldr	x0, [x21, #8]
	bl	_AAS_UnlinkFromAreas
	ldr	x0, [x21]
	bl	_AAS_UnlinkFromBSPLeaves
	stp	xzr, xzr, [x21]
	b	LBB0_18
LBB0_8:
Lloh24:
	adrp	x9, _SOLID_BBOX@GOTPAGE
Lloh25:
	ldr	x9, [x9, _SOLID_BBOX@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.9:
	ldr	w0, [x20, #20]
	add	x27, x22, x23, lsl #7
	mov	x25, x27
	ldr	w1, [x25, #44]!
	bl	_VectorCompare
	cbz	w0, LBB0_11
; %bb.10:
	ldr	w0, [x20, #16]
	ldr	w1, [x27, #40]
	bl	_VectorCompare
	cbnz	w0, LBB0_12
LBB0_11:
	ldr	w0, [x20, #20]
	ldr	w1, [x25]
	bl	_VectorCopy
	ldr	w0, [x20, #16]
	ldr	w1, [x27, #40]
	bl	_VectorCopy
	ldr	w26, [x28]
LBB0_12:
	ldr	w0, [x20, #12]
	add	x8, x22, x23, lsl #7
	ldr	w1, [x8, #48]
	bl	_VectorCopy
LBB0_13:
	ldr	w0, [x20, #8]
	ldr	w1, [x24]
	bl	_VectorCompare
	cbnz	w0, LBB0_15
; %bb.14:
	ldr	w0, [x20, #8]
	ldr	w1, [x24]
	bl	_VectorCopy
	ldr	w26, [x28]
LBB0_15:
Lloh27:
	adrp	x8, _BLERR_NOERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _BLERR_NOERROR@GOTPAGEOFF]
	cbz	w26, LBB0_19
; %bb.16:
Lloh29:
	adrp	x9, _ENTITYNUM_WORLD@GOTPAGE
Lloh30:
	ldr	x9, [x9, _ENTITYNUM_WORLD@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	cmp	w9, w19
	b.eq	LBB0_19
; %bb.17:
	add	x20, x22, x23, lsl #7
	ldr	w0, [x20, #44]
	ldr	w1, [x24]
	bl	_VectorAdd
	ldr	w0, [x20, #40]
	ldr	w1, [x24]
	bl	_VectorAdd
	ldr	x0, [x20, #8]
	bl	_AAS_UnlinkFromAreas
Lloh32:
	adrp	x8, _PRESENCE_NORMAL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _PRESENCE_NORMAL@GOTPAGEOFF]
Lloh34:
	ldr	w3, [x8]
	mov	x2, x19
	bl	_AAS_LinkEntityClientBBox
	str	x0, [x20, #8]
	ldr	x0, [x21]
	bl	_AAS_UnlinkFromBSPLeaves
	mov	x2, x19
	mov	w3, #0
	bl	_AAS_BSPLinkEntity
	str	x0, [x21]
LBB0_18:
Lloh35:
	adrp	x8, _BLERR_NOERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _BLERR_NOERROR@GOTPAGEOFF]
LBB0_19:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,24,3                  ; @aasworld
	.comm	_botimport,8,3                  ; @botimport
	.comm	_PRT_MESSAGE,4,2                ; @PRT_MESSAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_UpdateEntity: not loaded\n"

	.comm	_BLERR_NOAASFILE,4,2            ; @BLERR_NOAASFILE
	.comm	_BLERR_NOERROR,4,2              ; @BLERR_NOERROR
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_SOLID_BSP,8,3                  ; @SOLID_BSP
	.comm	_SOLID_BBOX,8,3                 ; @SOLID_BBOX
	.comm	_ENTITYNUM_WORLD,4,2            ; @ENTITYNUM_WORLD
	.comm	_PRESENCE_NORMAL,4,2            ; @PRESENCE_NORMAL
.subsections_via_symbols
