LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::Empty()
void R3Mesh::
Empty(void)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Delete all faces, edges, vertices
  while (NFaces() > 0) DeleteFace(Face(0));
  while (NEdges() > 0) DeleteEdge(Edge(0));
  while (NVertices() > 0) DeleteVertex(Vertex(0));

  // Delete the blocks of data
  if (vertex_block) { delete [] vertex_block; vertex_block = NULL; }
  if (edge_block) { delete [] edge_block; edge_block = NULL; }
  if (face_block) { delete [] face_block; face_block = NULL; }

  // Reset bounding box
  bbox = R3null_box;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x290(%rax)
cmpl $0x0, 0x34(%rbx)
jle 0x13ebb
movq (%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx), %rsi
movq %rbx, %rdi
callq *0x70(%rax)
jmp 0x13e93
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movq (%rcx), %rsi
movq %rbx, %rdi
callq *0x68(%rax)
cmpl $0x0, 0x24(%rbx)
jg 0x13eab
jmp 0x13ed3
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq (%rcx), %rsi
movq %rbx, %rdi
callq *0x60(%rax)
cmpl $0x0, 0x14(%rbx)
jg 0x13ec3
movq 0x38(%rbx), %r15
testq %r15, %r15
je 0x13f40
leaq -0x8(%r15), %rax
movq %rax, (%rsp)
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x13f24
leaq -0x90(%r15), %r13
imulq $0x98, %r12, %rbp
leaq 0xcd7f8(%rip), %r14     # 0xe1700
movq %r14, -0x98(%r15,%rbp)
movq %r13, %rdi
addq %rbp, %rdi
callq 0x6f876
addq $-0x98, %rbp
jne 0x13f08
imulq $0x98, %r12, %rsi
addq $0x8, %rsi
movq (%rsp), %rdi
callq 0xe8c0
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x13f63
imulq $0x58, -0x8(%rdi), %rsi
addq $-0x8, %rdi
addq $0x8, %rsi
callq 0xe8c0
movq $0x0, 0x40(%rbx)
movq 0x48(%rbx), %r15
testq %r15, %r15
je 0x13fc7
leaq -0x8(%r15), %rax
movq %rax, (%rsp)
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x13fab
leaq -0x70(%r15), %r13
imulq $0xc8, %r12, %rbp
leaq 0xcd7b1(%rip), %r14     # 0xe1740
movq %r14, -0xc8(%r15,%rbp)
movq %r13, %rdi
addq %rbp, %rdi
callq 0x280f4
addq $-0xc8, %rbp
jne 0x13f8f
imulq $0xc8, %r12, %rsi
addq $0x8, %rsi
movq (%rsp), %rdi
callq 0xe8c0
movq $0x0, 0x48(%rbx)
leaq 0x100(%rbx), %rdi
leaq 0xd1ec3(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3c89a
addq $0x118, %rbx            # imm = 0x118
addq $0x20, %r14
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3c89a
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::AddRandomNoise(double)
void R3Mesh::
AddRandomNoise(RNScalar factor)
{
  // Change every vertex position
  bbox = R3null_box;
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    RNLength max_distance = factor * VertexAverageEdgeLength(vertex);
    R3Vector random_vector(RNRandomScalar(), RNRandomScalar(), RNRandomScalar());
    vertex->position += max_distance * random_vector;
    vertex->flags.Remove(R3_MESH_VERTEX_NORMAL_UPTODATE);
    bbox.Union(vertex->position);
  }

  // Mark every edge out of date
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    edge->flags.Remove(R3_MESH_EDGE_LENGTH_UPTODATE);
  }

  // Mark every face out of date
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    face->flags.Remove(R3_MESH_FACE_PLANE_UPTODATE | R3_MESH_FACE_BBOX_UPTODATE);
  }

  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
addq $0x100, %rdi            # imm = 0x100
leaq 0xd1959(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3c89a
leaq 0x118(%rbx), %rdi
addq $0x20, %r14
movq %r14, %rsi
callq 0x3c89a
cmpl $0x0, 0x14(%rbx)
jle 0x14610
leaq 0xf8(%rbx), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
leaq 0x40(%rsp), %r15
leaq 0x28(%rsp), %r12
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12d4e
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
callq 0x715e8
movsd %xmm0, 0x18(%rsp)
callq 0x715e8
movsd %xmm0, 0x10(%rsp)
callq 0x715e8
movapd %xmm0, %xmm2
movq %r15, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x3cfc6
movq %r12, %rdi
movq %r15, %rsi
movsd 0x20(%rsp), %xmm0
callq 0x3d962
leaq 0x18(%r13), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3c914
andb $-0x3, 0x78(%r13)
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x27cc6
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1457d
movslq 0x24(%rbx), %rax
testq %rax, %rax
jle 0x14630
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1461f
movslq 0x34(%rbx), %rax
testq %rax, %rax
jle 0x14653
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1463f
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x290(%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::Inflate(double)
void R3Mesh::
Inflate(RNScalar factor)
{
  // Change every vertex position
  bbox = R3null_box;
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    RNLength distance = factor * VertexAverageEdgeLength(vertex);
    R3Vector normal_vector = VertexNormal(vertex);
    vertex->position += distance * normal_vector;
    vertex->flags.Remove(R3_MESH_VERTEX_NORMAL_UPTODATE);
    bbox.Union(vertex->position);
  }

  // Mark every edge out of date
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    edge->flags.Remove(R3_MESH_EDGE_LENGTH_UPTODATE);
  }

  // Mark every face out of date
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    face->flags.Remove(R3_MESH_FACE_PLANE_UPTODATE | R3_MESH_FACE_BBOX_UPTODATE);
  }

  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rdi, %rbx
