LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::SetVertexPosition(gaps::R3MeshVertex*, gaps::R3Point const&)
void R3Mesh::
SetVertexPosition(R3MeshVertex *v, const R3Point& position)
{
  // Set vertex position
  v->position = position;

  // Mark vertex in need of update to normal 
  v->flags.Remove(R3_MESH_VERTEX_NORMAL_UPTODATE);

  // Mark edges/faces in need of update
  for (int i = 0; i < v->edges.NEntries(); i++) {
    R3MeshEdge *e = v->edges[i];
    e->flags.Remove(R3_MESH_EDGE_LENGTH_UPTODATE);
    R3MeshVertex *neighbor = VertexAcrossEdge(e, v);
    neighbor->flags.Remove(R3_MESH_VERTEX_NORMAL_UPTODATE);
    R3MeshFace *f0 = e->face[0];
    if (f0) f0->flags.Remove(R3_MESH_FACE_PLANE_UPTODATE | R3_MESH_FACE_BBOX_UPTODATE);
    R3MeshFace *f1 = e->face[1];
    if (f1) f1->flags.Remove(R3_MESH_FACE_PLANE_UPTODATE | R3_MESH_FACE_BBOX_UPTODATE);
  }

  // Update bounding box
  bbox.Union(position);

  // Invalidate GL buffer objects
  InvalidateGLBufferObjects();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsi), %rdi
movq %rdx, %rsi
callq 0x3cd94
andb $-0x3, 0x78(%r15)
movslq 0x14(%r15), %rax
testq %rax, %rax
jle 0x13878
movq 0x8(%r15), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
movq 0x8(%rsi), %rdi
cmpq %r15, %rdi
jne 0x1384c
movq 0x10(%rsi), %rdi
andb $-0x3, 0x78(%rdi)
movq 0x18(%rsi), %rdi
testq %rdi, %rdi
je 0x13860
andb $-0xd, 0xa8(%rdi)
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x13870
andb $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x13836
leaq 0xf8(%rbx), %rdi
movq %r14, %rsi
callq 0x27f0e
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x290(%rax)
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeBetweenVertices(gaps::R3MeshVertex const*, gaps::R3MeshVertex const*) const
R3MeshEdge *R3Mesh::
EdgeBetweenVertices(const R3MeshVertex *v1, const R3MeshVertex *v2) const
{
  // Check if vertices are same
  if (v1 == v2) return NULL;

  // Search for edge in v1's list
  for (int i = 0; i < v1->edges.NEntries(); i++) {
    R3MeshEdge *e = v1->edges[i];
    if (IsVertexOnEdge(v2, e)) return e;
  }

  // Not found
  return NULL;
}

// Assembly:
cmpq %rdx, %rsi
je 0x138d4
movslq 0x14(%rsi), %rcx
testq %rcx, %rcx
jle 0x138d4
movq 0x8(%rsi), %rsi
xorl %edi, %edi
movq (%rsi,%rdi,8), %r8
cmpq %rdx, 0x8(%r8)
je 0x138c0
cmpq %rdx, 0x10(%r8)
setne %r9b
jmp 0x138c3
xorl %r9d, %r9d
testb %r9b, %r9b
cmoveq %r8, %rax
je 0x138d6
incq %rdi
cmpq %rdi, %rcx
jne 0x138ac
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeOnVertex(gaps::R3MeshVertex const*, gaps::R3MeshFace const*, int) const
R3MeshEdge *R3Mesh::
EdgeOnVertex(const R3MeshVertex *v, const R3MeshFace *f, RNDirection dir) const
{
  // Return edge on v in dir with respect to f
  if (f->vertex[0] == v) {
    if (dir == RN_CCW) return f->edge[2];
    else return f->edge[0];
  }
  else if (f->vertex[1] == v) {
    if (dir == RN_CCW) return f->edge[0];
    else return f->edge[1];
  }
  else if (f->vertex[2] == v) {
    if (dir == RN_CCW) return f->edge[1];
    else return f->edge[2];
  }
  else {
    // Vertex is not on face
    return NULL;
  }
}

