	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetEdge                    ## -- Begin function AAS_GetEdge
	.p2align	4, 0x90
_AAS_GetEdge:                           ## @AAS_GetEdge
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	_aasworld@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jne	LBB0_2
## %bb.1:
	movl	$1, (%r12)
LBB0_2:
	leaq	-40(%rbp), %rsi
	callq	_AAS_GetVertex
	movl	%eax, %r15d
	leaq	-36(%rbp), %rsi
	movl	%ebx, %edi
	callq	_AAS_GetVertex
	movl	-40(%rbp), %ecx
	cmpl	$-1, %ecx
	je	LBB0_4
## %bb.3:
	movl	-36(%rbp), %esi
	cmpl	$-1, %esi
	je	LBB0_4
## %bb.5:
	cmpl	%esi, %ecx
	jne	LBB0_6
LBB0_4:
	movl	$0, (%r14)
	movl	$1, %eax
	jmp	LBB0_19
LBB0_6:
	movl	(%r12), %r8d
	andl	%r15d, %eax
	je	LBB0_16
## %bb.7:
	cmpl	$2, %r8d
	jl	LBB0_16
## %bb.8:
	movq	8(%r12), %rdi
	movl	$1, %eax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%esi, %edx
	je	LBB0_11
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rax
	cmpq	%rax, %r8
	je	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rax,8), %rdx
	movl	(%rdx), %ebx
	movl	4(%rdx), %edx
	cmpl	%ecx, %ebx
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%ecx, %edx
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%esi, %ebx
	jne	LBB0_15
## %bb.14:
	negl	%eax
LBB0_11:
	movl	%eax, (%r14)
	movl	$1, %eax
	jmp	LBB0_19
LBB0_16:
	movq	_max_aas@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %r8d
	jl	LBB0_18
## %bb.17:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movl	-40(%rbp), %ecx
	movl	(%r12), %r8d
LBB0_18:
	movq	8(%r12), %rax
	movslq	%r8d, %rdx
	movq	(%rax,%rdx,8), %rdx
	movl	%ecx, (%rdx)
	movl	-36(%rbp), %ecx
	movslq	(%r12), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%ecx, 4(%rax)
	movl	%edx, (%r14)
	incl	(%r12)
	xorl	%eax, %eax
LBB0_19:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_aasworld,16,3                  ## @aasworld
	.comm	_max_aas,4,2                    ## @max_aas
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AAS_MAX_EDGES = %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AAS_GetEdge                    ; -- Begin function AAS_GetEdge
	.p2align	2
_AAS_GetEdge:                           ; @AAS_GetEdge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x22, _aasworld@GOTPAGE
Lloh1:
	ldr	x22, [x22, _aasworld@GOTPAGEOFF]
	ldr	w8, [x22]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x22]
LBB0_2:
	add	x1, sp, #12
	bl	_AAS_GetVertex
	mov	x21, x0
	add	x1, sp, #8
	mov	x0, x20
	bl	_AAS_GetVertex
	ldp	w10, w8, [sp, #8]
	cmn	w8, #1
	ccmn	w10, #1, #4, ne
	b.eq	LBB0_4
; %bb.3:
	cmp	w8, w10
	b.ne	LBB0_5
LBB0_4:
	str	wzr, [x19]
	mov	w0, #1
	b	LBB0_16
LBB0_5:
	ldr	w9, [x22]
	and	w11, w0, w21
	cbz	w11, LBB0_13
; %bb.6:
	cmp	w9, #2
	b.lt	LBB0_13
; %bb.7:
	ldr	x12, [x22, #8]
	mov	w11, #1
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	cmp	w14, w8
	ccmp	w13, w10, #0, eq
	b.eq	LBB0_17
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x11, x11, #1
	cmp	x9, x11
	b.eq	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x12, x11, lsl #3]
	ldp	w13, w14, [x14]
	cmp	w13, w8
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	cmp	w14, w10
	b.ne	LBB0_9
; %bb.12:
	str	w11, [x19]
	mov	w0, #1
	b	LBB0_16
LBB0_13:
Lloh2:
	adrp	x10, _max_aas@GOTPAGE
Lloh3:
	ldr	x10, [x10, _max_aas@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x10]
	cmp	w9, w1
	b.lt	LBB0_15
; %bb.14:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
LBB0_15:
	mov	w0, #0
	ldr	x10, [x22, #8]
	ldr	x9, [x10, w9, sxtw #3]
	str	w8, [x9]
	ldrsw	x8, [x22]
	ldr	x9, [x10, x8, lsl #3]
	ldr	w10, [sp, #8]
	str	w10, [x9, #4]
	str	w8, [x19]
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_17:
	neg	w8, w11
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_aasworld,16,3                  ; @aasworld
	.comm	_max_aas,4,2                    ; @max_aas
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AAS_MAX_EDGES = %d"

.subsections_via_symbols