addq $0x100, %rdi            # imm = 0x100
leaq 0xd1805(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3c89a
leaq 0x118(%rbx), %rdi
addq $0x20, %r14
movq %r14, %rsi
callq 0x3c89a
cmpl $0x0, 0x14(%rbx)
jle 0x1475d
leaq 0xf8(%rbx), %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
leaq 0x30(%rsp), %r15
leaq 0x18(%rsp), %r12
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x12d4e
testb $0x2, 0x78(%r13)
jne 0x14705
movq (%rbx), %rax
movq %rbx, %rdi
movq %r13, %rsi
movsd %xmm0, (%rsp)
callq *0x2b0(%rax)
movsd (%rsp), %xmm0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x30(%r13), %rsi
movq %r15, %rdi
callq 0x3cfd6
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3d962
leaq 0x18(%r13), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3c914
andb $-0x3, 0x78(%r13)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x27cc6
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x146d2
movslq 0x24(%rbx), %rax
testq %rax, %rax
jle 0x1477d
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1476c
movslq 0x34(%rbx), %rax
testq %rax, %rax
jle 0x147a0
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1478c
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x290(%rax)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::Transform(gaps::R3Transformation const&)
void R3Mesh::
Transform(const R3Transformation& transformation)
{
  // Transform every vertex position
  bbox = R3null_box;
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    vertex->position.Transform(transformation);
    vertex->flags.Remove(R3_MESH_VERTEX_NORMAL_UPTODATE);
    bbox.Union(vertex->position);
  }

  // Mark every edge out of date
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    edge->flags.Remove(R3_MESH_EDGE_LENGTH_UPTODATE);
  }

  // Mark every face out of date
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    face->flags.Remove(R3_MESH_FACE_PLANE_UPTODATE | R3_MESH_FACE_BBOX_UPTODATE);
  }

  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x100, %rdi            # imm = 0x100