// Assembly:
cmpq %rsi, 0x8(%rdx)
je 0x138ed
cmpq %rsi, 0x10(%rdx)
je 0x138fd
cmpq %rsi, 0x18(%rdx)
je 0x1390e
xorl %eax, %eax
retq
xorl %eax, %eax
testl %ecx, %ecx
sete %al
shll $0x4, %eax
orq $0x20, %rax
jmp 0x1391d
xorl %eax, %eax
testl %ecx, %ecx
setne %al
leaq 0x20(,%rax,8), %rax
jmp 0x1391d
xorl %eax, %eax
testl %ecx, %ecx
setne %al
leaq 0x28(,%rax,8), %rax
movq (%rdx,%rax), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeAcrossVertex(gaps::R3MeshVertex const*, gaps::R3MeshEdge const*, gaps::R3MeshFace const*) const
R3MeshEdge *R3Mesh:: 
EdgeAcrossVertex(const R3MeshVertex *v, const R3MeshEdge *e, const R3MeshFace *f) const
{
  // Returns edge on the other side of a vertex from an edge on the same face 
  if (v == f->vertex[0]) {
    if (e == f->edge[0]) return f->edge[2];
    else if (e == f->edge[2]) return f->edge[0];
  }
  else if (v == f->vertex[1]) {
    if (e == f->edge[1]) return f->edge[0];
    else if (e == f->edge[0]) return f->edge[1];
  }
  else if (v == f->vertex[2]) {
    if (e == f->edge[2]) return f->edge[1];
    else if (e == f->edge[1]) return f->edge[2];
  }
  return NULL;
}

// Assembly:
cmpq %rsi, 0x8(%rcx)
je 0x1393e
cmpq %rsi, 0x10(%rcx)
je 0x13951
cmpq %rsi, 0x18(%rcx)
jne 0x13963
movq 0x28(%rcx), %rsi
movq 0x30(%rcx), %rax
jmp 0x13959
movq 0x20(%rcx), %rax
movq 0x30(%rcx), %rcx
cmpq %rdx, %rax
je 0x1396a
cmpq %rdx, %rcx
jne 0x13963
retq
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rax
cmpq %rdx, %rax
je 0x13966
cmpq %rdx, %rsi
je 0x13950
xorl %eax, %eax
retq
movq %rsi, %rax
retq
movq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::VertexBetweenEdges(gaps::R3MeshEdge const*, gaps::R3MeshEdge const*) const
R3MeshVertex *R3Mesh::
VertexBetweenEdges(const R3MeshEdge *e1, const R3MeshEdge *e2) const
{
  // Return vertex shared by edges
  if (e1 == e2) return NULL;
  if ((e1->vertex[0] == e2->vertex[0]) || (e1->vertex[0] == e2->vertex[1])) return e1->vertex[0];
  else if ((e1->vertex[1] == e2->vertex[0]) || (e1->vertex[1] == e2->vertex[1])) return e1->vertex[1];
  else return NULL;
}

// Assembly:
cmpq %rdx, %rsi
je 0x139b2
movq 0x8(%rsi), %rax
movq 0x8(%rdx), %rcx
cmpq %rcx, %rax
je 0x139b1
movq 0x10(%rdx), %rdx
cmpq %rdx, %rax
je 0x139b1
movq 0x10(%rsi), %rsi
xorl %eax, %eax
cmpq %rdx, %rsi
cmoveq %rsi, %rax
cmpq %rcx, %rsi
cmoveq %rsi, %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::VertexBetweenFaces(gaps::R3MeshFace const*, gaps::R3MeshFace const*, int) const
R3MeshVertex *R3Mesh::
VertexBetweenFaces(const R3MeshFace *f1, const R3MeshFace *f2, RNDirection dir) const
{
  // Check if faces are same
  if (f1 == f2) return NULL;

  // Return vertex connected to both f1 and f2
  R3MeshEdge *e = EdgeBetweenFaces(f1, f2);
  if (e) {
    // Faces lie on same edge, return vertex in dir with respect to f1
    return VertexOnFace(f1, e, dir);
  }
  else {
    // Faces do not lie on the same edge, check if they share a vertex
    if (f1->vertex[0] == f2->vertex[0]) return f1->vertex[0];
    if (f1->vertex[0] == f2->vertex[1]) return f1->vertex[0];
    if (f1->vertex[0] == f2->vertex[2]) return f1->vertex[0];
    if (f1->vertex[1] == f2->vertex[0]) return f1->vertex[1];
    if (f1->vertex[1] == f2->vertex[1]) return f1->vertex[1];
    if (f1->vertex[1] == f2->vertex[2]) return f1->vertex[1];
    if (f1->vertex[2] == f2->vertex[0]) return f1->vertex[2];
    if (f1->vertex[2] == f2->vertex[1]) return f1->vertex[2];
    if (f1->vertex[2] == f2->vertex[2]) return f1->vertex[2];
    return NULL;
  }
}

