LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x406ec
testl %eax, %eax
je 0x45745
movsd 0x8(%r15), %xmm2
leaq 0x9550d(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm0
subsd 0x20(%r14), %xmm2
movapd 0x4d983(%rip), %xmm1    # 0x93030
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
pushq $0x1
popq %rbx
jb 0x456c4
ucomisd %xmm2, %xmm0
jae 0x45745
movsd 0x20(%r15), %xmm2
subsd 0x8(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x456dc
ucomisd %xmm2, %xmm0
jae 0x45745
movsd 0x10(%r15), %xmm2
subsd 0x28(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x456f4
ucomisd %xmm2, %xmm0
jae 0x45745
movsd 0x28(%r15), %xmm2
subsd 0x10(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x4570c
ucomisd %xmm2, %xmm0
jae 0x45745
movsd 0x18(%r15), %xmm2
subsd 0x30(%r14), %xmm2
ucomisd %xmm1, %xmm2
jb 0x45724
ucomisd %xmm2, %xmm0
jae 0x45745
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_O2/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 0x43420
leaq 0x95442(%rip), %r15     # 0xdaba8
movsd (%r15), %xmm1
movapd %xmm1, %xmm2
xorpd 0x4d8b9(%rip), %xmm2    # 0x93030
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 0x43420
movsd (%r15), %xmm1
movapd 0x4d88a(%rip), %xmm2    # 0x93030
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_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x1
popq %r12
leaq 0x951e8(%rip), %r13     # 0xdaba8
pushq $0x3
popq %rbp
cmpq $0x4, %r12
je 0x45a20
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x43420
testb $0x1, %r15b
sete %al
movsd (%r13), %xmm1
movapd %xmm1, %xmm2
xorpd 0x4d642(%rip), %xmm2    # 0x93030
ucomisd %xmm0, %xmm2
seta %cl
andb %al, %cl
movzbl %cl, %eax
movl %r15d, %ecx
orl %eax, %ecx
ucomisd %xmm1, %xmm0
leal 0x2(%r15,%rax), %eax
cmovbel %ecx, %eax
testb $0x2, %r15b
cmovnel %ecx, %eax
incq %r12
movl %eax, %r15d
cmpl $0x3, %eax
jne 0x459c3
movl %ebp, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x95462(%rip), %rsi     # 0xdaea8
callq 0x24b3e
xorl %r15d, %r15d
movslq 0xc(%r14), %rax
cmpq %rax, %r15
jge 0x45a6b
movq (%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x254a4
incq %r15
jmp 0x45a4e
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x37b4c
xorpd %xmm0, %xmm0
xorl %r13d, %r13d
leaq 0x18(%rsp), %r12
movslq 0xc(%r15), %rax
cmpq %rax, %r13
jge 0x45b0c
movsd %xmm0, 0x10(%rsp)
movsd 0x4d538(%rip), %xmm0    # 0x93008
testq %r14, %r14
je 0x45adb
movsd (%r14,%r13,8), %xmm0
movq (%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x382c0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x381b6
movsd 0x10(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
incq %r13
jmp 0x45ab9
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x45b1e
movq %rbx, %rdi
callq 0x38234
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
xorpd %xmm3, %xmm3
movslq 0xc(%r14), %rax
cmpq %rax, %r12
jge 0x45f8d
movapd %xmm3, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
movsd 0x4d0bc(%rip), %xmm0    # 0x93008
testq %rbx, %rbx
je 0x45f57
movsd (%rbx,%r12,8), %xmm0
movsd %xmm0, (%rsp)
movq (%r14), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
callq 0x4321a
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm0
movapd 0x10(%rsp), %xmm3
addsd %xmm0, %xmm3
movsd 0x8(%rsp), %xmm2
addsd %xmm1, %xmm2
incq %r12
jmp 0x45f2f
movapd %xmm3, %xmm1
divsd %xmm2, %xmm1
xorpd %xmm0, %xmm0
cmpltsd %xmm2, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm3, %xmm0
orpd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 $0xc8, %rsp
movsd %xmm1, 0x48(%rsp)
movsd %xmm0, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rdi, 0x18(%rsp)
movl 0xc(%rdi), %ebx
movq %rsi, 0x20(%rsp)
movl 0xc(%rsi), %eax
cmpl %ebx, %eax
cmovll %eax, %ebx
movsd 0x4cdd4(%rip), %xmm0    # 0x93020
movsd %xmm0, 0x8(%rsp)
testl %ebx, %ebx
je 0x46394
movq %r9, %r14
xorl %r13d, %r13d
testl %ebx, %ebx
cmovlel %r13d, %ebx
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
movq %rbx, 0x10(%rsp)
cmpq %r13, %rbx
je 0x46369
movsd %xmm2, 0x58(%rsp)
movsd %xmm1, 0x60(%rsp)
movsd 0x4cd78(%rip), %xmm0    # 0x93008
testq %r14, %r14
je 0x4629b
movsd (%r14,%r13,8), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rsi
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rbp
leaq 0x98(%rsp), %r12
movq %r12, %rdi
movq 0x30(%rsp), %rdx
callq 0x37d29
leaq 0xb0(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movsd 0x40(%rsp), %xmm0
callq 0x38d1e
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %rbp, %rsi
movq 0x38(%rsp), %rdx
callq 0x37d29
movq %r12, %rdi
movq %r15, %rsi
movsd 0x48(%rsp), %xmm0
callq 0x38d1e
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
movq %r12, %rdx
callq 0x2b193
movq %r15, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x38cb5
movq %r15, %rdi
movq %r15, %rsi
callq 0x38586
movsd 0x50(%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd 0x60(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x58(%rsp), %xmm2
addsd %xmm3, %xmm2
incq %r13
movq 0x10(%rsp), %rbx
jmp 0x46273
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jne 0x46375
jnp 0x46394
divsd %xmm2, %xmm1
ucomisd %xmm0, %xmm1
jb 0x46385
sqrtsd %xmm1, %xmm0
jmp 0x4638e
movapd %xmm1, %xmm0
callq 0xe350
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, 0x18(%rsp)
movq %rdi, 0x8(%rsp)
movl 0xc(%rdi), %r15d
movq %rsi, 0x10(%rsp)
movl 0xc(%rsi), %eax
cmpl %r15d, %eax
cmovll %eax, %r15d
movsd 0x4cc41(%rip), %xmm0    # 0x93020
movsd %xmm0, (%rsp)
testl %r15d, %r15d
je 0x464de
movq %rcx, %rbx
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
xorpd %xmm1, %xmm1
leaq 0x50(%rsp), %r13
leaq 0x38(%rsp), %rbp
xorpd %xmm2, %xmm2
cmpq %r12, %r15
je 0x464b4
movsd %xmm2, 0x28(%rsp)
movsd %xmm1, 0x30(%rsp)
movsd 0x4cbdf(%rip), %xmm0    # 0x93008
testq %rbx, %rbx
je 0x46434
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 0x37b5c
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x2b20b
movq %r13, %rdi
movq %rbp, %rsi
callq 0x37e36
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x37d29
movq %rbp, %rdi
movq %rbp, %rsi
callq 0x38586
movsd 0x20(%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd 0x30(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x28(%rsp), %xmm2
addsd %xmm3, %xmm2
incq %r12
jmp 0x4640c
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jne 0x464c0
jnp 0x464de
divsd %xmm2, %xmm1
ucomisd %xmm0, %xmm1
jb 0x464d0
sqrtsd %xmm1, %xmm0
jmp 0x464d9
movapd %xmm1, %xmm0
callq 0xe350
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x45a87
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %r13
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %r13, %r8
callq 0x45b2f
movsd 0x8(%r13), %xmm0
leaq 0x93e18(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd 0x4c294(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x46dbd
ucomisd %xmm0, %xmm1
jb 0x46dbd
leaq 0x4948ed(%rip), %rsi    # 0x4db6a0
movq %rbx, %rdi
callq 0x36720
jmp 0x46dcf
leaq 0x68(%rsp), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x367ac
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
movq %r15, %rdi
callq 0x6630a
xorl %r12d, %r12d
testl %ebp, %ebp
cmovgl %ebp, %r12d
subq $0x1, %r12
jb 0x47228
movq %r15, %rdi
movq %r14, %rsi
callq 0x22bfc
addq $0x18, %r14
jmp 0x47211
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x45a34
movq %rsp, %rdi
callq 0x66378
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4724d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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), %r12
movq %r12, %rdi
callq 0x6630a
xorl %r13d, %r13d
testl %ebp, %ebp
cmovgl %ebp, %r13d
subq $0x1, %r13
jb 0x472a6
movq %r12, %rdi
movq %r15, %rsi
callq 0x22bfc
addq $0x18, %r15
jmp 0x4728f
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x45a87
leaq 0x8(%rsp), %rdi
callq 0x66378
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x472d4
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x28, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
movq %rcx, %r13
movl %edx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x6630a
xorl %r15d, %r15d
testl %r14d, %r14d
cmovgl %r14d, %r15d
subq $0x1, %r15
jb 0x4733b
movq %rbp, %rdi
movq %r13, %rsi
callq 0x22bfc
addq $0x18, %r13
jmp 0x47324
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
callq 0x45b2f
leaq 0x18(%rsp), %rdi
callq 0x66378
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47373
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6630a
xorl %r13d, %r13d
testl %ebp, %ebp
cmovgl %ebp, %r13d
subq $0x1, %r13
jb 0x473ce
movq %r12, %rdi
movq %r15, %rsi
callq 0x22bfc
addq $0x18, %r15
jmp 0x473b7
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x45f10
movsd %xmm0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x66378
movsd (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47403
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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, (%rsp)
movl %ecx, %r15d
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x6630a
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
subq $0x1, %r14
jb 0x47467
movq %r13, %rdi
movq %r12, %rsi
callq 0x22bfc
addq $0x18, %r12
jmp 0x47450
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movl (%rsp), %ecx
movl 0x4(%rsp), %r8d
callq 0x45fb6
leaq 0x8(%rsp), %rdi
callq 0x66378
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4749d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6630a
leaq 0x8(%rsp), %rdi
callq 0x6630a
xorl %ebx, %ebx
testl %ebp, %ebp
cmovgl %ebp, %ebx
leaq 0x18(%rsp), %r13
leaq 0x8(%rsp), %rbp
subq $0x1, %rbx
jb 0x4751a
movq %r13, %rdi
movq %r12, %rsi
callq 0x22bfc
movq %rbp, %rdi
movq %r15, %rsi
callq 0x22bfc
addq $0x18, %r15
addq $0x18, %r12
jmp 0x474f4
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
movq (%rsp), %rcx
callq 0x463ac
movsd %xmm0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x66378
leaq 0x18(%rsp), %rdi
callq 0x66378
movsd (%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47564
movq %rax, %rbx
jmp 0x47571
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x66378
leaq 0x18(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6630a
leaq 0x10(%rsp), %rdi
callq 0x6630a
xorl %r14d, %r14d
testl %ebp, %ebp
cmovgl %ebp, %r14d
leaq 0x20(%rsp), %r13
leaq 0x10(%rsp), %rbp
subq $0x1, %r14
jb 0x475f3
movq %r13, %rdi
movq %r12, %rsi
callq 0x22bfc
movq %rbp, %rdi
movq %r15, %rsi
callq 0x22bfc
addq $0x18, %r15
addq $0x18, %r12
jmp 0x475cd
movl 0x78(%rsp), %eax
movl %eax, (%rsp)
leaq 0x20(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq 0x30(%rsp), %rcx
movl 0xc(%rsp), %r8d
movl 0x70(%rsp), %r9d
callq 0x464f2
leaq 0x10(%rsp), %rdi
callq 0x66378
leaq 0x20(%rsp), %rdi
callq 0x66378
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47648
movq %rax, %rbx
jmp 0x47655
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x66378
leaq 0x20(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x10(%rsp)
movl %r8d, 0x4(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rcx, %r15
movq %rdx, %r13
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x6630a
xorl %ebp, %ebp
testl %r14d, %r14d
cmovgl %r14d, %ebp
subq $0x1, %rbp
jb 0x47747
movq %r12, %rdi
movq %r13, %rsi
callq 0x22bfc
addq $0x18, %r13
jmp 0x47730
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movsd 0x8(%rsp), %xmm0
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %r8
movq 0x60(%rsp), %r9
callq 0x46de3
leaq 0x18(%rsp), %rdi
callq 0x66378
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47789
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x66378
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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
movl 0x20(%rsi), %eax
cmpl $0x1, %eax
jg 0x47914
leaq 0x51d86(%rip), %rsi     # 0x99690
movq %rbx, %rdi
callq 0x3831c
jmp 0x4798b
movl %edx, %ebp
movq %rsi, %r14
decl %eax
leaq 0x20(%rsp), %r15
movq %r15, %rdi
cmpl %edx, %eax
jne 0x4794a
movl %ebp, %edx
callq 0x4844c
movl 0x20(%r14), %edx
addl $-0x2, %edx
leaq 0x8(%rsp), %r12
pushq $0x1
popq %rcx
movq %r12, %rdi
movq %r14, %rsi
callq 0x4799c
jmp 0x47965
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x4799c
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x4844c
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x37d29
movsd 0x4b858(%rip), %xmm0    # 0x931d8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38a02
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movl %ecx, %eax
orl %edx, %eax
je 0x47a19
movl %ecx, %ebp
movl %edx, %r15d
cmpl $0x1, %ecx
jne 0x47a72
movl 0x20(%r14), %eax
decl %eax
cmpl %r15d, %eax
jne 0x47a72
movsd 0x60(%r14), %xmm0
movsd %xmm0, (%rsp)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x4844c
movl 0x20(%r14), %edx
decl %edx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x4799c
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
jmp 0x47a58
movsd 0x60(%r14), %xmm0
movsd %xmm0, (%rsp)
movq 0x8(%r14), %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x37b5c
leaq 0x8(%rsp), %r12
pushq $0x1
popq %rcx
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4799c
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3827a
movq %rbx, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
callq 0x382c0
jmp 0x47b1e
xorl %r13d, %r13d
testl %ebp, %ebp
setne %r13b
leal (%r15,%r13), %edx
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x4844c
leal (%r15,%r13), %edx
incl %edx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x4844c
leal (%r15,%r13), %edx
decl %edx
leaq 0x50(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4844c
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x37d29
testl %ebp, %ebp
je 0x47af6
movsd 0x60(%r14), %xmm0
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x38a02
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x3829d
jmp 0x47b1e
movsd 0x60(%r14), %xmm0
leaq 0x8(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x38a02
leaq 0x38(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x37e13
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x47f0c
movapd %xmm0, %xmm2
movapd %xmm0, %xmm1
mulsd %xmm2, %xmm1
movapd %xmm1, %xmm0
mulsd %xmm2, %xmm0
leaq 0x52176(%rip), %rax     # 0x99fd8
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 0x47f07
movsd 0x60(%rdi), %xmm3
movapd %xmm3, %xmm4
addsd %xmm3, %xmm4
movsd 0x4b339(%rip), %xmm5    # 0x931d8
subsd %xmm4, %xmm5
mulsd %xmm5, %xmm1
mulsd %xmm3, %xmm2
addsd 0x4b34d(%rip), %xmm3    # 0x93200
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 0x520e5(%rip), %xmm3    # 0x99fc8
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
addsd 0x4b115(%rip), %xmm3    # 0x93008
movsd 0x4b30d(%rip), %xmm1    # 0x93208
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm3, %xmm1
movapd %xmm1, %xmm0
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x482ff
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
leaq 0x51db8(%rip), %rax     # 0x99fe8
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movsd 0x60(%rdi), %xmm1
movsd 0x4afaa(%rip), %xmm3    # 0x931f0
mulsd %xmm1, %xmm3
mulsd %xmm0, %xmm3
subsd %xmm1, %xmm3
mulsd 0x51d6e(%rip), %xmm1    # 0x99fc8
mulsd %xmm2, %xmm1
addsd %xmm3, %xmm1
jmp 0x482fa
movsd 0x60(%rdi), %xmm1
movapd %xmm1, %xmm3
addsd %xmm1, %xmm3
movsd 0x4af5c(%rip), %xmm4    # 0x931d8
movapd %xmm4, %xmm5
subsd %xmm3, %xmm5
addsd %xmm5, %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
addsd 0x4af68(%rip), %xmm1    # 0x93200
mulsd %xmm4, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm5, %xmm1
jmp 0x482fa
movsd 0x60(%rdi), %xmm3
movsd 0x4af4d(%rip), %xmm1    # 0x93200
mulsd %xmm3, %xmm1
mulsd 0x4af19(%rip), %xmm3    # 0x931d8
mulsd %xmm3, %xmm2
jmp 0x482f2
movsd 0x60(%rdi), %xmm3
movsd 0x51cf6(%rip), %xmm1    # 0x99fc8
addsd %xmm3, %xmm1
addsd %xmm1, %xmm1
movsd 0x4af26(%rip), %xmm4    # 0x93208
subsd %xmm3, %xmm4
mulsd 0x4aeea(%rip), %xmm4    # 0x931d8
mulsd %xmm4, %xmm2
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
movapd %xmm1, %xmm0
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x49666
leaq 0x28(%rbx), %r14
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
pushq $0x1
popq %r12
movl 0x20(%rbx), %eax
decl %eax
cmpl %eax, %ebp
jge 0x48369
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x4799c
movq %r14, %rdi
movq %r15, %rsi
callq 0x254a4
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x4799c
movq %r14, %rdi
movq %r15, %rsi
callq 0x254a4
incl %ebp
jmp 0x48327
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x483d4
jp 0x483d4
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 0x51bfc(%rip), %xmm0    # 0x99fd0
ucomisd %xmm1, %xmm0
jne 0x483dc
jnp 0x48443
movsd %xmm0, 0x8(%rsp)
callq 0x21c38
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x218(%rax)
movsd %xmm0, (%rsp)
leaq 0x10(%rsp), %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x220(%rax)
ucomisd (%rsp), %xmm0
jb 0x4843e
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)
jmp 0x483fd
callq 0xe5f0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x49716
leaq 0x8f0b9(%rip), %rax     # 0xd75a0
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
andq $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 0x485ab
imulq $0x18, %rax, %r12
movq %r12, %rdi
callq 0xe030
movq %rax, %r13
leaq 0x8(%rbx), %rbp
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
callq 0x37b4a
addq $0x18, %r14
cmpq %r14, %r12
jne 0x48534
movq %r13, 0x8(%rbx)
movslq 0x20(%rbx), %r14
leaq (,%r14,8), %rax
testq %r14, %r14
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0xe030
movq %rax, 0x10(%rbx)
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq %r14d, %rax
cmpq %rax, %r13
jge 0x485ab
movq 0x8(%r15), %rsi
addq %r12, %rsi
movq (%rbp), %rdi
addq %r12, %rdi
callq 0x37e36
movq 0x10(%r15), %rax
movsd (%rax,%r13,8), %xmm0
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
movl 0x20(%rbx), %r14d
addq $0x18, %r12
jmp 0x4856f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x485dd
jmp 0x485c1
movq %rax, %r15
jmp 0x485d4
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8f0
movq (%rsp), %rdi
callq 0x25832
movq %rbx, %rdi
callq 0x49722
movq %r15, %rdi
callq 0xe810
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x49716
leaq 0x8ef95(%rip), %rax     # 0xd75a0
movq %rax, (%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rbx)
movups %xmm0, 0x8(%rbx)
movl 0xc(%r15), %eax
movl %eax, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movsd 0x4a9eb(%rip), %xmm0    # 0x93018
movsd 0x4b633(%rip), %xmm3    # 0x93c68
movq %rdi, (%rsp)
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x24bde
movslq 0xc(%r15), %rax
testq %rax, %rax
jle 0x486aa
imulq $0x18, %rax, %r12
movq %r12, %rdi
callq 0xe030
movq %rax, %r13
leaq 0x8(%rbx), %rbp
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
callq 0x37b4a
addq $0x18, %r14
cmpq %r14, %r12
jne 0x48669
movq %r13, (%rbp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq 0xc(%r15), %rax
cmpq %rax, %r13
jge 0x486aa
movq (%r15), %rax
movq (%rax,%r13,8), %rsi
movq (%rbp), %rdi
addq %r12, %rdi
callq 0x37e36
incq %r13
addq $0x18, %r12
jmp 0x48685
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x486c0
movq %rax, %r15
jmp 0x486dc
movq %rax, %r15
jmp 0x486d3
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8f0
movq (%rsp), %rdi
callq 0x25832
movq %rbx, %rdi
callq 0x49722
movq %r15, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x49716
leaq 0x8ee95(%rip), %rax     # 0xd75a0
movq %rax, (%rbx)
andq $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl %ebp, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movsd 0x4a8ef(%rip), %xmm0    # 0x93018
movsd 0x4b537(%rip), %xmm3    # 0x93c68
movq %rdi, (%rsp)
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x24bde
testl %ebp, %ebp
jle 0x48796
movl %ebp, %eax
imulq $0x18, %rax, %r12
movq %r12, %rdi
callq 0xe030
movq %rax, %r13
leaq 0x8(%rbx), %rbp
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
callq 0x37b4a
addq $0x18, %r14
cmpq %r14, %r12
jne 0x48762
movq %r13, (%rbp)
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x48796
leaq (%r15,%r13), %rsi
movq (%rbp), %rdi
addq %r13, %rdi
callq 0x37e36
addq $0x18, %r13
jmp 0x4877b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x487ac
movq %rax, %r15
jmp 0x487c8
movq %rax, %r15
jmp 0x487bf
movq %rax, %r15
movq %r13, %rdi
movq %r12, %rsi
callq 0xe8f0
movq (%rsp), %rdi
callq 0x25832
movq %rbx, %rdi
callq 0x49722
movq %r15, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::R3Polyline(gaps::R3Point const*, double const*, int)
R3Polyline::
R3Polyline(const R3Point *points, const RNScalar *parameters, 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 and parameters
  if (npoints > 0) {
    this->vertex_positions = new R3Point [ npoints ];
    this->vertex_parameters = new RNScalar [ npoints ];
    for (int i = 0; i < npoints; i++) {
      this->vertex_positions[i] = points[i];
      this->vertex_parameters[i] = parameters[i];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
callq 0x49716
leaq 0x8eda1(%rip), %rax     # 0xd75a0
movq %rax, (%rbx)
andq $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl %ebp, 0x20(%rbx)
leaq 0x28(%rbx), %rdi
movsd 0x4a7fb(%rip), %xmm0    # 0x93018
movsd 0x4b443(%rip), %xmm3    # 0x93c68
movq %rdi, (%rsp)
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x24bde
testl %ebp, %ebp
jle 0x488bd
movq %r14, 0x8(%rsp)
movl %ebp, %r14d
imulq $0x18, %r14, %r13
movq %r13, %rdi
callq 0xe030
movq %rax, %rbp
leaq 0x8(%rbx), %r15
xorl %r12d, %r12d
leaq (%r12,%rbp), %rdi
callq 0x37b4a
addq $0x18, %r12
cmpq %r12, %r13
jne 0x4885c
movq %rbp, (%r15)
leaq (,%r14,8), %rdi
callq 0xe030
movq %rax, 0x10(%rbx)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x8(%rsp), %r12
cmpq %rbp, %r14
je 0x488bd
movq 0x10(%rsp), %rax
leaq (%rax,%r13), %rsi
movq (%r15), %rdi
addq %r13, %rdi
callq 0x37e36
movsd (%r12,%rbp,8), %xmm0
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax,%rbp,8)
incq %rbp
addq $0x18, %r13
jmp 0x4888c
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x488ef
jmp 0x488d3
movq %rax, %r15
jmp 0x488e6
movq %rax, %r15
movq %rbp, %rdi
movq %r13, %rsi
callq 0xe8f0
movq (%rsp), %rdi
callq 0x25832
movq %rbx, %rdi
callq 0x49722
movq %r15, %rdi
callq 0xe810
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::IsPoint() const
const RNBoolean R3Polyline::
IsPoint(void) const
{
  // Return whether spline covers one point
  if (nvertices == 0) return FALSE;
  if (nvertices == 1) return TRUE;

  // Look for vertices at different positions
  for (int i = 1; i < nvertices; i++) {
    if (!R3Contains(vertex_positions[0], vertex_positions[i])) {
      return FALSE;
    }
  }

  // All vertices are at same position
  return TRUE;
}

// Assembly:
movl 0x20(%rdi), %eax
cmpl $0x2, %eax
jb 0x48c7c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x18
popq %r15
xorl %r14d, %r14d
movslq 0x20(%rbx), %r12
incq %r14
cmpq %r12, %r14
jge 0x48c69
movq 0x8(%rbx), %rdi
leaq (%rdi,%r15), %rsi
addq $0x18, %r15
callq 0x40dd7
testl %eax, %eax
jne 0x48c48
xorl %eax, %eax
cmpq %r12, %r14
setge %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::IsLinear() const
const RNBoolean R3Polyline::
IsLinear(void) const
{
  // Return whether spline lies on one line
  if (nvertices == 0) return FALSE;
  if (nvertices <= 2) return TRUE;

  // Check if vertices all line on same line
  R3Line line;
  int line_npositions = 0;
  R3Point line_positions[2];
  for (int i = 0; i < nvertices; i++) {
    if (line_npositions == 0) {
      line_positions[line_npositions++] = vertex_positions[i];
    }
    else if ((line_npositions == 1) && !R3Contains(line_positions[0], vertex_positions[i])) {
      line_positions[line_npositions++] = vertex_positions[i];
      line.Reset(line_positions[0], line_positions[1] - line_positions[0]);
    }
    else if (!R3Contains(line, vertex_positions[i])) {
      return FALSE;
    }
  }

  // All vertices are on same line
  return TRUE;
}

// Assembly:
movl 0x20(%rdi), %eax
testl %eax, %eax
je 0x48c8e
cmpl $0x3, %eax
jge 0x48c91
pushq $0x1
popq %rax
retq
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %rdi
callq 0x37826
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
callq 0x37b4a
addq $0x18, %r14
cmpq $0x30, %r14
jne 0x48caf
xorl %ebp, %ebp
movq %rsp, %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
movslq 0x20(%rbx), %r13
cmpq %r13, %r14
jge 0x48d6b
cmpl $0x1, %r12d
je 0x48cf8
testl %r12d, %r12d
jne 0x48d0b
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
movq %r15, %rdi
callq 0x37e36
pushq $0x1
jmp 0x48d5d
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
movq %r15, %rdi
callq 0x40dd7
testl %eax, %eax
je 0x48d22
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
leaq 0x30(%rsp), %rdi
callq 0x41022
testl %eax, %eax
jne 0x48d5f
jmp 0x48d6b
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
leaq 0x18(%rsp), %r12
movq %r12, %rdi
callq 0x37e36
leaq 0x60(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x37d29
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x376e6
pushq $0x2
popq %r12
incq %r14
addq $0x18, %rbp
jmp 0x48ccd
xorl %eax, %eax
cmpq %r13, %r14
setge %al
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq