	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function AddEdge
LCPI0_0:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_2:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_AddEdge
	.p2align	4, 0x90
_AddEdge:                               ## @AddEdge
	.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
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	%rsi, %rdi
	movq	%r15, %rsi
	callq	_VectorSubtract
	callq	_VectorNormalize
	cvtss2sd	%xmm0, %xmm2
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm2, %xmm1
	jbe	LBB0_2
## %bb.1:
	movq	_c_degenerateEdges@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_23:
	movl	$-1, %ebx
	jmp	LBB0_24
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_19
LBB0_3:
	movq	_numEdgeLines@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.4:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_POINT_ON_LINE_EPSILON@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movq	_numEdgeLines@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$64, %r14
	cmpq	%rax, %rbx
	jge	LBB0_15
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_edgeLines@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	32(%r12,%r14), %esi
	movq	%r15, %rdi
	callq	_DotProduct
	subq	(%r12,%r14), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_2(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%r12,%r14), %esi
	movq	%r15, %rdi
	callq	_DotProduct
	subq	8(%r12,%r14), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_2(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	32(%r12,%r14), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_DotProduct
	subq	(%r12,%r14), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_2(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%r12,%r14), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_DotProduct
	subq	8(%r12,%r14), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_2(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_5
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_5
## %bb.14:
	addq	%r14, %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_InsertPointOnEdge
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_InsertPointOnEdge
	jmp	LBB0_24
LBB0_15:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_16:
	movq	_MAX_EDGE_LINES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_18
## %bb.17:
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	_numEdgeLines@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	movq	_edgeLines@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r12
	cltq
	movq	%rax, %rbx
	shlq	$6, %rbx
	leaq	(%r12,%rbx), %r14
	incl	%eax
	movq	_numEdgeLines@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	(%r12,%rbx), %rax
	addq	$48, %rax
	movq	%rax, 48(%r12,%rbx)
	movq	%rax, 56(%r12,%rbx)
	movq	24(%r12,%rbx), %rsi
	movq	%r15, %rdi
	callq	_VectorCopy
	movq	40(%r12,%rbx), %rsi
	callq	_VectorCopy
	movq	40(%r12,%rbx), %rdi
	movl	16(%r12,%rbx), %edx
	movl	32(%r12,%rbx), %esi
	callq	_MakeNormalVectors
	movq	24(%r12,%rbx), %rdi
	movl	32(%r12,%rbx), %esi
	callq	_DotProduct
	movq	%rax, (%r12,%rbx)
	movq	24(%r12,%rbx), %rdi
	movl	16(%r12,%rbx), %esi
	callq	_DotProduct
	movq	%rax, 8(%r12,%rbx)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_InsertPointOnEdge
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_InsertPointOnEdge
	movq	_numEdgeLines@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	decl	%ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	callq	_fabs
	movss	-48(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomisd	LCPI0_1(%rip), %xmm0
	jne	LBB0_20
	jnp	LBB0_3
LBB0_20:
	movq	_numOriginalEdges@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_MAX_ORIGINAL_EDGES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.21:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movss	-48(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movq	(%rbx), %rax
LBB0_22:
	movq	_originalEdges@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%rax, %rsi
	shlq	$4, %rsi
	movq	8(%rdx,%rsi), %rdx
	movq	%r15, (%rdx)
	movq	(%rcx), %rcx
	movq	8(%rcx,%rsi), %rdx
	movq	%r13, 8(%rdx)
	movss	%xmm1, (%rcx,%rsi)
	incq	%rax
	movq	%rax, (%rbx)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_c_degenerateEdges,4,2          ## @c_degenerateEdges
	.comm	_numOriginalEdges,8,3           ## @numOriginalEdges
	.comm	_MAX_ORIGINAL_EDGES,8,3         ## @MAX_ORIGINAL_EDGES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_ORIGINAL_EDGES"

	.comm	_originalEdges,8,3              ## @originalEdges
	.comm	_numEdgeLines,4,2               ## @numEdgeLines
	.comm	_edgeLines,8,3                  ## @edgeLines
	.comm	_POINT_ON_LINE_EPSILON,4,2      ## @POINT_ON_LINE_EPSILON
	.comm	_MAX_EDGE_LINES,4,2             ## @MAX_EDGE_LINES
L_.str.1:                               ## @.str.1
	.asciz	"MAX_EDGE_LINES"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AddEdge                        ; -- Begin function AddEdge
	.p2align	2
_AddEdge:                               ; @AddEdge
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	mov	x1, x20
	bl	_VectorSubtract
	bl	_VectorNormalize
	fmov	s8, s0
	fcvt	d0, s0
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16313, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.pl	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _c_degenerateEdges@GOTPAGE
Lloh1:
	ldr	x8, [x8, _c_degenerateEdges@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_2:
	mov	w21, #-1
	b	LBB0_16
LBB0_3:
	cbz	w21, LBB0_17
LBB0_4:
Lloh2:
	adrp	x22, _numEdgeLines@GOTPAGE
Lloh3:
	ldr	x22, [x22, _numEdgeLines@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x23, _edgeLines@GOTPAGE
Lloh5:
	ldr	x23, [x23, _edgeLines@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.5:
	mov	x24, #0
	mov	x21, #0
Lloh6:
	adrp	x25, _POINT_ON_LINE_EPSILON@GOTPAGE
Lloh7:
	ldr	x25, [x25, _POINT_ON_LINE_EPSILON@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x24, x24, #64
	cmp	x21, x8
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x23]
	add	x27, x26, x24
	ldr	w1, [x27, #32]
	mov	x0, x20
	bl	_DotProduct
	ldr	x8, [x27]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x25]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x27, #16]
	mov	x0, x20
	bl	_DotProduct
	ldr	x8, [x27, #8]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x25]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x27, #32]
	mov	x0, x19
	bl	_DotProduct
	ldr	x8, [x26, x24]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x25]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x27, #16]
	mov	x0, x19
	bl	_DotProduct
	ldr	x8, [x27, #8]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x25]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_6
; %bb.11:
	add	x22, x26, x24
	mov	x0, x20
	mov	x1, x22
	bl	_InsertPointOnEdge
	mov	x0, x19
	mov	x1, x22
	bl	_InsertPointOnEdge
	b	LBB0_16
LBB0_12:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_13:
Lloh8:
	adrp	x9, _MAX_EDGE_LINES@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MAX_EDGE_LINES@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_15
; %bb.14:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
	ldr	w8, [x22]
LBB0_15:
	ldr	x9, [x23]
	sxtw	x10, w8
	add	x21, x9, x10, lsl #6
	add	w8, w8, #1
	str	w8, [x22]
	add	x8, x21, #48
	stp	x8, x8, [x21, #48]
	ldr	x1, [x21, #24]
	mov	x0, x20
	bl	_VectorCopy
	ldr	x1, [x21, #40]
	bl	_VectorCopy
	ldr	x0, [x21, #40]
	ldr	w1, [x21, #32]
	ldr	w2, [x21, #16]
	bl	_MakeNormalVectors
	ldr	x0, [x21, #24]
	ldr	w1, [x21, #32]
	bl	_DotProduct
	str	x0, [x21]
	ldr	x0, [x21, #24]
	ldr	w1, [x21, #16]
	bl	_DotProduct
	str	x0, [x21, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_InsertPointOnEdge
	mov	x0, x19
	mov	x1, x21
	bl	_InsertPointOnEdge
	ldr	w8, [x22]
	sub	w21, w8, #1
LBB0_16:
	mov	x0, x21
	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
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	_fabs
	fmov	d1, #1.00000000
	fcmp	d0, d1
	b.eq	LBB0_4
; %bb.18:
Lloh13:
	adrp	x21, _numOriginalEdges@GOTPAGE
Lloh14:
	ldr	x21, [x21, _numOriginalEdges@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh15:
	adrp	x9, _MAX_ORIGINAL_EDGES@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAX_ORIGINAL_EDGES@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x8, [x21]
LBB0_20:
Lloh20:
	adrp	x9, _originalEdges@GOTPAGE
Lloh21:
	ldr	x9, [x9, _originalEdges@GOTPAGEOFF]
	ldr	x10, [x9]
	lsl	x11, x8, #4
	add	x10, x10, x11
	ldr	x10, [x10, #8]
	str	x20, [x10]
	ldr	x9, [x9]
	add	x9, x9, x11
	ldr	x10, [x9, #8]
	str	x19, [x10, #8]
	str	s8, [x9]
	add	x8, x8, #1
	str	x8, [x21]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_c_degenerateEdges,4,2          ; @c_degenerateEdges
	.comm	_numOriginalEdges,8,3           ; @numOriginalEdges
	.comm	_MAX_ORIGINAL_EDGES,8,3         ; @MAX_ORIGINAL_EDGES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_ORIGINAL_EDGES"

	.comm	_originalEdges,8,3              ; @originalEdges
	.comm	_numEdgeLines,4,2               ; @numEdgeLines
	.comm	_edgeLines,8,3                  ; @edgeLines
	.comm	_POINT_ON_LINE_EPSILON,4,2      ; @POINT_ON_LINE_EPSILON
	.comm	_MAX_EDGE_LINES,4,2             ; @MAX_EDGE_LINES
l_.str.1:                               ; @.str.1
	.asciz	"MAX_EDGE_LINES"

.subsections_via_symbols
