	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_UpdatePortal               ## -- Begin function AAS_UpdatePortal
	.p2align	4, 0x90
_AAS_UpdatePortal:                      ## @AAS_UpdatePortal
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %eax
	movq	_aasworld@GOTPCREL(%rip), %r8
	movl	(%r8), %edi
	movl	$1, %edx
	cmpl	$2, %edi
	jl	LBB0_4
## %bb.1:
	movq	40(%r8), %rbx
	addq	$12, %rbx
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$12, %rbx
	cmpq	%rdx, %rdi
	jne	LBB0_2
	jmp	LBB0_5
LBB0_4:
	cmpl	%edi, %edx
	jne	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_AAS_Error
	movq	_qtrue@GOTPCREL(%rip), %r14
	jmp	LBB0_15
LBB0_6:
	movq	40(%r8), %rdi
	movl	%edx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movl	4(%rdi,%rcx,4), %ebx
	movq	_qtrue@GOTPCREL(%rip), %r14
	cmpl	%esi, %ebx
	je	LBB0_15
## %bb.7:
	movl	8(%rdi,%rcx,4), %r9d
	cmpl	%esi, %r9d
	je	LBB0_15
## %bb.8:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.10:
	testl	%r9d, %r9d
	je	LBB0_11
## %bb.16:
	movq	_AREACONTENTS_CLUSTERPORTAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movq	32(%r8), %rdx
	movslq	%eax, %rsi
	andl	%ecx, 4(%rdx,%rsi,8)
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_Log_Write
	movq	_qfalse@GOTPCREL(%rip), %r14
	jmp	LBB0_15
LBB0_9:
	leaq	(%rdi,%rcx,4), %rcx
	addq	$4, %rcx
	jmp	LBB0_12
LBB0_11:
	leaq	(%rdi,%rcx,4), %rcx
	addq	$8, %rcx
LBB0_12:
	movl	%esi, (%rcx)
	movq	8(%r8), %rdi
	movq	_AAS_MAX_PORTALINDEXSIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	jge	LBB0_13
## %bb.14:
	movl	%edx, %ecx
	negl	%ecx
	movq	32(%r8), %rbx
	cltq
	movl	%ecx, (%rbx,%rax,8)
	movq	16(%r8), %r9
	movq	24(%r8), %rcx
	movslq	%esi, %rsi
	shlq	$4, %rsi
	movq	8(%rcx,%rsi), %rbx
	movq	(%rcx,%rsi), %rax
	addq	%rbx, %rax
	movl	%edx, (%r9,%rax,4)
	incq	%rdi
	movq	%rdi, 8(%r8)
	incq	%rbx
	movq	%rbx, 8(%rcx,%rsi)
	jmp	LBB0_15
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_AAS_Error
LBB0_15:
	movl	(%r14), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,48,3                  ## @aasworld
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no portal of area %d"

	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_AREACONTENTS_CLUSTERPORTAL,4,2 ## @AREACONTENTS_CLUSTERPORTAL
L_.str.1:                               ## @.str.1
	.asciz	"portal area %d is seperating more than two clusters\r\n"

	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_AAS_MAX_PORTALINDEXSIZE,8,3    ## @AAS_MAX_PORTALINDEXSIZE
L_.str.2:                               ## @.str.2
	.asciz	"AAS_MAX_PORTALINDEXSIZE"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_UpdatePortal               ; -- Begin function AAS_UpdatePortal
	.p2align	2
_AAS_UpdatePortal:                      ; @AAS_UpdatePortal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x0
Lloh0:
	adrp	x9, _aasworld@GOTPAGE
Lloh1:
	ldr	x9, [x9, _aasworld@GOTPAGEOFF]
	ldr	w11, [x9]
	cmp	w11, #2
	b.lt	LBB0_4
; %bb.1:
	ldr	x10, [x9, #40]
	add	x12, x10, #12
	mov	w10, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12]
	cmp	w13, w8
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #1
	add	x12, x12, #12
	cmp	x11, x10
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w10, #1
LBB0_5:
	cmp	w10, w11
	b.ne	LBB0_8
LBB0_6:
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_AAS_Error
	b	LBB0_16
LBB0_8:
	ldr	x13, [x9, #40]
	mov	w11, #12
	umaddl	x11, w10, w11, x13
	ldr	w12, [x11, #4]!
	cmp	w12, w1
	b.eq	LBB0_16
; %bb.9:
	mov	w14, w10
	mov	w15, #12
	madd	x13, x14, x15, x13
	ldr	w14, [x13, #8]!
	cmp	w14, w1
	b.eq	LBB0_16
; %bb.10:
	cbz	w12, LBB0_14
; %bb.11:
	cbz	w14, LBB0_13
; %bb.12:
Lloh4:
	adrp	x10, _AREACONTENTS_CLUSTERPORTAL@GOTPAGE
Lloh5:
	ldr	x10, [x10, _AREACONTENTS_CLUSTERPORTAL@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	ldr	x9, [x9, #32]
	add	x9, x9, w8, sxtw #3
	ldr	w11, [x9, #4]
	bic	w10, w11, w10
	str	w10, [x9, #4]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x8
	bl	_Log_Write
Lloh9:
	adrp	x8, _qfalse@GOTPAGE
Lloh10:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
	b	LBB0_17
LBB0_13:
	mov	x11, x13
LBB0_14:
	str	w1, [x11]
	ldr	x11, [x9, #8]
Lloh11:
	adrp	x12, _AAS_MAX_PORTALINDEXSIZE@GOTPAGE
Lloh12:
	ldr	x12, [x12, _AAS_MAX_PORTALINDEXSIZE@GOTPAGEOFF]
Lloh13:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ge	LBB0_18
; %bb.15:
	neg	w12, w10
	ldr	x13, [x9, #32]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sbfiz	x8, x8, #3, #32
	str	w12, [x13, x8]
	ldp	x12, x8, [x9, #16]
	add	x8, x8, w1, sxtw #4
	ldp	x13, x14, [x8]
	add	x13, x14, x13
	str	w10, [x12, x13, lsl #2]
	add	x10, x11, #1
	str	x10, [x9, #8]
	add	x9, x14, #1
	str	x9, [x8, #8]
LBB0_16:
Lloh14:
	adrp	x8, _qtrue@GOTPAGE
Lloh15:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_18:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,48,3                  ; @aasworld
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no portal of area %d"

	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_AREACONTENTS_CLUSTERPORTAL,4,2 ; @AREACONTENTS_CLUSTERPORTAL
l_.str.1:                               ; @.str.1
	.asciz	"portal area %d is seperating more than two clusters\r\n"

	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_AAS_MAX_PORTALINDEXSIZE,8,3    ; @AAS_MAX_PORTALINDEXSIZE
l_.str.2:                               ; @.str.2
	.asciz	"AAS_MAX_PORTALINDEXSIZE"

.subsections_via_symbols