// Assembly:
cmpq %rdx, %rsi
je 0x13a22
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %rbx
callq 0x13a78
testq %rax, %rax
je 0x13a25
movl $0x1, %ecx
subl %ebp, %ecx
cmpq %rbx, 0x18(%rax)
movslq %ecx, %rcx
movslq %ebp, %rdx
cmoveq %rcx, %rdx
movq 0x8(%rax,%rdx,8), %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
movq 0x8(%rbx), %rax
movq 0x8(%r14), %rdx
cmpq %rdx, %rax
je 0x13a1d
movq 0x10(%r14), %rsi
cmpq %rsi, %rax
je 0x13a1d
movq 0x18(%r14), %rcx
cmpq %rcx, %rax
je 0x13a1d
movq 0x10(%rbx), %rax
cmpq %rcx, %rax
je 0x13a1d
cmpq %rdx, %rax
je 0x13a1d
cmpq %rsi, %rax
je 0x13a1d
movq 0x18(%rbx), %rax
cmpq %rdx, %rax
sete %dl
cmpq %rsi, %rax
sete %sil
orb %dl, %sil
jne 0x13a1d
xorl %edx, %edx
cmpq %rcx, %rax
cmovneq %rdx, %rax
jmp 0x13a1d
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeBetweenFaces(gaps::R3MeshFace const*, gaps::R3MeshFace const*) const
R3MeshEdge *R3Mesh::
EdgeBetweenFaces(const R3MeshFace *f1, const R3MeshFace *f2) const
{
  if (f1 == f2) return NULL;
  if (FaceAcrossEdge(f1->edge[0], f1) == f2) return f1->edge[0];
  if (FaceAcrossEdge(f1->edge[1], f1) == f2) return f1->edge[1];
  if (FaceAcrossEdge(f1->edge[2], f1) == f2) return f1->edge[2];
  return NULL;
}

