LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Relate.cpp
// Function: gaps::R3Interpolate(gaps::R3Point const&, gaps::R3Point const&, double, double, double)
R3Point 
R3Interpolate(const R3Point& point1, const R3Point& point2, RNScalar t1, RNScalar t2, RNScalar t)
{
  // Check boundary cases
  if (RNIsEqual(t, t1)) return point1;
  if (RNIsEqual(t, t2)) return point2;
  RNScalar denom = t1 - t2;
  if (RNIsZero(denom)) return point1;

  // Interpolate points
  RNScalar mu = (t - t1) / (t2 - t1);
  R3Vector vector = point2 - point1;
  R3Point point = point1 + mu * vector;
  return point;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x994cc(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm3
movapd %xmm2, %xmm5
subsd %xmm0, %xmm5
movapd 0x55940(%rip), %xmm4    # 0xa2020
xorpd %xmm3, %xmm4
ucomisd %xmm4, %xmm5
jb 0x4c6f8
ucomisd %xmm5, %xmm3
jb 0x4c6f8
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x4c70e
subsd %xmm1, %xmm2
ucomisd %xmm4, %xmm2
jb 0x4c722
ucomisd %xmm2, %xmm3
jb 0x4c722
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3ca36
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
ucomisd %xmm4, %xmm2
jb 0x4c736
ucomisd %xmm2, %xmm3
jae 0x4c6f0
subsd %xmm0, %xmm1
divsd %xmm1, %xmm5
movsd %xmm5, (%rsp)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x3cc88
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3de8e
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3cd71
jmp 0x4c713
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Relate.cpp
// Function: gaps::R3InteriorAngle(gaps::R3Vector const&, gaps::R3Vector const&)
RNAngle 
R3InteriorAngle(const R3Vector& vector1, const R3Vector& vector2)
{
    // Return angle between vectors
    RNScalar d1 = vector1.Length();
    if (RNIsZero(d1)) return 0.0;
    RNScalar d2 = vector2.Length();
    if (RNIsZero(d2)) return 0.0;
    RNScalar cosine = vector1.Dot(vector2) / (d1 * d2);
    if (cosine >= 1.0) return 0.0;
    else if (cosine <= -1.0) return RN_PI;
    else return acos(cosine); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3d5c4
leaq 0x99402(%rip), %r15     # 0xe5b98
movsd (%r15), %xmm2
movapd 0x5587d(%rip), %xmm1    # 0xa2020
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
xorpd %xmm1, %xmm1
jb 0x4c7bb
ucomisd %xmm0, %xmm2
jae 0x4c840
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x3d5c4
movsd (%r15), %xmm2
movapd 0x5584a(%rip), %xmm1    # 0xa2020
xorpd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4c7ec
ucomisd %xmm0, %xmm2
jb 0x4c7ec
xorpd %xmm1, %xmm1
jmp 0x4c840
movq %r14, %rdi
movq %rbx, %rsi
movsd %xmm0, (%rsp)
callq 0x3d756
movsd 0x8(%rsp), %xmm1
mulsd (%rsp), %xmm1
divsd %xmm1, %xmm0
ucomisd 0x55825(%rip), %xmm0    # 0xa2038
xorpd %xmm1, %xmm1
jae 0x4c840
movsd 0x55827(%rip), %xmm1    # 0xa2048
ucomisd %xmm0, %xmm1
jae 0x4c835
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0xe3f0
leaq 0x5d76c(%rip), %rax     # 0xa9fa8
movsd (%rax), %xmm1
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Relate.cpp
// Function: gaps::R3Abuts(gaps::R3Box const&, gaps::R3Box const&)
RNBoolean 
R3Abuts(const R3Box& box1, const R3Box& box2) 
{
    // Return whether box1 abuts box2
    if (!R3Intersects(box1, box2)) return FALSE;
    if (RNIsEqual(box1.XMin(), box2.XMax())) return TRUE;
    if (RNIsEqual(box1.XMax(), box2.XMin())) return TRUE;
    if (RNIsEqual(box1.YMin(), box2.YMax())) return TRUE;
    if (RNIsEqual(box1.YMax(), box2.YMin())) return TRUE;
    if (RNIsEqual(box1.ZMin(), box2.ZMax())) return TRUE;
    if (RNIsEqual(box1.ZMax(), box2.ZMin())) return TRUE;
    return FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x46418
testl %eax, %eax
je 0x4c963
movsd 0x8(%r15), %xmm2
leaq 0x992e1(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm0
subsd 0x20(%r14), %xmm2
movapd 0x55757(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
movl $0x1, %ebx
jb 0x4c8e2
ucomisd %xmm2, %xmm0
jae 0x4c963
movsd 0x20(%r15), %xmm2
subsd 0x8(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x4c8fa
ucomisd %xmm2, %xmm0
jae 0x4c963
movsd 0x10(%r15), %xmm2
subsd 0x28(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x4c912
ucomisd %xmm2, %xmm0
jae 0x4c963
movsd 0x28(%r15), %xmm2
subsd 0x10(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x4c92a
ucomisd %xmm2, %xmm0
jae 0x4c963
movsd 0x18(%r15), %xmm2
subsd 0x30(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x4c942
ucomisd %xmm2, %xmm0
jae 0x4c963
movsd 0x30(%r15), %xmm2
subsd 0x18(%r14), %xmm2
cmplepd %xmm2, %xmm1
cmplepd %xmm0, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %ebx
andl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Relate.cpp
// Function: gaps::R3Splits(gaps::R3Plane const&, gaps::R3Span const&)
int 
R3Splits(const R3Plane& plane, const R3Span& span)
{
    // Result values:
    // 0 = on, 1 = below, 2 = above, 3 = crossing
    int result = 0;

    // Classify start point with respect to plane
    RNScalar d1 = R3SignedDistance(plane, span.Start());
    if (RNIsNegative(d1)) result |= 0x1;
    if (RNIsPositive(d1)) result |= 0x2;

    // Classify end point with respect to plane
    RNScalar d2 = R3SignedDistance(plane, span.End());
    if (RNIsNegative(d2)) result |= 0x1;
    if (RNIsPositive(d2)) result |= 0x2;

    // Return result
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4a10f
leaq 0x99214(%rip), %r15     # 0xe5b98
movsd (%r15), %xmm1
movapd %xmm1, %xmm2
xorpd 0x5568b(%rip), %xmm2    # 0xa2020
xorl %eax, %eax
ucomisd %xmm0, %xmm2
seta %al
leal 0x2(%rax), %ebp
ucomisd %xmm1, %xmm0
cmovbel %eax, %ebp
addq $0x30, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4a10f
movsd (%r15), %xmm1
movapd 0x5565c(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
xorl %ecx, %ecx
ucomisd %xmm0, %xmm2
seta %cl
orl %ebp, %ecx
movl %ecx, %eax
orl $0x2, %eax
ucomisd %xmm1, %xmm0
cmovbel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Relate.cpp
// Function: gaps::R3Splits(gaps::R3Plane const&, gaps::R3Triangle const&)
int 
R3Splits(const R3Plane& plane, const R3Triangle& triangle)
{
    // Result values:
    // 0 = on, 1 = below, 2 = above, 3 = crossing
    int result = 0;

    // Classify triangle with respect to plane
    for (int i = 0; i < 3; i++) {
	RNScalar d = R3SignedDistance(plane, triangle.Vertex(i)->Position());
	if (!(result & 0x1) && RNIsNegative(d)) result |= 0x1;
	if (!(result & 0x2) && RNIsPositive(d)) result |= 0x2;
	if (result == 0x3) break;
    }

    // Return result
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq 0x98f61(%rip), %r12     # 0xe5b98
xorl %ebp, %ebp
movq 0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x4a10f
testb $0x1, %bpl
jne 0x4cc65
movsd (%r12), %xmm1
xorpd 0x553c6(%rip), %xmm1    # 0xa2020
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %al
orl %eax, %ebp
movl %ebp, %eax
orl $0x2, %ebp
ucomisd (%r12), %xmm0
cmovbel %eax, %ebp
testb $0x2, %al
cmovnel %eax, %ebp
cmpl $0x3, %ebp
je 0x4cc8a
leaq 0x1(%r15), %rax
cmpq $0x2, %r15
movq %rax, %r15
jne 0x4cc39
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3BoundingBox(gaps::RNArray<gaps::R3Point*> const&)
R3Box
R3BoundingBox(const RNArray<R3Point *>& points)
{
  // Compute bounding box
  R3Box bbox = R3null_box;
  for (int i = 0; i < points.NEntries(); i++) {
    bbox.Union(*points[i]);
  }

  // Return bounding box
  return bbox;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x991ee(%rip), %rsi     # 0xe5e98
callq 0x274f0
cmpl $0x0, 0xc(%r14)
jle 0x4ccd4
xorl %r15d, %r15d
movq (%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x27f0e
incq %r15
movslq 0xc(%r14), %rax
cmpq %rax, %r15
jl 0x4ccb9
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x28348
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3Centroid(gaps::RNArray<gaps::R3Point*> const&, double const*)
R3Point 
R3Centroid(const RNArray<R3Point *>& points, const RNScalar *weights)
{
  // Compute center of mass
  R3Point centroid(0.0, 0.0, 0.0);
  RNScalar total_weight = 0;
  for (int i = 0; i < points.NEntries(); i++) {
    RNScalar weight = (weights) ? weights[i] : 1;
    R3Point *point = points[i];
    centroid += *point * weight;
    total_weight += weight;
  }

  // Compute average
  if (total_weight > 0) centroid /= total_weight;

  // Return center of mass
  return centroid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x3ca26
cmpl $0x0, 0xc(%r15)
xorpd %xmm0, %xmm0
jle 0x4cd79
xorl %r13d, %r13d
leaq 0x18(%rsp), %r12
movsd %xmm0, 0x10(%rsp)
movsd 0x55302(%rip), %xmm0    # 0xa2038
testq %r14, %r14
je 0x4cd41
movsd (%r14,%r13,8), %xmm0
movq (%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x3d470
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3d366
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
incq %r13
movslq 0xc(%r15), %rax
cmpq %rax, %r13
jl 0x4cd28
ucomisd 0x55467(%rip), %xmm0    # 0xa21e8
jbe 0x4cd8b
movq %rbx, %rdi
callq 0x3d3e4
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3AverageDistance(gaps::R3Point const&, gaps::RNArray<gaps::R3Point*> const&, double const*)
RNLength
R3AverageDistance(const R3Point& center, const RNArray<R3Point *>& points, const RNScalar *weights)
{
  // Compute sum of distances between a position on the surface and a center point
  RNScalar distance = 0.0;
  RNScalar total_weight = 0;
  for (int i = 0; i < points.NEntries(); i++) {
    RNScalar weight = (weights) ? weights[i] : 1;
    R3Point *point = points[i];
    distance += weight * R3Distance(*point, center);
    total_weight += weight;
  }

  // Compute average distance
  if (total_weight > 0) distance /= total_weight;

  // Return average distance
  return distance;
}

// Assembly:
cmpl $0x0, 0xc(%rsi)
xorpd %xmm3, %xmm3
xorpd %xmm2, %xmm2
jle 0x4d242
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
xorpd %xmm3, %xmm3
movapd %xmm3, 0x10(%rsp)
movapd %xmm2, 0x20(%rsp)
movsd 0x54e4b(%rip), %xmm0    # 0xa2038
testq %rbx, %rbx
je 0x4d1f8
movsd (%rbx,%r12,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
callq 0x49efc
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm0
movapd 0x20(%rsp), %xmm2
addsd %xmm0, %xmm2
movapd 0x10(%rsp), %xmm3
addsd %xmm1, %xmm3
incq %r12
movslq 0xc(%r14), %rax
cmpq %rax, %r12
jl 0x4d1d9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
movapd %xmm2, %xmm1
divsd %xmm3, %xmm1
xorpd %xmm0, %xmm0
cmpltsd %xmm3, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3AlignError(gaps::RNArray<gaps::R3Point*> const&, gaps::RNArray<gaps::R3Point*> const&, gaps::R4Matrix const&, gaps::R3Point const&, gaps::R3Point const&, double, double, double const*)
RNScalar 
R3AlignError(const RNArray<R3Point *>& points1, const RNArray<R3Point *>& points2, 
  const R4Matrix& rotation, const R3Point& center1, const R3Point& center2, RNScalar s1, RNScalar s2, 
  const RNScalar* weights)
{
  // Get number of points
  int count = points1.NEntries();
  if (points2.NEntries() < count) count = points2.NEntries();
  if (count == 0) return -1;

  // Compute sum of squared distances
  RNScalar ssd = 0;
  RNScalar total_weight = 0;
  for(int i = 0; i < count; i++) {
    RNScalar weight = (weights) ? weights[i] : 1;
    R3Point *point1 = points1[i];
    R3Point *point2 = points2[i];
    R3Vector v1 = (*point1 - center1) / s1;
    R3Vector v2 = (*point2 - center2) / s2;
    R3Vector v = v1 - rotation * v2;
    ssd += weight * v.Dot(v);
    total_weight += weight;
  }

  // Return RMSD
  if (total_weight == 0) return -1;
  return sqrt(ssd / total_weight);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movsd %xmm1, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xc(%rdi), %eax
movq %rsi, 0x10(%rsp)
movl 0xc(%rsi), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movsd 0x54aa3(%rip), %xmm0    # 0xa2048
testl %eax, %eax
je 0x4d6e5
xorpd %xmm2, %xmm2
xorpd %xmm1, %xmm1
jle 0x4d6b1
movq %r9, %rbx
movl %eax, %eax
movq %rax, (%rsp)
xorl %r15d, %r15d
leaq 0x88(%rsp), %r14
leaq 0x70(%rsp), %r12
movsd %xmm2, 0x48(%rsp)
movsd %xmm1, 0x50(%rsp)
movsd 0x54a50(%rip), %xmm0    # 0xa2038
testq %rbx, %rbx
je 0x4d5f3
movsd (%rbx,%r15,8), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rsi
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r15,8), %rbp
movq %r14, %rdi
movq 0x20(%rsp), %rdx
callq 0x3cc88
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movsd 0x30(%rsp), %xmm0
callq 0x3e200
movq %r12, %rdi
movq %rbp, %rsi
movq 0x28(%rsp), %rdx
callq 0x3cc88
movq %r14, %rdi
movq %r12, %rsi
movsd 0x38(%rsp), %xmm0
callq 0x3e200
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rdx
callq 0x2e63e
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x3e197
movq %r12, %rdi
movq %r12, %rsi
callq 0x3d756
movsd 0x40(%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd 0x48(%rsp), %xmm2
addsd %xmm0, %xmm2
movsd 0x50(%rsp), %xmm1
addsd %xmm3, %xmm1
incq %r15
cmpq %r15, (%rsp)
jne 0x4d5d4
ucomisd 0x54b2f(%rip), %xmm1    # 0xa21e8
movsd 0x54987(%rip), %xmm0    # 0xa2048
jne 0x4d6c5
jnp 0x4d6e5
divsd %xmm1, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0x4d6dc
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x4d6e5
movapd %xmm2, %xmm0
callq 0xe340
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3AlignError(gaps::RNArray<gaps::R3Point*> const&, gaps::RNArray<gaps::R3Point*> const&, gaps::R4Matrix const&, double const*)
RNScalar 
R3AlignError(const RNArray<R3Point *>& points1, const RNArray<R3Point *>& points2, 
  const R4Matrix& matrix, const RNScalar* weights)
{
  // Get number of points
  int count = points1.NEntries();
  if (points2.NEntries() < count) count = points2.NEntries();
  if (count == 0) return -1;

  // Compute sum of squared distances
  RNScalar ssd = 0;
  RNScalar total_weight = 0;
  for (int i = 0; i < count; i++) {
    RNScalar weight = (weights) ? weights[i] : 1;
    R3Point *point1 = points1[i];
    R3Point point2 = *(points2[i]);
    point2 = matrix * point2;
    R3Vector v = *point1 - point2;
    ssd += weight * v.Dot(v);
    total_weight += weight;
  }

  // Return RMSD
  if (total_weight == 0) return -1;
  return sqrt(ssd / total_weight);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdx, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xc(%rdi), %eax
movq %rsi, 0x10(%rsp)
movl 0xc(%rsi), %ecx
cmpl %eax, %ecx
cmovll %ecx, %eax
movsd 0x5491e(%rip), %xmm0    # 0xa2048
testl %eax, %eax
je 0x4d827
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
jle 0x4d7f3
movl %eax, %r15d
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x38(%rsp), %rbp
movsd %xmm2, 0x28(%rsp)
movsd %xmm1, 0x30(%rsp)
movsd 0x548d4(%rip), %xmm0    # 0xa2038
testq %rbx, %rbx
je 0x4d76f
movsd (%rbx,%r12,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %r14
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r12,8), %rsi
movq %r13, %rdi
callq 0x3ca36
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x2e6b6
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3cd94
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3cc88
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x3d756
movsd 0x20(%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x28(%rsp), %xmm2
addsd %xmm3, %xmm2
incq %r12
cmpq %r12, %r15
jne 0x4d750
ucomisd 0x549ed(%rip), %xmm2    # 0xa21e8
movsd 0x54845(%rip), %xmm0    # 0xa2048
jne 0x4d807
jnp 0x4d827
divsd %xmm2, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x4d81e
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x4d827
movapd %xmm1, %xmm0
callq 0xe340
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3EstimatePlaneWithPCA(gaps::RNArray<gaps::R3Point*> const&, double const*)
R3Plane
R3EstimatePlaneWithPCA(const RNArray<R3Point *>& points, const RNScalar *weights)
{
  // Return best fitting plane
  RNScalar variances[3];
  R3Point centroid = R3Centroid(points);
  R3Triad axes = R3PrincipleAxes(centroid, points, weights, variances);
  if (RNIsZero(variances[1])) return R3null_plane;
  return R3Plane(centroid, axes[2]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x4ccf0
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %r13
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x4cd9c
movsd 0x8(%r13), %xmm0
leaq 0x97a85(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x53f01(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x4e140
ucomisd %xmm0, %xmm1
jb 0x4e140
leaq 0x49855a(%rip), %rsi    # 0x4e6690
movq %rbx, %rdi
callq 0x3b51a
jmp 0x4e152
leaq 0x68(%rsp), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3b5a6
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3BoundingBox(int, gaps::R3Point const*)
R3Box 
R3BoundingBox(int npoints, const R3Point *points)
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3BoundingBox(array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4e625
movl %ebp, %r12d
movq %rsp, %r15
movl 0xc(%rsp), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70682
addq $0x18, %r14
decq %r12
jne 0x4e60d
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x4cc98
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e64a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3Centroid(int, gaps::R3Point const*, double const*)
R3Point 
R3Centroid(int npoints, const R3Point *points, const RNScalar *weights)
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3Centroid(array, weights);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4e6a4
movl %ebp, %r13d
leaq 0x8(%rsp), %r12
movl 0x14(%rsp), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x70682
addq $0x18, %r15
decq %r13
jne 0x4e68c
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4ccf0
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e6d2
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3PrincipleAxes(gaps::R3Point const&, int, gaps::R3Point const*, double const*, double*)
R3Triad 
R3PrincipleAxes(const R3Point& centroid, int npoints, const R3Point *points, const RNScalar *weights, RNScalar *variances)
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3PrincipleAxes(centroid, array, weights, variances);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r15
movq %rcx, %r13
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4e732
movl %ebp, %r14d
movq %rsp, %rbp
movl 0xc(%rsp), %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x70682
addq $0x18, %r13
decq %r14
jne 0x4e71a
movq %rsp, %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rcx
movq 0x10(%rsp), %r8
callq 0x4cd9c
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e764
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3AverageDistance(gaps::R3Point const&, int, gaps::R3Point const*, double const*)
RNLength
R3AverageDistance(const R3Point& center, int npoints, const R3Point *points, const RNScalar *weights)
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3AverageDistance(center, array, weights);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movq %rsp, %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4e7ba
movl %ebp, %r13d
movq %rsp, %r12
movl 0xc(%rsp), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x70682
addq $0x18, %r15
decq %r13
jne 0x4e7a2
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4d1a8
movsd %xmm0, 0x10(%rsp)
movq %rsp, %rdi
callq 0x70656
movsd 0x10(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e7ed
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3NormalizationTransformation(int, gaps::R3Point const*, int, int, int)
R3Affine 
R3NormalizationTransformation(int npoints, const R3Point *points,  RNBoolean translate, RNBoolean rotate, int scale) 
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3NormalizationTransformation(array, translate, rotate, scale);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x4(%rsp)
movl %r8d, %r14d
movl %ecx, %r15d
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x705ec
testl %r13d, %r13d
jle 0x4e851
movl %r13d, %ebp
leaq 0x8(%rsp), %r13
movl 0x14(%rsp), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x70682
addq $0x18, %r12
decq %rbp
jne 0x4e839
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl 0x4(%rsp), %r8d
callq 0x4d260
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e887
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3AlignError(int, gaps::R3Point const*, gaps::R3Point const*, gaps::R4Matrix const&, double const*)
RNScalar
R3AlignError(int npoints, const R3Point *points1, const R3Point *points2, const R4Matrix& matrix, const RNScalar *weights)
{
  RNArray<R3Point *> array1, array2;
  for (int i = 0; i < npoints; i++) {
    array1.Insert((R3Point *) &points1[i]);
    array2.Insert((R3Point *) &points2[i]);
  }
  return R3AlignError(array1, array2, matrix, weights);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %ebp
leaq 0x18(%rsp), %rdi
callq 0x705ec
leaq 0x8(%rsp), %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4e908
movl %ebp, %ebx
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %rbp
movl 0x24(%rsp), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x70682
movl 0x14(%rsp), %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x70682
addq $0x18, %r15
addq $0x18, %r12
decq %rbx
jne 0x4e8dd
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq (%rsp), %rcx
callq 0x4d6f7
movsd %xmm0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x70656
leaq 0x18(%rsp), %rdi
callq 0x70656
movsd (%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e952
movq %rax, %rbx
jmp 0x4e95f
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70656
leaq 0x18(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3AlignPoints(int, gaps::R3Point const*, gaps::R3Point const*, double const*, int, int, int)
R4Matrix
R3AlignPoints(int npoints, const R3Point *points1, const R3Point *points2, const RNScalar *weights, RNBoolean align_center, RNBoolean align_rotation, int align_scale)
{
  RNArray<R3Point *> array1, array2;
  for (int i = 0; i < npoints; i++) {
    array1.Insert((R3Point *) &points1[i]);
    array2.Insert((R3Point *) &points2[i]);
  }
  return R3AlignPoints(array1, array2, weights, align_center, align_rotation, align_scale);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
callq 0x705ec
leaq 0x10(%rsp), %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4e9e4
movl %ebp, %r14d
leaq 0x20(%rsp), %r13
leaq 0x10(%rsp), %rbp
movl 0x2c(%rsp), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x70682
movl 0x1c(%rsp), %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x70682
addq $0x18, %r15
addq $0x18, %r12
decq %r14
jne 0x4e9b9
movl 0x78(%rsp), %eax
movl 0x70(%rsp), %r9d
movl %eax, (%rsp)
leaq 0x20(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq 0x30(%rsp), %rcx
movl 0xc(%rsp), %r8d
callq 0x4d836
leaq 0x10(%rsp), %rdi
callq 0x70656
leaq 0x20(%rsp), %rdi
callq 0x70656
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ea39
movq %rax, %rbx
jmp 0x4ea46
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x70656
leaq 0x20(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3EstimatePlaneWithPCA(int, gaps::R3Point const*, double const*)
R3Plane
R3EstimatePlaneWithPCA(int npoints, const R3Point *points, const RNScalar *weights)
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3EstimatePlaneWithPCA(array, weights);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x705ec
testl %ebp, %ebp
jle 0x4ea9f
movl %ebp, %r13d
leaq 0x8(%rsp), %r12
movl 0x14(%rsp), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x70682
addq $0x18, %r15
decq %r13
jne 0x4ea87
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4e0c3
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4eacd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Align.cpp
// Function: gaps::R3EstimatePlaneWithRansac(int, gaps::R3Point const*, double const*, double, int, double*, double*)
R3Plane
R3EstimatePlaneWithRansac(int npoints, const R3Point *points, const RNScalar *weights,
  RNScalar tolerance, int max_iterations, RNScalar *max_inlier_fraction, RNScalar *avg_inlier_fraction)
{
  RNArray<R3Point *> array;
  for (int i = 0; i < npoints; i++)
    array.Insert((R3Point *) &points[i]);
  return R3EstimatePlaneWithRansac(array, weights, tolerance, max_iterations, max_inlier_fraction, avg_inlier_fraction);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movl %r8d, %ebp
movsd %xmm0, 0x18(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x705ec
testl %r13d, %r13d
jle 0x4eb39
movl %r13d, %r14d
leaq 0x8(%rsp), %r13
movl 0x14(%rsp), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x70682
addq $0x18, %r12
decq %r14
jne 0x4eb21
movq 0x60(%rsp), %r9
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movsd 0x18(%rsp), %xmm0
movl %ebp, %ecx
movq 0x20(%rsp), %r8
callq 0x4e166
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4eb79
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3CatmullRomSpline.cpp
// Function: gaps::R3CatmullRomSpline::VertexDerivative(int) const
R3Vector R3CatmullRomSpline::
VertexDerivative(int i) const
{
  // Return derivative of curve at ith vertex
  if (NVertices() < 2) return R3zero_vector;
  if (i == NVertices()-1) return Order() * (VertexPosition(NVertices()-1) - PhantomVertexPosition(NVertices()-2, 1));
  else return Order() * (PhantomVertexPosition(i, 0) - VertexPosition(i));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movslq 0x20(%rsi), %rax
cmpq $0x1, %rax
jg 0x4ecaf
leaq 0x59a3e(%rip), %rsi     # 0xa86e0
movq %rbx, %rdi
callq 0x3d4ce
jmp 0x4ed69
movl %edx, %ebp
movq %rsi, %r14
decq %rax
cmpl %edx, %eax
jne 0x4ed13
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x8(%r14), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x3ca36
movl 0x20(%r14), %edx
addl $-0x2, %edx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x4ed7a
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3cc88
movsd 0x534cd(%rip), %xmm0    # 0xa21d8
movq %rbx, %rdi
movq %r14, %rsi
jmp 0x4ed64
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x4ed7a
movslq %ebp, %rax
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x8(%r14), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3ca36
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3cc88
movsd 0x5347a(%rip), %xmm0    # 0xa21d8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3de8e
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3CatmullRomSpline.cpp
// Function: gaps::R3CatmullRomSpline::PhantomVertexPosition(int, int) const
R3Point R3CatmullRomSpline::
PhantomVertexPosition(int i, int j) const
{
  // Return position of phantom Bezier curve control point within ith segment
  // j=0 means first phantom point, and j=1 means second phantom point
  if ((i == 0) && (j == 0)) {
    // Return first phantom point on first curve segment
    return tao * (VertexPosition(0) + PhantomVertexPosition(0, 1));
  }
  else if ((i == NVertices()-1) && (j == 1)) {
    // Return last phantom point on last curve segment
    return tao * (VertexPosition(NVertices()-1) + PhantomVertexPosition(NVertices()-1, 0));
  }
  else {
    // Return phantom point near vertex in middle of spline
    int vertex_index = (j == 0) ? i : i+1;
    R3Point p = VertexPosition(vertex_index);
    R3Vector v = VertexPosition(vertex_index+1) - VertexPosition(vertex_index-1);
    if (j == 0) return p + tao * v;
    else return p - tao * v;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %ecx, %eax
orl %edx, %eax
je 0x4ede6
movl %ecx, %ebp
cmpl $0x1, %ecx
jne 0x4ee43
movslq 0x20(%r14), %rax
decq %rax
cmpl %edx, %eax
jne 0x4ee43
movsd 0x60(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x8(%r14), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x3ca36
movl 0x20(%r14), %edx
decl %edx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
jmp 0x4ee15
movsd 0x60(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%r14), %rsi
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x3ca36
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x4ed7a
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3d42a
movq %rbx, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x3d470
jmp 0x4eeff
xorl %eax, %eax
testl %ebp, %ebp
setne %al
addl %edx, %eax
cltq
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
movq 0x8(%r14), %rsi
addq %r12, %rsi
leaq 0x40(%rsp), %rdi
callq 0x3ca36
movq 0x8(%r14), %rax
leaq (%rax,%r12), %rsi
addq $0x18, %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x3ca36
movq 0x8(%r14), %rax
leaq (%rax,%r12), %rsi
addq $-0x18, %rsi
leaq 0x58(%rsp), %r12
movq %r12, %rdi
callq 0x3ca36
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3cc88
testl %ebp, %ebp
je 0x4eed7
movsd 0x60(%r14), %xmm0
leaq 0x10(%rsp), %r14
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x3de8e
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3d44d
jmp 0x4eeff
movsd 0x60(%r14), %xmm0
leaq 0x10(%rsp), %r14
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x3de8e
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3cd71
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3CatmullRomSpline.cpp
// Function: gaps::R3CatmullRomSpline::BlendingWeight(double, int) const
RNScalar R3CatmullRomSpline::
BlendingWeight(RNScalar t, int k) const
{
  // In interval i through i+1, 
  // k=-1: V(i-1)
  // k=0: V(i)
  // k=1: V(i+1)
  // k=2: V(i+2)
  // t \in [0,1]

  // Compute powers of t
  double t2 = t * t;
  double t3 = t * t2;

  // Compute blending function
  switch (k) {
  case -1: return -tao*t + 2*tao*t2 -tao*t3;
  case 0: return 1 + (tao-3)*t2 + (2-tao)*t3;
  case 1: return tao*t + (3-2*tao)*t2 + (tao-2)*t3;
  case 2: return -tao*t2 + tao*t3;
  }

  // All other vertex_positions
  return 0;
}

// Assembly:
incl %esi
cmpl $0x3, %esi
ja 0x4f360
movapd %xmm0, %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
movapd %xmm1, %xmm0
mulsd %xmm2, %xmm0
leaq 0x59d72(%rip), %rax     # 0xa9028
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movsd 0x60(%rdi), %xmm3
mulsd %xmm3, %xmm2
mulsd %xmm3, %xmm0
addsd %xmm3, %xmm3
mulsd %xmm3, %xmm1
subsd %xmm2, %xmm1
subsd %xmm0, %xmm1
jmp 0x4f35b
movsd 0x60(%rdi), %xmm3
movapd %xmm3, %xmm4
addsd %xmm3, %xmm4
movsd 0x52ee5(%rip), %xmm5    # 0xa21d8
subsd %xmm4, %xmm5
mulsd %xmm5, %xmm1
mulsd %xmm3, %xmm2
addsd 0x52ef9(%rip), %xmm3    # 0xa2200
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
movapd %xmm3, %xmm0
retq
movsd 0x60(%rdi), %xmm2
mulsd %xmm2, %xmm0
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
retq
movsd 0x60(%rdi), %xmm2
movsd 0x59ce1(%rip), %xmm3    # 0xa9018
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
addsd 0x52cf1(%rip), %xmm3    # 0xa2038
movsd 0x52eb9(%rip), %xmm1    # 0xa2208
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm3, %xmm1
movapd %xmm1, %xmm0
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3CatmullRomSpline.cpp
// Function: gaps::R3CatmullRomSpline::BlendingWeightDerivative(double, int) const
RNScalar R3CatmullRomSpline::
BlendingWeightDerivative(RNScalar t, int k) const
{
  // In interval i through i+1, 
  // k=-1: V(i-1)
  // k=0: V(i)
  // k=1: V(i+1)
  // k=2: V(i+2)
  // t \in [0,1]

  // Compute powers of t
  double t2 = t * t;

  // Compute blending function
  switch (k) {
  case -1: return -tao + 4*tao*t -3*tao*t2;
  case 0: return 2*(tao-3)*t + 3*(2-tao)*t2;
  case 1: return tao + 2*(3-2*tao)*t + 3*(tao-2)*t2;
  case 2: return -2*tao*t + 3*tao*t2;
  }

  // All other vertex_positions
  return 0;
}

// Assembly:
incl %esi
cmpl $0x3, %esi
ja 0x4f7bd
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
leaq 0x5994a(%rip), %rax     # 0xa9038
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movsd 0x60(%rdi), %xmm1
movsd 0x52aec(%rip), %xmm3    # 0xa21f0
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm3
subsd %xmm1, %xmm3
mulsd 0x59900(%rip), %xmm1    # 0xa9018
mulsd %xmm2, %xmm1
addsd %xmm3, %xmm1
jmp 0x4f7b8
movsd 0x60(%rdi), %xmm1
movapd %xmm1, %xmm3
addsd %xmm1, %xmm3
movsd 0x52a9e(%rip), %xmm4    # 0xa21d8
movapd %xmm4, %xmm5
subsd %xmm3, %xmm5
addsd %xmm5, %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
addsd 0x52aaa(%rip), %xmm1    # 0xa2200
mulsd %xmm4, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm5, %xmm1
jmp 0x4f7b8
movsd 0x60(%rdi), %xmm3
movsd 0x52a8f(%rip), %xmm1    # 0xa2200
mulsd %xmm3, %xmm1
mulsd 0x52a5b(%rip), %xmm3    # 0xa21d8
mulsd %xmm3, %xmm2
jmp 0x4f7b0
movsd 0x60(%rdi), %xmm3
movsd 0x59888(%rip), %xmm1    # 0xa9018
addsd %xmm3, %xmm1
addsd %xmm1, %xmm1
movsd 0x52a68(%rip), %xmm4    # 0xa2208
subsd %xmm3, %xmm4
mulsd 0x52a2c(%rip), %xmm4    # 0xa21d8
mulsd %xmm4, %xmm2
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3CatmullRomSpline.cpp
// Function: gaps::R3CatmullRomSpline::UpdateBBox()
void R3CatmullRomSpline::
UpdateBBox(void) 
{
  // Initialize bounding box
  R3Polyline::UpdateBBox();

  // Union phantom vertex_positions
  for (int i = 0; i < NVertices()-1; i++) {
    bbox.Union(PhantomVertexPosition(i, 0));
    bbox.Union(PhantomVertexPosition(i, 1));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x50e40
cmpl $0x2, 0x20(%rbx)
jl 0x4f825
leaq 0x28(%rbx), %r14
xorl %ebp, %ebp
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x4ed7a
movq %r14, %rdi
movq %r15, %rsi
callq 0x27f0e
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x4ed7a
movq %r14, %rdi
movq %r15, %rsi
callq 0x27f0e
incl %ebp
movl 0x20(%rbx), %eax
decl %eax
cmpl %eax, %ebp
jl 0x4f7e3
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3CatmullRomSpline.cpp
// Function: gaps::R3CatmullRomSpline::Outline(double) const
void R3CatmullRomSpline::
Outline(RNScalar sample_spacing) const
{
  // Determine sample spacing
  const int default_nsegments = 100;
  if (sample_spacing == 0) sample_spacing =  (EndParameter() - StartParameter()) / default_nsegments;
  if (sample_spacing == 0) return;
  
  // Draw spline
  R3BeginLine();
  for (RNScalar u = StartParameter(); u <= EndParameter(); u += sample_spacing) 
    R3LoadPoint(PointPosition(u));
  R3EndLine();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4f88e
jp 0x4f88e
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x220(%rax)
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x218(%rax)
xorpd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm2
subsd %xmm0, %xmm2
movapd %xmm2, %xmm0
divsd 0x59792(%rip), %xmm0    # 0xa9020
ucomisd %xmm1, %xmm0
jne 0x4f89a
jnp 0x4f929
movl $0x3, %edi
movsd %xmm0, 0x8(%rsp)
callq 0xe110
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x218(%rax)
movsd %xmm0, (%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x220(%rax)
movsd (%rsp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x4f924
movapd %xmm1, %xmm0
leaq 0x10(%rsp), %r14
movsd %xmm0, (%rsp)
movq (%rbx), %rax
movq %r14, %rdi
movq %rbx, %rsi
movsd (%rsp), %xmm0
callq *0x238(%rax)
movq %r14, %rdi
callq 0xe130
movsd (%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x220(%rax)
ucomisd (%rsp), %xmm0
movsd (%rsp), %xmm0
jae 0x4f8db
callq 0xe5d0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::R3Polyline(gaps::R3Polyline const&)
R3Polyline::
R3Polyline(const R3Polyline& polyline)
  : vertex_positions(NULL),
    vertex_parameters(NULL),
    vertex_datas(NULL),
    nvertices(polyline.nvertices),
    bbox(polyline.BBox())
{
  // Copy vertex_positions and parameters
  if (nvertices > 0) {
    this->vertex_positions = new R3Point [ nvertices ];
    this->vertex_parameters = new RNScalar [ nvertices ];
    for (int i = 0; i < nvertices; i++) {
      this->vertex_positions[i] = polyline.vertex_positions[i];
      this->vertex_parameters[i] = polyline.vertex_parameters[i];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x50f3c
leaq 0x92bdd(%rip), %rax     # 0xe2590
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movl 0x20(%r15), %eax
movl %eax, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movq (%r15), %rax
movq %rdi, (%rsp)
movq %r15, %rsi
callq *0x88(%rax)
movslq 0x20(%rbx), %rax
testq %rax, %rax
jle 0x4fa83
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
movq %r12, %rdi
callq 0xe030
movq %rax, %r13
leaq 0x8(%rbx), %rbp
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
callq 0x3ca24
addq $0x18, %r14
cmpq %r14, %r12
jne 0x4fa07
movq %r13, 0x8(%rbx)
movslq 0x20(%rbx), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0xe030
movq %rax, 0x10(%rbx)
cmpl $0x0, 0x20(%rbx)
jle 0x4fa83
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x8(%r15), %rsi
addq %r12, %rsi
movq (%rbp), %rdi
addq %r12, %rdi
callq 0x3cd94
movq 0x10(%r15), %rax
movsd (%rax,%r13,8), %xmm0
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
movslq 0x20(%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0x4fa4c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x4fab5
jmp 0x4fa99
movq %rax, %r15
jmp 0x4faac
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8c0
movq (%rsp), %rdi
callq 0x28348
movq %rbx, %rdi
callq 0x50f48
movq %r15, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::R3Polyline(gaps::RNArray<gaps::R3Point*> const&)
R3Polyline::
R3Polyline(const RNArray<R3Point *>& points)
  : vertex_positions(NULL),
    vertex_parameters(NULL),
    vertex_datas(NULL),
    nvertices(points.NEntries()),
    bbox(FLT_MAX, FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX)
{
  // Copy vertex_positions
  if (points.NEntries() > 0) {
    this->vertex_positions = new R3Point [ points.NEntries() ];
    for (int i = 0; i < points.NEntries(); i++) {
      this->vertex_positions[i] = *(points[i]);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
callq 0x50f3c
leaq 0x92aad(%rip), %rax     # 0xe2590
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movl 0xc(%r15), %eax
movl %eax, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movsd 0x52538(%rip), %xmm0    # 0xa2040
movsd 0x531b0(%rip), %xmm3    # 0xa2cc0
movq %rdi, (%rsp)
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x27590
movslq 0xc(%r15), %rax
testq %rax, %rax
jle 0x4fb8e
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
movq %r12, %rdi
callq 0xe030
movq %rax, %r13
leaq 0x8(%rbx), %rbp
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
callq 0x3ca24
addq $0x18, %r14
cmpq %r14, %r12
jne 0x4fb48
movq %r13, (%rbp)
cmpl $0x0, 0xc(%r15)
jle 0x4fb8e
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%r15), %rax
movq (%rax,%r13,8), %rsi
movq (%rbp), %rdi
addq %r12, %rdi
callq 0x3cd94
incq %r13
movslq 0xc(%r15), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0x4fb6b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fba4
movq %rax, %r15
jmp 0x4fbc0
movq %rax, %r15
jmp 0x4fbb7
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8c0
movq (%rsp), %rdi
callq 0x28348
movq %rbx, %rdi
callq 0x50f48
movq %r15, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::R3Polyline(gaps::R3Point const*, int)
R3Polyline::
R3Polyline(const R3Point *points, int npoints)
  : vertex_positions(NULL),
    vertex_parameters(NULL),
    vertex_datas(NULL),
    nvertices(npoints),
    bbox(FLT_MAX, FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX)
{
  // Copy vertex_positions
  if (npoints > 0) {
    this->vertex_positions = new R3Point [ npoints ];
    for (int i = 0; i < npoints; i++) {
      this->vertex_positions[i] = points[i];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x50f3c
leaq 0x9299e(%rip), %rax     # 0xe2590
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
movl %ebp, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movsd 0x5242d(%rip), %xmm0    # 0xa2040
movsd 0x530a5(%rip), %xmm3    # 0xa2cc0
movq %rdi, 0x10(%rsp)
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x27590
testl %ebp, %ebp
jle 0x4fc94
movl %ebp, %r14d
leaq (,%r14,8), %rax
leaq (%rax,%rax,2), %r12
movq %r12, %rdi
movq %rbx, 0x8(%rsp)
callq 0xe030
movq %rax, %r13
leaq 0x8(%rbx), %rbp
xorl %ebx, %ebx
leaq (%rbx,%r13), %rdi
callq 0x3ca24
addq $0x18, %rbx
cmpq %rbx, %r12
jne 0x4fc5a
movq %r13, (%rbp)
shlq $0x3, %r14
leaq (%r14,%r14,2), %r14
xorl %r12d, %r12d
leaq (%r15,%r12), %rsi
movq (%rbp), %rdi
addq %r12, %rdi
callq 0x3cd94
addq $0x18, %r12
cmpq %r12, %r14
jne 0x4fc7b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4fcaf
movq %rbx, 0x8(%rsp)
movq %rax, %r15
jmp 0x4fccc
movq %rax, %r15
jmp 0x4fcc2
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8c0
movq 0x10(%rsp), %rdi
callq 0x28348
movq 0x8(%rsp), %rdi
callq 0x50f48
movq %r15, %rdi
callq 0xe7e0