	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_FloodClusterAreas_r        ## -- Begin function AAS_FloodClusterAreas_r
	.p2align	4, 0x90
_AAS_FloodClusterAreas_r:               ## @AAS_FloodClusterAreas_r
	.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
	testl	%edi, %edi
	jle	LBB0_5
## %bb.1:
	movl	%edi, %ebx
	movq	_aasworld@GOTPCREL(%rip), %r15
	cmpl	%edi, (%r15)
	jle	LBB0_5
## %bb.2:
	movl	%esi, %r14d
	movq	8(%r15), %rax
	movl	%ebx, %r13d
	leaq	(,%r13,4), %r12
	addq	%r13, %r12
	movl	(%rax,%r12,4), %edx
	testl	%edx, %edx
	jle	LBB0_6
## %bb.3:
	cmpl	%r14d, %edx
	jne	LBB0_8
LBB0_4:
	movq	_qtrue@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_AAS_Error
	jmp	LBB0_9
LBB0_6:
	movq	_AREACONTENTS_CLUSTERPORTAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax,%r12,4)
	je	LBB0_11
## %bb.7:
	movl	%ebx, %edi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AAS_UpdatePortal               ## TAILCALL
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_AAS_Error
LBB0_9:
	movq	_qfalse@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	leaq	(%rax,%r12,4), %rcx
	movl	%r14d, (%rcx)
	movq	48(%r15), %rcx
	movslq	%r14d, %rdx
	movl	(%rcx,%rdx,4), %esi
	movl	%esi, 16(%rax,%r12,4)
	incl	%esi
	movl	%esi, (%rcx,%rdx,4)
	movq	_nofaceflood@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_20
## %bb.12:
	movq	40(%r15), %rsi
	cmpl	$0, (%rsi,%r13,8)
	jle	LBB0_20
## %bb.13:
	xorl	%r15d, %r15d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%r15
	cmpl	(%rsi,%r13,8), %r15d
	jge	LBB0_19
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	_aasworld@GOTPCREL(%rip), %rcx
	movq	24(%rcx), %rax
	movq	32(%rcx), %rcx
	movslq	4(%rsi,%r13,8), %rdx
	addq	%r15, %rdx
	movl	(%rcx,%rdx,4), %edx
	movl	%edx, %ecx
	negl	%ecx
	cmovsl	%edx, %ecx
	movl	(%rax,%rcx,8), %edi
	cmpl	%ebx, %edi
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	4(%rax,%rcx,8), %edi
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	testl	%edi, %edi
	je	LBB0_14
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%r14d, %esi
	callq	_AAS_FloodClusterAreas_r
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_9
LBB0_19:
	movq	_aasworld@GOTPCREL(%rip), %r15
	movq	8(%r15), %rax
LBB0_20:
	cmpl	$0, 8(%rax,%r12,4)
	jle	LBB0_4
## %bb.21:
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_24 Depth=1
	movq	8(%r15), %rax
LBB0_23:                                ##   in Loop: Header=BB0_24 Depth=1
	incq	%rbx
	cmpl	8(%rax,%r12,4), %ebx
	jge	LBB0_4
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movslq	12(%rax,%r12,4), %rdx
	addq	%rbx, %rdx
	movl	(%rcx,%rdx,4), %edi
	testl	%edi, %edi
	je	LBB0_23
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	movl	%r14d, %esi
	callq	_AAS_FloodClusterAreas_r
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,56,3                  ## @aasworld
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_FloodClusterAreas_r: areanum out of range"

	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_qtrue,4,2                      ## @qtrue
L_.str.1:                               ## @.str.1
	.asciz	"cluster %d touched cluster %d at area %d\r\n"

	.comm	_AREACONTENTS_CLUSTERPORTAL,4,2 ## @AREACONTENTS_CLUSTERPORTAL
	.comm	_nofaceflood,4,2                ## @nofaceflood
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_FloodClusterAreas_r        ; -- Begin function AAS_FloodClusterAreas_r
	.p2align	2
