LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::IsPlanar() const
const RNBoolean R3Polyline::
IsPlanar(void) const
{
  // Return whether spline lies on one line
  if (nvertices == 0) return FALSE;
  if (nvertices <= 3) return TRUE;

  // Check if vertices all line on same plane
  R3Plane plane;
  int plane_npositions = 0;
  R3Point plane_positions[3];
  for (int i = 0; i < nvertices; i++) {
    if (plane_npositions == 0) {
      plane_positions[plane_npositions++] = vertex_positions[i];
    }
    else if ((plane_npositions == 1) &&
             !R3Contains(plane_positions[0], vertex_positions[i])) {
      plane_positions[plane_npositions++] = vertex_positions[i];
    }
    else if ((plane_npositions == 2) &&
             !R3Contains(plane_positions[0], vertex_positions[i]) &&
             !R3Contains(plane_positions[1], vertex_positions[i])) {
      plane_positions[plane_npositions++] = vertex_positions[i];
      R3Vector v1 = plane_positions[1] - plane_positions[0];
      R3Vector v2 = plane_positions[2] - plane_positions[0];
      R3Vector normal = v1 % v2; normal.Normalize();
      plane.Reset(plane_positions[0], normal);
    }
    else if (!R3Contains(plane, vertex_positions[i])) {
      return FALSE;
    }
  }

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

// Assembly:
movl 0x20(%rdi), %eax
testl %eax, %eax
je 0x48d92
cmpl $0x4, %eax
jge 0x48d95
pushq $0x1
popq %rax
retq
xorl %eax, %eax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x3671a
xorl %r14d, %r14d
leaq (%rsp,%r14), %rdi
addq $0x20, %rdi
callq 0x37b4a
addq $0x18, %r14
cmpq $0x48, %r14
jne 0x48db4
xorl %ebp, %ebp
leaq 0x20(%rsp), %r12
xorl %r15d, %r15d
xorl %r14d, %r14d
movslq 0x20(%rbx), %r13
cmpq %r13, %r15
jge 0x48eee
cmpl $0x2, %r14d
je 0x48e37
cmpl $0x1, %r14d
je 0x48e0c
testl %r14d, %r14d
jne 0x48e5f
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x37e36
pushq $0x1
jmp 0x48ee0
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x40dd7
testl %eax, %eax
jne 0x48e5f
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
leaq 0x38(%rsp), %rdi
callq 0x37e36
pushq $0x2
jmp 0x48ee0
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
movq %r12, %rdi
callq 0x40dd7
testl %eax, %eax
jne 0x48e5f
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
leaq 0x38(%rsp), %rdi
callq 0x40dd7
testl %eax, %eax
je 0x48e74
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
movq %rsp, %rdi
callq 0x415ce
testl %eax, %eax
jne 0x48ee2
jmp 0x48eee
movq 0x8(%rbx), %rsi
addq %rbp, %rsi
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x37e36
leaq 0x70(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %r12, %rdx
callq 0x37d29
leaq 0xa0(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x37d29
leaq 0x88(%rsp), %r14
movq %r14, %rdi
leaq 0x70(%rsp), %rsi
movq %r13, %rdx
callq 0x389be
movq %r14, %rdi
callq 0x3860e
movq %rsp, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x36eda
pushq $0x3
popq %r14
incq %r15
addq $0x18, %rbp
jmp 0x48dd8
xorl %eax, %eax
cmpq %r13, %r15
setge %al
addq $0xb8, %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/R3Polyline.cpp
// Function: gaps::R3Polyline::Length() const
const RNLength R3Polyline::
Length(void) const
{
  // For now, return length of control polygon
  RNLength length = 0;
  for (int i = 1; i < nvertices; i++) {
    length += R3Distance(vertex_positions[i-1], vertex_positions[i]);
  }
  return length;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm0, %xmm0
pushq $0x1
popq %r14
pushq $0x18
popq %r15
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jge 0x48f62
movq 0x8(%rbx), %rsi
leaq (%rsi,%r15), %rdi
addq $-0x18, %rdi
addq %r15, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x4321a
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r14
addq $0x18, %r15
jmp 0x48f20
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::Centroid() const
const R3Point R3Polyline::
Centroid(void) const
{
  // Compute centroid of vertices weighted by parameters
  RNScalar weight = 0;
  R3Point sum = R3zero_point;
  for (int i = 0; i < nvertices; i++) {
    if (i > 0) weight += VertexParameter(i) - VertexParameter(i-1);
    if (i < nvertices-1) weight += VertexParameter(i+1) - VertexParameter(i);
    sum += weight * vertex_positions[i];
  }

  // Or, if no weight, recompute without weighting
  if (weight == 0) {
    sum = R3zero_point;
    for (int i = 0; i < nvertices; i++) {
      sum += vertex_positions[i];
      weight += 1;
    }
  }
  
  // Return weighted average
  if (weight == 0) return R3zero_point;
  return sum / weight;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x492ae9(%rip), %rsi    # 0x4dba70
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x37b5c
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
leaq 0x20(%rsp), %r12
xorl %ebp, %ebp
movslq 0x20(%r14), %rax
cmpq %rax, %rbp
jge 0x49043
testq %rbp, %rbp
movsd (%rsp), %xmm0
je 0x48fe7
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0x48fd4
movsd -0x8(%rcx,%rbp,8), %xmm1
movsd (%rcx,%rbp,8), %xmm2
jmp 0x48fdf
cvtsi2sd %ebp, %xmm2
leal -0x1(%rbp), %ecx
cvtsi2sd %ecx, %xmm1
subsd %xmm1, %xmm2
addsd %xmm2, %xmm0
decq %rax
cmpq %rax, %rbp
jge 0x49018
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x49005
movsd (%rax,%rbp,8), %xmm1
movsd 0x8(%rax,%rbp,8), %xmm2
jmp 0x49010
leal 0x1(%rbp), %eax
cvtsi2sd %eax, %xmm2
cvtsi2sd %ebp, %xmm1
subsd %xmm1, %xmm2
addsd %xmm2, %xmm0
movq 0x8(%r14), %rsi
addq %r13, %rsi
movq %r12, %rdi
movsd %xmm0, (%rsp)
callq 0x382c0
movq %r15, %rdi
movq %r12, %rsi
callq 0x381b6
addq $0x18, %r13
incq %rbp
jmp 0x48fa7
xorpd %xmm1, %xmm1
movsd (%rsp), %xmm0
ucomisd %xmm1, %xmm0
jne 0x490aa
jp 0x490aa
leaq 0x492a15(%rip), %rsi    # 0x4dba70
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x37e36
xorl %r12d, %r12d
xorl %r13d, %r13d
movslq 0x20(%r14), %rax
cmpq %rax, %r13
jge 0x490a1
movq 0x8(%r14), %rsi
addq %r12, %rsi
movq %r15, %rdi
callq 0x381b6
movsd (%rsp), %xmm0
addsd 0x49f75(%rip), %xmm0    # 0x93008
movsd %xmm0, (%rsp)
incq %r13
addq $0x18, %r12
jmp 0x4906e
movsd (%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x490c3
jp 0x490c3
leaq 0x4929b7(%rip), %rsi    # 0x4dba70
movq %rbx, %rdi
callq 0x37b5c
jmp 0x490d0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x382e2
movq %rbx, %rax
addq $0x38, %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/R3Polyline.cpp
// Function: gaps::R3Polyline::BBox() const
const R3Box R3Polyline::
BBox(void) const
{
  // Return bounding box
  if (bbox[0][0] == FLT_MAX) 
    ((R3Polyline *) this)->UpdateBBox();
  return bbox;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x30(%rsi), %xmm0
ucomisd 0x49f19(%rip), %xmm0    # 0x93018
jne 0x4910f
jp 0x4910f
movq (%r14), %rax
movq %r14, %rdi
callq *0x288(%rax)
addq $0x28, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x24b3e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::VertexIndex(double) const
int R3Polyline::
VertexIndex(RNScalar u) const
{
  // Return index at start of segment containing u
  if (u < 0) return 0;
  else if (nvertices < 3) return 0;
  else if (u >= VertexParameter(nvertices-2)) return nvertices-2;
  else if (!vertex_parameters) return (int) u;
  else return BinarySearchForVertexIndex(this, 0, nvertices-2, u);
}

// Assembly:
xorl %ecx, %ecx
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x491b0
movl 0x20(%rdi), %esi
cmpl $0x3, %esi
jl 0x491b0
addl $-0x2, %esi
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x4919c
movl %esi, %eax
ucomisd (%rdi,%rax,8), %xmm0
jae 0x49198
xorl %eax, %eax
pushq $0x2
popq %r8
movl %eax, %ecx
movslq %eax, %r9
cmpl %esi, %ecx
je 0x491b0
movsd 0x8(%rdi,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
ja 0x491b0
movslq %esi, %rax
ucomisd (%rdi,%rax,8), %xmm0
ja 0x49198
leal (%rsi,%rcx), %eax
cltd
idivl %r8d
movslq %eax, %rdx
movsd (%rdi,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x49190
jnp 0x491ae
jbe 0x49159
decl %eax
movl %eax, %esi
jmp 0x4915e
movl %esi, %ecx
jmp 0x491b0
cvtsi2sd %esi, %xmm1
ucomisd %xmm1, %xmm0
movl %esi, %ecx
jae 0x491b0
cvttsd2si %xmm0, %ecx
jmp 0x491b0
movl %eax, %ecx
movl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::PointPosition(double) const
R3Point R3Polyline::
PointPosition(RNScalar u) const
{
  // Return position at parametric value u

  // Get index variables
  int i = VertexIndex(u);
  double denom = VertexParameter(i+1) - VertexParameter(i);
  if (RNIsZero(denom)) return VertexPosition(i);
  double t = (u - VertexParameter(i)) / denom;

  // Get control vertex_positions
  R3Point P1 = VertexPosition(i);
  R3Point P2 = VertexPosition(i+1);

  // Return interpolated position
  return (1-t)*P1 + t*P2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
movsd %xmm0, 0x8(%rsp)
callq *0x268(%rax)
leal 0x1(%rax), %ebp
movq 0x10(%r14), %rcx
movslq %eax, %rdx
testq %rcx, %rcx
je 0x491f6
movslq %ebp, %rsi
movsd (%rcx,%rsi,8), %xmm0
movsd (%rcx,%rdx,8), %xmm1
jmp 0x491fe
cvtsi2sd %ebp, %xmm0
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
leaq 0x9199f(%rip), %rsi     # 0xdaba8
movsd (%rsi), %xmm1
movapd 0x49e1b(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x49237
ucomisd %xmm0, %xmm1
jb 0x49237
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x4844c
jmp 0x492c1
testq %rcx, %rcx
je 0x49243
movsd (%rcx,%rdx,8), %xmm1
jmp 0x49247
cvtsi2sd %eax, %xmm1
movsd 0x8(%rsp), %xmm2
subsd %xmm1, %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rsp)
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x4844c
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x4844c
movsd 0x49d81(%rip), %xmm0    # 0x93008
subsd 0x8(%rsp), %xmm0
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x382c0
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x382c0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3827a
movq %rbx, %rax
addq $0x70, %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/R3Polyline.cpp
// Function: gaps::R3Polyline::PointDerivative(double) const
R3Vector R3Polyline::
PointDerivative(RNScalar u) const
{
  // Return tangent vector at parametric value u

  // Get index variables
  int i = VertexIndex(u);
  R3Point p1 = VertexPosition(i);
  R3Point p2 = VertexPosition(i+1);
  RNScalar u1 = VertexParameter(i);
  RNScalar u2 = VertexParameter(i+1);
  if (u2 <= u1) return R3zero_vector;
  else return (p2 - p1) / (u2 - u1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x268(%rax)
movl %eax, %r14d
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x4844c
leal 0x1(%r14), %ebp
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x4844c
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x4932e
movslq %r14d, %rcx
movsd (%rax,%rcx,8), %xmm1
movslq %ebp, %rcx
movsd (%rax,%rcx,8), %xmm0
jmp 0x49337
cvtsi2sd %r14d, %xmm1
cvtsi2sd %ebp, %xmm0
ucomisd %xmm0, %xmm1
jae 0x49377
leaq 0x40(%rsp), %r14
leaq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x37d29
movsd (%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38d1e
jmp 0x49386
leaq 0x50312(%rip), %rsi     # 0x99690
movq %rbx, %rdi
callq 0x3831c
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::operator=(gaps::R3Polyline const&)
R3Polyline& R3Polyline::
operator=(const R3Polyline& polyline)
{
  // Delete previous everything
  if (vertex_positions) delete [] vertex_positions;
  if (vertex_parameters) delete [] vertex_parameters;
  if (vertex_datas) delete [] vertex_datas;
  this->vertex_positions = NULL;
  this->vertex_parameters = NULL;
  this->vertex_datas = NULL;
  
  // Copy properties
  this->nvertices = polyline.nvertices;
  this->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];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x493b5
callq 0xe5d0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x493c3
callq 0xe5d0
leaq 0x8(%rbx), %r15
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x493d5
callq 0xe5d0
xorps %xmm0, %xmm0
andq $0x0, 0x10(%r15)
movups %xmm0, (%r15)
movl 0x20(%r14), %eax
movl %eax, 0x20(%rbx)
movq (%r14), %rax
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq *0x88(%rax)
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x2141e
leaq 0x8(%rsp), %rdi
callq 0x25832
movslq 0x20(%rbx), %rax
testq %rax, %rax
jle 0x494a8
imulq $0x18, %rax, %r15
movq %r15, %rdi
callq 0xe030
movq %rax, %r12
xorl %r13d, %r13d
leaq (%r12,%r13), %rdi
callq 0x37b4a
addq $0x18, %r13
cmpq %r13, %r15
jne 0x49431
movq %r12, 0x8(%rbx)
movslq 0x20(%rbx), %r13
leaq (,%r13,8), %rax
testq %r13, %r13
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0xe030
movq %rax, 0x10(%rbx)
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq %r13d, %rax
cmpq %rax, %r12
jge 0x494a8
movq 0x8(%r14), %rsi
addq %r15, %rsi
movq 0x8(%rbx), %rdi
addq %r15, %rdi
callq 0x37e36
movq 0x10(%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq 0x10(%rbx), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
movl 0x20(%rbx), %r13d
addq $0x18, %r15
jmp 0x4946c
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25832
jmp 0x494d6
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0xe8f0
movq %rbx, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::Transform(gaps::R3Transformation const&)
void R3Polyline::
Transform(const R3Transformation& transformation)
{
  // Transform vertices
  for (int i = 0; i < nvertices; i++) {
    vertex_positions[i].Transform(transformation);
  }

  // Mark bbox as out of date
  bbox[0][0] = bbox[0][1] = bbox[0][2] = FLT_MAX;
  bbox[1][0] = bbox[1][1] = bbox[1][2] = -FLT_MAX;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
movslq 0x20(%rbx), %rax
cmpq %rax, %r12
jge 0x49513
movq 0x8(%rbx), %rdi
addq %r15, %rdi
movq %r14, %rsi
callq 0x38192
incq %r12
addq $0x18, %r15
jmp 0x494f2
movaps 0x50b06(%rip), %xmm0    # 0x9a020
movups %xmm0, 0x30(%rbx)
movaps 0x50b0b(%rip), %xmm0    # 0x9a030
movups %xmm0, 0x50(%rbx)
movaps 0x50b10(%rip), %xmm0    # 0x9a040
movups %xmm0, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::SetVertexPosition(int, gaps::R3Point const&)
void R3Polyline::
SetVertexPosition(int k, const R3Point& position)
{
  // Set vertex position
  vertex_positions[k] = position;

  // Mark bbox as out of date
  bbox[0][0] = bbox[0][1] = bbox[0][2] = FLT_MAX;
  bbox[1][0] = bbox[1][1] = bbox[1][2] = -FLT_MAX;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movslq %esi, %rax
imulq $0x18, %rax, %rdi
addq 0x8(%rbx), %rdi
movq %rdx, %rsi
callq 0x37e36
movaps 0x50ac2(%rip), %xmm0    # 0x9a020
movups %xmm0, 0x30(%rbx)
movaps 0x50ac7(%rip), %xmm0    # 0x9a030
movups %xmm0, 0x50(%rbx)
movaps 0x50acc(%rip), %xmm0    # 0x9a040
movups %xmm0, 0x40(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::SetVertexParameter(int, double)
void R3Polyline::
SetVertexParameter(int k, RNScalar u)
{
  // Check number of points
  if (nvertices == 0) return;
  
  // Allocate vertex parameters
  if (!vertex_parameters) {
    vertex_parameters = new RNScalar [ nvertices ];
    for (int i = 0; i < k; i++) vertex_parameters[i] = (u*i)/k;
    vertex_parameters[k] = u;
    for (int i = k+1; i < nvertices; i++) vertex_parameters[i] = (i-k)+u;
  }
  else {
    // Set vertex parameter
    vertex_parameters[k] = u;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movslq 0x20(%rdi), %r15
testq %r15, %r15
je 0x495a2
movl %esi, %ebx
movq %rdi, %r14
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x495ac
movslq %ebx, %rcx
movsd %xmm0, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq (,%r15,8), %rax
testl %r15d, %r15d
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0xe030
movsd 0x8(%rsp), %xmm2
movq %rax, 0x10(%r14)
cvtsi2sd %ebx, %xmm0
xorl %ecx, %ecx
testl %ebx, %ebx
movl $0x0, %edx
cmovgl %ebx, %edx
cmpq %rcx, %rdx
je 0x495fe
cvtsi2sd %ecx, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rcx,8)
incq %rcx
jmp 0x495e3
movslq %ebx, %rcx
incq %rcx
pushq $0x1
popq %rdx
movapd %xmm2, %xmm0
movsd %xmm0, -0x8(%rax,%rcx,8)
cmpq %r15, %rcx
jge 0x495a2
cvtsi2sd %edx, %xmm0
addsd %xmm2, %xmm0
incl %edx
incq %rcx
jmp 0x4960b
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::SetVertexData(int, void*)
void R3Polyline::
SetVertexData(int k, void *data)
{
  // Allocate vertex datas
  if (!vertex_datas) {
    vertex_datas = new void * [ NVertices() ];
    if (!vertex_datas) {
      RNFail("Unable to allocate vertex datas\n");
      return;
    }
  }

  // Set vertex data
  vertex_datas[k] = data;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq 0x18(%rdi), %rax
testq %rax, %rax
jne 0x4965a
movq %rdi, %r14
movslq 0x20(%rdi), %rax
leaq (,%rax,8), %rcx
testq %rax, %rax
pushq $-0x1
popq %rdi
cmovnsq %rcx, %rdi
callq 0xe030
movq %rax, 0x18(%r14)
movslq %ebp, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::UpdateBBox()
void R3Polyline::
UpdateBBox(void) 
{
  // Initialize bounding box
  bbox = R3null_box;

  // Union vertex_positions
  for (int i = 0; i < nvertices; i++) {
    bbox.Union(VertexPosition(i));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x28(%rdi), %r14
leaq 0x9182a(%rip), %rsi     # 0xdaea8
movq %r14, %rdi
callq 0x2141e
xorl %ebp, %ebp
movq %rsp, %r15
cmpl 0x20(%rbx), %ebp
jge 0x496ac
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x4844c
movq %r14, %rdi
movq %r15, %rsi
callq 0x254a4
incl %ebp
jmp 0x4968b
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Polyline.cpp
// Function: gaps::R3Polyline::Outline(gaps::RNFlags) const
void R3Polyline::
Outline(const R3DrawFlags flags) const
{
  // Draw polyline
  R3BeginLine();
  for (int i = 0; i < nvertices; i++) 
    R3LoadPoint(VertexPosition(i));
  R3EndLine();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x21c38
xorl %ebp, %ebp
leaq 0x8(%rsp), %r14
cmpl 0x20(%rbx), %ebp
jge 0x496ff
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x4844c
movq %r14, %rdi
callq 0xe130
incl %ebp
jmp 0x496e1
callq 0xe5f0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Rectangle.cpp
// Function: gaps::R3Rectangle::operator==(gaps::R3Rectangle const&) const
RNBoolean R3Rectangle::
operator==(const R3Rectangle& rectangle) const
{
    // Return whether rectangle is equal
    return ((Center() == Center()) &&
            (Axis(0) == rectangle.Axis(0)) && 
	    (Axis(1) == rectangle.Axis(1)) && 
	    (Radius(0) == rectangle.Radius(0)) && 
	    (Radius(1) == rectangle.Radius(1)));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x8, %rdi
movq %rdi, %rsi
callq 0x37c12
xorl %ebx, %ebx
testl %eax, %eax
je 0x49d56
leaq 0x20(%r14), %rdi
leaq 0x20(%r15), %rsi
callq 0x385ac
testl %eax, %eax
je 0x49d56
leaq 0x38(%r14), %rdi
leaq 0x38(%r15), %rsi
callq 0x385ac
testl %eax, %eax
je 0x49d56
movsd 0x68(%r14), %xmm0
ucomisd 0x68(%r15), %xmm0
jne 0x49d56
jp 0x49d56
movsd 0x70(%r15), %xmm0
cmpeqsd 0x70(%r14), %xmm0
movq %xmm0, %rbx
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/R3Rectangle.cpp
// Function: gaps::R3Rectangle::BBox() const
const R3Box R3Rectangle::
BBox(void) const
{
    // Check if rectangle is empty
    if (IsEmpty()) return R3null_box;

    // Return bounding box 
    R3Box bbox = R3null_box;
    for (int i = 0; i < RN_NUM_QUADRANTS; i++) 
      bbox.Union(Corner(i));
    return bbox;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x68(%rsi), %xmm0
minsd 0x70(%rsi), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x91087(%rip), %rsi     # 0xdaea8
callq 0x24b3e
xorpd %xmm0, %xmm0
ucomisd 0x8(%rsp), %xmm0
ja 0x49e5a
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
cmpl $0x4, %ebp
je 0x49e5a
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x3cc96
movq %rbx, %rdi
movq %r15, %rsi
callq 0x254a4
incl %ebp
jmp 0x49e39
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Circle.cpp
// Function: gaps::R3InitCircle()
int 
R3InitCircle()
{
    // Initialize circle angles and points 
    for (int i = 0; i < R3circle_npoints; i++) {
        R3circle_angles[i] = ((RNScalar) i * RN_TWO_PI) / (RNScalar) R3circle_npoints;
        R3circle_points[i] = R3Point(cos(R3circle_angles[i]), sin(R3circle_angles[i]), 0.0);
        R3circle_texcoords[i] = R2Point(0.5 * (R3circle_points[i].X() + 1.0), 0.5 * (R3circle_points[i].Y() + 1.0));
    }

    /* Return success */
    return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
leaq 0x508c0(%rip), %rax     # 0x9af68
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x491cc7(%rip), %rbx    # 0x4dc380
leaq 0x4919c0(%rip), %r14    # 0x4dc080
leaq 0x4918b9(%rip), %r12    # 0x4dbf80
xorl %r13d, %r13d
leaq 0x18(%rsp), %r15
cmpq $0x20, %r13
je 0x4a779
cvtsi2sd %r13d, %xmm0
mulsd 0x8(%rsp), %xmm0
mulsd 0x4f9cc(%rip), %xmm0    # 0x9a0b8
movsd %xmm0, (%r12)
callq 0xe890
movsd %xmm0, 0x10(%rsp)
movsd (%r12), %xmm0
callq 0xe0f0
movaps %xmm0, %xmm1
xorps %xmm2, %xmm2
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x37b4c
movq %r14, %rdi
movq %r15, %rsi
callq 0x37e36
movsd (%r14), %xmm0
movsd 0x488d4(%rip), %xmm2    # 0x93008
addsd %xmm2, %xmm0
movsd 0x488d0(%rip), %xmm3    # 0x93010
mulsd %xmm3, %xmm0
movsd 0x8(%r14), %xmm1
addsd %xmm2, %xmm1
mulsd %xmm3, %xmm1
movq %r15, %rdi
callq 0x5f58c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5f6c4
incq %r13
addq $0x10, %rbx
addq $0x18, %r14
addq $0x8, %r12
jmp 0x4a6cf
pushq $0x1
popq %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/R3Circle.cpp
// Function: gaps::R3Circle::Transform(gaps::R3Transformation const&)
void R3Circle::
Transform (const R3Transformation& transformation)
{
    // Transform circle ???
    center.Transform(transformation);
    plane.Transform(transformation);
    if (!transformation.IsIsotropic()) RNWarning("Circle transformed by anisotropic transformation");
    radius *= transformation.ScaleFactor();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x38192
leaq 0x28(%rbx), %rdi
movq %r14, %rsi
callq 0x36dde
movq (%r14), %rax
movq %r14, %rdi
callq *0x30(%rax)
testl %eax, %eax
jne 0x4aaa0
leaq 0x4f645(%rip), %rdi     # 0x9a0de
xorl %eax, %eax
callq 0x68283
movq (%r14), %rax
movq %r14, %rdi
callq *0xc0(%rax)
mulsd 0x20(%rbx), %xmm0
movsd %xmm0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::R3TriangleArray(gaps::R3TriangleArray const&)
R3TriangleArray::
R3TriangleArray(const R3TriangleArray& array)
  : vertices(),
    triangles(),
    bbox(array.bbox),
    flags(array.flags),
    vbo_id(0),
    vbo_size(0)
{
    // Copy vertices
    for (int i = 0; i < array.vertices.NEntries(); i++) {
      R3TriangleVertex *oldv = array.vertices.Kth(i);
      R3TriangleVertex *newv = new R3TriangleVertex(*oldv);
      vertices.Insert(newv);
      newv->SetSharedFlag();
      oldv->SetMark(i);
    }

    // Copy triangles
    for (int i = 0; i < array.triangles.NEntries(); i++) {
      R3Triangle *oldt = array.triangles.Kth(i);
      R3TriangleVertex *v0 = vertices.Kth(oldt->V0()->Mark());
      R3TriangleVertex *v1 = vertices.Kth(oldt->V1()->Mark());
      R3TriangleVertex *v2 = vertices.Kth(oldt->V2()->Mark());
      R3Triangle *newt = new R3Triangle(v0, v1, v2);
      triangles.Insert(newt);
    }

    // Update everything
    Update();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x4d3fa
leaq 0x8d624(%rip), %rax     # 0xd8218
movq %rax, (%rbx)
leaq 0x8(%rbx), %r15
movq %r15, %rdi
callq 0x6630a
leaq 0x18(%rbx), %rdi
movq %rdi, 0x20(%rsp)
callq 0x6630a
leaq 0x28(%rbx), %rdi
leaq 0x28(%rbp), %rsi
movq %rdi, 0x8(%rsp)
callq 0x24b3e
movq 0x60(%rbp), %rax
movq %rax, 0x60(%rbx)
movq %rbx, 0x18(%rsp)
andq $0x0, 0x68(%rbx)
xorl %r14d, %r14d
pushq $0x68
popq %r13
movslq 0x14(%rbp), %rax
cmpq %rax, %r14
jge 0x4ac7c
movq 0x8(%rbp), %rax
movq (%rax,%r14,8), %r12
movq %r13, %rdi
callq 0xe450
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x4c472
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22bfc
orb $0x1, 0x5a(%rbx)
movl %r14d, 0x60(%r12)
incq %r14
jmp 0x4ac3c
xorl %ecx, %ecx
movq %r15, 0x10(%rsp)
movslq 0x24(%rbp), %rax
cmpq %rax, %rcx
jge 0x4acfc
movq %rbp, %r13
movq 0x18(%rbp), %rax
movq %rcx, %r14
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
movslq 0x60(%rcx), %rcx
movq (%r15), %rsi
movq (%rsi,%rcx,8), %r12
movslq 0x60(%rdx), %rcx
movq (%rsi,%rcx,8), %rbp
movq 0x18(%rax), %rax
movslq 0x60(%rax), %rax
movq (%rsi,%rax,8), %r15
movl $0x88, %edi
callq 0xe450
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x4c910
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x22bfc
movq %r14, %rcx
incq %rcx
movq 0x10(%rsp), %r15
movq %r13, %rbp
jmp 0x4ac83
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x248(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ad56
movq %rax, %r12
jmp 0x4ad68
movq %rax, %r12
jmp 0x4ad72
movq %rax, %r12
jmp 0x4ad7a
movq %rax, %r12
movl $0x88, %esi
movq %rbx, %rdi
callq 0xe460
jmp 0x4ad4f
movq %rax, %r12
pushq $0x68
popq %rsi
movq %rbx, %rdi
callq 0xe460
jmp 0x4ad59
movq %rax, %r12
movq 0x10(%rsp), %r15
jmp 0x4ad59
movq %rax, %r12
movq 0x8(%rsp), %rdi
callq 0x25832
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %rdi
callq 0x66378
movq %r15, %rdi
callq 0x66378
movq %rbx, %rdi
callq 0x4d406
movq %r12, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::~R3TriangleArray()
R3TriangleArray::
~R3TriangleArray(void)
{
    // Delete triangles and vertices
    for (int i = 0; i < triangles.NEntries(); i++) delete triangles[i];
    for (int i = 0; i < vertices.NEntries(); i++) delete vertices[i];

    // Delete vbo
    if (vbo_id > 0) glDeleteBuffers(1, &vbo_id);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8d3cb(%rip), %rax     # 0xd8218
movq %rax, (%rdi)
leaq 0x18(%rdi), %r14
xorl %r15d, %r15d
movslq 0x24(%rbx), %rax
cmpq %rax, %r15
jge 0x4ae77
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x4ae72
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
jmp 0x4ae57
leaq 0x8(%rbx), %r15
xorl %r13d, %r13d
pushq $0x68
popq %r12
movslq 0x14(%rbx), %rax
cmpq %rax, %r13
jge 0x4ae9f
movq (%r15), %rax
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
callq 0xe460
incq %r13
jmp 0x4ae82
cmpl $0x0, 0x68(%rbx)
je 0x4aeb5
leaq 0x68(%rbx), %rsi
movq 0x8f128(%rip), %rax     # 0xd9fd8
pushq $0x1
popq %rdi
callq *(%rax)
leaq 0x28(%rbx), %rdi
callq 0x25832
movq %r14, %rdi
callq 0x66378
movq %r15, %rdi
callq 0x66378
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4d406
movq %rax, %rdi
callq 0x21253
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::IsPoint() const
const RNBoolean R3TriangleArray::
IsPoint (void) const
{
  // Check if all vertices are at same position
  if (vertices.NEntries() > 1) {
    const R3Point& p0 = vertices[0]->Position();
    for (int i = 1; i < vertices.NEntries(); i++) 
      if (!R3Contains(p0, vertices[i]->Position())) return FALSE;
  }
  return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
cmpl $0x2, 0x14(%rdi)
jl 0x4af3f
movq %rdi, %r14
movq 0x8(%rdi), %rax
movq (%rax), %r15
pushq $0x1
popq %r12
movslq 0x14(%r14), %rax
cmpq %rax, %r12
jge 0x4af3f
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x40dd7
incq %r12
testl %eax, %eax
jne 0x4af1d
xorl %ebx, %ebx
movl %ebx, %eax
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/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::IsPlanar() const
const RNBoolean R3TriangleArray::
IsPlanar(void) const
{
  // Check if all triangles are on same plane
  if (triangles.NEntries() > 1) {
    const R3Plane& p0 = triangles[0]->Plane();
    for (int i = 1; i < triangles.NEntries(); i++) 
      if (!R3Contains(p0, triangles[i]->Plane())) return FALSE;
  }
  return TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $0x1
popq %rbx
cmpl $0x2, 0x24(%rdi)
jl 0x4af9b
movq %rdi, %r14
movq 0x18(%rdi), %rax
movq (%rax), %r15
addq $0x20, %r15
pushq $0x1
popq %r12
movslq 0x24(%r14), %rax
cmpq %rax, %r12
jge 0x4af9b
movq 0x18(%r14), %rax
movq (%rax,%r12,8), %rsi
addq $0x20, %rsi
movq %r15, %rdi
callq 0x416b4
incq %r12
testl %eax, %eax
jne 0x4af75
xorl %ebx, %ebx
movl %ebx, %eax
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/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Length() const
const RNLength R3TriangleArray::
Length (void) const
{
    // Return cumulative perimeter of triangles
    RNLength length = 0.0;
    for (int i = 0; i < triangles.NEntries(); i++)
      length += triangles[i]->Length();
    return length;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jge 0x4b00a
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
movsd %xmm0, (%rsp)
callq *0x50(%rax)
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r14
jmp 0x4afd6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Area() const
const RNArea R3TriangleArray::
Area(void) const
{
    // Return cumulative area of triangles
    RNArea area = 0.0;
    for (int i = 0; i < triangles.NEntries(); i++)
      area += triangles[i]->Area();
    return area;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jge 0x4b054
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
movsd %xmm0, (%rsp)
callq *0x58(%rax)
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r14
jmp 0x4b020
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Centroid() const
const R3Point R3TriangleArray::
Centroid(void) const
{
    // Return centroid of vertices
    R3Point centroid = R3zero_point;
    for (int i = 0; i < vertices.NEntries(); i++) 
      centroid += vertices[i]->Position();
    centroid /= (RNScalar) vertices.NEntries();
    return centroid;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x490a02(%rip), %rsi    # 0x4dba70
callq 0x37b5c
xorl %r15d, %r15d
movslq 0x14(%r14), %rax
cmpq %rax, %r15
jge 0x4b094
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x381b6
incq %r15
jmp 0x4b076
cvtsi2sd %eax, %xmm0
movq %rbx, %rdi
callq 0x38234
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::ClosestPoint(gaps::R3Point const&) const
const R3Point R3TriangleArray::
ClosestPoint(const R3Point& point) const
{
    // Find closest point
    R3Point closest_point = R3zero_point;
    RNLength closest_dd = RN_INFINITY * RN_INFINITY;
    for (int i = 0; i < triangles.NEntries(); i++) {
      R3Triangle *triangle = triangles.Kth(i);
      R3Point p = triangle->ClosestPoint(point);
      RNLength dd = R3SquaredDistance(p, point);
      if (dd < closest_dd) {
        closest_point = p;
        closest_dd = dd;
      }
    }
        
    // Return closest point
    return closest_point;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x4909a9(%rip), %rsi    # 0x4dba70
callq 0x37b5c
leaq 0x8fae5(%rip), %rax     # 0xdabb8
movsd (%rax), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movslq 0x24(%r15), %rax
cmpq %rax, %r13
jge 0x4b134
movq 0x18(%r15), %rax
movq (%rax,%r13,8), %rsi
movq (%rsi), %rax
movq %r12, %rdi
movq %rbx, %rdx
callq *0x70(%rax)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x431f1
movapd %xmm0, %xmm1
movsd (%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x4b12f
movq %r14, %rdi
movq %r12, %rsi
movsd %xmm1, (%rsp)
callq 0x37e36
incq %r13
jmp 0x4b0e8
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::FurthestPoint(gaps::R3Point const&) const
const R3Point R3TriangleArray::
FurthestPoint(const R3Point& point) const
{
    // Find furthest point
    R3Point furthest_point = R3zero_point;
    RNLength furthest_dd = 0;
    for (int i = 0; i < vertices.NEntries(); i++) {
      R3TriangleVertex *vertex = vertices.Kth(i);
      R3Point p = vertex->Position();
      RNLength dd = R3SquaredDistance(p, point);
      if (dd > furthest_dd) {
        furthest_point = p;
        furthest_dd = dd;
      }
    }

    // Return furthest point
    return furthest_point;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x49090d(%rip), %rsi    # 0x4dba70
callq 0x37b5c
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movslq 0x14(%r15), %rax
cmpq %rax, %r13
jge 0x4b1b9
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r12, %rdi
callq 0x37b5c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x431f1
ucomisd (%rsp), %xmm0
jbe 0x4b1b4
movq %r14, %rdi
movq %r12, %rsi
movsd %xmm0, (%rsp)
callq 0x37e36
incq %r13
jmp 0x4b179
movq %r14, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Flip()
void R3TriangleArray::
Flip (void)
{
    // Flip the triangles
    for (int i = 0; i < triangles.NEntries(); i++)
      triangles[i]->Flip();

    // Update
    Update();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jge 0x4b3ab
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x220(%rax)
incq %r14
jmp 0x4b38c
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x248(%rax)
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Mirror(gaps::R3Plane const&)
void R3TriangleArray::
Mirror (const R3Plane& plane)
{
    // Mirror vertices
    for (int i = 0; i < vertices.NEntries(); i++) 
      vertices[i]->Mirror(plane);

    // Update the triangles
    for (int i = 0; i < triangles.NEntries(); i++)
      triangles[i]->Update();

    // Update the bounding box
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jge 0x4b3ea
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x4c72a
incq %r15
jmp 0x4b3cc
xorl %r14d, %r14d
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jge 0x4b40c
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
incq %r14
jmp 0x4b3ed
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x248(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Transform(gaps::R3Transformation const&)
void R3TriangleArray::
Transform (const R3Transformation& transformation) 
{
    // Transform vertices
    for (int i = 0; i < vertices.NEntries(); i++) 
      vertices[i]->Transform(transformation);

    // Update the triangles
    for (int i = 0; i < triangles.NEntries(); i++)
      triangles[i]->Update();

    // Check if need to flip triangles
    if (transformation.IsMirrored()) Flip();

    // Update the bounding box
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jge 0x4b44a
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x4c750
incq %r15
jmp 0x4b42c
xorl %r15d, %r15d
movslq 0x24(%rbx), %rax
cmpq %rax, %r15
jge 0x4b46c
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x250(%rax)
incq %r15
jmp 0x4b44d
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
testl %eax, %eax
je 0x4b485
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x218(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x248(%rax)
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::MoveVertex(gaps::R3TriangleVertex*, gaps::R3Point const&)
void R3TriangleArray::
MoveVertex(R3TriangleVertex *vertex, const R3Point& position)
{
    // Move vertex
    vertex->SetPosition(position);

    // Update triangles
    for (int i = 0; i < triangles.NEntries(); i++) {
      R3Triangle *triangle = triangles.Kth(i);
      for (int j = 0; j < 3; j++) {
        if (triangle->Vertex(i) == vertex) {
          triangle->Update();
          break;
        }
      }
    }

    // Update
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x37e36
xorl %r15d, %r15d
movslq 0x24(%rbx), %rax
cmpq %rax, %r15
jge 0x4bc77
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rdi
cmpq %r14, 0x8(%rdi,%r15,8)
jne 0x4bc72
movq (%rdi), %rax
callq *0x250(%rax)
incq %r15
jmp 0x4bc51
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x248(%rax)
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3TriangleArray.cpp
// Function: gaps::R3TriangleArray::Update()
void R3TriangleArray::
Update(void)
{
  // Mark vertices as shared
  for (int i = 0; i < vertices.NEntries(); i++) {
    R3TriangleVertex *v = vertices.Kth(i);
    v->SetSharedFlag();
  }
    
  // Recompute bounding box
  bbox = R3null_box;
  for (int i = 0; i < vertices.NEntries(); i++) {
    R3TriangleVertex *v = vertices.Kth(i);
    bbox.Union(v->Position());
  }

  // Recompute flags
  flags.Add(R3_EVERYTHING_DRAW_FLAGS);
  for (int i = 0; i < vertices.NEntries(); i++) {
    R3TriangleVertex *v = vertices.Kth(i);
    RNFlags vertex_flags = v->Flags();
    if (!(vertex_flags[R3_VERTEX_NORMALS_DRAW_FLAG]))
      flags.Remove(R3_VERTEX_NORMALS_DRAW_FLAG);
    if (!(vertex_flags[R3_VERTEX_COLORS_DRAW_FLAG]))
      flags.Remove(R3_VERTEX_COLORS_DRAW_FLAG);
    if (!(vertex_flags[R3_VERTEX_TEXTURE_COORDS_DRAW_FLAG]))
      flags.Remove(R3_VERTEX_TEXTURE_COORDS_DRAW_FLAG);
  }

  // Invalidate VBO
  InvalidateVBO();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x14(%rdi), %eax
movq 0x8(%rdi), %rcx
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
cmpq %rdx, %rax
je 0x4be9a
movq (%rcx,%rdx,8), %rsi
orq $0x10000, 0x58(%rsi)    # imm = 0x10000
incq %rdx
jmp 0x4be84
leaq 0x28(%rbx), %r14
leaq 0x8f003(%rip), %rsi     # 0xdaea8
movq %r14, %rdi
callq 0x2141e
xorl %r15d, %r15d
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jge 0x4bece
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x254a4
incq %r15
jmp 0x4beb0
movl $0x7777, %edx           # imm = 0x7777
orq 0x60(%rbx), %rdx
movq %rdx, 0x60(%rbx)
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq 0x8(%rbx), %rsi
cmpq %rcx, %rax
je 0x4bf3a
movq (%rsi,%rcx,8), %rdi
movl 0x58(%rdi), %edi
movq %rdx, %r8
andq $-0x101, %r8            # imm = 0xFEFF
btl $0x8, %edi
cmovbq %rdx, %r8
movq %r8, %r9
andq $-0x401, %r9            # imm = 0xFBFF
btl $0xa, %edi
cmovbq %r8, %r9
movq %r9, %rdx
andq $-0x201, %rdx           # imm = 0xFDFF
btl $0x9, %edi
cmovbq %r9, %rdx
notl %edi
testw $0x700, %di             # imm = 0x700
je 0x4bf35
movq %rdx, 0x60(%rbx)
incq %rcx
jmp 0x4bee6
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x250(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::R3Triangle(gaps::R3Triangle const&)
R3Triangle::
R3Triangle(const R3Triangle& triangle)
  : plane(triangle.plane),
    bbox(triangle.bbox),
    flags(triangle.flags),
    mark(0)
{
    // Copy vertices 
    if (!triangle.v[0] || triangle.v[0]->Flags()[R3_VERTEX_SHARED_FLAG]) v[0] = triangle.v[0];
    else v[0] = new R3TriangleVertex(*(triangle.v[0]));
    if (!triangle.v[1] || triangle.v[1]->Flags()[R3_VERTEX_SHARED_FLAG]) v[1] = triangle.v[1];
    else v[1] = new R3TriangleVertex(*(triangle.v[1]));
    if (!triangle.v[2] || triangle.v[2]->Flags()[R3_VERTEX_SHARED_FLAG]) v[2] = triangle.v[2];
    else v[2] = new R3TriangleVertex(*(triangle.v[2]));

    // Update the triangle
    Update();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x4d3fa
leaq 0x8bca3(%rip), %rax     # 0xd84a8
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
leaq 0x20(%r15), %rsi
callq 0x36720
leaq 0x40(%rbx), %r14
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x24b3e
movq 0x78(%r15), %rax
movq %rax, 0x78(%rbx)
andl $0x0, 0x80(%rbx)
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x4c85e
testb $0x1, 0x5a(%r12)
jne 0x4c85e
pushq $0x68
popq %rdi
callq 0xe450
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x4c472
movq %r13, %r12
movq %r12, 0x8(%rbx)
movq 0x10(%r15), %r12
testq %r12, %r12
je 0x4c88c
testb $0x1, 0x5a(%r12)
jne 0x4c88c
pushq $0x68
popq %rdi
callq 0xe450
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
callq 0x4c472
movq %r13, %r12
movq %r12, 0x10(%rbx)
movq 0x18(%r15), %r15
testq %r15, %r15
je 0x4c8b9
testb $0x1, 0x5a(%r15)
jne 0x4c8b9
pushq $0x68
popq %rdi
callq 0xe450
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x4c472
movq %r12, %r15
movq %r15, 0x18(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x250(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r15
pushq $0x68
popq %rsi
movq %r12, %rdi
jmp 0x4c8e9
jmp 0x4c8e0
movq %rax, %r15
pushq $0x68
popq %rsi
movq %r13, %rdi
callq 0xe460
jmp 0x4c8f3
movq %rax, %r15
movq %r14, %rdi
callq 0x25832
jmp 0x4c900
movq %rax, %r15
movq %rbx, %rdi
callq 0x4d406
movq %r15, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::~R3Triangle()
R3Triangle::
~R3Triangle(void)
{
  // Delete vertices
  if (v[0] && !v[0]->Flags()[R3_VERTEX_SHARED_FLAG]) delete v[0];
  if (v[1] && !v[1]->Flags()[R3_VERTEX_SHARED_FLAG]) delete v[1];
  if (v[2] && !v[2]->Flags()[R3_VERTEX_SHARED_FLAG]) delete v[2];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x8ba75(%rip), %rax     # 0xd84a8
movq %rax, (%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x4ca4d
testb $0x1, 0x5a(%rdi)
jne 0x4ca4d
pushq $0x68
popq %rsi
callq 0xe460
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x4ca64
testb $0x1, 0x5a(%rdi)
jne 0x4ca64
pushq $0x68
popq %rsi
callq 0xe460
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4ca7b
testb $0x1, 0x5a(%rdi)
jne 0x4ca7b
pushq $0x68
popq %rsi
callq 0xe460
leaq 0x40(%rbx), %rdi
callq 0x25832
movq %rbx, %rdi
popq %rbx
jmp 0x4d406
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::IsFinite() const
const RNBoolean R3Triangle::
IsFinite (void) const
{
    // Check each point
    if (!(v[0]->Position().IsFinite())) return FALSE;
    if (!(v[1]->Position().IsFinite())) return FALSE;
    if (!(v[2]->Position().IsFinite())) return FALSE;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x37b98
xorl %ebx, %ebx
testl %eax, %eax
je 0x4cb4f
movq 0x10(%r14), %rdi
callq 0x37b98
testl %eax, %eax
je 0x4cb4f
movq 0x18(%r14), %rdi
callq 0x37b98
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Triangle.cpp
// Function: gaps::R3Triangle::Length() const
const RNLength R3Triangle::
Length (void) const
{
    // Return perimeter of closed triangle
    RNLength length = 0.0;
    length += R3Distance(v[0]->Position(), v[1]->Position());
    length += R3Distance(v[1]->Position(), v[2]->Position());
    length += R3Distance(v[2]->Position(), v[0]->Position());
    return length;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rsi
callq 0x4321a
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x4321a
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdi
callq 0x4321a
addsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
nop