	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetAdjacentAreasWithLessPresenceTypes_r ## -- Begin function AAS_GetAdjacentAreasWithLessPresenceTypes_r
	.p2align	4, 0x90
_AAS_GetAdjacentAreasWithLessPresenceTypes_r: ## @AAS_GetAdjacentAreasWithLessPresenceTypes_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movslq	%esi, %rcx
	incl	%eax
	movl	%edx, (%rdi,%rcx,4)
	movq	_aasworld@GOTPCREL(%rip), %rbx
	movq	24(%rbx), %r10
	movslq	%edx, %r11
	movl	(%r10,%r11,8), %r8d
	testl	%r8d, %r8d
	jle	LBB0_17
## %bb.1:
	movl	%edx, %r9d
	movq	%rdi, %r14
	movq	(%rbx), %rcx
	movl	(%rcx,%r11,4), %r12d
	movl	%r12d, %r13d
	notl	%r13d
	xorl	%r15d, %r15d
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	%r8d, %r15d
	jge	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	movslq	4(%r10,%r11,8), %rsi
	movslq	%r15d, %rdi
	addq	%rsi, %rdi
	movl	(%rdx,%rdi,4), %edx
	movl	%edx, %esi
	negl	%esi
	cmovsl	%edx, %esi
	leaq	(%rsi,%rsi,2), %rsi
	movq	_FACE_SOLID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx,%rsi,4)
	jne	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%rcx,%rsi,4), %edx
	cmpl	%r9d, %edx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rcx,%rsi,4), %edx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rcx
	movslq	%edx, %rsi
	movl	(%rcx,%rsi,4), %ecx
	movl	%ecx, %esi
	notl	%esi
	testl	%esi, %r12d
	je	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	andl	%r13d, %ecx
	jne	LBB0_16
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	jle	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %esi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	(%r14,%rcx,4), %edx
	je	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	incq	%rcx
	cmpq	%rcx, %rsi
	jne	LBB0_11
	jmp	LBB0_13
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %ecx
	jne	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_MAX_PORTALAREAS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r10, %r12
	movq	%r11, %r13
	callq	_AAS_GetAdjacentAreasWithLessPresenceTypes_r
	movq	%r13, %r11
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	%r12, %r10
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	-52(%rbp), %r9d                 ## 4-byte Reload
	movl	(%r10,%r11,8), %r8d
	jmp	LBB0_16
LBB0_14:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %ebx
	callq	_AAS_Error
	movl	%ebx, %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,32,3                  ## @aasworld
	.comm	_FACE_SOLID,4,2                 ## @FACE_SOLID
	.comm	_MAX_PORTALAREAS,4,2            ## @MAX_PORTALAREAS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_PORTALAREAS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetAdjacentAreasWithLessPresenceTypes_r ; -- Begin function AAS_GetAdjacentAreasWithLessPresenceTypes_r
	.p2align	2
_AAS_GetAdjacentAreasWithLessPresenceTypes_r: ; @AAS_GetAdjacentAreasWithLessPresenceTypes_r
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	add	w19, w1, #1
	str	w2, [x0, w1, sxtw #2]
Lloh0:
	adrp	x22, _aasworld@GOTPAGE
Lloh1:
	ldr	x22, [x22, _aasworld@GOTPAGEOFF]
	ldr	x9, [x22, #24]
	add	x8, x9, w2, sxtw #3
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x20, x2
	mov	x21, x0
	mov	w24, #0
	sxtw	x10, w20
	ldr	x11, [x22]
	ldr	w25, [x11, w2, sxtw #2]
	add	x9, x9, x10, lsl #3
	add	x26, x9, #4
	mvn	w27, w25
	mov	w28, #12
Lloh2:
	adrp	x23, _FACE_SOLID@GOTPAGE
Lloh3:
	ldr	x23, [x23, _FACE_SOLID@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	cmp	w24, w8
	b.ge	LBB0_16
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w9, [x26]
	add	w10, w9, w24
	ldp	x9, x11, [x22, #8]
	ldr	w10, [x11, w10, sxtw #2]
	cmp	w10, #0
	cneg	w10, w10, mi
	umull	x11, w10, w28
	ldr	w11, [x9, x11]
	ldr	w12, [x23]
	tst	w12, w11
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x11, x10, x28, x9
	ldr	w2, [x11, #4]
	cmp	w2, w20
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x9, x10, x28, x9
	ldr	w2, [x9, #8]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x22]
	ldr	w9, [x9, w2, sxtw #2]
	bic	w10, w25, w9
	and	w9, w9, w27
	cmp	w10, #0
	ccmp	w9, #0, #0, ne
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w19, #1
	b.lt	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, #0
	mov	w10, w19
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x21, x9, lsl #2]
	cmp	w2, w11
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x9, x9, #1
	cmp	x10, x9
	b.ne	LBB0_9
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w9, #0
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w9, w19
	b.ne	LBB0_2
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh4:
	adrp	x8, _MAX_PORTALAREAS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MAX_PORTALAREAS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ge	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_AAS_GetAdjacentAreasWithLessPresenceTypes_r
	mov	x19, x0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w8, [x8]
	b	LBB0_2
LBB0_15:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_AAS_Error
LBB0_16:
	mov	x0, 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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,32,3                  ; @aasworld
	.comm	_FACE_SOLID,4,2                 ; @FACE_SOLID
	.comm	_MAX_PORTALAREAS,4,2            ; @MAX_PORTALAREAS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_PORTALAREAS"

.subsections_via_symbols
