	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FixSurfaceJunctions            ## -- Begin function FixSurfaceJunctions
	.p2align	4, 0x90
_FixSurfaceJunctions:                   ## @FixSurfaceJunctions
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_SURFACE_VERTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	(,%rbx,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%rbx,8), %rax
	leaq	(%rax,%rax,2), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -80(%rbp)                 ## 8-byte Spill
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.8:
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	cmpl	%ebx, %r15d
	jne	LBB0_11
	.p2align	4, 0x90
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	(%r14), %ecx
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %rdx
	movq	8(%r14), %r12
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rbx,2), %r13
	movq	16(%r12,%r13,8), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rsi, 16(%rdi,%rdx,8)
	movups	(%r12,%r13,8), %xmm0
	movups	%xmm0, (%rdi,%rdx,8)
	movl	%ebx, (%r8,%rax,4)
	incl	%r15d
	movq	%rbx, %rax
	incq	%rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	movq	16(%r12,%r13,8), %rax
	movq	(%rax), %rax
	cmpl	$-1, %eax
	je	LBB0_25
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_edgeLines@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	cltq
	movl	12(%r12,%r13,8), %edi
	leaq	(%rax,%rax,4), %r14
	leaq	(%rbx,%r14,8), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	36(%rbx,%r14,8), %esi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	callq	_VectorSubtract
	movl	32(%rbx,%r14,8), %esi
	callq	_DotProduct
	movss	%xmm0, -68(%rbp)                ## 4-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	12(%r12,%rax,8), %edi
	movl	36(%rbx,%r14,8), %esi
	callq	_VectorSubtract
	movl	32(%rbx,%r14,8), %esi
	callq	_DotProduct
	movss	-68(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	xorl	%eax, %eax
	ucomiss	%xmm3, %xmm0
	seta	%al
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rcx,%rax,8), %rbx
	cmpq	%rcx, %rbx
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	(%r12,%r13,8), %rax
	addq	$8, %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	movaps	%xmm0, %xmm1
	subss	%xmm3, %xmm1
	movss	%xmm1, -92(%rbp)                ## 4-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%r12,%rax,8), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movss	%xmm0, -96(%rbp)                ## 4-byte Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	24(%rbx), %edi
	movslq	%r15d, %r12
	leaq	(%r12,%r12,2), %r14
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	12(%r15,%r14,8), %esi
	callq	_VectorCopy
	movq	-136(%rbp), %r13                ## 8-byte Reload
	movl	(%r13), %edi
	movl	8(%r15,%r14,8), %esi
	callq	_VectorCopy
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	-68(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	subss	%xmm3, %xmm0
	divss	-92(%rbp), %xmm0                ## 4-byte Folded Reload
	movq	-8(%r13), %rax
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	(%r15,%r14,8), %rdx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	(%rcx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	mulss	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, (%rdx)
	movss	4(%rax), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rcx), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm2
	mulss	%xmm0, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, 4(%rdx)
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, (%r8,%r12,4)
	incl	%r15d
	movss	-96(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
LBB0_24:                                ##   in Loop: Header=BB0_15 Depth=2
	xorl	%eax, %eax
	ucomiss	%xmm3, %xmm0
	seta	%al
	movq	8(%rbx,%rax,8), %rbx
	cmpq	-104(%rbp), %rbx                ## 8-byte Folded Reload
	je	LBB0_25
LBB0_15:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	ucomiss	%xmm3, %xmm0
	movss	(%rbx), %xmm4                   ## xmm4 = mem[0],zero,zero,zero
	movq	_ON_EPSILON@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm2
	jbe	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	subss	%xmm1, %xmm2
	ucomiss	%xmm2, %xmm4
	ja	LBB0_25
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	movaps	%xmm3, %xmm2
	addss	%xmm1, %xmm2
	ucomiss	%xmm2, %xmm4
	jbe	LBB0_19
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=2
	addss	%xmm1, %xmm2
	ucomiss	%xmm4, %xmm2
	ja	LBB0_25
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=2
	ucomiss	%xmm0, %xmm3
	jbe	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=2
	movaps	%xmm3, %xmm2
	subss	%xmm1, %xmm2
	ucomiss	%xmm4, %xmm2
	jbe	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	_MAX_SURFACE_VERTS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=2
	leaq	L_.str(%rip), %rdi
	callq	_Error
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-56(%rbp), %r8                  ## 8-byte Reload
LBB0_25:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-112(%rbp), %r14                ## 8-byte Reload
	movslq	(%r14), %rcx
	movq	-120(%rbp), %rax                ## 8-byte Reload
	cmpq	%rcx, %rax
	jge	LBB0_2
## %bb.26:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, %rdx
	movq	_MAX_SURFACE_VERTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	cmpl	%ebx, %r15d
	je	LBB0_10
	jmp	LBB0_11
LBB0_1:
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r8                  ## 8-byte Reload
LBB0_2:
	movl	%r15d, %eax
	subl	%ecx, %eax
	movq	_c_addedVerts@GOTPCREL(%rip), %rcx
	addl	%eax, (%rcx)
	movq	_c_totalVerts@GOTPCREL(%rip), %rax
	addl	%r15d, (%rax)
	testl	%r15d, %r15d
	jle	LBB0_31
## %bb.3:
	movl	%r15d, %esi
	movl	$1, %ebx
	xorl	%edi, %edi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rbx, %rsi
	je	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %rsi
	movl	%ebx, %eax
	cmoveq	%rdi, %rax
	movl	(%r8,%rax,4), %eax
	cmpl	-4(%r8,%rbx,4), %eax
	je	LBB0_27
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	(%rsi,%rbx), %eax
	addl	$-2, %eax
	cltd
	idivl	%r15d
	movl	%edx, %ecx
	leal	(%rsi,%rbx), %eax
	addl	$-3, %eax
	cltd
	idivl	%r15d
	movslq	%ecx, %rax
	movl	(%r8,%rax,4), %eax
	movslq	%edx, %rcx
	movl	(%r8,%rcx,4), %ecx
	cmpl	%ecx, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rbx, %rsi
	jne	LBB0_28
LBB0_7:
	decl	%ebx
	cmpl	%ecx, %eax
	cmovel	%r15d, %ebx
	testl	%ebx, %ebx
	je	LBB0_31
LBB0_32:
	cmpl	%r15d, %ebx
	jne	LBB0_33
## %bb.34:
	movq	_c_cant@GOTPCREL(%rip), %rax
	jmp	LBB0_35
LBB0_29:
	movl	%esi, %ebx
	testl	%ebx, %ebx
	jne	LBB0_32
LBB0_31:
	movq	_c_natural@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	%r15d, (%r14)
	shll	$3, %r15d
	leal	(%r15,%r15,2), %ebx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcpy
LBB0_39:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_41
## %bb.40:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	movq	_c_rotate@GOTPCREL(%rip), %rax
LBB0_35:
	incl	(%rax)
	movl	%r15d, (%r14)
	shll	$3, %r15d
	leal	(%r15,%r15,2), %edi
	callq	_malloc
	movq	%rax, 8(%r14)
	movl	(%r14), %esi
	testl	%esi, %esi
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	jle	LBB0_39
## %bb.36:
	movq	%rax, %rcx
	movl	%ebx, %eax
	cltd
	idivl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	leaq	(%rdx,%rdx,2), %rax
	movq	16(%r9,%rax,8), %rdx
	movq	%rdx, 16(%rcx)
	movups	(%r9,%rax,8), %xmm0
	movups	%xmm0, (%rcx)
	movl	(%r14), %ecx
	cmpl	$2, %ecx
	jl	LBB0_39
## %bb.37:
	movl	%ebx, %r8d
	movl	$1, %esi
	movl	$24, %edi
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rbx
	leal	(%r8,%rsi), %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	leaq	(%rdx,%rdx,2), %rax
	movq	16(%r9,%rax,8), %rcx
	movq	%rcx, 16(%rbx,%rdi)
	movups	(%r9,%rax,8), %xmm0
	movups	%xmm0, (%rbx,%rdi)
	incq	%rsi
	movslq	(%r14), %rcx
	addq	$24, %rdi
	cmpq	%rcx, %rsi
	jl	LBB0_38
	jmp	LBB0_39
LBB0_41:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_SURFACE_VERTS,4,2          ## @MAX_SURFACE_VERTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_SURFACE_VERTS"

	.comm	_edgeLines,8,3                  ## @edgeLines
	.comm	_ON_EPSILON,4,2                 ## @ON_EPSILON
	.comm	_c_addedVerts,4,2               ## @c_addedVerts
	.comm	_c_totalVerts,4,2               ## @c_totalVerts
	.comm	_c_natural,4,2                  ## @c_natural
	.comm	_c_cant,4,2                     ## @c_cant
	.comm	_c_rotate,4,2                   ## @c_rotate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FixSurfaceJunctions            ; -- Begin function FixSurfaceJunctions
	.p2align	2
_FixSurfaceJunctions:                   ; @FixSurfaceJunctions
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-128]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	sub	sp, sp, #32
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-120]
Lloh3:
	adrp	x8, _MAX_SURFACE_VERTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_SURFACE_VERTS@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	add	x8, x12, x12, lsl #1
	lsl	x8, x8, #3
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x3ffffffff0
	sub	x24, x9, x8
	mov	sp, x24
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x21, #0
	mov	w22, #0
	mov	w26, #24
	stur	x20, [x29, #-136]               ; 8-byte Folded Spill
	cmp	w22, w12
	b.ne	LBB0_3
LBB0_2:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [x20]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x19, x24
	smaddl	x9, w22, w26, x24
	ldr	x28, [x20, #8]
	madd	x10, x21, x26, x28
	ldr	q0, [x10]
	ldr	x11, [x10, #16]
	str	x11, [x9, #16]
	str	w21, [x23, w22, sxtw #2]
	str	q0, [x9]
	add	w22, w22, #1
	add	x11, x21, #1
	ldr	x9, [x10, #16]
	ldr	x9, [x9]
	cmn	w9, #1
	stur	x11, [x29, #-128]               ; 8-byte Folded Spill
	b.eq	LBB0_16
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sdiv	w10, w11, w8
	msub	w25, w10, w8, w11
Lloh12:
	adrp	x8, _edgeLines@GOTPAGE
Lloh13:
	ldr	x8, [x8, _edgeLines@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	madd	x10, x21, x26, x28
	ldr	w0, [x10, #12]
	mov	w10, #40
	smaddl	x24, w9, w10, x8
	ldr	w1, [x24, #36]
	bl	_VectorSubtract
	ldr	w1, [x24, #32]
	bl	_DotProduct
	fmov	s8, s0
	madd	x8, x25, x26, x28
	ldr	w0, [x8, #12]
	ldr	w1, [x24, #36]
	bl	_VectorSubtract
	ldr	w1, [x24, #32]
	bl	_DotProduct
	add	x8, x24, #16
	add	x9, x24, #8
	fcmp	s8, s0
	csel	x8, x8, x9, mi
	ldr	x20, [x8]
	cmp	x20, x24
	b.eq	LBB0_16
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	fmov	s9, s0
	mov	w8, #24
	madd	x26, x21, x8, x28
	add	x27, x26, #8
	fsub	s10, s0, s8
	madd	x28, x25, x8, x28
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w0, [x20, #24]
	mov	w8, #24
	smaddl	x25, w22, w8, x19
	ldr	w1, [x25, #12]
	bl	_VectorCopy
	ldr	w0, [x27]
	ldr	w1, [x25, #8]
	bl	_VectorCopy
	ldr	s0, [x20]
	fsub	s0, s0, s8
	fdiv	s0, s0, s10
	ldr	x8, [x26]
	ldr	x9, [x28]
	ldr	x10, [x25]
	ldr	s1, [x8]
	ldr	s2, [x9]
	fsub	s2, s2, s1
	fmadd	s1, s0, s2, s1
	str	s1, [x10]
	ldr	s1, [x8, #4]
	ldr	s2, [x9, #4]
	fsub	s2, s2, s1
	fmadd	s0, s0, s2, s1
	str	s0, [x10, #4]
	str	w21, [x23, w22, sxtw #2]
	add	w22, w22, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	fcmp	s8, s9
	mov	w8, #8
	mov	w9, #16
	csel	x8, x9, x8, mi
	ldr	x20, [x20, x8]
	cmp	x20, x24
	b.eq	LBB0_16
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	s0, [x20]
Lloh15:
	adrp	x8, _ON_EPSILON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ON_EPSILON@GOTPAGEOFF]
Lloh17:
	ldr	s1, [x8]
	fcmp	s8, s9
	b.pl	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	fsub	s2, s9, s1
	fcmp	s0, s2
	b.gt	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	fadd	s2, s8, s1
	fcmp	s0, s2
	b.le	LBB0_12
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=2
	fadd	s2, s9, s1
	fcmp	s0, s2
	b.mi	LBB0_16
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=2
	fcmp	s8, s9
	b.le	LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=2
	fsub	s1, s8, s1
	fcmp	s0, s1
	b.pl	LBB0_7
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=2
Lloh18:
	adrp	x8, _MAX_SURFACE_VERTS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX_SURFACE_VERTS@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=2
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	b	LBB0_6
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x20, x21, [x29, #-136]          ; 16-byte Folded Reload
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh23:
	adrp	x9, _MAX_SURFACE_VERTS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MAX_SURFACE_VERTS@GOTPAGEOFF]
Lloh25:
	ldr	w12, [x9]
	mov	x24, x19
	mov	w26, #24
	cmp	w22, w12
	b.eq	LBB0_2
	b	LBB0_3
LBB0_18:
	mov	x24, x19
	b	LBB0_20
LBB0_19:
	mov	w22, #0
LBB0_20:
Lloh26:
	adrp	x9, _c_addedVerts@GOTPAGE
Lloh27:
	ldr	x9, [x9, _c_addedVerts@GOTPAGEOFF]
	ldr	w10, [x9]
	sub	w8, w22, w8
	add	w8, w8, w10
	str	w8, [x9]
Lloh28:
	adrp	x8, _c_totalVerts@GOTPAGE
Lloh29:
	ldr	x8, [x8, _c_totalVerts@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w22
	str	w9, [x8]
	subs	w8, w22, #1
	b.lt	LBB0_32
; %bb.21:
	mov	x9, #0
	mov	w19, w22
	sub	w10, w22, #2
	sub	x11, x19, #1
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	cmp	x11, x9
	b.eq	LBB0_27
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x9, x9, #1
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	add	w12, w9, #1
	cmp	x11, x9
	csel	x12, xzr, x12, eq
	ldr	w12, [x23, x12, lsl #2]
	ldr	w13, [x23, x9, lsl #2]
	cmp	w12, w13
	b.eq	LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	add	w12, w8, w9
	sdiv	w13, w12, w22
	msub	w12, w13, w22, w12
	add	w13, w10, w9
	sdiv	w14, w13, w22
	msub	w13, w14, w22, w13
	ldr	w12, [x23, w12, sxtw #2]
	ldr	w13, [x23, w13, sxtw #2]
	cmp	w12, w13
	ccmp	x11, x9, #4, eq
	b.ne	LBB0_23
; %bb.26:
	cmp	w12, w13
	csel	w19, w9, w22, ne
LBB0_27:
	cbz	w19, LBB0_32
; %bb.28:
Lloh30:
	adrp	x8, _c_rotate@GOTPAGE
Lloh31:
	ldr	x8, [x8, _c_rotate@GOTPAGEOFF]
Lloh32:
	adrp	x9, _c_cant@GOTPAGE
Lloh33:
	ldr	x9, [x9, _c_cant@GOTPAGEOFF]
	cmp	w19, w22
	csel	x8, x9, x8, eq
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	w22, [x20]
	add	w8, w22, w22, lsl #1
	lsl	w0, w8, #3
	bl	_malloc
	str	x0, [x20, #8]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.29:
	sdiv	w9, w19, w8
	msub	w9, w9, w8, w19
	mov	w8, #24
	umaddl	x9, w9, w8, x24
	ldr	q0, [x9]
	ldr	x9, [x9, #16]
	str	x9, [x0, #16]
	str	q0, [x0]
	ldr	w11, [x20]
	cmp	w11, #2
	b.lt	LBB0_33
; %bb.30:
	mov	w9, w19
	mov	w10, #1
	mov	w12, #24
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x20, #8]
	add	w14, w9, w10
	sdiv	w15, w14, w11
	msub	w11, w15, w11, w14
	umaddl	x11, w11, w8, x24
	add	x13, x13, x12
	ldr	q0, [x11]
	ldr	x11, [x11, #16]
	str	x11, [x13, #16]
	str	q0, [x13]
	add	x10, x10, #1
	ldrsw	x11, [x20]
	add	x12, x12, #24
	cmp	x10, x11
	b.lt	LBB0_31
	b	LBB0_33
LBB0_32:
Lloh34:
	adrp	x8, _c_natural@GOTPAGE
Lloh35:
	ldr	x8, [x8, _c_natural@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	w22, [x20]
	add	w8, w22, w22, lsl #1
	lsl	w21, w8, #3
	mov	x0, x21
	bl	_malloc
	str	x0, [x20, #8]
	mov	x1, x24
	mov	x2, x21
	bl	_memcpy
LBB0_33:
	ldur	x8, [x29, #-120]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_35
; %bb.34:
	sub	sp, x29, #112
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #128            ; 16-byte Folded Reload
	ret
LBB0_35:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_SURFACE_VERTS,4,2          ; @MAX_SURFACE_VERTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_SURFACE_VERTS"

	.comm	_edgeLines,8,3                  ; @edgeLines
	.comm	_ON_EPSILON,4,2                 ; @ON_EPSILON
	.comm	_c_addedVerts,4,2               ; @c_addedVerts
	.comm	_c_totalVerts,4,2               ; @c_totalVerts
	.comm	_c_natural,4,2                  ; @c_natural
	.comm	_c_cant,4,2                     ; @c_cant
	.comm	_c_rotate,4,2                   ; @c_rotate
.subsections_via_symbols