_AAS_FloodClusterAreas_r:               ; @AAS_FloodClusterAreas_r
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _aasworld@GOTPAGE
Lloh1:
	ldr	x21, [x21, _aasworld@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w0
	b.le	LBB0_5
; %bb.2:
	mov	x19, x1
	ldr	x8, [x21, #8]
	mov	w9, #20
	umaddl	x9, w20, w9, x8
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.3:
	cmp	w10, w19
	b.ne	LBB0_8
LBB0_4:
Lloh2:
	adrp	x8, _qtrue@GOTPAGE
Lloh3:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_6:
	mov	w22, w20
	mov	w10, #20
	madd	x10, x22, x10, x8
	ldr	w10, [x10, #4]
Lloh6:
	adrp	x11, _AREACONTENTS_CLUSTERPORTAL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _AREACONTENTS_CLUSTERPORTAL@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_12
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_AAS_UpdatePortal
LBB0_8:
	stp	x10, x20, [sp, #8]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_AAS_Error
LBB0_10:
Lloh11:
	adrp	x8, _qfalse@GOTPAGE
Lloh12:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	str	w19, [x9]
	ldr	x9, [x21, #48]
	sbfiz	x10, x19, #2, #32
	ldr	w11, [x9, x10]
	mov	w12, #20
	madd	x12, x22, x12, x8
	str	w11, [x12, #16]
	add	w11, w11, #1
	str	w11, [x9, x10]
Lloh13:
	adrp	x9, _nofaceflood@GOTPAGE
Lloh14:
	ldr	x9, [x9, _nofaceflood@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cbnz	w9, LBB0_21
; %bb.13:
	ldr	x9, [x21, #40]
	add	x23, x9, x22, lsl #3
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_21
; %bb.14:
	mov	x24, #0
	add	x25, x23, #4
	b	LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x8, x8, x9, lsl #3
	ldr	w0, [x8, #4]
	cbz	w0, LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x1, x19
	bl	_AAS_FloodClusterAreas_r
	cbz	w0, LBB0_10
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [x23]
	add	x24, x24, #1
	cmp	w24, w8
	b.ge	LBB0_20
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x25]
	add	x9, x24, x8
	ldp	x8, x10, [x21, #24]
	ldr	w9, [x10, x9, lsl #2]
	cmp	w9, #0
	cneg	w9, w9, mi
	lsl	x10, x9, #3
	ldr	w0, [x8, x10]
	cmp	w0, w20
	b.eq	LBB0_15
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	cbnz	w0, LBB0_16
	b	LBB0_17
LBB0_20:
	ldr	x8, [x21, #8]
LBB0_21:
	mov	w9, #20
	madd	x9, x22, x9, x8
	ldr	w9, [x9, #8]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.22:
	mov	x20, #0
	mov	w23, #20
	b	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_25 Depth=1
	ldr	x8, [x21, #8]
LBB0_24:                                ;   in Loop: Header=BB0_25 Depth=1
	madd	x9, x22, x23, x8
	ldr	w9, [x9, #8]
	add	x20, x20, #1
	cmp	w20, w9
	b.ge	LBB0_4
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #16]
	madd	x10, x22, x23, x8
	ldrsw	x10, [x10, #12]
	add	x10, x20, x10
	ldr	w0, [x9, x10, lsl #2]
	cbz	w0, LBB0_24
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	x1, x19
	bl	_AAS_FloodClusterAreas_r
	cbnz	w0, LBB0_23
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,56,3                  ; @aasworld
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_FloodClusterAreas_r: areanum out of range"

	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_qtrue,4,2                      ; @qtrue
l_.str.1:                               ; @.str.1
	.asciz	"cluster %d touched cluster %d at area %d\r\n"

	.comm	_AREACONTENTS_CLUSTERPORTAL,4,2 ; @AREACONTENTS_CLUSTERPORTAL
	.comm	_nofaceflood,4,2                ; @nofaceflood
.subsections_via_symbols
