	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetEdge2                       ## -- Begin function GetEdge2
	.p2align	4, 0x90
_GetEdge2:                              ## @GetEdge2
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_c_tryedges@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	%rdx, %r14
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	_noshare@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_numedges@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	jmp	LBB0_10
LBB0_2:
	movq	_firstmodeledge@GOTPCREL(%rip), %rax
	movslq	(%rax), %r8
	movq	_numedges@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	cmpl	%r10d, %r8d
	jge	LBB0_10
## %bb.3:
	movq	_dedges@GOTPCREL(%rip), %rax
	movq	_edgefaces@GOTPCREL(%rip), %rdx
	leaq	(,%r8,8), %rsi
	movq	(%rdx), %r9
	addq	%rsi, %r9
	addq	(%rax), %rsi
	movl	%r8d, %edx
	negl	%edx
	addq	%r10, %rdx
	xorl	%eax, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rax
	cmpl	%eax, %edx
	je	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rax,8), %rdi
	cmpl	%ebx, 4(%rdi)
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	%r15d, (%rdi)
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r9,%rax,8), %rdi
	movq	(%rdi), %rcx
	movq	(%rcx), %rcx
	cmpq	(%r14), %rcx
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 8(%rdi)
	jne	LBB0_9
## %bb.8:
	movq	%r14, 8(%rdi)
	addl	%r8d, %eax
	negl	%eax
	jmp	LBB0_13
LBB0_10:
	movq	_MAX_MAP_EDGES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r10d
	jl	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	_numedges@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
LBB0_12:
	movq	_dedges@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r10d, %rcx
	leal	1(%rcx), %edx
	movq	_numedges@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movq	(%rax,%rcx,8), %rax
	movl	%ebx, (%rax)
	movl	%r15d, 4(%rax)
	movq	_edgefaces@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movslq	(%rsi), %rax
	movq	-8(%rcx,%rax,8), %rcx
	decq	%rax
	movq	%r14, (%rcx)
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_c_tryedges,4,2                 ## @c_tryedges
	.comm	_noshare,4,2                    ## @noshare
	.comm	_firstmodeledge,4,2             ## @firstmodeledge
	.comm	_numedges,4,2                   ## @numedges
	.comm	_dedges,8,3                     ## @dedges
	.comm	_edgefaces,8,3                  ## @edgefaces
	.comm	_MAX_MAP_EDGES,4,2              ## @MAX_MAP_EDGES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"numedges == MAX_MAP_EDGES"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetEdge2                       ; -- Begin function GetEdge2
	.p2align	2
_GetEdge2:                              ; @GetEdge2
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _c_tryedges@GOTPAGE
Lloh1:
	ldr	x8, [x8, _c_tryedges@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
Lloh2:
	adrp	x8, _noshare@GOTPAGE
Lloh3:
	ldr	x8, [x8, _noshare@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x22, _numedges@GOTPAGE
Lloh6:
	ldr	x22, [x22, _numedges@GOTPAGEOFF]
Lloh7:
	adrp	x24, _dedges@GOTPAGE
Lloh8:
	ldr	x24, [x24, _dedges@GOTPAGEOFF]
Lloh9:
	adrp	x23, _edgefaces@GOTPAGE
Lloh10:
	ldr	x23, [x23, _edgefaces@GOTPAGEOFF]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x22]
	b	LBB0_10
LBB0_2:
Lloh11:
	adrp	x8, _firstmodeledge@GOTPAGE
Lloh12:
	ldr	x8, [x8, _firstmodeledge@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x8]
	ldr	w8, [x22]
	cmp	w9, w8
	b.ge	LBB0_10
; %bb.3:
	sxtw	x10, w9
	ldr	x11, [x24]
	ldr	x12, [x23]
	lsl	x13, x10, #3
	add	x10, x12, x13
	add	x11, x11, x13
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w9, w9, #1
	add	x10, x10, #8
	add	x11, x11, #8
	cmp	w8, w9
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	ldr	w13, [x12, #4]
	cmp	w13, w21
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x12]
	cmp	w12, w20
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x12, [x10]
	ldr	x13, [x12]
	ldr	x13, [x13]
	ldr	x14, [x19]
	cmp	x13, x14
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x12, #8]
	cbnz	x13, LBB0_4
; %bb.9:
	str	x19, [x12, #8]
	neg	w0, w9
	b	LBB0_13
LBB0_10:
Lloh14:
	adrp	x9, _MAX_MAP_EDGES@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MAX_MAP_EDGES@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_12
; %bb.11:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [x22]
LBB0_12:
	ldr	x9, [x24]
	add	w10, w8, #1
	str	w10, [x22]
	ldr	x8, [x9, w8, sxtw #3]
	stp	w21, w20, [x8]
	ldr	x8, [x23]
	ldrsw	x9, [x22]
	sub	x0, x9, #1
	ldr	x8, [x8, x0, lsl #3]
	str	x19, [x8]
LBB0_13:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_c_tryedges,4,2                 ; @c_tryedges
	.comm	_noshare,4,2                    ; @noshare
	.comm	_firstmodeledge,4,2             ; @firstmodeledge
	.comm	_numedges,4,2                   ; @numedges
	.comm	_dedges,8,3                     ; @dedges
	.comm	_edgefaces,8,3                  ; @edgefaces
	.comm	_MAX_MAP_EDGES,4,2              ; @MAX_MAP_EDGES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"numedges == MAX_MAP_EDGES"

.subsections_via_symbols
