LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::WriteASCIIFile(char const*) const
int R3Grid::
WriteASCIIFile(const char *filename) const
{
  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open file %s", filename);
    return 0;
  }

  // Print resolutions
  fprintf(fp, "%d %d %d\n", XResolution(), YResolution(), ZResolution());

  // Print world to grid transformation
  const R4Matrix& m = world_to_grid_transform.Matrix();
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 4; j++) {
      fprintf(fp, "%lf ", m[i][j]);
    }
    fprintf(fp, "\n");
  }

  // Print values
  for (int i = 0; i < XResolution(); i++) {
    for (int j = 0; j < YResolution(); j++) {
      for (int k = 0; k < ZResolution(); k++) {
	fprintf(fp, "%lf\n", GridValue(i, j, k));
      }
    }
  }

  // Close file
  fclose(fp);

  // Return OK status
  return grid_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x63763(%rip), %rsi     # 0x98769
movq %r15, %rdi
callq 0xe550
testq %rax, %rax
je 0x35105
movq %rax, %r14
movl 0x238(%rbx), %edx
movl 0x23c(%rbx), %ecx
movl 0x240(%rbx), %r8d
leaq 0x5e9b0(%rip), %rsi     # 0x939e4
xorl %r12d, %r12d
movq %rax, %rdi
xorl %eax, %eax
callq 0xe6a0
leaq 0x118(%rbx), %r13
leaq 0x6449f(%rip), %r15     # 0x994ee
cmpq $0x4, %r12
je 0x3508a
xorl %ebp, %ebp
cmpq $0x4, %rbp
je 0x35076
movsd (%r13,%rbp,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0xe6a0
incq %rbp
jmp 0x35057
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0xe5c0
incq %r12
addq $0x20, %r13
jmp 0x3504f
xorl %ebp, %ebp
leaq 0x64355(%rip), %r15     # 0x993e8
cmpl 0x238(%rbx), %ebp
jge 0x350f5
xorl %r12d, %r12d
cmpl 0x23c(%rbx), %r12d
jge 0x350f1
xorl %r13d, %r13d
cmpl 0x240(%rbx), %r13d
jge 0x350ec
movq 0x230(%rbx), %rax
movl 0x248(%rbx), %ecx
imull %r13d, %ecx
movl 0x244(%rbx), %edx
imull %r12d, %edx
addl %ebp, %ecx
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0xe6a0
incl %r13d
jmp 0x350aa
incl %r12d
jmp 0x3509e
incl %ebp
jmp 0x35093
movq %r14, %rdi
callq 0xe440
movl 0x24c(%rbx), %ebx
jmp 0x35118
leaq 0x5e25e(%rip), %rdi     # 0x9336a
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x681ca
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Print(_IO_FILE*) const
int R3Grid::
Print(FILE *fp) const
{
  // Check file
  if (!fp) fp = stdout;

  // Print resolutions
  fprintf(fp, "%d %d %d\n", XResolution(), YResolution(), ZResolution());

  // Print values
  for (int k = 0; k < ZResolution(); k++) {
    for (int j = 0; j < YResolution(); j++) {
      for (int i = 0; i < XResolution(); i++) {
        fprintf(fp, "%g ", GridValue(i, j, k));
      }
      fprintf(fp, "\n");
    }
    fprintf(fp, "\n");
  }

  // Return number of grid values written
  return grid_size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jne 0x3514a
movq 0xa4e39(%rip), %rax     # 0xd9f80
movq (%rax), %r14
movl 0x238(%rbx), %edx
movl 0x23c(%rbx), %ecx
movl 0x240(%rbx), %r8d
leaq 0x5e880(%rip), %rsi     # 0x939e4
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0xe6a0
leaq 0x6437b(%rip), %r15     # 0x994f3
cmpl 0x240(%rbx), %r12d
jge 0x351ef
xorl %r13d, %r13d
cmpl 0x23c(%rbx), %r13d
jge 0x351df
xorl %ebp, %ebp
cmpl 0x238(%rbx), %ebp
jge 0x351cf
movq 0x230(%rbx), %rax
movl 0x248(%rbx), %ecx
imull %r12d, %ecx
movl 0x244(%rbx), %edx
imull %r13d, %edx
addl %ecx, %edx
addl %ebp, %edx
movslq %edx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0xe6a0
incl %ebp
jmp 0x3518f
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0xe5c0
incl %r13d
jmp 0x35184
pushq $0xa
popq %rdi
movq %r14, %rsi
callq 0xe5c0
incl %r12d
jmp 0x35178
movl 0x24c(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::DrawIsoSurface(double) const
void R3Grid::
DrawIsoSurface(RNScalar isolevel) const
{
  // Allocate storage for isosurface
  static const R3Grid *isosurface_grid = NULL;
  static RNScalar isosurface_level = -12345679;
  static const int isosurface_max_points = 8*1024*1024;
  static R3Point *isosurface_points = NULL;
  static int isosurface_npoints = 0;

  // Allocate points for isosurface
  if (!isosurface_points) { 
    isosurface_points = new R3Point [isosurface_max_points];
    assert(isosurface_points);
  }

  // Generate isosurface
  if ((this != isosurface_grid) || (isosurface_level != isolevel)) {
    isosurface_npoints = GenerateIsoSurface(isolevel, isosurface_points, isosurface_max_points);
    isosurface_grid = this;
    isosurface_level = isolevel;
  }

  // Draw isosurface
  R3Point *pointsp = isosurface_points;
  RNGrfxBegin(RN_GRFX_TRIANGLES);
  for (int i = 0; i < isosurface_npoints; i += 3) {
    R3Point p0 = *(pointsp++);
    R3Point p1 = *(pointsp++);
    R3Point p2 = *(pointsp++);
    R3Plane plane(p0, p1, p2);
    R3LoadNormal(plane.Normal());
    R3LoadPoint(p0);
    R3LoadPoint(p1);
    R3LoadPoint(p2);
  }
  RNGrfxEnd();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r14
movq 0xa56ce(%rip), %rbx     # 0xdb660
testq %rbx, %rbx
jne 0x35fd0
movsd %xmm0, 0x8(%rsp)
movl $0xc000000, %edi        # imm = 0xC000000
callq 0xe030
movq %rax, %rbx
xorl %r15d, %r15d
leaq (%rbx,%r15), %rdi
callq 0x37b4a
addq $0x18, %r15
cmpq $0xc000000, %r15        # imm = 0xC000000
jne 0x35fad
movq %rbx, 0xa5696(%rip)     # 0xdb660
movsd 0x8(%rsp), %xmm0
cmpq %r14, 0xa5681(%rip)     # 0xdb658
jne 0x35fe9
movsd 0xa4a2f(%rip), %xmm1    # 0xdaa10
ucomisd %xmm0, %xmm1
jne 0x35fe9
jnp 0x36021
movq %r14, %rdi
movq %rbx, %rsi
movl $0x800000, %edx         # imm = 0x800000
movsd %xmm0, 0x8(%rsp)
callq 0x35ca2
movl %eax, 0xa5663(%rip)     # 0xdb668
movq %r14, 0xa564c(%rip)     # 0xdb658
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0xa49f6(%rip)    # 0xdaa10
movq 0xa563f(%rip), %rbx     # 0xdb660
pushq $0x4
popq %rdi
callq 0xe110
xorl %r13d, %r13d
leaq 0x40(%rsp), %r14
leaq 0x28(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpl 0xa5626(%rip), %r13d    # 0xdb668
jge 0x360aa
leaq 0x18(%rbx), %rbp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37b5c
movq %r15, %rdi
movq %rbp, %rsi
callq 0x37b5c
leaq 0x30(%rbx), %rsi
movq %r12, %rdi
callq 0x37b5c
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x36918
movq %rbp, %rdi
callq 0xe6e0
movq %r14, %rdi
callq 0xe130
movq %r15, %rdi
callq 0xe130
movq %r12, %rdi
callq 0xe130
addl $0x3, %r13d
addq $0x48, %rbx
jmp 0x3603b
callq 0xe5f0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0xc000000, %esi        # imm = 0xC000000
movq %rbx, %rdi
callq 0xe8f0
movq %r14, %rdi
callq 0xe810
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Grid.h
// Function: gaps::R3Grid::WorldBox() const
inline R3Box R3Grid::
WorldBox(void) const
{
  // Return bounding box in world coordinates
  R3Point p1(0, 0, 0);
  R3Point p2(grid_resolution[0]-1, grid_resolution[1]-1, grid_resolution[2]-1);
  return R3Box(WorldPosition(p1), WorldPosition(p2));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x48(%rsp), %r15
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r15, %rdi
callq 0x37b4c
movl 0x238(%r14), %eax
decl %eax
cvtsi2sd %eax, %xmm0
movl 0x23c(%r14), %eax
decl %eax
cvtsi2sd %eax, %xmm1
movl 0x240(%r14), %eax
decl %eax
cvtsi2sd %eax, %xmm2
leaq 0x30(%rsp), %r12
movq %r12, %rdi
callq 0x37b4c
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x366f8
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x366f8
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x24b90
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::R3Plane(gaps::R3Point const&, gaps::R3Line const&)
R3Plane::
R3Plane(const R3Point& point, const R3Line& line)
{
    // Construct plane through point and line
    v = point - line.Point();
    v.Cross(line.Vector());
    v.Normalize();
    d = -(v[0]*point[0] + v[1]*point[1] + v[2]*point[2]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3830a
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x37d29
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3887c
addq $0x18, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38680
movq %rbx, %rdi
callq 0x3860e
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x8(%r14), %xmm1
mulsd (%r14), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x10(%r14), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c7af(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::R3Plane(gaps::R3Point const&, gaps::R3Vector const&, gaps::R3Vector const&)
R3Plane::
R3Plane(const R3Point& point, const R3Vector& vector1, const R3Vector& vector2)
{
    // Construct plane through point and two vectors
    v = vector1 % vector2;
    v.Normalize();
    d = -(v[0]*point[0] + v[1]*point[1] + v[2]*point[2]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3830a
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x389be
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3887c
movq %rbx, %rdi
callq 0x3860e
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x8(%r14), %xmm1
mulsd (%r14), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x10(%r14), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c72b(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::R3Plane(gaps::R3Point const&, gaps::R3Point const&, gaps::R3Point const&)
R3Plane::
R3Plane(const R3Point& point1, const R3Point& point2, const R3Point& point3)
{
    // Construct plane through three points
    v = point2 - point1;
    R3Vector v3 = point3 - point1;
    v.Cross(v3);
    v.Normalize();
    d = -(v[0]*point1[0] + v[1]*point1[1] + v[2]*point1[2]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3830a
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x37d29
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3887c
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x37d29
movq %rbx, %rdi
movq %r12, %rsi
callq 0x38680
movq %rbx, %rdi
callq 0x3860e
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x8(%r14), %xmm1
mulsd (%r14), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x10(%r14), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c687(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::R3Plane(gaps::RNArray<gaps::R3Point*> const&, int)
R3Plane::
R3Plane(const RNArray<R3Point *>& points, RNBoolean polygon_vertices)
{
    // Initialize plane
    v = R3null_vector;
    d = 0;

    // Check number of points
    int npoints = points.NEntries();
    if (npoints < 3) {
      *this = R3null_plane;
      return;
    }

    // Compute centroid
    R3Point c = R3Centroid(points);

    // Check if points form (counter-clockwise) boundary of polygon
    if (polygon_vertices) {
        // Compute best normal for counter-clockwise array of points using newell's method 
        const R3Point *p1 = points[npoints-1];
        for (int i = 0; i < npoints; i++) {
            const R3Point *p2 = points[i];
            v[0] += (p1->Y() - p2->Y()) * (p1->Z() + p2->Z());
            v[1] += (p1->Z() - p2->Z()) * (p1->X() + p2->X());
            v[2] += (p1->X() - p2->X()) * (p1->Y() + p2->Y());
            p1 = p2;
        }

        // Normalize 
        v.Normalize();
    }
    else {
        // Compute principle axes
        R3Triad triad = R3PrincipleAxes(c, points);

        // Select direction of least variation
        v = triad[2];
    }

    // Compute d from centroid and normal
    d = -(v[0]*c[0] + v[1]*c[1] + v[2]*c[2]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3830a
leaq 0x62cb6(%rip), %rsi     # 0x99690
movq %rbx, %rdi
callq 0x3887c
andq $0x0, 0x18(%rbx)
movslq 0xc(%r14), %r15
cmpq $0x2, %r15
jg 0x36a0a
leaq 0x4a4ca8(%rip), %rsi    # 0x4db6a0
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x223a4
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x45a87
testl %ebp, %ebp
je 0x36ab2
movq (%r14), %rax
movq -0x8(%rax,%r15,8), %rdx
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0x36aa8
movq (%rax,%rcx,8), %rsi
movsd 0x8(%rdx), %xmm3
movsd 0x10(%rdx), %xmm4
subsd 0x8(%rsi), %xmm3
addsd 0x10(%rsi), %xmm4
mulsd %xmm3, %xmm4
addsd %xmm4, %xmm0
movsd %xmm0, (%rbx)
movsd (%rdx), %xmm3
movsd 0x10(%rdx), %xmm4
subsd 0x10(%rsi), %xmm4
addsd (%rsi), %xmm3
mulsd %xmm4, %xmm3
addsd %xmm3, %xmm1
movsd %xmm1, 0x8(%rbx)
movsd (%rdx), %xmm3
subsd (%rsi), %xmm3
movsd 0x8(%rdx), %xmm4
addsd 0x8(%rsi), %xmm4
mulsd %xmm3, %xmm4
addsd %xmm4, %xmm2
movsd %xmm2, 0x10(%rbx)
incq %rcx
movq %rsi, %rdx
jmp 0x36a39
movq %rbx, %rdi
callq 0x3860e
jmp 0x36ad6
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b2f
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x3887c
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x10(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x18(%rsp), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c52a(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::R3Plane(gaps::R3Point const*, int, int)
R3Plane::
R3Plane(const R3Point *points, int npoints, RNBoolean polygon_vertices)
{
    // Initialize plane
    v = R3null_vector;
    d = 0;

    // Check number of points
    if (npoints < 3) {
      *this = R3null_plane;
      return;
    }

    // Compute centroid
    R3Point c = R3Centroid(npoints, points);

    // Check if points form (counter-clockwise) boundary of polygon
    if (polygon_vertices) {
        // Compute best normal for counter-clockwise array of points using newell's method 
        const R3Point *p1 = &points[npoints-1];
        for (int i = 0; i < npoints; i++) {
            const R3Point *p2 = &points[i];
            v[0] += (p1->Y() - p2->Y()) * (p1->Z() + p2->Z());
            v[1] += (p1->Z() - p2->Z()) * (p1->X() + p2->X());
            v[2] += (p1->X() - p2->X()) * (p1->Y() + p2->Y());
            p1 = p2;
        }

        // Normalize 
        v.Normalize();
    }
    else {
        // Compute principle axes
        R3Triad triad = R3PrincipleAxes(c, npoints, points);

        // Select direction of least variation
        v = triad[2];
    }

    // Compute d from centroid and normal
    d = -(v[0]*c[0] + v[1]*c[1] + v[2]*c[2]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3830a
leaq 0x62b59(%rip), %rsi     # 0x99690
movq %rbx, %rdi
callq 0x3887c
andq $0x0, 0x18(%rbx)
cmpl $0x2, %ebp
jg 0x36b62
leaq 0x4a4b50(%rip), %rsi    # 0x4db6a0
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x223a4
leaq 0x8(%rsp), %rdi
movl %ebp, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x47260
testl %r15d, %r15d
je 0x36c17
movl %ebp, %eax
imulq $0x18, %rax, %rcx
addq %r14, %rcx
addq $-0x18, %rcx
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
subq $0x1, %rax
jb 0x36c0d
movq %r14, %rdx
movsd 0x8(%rcx), %xmm3
movsd 0x10(%rcx), %xmm4
subsd 0x8(%r14), %xmm3
addsd 0x10(%r14), %xmm4
mulsd %xmm3, %xmm4
addsd %xmm4, %xmm0
movsd %xmm0, (%rbx)
movsd (%rcx), %xmm3
movsd 0x10(%rcx), %xmm4
subsd 0x10(%r14), %xmm4
addsd (%r14), %xmm3
mulsd %xmm4, %xmm3
addsd %xmm3, %xmm1
movsd %xmm1, 0x8(%rbx)
movsd (%rcx), %xmm3
subsd (%r14), %xmm3
movsd 0x8(%rcx), %xmm4
addsd 0x8(%r14), %xmm4
mulsd %xmm3, %xmm4
addsd %xmm4, %xmm2
movsd %xmm2, 0x10(%rbx)
addq $0x18, %r14
movq %rdx, %rcx
jmp 0x36b97
movq %rbx, %rdi
callq 0x3860e
jmp 0x36c3e
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x472e9
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x3887c
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x10(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x18(%rsp), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c3c2(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::Mirror(gaps::R3Plane const&)
void R3Plane::
Mirror(const R3Plane& plane)
{
    // Mirror plane ???
    R3Point p = Point();
    p.Mirror(plane);
    v.Mirror(plane);
    Reposition(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x36c7e
movq %r15, %rdi
movq %r14, %rsi
callq 0x37eca
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38b6c
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x8(%r15), %xmm1
mulsd (%r15), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x10(%r15), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c310(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::Transform(gaps::R3Transformation const&)
void R3Plane::
Transform (const R3Transformation& transformation)
{
    // Transform plane ???
    R3Point p = Point();
    p.Transform(transformation);
    transformation.ApplyInverseTranspose(v);
    v.Normalize();
    Reposition(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x36c7e
movq %r15, %rdi
movq %r14, %rsi
callq 0x38192
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x78(%rax)
movq %rbx, %rdi
callq 0x3860e
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x8(%r15), %xmm1
mulsd (%r15), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x10(%r15), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c1e5(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Plane.cpp
// Function: gaps::R3Plane::InverseTransform(gaps::R3Transformation const&)
void R3Plane::
InverseTransform (const R3Transformation& transformation)
{
    // Transform plane ???
    R3Point p = Point();
    p.InverseTransform(transformation);
    transformation.ApplyTranspose(v);
    v.Normalize();
    Reposition(p);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x36c7e
movq %r15, %rdi
movq %r14, %rsi
callq 0x381a4
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x80(%rax)
movq %rbx, %rdi
callq 0x3860e
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
mulsd 0x8(%r15), %xmm1
mulsd (%r15), %xmm0
addsd %xmm1, %xmm0
movsd 0x10(%rbx), %xmm1
mulsd 0x10(%r15), %xmm1
addsd %xmm0, %xmm1
xorpd 0x5c166(%rip), %xmm1    # 0x93030
movlpd %xmm1, 0x18(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::R3Span(gaps::R3Point const&, gaps::R3Vector const&)
R3Span::
R3Span(const R3Point& point, const R3Vector& vector)
    : end(point + vector)
{
    R3Vector v(vector);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(point, v, TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x37752
leaq 0x30(%r14), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x37e13
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3831c
movq %r12, %rdi
callq 0x38412
movsd %xmm0, 0x48(%r14)
leaq 0xa3be5(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x36fdb
xorpd 0x5c05b(%rip), %xmm1    # 0x93030
ucomisd %xmm0, %xmm1
jbe 0x36fe3
movq %rsp, %rdi
callq 0x38c0a
movq %rsp, %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x376e6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::R3Span(gaps::R3Point const&, gaps::R3Point const&)
R3Span::
R3Span(const R3Point& point1, const R3Point& point2)
    : end(point2)
{
    R3Vector v(point2 - point1);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(point1, v, TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x37752
leaq 0x30(%r14), %rdi
movq %r15, %rsi
callq 0x37b5c
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x37d29
movq %r12, %rdi
callq 0x38412
movsd %xmm0, 0x48(%r14)
leaq 0xa3b5d(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x37063
xorpd 0x5bfd3(%rip), %xmm1    # 0x93030
ucomisd %xmm0, %xmm1
jbe 0x3706b
movq %rsp, %rdi
callq 0x38c0a
movq %rsp, %rdx
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x376e6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::R3Span(double, double, double, double, double, double)
R3Span::
R3Span(RNCoord x1, RNCoord y1, RNCoord z1, RNCoord x2, RNCoord y2, RNCoord z2)
    : end(x2, y2, z2)
{
    R3Point p1(x1, y1, z1);
    R3Point p2(x2, y2, z2);
    R3Vector v(p2 - p1);
    length = v.Length();
    if (RNIsNotZero(length)) v /= length;
    ray.Reset(p1, v, TRUE);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movsd %xmm5, 0x10(%rsp)
movsd %xmm4, 0x8(%rsp)
movsd %xmm3, (%rsp)
movsd %xmm2, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %rdi, %rbx
callq 0x37752
leaq 0x30(%rbx), %rdi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
callq 0x37b4c
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
callq 0x37b4c
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
callq 0x37b4c
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x37d29
movq %r12, %rdi
callq 0x38412
movsd %xmm0, 0x48(%rbx)
leaq 0xa3a6c(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
ja 0x37154
xorpd 0x5bee2(%rip), %xmm1    # 0x93030
ucomisd %xmm0, %xmm1
jbe 0x3715e
leaq 0x30(%rsp), %rdi
callq 0x38c0a
leaq 0x48(%rsp), %rsi
leaq 0x30(%rsp), %rdx
pushq $0x1
popq %rcx
movq %rbx, %rdi
callq 0x376e6
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::T(gaps::R3Point const&) const
const RNScalar R3Span::
T(const R3Point& point) const
{
    // Return parametric value of closest point on span
    if (length == 0.0) return 0.0;
    R3Vector topoint = point - Start();
    return Vector().Dot(topoint);
}

// Assembly:
movsd 0x48(%rdi), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x37288
jp 0x37288
retq
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x37d29
addq $0x18, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38586
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::Reposition(int, gaps::R3Point const&)
void R3Span::
Reposition(int k, const R3Point& point)
{
    // Set one endpoint of span
    if (k == 0) ray = R3Ray(point, end);
    else { end = point; ray.Align(end - ray.Start()); }
    length = R3Distance(Start(), End());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x3730b
leaq 0x30(%rbx), %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x37e36
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x37d29
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3771c
jmp 0x3732b
leaq 0x30(%rbx), %rax
movq %rsp, %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x37764
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22b4c
leaq 0x30(%rbx), %rsi
movq %rbx, %rdi
callq 0x4321a
movsd %xmm0, 0x48(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::Flip()
void R3Span::
Flip(void)
{
    // Flip direction of span
    R3Point swap = Start();
    ray.Reposition(end);
    end = swap;
    ray.Flip();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37b5c
leaq 0x30(%rbx), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37e36
movq %r15, %rdi
movq %r14, %rsi
callq 0x37e36
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x38662
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Span.cpp
// Function: gaps::R3Span::Reset(gaps::R3Point const&, gaps::R3Point const&)
void R3Span::
Reset(const R3Point& point1, const R3Point& point2)
{
    // Reset span
    ray = R3Ray(point1, point2);
    end = point2;
    length = R3Distance(point1, point2);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x37764
movq %r15, %rdi
movq %r12, %rsi
callq 0x22b4c
leaq 0x30(%r15), %rdi
movq %rbx, %rsi
callq 0x37e36
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4321a
movsd %xmm0, 0x48(%r15)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Line.h
// Function: gaps::R3Line::Reset(gaps::R3Point const&, gaps::R3Vector const&, int)
inline void R3Line::
Reset(const R3Point& point, const R3Vector& vector, RNBoolean normalized)
{
    // Reset line
    this->point = point;
    this->vector = vector;
    if (!normalized) this->vector.Normalize();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
callq 0x37e36
addq $0x18, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3887c
testl %ebp, %ebp
je 0x3770f
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3860e
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Ray.cpp
// Function: gaps::R3Ray::T(gaps::R3Point const&) const
const RNScalar R3Ray::
T(const R3Point& point) const
{
    // Return parametric value of closest point on ray
    if (IsZero()) return 0.0;
    RNScalar denom = Vector().Dot(Vector());
    assert(RNIsNotZero(denom));
    R3Vector topoint = point - Start();
    return (Vector().Dot(topoint) / denom);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, %rdi
callq 0x21450
xorpd %xmm0, %xmm0
testl %eax, %eax
jne 0x37806
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x38586
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x37d29
movq %rbx, %rdi
movq %r12, %rsi
callq 0x38586
divsd 0x8(%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Line.cpp
// Function: gaps::R3Line::R3Line(gaps::RNArray<gaps::R3Point*> const&)
R3Line::
R3Line(const RNArray<R3Point *>& points)
    : point(0, 0, 0),
      vector(0, 0, 0)
{
    // Check number of points
    if (points.NEntries() < 2) return;

    // Compute centroid
    point = R3Centroid(points);

    // Compute principle axes
    R3Triad triad = R3PrincipleAxes(point, points);

    // Select direction of most variation
    vector = triad[0];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x37b4c
leaq 0x18(%r14), %r15
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r15, %rdi
callq 0x3830c
cmpl $0x2, 0xc(%rbx)
jl 0x379b0
movq %rsp, %r12
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x45a87
movq %r14, %rdi
movq %r12, %rsi
callq 0x37e36
movq %rsp, %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b2f
movq %r15, %rdi
movq %r12, %rsi
callq 0x3887c
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Line.cpp
// Function: gaps::R3Line::R3Line(gaps::R3Point*, int)
R3Line::
R3Line(R3Point *points, int npoints)
    : point(0, 0, 0),
      vector(0, 0, 0)
{
    // Check number of points
    if (npoints < 2) return;

    // Compute centroid
    point = R3Centroid(npoints, points);

    // Compute principle axes
    R3Triad triad = R3PrincipleAxes(point, npoints, points);

    // Select direction of most variation
    vector = triad[0];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x37b4c
leaq 0x18(%r14), %r15
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r15, %rdi
callq 0x3830c
cmpl $0x2, %ebp
jl 0x37a3d
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x47260
movq %r14, %rdi
movq %r12, %rsi
callq 0x37e36
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x472e9
movq %r15, %rdi
movq %r12, %rsi
callq 0x3887c
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Line.cpp
// Function: gaps::R3Line::operator==(gaps::R3Line const&) const
const RNBoolean R3Line::
operator==(const R3Line& line) const
{
    // Check if vectors are equal
    if (vector != line.vector) return FALSE;

    // Return whether point lies on this line
    R3Vector v = vector;
    v.Cross(line.Point() - point);
    return v.IsZero();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rdi), %r15
addq $0x18, %rsi
movq %r15, %rdi
callq 0x385dc
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x37b38
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3831c
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x37d29
movq %r12, %rdi
movq %r15, %rsi
callq 0x38680
movsd 0x8(%r12), %xmm0
xorpd %xmm1, %xmm1
movsd (%r12), %xmm2
cmpeqpd %xmm1, %xmm2
cmpeqpd %xmm1, %xmm0
andpd %xmm2, %xmm0
movd %xmm0, %eax
movsd 0x10(%r12), %xmm0
ucomisd %xmm1, %xmm0
setnp %cl
sete %dl
andb %cl, %dl
andb %al, %dl
movzbl %dl, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Collinear(gaps::R3Point const&, gaps::R3Point const&) const
const RNBoolean R3Point::
Collinear(const R3Point& point1, const R3Point& point2) const
{
    // Check if two of points are same
    if ((*this == point1) || (*this == point2) || (point1 == point2)) return TRUE;

    /// Check if three points are collinear
    R3Vector v = point1 - *this;
    v.Cross(point1 - point2);
    if (RNIsZero(v.Length())) return TRUE;
    return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x37c12
pushq $0x1
popq %rbp
testl %eax, %eax
jne 0x37d1a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x37c12
testl %eax, %eax
jne 0x37d1a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x37c12
testl %eax, %eax
jne 0x37d1a
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x37d29
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x37d29
movq %r12, %rdi
movq %r15, %rsi
callq 0x38680
movq %r12, %rdi
callq 0x38412
leaq 0xa2eb3(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd 0x5b32f(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
cmplepd %xmm0, %xmm2
cmplepd %xmm1, %xmm0
andpd %xmm2, %xmm0
movd %xmm0, %ebp
andl $0x1, %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Project(gaps::R3Line const&)
void R3Point::
Project(const R3Line& line)
{
    // Move point to closest point on line
    const R3Point *p = &(line.Point());
    const R3Vector *v = &(line.Vector());
    RNScalar denom = v->Dot(*v);
    if (RNIsZero(denom)) return;
    RNScalar t = (v->X() * (X() - p->X()) + v->Y() *(Y() - p->Y()) + v->Z() * (Z() - p->Z())) / denom;
    *this = *p + *v * t;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsi), %r15
movq %r15, %rdi
movq %r15, %rsi
callq 0x38586
leaq 0xa2e2d(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd 0x5b2a9(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x37d97
ucomisd %xmm0, %xmm1
jae 0x37e07
movsd (%rbx), %xmm2
movsd 0x8(%rbx), %xmm1
subsd (%r14), %xmm2
subsd 0x8(%r14), %xmm1
mulsd 0x20(%r14), %xmm1
mulsd 0x18(%r14), %xmm2
addsd %xmm1, %xmm2
movsd 0x10(%rbx), %xmm1
subsd 0x10(%r14), %xmm1
mulsd 0x28(%r14), %xmm1
addsd %xmm2, %xmm1
divsd %xmm0, %xmm1
movq %rsp, %r12
movq %r12, %rdi
movq %r15, %rsi
movapd %xmm1, %xmm0
callq 0x38a02
movsd 0x10(%r14), %xmm0
addsd 0x10(%r12), %xmm0
movupd (%r14), %xmm1
addpd (%r12), %xmm1
movupd %xmm1, (%rbx)
movsd %xmm0, 0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::XRotate(double)
void R3Point:: 
XRotate(RNAngle radians)
{
    // rotate matrix around X axis counterclockwise
    RNScalar c = cos(radians);
    RNScalar s = sin(radians);
    RNScalar y = v[1];
    RNScalar z = v[2];
    v[1] = c*y - s*z;
    v[2] = s*y + c*z;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0xe890
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0xe0f0
movupd 0x8(%rbx), %xmm1
movapd 0x5b0ee(%rip), %xmm2    # 0x93030
xorpd %xmm0, %xmm2
movsd 0x10(%rbx), %xmm3
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
movapd 0x10(%rsp), %xmm4
unpcklpd %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0]
mulpd %xmm3, %xmm2
unpcklpd %xmm0, %xmm4            # xmm4 = xmm4[0],xmm0[0]
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm4, %xmm1
addpd %xmm2, %xmm1
movupd %xmm1, 0x8(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Rotate(gaps::R3Vector const&)
void R3Point:: 
Rotate(const R3Vector& radians)
{
    // Rotate first around X, then around Y, and finally around Z
    ZRotate(radians.Z());
    YRotate(radians.Y());
    XRotate(radians.X());
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x10(%rsi), %xmm0
callq 0x37fd8
movsd 0x8(%rbx), %xmm0
movq %r14, %rdi
callq 0x37f78
movsd (%rbx), %xmm0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x37f12
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Rotate(gaps::R3Vector const&, double)
void R3Point::
Rotate(const R3Vector& axis, RNAngle theta)
{
    // Rotate point counterclockwise around axis through origin by radians ???
    R3Vector v = Vector();
    v.Rotate(axis, theta);
    *this = v.Point();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x212f8
movq %r15, %rdi
movq %rbx, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x3889c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3843a
movaps (%rbx), %xmm0
movups %xmm0, (%r14)
movsd 0x10(%rbx), %xmm0
movsd %xmm0, 0x10(%r14)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Point.cpp
// Function: gaps::R3Point::Rotate(gaps::R3Line const&, double)
void R3Point::
Rotate(const R3Line& axis, RNAngle theta)
{
    // Translate axis to origin
    R3Vector v = *this - axis.Point();

    // Rotate point counterclockwise around axis through origin by radians ???
    v.Rotate(axis.Vector(), theta);

    // Translate axis back from origin
    *this = axis.Point() + v;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x37d29
leaq 0x18(%rbx), %rsi
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x3889c
movsd 0x10(%rbx), %xmm0
addsd 0x10(%r15), %xmm0
movupd (%rbx), %xmm1
addpd (%r15), %xmm1
movupd %xmm1, (%r14)
movsd %xmm0, 0x10(%r14)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::R3Vector(double, double)
R3Vector::
R3Vector(RNAngle pitch, RNAngle yaw)
{
    RNScalar cosine_yaw = cos(yaw);
    v[0] = cosine_yaw * cos(pitch);
    v[1] = cosine_yaw * sin(pitch); 
    v[2] = sin(yaw);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq %rdi, %rbx
movaps %xmm1, %xmm0
callq 0xe890
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0xe890
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm0
callq 0xe0f0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rbx)
movsd 0x18(%rsp), %xmm0
callq 0xe0f0
movsd %xmm0, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Sextant() const
const RNSextant R3Vector::
Sextant(void) const
{
    // Return principal direction of vector
    if (fabs(v[0]) >= fabs(v[1])) {
        if (fabs(v[0]) >= fabs(v[2])) {
            if (v[0] >= 0.0) return RN_PX_SEXTANT;
            else return RN_NX_SEXTANT;
        }
        else {
            if (v[2] >= 0.0) return RN_PZ_SEXTANT;
            else return RN_NZ_SEXTANT;
        }
    }
    else {
        if (fabs(v[1]) >= fabs(v[2])) {
            if (v[1] >= 0.0) return RN_PY_SEXTANT;
            else return RN_NY_SEXTANT;
        }
        else {
            if (v[2] >= 0.0) return RN_PZ_SEXTANT;
            else return RN_NZ_SEXTANT;
        }
    }
}

// Assembly:
movdqu (%rdi), %xmm0
movdqa 0x5ad9a(%rip), %xmm2    # 0x93270
movdqa %xmm0, %xmm3
pand %xmm2, %xmm3
pshufd $0xee, %xmm3, %xmm4     # xmm4 = xmm3[2,3,2,3]
ucomisd %xmm4, %xmm3
movq 0x10(%rdi), %xmm1
pand %xmm1, %xmm2
jae 0x38508
ucomisd %xmm2, %xmm4
jb 0x3850e
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
pxor %xmm1, %xmm1
ucomisd %xmm1, %xmm0
pushq $0x3
jmp 0x38518
ucomisd %xmm2, %xmm3
jae 0x3851d
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
pushq $0x5
popq %rax
sbbl $0x0, %eax
retq
pxor %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Octant() const
const RNOctant R3Vector::
Octant(void) const
{
    // Return octant vector points into
    if (v[0] >= 0.0) {
        if (v[1] >= 0.0) {
	    if (v[2] >= 0.0) return RN_PPP_OCTANT;
            else return RN_PPN_OCTANT;
        }
	else {
	    if (v[2] >= 0.0) return RN_PNP_OCTANT;
            else return RN_PNN_OCTANT;
        }
    }
    else {
        if (v[1] >= 0.0) {
	    if (v[2] >= 0.0) return RN_NPP_OCTANT;
            else return RN_NPN_OCTANT;
        }
	else {
	    if (v[2] >= 0.0) return RN_NNP_OCTANT;
            else return RN_NNN_OCTANT;
        }
    }
}

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movsd 0x10(%rdi), %xmm0
jae 0x38558
ucomisd %xmm2, %xmm1
jae 0x3856a
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm1, %xmm0
setae %al
retq
ucomisd %xmm2, %xmm1
jae 0x38576
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
pushq $0x5
jmp 0x38580
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
pushq $0x3
jmp 0x38580
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
pushq $0x7
popq %rax
sbbl $0x0, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Rotate(gaps::R3Vector const&)
void R3Vector:: 
Rotate(const R3Vector& radians)
{
    // Rotate first around X, then around Y, and finally around Z
    ZRotate(radians.Z());
    YRotate(radians.Y());
    XRotate(radians.X());
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x10(%rsi), %xmm0
callq 0x38788
movsd 0x8(%rbx), %xmm0
movq %r14, %rdi
callq 0x38728
movsd (%rbx), %xmm0
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x386c2
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Rotate(gaps::R3Vector const&, double)
void R3Vector::
Rotate(const R3Vector& axis, RNAngle theta)
{
    // Rotate vector counterclockwise around axis (looking at axis end-on) (rz(xaxis) = yaxis)
    // From Goldstein: v' = v cos t + a (v . a) [1 - cos t] - (v x a) sin t
    if (RNIsEqual(fabs(Dot(axis)), 1.0)) return;
    const RNScalar cos_theta = cos(theta);
    const RNScalar dot = this->Dot(axis);
    R3Vector cross = *this % axis;
    *this *= cos_theta;
    *this += axis * dot * (1.0 - cos_theta);
    *this -= cross * sin(theta); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
callq 0x38586
andpd 0x5a9b2(%rip), %xmm0    # 0x93270
leaq 0xa22e3(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
addsd 0x5a74f(%rip), %xmm0    # 0x93020
movapd 0x5a757(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x388ed
ucomisd %xmm0, %xmm1
jae 0x389b4
movsd 0x8(%rsp), %xmm0
callq 0xe890
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38586
movaps %xmm0, 0x10(%rsp)
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x389be
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x389e0
movsd 0x10(%r14), %xmm0
movapd 0x10(%rsp), %xmm3
mulsd %xmm3, %xmm0
movsd 0x5a6c3(%rip), %xmm1    # 0x93008
subsd (%rsp), %xmm1
mulsd %xmm1, %xmm0
movupd (%r14), %xmm2
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm2, %xmm3
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm3, %xmm1
leaq 0x20(%rsp), %r14
movapd %xmm1, (%r14)
movsd %xmm0, 0x10(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x38a24
movsd 0x8(%rsp), %xmm0
callq 0xe0f0
movsd 0x10(%r15), %xmm1
mulsd %xmm0, %xmm1
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd (%r15), %xmm0
movapd %xmm0, (%r14)
movsd %xmm1, 0x10(%r14)
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x38a52
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::operator%(gaps::R3Vector const&, gaps::R3Vector const&)
R3Vector 
operator%(const R3Vector& vector1, const R3Vector& vector2)
{
    // Cross product 
    R3Vector v = vector1;
    v.Cross(vector2);
    return v;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, 0x10(%rdi)
movq %rdx, %rsi
callq 0x38680
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3Vector::Project(gaps::R3Vector const&)
void R3Vector::
Project(const R3Vector& vector)
{
    // Project onto another vector    
    RNScalar dot = this->Dot(vector);
    RNLength length = vector.Length();
    if ((RNIsPositive(length)) && (length != 1.0)) 
	dot /= (length * length);
    *this = vector * dot;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x38586
movsd 0x10(%r14), %xmm1
leaq 0xa210c(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm2
movupd (%r14), %xmm3
movapd %xmm3, %xmm4
mulpd %xmm3, %xmm4
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
movapd %xmm3, %xmm5
mulsd %xmm3, %xmm5
addsd %xmm4, %xmm5
movapd %xmm1, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm5, %xmm4
sqrtsd %xmm4, %xmm4
movapd %xmm4, %xmm5
mulsd %xmm4, %xmm5
movapd %xmm0, %xmm6
divsd %xmm5, %xmm6
cmpltsd %xmm4, %xmm2
cmpneqsd 0x5a51d(%rip), %xmm4    # 0x93008
movapd %xmm4, %xmm5
andnpd %xmm0, %xmm5
andpd %xmm6, %xmm4
orpd %xmm5, %xmm4
andpd %xmm2, %xmm4
andnpd %xmm0, %xmm2
orpd %xmm4, %xmm2
movapd %xmm2, %xmm0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
mulpd %xmm3, %xmm0
mulsd %xmm1, %xmm2
movupd %xmm0, (%rbx)
movsd %xmm2, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Vector.cpp
// Function: gaps::R3RandomDirection()
R3Vector 
R3RandomDirection(void)
{
  RNScalar phi = RN_TWO_PI * RNRandomScalar();
  RNScalar z = RNRandomScalar();
  RNScalar theta = acos(z);
  RNScalar sin_theta = sin(theta);
  RNScalar x = sin_theta * cos(phi);
  RNScalar y = sin_theta * sin(phi);
  R3Vector vector(x, y, z);
  if (RNRandomScalar() < 0.5) vector.Flip();
  return vector;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x62217(%rip), %r14     # 0x9af68
callq 0x67e16
mulsd (%r14), %xmm0
movsd %xmm0, (%rsp)
callq 0x67e16
movsd %xmm0, 0x8(%rsp)
callq 0xe400
callq 0xe0f0
movapd %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
callq 0xe890
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0xe0f0
movapd 0x20(%rsp), %xmm1
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd 0x10(%rsp), %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
callq 0x67e16
movsd 0x5a248(%rip), %xmm1    # 0x93010
ucomisd %xmm0, %xmm1
jbe 0x38dd6
movq %rbx, %rdi
callq 0x38662
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)