leaq 0xd16bd(%rip), %r15     # 0xe5e98
leaq 0x8(%r15), %rsi
callq 0x3c89a
leaq 0x118(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x3c89a
cmpl $0x0, 0x14(%rbx)
jle 0x14839
leaq 0xf8(%rbx), %r15
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rbp
leaq 0x18(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x3ce48
andb $-0x3, 0x78(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x27cc6
incq %r13
movslq 0x14(%rbx), %rax
cmpq %rax, %r13
jl 0x14807
movslq 0x24(%rbx), %rax
testq %rax, %rax
jle 0x14859
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x14848
movslq 0x34(%rbx), %rax
testq %rax, %rax
jle 0x1487c
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x14868
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x290(%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateVertex(gaps::R3MeshVertex const&, gaps::R3MeshVertex*)
R3MeshVertex *R3Mesh::
CreateVertex(const R3MeshVertex& source_vertex, R3MeshVertex *v)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Create vertex
  if (!v) {
    v = new R3MeshVertex();
    v->flags.Add(R3_MESH_VERTEX_ALLOCATED);
  }

  // Set position/normal of new vertex
  SetVertexPosition(v, source_vertex.position);
  if (!source_vertex.normal.IsZero()) SetVertexNormal(v, source_vertex.normal);
  SetVertexColor(v, source_vertex.color);
  SetVertexTextureCoords(v, source_vertex.texcoords);

  // Set ID of new vertex
  v->id = vertices.NEntries();

  // Insert vertex into array
  vertices.Insert(v);

  // Return vertex
  return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
testq %rbx, %rbx
jne 0x148cb
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x239aa
orb $0x1, 0x78(%rbx)
leaq 0x18(%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13858
movsd 0x30(%r15), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x1490c
jp 0x1490c
movsd 0x38(%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1490c
jp 0x1490c
movsd 0x40(%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1490c
jnp 0x1491d
leaq 0x30(%r15), %rsi
leaq 0x30(%rbx), %rdi
callq 0x3d752
orb $0x2, 0x78(%rbx)
leaq 0x58(%r15), %rsi
leaq 0x58(%rbx), %rdi
callq 0x6f712
addq $0x48, %r15
leaq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x681de
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x98, %esi
movq %rbx, %rdi
callq 0xe450
movq %r14, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateVertex(gaps::R3Point const&, gaps::R3MeshVertex*)
R3MeshVertex *R3Mesh::
CreateVertex(const R3Point& position, R3MeshVertex *v)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Create vertex
  if (!v) {
    v = new R3MeshVertex();
    v->flags.Add(R3_MESH_VERTEX_ALLOCATED);
  }

  // Set position of new vertex
  SetVertexPosition(v, position);

  // Set ID of new vertex
  v->id = vertices.NEntries();

  // Insert vertex into array
  vertices.Insert(v);

  // Return vertex
  return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
testq %rbx, %rbx
jne 0x149a7
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x239aa
orb $0x1, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x13858
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x98, %esi
movq %rbx, %rdi
callq 0xe450
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateVertex(gaps::R3Point const&, gaps::R3Vector const&, gaps::R3MeshVertex*)
R3MeshVertex *R3Mesh::
CreateVertex(const R3Point& position, const R3Vector& normal, R3MeshVertex *v)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Create vertex
  if (!v) {
    v = new R3MeshVertex();
    v->flags.Add(R3_MESH_VERTEX_ALLOCATED);
  }

  // Set position/normal of new vertex
  SetVertexPosition(v, position);
  if (!normal.IsZero()) SetVertexNormal(v, normal);

  // Set ID of new vertex
  v->id = vertices.NEntries();

  // Insert vertex into array
  vertices.Insert(v);

  // Return vertex
  return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
testq %rbx, %rbx
jne 0x14a27
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x239aa
orb $0x1, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x13858
movsd (%r15), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x14a66
jp 0x14a66
movsd 0x8(%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x14a66
jp 0x14a66
movsd 0x10(%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x14a66
jnp 0x14a76
leaq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x3d752
orb $0x2, 0x78(%rbx)
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x98, %esi
movq %rbx, %rdi
callq 0xe450
movq %r14, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateVertex(gaps::R3Point const&, gaps::R3Vector const&, gaps::RNRgb const&, gaps::R3MeshVertex*)
R3MeshVertex *R3Mesh::
CreateVertex(const R3Point& position, const R3Vector& normal, const RNRgb& color, R3MeshVertex *v)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Create vertex
  if (!v) {
    v = new R3MeshVertex();
    v->flags.Add(R3_MESH_VERTEX_ALLOCATED);
  }

  // Set position/normal of new vertex
  SetVertexPosition(v, position);
  if (!normal.IsZero()) SetVertexNormal(v, normal);
  SetVertexColor(v, color);

  // Set ID of new vertex
  v->id = vertices.NEntries();

  // Insert vertex into array
  vertices.Insert(v);

  // Return vertex
  return v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
testq %rbx, %rbx
jne 0x14af3
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x239aa
orb $0x1, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x13858
movsd (%r12), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x14b35
jp 0x14b35
movsd 0x8(%r12), %xmm1
ucomisd %xmm0, %xmm1
jne 0x14b35
jp 0x14b35
movsd 0x10(%r12), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x14b35
jnp 0x14b45
leaq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x3d752
orb $0x2, 0x78(%rbx)
leaq 0x58(%rbx), %rdi
movq %r15, %rsi
callq 0x6f712
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x98, %esi
movq %rbx, %rdi
callq 0xe450
movq %r14, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateEdge(gaps::R3MeshVertex*, gaps::R3MeshVertex*, gaps::R3MeshEdge*)
R3MeshEdge *R3Mesh::
CreateEdge(R3MeshVertex *v1, R3MeshVertex *v2, R3MeshEdge *e)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Create edge
  if (!e) {
    e = new R3MeshEdge();
    e->flags.Add(R3_MESH_EDGE_ALLOCATED);
  }

  // Update edge-vertex relations
  e->vertex[0] = v1;
  e->vertex[1] = v2;

  // Set ID of new edge
  e->id = edges.NEntries();

  // Insert edge into vertex lists
  v1->edges.Insert(e);
  v2->edges.Insert(e);

  // Insert edge into array
  edges.Insert(e);

  // Return edge
  return e;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
testq %rbx, %rbx
jne 0x14ce1
movl $0x58, %edi
callq 0xe440
movq %rax, %rbx
leaq 0xcca71(%rip), %rax     # 0xe1720
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x28(%rbx)
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
movq %rax, 0x50(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movq %rax, 0x40(%rbx)
movl $0x0, 0x48(%rbx)
movq $0x1, 0x38(%rbx)
movq %r12, 0x8(%rbx)
movq %r15, 0x10(%rbx)
leaq 0x18(%r14), %r13
movl 0x24(%r14), %eax
movl %eax, 0x30(%rbx)
movl 0x14(%r12), %edx
addq $0x8, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movl 0x14(%r15), %edx
addq $0x8, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movl 0x24(%r14), %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x6f8a2
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateFace(gaps::R3MeshVertex*, gaps::R3MeshVertex*, gaps::R3MeshVertex*, gaps::R3MeshFace*)
R3MeshFace *R3Mesh::
CreateFace(R3MeshVertex *v1, R3MeshVertex *v2, R3MeshVertex *v3, R3MeshFace *f)
{
  // Get/create edges
  R3MeshEdge *e1 = EdgeBetweenVertices(v1, v2);
  if (!e1) e1 = CreateEdge(v1, v2);
  R3MeshEdge *e2 = EdgeBetweenVertices(v2, v3);
  if (!e2) e2 = CreateEdge(v2, v3);
  R3MeshEdge *e3 = EdgeBetweenVertices(v3, v1);
  if (!e3) e3 = CreateEdge(v3, v1);
  assert(e1 && e2 && e3);

  // Create face
  return CreateFace(v1, v2, v3, e1, e2, e3, f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpq %rdx, %rsi
je 0x14d81
movslq 0x14(%r12), %rax
testq %rax, %rax
jle 0x14d81
movq 0x8(%r12), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rbp
cmpq %r15, 0x8(%rbp)
je 0x14d96
cmpq %r15, 0x10(%rbp)
je 0x14d96
incq %rdx
cmpq %rdx, %rax
jne 0x14d69
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x40(%rax)
movq %rax, %rbp
cmpq %r14, %r15
je 0x14dc2
movslq 0x14(%r15), %rax
testq %rax, %rax
jle 0x14dc2
movq 0x8(%r15), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rbx
cmpq %r14, 0x8(%rbx)
je 0x14dd7
cmpq %r14, 0x10(%rbx)
je 0x14dd7
incq %rdx
cmpq %rdx, %rax
jne 0x14daa
movq (%r13), %rax
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq *0x40(%rax)
movq %rax, %rbx
cmpq %r12, %r14
je 0x14e03
movslq 0x14(%r14), %rcx
testq %rcx, %rcx
jle 0x14e03
movq 0x8(%r14), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rax
cmpq %r12, 0x8(%rax)
je 0x14e15
cmpq %r12, 0x10(%rax)
je 0x14e15
incq %rsi
cmpq %rsi, %rcx
jne 0x14deb
movq (%r13), %rax
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq *0x40(%rax)
movq (%r13), %r10
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbp, %r8
movq %rbx, %r9
pushq (%rsp)
pushq %rax
callq *0x58(%r10)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CreateFace(gaps::R3MeshEdge*, gaps::R3MeshEdge*, gaps::R3MeshEdge*, gaps::R3MeshFace*)
R3MeshFace *R3Mesh::
CreateFace(R3MeshEdge *e1, R3MeshEdge *e2, R3MeshEdge *e3, R3MeshFace *f)
{
  // Get vertices
  R3MeshVertex *v1 = VertexBetweenEdges(e3, e1);
  R3MeshVertex *v2 = VertexBetweenEdges(e1, e2);
  R3MeshVertex *v3 = VertexBetweenEdges(e2, e3);
  assert(v1 && v2 && v3);

  // Create face
  return CreateFace(v1, v2, v3, e1, e2, e3, f);
}

// Assembly:
movq %r8, %r10
movq %rcx, %rax
movq %rdx, %r9
movq %rsi, %r8
cmpq %rsi, %rcx
je 0x14e7f
movq 0x8(%rax), %rsi
movq 0x8(%r8), %rcx
cmpq %rcx, %rsi
je 0x14e81
movq 0x10(%r8), %rdx
cmpq %rdx, %rsi
je 0x14e81
movq 0x10(%rax), %r11
xorl %esi, %esi
cmpq %rdx, %r11
cmoveq %r11, %rsi
cmpq %rcx, %r11
cmoveq %r11, %rsi
jmp 0x14e81
xorl %esi, %esi
pushq %r14
pushq %rbx
pushq %rax
cmpq %r9, %r8
je 0x14eb6
movq 0x8(%r8), %rdx
movq 0x8(%r9), %rcx
cmpq %rcx, %rdx
je 0x14eb8
movq 0x10(%r9), %r11
cmpq %r11, %rdx
je 0x14eb8
movq 0x10(%r8), %rbx
xorl %edx, %edx
cmpq %r11, %rbx
cmoveq %rbx, %rdx
cmpq %rcx, %rbx
cmoveq %rbx, %rdx
jmp 0x14eb8
xorl %edx, %edx
cmpq %rax, %r9
je 0x14ee9
movq 0x8(%r9), %rcx
movq 0x8(%rax), %r11
cmpq %r11, %rcx
je 0x14eeb
movq 0x10(%rax), %rbx
cmpq %rbx, %rcx
je 0x14eeb
movq 0x10(%r9), %r14
xorl %ecx, %ecx
cmpq %rbx, %r14
cmoveq %r14, %rcx
cmpq %r11, %r14
cmoveq %r14, %rcx
jmp 0x14eeb
xorl %ecx, %ecx
movq (%rdi), %r11
pushq %r10
pushq %rax
callq *0x58(%r11)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeallocateVertex(gaps::R3MeshVertex*)
void R3Mesh::
DeallocateVertex(R3MeshVertex *v)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Remove vertex from mesh array by moving last vertex
  assert(!vertices.IsEmpty());
  R3MeshVertex *tail = vertices.Tail();
  int index = v->id;
  RNArrayEntry *entry = vertices.KthEntry(index);
  assert(vertices.EntryContents(entry) == v);
  vertices.EntryContents(entry) = tail;
  tail->id = index;
  vertices.RemoveTail();

  // Reset ID to ease debugging
  v->id = -1;

  // Deallocate vertex
  if (v->flags[R3_MESH_VERTEX_ALLOCATED]) delete v;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
leaq 0x8(%r14), %rdi
movslq 0x14(%r14), %rax
movq 0x8(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdx
movslq 0x70(%rbx), %rsi
movq %rdx, (%rcx,%rsi,8)
movl %esi, 0x70(%rdx)
leal -0x1(%rax), %esi
callq 0x6fa2c
movl $0xffffffff, 0x70(%rbx) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x150aa
movq 0x78(%rbx), %rax
andl $0x1, %eax
je 0x150aa
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeallocateEdge(gaps::R3MeshEdge*)
void R3Mesh::
DeallocateEdge(R3MeshEdge *e)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Remove edge from mesh array by moving last edge
  assert(!edges.IsEmpty());
  R3MeshEdge *tail = edges.Tail();
  int index = e->id;
  RNArrayEntry *entry = edges.KthEntry(index);
  assert(edges.EntryContents(entry) == e);
  edges.EntryContents(entry) = tail;
  tail->id = index;
  edges.RemoveTail();

  // Reset ID to ease debugging
  e->id = -1;

  // Deallocate edge
  if (e->flags[R3_MESH_EDGE_ALLOCATED]) delete e;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
leaq 0x18(%r14), %rdi
movslq 0x24(%r14), %rax
movq 0x18(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdx
movslq 0x30(%rbx), %rsi
movq %rdx, (%rcx,%rsi,8)
movl %esi, 0x30(%rdx)
leal -0x1(%rax), %esi
callq 0x6fa2c
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x1510e
movq 0x38(%rbx), %rax
andl $0x1, %eax
je 0x1510e
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeallocateFace(gaps::R3MeshFace*)
void R3Mesh::
DeallocateFace(R3MeshFace *f)
{
  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();

  // Remove face from mesh array by moving last face
  assert(!faces.IsEmpty());
  R3MeshFace *tail = faces.Tail();
  int index = f->id;
  RNArrayEntry *entry = faces.KthEntry(index);
  assert(faces.EntryContents(entry) == f);
  faces.EntryContents(entry) = tail;
  tail->id = index;
  faces.RemoveTail();

  // Reset ID to ease debugging
  f->id = -1;

  // Deallocate face
  if (f->flags[R3_MESH_FACE_ALLOCATED]) delete f;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
callq *0x290(%rax)
leaq 0x28(%r14), %rdi
movslq 0x34(%r14), %rax
movq 0x28(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdx
movslq 0xa4(%rbx), %rsi
movq %rdx, (%rcx,%rsi,8)
movl %esi, 0xa4(%rdx)
leal -0x1(%rax), %esi
callq 0x6fa2c
movl $0xffffffff, 0xa4(%rbx) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x1517e
movq 0xa8(%rbx), %rax
andl $0x1, %eax
je 0x1517e
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeleteVertex(gaps::R3MeshVertex*)
void R3Mesh::
DeleteVertex(R3MeshVertex *v)
{
  // Delete edges attached to vertex
  RNArray<R3MeshEdge *> vertex_edges = v->edges;
  for (int i = 0; i < vertex_edges.NEntries(); i++) 
    DeleteEdge(vertex_edges.Kth(i));

  // Deallocate vertex
  DeallocateVertex(v);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x6f814
cmpl $0x0, 0xc(%r15)
jle 0x151cc
xorl %r15d, %r15d
movq (%rsp), %rax
movq (%rax,%r15,8), %rsi
movq (%r14), %rax
movq %r14, %rdi
callq *0x68(%rax)
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0x151ae
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x298(%rax)
movq %rsp, %rdi
callq 0x6f876
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x151ef
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6f876
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeleteEdge(gaps::R3MeshEdge*)
void R3Mesh::
DeleteEdge(R3MeshEdge *e)
{
  // Delete faces attached to edge
  if (e->face[0]) DeleteFace(e->face[0]);
  if (e->face[1]) DeleteFace(e->face[1]);

  // Remove edge from vertex arrays
  e->vertex[0]->edges.Remove(e);
  e->vertex[1]->edges.Remove(e);

  // Deallocate edge
  DeallocateEdge(e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %rsi
testq %rsi, %rsi
je 0x15222
movq (%r14), %rax
movq %r14, %rdi
callq *0x70(%rax)
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x15234
movq (%r14), %rax
movq %r14, %rdi
callq *0x70(%rax)
movq 0x8(%rbx), %r12
leaq 0x8(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6f884
subq 0x8(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0x6fa2c
movq 0x10(%rbx), %r12
leaq 0x8(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6f884
subq 0x8(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0x6fa2c
movq (%r14), %rax
movq 0x2a0(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeleteFace(gaps::R3MeshFace*)
void R3Mesh::
DeleteFace(R3MeshFace *f)
{
  // Update edge-face relations
  if (f->edge[0]->face[0] == f) f->edge[0]->face[0] = NULL;
  if (f->edge[0]->face[1] == f) f->edge[0]->face[1] = NULL;
  if (f->edge[1]->face[0] == f) f->edge[1]->face[0] = NULL;
  if (f->edge[1]->face[1] == f) f->edge[1]->face[1] = NULL;
  if (f->edge[2]->face[0] == f) f->edge[2]->face[0] = NULL;
  if (f->edge[2]->face[1] == f) f->edge[2]->face[1] = NULL;

  // Deallocate face
  DeallocateFace(f);
}

// Assembly:
movq 0x20(%rsi), %rax
cmpq %rsi, 0x18(%rax)
jne 0x152b6
movq $0x0, 0x18(%rax)
movq 0x20(%rsi), %rax
cmpq %rsi, 0x20(%rax)
jne 0x152c4
movq $0x0, 0x20(%rax)
movq 0x28(%rsi), %rax
cmpq %rsi, 0x18(%rax)
jne 0x152da
movq $0x0, 0x18(%rax)
movq 0x28(%rsi), %rax
cmpq %rsi, 0x20(%rax)
jne 0x152e8
movq $0x0, 0x20(%rax)
movq 0x30(%rsi), %rax
cmpq %rsi, 0x18(%rax)
jne 0x152fe
movq $0x0, 0x18(%rax)
movq 0x30(%rsi), %rax
cmpq %rsi, 0x20(%rax)
jne 0x1530c
movq $0x0, 0x20(%rax)
movq (%rdi), %rax
movq 0x2a8(%rax), %rax
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeleteUnusedVertices()
void R3Mesh::
DeleteUnusedVertices(void)
{
  // Find unused vertices
  RNArray<R3MeshVertex *> unused_vertices;
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    if (VertexValence(vertex) == 0) unused_vertices.Insert(vertex);
  }

  // Delete unused vertices
  for (int i = 0; i < unused_vertices.NEntries(); i++) {
    R3MeshVertex *vertex = unused_vertices.Kth(i);
    DeleteVertex(vertex);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x6f80c
movl 0x14(%rbx), %eax
testl %eax, %eax
jle 0x15361
xorl %r15d, %r15d
movq %rsp, %r14
movq 0x8(%rbx), %rcx
movq (%rcx,%r15,8), %rsi
cmpl $0x0, 0x14(%rsi)
jne 0x15356
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x6f8a2
movl 0x14(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x15339
cmpl $0x0, 0xc(%rsp)
jle 0x15389
xorl %r14d, %r14d
movq (%rsp), %rax
movq (%rax,%r14,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x60(%rax)
incq %r14
movslq 0xc(%rsp), %rax
cmpq %rax, %r14
jl 0x1536b
movq %rsp, %rdi
callq 0x6f876
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1539d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6f876
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::DeleteUnusedEdges()
void R3Mesh::
DeleteUnusedEdges(void)
{
  // Find unused edges
  RNArray<R3MeshEdge *> unused_edges;
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    if (!FaceOnEdge(edge, 0) && !FaceOnEdge(edge, 1)) unused_edges.Insert(edge);
  }

  // Delete unused edges
  for (int i = 0; i < unused_edges.NEntries(); i++) {
    R3MeshEdge *edge = unused_edges.Kth(i);
    DeleteEdge(edge);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x6f80c
movl 0x24(%rbx), %eax
testl %eax, %eax
jle 0x15401
xorl %r15d, %r15d
movq %rsp, %r14
movq 0x18(%rbx), %rcx
movq (%rcx,%r15,8), %rsi
cmpq $0x0, 0x18(%rsi)
jne 0x153f6
cmpq $0x0, 0x20(%rsi)
jne 0x153f6
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x6f8a2
movl 0x24(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x153d1
cmpl $0x0, 0xc(%rsp)
jle 0x15429
xorl %r14d, %r14d
movq (%rsp), %rax
movq (%rax,%r14,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
incq %r14
movslq 0xc(%rsp), %rax
cmpq %rax, %r14
jl 0x1540b
movq %rsp, %rdi
callq 0x6f876
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1543d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6f876
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::CollapseFace(gaps::R3MeshFace*, gaps::R3Point const&)
R3MeshVertex *R3Mesh::
CollapseFace(R3MeshFace *f, const R3Point& point)
{
  // Collapse face into single point
  R3MeshVertex *v0 = VertexOnFace(f, 0);
  R3MeshVertex *v1 = VertexOnFace(f, 1);
  R3MeshVertex *v2 = VertexOnFace(f, 2);
  R3MeshEdge *e01 = EdgeBetweenVertices(v0, v1);
  R3MeshVertex *v01 = CollapseEdge(e01, point);
  if (!v01) return NULL;
  R3MeshEdge *e012 = EdgeBetweenVertices(v01, v2);
  assert(e012);
  R3MeshVertex *v012 = CollapseEdge(e012, point);
  return v012;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movq 0x10(%rsi), %rcx
cmpq %rcx, %rax
je 0x15e6e
movslq 0x14(%rax), %rdx
testq %rdx, %rdx
jle 0x15e6e
movq 0x8(%rax), %rdi
xorl %r8d, %r8d
movq (%rdi,%r8,8), %rax
cmpq %rcx, 0x8(%rax)
je 0x15e70
cmpq %rcx, 0x10(%rax)
je 0x15e70
incq %r8
cmpq %r8, %rdx
jne 0x15e56
xorl %eax, %eax
movq 0x18(%rsi), %r15
movq (%r14), %rcx
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq *0x98(%rcx)
testq %rax, %rax
je 0x15ed0
cmpq %r15, %rax
je 0x15eb7
movslq 0x14(%rax), %rcx
testq %rcx, %rcx
jle 0x15eb7
movq 0x8(%rax), %rax
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
cmpq %r15, 0x8(%rsi)
je 0x15eb9
cmpq %r15, 0x10(%rsi)
je 0x15eb9
incq %rdx
cmpq %rdx, %rcx
jne 0x15e9f
xorl %esi, %esi
movq (%r14), %rax
movq 0x98(%rax), %rax
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::SplitEdge(gaps::R3MeshEdge*, gaps::R3Plane const&)
R3MeshVertex *R3Mesh::
SplitEdge(R3MeshEdge *e, const R3Plane& plane)
{
  // Compute intersection point with plane
  RNScalar t;
  R3Point point;
  R3Span edge_span = EdgeSpan(e);
  if (!R3Intersects(edge_span, plane, &point, &t)) return NULL;
  if ((RNIsEqual(t, 0.0)) || (RNIsEqual(t, edge_span.Length()))) return NULL;

  // Split edge
  return SplitEdge(e, point);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x3c530
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
addq $0x18, %rsi
addq $0x18, %rdx
leaq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x3b9b6
movq %rsp, %rcx
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x449ef
testl %eax, %eax
je 0x1649f
movsd (%rsp), %xmm0
leaq 0xcf727(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x8bba3(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x1648d
ucomisd %xmm0, %xmm1
jae 0x1649f
subsd 0x68(%rsp), %xmm0
ucomisd %xmm2, %xmm0
jb 0x164af
ucomisd %xmm0, %xmm1
jb 0x164af
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq (%r14), %rax
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *0xb8(%rax)
jmp 0x164a1
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FlipFace(gaps::R3MeshFace*)
void R3Mesh::
FlipFace(R3MeshFace *f)
{
  // Reverse orientation of plane
  f->plane.Flip();

  // Reverse order of vertices
  R3MeshVertex *vswap = f->vertex[0];
  f->vertex[0] = f->vertex[2];
  f->vertex[2] = vswap;

  // Reverse order of edges
  R3MeshEdge *eswap = f->edge[0];
  f->edge[0] = f->edge[1];
  f->edge[1] = eswap;

  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rsi), %r15
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3dc00
movq %r15, %rdi
movq %r12, %rsi
callq 0x3d752
movsd 0x50(%rbx), %xmm0
xorps 0x8b1e8(%rip), %xmm0    # 0xa2020
movlps %xmm0, 0x50(%rbx)
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, 0x18(%rbx)
movdqu 0x20(%rbx), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x20(%rbx)
movq (%r14), %rax
movq %r14, %rdi
callq *0x290(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FlipFaces()
void R3Mesh::
FlipFaces(void)
{
  // Reverse orientation of all faces
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *f = Face(i);
    FlipFace(f);
  }
}

// Assembly:
cmpl $0x0, 0x34(%rdi)
jle 0x16eab
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq (%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx,%r14,8), %rsi
movq %rbx, %rdi
callq *0xe0(%rax)
incq %r14
movslq 0x34(%rbx), %rax
cmpq %rax, %r14
jl 0x16e84
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::SubdivideLongEdges(double)
void R3Mesh::
SubdivideLongEdges(RNLength max_edge_length)
{
  // Create priority queue for long edges
  RNHeap<R3MeshEdge *> heap(EdgeLengthCallback, NULL, this, FALSE);

  // Add long edges to priority queue
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    RNLength length = EdgeLength(edge);
    if (length > max_edge_length) heap.Push(edge);
  }

  // Split edges in longest to shortest order
  while (!heap.IsEmpty()) {
    R3MeshEdge *edge = heap.Pop();
    R3MeshVertex *vertex = SubdivideEdge(edge);
    for (int i = 0; i < VertexValence(vertex); i++) {
      R3MeshEdge *edge = EdgeOnVertex(vertex, i);
      RNLength length = EdgeLength(edge);
      if (length > max_edge_length) heap.Push(edge);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movsd %xmm0, 0x8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $-0x1, 0x20(%rsp)
leaq -0x4e(%rip), %rax       # 0x170d9
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq %rdi, 0x38(%rsp)
movl $0x0, 0x40(%rsp)
cmpl $0x0, 0x24(%rdi)
jle 0x17215
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0x10(%rsp), %r14
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %r15
testb $0x2, 0x38(%r15)
jne 0x17175
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x2b8(%rax)
movsd 0x28(%r15), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x1718e
movq %r14, %rdi
movq %r15, %rsi
callq 0x23b8e
incq %r12
movslq 0x24(%rbx), %rax
cmpq %rax, %r12
jl 0x17157
cmpl $0x0, 0x18(%rsp)
je 0x17215
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x23ca2
movq (%rbx), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq *0xc8(%rcx)
movq %rax, %r15
cmpl $0x0, 0x14(%rax)
jle 0x1720e
xorl %r13d, %r13d
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %r12
testb $0x2, 0x38(%r12)
jne 0x171e8
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x2b8(%rax)
movsd 0x28(%r12), %xmm0
ucomisd 0x8(%rsp), %xmm0
jbe 0x17202
movq %r14, %rdi
movq %r12, %rsi
callq 0x23b8e
incq %r13
movslq 0x14(%r15), %rax
cmpq %rax, %r13
jl 0x171c9
cmpl $0x0, 0x18(%rsp)
jne 0x171a6
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x17224
callq 0xe5b0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x17238
jmp 0x17238
jmp 0x17238
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1724a
callq 0xe5b0
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FillHoles(double, double)
void R3Mesh::
FillHoles(RNLength max_perimeter, RNLength max_planar_deviation)
{
  // Set edge marks
  // Cleared in FillHole
  // Used to avoid trying to fill hole multiple times
  RNMark edge_mark = ++R3mesh_mark;
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    SetEdgeMark(edge, edge_mark);
  }
  
  // Iteratively find boundary edge and fill hole
  for (int i = 0; i < NEdges(); i++) {
    R3MeshEdge *edge = Edge(i);
    if (!IsEdgeOnBoundary(edge)) continue;
    if (EdgeMark(edge) != edge_mark) continue;
    FillHole(edge, max_perimeter, max_planar_deviation);
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movl 0xccfcf(%rip), %ebp     # 0xe54b0
incl %ebp
movl %ebp, 0xccfc7(%rip)     # 0xe54b0
movslq 0x24(%rdi), %rax
testq %rax, %rax
jle 0x1854d
movq %rdi, %rbx
movq 0x18(%rdi), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl %ebp, 0x48(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x184fb
testl %eax, %eax
jle 0x1854d
xorl %r14d, %r14d
movq 0x18(%rbx), %rcx
movq (%rcx,%r14,8), %rsi
cmpq $0x0, 0x18(%rsi)
je 0x18527
cmpq $0x0, 0x20(%rsi)
jne 0x18542
cmpl %ebp, 0x48(%rsi)
jne 0x18542
movq %rbx, %rdi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
callq 0x17bda
movl 0x24(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x18511
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::GLVertexTextureCoordBufferObject() const
unsigned int R3Mesh::
GLVertexTextureCoordBufferObject(void) const
{
  // Check if nothing to be done
  if (NVertices() == 0) return 0;

  // Update texcoord buffer
  if (vbo_vertex_texcoord_buffer == 0) {
    glGenBuffers(1, (GLuint *) &vbo_vertex_texcoord_buffer);
    if (vbo_vertex_texcoord_buffer > 0) {
      std::vector<GLfloat> texcoords;
      for (int i = 0; i < NVertices(); i++) {
        R3MeshVertex *vertex = Vertex(i);
        const R2Point& texcoord = VertexTextureCoords(vertex);
        texcoords.push_back(texcoord.X());
        texcoords.push_back(texcoord.Y());
      }
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_texcoord_buffer);
      glBufferData(GL_ARRAY_BUFFER, texcoords.size() * sizeof(GLfloat), &texcoords[0], GL_STATIC_DRAW);
      glBindBuffer(GL_ARRAY_BUFFER, 0);
    }
  }

  // Return texcoord buffer identifier
  return vbo_vertex_texcoord_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpl $0x0, 0x14(%rdi)
je 0x19785
movq %rdi, %r14
movl 0x6c(%rdi), %eax
testl %eax, %eax
jne 0x19785
leaq 0x6c(%r14), %rbx
movq 0xcb91f(%rip), %rax     # 0xe4f88
movl $0x1, %edi
movq %rbx, %rsi
callq *(%rax)
movl (%rbx), %esi
movl $0x0, %eax
testl %esi, %esi
je 0x19785
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, 0x14(%r14)
jle 0x19733
xorl %r13d, %r13d
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rbp
xorps %xmm0, %xmm0
cvtsd2ss 0x48(%rbp), %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
cmpq %rax, %rsi
je 0x196df
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x196f4
movq %r15, %rdi
movq %r12, %rdx
callq 0x254f2
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
xorps %xmm0, %xmm0
cvtsd2ss 0x50(%rbp), %xmm0
movss %xmm0, 0xc(%rsp)
cmpq %rax, %rsi
je 0x19716
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x19721
movq %r15, %rdi
movq %r12, %rdx
callq 0x254f2
incq %r13
movslq 0x14(%r14), %rax
cmpq %rax, %r13
jl 0x196ab
movl (%rbx), %esi
movq 0xcb86e(%rip), %r14     # 0xe4fa8
movl $0x8892, %edi           # imm = 0x8892
callq *(%r14)
movq 0xcb877(%rip), %rax     # 0xe4fc0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
subq %rdx, %rsi
movl $0x8892, %edi           # imm = 0x8892
movl $0x88e4, %ecx           # imm = 0x88E4
callq *(%rax)
movl $0x8892, %edi           # imm = 0x8892
xorl %esi, %esi
callq *(%r14)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19783
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movl (%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19798
jmp 0x19798
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x197b2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::GLVertexRgbColorBufferObject() const
unsigned int R3Mesh::
GLVertexRgbColorBufferObject(void) const
{
  // Check if nothing to be done
  if (NVertices() == 0) return 0;

  // Update rgb color buffer
  if (vbo_vertex_rgb_color_buffer == 0) {
    glGenBuffers(1, (GLuint *) &vbo_vertex_rgb_color_buffer);
    if (vbo_vertex_rgb_color_buffer > 0) {
      std::vector<GLubyte> rgb_colors;
      for (int i = 0; i < NVertices(); i++) {
        R3MeshVertex *vertex = Vertex(i);
        const RNRgb& rgb_color = VertexColor(vertex);
        rgb_colors.push_back(255.0 * rgb_color.R());
        rgb_colors.push_back(255.0 * rgb_color.G());
        rgb_colors.push_back(255.0 * rgb_color.B());
        rgb_colors.push_back(255);
      }
      glBindBuffer(GL_ARRAY_BUFFER, vbo_vertex_rgb_color_buffer);
      glBufferData(GL_ARRAY_BUFFER, rgb_colors.size() * sizeof(GLubyte), &rgb_colors[0], GL_STATIC_DRAW);
      glBindBuffer(GL_ARRAY_BUFFER, 0);
    }
  }

  // Return rgb color buffer identifier
  return vbo_vertex_rgb_color_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %eax, %eax
cmpl $0x0, 0x14(%rdi)
je 0x19919
movq %rdi, %r14
movl 0x70(%rdi), %eax
testl %eax, %eax
jne 0x19919
leaq 0x70(%r14), %rbx
movq 0xcb79b(%rip), %rax     # 0xe4f88
movl $0x1, %edi
movq %rbx, %rsi
callq *(%rax)
movl (%rbx), %esi
movl $0x0, %eax
testl %esi, %esi
je 0x19919
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x0, 0x14(%r14)
jle 0x198c7
xorl %r13d, %r13d
movsd 0x889e9(%rip), %xmm1    # 0xa2218
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %r12
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rbp
movsd 0x58(%rbp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movb %al, 0xf(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x25632
movsd 0x60(%rbp), %xmm0
mulsd 0x889ae(%rip), %xmm0    # 0xa2218
cvttsd2si %xmm0, %eax
movb %al, 0xf(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x25632
movsd 0x68(%rbp), %xmm0
mulsd 0x8898e(%rip), %xmm0    # 0xa2218
cvttsd2si %xmm0, %eax
movb %al, 0xf(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x25632
movb $-0x1, 0xf(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x25632
incq %r13
movslq 0x14(%r14), %rax
cmpq %rax, %r13
movsd 0x88959(%rip), %xmm1    # 0xa2218
jl 0x19839
movl (%rbx), %esi
movq 0xcb6da(%rip), %r14     # 0xe4fa8
movl $0x8892, %edi           # imm = 0x8892
callq *(%r14)
movq 0xcb6e3(%rip), %rax     # 0xe4fc0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
subq %rdx, %rsi
movl $0x8892, %edi           # imm = 0x8892
movl $0x88e4, %ecx           # imm = 0x88E4
callq *(%rax)
movl $0x8892, %edi           # imm = 0x8892
xorl %esi, %esi
callq *(%r14)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19917
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movl (%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19930
jmp 0x19930
jmp 0x19930
jmp 0x19930
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1994a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0xe450
movq %rbx, %rdi
callq 0xe7e0