// Assembly:
cmpq %rdx, %rsi
je 0x13ac4
movq 0x20(%rsi), %rax
movq 0x18(%rax), %rcx
cmpq %rsi, %rcx
jne 0x13a8e
movq 0x20(%rax), %rcx
cmpq %rdx, %rcx
je 0x13ac6
movq 0x28(%rsi), %rax
movq 0x18(%rax), %rcx
cmpq %rsi, %rcx
jne 0x13aa4
movq 0x20(%rax), %rcx
cmpq %rdx, %rcx
je 0x13ac6
movq 0x30(%rsi), %rcx
movq 0x18(%rcx), %rdi
cmpq %rsi, %rdi
jne 0x13aba
movq 0x20(%rcx), %rdi
xorl %eax, %eax
cmpq %rdx, %rdi
cmoveq %rcx, %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::ShortestEdgeOnFace(gaps::R3MeshFace const*) const
R3MeshEdge *R3Mesh::
ShortestEdgeOnFace(const R3MeshFace *f) const
{
  // Return shortest of three edges on face
  R3MeshEdge *e0 = EdgeOnFace(f, 0);
  R3MeshEdge *e1 = EdgeOnFace(f, 1);
  R3MeshEdge *e2 = EdgeOnFace(f, 2);
  RNLength d0 = EdgeLength(e0);
  RNLength d1 = EdgeLength(e1);
  RNLength d2 = EdgeLength(e2);
  if (d0 < d1) {
    if (d0 < d2) return e0;
    else return e2;
  }
  else {
    if (d1 < d2) return e1;
    else return e2;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
movq 0x20(%rsi), %rbx
movq 0x28(%rsi), %r14
movq 0x30(%rsi), %r15
testb $0x2, 0x38(%rbx)
jne 0x13af8
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x2b8(%rax)
movsd 0x28(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
testb $0x2, 0x38(%r14)
jne 0x13b1a
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *0x2b8(%rax)
movsd 0x28(%r14), %xmm2
testb $0x2, 0x38(%r15)
jne 0x13b43
movq (%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movsd %xmm2, 0x8(%rsp)
callq *0x2b8(%rax)
movsd 0x8(%rsp), %xmm2
movsd 0x28(%r15), %xmm0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
cmovbeq %r15, %rbx
ucomisd %xmm2, %xmm0
cmovbeq %r15, %r14
ucomisd %xmm1, %xmm2
cmovaq %rbx, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::LongestEdgeOnFace(gaps::R3MeshFace const*) const
R3MeshEdge *R3Mesh::
LongestEdgeOnFace(const R3MeshFace *f) const
{
  // Return longest of three edges on face
  R3MeshEdge *e0 = EdgeOnFace(f, 0);
  R3MeshEdge *e1 = EdgeOnFace(f, 1);
  R3MeshEdge *e2 = EdgeOnFace(f, 2);
  RNLength d0 = EdgeLength(e0);
  RNLength d1 = EdgeLength(e1);
  RNLength d2 = EdgeLength(e2);
  if (d0 > d1) {
    if (d0 > d2) return e0;
    else return e2;
  }
  else {
    if (d1 > d2) return e1;
    else return e2;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r12
movq 0x20(%rsi), %rbx
movq 0x28(%rsi), %r14
movq 0x30(%rsi), %r15
testb $0x2, 0x38(%rbx)
jne 0x13ba6
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x2b8(%rax)
movsd 0x28(%rbx), %xmm0
movsd %xmm0, 0x10(%rsp)
testb $0x2, 0x38(%r14)
jne 0x13bc8
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *0x2b8(%rax)
movsd 0x28(%r14), %xmm2
testb $0x2, 0x38(%r15)
jne 0x13bf1
movq (%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movsd %xmm2, 0x8(%rsp)
callq *0x2b8(%rax)
movsd 0x8(%rsp), %xmm2
movsd 0x28(%r15), %xmm0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
cmovbeq %r15, %rbx
ucomisd %xmm0, %xmm2
cmovbeq %r15, %r14
ucomisd %xmm2, %xmm1
cmovaq %rbx, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FindConnectedVertices(gaps::R3MeshVertex*, gaps::RNArray<gaps::R3MeshVertex*>&)
void R3Mesh::
FindConnectedVertices(R3MeshVertex *seed, RNArray<R3MeshVertex *>& vertices)
{
  // Fill array with vertices in same connected component as seed
  R3mesh_mark++;
  RNArray<R3MeshVertex *> stack;
  stack.Insert(seed);
  SetVertexMark(seed, R3mesh_mark);
  while (!stack.IsEmpty()) {
    R3MeshVertex *vertex = stack.Tail();
    stack.RemoveTail();
    vertices.Insert(vertex);
    for (int i = 0; i < VertexValence(vertex); i++) {
      R3MeshEdge *edge = EdgeOnVertex(vertex, i);
      R3MeshVertex *neighbor = VertexAcrossEdge(edge, vertex);
      if (VertexMark(neighbor) != R3mesh_mark) {
        SetVertexMark(neighbor, R3mesh_mark);
        stack.Insert(neighbor);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
incl 0xd1875(%rip)           # 0xe54b0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x705ec
movl 0xc(%r15), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70682
movl 0xd1853(%rip), %eax     # 0xe54b0
movl %eax, 0x88(%r14)
movl 0x14(%rsp), %eax
testl %eax, %eax
je 0x13ce9
leaq 0x8(%rsp), %r14
movq 0x8(%rsp), %rcx
movslq %eax, %rsi
movq -0x8(%rcx,%rsi,8), %r15
decl %esi
movq %r14, %rdi
callq 0x707f6
movl 0xc(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x70682
cmpl $0x0, 0x14(%r15)
jle 0x13ce1
xorl %r12d, %r12d
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rsi
cmpq %r15, %rsi
jne 0x13cb5
movq 0x10(%rax), %rsi
movl 0xd17f5(%rip), %eax     # 0xe54b0
cmpl %eax, 0x88(%rsi)
je 0x13cd5
movl %eax, 0x88(%rsi)
movl 0x14(%rsp), %edx
movq %r14, %rdi
callq 0x70682
incq %r12
movslq 0x14(%r15), %rax
cmpq %rax, %r12
jl 0x13ca0
movl 0x14(%rsp), %eax
testl %eax, %eax
jne 0x13c71
leaq 0x8(%rsp), %rdi
callq 0x70656
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x13d03
jmp 0x13d03
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FindConnectedFaces(gaps::R3MeshFace*, gaps::RNArray<gaps::R3MeshFace*>&)
void R3Mesh::
FindConnectedFaces(R3MeshFace *seed, RNArray<R3MeshFace *>& faces)
{
  // Fill array with faces in same connected component as seed
  R3mesh_mark++;
  RNArray<R3MeshFace *> stack;
  stack.Insert(seed);
  while (!stack.IsEmpty()) {
    R3MeshFace *face = stack.Tail();
    stack.RemoveTail();
    if (FaceMark(face) != R3mesh_mark) {
      faces.Insert(face);
      if (FaceOnFace(face, 0)) stack.Insert(FaceOnFace(face, 0));
      if (FaceOnFace(face, 1)) stack.Insert(FaceOnFace(face, 1));
      if (FaceOnFace(face, 2)) stack.Insert(FaceOnFace(face, 2));
      SetFaceMark(face, R3mesh_mark);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
incl 0xd1783(%rip)           # 0xe54b0
movq %rsp, %r15
movq %r15, %rdi
callq 0x705ec
movl 0xc(%r15), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x70682
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x13e30
movq %rsp, %r14
movq (%rsp), %rcx
movslq %eax, %rsi
movq -0x8(%rcx,%rsi,8), %r15
decl %esi
movq %r14, %rdi
callq 0x707f6
movl 0xb8(%r15), %eax
cmpl 0xd1737(%rip), %eax     # 0xe54b0
je 0x13e24
movl 0xc(%rbx), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x70682
movq 0x20(%r15), %rax
movq 0x18(%rax), %rsi
movq %rsi, %rcx
cmpq %r15, %rsi
jne 0x13da1
movq 0x20(%rax), %rcx
testq %rcx, %rcx
je 0x13dbb
cmpq %r15, %rsi
jne 0x13daf
movq 0x20(%rax), %rsi
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x70682
movq 0x28(%r15), %rax
movq 0x18(%rax), %rsi
movq %rsi, %rcx
cmpq %r15, %rsi
jne 0x13dcf
movq 0x20(%rax), %rcx
testq %rcx, %rcx
je 0x13de9
cmpq %r15, %rsi
jne 0x13ddd
movq 0x20(%rax), %rsi
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x70682
movq 0x30(%r15), %rax
movq 0x18(%rax), %rsi
movq %rsi, %rcx
cmpq %r15, %rsi
jne 0x13dfd
movq 0x20(%rax), %rcx
testq %rcx, %rcx
je 0x13e17
cmpq %r15, %rsi
jne 0x13e0b
movq 0x20(%rax), %rsi
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x70682
movl 0xd1693(%rip), %eax     # 0xe54b0
movl %eax, 0xb8(%r15)
movl 0xc(%rsp), %eax
testl %eax, %eax
jne 0x13d56
movq %rsp, %rdi
callq 0x70656
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x13e44
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x13e97
movq (%rbx), %rax
movq 0x28(%rbx), %rcx
movq (%rcx), %rsi
movq %rbx, %rdi
callq *0x70(%rax)
jmp 0x13e6f
movq (%rbx), %rax
movq 0x18(%rbx), %rcx
movq (%rcx), %rsi
movq %rbx, %rdi
callq *0x68(%rax)
cmpl $0x0, 0x24(%rbx)
jg 0x13e87
jmp 0x13eaf
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq (%rcx), %rsi
movq %rbx, %rdi
callq *0x60(%rax)
cmpl $0x0, 0x14(%rbx)
jg 0x13e9f
movq 0x38(%rbx), %r15
testq %r15, %r15
je 0x13f1c
leaq -0x8(%r15), %rax
movq %rax, (%rsp)
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x13f00
leaq -0x90(%r15), %r13
imulq $0x98, %r12, %rbp
leaq 0xcd81c(%rip), %r14     # 0xe1700
movq %r14, -0x98(%r15,%rbp)
movq %r13, %rdi
addq %rbp, %rdi
callq 0x70656
addq $-0x98, %rbp
jne 0x13ee4
imulq $0x98, %r12, %rsi
addq $0x8, %rsi
movq (%rsp), %rdi
callq 0xe8c0
movq $0x0, 0x38(%rbx)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x13f3f
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 0x13fa3
leaq -0x8(%r15), %rax
movq %rax, (%rsp)
movq -0x8(%r15), %r12
testq %r12, %r12
je 0x13f87
leaq -0x70(%r15), %r13
imulq $0xc8, %r12, %rbp
leaq 0xcd7d5(%rip), %r14     # 0xe1740
movq %r14, -0xc8(%r15,%rbp)
movq %r13, %rdi
addq %rbp, %rdi
callq 0x28348
addq $-0xc8, %rbp
jne 0x13f6b
imulq $0xc8, %r12, %rsi
addq $0x8, %rsi
movq (%rsp), %rdi
callq 0xe8c0
movq $0x0, 0x48(%rbx)
leaq 0x100(%rbx), %rdi
leaq 0xd1ee7(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3cd94
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 0x3cd94
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd1979(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3cd94
leaq 0x118(%rbx), %rdi
addq $0x20, %r14
movq %r14, %rsi
callq 0x3cd94
cmpl $0x0, 0x14(%rbx)
jle 0x145f0
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 0x12ce6
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
callq 0x72630
movsd %xmm0, 0x18(%rsp)
callq 0x72630
movsd %xmm0, 0x10(%rsp)
callq 0x72630
movapd %xmm0, %xmm2
movq %r15, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
callq 0x3d4be
movq %r12, %rdi
movq %r15, %rsi
movsd 0x20(%rsp), %xmm0
callq 0x3de8e
leaq 0x18(%r13), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3ce0e
andb $-0x3, 0x78(%r13)
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x27f0e
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1455d
movslq 0x24(%rbx), %rax
testq %rax, %rax
jle 0x14610
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x145ff
movslq 0x34(%rbx), %rax
testq %rax, %rax
jle 0x14633
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1461f
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_O1/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 0xd1825(%rip), %r14     # 0xe5e98
leaq 0x8(%r14), %rsi
callq 0x3cd94
leaq 0x118(%rbx), %rdi
addq $0x20, %r14
movq %r14, %rsi
callq 0x3cd94
cmpl $0x0, 0x14(%rbx)
jle 0x1473d
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 0x12ce6
testb $0x2, 0x78(%r13)
jne 0x146e5
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 0x3d4ce
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3de8e
leaq 0x18(%r13), %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3ce0e
andb $-0x3, 0x78(%r13)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x27f0e
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x146b2
movslq 0x24(%rbx), %rax
testq %rax, %rax
jle 0x1475d
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1474c
movslq 0x34(%rbx), %rax
testq %rax, %rax
jle 0x14780
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x1476c
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_O1/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 0xd16dd(%rip), %r15     # 0xe5e98
leaq 0x8(%r15), %rsi
callq 0x3cd94
leaq 0x118(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x3cd94
cmpl $0x0, 0x14(%rbx)
jle 0x14819
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 0x3d342
andb $-0x3, 0x78(%rbp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x27f0e
incq %r13
movslq 0x14(%rbx), %rax
cmpq %rax, %r13
jl 0x147e7
movslq 0x24(%rbx), %rax
testq %rax, %rax
jle 0x14839
movq 0x18(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0x3, 0x38(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x14828
movslq 0x34(%rbx), %rax
testq %rax, %rax
jle 0x1485c
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
andq $-0xd, 0xa8(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x14848
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_O1/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 0x148ab
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x23c38
orb $0x1, 0x78(%rbx)
leaq 0x18(%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13808
movsd 0x30(%r15), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x148ec
jp 0x148ec
movsd 0x38(%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x148ec
jp 0x148ec
movsd 0x40(%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x148ec
jnp 0x148fd
leaq 0x30(%r15), %rsi
leaq 0x30(%rbx), %rdi
callq 0x3dc6a
orb $0x2, 0x78(%rbx)
leaq 0x58(%r15), %rsi
leaq 0x58(%rbx), %rdi
callq 0x704f2
addq $0x48, %r15
leaq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x68f66
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70682
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_O1/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 0x14987
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x23c38
orb $0x1, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x13808
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70682
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_O1/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 0x14a07
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x23c38
orb $0x1, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x13808
movsd (%r15), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x14a46
jp 0x14a46
movsd 0x8(%r15), %xmm1
ucomisd %xmm0, %xmm1
jne 0x14a46
jp 0x14a46
movsd 0x10(%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x14a46
jnp 0x14a56
leaq 0x30(%rbx), %rdi
movq %r15, %rsi
callq 0x3dc6a
orb $0x2, 0x78(%rbx)
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70682
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_O1/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 0x14ad3
movl $0x98, %edi
callq 0xe440
movq %rax, %rbx
movq %rax, %rdi
callq 0x23c38
orb $0x1, 0x78(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x13808
movsd (%r12), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x14b15
jp 0x14b15
movsd 0x8(%r12), %xmm1
ucomisd %xmm0, %xmm1
jne 0x14b15
jp 0x14b15
movsd 0x10(%r12), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x14b15
jnp 0x14b25
leaq 0x30(%rbx), %rdi
movq %r12, %rsi
callq 0x3dc6a
orb $0x2, 0x78(%rbx)
leaq 0x58(%rbx), %rdi
movq %r15, %rsi
callq 0x704f2
movl 0x14(%r14), %edx
addq $0x8, %r14
movl %edx, 0x70(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70682
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_O1/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 0x14cc1
movl $0x58, %edi
callq 0xe440
movq %rax, %rbx
leaq 0xcca91(%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)
movups %xmm0, 0x38(%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 0x70682
movl 0x14(%r15), %edx
addq $0x8, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x70682
movl 0x24(%r14), %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x70682
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
cmpq %rdx, %rsi
je 0x14d6f
movslq 0x14(%r12), %rax
testq %rax, %rax
jle 0x14d6f
movq 0x8(%r12), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
cmpq %r15, 0x8(%rsi)
je 0x14d5c
cmpq %r15, 0x10(%rsi)
setne %dil
jmp 0x14d5e
xorl %edi, %edi
testb %dil, %dil
cmoveq %rsi, %rbp
je 0x14d71
incq %rdx
cmpq %rdx, %rax
jne 0x14d48
xorl %ebp, %ebp
testq %rbp, %rbp
jne 0x14d8b
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq *0x40(%rax)
movq %rax, %rbp
cmpq %r14, %r15
movq %rbx, (%rsp)
je 0x14dca
movslq 0x14(%r15), %rax
testq %rax, %rax
jle 0x14dca
movq 0x8(%r15), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
cmpq %r14, 0x8(%rsi)
je 0x14db7
cmpq %r14, 0x10(%rsi)
setne %dil
jmp 0x14db9
xorl %edi, %edi
testb %dil, %dil
cmoveq %rsi, %rbx
je 0x14dcc
incq %rdx
cmpq %rdx, %rax
jne 0x14da3
xorl %ebx, %ebx
testq %rbx, %rbx
jne 0x14de6
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 0x14e22
movslq 0x14(%r14), %rcx
testq %rcx, %rcx
jle 0x14e22
movq 0x8(%r14), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
cmpq %r12, 0x8(%rdi)
je 0x14e0e
cmpq %r12, 0x10(%rdi)
setne %r8b
jmp 0x14e11
xorl %r8d, %r8d
testb %r8b, %r8b
cmoveq %rdi, %rax
je 0x14e24
incq %rsi
cmpq %rsi, %rcx
jne 0x14dfa
xorl %eax, %eax
testq %rax, %rax
jne 0x14e3b
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_O1/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 0x14ea5
movq 0x8(%rax), %rsi
movq 0x8(%r8), %rcx
cmpq %rcx, %rsi
je 0x14ea7
movq 0x10(%r8), %rdx
cmpq %rdx, %rsi
je 0x14ea7
movq 0x10(%rax), %r11
xorl %esi, %esi
cmpq %rdx, %r11
cmoveq %r11, %rsi
cmpq %rcx, %r11
cmoveq %r11, %rsi
jmp 0x14ea7
xorl %esi, %esi
pushq %r14
pushq %rbx
pushq %rax
cmpq %r9, %r8
je 0x14edc
movq 0x8(%r8), %rdx
movq 0x8(%r9), %rcx
cmpq %rcx, %rdx
je 0x14ede
movq 0x10(%r9), %r11
cmpq %r11, %rdx
je 0x14ede
movq 0x10(%r8), %rbx
xorl %edx, %edx
cmpq %r11, %rbx
cmoveq %rbx, %rdx
cmpq %rcx, %rbx
cmoveq %rbx, %rdx
jmp 0x14ede
xorl %edx, %edx
cmpq %rax, %r9
je 0x14f0f
movq 0x8(%r9), %rcx
movq 0x8(%rax), %r11
cmpq %r11, %rcx
je 0x14f11
movq 0x10(%rax), %rbx
cmpq %rbx, %rcx
je 0x14f11
movq 0x10(%r9), %r14
xorl %ecx, %ecx
cmpq %rbx, %r14
cmoveq %r14, %rcx
cmpq %r11, %r14
cmoveq %r14, %rcx
jmp 0x14f11
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_O1/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 0x707f6
movl $0xffffffff, 0x70(%rbx) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x150d0
movq 0x78(%rbx), %rax
andl $0x1, %eax
je 0x150d0
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_O1/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 0x707f6
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x15134
movq 0x38(%rbx), %rax
andl $0x1, %eax
je 0x15134
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_O1/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 0x707f6
movl $0xffffffff, 0xa4(%rbx) # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x151a4
movq 0xa8(%rbx), %rax
andl $0x1, %eax
je 0x151a4
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_O1/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 0x705f4
cmpl $0x0, 0xc(%r15)
jle 0x151f2
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 0x151d4
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x298(%rax)
movq %rsp, %rdi
callq 0x70656
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x15215
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/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 0x15248
movq (%r14), %rax
movq %r14, %rdi
callq *0x70(%rax)
movq 0x20(%rbx), %rsi
testq %rsi, %rsi
je 0x1525a
movq (%r14), %rax
movq %r14, %rdi
callq *0x70(%rax)
movq 0x8(%rbx), %r12
leaq 0x8(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x70664
subq 0x8(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0x707f6
movq 0x10(%rbx), %r12
leaq 0x8(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x70664
subq 0x8(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0x707f6
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_O1/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 0x152d8
movq $0x0, 0x18(%rax)
movq 0x20(%rsi), %rax
cmpq %rsi, 0x20(%rax)
jne 0x152ea
movq $0x0, 0x20(%rax)
movq 0x28(%rsi), %rax
cmpq %rsi, 0x18(%rax)
jne 0x152fc
movq $0x0, 0x18(%rax)
movq 0x28(%rsi), %rax
cmpq %rsi, 0x20(%rax)
jne 0x1530e
movq $0x0, 0x20(%rax)
movq 0x30(%rsi), %rax
cmpq %rsi, 0x18(%rax)
jne 0x15320
movq $0x0, 0x18(%rax)
movq 0x30(%rsi), %rax
cmpq %rsi, 0x20(%rax)
jne 0x15332
movq $0x0, 0x20(%rax)
movq (%rdi), %rax
movq 0x2a8(%rax), %rax
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O1/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 0x705ec
cmpl $0x0, 0x14(%rbx)
jle 0x15384
xorl %r15d, %r15d
movq %rsp, %r14
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rsi
cmpl $0x0, 0x14(%rsi)
jne 0x15378
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x70682
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x1535e
cmpl $0x0, 0xc(%rsp)
jle 0x153ac
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 0x1538e
movq %rsp, %rdi
callq 0x70656
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x153c0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x705ec
cmpl $0x0, 0x24(%rbx)
jle 0x15422
xorl %r15d, %r15d
movq %rsp, %r14
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rsi
cmpq $0x0, 0x18(%rsi)
jne 0x15416
cmpq $0x0, 0x20(%rsi)
jne 0x15416
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x70682
incq %r15
movslq 0x24(%rbx), %rax
cmpq %rax, %r15
jl 0x153f4
cmpl $0x0, 0xc(%rsp)
jle 0x1544a
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 0x1542c
movq %rsp, %rdi
callq 0x70656
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1545e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x70656
movq %rbx, %rdi
callq 0xe7e0
nop