LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::InvalidateGLBufferObjects()
void R3Mesh::
InvalidateGLBufferObjects(void)
{
  // Delete face buffers
  if (vbo_face_position_buffer > 0) glDeleteBuffers(1, &vbo_face_position_buffer);
  if (vbo_face_normal_buffer > 0) glDeleteBuffers(1, &vbo_face_normal_buffer);
  if (vbo_face_texcoord_buffer > 0) glDeleteBuffers(1, &vbo_face_texcoord_buffer);
  if (vbo_face_rgb_color_buffer > 0) glDeleteBuffers(1, &vbo_face_rgb_color_buffer);
  if (vbo_face_pick_color_buffer > 0) glDeleteBuffers(1, &vbo_face_pick_color_buffer);

  // Delete vertex buffers
  if (vbo_vertex_position_buffer > 0) glDeleteBuffers(1, &vbo_vertex_position_buffer);
  if (vbo_vertex_normal_buffer > 0) glDeleteBuffers(1, &vbo_vertex_normal_buffer);
  if (vbo_vertex_texcoord_buffer > 0) glDeleteBuffers(1, &vbo_vertex_texcoord_buffer);
  if (vbo_vertex_rgb_color_buffer > 0) glDeleteBuffers(1, &vbo_vertex_rgb_color_buffer);
  if (vbo_vertex_pick_color_buffer > 0) glDeleteBuffers(1, &vbo_vertex_pick_color_buffer);

  // Zero out face buffer identifiers
  vbo_face_position_buffer = 0;
  vbo_face_normal_buffer = 0;
  vbo_face_texcoord_buffer = 0;
  vbo_face_rgb_color_buffer = 0;
  vbo_face_pick_color_buffer = 0;

  // Zero out vertex buffer identifiers
  vbo_vertex_position_buffer = 0;
  vbo_vertex_normal_buffer = 0;
  vbo_vertex_texcoord_buffer = 0;
  vbo_vertex_rgb_color_buffer = 0;
  vbo_vertex_pick_color_buffer = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x50(%rdi), %rbx
cmpl $0x0, 0x50(%rdi)
je 0x19b3c
movq 0xcb49e(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
movq %rbx, %rsi
callq *(%rax)
cmpl $0x0, 0x54(%r14)
je 0x19b55
leaq 0x54(%r14), %rsi
movq 0xcb482(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x58(%r14)
je 0x19b6e
leaq 0x58(%r14), %rsi
movq 0xcb469(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x5c(%r14)
je 0x19b87
leaq 0x5c(%r14), %rsi
movq 0xcb450(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x60(%r14)
je 0x19ba0
leaq 0x60(%r14), %rsi
movq 0xcb437(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x64(%r14)
je 0x19bb9
leaq 0x64(%r14), %rsi
movq 0xcb41e(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x68(%r14)
je 0x19bd2
leaq 0x68(%r14), %rsi
movq 0xcb405(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x6c(%r14)
je 0x19beb
leaq 0x6c(%r14), %rsi
movq 0xcb3ec(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x70(%r14)
je 0x19c04
leaq 0x70(%r14), %rsi
movq 0xcb3d3(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x74(%r14)
je 0x19c20
addq $0x74, %r14
movq 0xcb3ba(%rip), %rax     # 0xe4fd0
movl $0x1, %edi
movq %r14, %rsi
callq *(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x20(%rbx)
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::DrawFace(gaps::R3MeshFace*) const
void R3Mesh::
DrawFace(R3MeshFace *f) const
{
  // Draw polygon
  R3BeginPolygon();
  R3LoadNormal(FaceNormal(f));
  R3LoadPoint(f->vertex[0]->position);
  R3LoadPoint(f->vertex[1]->position);
  R3LoadPoint(f->vertex[2]->position);
  R3EndPolygon();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x9, %edi
callq 0xe110
testb $0x4, 0xa8(%rbx)
jne 0x1a0ea
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x2c8(%rax)
leaq 0x38(%rbx), %rdi
callq 0xe6b0
movq 0x8(%rbx), %rdi
addq $0x18, %rdi
callq 0xe130
movq 0x10(%rbx), %rdi
addq $0x18, %rdi
callq 0xe130
movq 0x18(%rbx), %rdi
addq $0x18, %rdi
callq 0xe130
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe5d0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::Intersection(gaps::R3Ray const&, gaps::R3MeshIntersection*) const
R3MeshType R3Mesh::
Intersection(const R3Ray& ray, R3MeshIntersection *intersection) const
{
  // Initialize intersection variables
  R3MeshType type = R3_MESH_NULL_TYPE;
  if (intersection) {
    intersection->type = R3_MESH_NULL_TYPE;
    intersection->vertex = NULL;
    intersection->edge = NULL;
    intersection->face = NULL;
    intersection->t = RN_INFINITY;
  }

  // Check bounding box for intersection 
  if (R3Intersects(ray, bbox)) {
    // Check each face to find closest intersection
    RNScalar min_t = FLT_MAX;
    for (int i = 0; i < faces.NEntries(); i++) {
      // Get ith face
      R3MeshFace *f = faces[i];

      // Get intersection with face
      R3MeshIntersection face_intersection;
      if (Intersection(ray, f, &face_intersection)) {
        if (face_intersection.t < min_t) {
          if (intersection) *intersection = face_intersection;
          type = face_intersection.type;
          min_t = face_intersection.t;
        }
      }
    }
  }

  // Return intersection type
  return type;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rdx, %rdx
je 0x1a167
movl $0x0, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
leaq 0xcba4a(%rip), %rax     # 0xe5ba8
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rbx)
leaq 0xf8(%r15), %rsi
xorl %r13d, %r13d
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x433c5
testl %eax, %eax
je 0x1a23c
cmpl $0x0, 0x34(%r15)
jle 0x1a23c
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rsp)
movsd 0x87e9c(%rip), %xmm0    # 0xa2040
movsd %xmm0, 0x8(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x28(%r15), %rax
movq (%rax,%r12,8), %rbp
leaq 0x38(%rsp), %rdi
callq 0x3c530
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
leaq 0x18(%rsp), %rcx
callq *0x178(%rax)
testl %eax, %eax
je 0x1a22c
movsd 0x50(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1a22c
testq %rbx, %rbx
je 0x1a221
movups 0x18(%rsp), %xmm0
movupd 0x28(%rsp), %xmm1
movupd %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3c89a
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x38(%rbx)
movl 0x18(%rsp), %r13d
movsd %xmm0, 0x8(%rsp)
incq %r12
movslq 0x34(%r15), %rax
cmpq %rax, %r12
jl 0x1a1b0
movl %r13d, %eax
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::ClosestPoint(gaps::R3Point const&, gaps::R3MeshIntersection*) const
R3Point R3Mesh::
ClosestPoint(const R3Point& point, R3MeshIntersection *closest_point) const
{
  // Check each face to find closest point
  R3Point closest_position = R3zero_point;
  RNScalar closest_distance_squared = FLT_MAX;
  for (int i = 0; i < faces.NEntries(); i++) {
    R3MeshFace *f = faces[i];
    R3MeshIntersection intersection;
    R3Point position = ClosestPointOnFace(f, point, (closest_point) ? &intersection : NULL);
    RNLength distance_squared = R3SquaredDistance(position, point);
    if (distance_squared < closest_distance_squared) {
      if (closest_point) *closest_point = intersection;
      closest_distance_squared = distance_squared;
      closest_position = position;
    }
  }

  // Return closest position on mesh
  return closest_position;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
leaq 0x4cbffc(%rip), %rsi    # 0x4e6a60
movq %rdi, (%rsp)
callq 0x3c542
cmpl $0x0, 0x34(%r12)
jle 0x1ab41
testq %rbx, %rbx
leaq 0x20(%rsp), %rax
cmoveq %rbx, %rax
movq %rax, 0x18(%rsp)
leaq 0x20(%rbx), %rax
movq %rax, 0x10(%rsp)
movsd 0x875a5(%rip), %xmm0    # 0xa2040
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
leaq 0x60(%rsp), %r15
movq 0x28(%r12), %rax
movq (%rax,%rbp,8), %r13
leaq 0x40(%rsp), %rdi
callq 0x3c530
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq 0x18(%rsp), %r8
callq 0x1a76a
movq %r15, %rdi
movq %r14, %rsi
callq 0x493db
movapd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1ab30
movsd %xmm1, 0x8(%rsp)
testq %rbx, %rbx
je 0x1ab24
movups 0x20(%rsp), %xmm0
movupd 0x30(%rsp), %xmm1
movupd %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x3c89a
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x38(%rbx)
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x3c89a
incq %rbp
movslq 0x34(%r12), %rax
cmpq %rax, %rbp
jl 0x1aaa8
movq (%rsp), %rax
addq $0x78, %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::RandomPointOnFace(gaps::R3MeshFace const*) const
R3Point R3Mesh::
RandomPointOnFace(const R3MeshFace *face) const
{
  // Seed random number generator
  static RNBoolean seed = 0;
  if (!seed) { seed = 1; RNSeedRandomScalar(); }

  // Get vertex positions
  R3MeshVertex *v0 = VertexOnFace(face, 0);
  R3MeshVertex *v1 = VertexOnFace(face, 1);
  R3MeshVertex *v2 = VertexOnFace(face, 2);
  const R3Point& p0 = VertexPosition(v0);
  const R3Point& p1 = VertexPosition(v1);
  const R3Point& p2 = VertexPosition(v2);


  // Return random point on face
  RNScalar r1 = sqrt(RNRandomScalar());
  RNScalar r2 = RNRandomScalar();
  R3Point p = p0 * (1.0 - r1) + p1 * r1 * (1.0 - r2) + p2 * r1 * r2;
  return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %r14
movq %rdi, %rbx
cmpb $0x0, 0xcb0bf(%rip)     # 0xe5c30
jne 0x1ab83
movb $0x1, 0xcb0b6(%rip)     # 0xe5c30
xorpd %xmm0, %xmm0
callq 0x715a5
movq 0x8(%r14), %r12
movq 0x10(%r14), %r15
movq 0x18(%r14), %r14
addq $0x18, %r12
addq $0x18, %r15
addq $0x18, %r14
callq 0x715e8
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1abb0
sqrtsd %xmm0, %xmm0
jmp 0x1abb5
callq 0xe340
movsd %xmm0, (%rsp)
callq 0x715e8
movsd %xmm0, 0x8(%rsp)
movsd 0x8746b(%rip), %xmm0    # 0xa2038
subsd (%rsp), %xmm0
leaq 0x70(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x3cf76
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3cf76
movsd 0x87439(%rip), %xmm0    # 0xa2038
subsd 0x8(%rsp), %xmm0
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x3cf76
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x3cf30
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm0
callq 0x3cf76
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x3cf76
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3cf30
movq %rbx, %rax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3MeshVertexIsSaddleOrBoundary(gaps::R3Mesh const*, gaps::R3MeshVertex const*)
static RNBoolean
R3MeshVertexIsSaddleOrBoundary(const R3Mesh *mesh, const R3MeshVertex *vertex)
{
  // Return whether vertex is a saddle or boundary
  int nconvex = 0;
  int nconcave = 0;
  RNScalar angle_epsilon = 0.1;
  for (int i = 0; i < mesh->VertexValence(vertex); i++) {
    R3MeshEdge *e = mesh->EdgeOnVertex(vertex, i);
    if (!mesh->FaceOnEdge(e, 0)) return TRUE;
    if (!mesh->FaceOnEdge(e, 1)) return TRUE;
    RNAngle angle = mesh->EdgeInteriorAngle(e);
    if (RNIsGreater(angle, RN_PI, angle_epsilon)) nconcave++;
    else if (RNIsLess(angle, RN_PI, angle_epsilon)) nconvex++;
    if (nconvex * nconcave != 0) return TRUE;
  }

  // Not a saddle
  return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x14(%rsi)
jle 0x1c168
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8dee1(%rip), %rax     # 0xa9fc8
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
xorl %r15d, %r15d
xorl %r12d, %r12d
xorl %r13d, %r13d
movl $0x1, %ebp
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rsi
cmpq $0x0, 0x18(%rsi)
je 0x1c16a
cmpq $0x0, 0x20(%rsi)
je 0x1c16a
movq %r14, %rdi
callq 0x11f92
subsd (%rsp), %xmm0
xorl %eax, %eax
movsd 0x860fd(%rip), %xmm1    # 0xa2228
ucomisd %xmm1, %xmm0
seta %al
cmpnltpd %xmm0, %xmm1
movsd 0x860f1(%rip), %xmm2    # 0xa2230
cmpltpd %xmm2, %xmm0
andpd %xmm1, %xmm0
movd %xmm0, %ecx
subl %ecx, %r12d
sete %cl
addl %eax, %r13d
sete %al
orb %cl, %al
je 0x1c16a
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x1c0fe
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %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::CreateEllipsoid(gaps::R3Ellipsoid const&, double)
void R3Mesh::
CreateEllipsoid(const R3Ellipsoid& ellipsoid, RNLength vertex_spacing)
{
  // Get info
  R3Vector radii = ellipsoid.Radii();
  RNLength max_radius = radii[radii.MaxDimension()];
  if (RNIsZero(max_radius)) return ;
  R3Triad axes = ellipsoid.CoordSystem().Axes();
  int saved_nvertices = NVertices();
  
  // Create mesh elements for a sphere of suitable radius
  R3Sphere sphere(R3zero_point, max_radius);
  CreateSphere(sphere, vertex_spacing);

  // Map vertices from unit sphere to ellipsoid
  for (int i = saved_nvertices; i < NVertices(); i++) {
    R3MeshVertex *v = Vertex(i);
    R3Vector p = VertexPosition(v).Vector();
    R3Point position = ellipsoid.Center();
    position += p[0]*(radii[0]/max_radius)*axes[0];
    position += p[1]*(radii[1]/max_radius)*axes[1];
    position += p[2]*(radii[2]/max_radius)*axes[2];
    SetVertexPosition(v, position);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
addq $0x68, %rsi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3cfd6
movq %r15, %rdi
callq 0x3d14e
cltq
movsd 0x18(%rsp,%rax,8), %xmm2
leaq 0xc7b67(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm0
movapd 0x83fe3(%rip), %xmm1    # 0xa2020
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jb 0x1e051
ucomisd %xmm2, %xmm0
jae 0x1e18d
leaq 0x20(%rbx), %rsi
leaq 0x70(%rsp), %rdi
movsd %xmm2, 0x8(%rsp)
callq 0x2ab46
movslq 0x14(%r14), %r12
leaq 0x4c89f0(%rip), %rsi    # 0x4e6a60
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x26eba
movq %r14, %rdi
movq %r15, %rsi
movsd 0x10(%rsp), %xmm0
callq 0x1dc06
cmpl 0x14(%r14), %r12d
jge 0x1e183
addq $0x8, %rbx
leaq 0xd0(%rsp), %rbp
leaq 0xb8(%rsp), %r15
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %r13
movsd 0x18(%r13), %xmm0
movsd 0x20(%r13), %xmm1
movsd 0x28(%r13), %xmm2
leaq 0x30(%rsp), %rdi
callq 0x3cfc6
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x3c542
movsd 0x18(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x30(%rsp), %xmm0
movq %r15, %rdi
leaq 0x70(%rsp), %rsi
callq 0x3d962
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3c914
movsd 0x20(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
movq %r15, %rdi
leaq 0x88(%rsp), %rsi
callq 0x3d962
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3c914
movsd 0x28(%rsp), %xmm0
divsd 0x8(%rsp), %xmm0
mulsd 0x40(%rsp), %xmm0
movq %r15, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3d962
movq %rbp, %rdi
movq %r15, %rsi
callq 0x3c914
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x13858
incq %r12
movslq 0x14(%r14), %rax
cmpq %rax, %r12
jl 0x1e0b2
leaq 0x48(%rsp), %rdi
callq 0x280f4
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1e1a9
jmp 0x1e1a9
jmp 0x1e1a9
jmp 0x1e1a9
jmp 0x1e1a9
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x280f4
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::ReadPlyFile(char const*)
int R3Mesh::
ReadPlyFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open file: %s", filename);
    return 0;
  }

  // Read file
  if (!ReadPlyStream(fp)) return 0;
  
  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8286f(%rip), %rsi     # 0xa25ab
movq %rbx, %rdi
callq 0xe530
testq %rax, %rax
je 0x1fd6e
movq %rax, %r14
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x210(%rax)
testl %eax, %eax
je 0x1fd83
movq %r14, %rdi
callq 0xe430
movl $0x1, %ebp
jmp 0x1fd85
leaq 0x82839(%rip), %rdi     # 0xa25ae
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x719d2
jmp 0x1fd85
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::WriteFile(char const*) const
int R3Mesh::
WriteFile(const char *filename) const
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .ply)", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strncmp(extension, ".ray", 4)) 
    return WriteRayFile(filename);
  else if (!strncmp(extension, ".ply", 4)) 
    return WritePlyFile(filename);
  else if (!strncmp(extension, ".obj", 4)) 
    return WriteObjFile(filename);
  else if (!strncmp(extension, ".off", 4)) 
    return WriteOffFile(filename);
  else if (!strncmp(extension, ".cat", 4)) 
    return WriteCattFile(filename);
  else if (!strncmp(extension, ".ifs", 4)) 
    return WriteIfsFile(filename);
  else if (!strncmp(extension, ".stl", 4)) 
    return WriteSTLFile(filename);
  else {
    RNFail("Unable to write file %s (unrecognized extension: %s)", filename, extension);
    return 0;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0xe4c0
testq %rax, %rax
je 0x22528
movq %rax, %r15
leaq 0x7ff12(%rip), %rsi     # 0xa2367
movl $0x4, %edx
movq %rax, %rdi
callq 0xe210
testl %eax, %eax
je 0x22541
leaq 0x7fefb(%rip), %rsi     # 0xa236c
movl $0x4, %edx
movq %r15, %rdi
callq 0xe210
testl %eax, %eax
je 0x2254d
leaq 0x7fed0(%rip), %rsi     # 0xa235d
movl $0x4, %edx
movq %r15, %rdi
callq 0xe210
testl %eax, %eax
je 0x22569
leaq 0x7feb9(%rip), %rsi     # 0xa2362
movl $0x4, %edx
movq %r15, %rdi
callq 0xe210
testl %eax, %eax
je 0x22575
leaq 0x7feac(%rip), %rsi     # 0xa2371
movl $0x4, %edx
movq %r15, %rdi
callq 0xe210
testl %eax, %eax
je 0x22581
leaq 0x7fe95(%rip), %rsi     # 0xa2376
movl $0x4, %edx
movq %r15, %rdi
callq 0xe210
testl %eax, %eax
je 0x2258d
leaq 0x7fe7e(%rip), %rsi     # 0xa237b
movl $0x4, %edx
movq %r15, %rdi
callq 0xe210
testl %eax, %eax
je 0x22599
leaq 0x8046c(%rip), %rdi     # 0xa2985
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x719d2
jmp 0x22539
leaq 0x8042c(%rip), %rdi     # 0xa295b
movq %rbx, %rsi
xorl %eax, %eax
callq 0xe070
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq (%r14), %rax
movq 0x1d8(%rax), %rax
jmp 0x225a3
movq (%r14), %rax
movq 0x1e0(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
movq (%r14), %rax
movq 0x1e8(%rax), %rax
jmp 0x225a3
movq (%r14), %rax
movq 0x1f0(%rax), %rax
jmp 0x225a3
movq (%r14), %rax
movq 0x1f8(%rax), %rax
jmp 0x225a3
movq (%r14), %rax
movq 0x200(%rax), %rax
jmp 0x225a3
movq (%r14), %rax
movq 0x208(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::WriteRayFile(char const*) const
int R3Mesh::
WriteRayFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "w"))) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Write vertices
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    const R3Point& p = VertexPosition(vertex);
    const R3Vector& n = VertexNormal(vertex);
    fprintf(fp, "#vertex %g %g %g %g %g %g 0 0\n", p.X(), p.Y(), p.Z(), n.X(), n.Y(), n.Z());
  }

  // Write Faces
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    R3MeshVertex *v0 = VertexOnFace(face, 0);
    R3MeshVertex *v1 = VertexOnFace(face, 1);
    R3MeshVertex *v2 = VertexOnFace(face, 2);
    int m = FaceMaterial(face);
    fprintf(fp, "#shape_triangle %d %d %d %d\n", m, v0->id, v1->id, v2->id);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x851f3(%rip), %rsi     # 0xa77b9
movq %r15, %rdi
callq 0xe530
testq %rax, %rax
je 0x226a9
movq %rax, %r14
cmpl $0x0, 0x14(%rbx)
jle 0x2264c
xorl %r13d, %r13d
leaq 0x803d0(%rip), %r15     # 0xa29ba
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %r12
testb $0x2, 0x78(%r12)
jne 0x22609
movq (%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
callq *0x2b0(%rax)
movsd 0x18(%r12), %xmm0
movsd 0x20(%r12), %xmm1
movsd 0x28(%r12), %xmm2
movsd 0x30(%r12), %xmm3
movsd 0x38(%r12), %xmm4
movsd 0x40(%r12), %xmm5
movq %r14, %rdi
movq %r15, %rsi
movb $0x6, %al
callq 0xe670
incq %r13
movslq 0x14(%rbx), %rax
cmpq %rax, %r13
jl 0x225ea
cmpl $0x0, 0x34(%rbx)
jle 0x2269a
leaq 0x80380(%rip), %r15     # 0xa29d9
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdi
movl 0x98(%rax), %edx
movl 0x70(%rcx), %ecx
movl 0x70(%rsi), %r8d
movl 0x70(%rdi), %r9d
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe670
incq %r12
movslq 0x34(%rbx), %rax
cmpq %rax, %r12
jl 0x2265c
movq %r14, %rdi
callq 0xe430
movl $0x1, %ebx
jmp 0x226bc
leaq 0x7fd0a(%rip), %rdi     # 0xa23ba
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x719d2
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::WritePlyFile(char const*, int) const
int R3Mesh::
WritePlyFile(const char *filename, RNBoolean binary)  const
{
  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open file: %s", filename);
    return 0;
  }

  // Write file
  if (!WritePlyStream(fp, binary)) return 0;
  
  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
leaq 0x850da(%rip), %rsi     # 0xa77b9
movq %r15, %rdi
callq 0xe530
testq %rax, %rax
je 0x22714
movq %rax, %r14
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq *0x218(%rax)
testl %eax, %eax
je 0x22729
movq %r14, %rdi
callq 0xe430
movl $0x1, %ebx
jmp 0x2272b
leaq 0x7fe93(%rip), %rdi     # 0xa25ae
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x719d2
jmp 0x2272b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::WriteOffFile(char const*) const
int R3Mesh::
WriteOffFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "w"))) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Write header
  fprintf(fp, "OFF\n");
  fprintf(fp, "%d %d %d\n", NVertices(), NFaces(), NEdges());

  // Write vertices
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    const R3Point& p = VertexPosition(vertex);
    fprintf(fp, "%g %g %g\n", p.X(), p.Y(), p.Z());
  }

  // Write Faces
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    R3MeshVertex *v0 = VertexOnFace(face, 0);
    R3MeshVertex *v1 = VertexOnFace(face, 1);
    R3MeshVertex *v2 = VertexOnFace(face, 2);
    fprintf(fp, "3 %d %d %d\n", v0->id, v1->id, v2->id);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x84a16(%rip), %rsi     # 0xa77b9
movq %r15, %rdi
callq 0xe530
testq %rax, %rax
je 0x22e81
movq %rax, %r14
leaq 0x7fc6f(%rip), %rdi     # 0xa2a2d
movl $0x4, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0xe8b0
movl 0x34(%rbx), %ecx
movl 0x14(%rbx), %edx
movl 0x24(%rbx), %r8d
leaq 0x7fc53(%rip), %rsi     # 0xa2a34
movq %r14, %rdi
xorl %eax, %eax
callq 0xe670
cmpl $0x0, 0x14(%rbx)
jle 0x22e2b
xorl %r12d, %r12d
leaq 0x7fc52(%rip), %r15     # 0xa2a4d
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rax
movsd 0x18(%rax), %xmm0
movsd 0x20(%rax), %xmm1
movsd 0x28(%rax), %xmm2
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0xe670
incq %r12
movslq 0x14(%rbx), %rax
cmpq %rax, %r12
jl 0x22dfb
cmpl $0x0, 0x34(%rbx)
jle 0x22e72
leaq 0x7fbfa(%rip), %r15     # 0xa2a32
xorl %r12d, %r12d
movq 0x28(%rbx), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rax
movl 0x70(%rcx), %edx
movl 0x70(%rsi), %ecx
movl 0x70(%rax), %r8d
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xe670
incq %r12
movslq 0x34(%rbx), %rax
cmpq %rax, %r12
jl 0x22e3b
movq %r14, %rdi
callq 0xe430
movl $0x1, %ebx
jmp 0x22e94
leaq 0x7f532(%rip), %rdi     # 0xa23ba
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x719d2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::WriteCattFile(char const*) const
int R3Mesh::
WriteCattFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "w"))) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Write vertex header
  fprintf(fp, "%%CORNERS\n\n");

  // Write vertices
  for (int i = 0; i < NVertices(); i++) {
    R3MeshVertex *vertex = Vertex(i);
    int id = VertexID(vertex);
    const R3Point& p = VertexPosition(vertex);
    fprintf(fp, "%d %g %g %g\n", id+1, p.X(), p.Y(), p.Z());
  }

  // Write face header
  fprintf(fp, "\n%%PLANES\n\n");

  // Write Faces
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    R3MeshVertex *v0 = VertexOnFace(face, 0);
    R3MeshVertex *v1 = VertexOnFace(face, 1);
    R3MeshVertex *v2 = VertexOnFace(face, 2);
    fprintf(fp, "%d / /RIGID\n%d %d %d\n\n", i, VertexID(v0) + 1, VertexID(v1) + 1, VertexID(v2) + 1);
  }

  // Write trailer
  fprintf(fp, "%%EOF\n");

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0x84902(%rip), %rsi     # 0xa77b9
movq %r15, %rdi
callq 0xe530
testq %rax, %rax
je 0x22fa7
movq %rax, %rbx
leaq 0x7fb6c(%rip), %rsi     # 0xa2a3e
movq %rax, %rdi
xorl %eax, %eax
callq 0xe670
cmpl $0x0, 0x14(%r14)
jle 0x22f22
xorl %r12d, %r12d
leaq 0x7fb5d(%rip), %r15     # 0xa2a4a
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rax
movl 0x70(%rax), %edx
incl %edx
movsd 0x18(%rax), %xmm0
movsd 0x20(%rax), %xmm1
movsd 0x28(%rax), %xmm2
movq %rbx, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0xe670
incq %r12
movslq 0x14(%r14), %rax
cmpq %rax, %r12
jl 0x22eed
leaq 0x7fb2e(%rip), %rsi     # 0xa2a57
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe670
cmpl $0x0, 0x34(%r14)
jle 0x22f87
leaq 0x7fb22(%rip), %r15     # 0xa2a63
xorl %r12d, %r12d
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rax
movl 0x70(%rcx), %ecx
incl %ecx
movl 0x70(%rdx), %r8d
incl %r8d
movl 0x70(%rax), %r9d
incl %r9d
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0xe670
incq %r12
movslq 0x34(%r14), %rax
cmpq %rax, %r12
jl 0x22f44
leaq 0x7faec(%rip), %rsi     # 0xa2a7a
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe670
movq %rbx, %rdi
callq 0xe430
movl $0x1, %ebx
jmp 0x22fba
leaq 0x7f40c(%rip), %rdi     # 0xa23ba
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x719d2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::WriteSTLFile(char const*) const
int R3Mesh::
WriteSTLFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "w"))) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Write header
  fprintf(fp, "solid %s\n", filename);

  // Write Faces
  for (int i = 0; i < NFaces(); i++) {
    R3MeshFace *face = Face(i);
    const R3Vector& n = FaceNormal(face);
    fprintf(fp, "facet normal %g %g %g\n", n[0], n[1], n[2]);
    fprintf(fp, "  outer loop\n");
    for (int j = 0; j < 3; j++) {
      R3MeshVertex *vertex = VertexOnFace(face, j);
      const R3Point& p = VertexPosition(vertex);
      fprintf(fp, "   vertex %g %g %g\n", p[0], p[1], p[2]);
    }
    fprintf(fp, "  endloop\n");
    fprintf(fp, "endfacet\n");
  }

  // Write trailer
  fprintf(fp, "endsolid\n");

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0x845b5(%rip), %rsi     # 0xa77b9
movq %r15, %rdi
callq 0xe530
testq %rax, %rax
je 0x2333a
movq %rax, %rbx
leaq 0x7f86d(%rip), %rsi     # 0xa2a8c
movq %rax, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0xe670
cmpl $0x0, 0x34(%r14)
jle 0x23312
xorl %ebp, %ebp
leaq 0x7f87b(%rip), %r13     # 0xa2abb
movq 0x28(%r14), %rax
movq (%rax,%rbp,8), %r12
testb $0x4, 0xa8(%r12)
jne 0x23262
movq (%r14), %rax
movq %r14, %rdi
movq %r12, %rsi
callq *0x2c8(%rax)
movsd 0x38(%r12), %xmm0
movsd 0x40(%r12), %xmm1
movsd 0x48(%r12), %xmm2
movq %rbx, %rdi
leaq 0x7f815(%rip), %rsi     # 0xa2a96
movb $0x3, %al
callq 0xe670
movl $0x1, %r15d
movl $0xd, %esi
movl $0x1, %edx
leaq 0x7f80e(%rip), %rdi     # 0xa2aad
movq %rbx, %rcx
callq 0xe8b0
movq (%r12,%r15,8), %rax
movsd 0x18(%rax), %xmm0
movsd 0x20(%rax), %xmm1
movsd 0x28(%rax), %xmm2
movq %rbx, %rdi
movq %r13, %rsi
movb $0x3, %al
callq 0xe670
incq %r15
cmpq $0x4, %r15
jne 0x232a7
movl $0xa, %esi
movl $0x1, %edx
leaq 0x7f7ee(%rip), %rdi     # 0xa2acf
movq %rbx, %rcx
callq 0xe8b0
movl $0x9, %esi
movl $0x1, %edx
leaq 0x7f7e0(%rip), %rdi     # 0xa2ada
movq %rbx, %rcx
callq 0xe8b0
incq %rbp
movslq 0x34(%r14), %rax
cmpq %rax, %rbp
jl 0x23240
leaq 0x7f7cb(%rip), %rdi     # 0xa2ae4
movl $0x9, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0xe8b0
movq %rbx, %rdi
callq 0xe430
movl $0x1, %ebx
jmp 0x2334d
leaq 0x7f079(%rip), %rdi     # 0xa23ba
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x719d2
movl %ebx, %eax
addq $0x8, %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::UpdateVertexNormal(gaps::R3MeshVertex*) const
void R3Mesh::
UpdateVertexNormal(R3MeshVertex *v) const
{
  // Average face normals
  v->normal = R3zero_vector;
  for (int i = 0; i < v->edges.NEntries(); i++) {
    R3MeshEdge *e = v->edges[i];
    if (e->vertex[0] == v) {
      if (e->face[0]) 
        v->normal += FaceNormal(e->face[0]);
    }
    else {
      if (e->face[1]) 
        v->normal += FaceNormal(e->face[1]);
    }
  }
  v->normal.Normalize();

  // Update flags
  v->flags.Add(R3_MESH_VERTEX_NORMAL_UPTODATE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x30(%rsi), %r14
leaq 0x85350(%rip), %rsi     # 0xa86e0
movq %r14, %rdi
callq 0x3d752
cmpl $0x0, 0x14(%rbx)
jle 0x233f3
xorl %r13d, %r13d
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %rax
cmpq %rbx, 0x8(%rax)
je 0x233b5
movq 0x20(%rax), %r12
jmp 0x233b9
movq 0x18(%rax), %r12
testq %r12, %r12
je 0x233e7
testb $0x4, 0xa8(%r12)
jne 0x233d8
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
callq *0x2c8(%rax)
addq $0x38, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x3d984
incq %r13
movslq 0x14(%rbx), %rax
cmpq %rax, %r13
jl 0x233a1
movq %r14, %rdi
callq 0x3d2dc
orb $0x2, 0x78(%rbx)
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::UpdateFaceArea(gaps::R3MeshFace*) const
void R3Mesh::
UpdateFaceArea(R3MeshFace *f) const
{
  // Compute area of face
  R3Vector v1 = f->vertex[1]->position - f->vertex[0]->position;
  R3Vector v2 = f->vertex[2]->position - f->vertex[0]->position;
  R3Vector v3 = v1 % v2;
  f->area = 0.5 * v3.Length();

  // Update flags
  f->flags.Add(R3_MESH_FACE_AREA_UPTODATE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rsi
addq $0x18, %rsi
addq $0x18, %rdx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x3c78e
movq 0x8(%rbx), %rdx
movq 0x18(%rbx), %rsi
addq $0x18, %rsi
addq $0x18, %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3c78e
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3d8fa
movq %r12, %rdi
callq 0x3d0cc
mulsd 0x7eb99(%rip), %xmm0    # 0xa2030
movsd %xmm0, 0x90(%rbx)
orb $0x2, 0xa8(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::UpdateFaceBBox(gaps::R3MeshFace*) const
void R3Mesh::
UpdateFaceBBox(R3MeshFace *f) const
{
  // Update face bbox
  f->bbox = R3null_box;
  f->bbox.Union(f->vertex[0]->position);
  f->bbox.Union(f->vertex[1]->position);
  f->bbox.Union(f->vertex[2]->position);

  // Update flags
  f->flags.Add(R3_MESH_FACE_BBOX_UPTODATE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x58(%rsi), %r14
leaq 0x60(%rsi), %rdi
leaq 0xc2979(%rip), %r15     # 0xe5e98
leaq 0x8(%r15), %rsi
callq 0x3c89a
leaq 0x78(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x3c89a
movq 0x8(%rbx), %rsi
addq $0x18, %rsi
movq %r14, %rdi
callq 0x27cc6
movq 0x10(%rbx), %rsi
addq $0x18, %rsi
movq %r14, %rdi
callq 0x27cc6
movq 0x18(%rbx), %rsi
addq $0x18, %rsi
movq %r14, %rdi
callq 0x27cc6
orb $0x8, 0xa8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Distance(gaps::R3Mesh*, gaps::R3MeshVertex*, gaps::R3Point const&, gaps::R3MeshIntersection*)
RNLength
R3Distance(R3Mesh *mesh, R3MeshVertex *vertex, const R3Point& point, R3MeshIntersection* closest_point)
{
  // Compute squared distance from vertex to point
  const R3Point& vertex_position = mesh->VertexPosition(vertex);
  RNLength distance = R3Distance(point, vertex_position);

  // Fill in closest_point info
  if (closest_point) {
    closest_point->type = R3_MESH_VERTEX_TYPE;
    closest_point->vertex = vertex;
    closest_point->edge = NULL;
    closest_point->face = NULL;
    closest_point->point = vertex_position;
    closest_point->t = distance; 
  }

  // Return distance
  return distance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %rdi
movq %rsi, %r15
leaq 0x18(%rsi), %r14
movq %r14, %rsi
callq 0x49404
testq %rbx, %rbx
je 0x2362d
movl $0x1, (%rbx)
movq %r15, 0x8(%rbx)
leaq 0x20(%rbx), %rdi
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %r14, %rsi
callq 0x3c89a
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x38(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Distance(gaps::R3Mesh*, gaps::R3MeshEdge*, gaps::R3Point const&, gaps::R3MeshIntersection*)
RNLength 
R3Distance(R3Mesh *mesh, R3MeshEdge *edge, const R3Point& point, R3MeshIntersection* closest_point)
{
  // Compute distance from edge to point
  R3Span edge_span = mesh->EdgeSpan(edge);
  RNScalar distance = R3Distance(point, edge_span);

  // Fill in closest point info
  if (closest_point) {
    closest_point->edge = edge;
    closest_point->face = NULL;
    closest_point->t = distance; 
    RNScalar edge_t = edge_span.T(point);
    if (RNIsEqual(edge_t, 0)) {
      R3MeshVertex *vertex = mesh->VertexOnEdge(edge, 0);
      closest_point->type = R3_MESH_VERTEX_TYPE;
      closest_point->vertex = vertex;
      closest_point->point = mesh->VertexPosition(vertex);
    }
    else if (RNIsEqual(edge_t, edge_span.Length())) {
      R3MeshVertex *vertex = mesh->VertexOnEdge(edge, 1);
      closest_point->type = R3_MESH_VERTEX_TYPE;
      closest_point->vertex = vertex;
      closest_point->point = mesh->VertexPosition(vertex);
    }
    else {
      closest_point->type = R3_MESH_EDGE_TYPE;
      closest_point->vertex = NULL;
      closest_point->point = edge_span.Point(edge_t);
    }
  }

  // Return squared distance
  return distance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq 0x8(%rsi), %rsi
movq 0x10(%r14), %rdx
addq $0x18, %rsi
addq $0x18, %rdx
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x3b9b6
movq %r15, %rdi
movq %r12, %rsi
callq 0x494e6
testq %rbx, %rbx
je 0x23740
movq %r14, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
movsd %xmm0, 0x8(%rsp)
movsd %xmm0, 0x38(%rbx)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x3bc5c
leaq 0xc24f1(%rip), %rax     # 0xe5b98
movsd (%rax), %xmm1
movapd 0x7e96d(%rip), %xmm2    # 0xa2020
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x236de
ucomisd %xmm0, %xmm1
jb 0x236de
movq 0x8(%r14), %rsi
movl $0x1, (%rbx)
movq %rsi, 0x8(%rbx)
addq $0x18, %rsi
addq $0x20, %rbx
movq %rbx, %rdi
jmp 0x23735
movapd %xmm0, %xmm3
subsd 0x58(%rsp), %xmm3
leaq 0x20(%rbx), %r15
ucomisd %xmm2, %xmm3
jb 0x2370f
ucomisd %xmm3, %xmm1
jb 0x2370f
movq 0x10(%r14), %rsi
movl $0x1, (%rbx)
movq %rsi, 0x8(%rbx)
addq $0x18, %rsi
movq %r15, %rdi
jmp 0x23735
movl $0x2, (%rbx)
movq $0x0, 0x8(%rbx)
leaq 0x60(%rsp), %rbx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x3bb46
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3c89a
movsd 0x8(%rsp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Push(gaps::R3MeshEdge*)
void RNHeap<PtrType>::
Push(PtrType entry)
{
  // Allocate space for entry
  if (nentries == nallocated) {
    nallocated = (nallocated == 0) ? 1 : 2 * nallocated;
    PtrType *newentries = new PtrType [nallocated];
    for (int i = 0; i < nentries; i++) {
      newentries[i] = entries[i];
      if (entry_offset >= 0) *((PtrType **) ((unsigned char *) newentries[i] + entry_offset)) = &newentries[i];
      if (entry_callback) *((PtrType **) (*entry_callback)(newentries[i], callback_data)) = &newentries[i];
    }
    if (entries) delete [] entries;
    entries = newentries;
  }

  // Put entry into tail
  entries[nentries] = entry;

  // Update entry backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[nentries] + entry_offset)) = &entries[nentries];
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[nentries], callback_data)) = &entries[nentries];

  // Increment number of entries
  nentries++;

  // Bubble tail entry up to its rightful spot
  BubbleUp(nentries-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdi), %r14d
cmpl 0xc(%rdi), %r14d
jne 0x23c41
leal (%r14,%r14), %eax
testl %r14d, %r14d
movl $0x1, %ecx
cmovnel %eax, %ecx
movl %ecx, 0xc(%rbx)
movslq %ecx, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0xe030
movq %rax, %r12
testl %r14d, %r14d
jle 0x23c2b
xorl %r13d, %r13d
movq %r12, %rbp
movq (%rbx), %rax
movq (%rax,%r13,8), %rax
movq %rax, (%rbp)
movslq 0x14(%rbx), %rcx
testq %rcx, %rcx
js 0x23c02
movq %rbp, (%rax,%rcx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x23c1c
movq (%rbp), %rdi
movq 0x28(%rbx), %rsi
callq *%rax
movq %rbp, (%rax)
movl 0x8(%rbx), %r14d
incq %r13
movslq %r14d, %rax
addq $0x8, %rbp
cmpq %rax, %r13
jl 0x23bea
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x23c3c
callq 0xe5b0
movl 0x8(%rbx), %r14d
movq %r12, (%rbx)
jmp 0x23c44
movq (%rbx), %r12
movslq %r14d, %rax
movq %r15, (%r12,%rax,8)
movslq 0x14(%rbx), %rcx
testq %rcx, %rcx
js 0x23c62
movq (%rbx), %rdx
leaq (%rdx,%rax,8), %rdx
movq (%rdx), %rsi
movq %rdx, (%rsi,%rcx)
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x23c82
movq (%rbx), %rdx
movq 0x28(%rbx), %rsi
leaq (%rdx,%rax,8), %r14
movq (%r14), %rdi
callq *%rcx
movq %r14, (%rax)
movl 0x8(%rbx), %r14d
leal 0x1(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24f16
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Pop()
PtrType RNHeap<PtrType>::
Pop(void)
{
  // Check number of entries	
  if (nentries == 0) return NULL;

  // Get head entry
  PtrType result = entries[0];

  // Update deleted entry backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[0] + entry_offset)) = NULL;
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[0], callback_data)) = NULL;

  // Remove head entry, by copying tail over it
  entries[0] = entries[nentries-1];

  // Update new entry[0] backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[0] + entry_offset)) = &entries[0];
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[0], callback_data)) = &entries[0];

  // Decrement number of entries
  nentries--;

  // Bubble the head entry down to its rightful spot
  BubbleDown(0);

  // Return original head entry
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x23d3d
movq %rdi, %r14
movq (%rdi), %rdx
movq (%rdx), %rbx
movslq 0x14(%rdi), %rcx
testq %rcx, %rcx
js 0x23ccf
movq $0x0, (%rbx,%rcx)
movq (%r14), %rdx
movq 0x20(%r14), %r8
testq %r8, %r8
je 0x23cf4
movq (%rdx), %rdi
movq 0x28(%r14), %rsi
callq *%r8
movq $0x0, (%rax)
movq (%r14), %rdx
movl 0x8(%r14), %eax
movl 0x14(%r14), %ecx
movslq %eax, %rsi
movq -0x8(%rdx,%rsi,8), %rsi
movq %rsi, (%rdx)
testl %ecx, %ecx
js 0x23d0f
movq (%r14), %rdx
movq (%rdx), %rsi
movl %ecx, %ecx
movq %rdx, (%rsi,%rcx)
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0x23d2b
movq (%r14), %r15
movq 0x28(%r14), %rsi
movq (%r15), %rdi
callq *%rcx
movq %r15, (%rax)
movl 0x8(%r14), %eax
decl %eax
movl %eax, 0x8(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x25092
jmp 0x23d3f
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Remove(gaps::R3MeshEdge*)
void RNHeap<PtrType>::
Remove(PtrType entry)
{
  // Search for entry
  PtrType *entryp = NULL;
  if (entry_offset >= 0) entryp = *((PtrType **) ((unsigned char *) entry + entry_offset));
  if (entry_callback) entryp = *((PtrType **) (*entry_callback)(entry, callback_data));
  else {
    // Find entry in heap
    for (int i = 0; i < nentries; i++) {
      if (entries[i] == entry) {
        entryp = &entries[i];
        break;
      }
    }
  }

  // Move data into place
  if (!entryp) return;
  int index = entryp - entries;
  assert((0 <= index) && (index < nentries));

  // Update deleted entry backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[index] + entry_offset)) = NULL;
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[index], callback_data)) = NULL;

  // Remove entry, by copying tail over it
  entries[index] = entries[nentries-1];

  // Update new entry[0] backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[index] + entry_offset)) = &entries[index];
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[index], callback_data)) = &entries[index];

  // Decrement number of entries
  nentries--;

  // Bubble the entry down to its rightful spot
  BubbleDown(index);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x14(%rdi), %rax
testq %rax, %rax
js 0x23d5f
movq (%rsi,%rax), %r14
jmp 0x23d62
xorl %r14d, %r14d
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x23e24
movq 0x28(%rbx), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq *%rcx
movq (%rax), %r14
testq %r14, %r14
je 0x23e4e
movq (%rbx), %rcx
movl 0x14(%rbx), %eax
subq %rcx, %r14
shrq $0x3, %r14
testl %eax, %eax
js 0x23dac
movslq %r14d, %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, %edx
movq $0x0, (%rcx,%rdx)
movq (%rbx), %rcx
movq 0x20(%rbx), %rdx
movslq %r14d, %r15
testq %rdx, %rdx
je 0x23dcf
movq (%rcx,%r15,8), %rdi
movq 0x28(%rbx), %rsi
callq *%rdx
movq $0x0, (%rax)
movq (%rbx), %rcx
movl 0x14(%rbx), %eax
movslq 0x8(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rsi
movq %rsi, (%rcx,%r15,8)
testl %eax, %eax
js 0x23df0
movq (%rbx), %rcx
leaq (%rcx,%r15,8), %rcx
movq (%rcx), %rsi
movl %eax, %eax
movq %rcx, (%rsi,%rax)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x23e0f
movq (%rbx), %rcx
movq 0x28(%rbx), %rsi
leaq (%rcx,%r15,8), %r15
movq (%r15), %rdi
callq *%rax
movq %r15, (%rax)
movl 0x8(%rbx), %edx
decl %edx
movl %edx, 0x8(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x25092
movslq 0x8(%rbx), %rdx
testq %rdx, %rdx
jle 0x23d7e
movq (%rbx), %rcx
shlq $0x3, %rdx
xorl %edi, %edi
cmpq %rsi, (%rcx,%rdi)
je 0x23e54
addq $0x8, %rdi
cmpq %rdi, %rdx
jne 0x23e3a
jmp 0x23d7e
popq %rbx
popq %r14
popq %r15
retq
addq %rcx, %rdi
movq %rdi, %r14
jmp 0x23d8d
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Update(gaps::R3MeshEdge*)
void RNHeap<PtrType>::
Update(PtrType entry)
{
  // Search for entry
  PtrType *entryp = NULL;
  if (entry_offset >= 0) entryp = *((PtrType **) ((unsigned char *) entry + entry_offset));
  if (entry_callback) entryp = *((PtrType **) (*entry_callback)(entry, callback_data));
  else {
    // Find entry in heap
    for (int i = 0; i < nentries; i++) {
      if (entries[i] == entry) {
        entryp = &entries[i];
        break;
      }
    }
  }

  // Move data into place
  if (!entryp) return;
  int index = entryp - entries;
  assert((0 <= index) && (index < nentries));
  BubbleUp(BubbleDown(index));
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movslq 0x14(%rdi), %rcx
testq %rcx, %rcx
js 0x23e76
movq (%rax,%rcx), %rsi
jmp 0x23e78
xorl %esi, %esi
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x23eaf
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq *%rcx
movq (%rax), %rsi
testq %rsi, %rsi
je 0x23ed2
movq (%rbx), %rcx
subq %rcx, %rsi
shrq $0x3, %rsi
movq %rbx, %rdi
callq 0x25092
movq %rbx, %rdi
movl %eax, %esi
popq %rbx
jmp 0x24f16
movslq 0x8(%rbx), %rdx
testq %rdx, %rdx
jle 0x23e8d
movq (%rbx), %rcx
shlq $0x3, %rdx
xorl %edi, %edi
cmpq %rax, (%rcx,%rdi)
je 0x23ed4
addq $0x8, %rdi
cmpq %rdi, %rdx
jne 0x23ec1
jmp 0x23e8d
popq %rbx
retq
addq %rcx, %rdi
movq %rdi, %rsi
jmp 0x23e95
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3OrientedBox.h
// Function: gaps::R3OrientedBox::Corner(int) const
inline const R3Point R3OrientedBox::
Corner(RNOctant octant) const
{
    // Check if box is empty
    if (IsEmpty()) return R3zero_point;

    // Return corner position
    R3Point corner = Center();
    corner += (octant & RN_PNN_OCTANT) ? Radius(0)*Axis(0) : -Radius(0)*Axis(0);
    corner += (octant & RN_NPN_OCTANT) ? Radius(1)*Axis(1) : -Radius(1)*Axis(1);
    corner += (octant & RN_NNP_OCTANT) ? Radius(2)*Axis(2) : -Radius(2)*Axis(2);
    return corner;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x70(%rsi), %xmm0
movsd 0x78(%rsi), %xmm1
minsd 0x68(%rsi), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x246f4
movl %edx, %ebp
movq %rsi, %r14
addq $0x8, %rsi
movq %rbx, %rdi
callq 0x3c542
movsd 0x68(%r14), %xmm0
testb $0x4, %bpl
jne 0x2467a
xorps 0x7d9a6(%rip), %xmm0    # 0xa2020
leaq 0x20(%r14), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x3d962
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c914
movsd 0x70(%r14), %xmm0
testb $0x2, %bpl
jne 0x246a7
xorps 0x7d979(%rip), %xmm0    # 0xa2020
leaq 0x38(%r14), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x3d962
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c914
movsd 0x78(%r14), %xmm0
testb $0x1, %bpl
jne 0x246d5
xorpd 0x7d94b(%rip), %xmm0    # 0xa2020
addq $0x50, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x3d962
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c914
jmp 0x24703
leaq 0x4c2365(%rip), %rsi    # 0x4e6a60
movq %rbx, %rdi
callq 0x3c542
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop