LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EGINormalizationTransformation(int, int, int) const
R3Affine R3Mesh::
EGINormalizationTransformation(RNBoolean translate, RNBoolean rotate, int scale) const
{
  // Initialize transformation
  R3Affine affine(R3identity_affine);

  // Compute center of mass
  R3Point centroid = Centroid();

  // Translate center of mass back to original (if not translating)
  if (!translate) {
    affine.Translate(centroid.Vector());
  }

  // Scale by inverse of radius
  if ((scale != 0) && (scale != 2)) {
    RNScalar radius = AverageRadius(&centroid);
    if (RNIsPositive(radius)) affine.Scale(1.0 / radius);
  }

  // Rotate to align EGI axes with XYZ
  if (rotate) {
    R3Triad triad = EGIAxes();
    affine.Transform(R3Affine(triad.InverseMatrix()));
  }

  // Translate center of mass to origin
  affine.Translate(-(centroid.Vector()));
  
  // Return transformation
  return affine;
}

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x290(%rsp)
movq %rsi, 0x288(%rsp)
movl %edx, 0x284(%rsp)
movl %ecx, 0x280(%rsp)
movl %r8d, 0x27c(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0x20(%rsp)
movb $0x0, 0x27b(%rsp)
leaq 0x1621ca(%rip), %rsi    # 0x178950
callq 0x36c20
movq 0x20(%rsp), %rsi
leaq 0x260(%rsp), %rdi
callq 0x14e10
jmp 0x1679f
cmpl $0x0, 0x284(%rsp)
jne 0x167ef
leaq 0x238(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x36d10
jmp 0x167c0
movq 0x10(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x36cd0
jmp 0x167d4
jmp 0x167ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
jmp 0x1696e
cmpl $0x0, 0x27c(%rsp)
je 0x1687d
cmpl $0x2, 0x27c(%rsp)
je 0x1687d
movq 0x20(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x15130
movsd %xmm0, 0x8(%rsp)
jmp 0x16821
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x230(%rsp)
movsd 0x230(%rsp), %xmm0
leaq 0x161ca0(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
movl %eax, 0x4(%rsp)
jmp 0x1684f
movl 0x4(%rsp), %eax
cmpl $0x0, %eax
je 0x1687b
movq 0x10(%rsp), %rdi
movsd 0x230(%rsp), %xmm1
movsd 0x11c79a(%rip), %xmm0   # 0x133008
divsd %xmm1, %xmm0
callq 0x36d80
jmp 0x16879
jmp 0x1687b
jmp 0x1687d
cmpl $0x0, 0x280(%rsp)
je 0x1690f
movq 0x20(%rsp), %rsi
leaq 0x1e8(%rsp), %rdi
callq 0x16330
jmp 0x1689f
leaq 0x58(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x4efe0
jmp 0x168b3
leaq 0xd8(%rsp), %rdi
leaq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x4d390
jmp 0x168c9
movq 0x10(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x4d700
jmp 0x168dd
leaq 0xd8(%rsp), %rdi
callq 0x4d430
jmp 0x1690f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x258(%rsp)
movl %eax, 0x254(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x4d430
jmp 0x1696e
leaq 0x28(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x36d10
jmp 0x16923
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x70fa0
jmp 0x16934
movq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x36cd0
jmp 0x16945
movb $0x1, 0x27b(%rsp)
testb $0x1, 0x27b(%rsp)
jne 0x16961
movq 0x10(%rsp), %rdi
callq 0x4d430
movq 0x18(%rsp), %rax
addq $0x298, %rsp            # imm = 0x298
retq
movq 0x10(%rsp), %rdi
callq 0x4d430
movq 0x258(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::VertexArea(gaps::R3MeshVertex const*) const
RNArea R3Mesh::
VertexArea(const R3MeshVertex *v) const
{
  // Return 1/3 the sum of areas of attached faces
  RNLength sum = 0;
  for (int i = 0; i < VertexValence(v); i++) {
    R3MeshEdge *e = EdgeOnVertex(v, i);
    R3MeshFace *f = FaceOnEdge(e, v, RN_CCW);
    if (!f) continue;
    sum += FaceArea(f);
  }
  return sum / 3;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rsi
callq 0x36b50
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x16d92
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x2c(%rsp), %edx
callq 0x36ec0
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
movq 0x38(%rsp), %rdx
xorl %ecx, %ecx
callq 0x36ef0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x16d67
jmp 0x16d82
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x36aa0
addsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x16d09
movsd 0x30(%rsp), %xmm0
movsd 0x11c440(%rip), %xmm1   # 0x1331e0
divsd %xmm1, %xmm0
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::VertexAverageEdgeLength(gaps::R3MeshVertex const*) const
RNLength R3Mesh:: 
VertexAverageEdgeLength(const R3MeshVertex *v) const
{
  // Check number of edges
  if (VertexValence(v) == 0) return 0;

  // Returns the average length of edges attached to vertex
  RNLength sum = 0;
  for (int i = 0; i < VertexValence(v); i++) {
    R3MeshEdge *e = EdgeOnVertex(v, i);
    RNLength length = EdgeLength(e);
    sum += length;
  }
  return sum / VertexValence(v);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq 0x40(%rsp), %rsi
callq 0x36b50
cmpl $0x0, %eax
jne 0x16de5
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x16e92
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x40(%rsp), %rsi
callq 0x36b50
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x16e63
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0x36ec0
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x16df6
movq 0x18(%rsp), %rdi
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x40(%rsp), %rsi
callq 0x36b50
movsd 0x8(%rsp), %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::VertexMeanCurvature(gaps::R3MeshVertex const*) const
RNScalar R3Mesh::
VertexMeanCurvature(const R3MeshVertex *v) const
{
  // Compute signed length of laplacian vector projected onto normal
  RNArea area = VertexArea(v);
  if (area == 0) return 0;
  R3Vector laplacian = VertexLaplacianVector(v);
  RNScalar curvature = -1 * laplacian.Dot(VertexNormal(v));
  return curvature;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x30(%rsp), %rsi
callq 0x16ce0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x17193
jp 0x17193
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x171e2
movq (%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rdi
callq 0x171f0
movq (%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x36860
movq %rax, %rsi
leaq 0x10(%rsp), %rdi
callq 0x702c0
movaps %xmm0, %xmm1
movsd 0x11be4c(%rip), %xmm0   # 0x133018
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeDirection(gaps::R3MeshEdge const*) const
R3Vector R3Mesh:: 
EdgeDirection(const R3MeshEdge *e) const
{
  // Returns the normalized vector pointing in direction of the edge
  R3Vector vector = EdgeVector(e);
  RNLength d = EdgeLength(e);
  if (RNIsPositive(d)) vector /= d;
  return vector;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movq 0x20(%rsp), %rdx
callq 0x37120
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
leaq 0x160f9b(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36d50
cmpl $0x0, %eax
je 0x17562
movq (%rsp), %rdi
movsd 0x18(%rsp), %xmm0
callq 0x70ec0
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeNormal(gaps::R3MeshEdge const*) const
R3Vector R3Mesh::
EdgeNormal(const R3MeshEdge *e) const
{
  // Return the normal to the surface at the edge
  R3Vector normal = R3zero_vector;
  R3MeshFace *f0 = FaceOnEdge(e, 0);
  R3MeshFace *f1 = FaceOnEdge(e, 1);
  if (f0) normal += FaceNormal(f0);
  if (f1) normal += FaceNormal(f1);
  normal.Normalize();
  return normal;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x561fff(%rip), %rsi    # 0x5795a0
callq 0x6fcf0
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x37050
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rsi
movl $0x1, %edx
callq 0x37050
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
je 0x175f9
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x13840
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x70be0
cmpq $0x0, 0x20(%rsp)
je 0x1761d
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x13840
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x70be0
movq 0x8(%rsp), %rdi
callq 0x70410
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::EdgeAspect(gaps::R3MeshEdge const*) const
RNScalar R3Mesh:: 
EdgeAspect(const R3MeshEdge *e) const
{
  // Get attached faces
  R3MeshFace *f0 = FaceOnEdge(e, 0);
  R3MeshFace *f1 = FaceOnEdge(e, 1);
  if (!f0 || !f1) return 0.0;

  // Get edge length
  RNScalar edge_length = EdgeLength(e);
  if (RNIsZero(edge_length)) return RN_INFINITY;

  // Get distances between opposite vertices
  R3MeshVertex *v0 = VertexAcrossFace(f0, e);
  R3MeshVertex *v1 = VertexAcrossFace(f1, e);
  RNScalar opposite_length = R3Distance(v0->position, v1->position);

  // Return ratio
  return opposite_length / edge_length;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x37050
movq 0x8(%rsp), %rdi
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
movl $0x1, %edx
callq 0x37050
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x17692
cmpq $0x0, 0x30(%rsp)
jne 0x176a0
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x17744
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
leaq 0x160e1e(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x176e3
leaq 0x160e19(%rip), %rax    # 0x1784f0
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x17744
movq 0x8(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x37070
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x30(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x37070
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x86c40
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
divsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FaceColor(gaps::R3MeshFace const*) const
RNRgb R3Mesh:: 
FaceColor(const R3MeshFace *f) const
{
  R3MeshVertex *v0 = VertexOnFace(f, 0);
  R3MeshVertex *v1 = VertexOnFace(f, 1);
  R3MeshVertex *v2 = VertexOnFace(f, 2);
  const RNRgb& c0 = VertexColor(v0);
  const RNRgb& c1 = VertexColor(v1);
  const RNRgb& c2 = VertexColor(v2);
  return (c0 + c1 + c2) / 3.0;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x80(%rsp), %rsi
xorl %edx, %edx
callq 0x13700
movq 0x8(%rsp), %rdi
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rsi
movl $0x1, %edx
callq 0x13700
movq 0x8(%rsp), %rdi
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rsi
movl $0x2, %edx
callq 0x13700
movq 0x8(%rsp), %rdi
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rsi
callq 0x368d0
movq 0x8(%rsp), %rdi
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rsi
callq 0x368d0
movq 0x8(%rsp), %rdi
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rsi
callq 0x368d0
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x20(%rsp), %rdi
callq 0x37200
movq 0x50(%rsp), %rdx
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x37200
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movsd 0x11b995(%rip), %xmm0   # 0x1331e0
callq 0x371a0
movq 0x18(%rsp), %rax
addq $0x98, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FaceAspect(gaps::R3MeshFace const*) const
RNScalar R3Mesh:: 
FaceAspect(const R3MeshFace *f) const
{
  R3MeshEdge *e0 = EdgeOnFace(f, 0);
  R3MeshEdge *e1 = EdgeOnFace(f, 1);
  R3MeshEdge *e2 = EdgeOnFace(f, 2);
  RNLength a = EdgeLength(e0);
  if (RNIsZero(a)) return RN_INFINITY;
  RNLength b = EdgeLength(e1);
  if (RNIsZero(b)) return RN_INFINITY;
  RNLength c = EdgeLength(e2);
  if (RNIsZero(c)) return RN_INFINITY;
  RNScalar s = (a + b + c) / 2.0;
  return (a * b * c) / (8.0 * (s - a) * (s - b) * (s - c));
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x13d30
movq (%rsp), %rdi
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
movl $0x1, %edx
callq 0x13d30
movq (%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rsi
movl $0x2, %edx
callq 0x13d30
movq (%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
leaq 0x160c07(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x178fd
leaq 0x160c02(%rip), %rax    # 0x1784f0
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x179fc
movq (%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
leaq 0x160bc2(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x17942
leaq 0x160bbd(%rip), %rax    # 0x1784f0
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x179fc
movq (%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
leaq 0x160b7d(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x36b80
cmpl $0x0, %eax
je 0x17984
leaq 0x160b78(%rip), %rax    # 0x1784f0
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x179fc
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd 0x11b862(%rip), %xmm1   # 0x133200
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
mulsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm2
subsd 0x20(%rsp), %xmm2
movsd 0x11b82a(%rip), %xmm1   # 0x1331f8
mulsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm2
subsd 0x18(%rsp), %xmm2
mulsd %xmm2, %xmm1
movsd 0x8(%rsp), %xmm2
subsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FacePoint(gaps::R3MeshFace const*, double*) const
R3Point R3Mesh::
FacePoint(const R3MeshFace *f, RNMagnitude barycentrics[3]) const
{
  // Return point on the face with the given barycentric coordinates
  R3Point point = R3zero_point;
  point += barycentrics[0] * f->vertex[0]->position;
  point += barycentrics[1] * f->vertex[1]->position;
  point += barycentrics[2] * f->vertex[2]->position;
  return point;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
leaq 0x561a75(%rip), %rsi    # 0x5794b0
callq 0x6eb90
movq 0x58(%rsp), %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rsi
addq $0x18, %rsi
leaq 0x40(%rsp), %rdi
callq 0x36b10
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x6f820
movq 0x58(%rsp), %rax
movsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rsi
addq $0x18, %rsi
leaq 0x28(%rsp), %rdi
callq 0x36b10
movq (%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x6f820
movq 0x58(%rsp), %rax
movsd 0x10(%rax), %xmm0
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rsi
addq $0x18, %rsi
leaq 0x10(%rsp), %rdi
callq 0x36b10
movq (%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6f820
movq 0x8(%rsp), %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::IsVertexOnBoundary(gaps::R3MeshVertex const*) const
RNBoolean R3Mesh::
IsVertexOnBoundary(const R3MeshVertex *v) const
{
  // Return whether vertex lies on boundary
  for (int i = 0; i < VertexValence(v); i++) {
    R3MeshEdge *e = EdgeOnVertex(v, i);
    if (IsEdgeOnBoundary(e)) return TRUE;
  }

  // No adjacent edge is on boundary
  return FALSE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rsi
callq 0x36b50
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x17f86
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
callq 0x36ec0
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
callq 0x37270
cmpl $0x0, %eax
je 0x17f77
movl $0x1, 0x34(%rsp)
jmp 0x17f8e
jmp 0x17f79
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x17f20
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::IsFaceOnBoundary(gaps::R3MeshFace const*) const
RNBoolean R3Mesh::
IsFaceOnBoundary(const R3MeshFace *f) const
{
  // Return whether face has any edge on boundary
  if (IsEdgeOnBoundary(EdgeOnFace(f, 0))) return TRUE;
  if (IsEdgeOnBoundary(EdgeOnFace(f, 1))) return TRUE;
  if (IsEdgeOnBoundary(EdgeOnFace(f, 2))) return TRUE;
  return FALSE;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x37270
cmpl $0x0, %eax
je 0x17fe0
movl $0x1, 0x24(%rsp)
jmp 0x18048
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x37270
cmpl $0x0, %eax
je 0x18010
movl $0x1, 0x24(%rsp)
jmp 0x18048
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x2, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x37270
cmpl $0x0, %eax
je 0x18040
movl $0x1, 0x24(%rsp)
jmp 0x18048
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdi
addq $0x18, %rdi
callq 0x6f1e0
movq 0x98(%rsp), %rax
addq $0x78, %rax
movq %rax, 0x38(%rsp)
leaq 0x88(%rsp), %rdi
movl $0x2, %esi
callq 0x13d80
movq 0x38(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x372b0
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x98(%rsp), %rdi
addq $0x8, %rdi
callq 0x13600
movl %eax, %ecx
movl 0x2c(%rsp), %eax
cmpl %ecx, %eax
jge 0x18243
movq 0x98(%rsp), %rdi
addq $0x8, %rdi
movl 0x84(%rsp), %esi
callq 0x372f0
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x18(%rsp)
leaq 0x70(%rsp), %rdi
movl $0x2, %esi
callq 0x13d80
movq 0x18(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x372b0
movq 0x30(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x36f50
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
addq $0x78, %rax
movq %rax, 0x20(%rsp)
leaq 0x60(%rsp), %rdi
movl $0x2, %esi
callq 0x13d80
movq 0x20(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x372b0
movq 0x78(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
je 0x181e7
movq 0x58(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
movl $0xc, %esi
callq 0x13d80
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x372b0
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x1822b
movq 0x48(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rdi
movl $0xc, %esi
callq 0x13d80
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x372b0
jmp 0x1822d
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x180e5
movq 0x30(%rsp), %rdi
addq $0xf8, %rdi
movq 0x90(%rsp), %rsi
callq 0x444b0
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x290(%rax)
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x182b4
movq $0x0, 0x40(%rsp)
jmp 0x18330
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
callq 0x13600
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x18327
movq 0x30(%rsp), %rdi
addq $0x8, %rdi
movl 0x24(%rsp), %esi
callq 0x37310
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x37330
cmpl $0x0, %eax
je 0x18318
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x18330
jmp 0x1831a
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x182bc
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: 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:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movl %ecx, -0x24(%rsp)
movq -0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rsp), %rax
jne 0x1838d
cmpl $0x0, -0x24(%rsp)
jne 0x1837d
movq -0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18404
movq -0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18404
movq -0x20(%rsp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rsp), %rax
jne 0x183c4
cmpl $0x0, -0x24(%rsp)
jne 0x183b4
movq -0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18404
movq -0x20(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18404
movq -0x20(%rsp), %rax
movq 0x18(%rax), %rax
cmpq -0x18(%rsp), %rax
jne 0x183fb
cmpl $0x0, -0x24(%rsp)
jne 0x183eb
movq -0x20(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18404
movq -0x20(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18404
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
// File: 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:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq %rcx, -0x28(%rsp)
movq -0x18(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x18481
movq -0x20(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x18457
movq -0x28(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18539
movq -0x20(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jne 0x1847a
movq -0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18539
jmp 0x1847c
jmp 0x18530
movq -0x18(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x184d8
movq -0x20(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jne 0x184b4
movq -0x28(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18539
movq -0x20(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x184d4
movq -0x28(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18539
jmp 0x184d6
jmp 0x1852e
movq -0x18(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jne 0x1852c
movq -0x20(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jne 0x18508
movq -0x28(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18539
movq -0x20(%rsp), %rax
movq -0x28(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jne 0x18528
movq -0x28(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x18539
jmp 0x1852a
jmp 0x1852c
jmp 0x1852e
jmp 0x18530
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nop
// File: 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:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x18(%rsp), %rax
cmpq -0x20(%rsp), %rax
jne 0x18596
movq $0x0, -0x8(%rsp)
jmp 0x1860f
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x8(%rcx), %rax
je 0x185be
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x185ce
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x1860f
movq -0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x8(%rcx), %rax
je 0x185f6
movq -0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x18606
movq -0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x1860f
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Mesh.cpp
// Function: gaps::R3Mesh::FaceBetweenEdges(gaps::R3MeshEdge const*, gaps::R3MeshEdge const*) const
R3MeshFace *R3Mesh::
FaceBetweenEdges(const R3MeshEdge *e1, const R3MeshEdge *e2) const
{
  // Return face shared by edges
  if (e1 == e2) return NULL;
  if ((e1->face[0]) && ((e1->face[0] == e2->face[0]) || (e1->face[0] == e2->face[1]))) return e1->face[0];
  else if ((e1->face[1]) && ((e1->face[1] == e2->face[0]) || (e1->face[1] == e2->face[1]))) return e1->face[1];
  else return NULL;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movq -0x18(%rsp), %rax
cmpq -0x20(%rsp), %rax
jne 0x18649
movq $0x0, -0x8(%rsp)
jmp 0x186da
movq -0x18(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1868d
movq -0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x18(%rcx), %rax
je 0x1867d
movq -0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x1868d
movq -0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x186da
movq -0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0x186d1
movq -0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x18(%rcx), %rax
je 0x186c1
movq -0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq -0x20(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x186d1
movq -0x18(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x186da
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x18906
movq $0x0, 0x20(%rsp)
jmp 0x18999
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0x373c0
cmpq 0x8(%rsp), %rax
jne 0x18934
movq 0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x18999
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0x373c0
cmpq 0x8(%rsp), %rax
jne 0x18962
movq 0x10(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x18999
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0x373c0
cmpq 0x8(%rsp), %rax
jne 0x18990
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x18999
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
movl $0x1, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rsi
movl $0x2, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rsi
callq 0x13cc0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
movq 0x30(%rsp), %rsi
callq 0x13cc0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x18a86
movsd 0x20(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x18a7a
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x18aae
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x18aae
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x18aa4
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x18aae
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rsi
movl $0x1, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rsi
movl $0x2, %edx
callq 0x13d30
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rsi
callq 0x13cc0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x20(%rsp)
movq 0x30(%rsp), %rsi
callq 0x13cc0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rsi
callq 0x13cc0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
ucomisd 0x18(%rsp), %xmm0
jbe 0x18b8e
movsd 0x20(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
jbe 0x18b82
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x18bb2
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x18bb2
movsd 0x18(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
jbe 0x18ba8
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x18bb2
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x15692e(%rip), %eax    # 0x16f520
incl %eax
movl %eax, 0x156926(%rip)    # 0x16f520
leaq 0x70(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x36800
movq 0x38(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x37410
jmp 0x18c1d
movq 0x30(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl 0x1568f0(%rip), %edx    # 0x16f520
callq 0x37440
jmp 0x18c37
jmp 0x18c39
leaq 0x70(%rsp), %rdi
callq 0x36e30
movl %eax, 0x2c(%rsp)
jmp 0x18c49
movl 0x2c(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18c5e
jmp 0x18d93
leaq 0x70(%rsp), %rdi
callq 0x37460
movq %rax, 0x20(%rsp)
jmp 0x18c6f
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x36e60
jmp 0x18c85
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x37410
jmp 0x18c99
movl $0x0, 0x54(%rsp)
movq 0x30(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x58(%rsp), %rsi
callq 0x36b50
movl %eax, 0x1c(%rsp)
jmp 0x18cbe
movl 0x18(%rsp), %eax
movl 0x1c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x18d8e
movq 0x30(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0x54(%rsp), %edx
callq 0x36ec0
movq %rax, 0x10(%rsp)
jmp 0x18ce8
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x36f50
movq %rax, 0x8(%rsp)
jmp 0x18d0d
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rsi
callq 0x37470
movl %eax, 0x4(%rsp)
jmp 0x18d2c
movl 0x4(%rsp), %eax
cmpl 0x1567ea(%rip), %eax    # 0x16f520
je 0x18d7c
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
movl 0x1567d8(%rip), %edx    # 0x16f520
callq 0x37440
jmp 0x18d4f
movq 0x40(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x37410
jmp 0x18d60
jmp 0x18d7c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x36850
jmp 0x18da5
jmp 0x18d7e
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x18ca1
jmp 0x18c39
leaq 0x70(%rsp), %rdi
callq 0x36850
addq $0x98, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0xf890
nop
// File: 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:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x15673e(%rip), %eax    # 0x16f520
incl %eax
movl %eax, 0x156736(%rip)    # 0x16f520
leaq 0x70(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x36820
movq 0x50(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x37490
jmp 0x18e0d
jmp 0x18e0f
leaq 0x70(%rsp), %rdi
callq 0x36e30
movl %eax, 0x44(%rsp)
jmp 0x18e1f
movl 0x44(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x18e34
jmp 0x18fc3
leaq 0x70(%rsp), %rdi
callq 0x36e50
movq %rax, 0x38(%rsp)
jmp 0x18e45
movq 0x38(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x36e60
jmp 0x18e5b
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x374c0
movl %eax, 0x34(%rsp)
jmp 0x18e70
movl 0x34(%rsp), %eax
cmpl 0x1566a6(%rip), %eax    # 0x16f520
je 0x18fbe
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x37490
jmp 0x18e94
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x36e80
movq %rax, 0x28(%rsp)
jmp 0x18eac
movq 0x28(%rsp), %rax
cmpq $0x0, %rax
je 0x18eff
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
xorl %edx, %edx
callq 0x36e80
movq %rax, 0x20(%rsp)
jmp 0x18ecf
movq 0x20(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x37490
jmp 0x18ee0
jmp 0x18eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x36830
jmp 0x18fd5
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl $0x1, %edx
callq 0x36e80
movq %rax, 0x18(%rsp)
jmp 0x18f1a
movq 0x18(%rsp), %rax
cmpq $0x0, %rax
je 0x18f53
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl $0x1, %edx
callq 0x36e80
movq %rax, 0x10(%rsp)
jmp 0x18f40
movq 0x10(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x37490
jmp 0x18f51
jmp 0x18f53
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl $0x2, %edx
callq 0x36e80
movq %rax, 0x8(%rsp)
jmp 0x18f6e
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x18fa5
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl $0x2, %edx
callq 0x36e80
movq %rax, (%rsp)
jmp 0x18f93
movq (%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x37490
jmp 0x18fa3
jmp 0x18fa5
movq 0x48(%rsp), %rdi
movq 0x58(%rsp), %rsi
movl 0x15656b(%rip), %edx    # 0x16f520
callq 0x374e0
jmp 0x18fbc
jmp 0x18fbe
jmp 0x18e0f
leaq 0x70(%rsp), %rdi
callq 0x36830
addq $0x98, %rsp
retq
movq 0x68(%rsp), %rdi
callq 0xf890
nop
// File: 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:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0xf8, %rdi
leaq 0x15e6b6(%rip), %rsi    # 0x1787e8
callq 0x37500
movl $0x0, 0x84(%rsp)
movq 0x38(%rsp), %rdi
movl 0x84(%rsp), %eax
movl %eax, 0x34(%rsp)
callq 0x135e0
movl %eax, %ecx
movl 0x34(%rsp), %eax
cmpl %ecx, %eax
jge 0x1a1ed
movq 0x38(%rsp), %rdi
movl 0x84(%rsp), %esi
callq 0x13630
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
addq $0x18, %rdi
movq 0x88(%rsp), %rsi
callq 0x6f7c0
movq 0x78(%rsp), %rax
addq $0x78, %rax
movq %rax, 0x28(%rsp)
leaq 0x70(%rsp), %rdi
movl $0x2, %esi
callq 0x13d80
movq 0x28(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x372b0
movq 0x38(%rsp), %rdi
addq $0xf8, %rdi
movq 0x78(%rsp), %rsi
addq $0x18, %rsi
callq 0x444b0
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x1a142
movl $0x0, 0x6c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x6c(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x135c0
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x1a25d
movq 0x38(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x36930
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x18(%rsp)
leaq 0x58(%rsp), %rdi
movl $0x2, %esi
callq 0x13d80
movq 0x18(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x372b0
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x1a1f5
movl $0x0, 0x54(%rsp)
movq 0x38(%rsp), %rdi
movl 0x54(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x135a0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x1a2cf
movq 0x38(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x136d0
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
addq $0xa8, %rax
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rdi
movl $0xc, %esi
callq 0x13d80
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x372b0
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x1a265
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x290(%rax)
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq (%rdi), %rax
callq *0x290(%rax)
cmpq $0x0, 0x30(%rsp)
jne 0x1a392
movl $0x98, %edi
callq 0xf4c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x36460
jmp 0x1a33a
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x78, %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x13d80
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x37560
jmp 0x1a392
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x98, %esi
callq 0xf4d0
jmp 0x1a43a
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq $0x18, %rdx
callq 0x18060
movq 0x38(%rsp), %rdi
addq $0x30, %rdi
callq 0x375a0
cmpl $0x0, %eax
jne 0x1a3d5
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq $0x30, %rdx
callq 0x37610
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq $0x58, %rdx
callq 0x37670
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq $0x48, %rdx
callq 0x376a0
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0x13600
movq 0x10(%rsp), %rdi
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x70(%rax)
addq $0x8, %rdi
movq 0x30(%rsp), %rsi
callq 0x37410
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq (%rdi), %rax
callq *0x290(%rax)
cmpq $0x0, 0x30(%rsp)
jne 0x1a4ef
movl $0x98, %edi
callq 0xf4c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x36460
jmp 0x1a49a
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x78, %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x13d80
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x37560
jmp 0x1a4ef
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x98, %esi
callq 0xf4d0
jmp 0x1a538
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x18060
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0x13600
movq 0x10(%rsp), %rdi
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x70(%rax)
addq $0x8, %rdi
movq 0x30(%rsp), %rsi
callq 0x37410
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)