LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Divide(gaps::R3Grid const&)
void R3Grid::
Divide(const R3Grid& grid) 
{
  // Resolutions must be the same (for now)
  assert(grid_resolution[0] == grid.grid_resolution[0]);
  assert(grid_resolution[1] == grid.grid_resolution[1]);
  assert(grid_resolution[2] == grid.grid_resolution[2]);

  // Divide passed grid values by corresponding entries of this grid
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid.grid_values[i];
    if (RNIsNotZero(value, 1.0E-20)) grid_values[i] /= value;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl $0x0, 0x14(%rsp)
movq (%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5d0a6
movq 0x18(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0xd6e17(%rip), %xmm1    # 0x133e80
callq 0x555a0
cmpl $0x0, %eax
je 0x5d097
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm1
movq 0x230(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5d099
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x5d02f
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Min(gaps::R3Grid const&)
void R3Grid::
Min(const R3Grid& grid) 
{
  // Resolutions must be the same (for now)
  assert(grid_resolution[0] == grid.grid_resolution[0]);
  assert(grid_resolution[1] == grid.grid_resolution[1]);
  assert(grid_resolution[2] == grid.grid_resolution[2]);

  // Keep minimum value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value0 = grid_values[i];
    RNScalar value1 = grid.grid_values[i];
    if (value1 < value0) grid_values[i] = value1;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x30(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5d155
movq -0x30(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x28(%rsp), %xmm1
movsd -0x20(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5d143
movq -0x30(%rsp), %rax
movsd -0x28(%rsp), %xmm0
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5d145
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5d0cc
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Max(gaps::R3Grid const&)
void R3Grid::
Max(const R3Grid& grid) 
{
  // Resolutions must be the same (for now)
  assert(grid_resolution[0] == grid.grid_resolution[0]);
  assert(grid_resolution[1] == grid.grid_resolution[1]);
  assert(grid_resolution[2] == grid.grid_resolution[2]);

  // Keep maximum value
  for (int i = 0; i < grid_size; i++) {
    RNScalar value0 = grid_values[i];
    RNScalar value1 = grid.grid_values[i];
    if (value1 > value0) grid_values[i] = value1;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x30(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5d201
movq -0x30(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x20(%rsp)
movq -0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x28(%rsp), %xmm0
ucomisd -0x20(%rsp), %xmm0
jbe 0x5d1ef
movq -0x30(%rsp), %rax
movsd -0x28(%rsp), %xmm0
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5d1f1
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5d17c
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Pow(double)
void R3Grid::
Pow(RNScalar exponent) 
{
  // Raise each grid value to exponent
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = *grid_valuep;
    if (value < 0) value = -value;
    *(grid_valuep++) = pow(value, exponent);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x230(%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5d2c1
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x10(%rsp), %xmm0
jbe 0x5d28b
movsd 0x10(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0xf880
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x20(%rsp)
movsd %xmm0, (%rax)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x5d23d
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Mask(gaps::R3Grid const&)
void R3Grid::
Mask(const R3Grid& mask) 
{
  // Resolutions must be the same (for now)
  assert(grid_resolution[0] == mask.grid_resolution[0]);
  assert(grid_resolution[1] == mask.grid_resolution[1]);
  assert(grid_resolution[2] == mask.grid_resolution[2]);

  // Set values to zero where mask is zero
  for (int i = 0; i < grid_size; i++) 
    if (mask.grid_values[i] == 0) grid_values[i] = 0;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5d346
movq -0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5d337
jp 0x5d337
movq -0x20(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5d339
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5d2ec
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::SetWorldToGridTransformation(gaps::R3Affine const&)
void R3Grid::
SetWorldToGridTransformation(const R3Affine& affine)
{
  // Set transformations
  world_to_grid_transform = affine;
  grid_to_world_transform = affine.Inverse();
  world_to_grid_scale_factor = affine.ScaleFactor();
  grid_to_world_scale_factor = (world_to_grid_scale_factor != 0) ? 1 / world_to_grid_scale_factor : 1.0;
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x140(%rsp)
movq %rsi, 0x138(%rsp)
movq 0x140(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x138(%rsp), %rsi
addq $0x110, %rdi            # imm = 0x110
callq 0x392c0
movq 0x138(%rsp), %rsi
leaq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x6be40
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x392c0
jmp 0x5e490
leaq 0x28(%rsp), %rdi
callq 0x4d430
movq 0x138(%rsp), %rdi
movq (%rdi), %rax
callq *0xc0(%rax)
movq 0x8(%rsp), %rax
movsd %xmm0, 0x220(%rax)
movsd 0x220(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5e4cd
jp 0x5e4cd
jmp 0x5e4e9
movq 0x8(%rsp), %rax
movsd 0xd4b2e(%rip), %xmm0    # 0x133008
divsd 0x220(%rax), %xmm0
movsd %xmm0, (%rsp)
jmp 0x5e4f8
movsd 0xd4b17(%rip), %xmm0    # 0x133008
movsd %xmm0, (%rsp)
jmp 0x5e4f8
movq 0x8(%rsp), %rax
movsd (%rsp), %xmm0
movsd %xmm0, 0x228(%rax)
addq $0x148, %rsp            # imm = 0x148
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x4d430
movq 0x20(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::SignedDistanceTransform()
void R3Grid::
SignedDistanceTransform(void)
{
  // Compute distance from boundary into interior (negative) and into exterior (positive)
  R3Grid copy(*this);
  SquaredDistanceTransform();
  Sqrt();
  copy.Threshold(0, 1, 0);
  copy.Substitute(R2_GRID_UNKNOWN_VALUE, 1);
  copy.SquaredDistanceTransform();
  copy.Sqrt();
  Subtract(copy);
}

// Assembly:
subq $0x288, %rsp            # imm = 0x288
movq %rdi, 0x280(%rsp)
movq 0x280(%rsp), %rsi
movq %rsi, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x568c0
movq 0x18(%rsp), %rdi
callq 0x58d20
jmp 0x5e572
movq 0x18(%rsp), %rdi
callq 0x588e0
leaq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movsd 0xd4a7a(%rip), %xmm1    # 0x133008
movsd %xmm1, 0x8(%rsp)
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
callq 0x59950
movsd 0x8(%rsp), %xmm1
movq 0x10(%rsp), %rdi
movsd 0xd58fe(%rip), %xmm0    # 0x133eb0
callq 0x5c6e0
movq 0x10(%rsp), %rdi
callq 0x58d20
jmp 0x5e5c3
leaq 0x30(%rsp), %rdi
callq 0x588e0
movq 0x18(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x5cec0
leaq 0x30(%rsp), %rdi
callq 0x56960
addq $0x288, %rsp            # imm = 0x288
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x56960
movq 0x28(%rsp), %rdi
callq 0xf890
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Gauss(double, int)
void R3Grid::
Gauss(RNLength sigma, RNBoolean square)
{
  // Check sigma
  if (sigma == 0.0) return;    

  // Replace each grid value with Gaussian of what was there before
  const RNScalar sqrt_two_pi = sqrt(RN_TWO_PI);
  RNScalar a = sqrt_two_pi * sigma;
  RNScalar fac = 1.0 / (a * a * a);
  RNScalar denom = -2.0 * sigma * sigma;
  if (RNIsZero(denom, 1.0E-6)) return;
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = grid_values[i];
    if (square) value *= value;
    grid_values[i] = fac * exp( value / denom );
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x48(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5e643
jp 0x5e643
jmp 0x5e766
leaq 0xd82ae(%rip), %rax     # 0x1368f8
movsd (%rax), %xmm0
callq 0xf390
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm1
mulsd 0x30(%rsp), %xmm1
mulsd 0x30(%rsp), %xmm1
movsd 0xd4983(%rip), %xmm0    # 0x133008
divsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0xd4b71(%rip), %xmm0    # 0x133208
mulsd 0x48(%rsp), %xmm0
mulsd 0x48(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0xd4b31(%rip), %xmm1    # 0x1331e8
callq 0x36b80
cmpl $0x0, %eax
je 0x5e6c6
jmp 0x5e766
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5e766
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x5e718
movsd 0x10(%rsp), %xmm0
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
divsd 0x20(%rsp), %xmm0
callq 0xf8c0
movq 0x8(%rsp), %rax
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x230(%rax), %rax
movslq 0x1c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x5e6ce
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::RasterizeGridValue(int, int, int, double, int)
void R3Grid::
RasterizeGridValue(int ix, int iy, int iz, RNScalar value, int operation)
{
  // Check if within bounds
  if ((ix < 0) || (ix > grid_resolution[0]-1)) return;
  if ((iy < 0) || (iy > grid_resolution[1]-1)) return;
  if ((iz < 0) || (iz > grid_resolution[2]-1)) return;

  // Update grid based on operation
  if (operation == R3_GRID_ADD_OPERATION) AddGridValue(ix, iy, iz, value);
  else if (operation == R3_GRID_SUBTRACT_OPERATION) AddGridValue(ix, iy, iz, -value);
  else if (operation == R3_GRID_REPLACE_OPERATION) SetGridValue(ix, iy, iz, value);
  else RNAbort("Unrecognized grid rasterization operation\n");
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movsd %xmm0, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x2c(%rsp)
jl 0x5f867
movq 0x8(%rsp), %rcx
movl 0x2c(%rsp), %eax
movl 0x238(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x5f86c
jmp 0x5f948
cmpl $0x0, 0x28(%rsp)
jl 0x5f889
movq 0x8(%rsp), %rcx
movl 0x28(%rsp), %eax
movl 0x23c(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x5f88e
jmp 0x5f948
cmpl $0x0, 0x24(%rsp)
jl 0x5f8ab
movq 0x8(%rsp), %rcx
movl 0x24(%rsp), %eax
movl 0x240(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x5f8b0
jmp 0x5f948
cmpl $0x0, 0x14(%rsp)
jne 0x5f8d5
movq 0x8(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movsd 0x18(%rsp), %xmm0
callq 0x6bd70
jmp 0x5f948
cmpl $0x1, 0x14(%rsp)
jne 0x5f911
movq 0x8(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movsd 0x18(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
xorq %r8, %rax
movq %rax, %xmm0
callq 0x6bd70
jmp 0x5f946
cmpl $0x2, 0x14(%rsp)
jne 0x5f936
movq 0x8(%rsp), %rdi
movl 0x2c(%rsp), %esi
movl 0x28(%rsp), %edx
movl 0x24(%rsp), %ecx
movsd 0x18(%rsp), %xmm0
callq 0x6bc60
jmp 0x5f944
leaq 0xd496b(%rip), %rdi     # 0x1342a8
movb $0x0, %al
callq 0xd4e20
jmp 0x5f946
jmp 0x5f948
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Dot(gaps::R3Grid const&) const
RNScalar R3Grid::
Dot(const R3Grid& grid) const
{
  // Resolutions and transforms must be the same (for now)
  assert(grid_resolution[0] == grid.grid_resolution[0]);
  assert(grid_resolution[1] == grid.grid_resolution[1]);
  assert(grid_resolution[2] == grid.grid_resolution[2]);

  // Compute dot product between this and grid
  RNScalar dot = 0.0;
  for (int i = 0; i < grid_size; i++) 
    dot += grid_values[i] * grid.grid_values[i];
  return dot;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x627b3
movq -0x28(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0x18(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x62755
movsd -0x18(%rsp), %xmm0
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::L1Distance(gaps::R3Grid const&) const
RNScalar R3Grid::
L1Distance(const R3Grid& grid) const
{
  // Compute distance between this and grid
  RNScalar distance = 0.0;
  for (int i = 0; i < grid_size; i++) 
    distance += fabs(grid_values[i] - grid.grid_values[i]);
  return distance;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x62846
movq -0x28(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movaps 0xd0a47(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
addsd -0x18(%rsp), %xmm0
movsd %xmm0, -0x18(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x627e5
movsd -0x18(%rsp), %xmm0
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::L2DistanceSquared(gaps::R3Grid const&) const
RNScalar R3Grid::
L2DistanceSquared(const R3Grid& grid) const
{
  // Compute distance between this and grid
  RNScalar distance_squared = 0.0;
  for (int i = 0; i < grid_size; i++) {
    RNScalar delta = (grid_values[i] - grid.grid_values[i]);
    distance_squared += delta * delta;
  }

  // Return result
  return distance_squared;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x30(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x628e5
movq -0x30(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x28(%rsp), %xmm0
movsd -0x28(%rsp), %xmm2
movsd -0x18(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x62875
movsd -0x18(%rsp), %xmm0
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::WorldSpacing(int) const
RNScalar R3Grid::
WorldSpacing(RNDimension dim) const
{
  // Return distance between grid samples in dimension
  assert((0 <= dim) && (dim <= 2));
  RNScalar m0 = grid_to_world_transform.Matrix()[0][dim];
  RNScalar m1 = grid_to_world_transform.Matrix()[1][dim];
  RNScalar m2 = grid_to_world_transform.Matrix()[2][dim];
  RNScalar spacing_squared = m0*m0 + m1*m1 + m2*m2;
  return sqrt(spacing_squared);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x4e2a0
movq %rax, %rdi
xorl %esi, %esi
callq 0x4e280
movq (%rsp), %rdi
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
callq 0x4e2a0
movq %rax, %rdi
movl $0x1, %esi
callq 0x4e280
movq (%rsp), %rdi
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
callq 0x4e2a0
movq %rax, %rdi
movl $0x2, %esi
callq 0x4e280
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
movsd 0x18(%rsp), %xmm0
mulsd 0x18(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
movsd 0x10(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0xf390
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::ReadGridFile(char const*)
int R3Grid::
ReadGridFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open voxel file %s", filename);
    return 0;
  }

  // Read 
  int status = ReadGrid(fp);

  // Close file
  fclose(fp);

  // Return status
  return status;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
leaq 0xd0675(%rip), %rsi     # 0x1335d9
callq 0xf5e0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x62f93
movq 0x20(%rsp), %rsi
leaq 0xd13b6(%rip), %rdi     # 0x134338
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x34(%rsp)
jmp 0x62fb8
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x66ec0
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
callq 0xf4b0
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::WriteFile(char const*) const
int R3Grid::
WriteFile(const char *filename) const
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .ply)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  int status = 0;
  if (!strncmp(extension, ".grd", 4)) 
    status = WriteGridFile(filename);
  else if (!strncmp(extension, ".dx", 3)) 
    status = WriteDXFile(filename);
  else if (!strncmp(extension, ".raw", 4)) 
    status = WriteRawFile(filename);
  else if (!strncmp(extension, ".pdb", 4)) 
    status = WritePDBFile(filename);
  else {
    RNFail("Unable to write file %s (unrecognized extension: %s)\n", filename, extension);
    return 0;
  }

  // Return status
  return status;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0x2e, %esi
callq 0xf580
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
jne 0x65ed2
movq 0x20(%rsp), %rsi
leaq 0xcd497(%rip), %rdi     # 0x133355
movb $0x0, %al
callq 0xf070
movl $0x0, 0x34(%rsp)
jmp 0x65fd7
movl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %rdi
leaq 0xce3ed(%rip), %rsi     # 0x1342d3
movl $0x4, %edx
callq 0xf230
cmpl $0x0, %eax
jne 0x65f0d
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x65fe0
movl %eax, 0x14(%rsp)
jmp 0x65fcf
movq 0x18(%rsp), %rdi
leaq 0xce3ce(%rip), %rsi     # 0x1342e7
movl $0x3, %edx
callq 0xf230
cmpl $0x0, %eax
jne 0x65f40
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x66070
movl %eax, 0x14(%rsp)
jmp 0x65fcd
movq 0x18(%rsp), %rdi
leaq 0xce3a4(%rip), %rsi     # 0x1342f0
movl $0x4, %edx
callq 0xf230
cmpl $0x0, %eax
jne 0x65f77
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
leaq 0xce389(%rip), %rdx     # 0x1342f5
callq 0x66550
movl %eax, 0x14(%rsp)
jmp 0x65fcb
movq 0x18(%rsp), %rdi
leaq 0xce37a(%rip), %rsi     # 0x1342fd
movl $0x4, %edx
callq 0xf230
cmpl $0x0, %eax
jne 0x65fa7
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x66bc0
movl %eax, 0x14(%rsp)
jmp 0x65fc9
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0xce34a(%rip), %rdi     # 0x134302
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x34(%rsp)
jmp 0x65fd7
jmp 0x65fcb
jmp 0x65fcd
jmp 0x65fcf
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::WriteGridFile(char const*) const
int R3Grid::
WriteGridFile(const char *filename) const
{
  // Open file
  FILE *fp = fopen(filename, "wb");
  if (!fp) {
    RNFail("Unable to open voxel file %s", filename);
    return 0;
  }

  // Write
  int status = WriteGrid(fp);

  // Close file
  fclose(fp);

  // Return status
  return status;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
leaq 0xcdab6(%rip), %rsi     # 0x133aba
callq 0xf5e0
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x66033
movq 0x20(%rsp), %rsi
leaq 0xce316(%rip), %rdi     # 0x134338
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x34(%rsp)
jmp 0x66058
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x67300
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
callq 0xf4b0
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::WriteGrid(_IO_FILE*) const
int R3Grid::
WriteGrid(FILE *fp) const
{
  // Check file
  if (!fp) fp = stdout;

  // Write grid resolution to file
  if (fwrite(&grid_resolution, sizeof(int), 3, fp) != 3) {
    RNFail("Unable to write resolution to file");
    return 0;
  }

  // Write world_to_grid transformation to file
  const RNScalar *m = &(world_to_grid_transform.Matrix()[0][0]);
  for (int i = 0; i < 16; i++) {
    float value = (float) *(m++);
    if (fwrite(&value, sizeof(float), 1, fp) != 1) {
      RNFail("Unable to write transformation matrix value to file");
      return 0;
    }
  }

  // Write grid values to file
  const RNScalar *grid_valuesp = grid_values;
  for (int i = 0; i < grid_size; i++) {
    float value = (float) *(grid_valuesp++);
    if (fwrite(&value, sizeof(float), 1, fp) != 1) {
      RNFail("Unable to write grid value to file");
      return 0;
    }
  }

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

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x6732f
movq 0x107c69(%rip), %rax    # 0x16ef90
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %rdi
addq $0x238, %rdi            # imm = 0x238
movq 0x30(%rsp), %rcx
movl $0x4, %esi
movl $0x3, %edx
callq 0xf980
cmpq $0x3, %rax
je 0x67370
leaq 0xcd09c(%rip), %rdi     # 0x1343f8
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x44(%rsp)
jmp 0x674a5
movq 0x8(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x4e2a0
movq %rax, %rdi
xorl %esi, %esi
callq 0x4e280
movq %rax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
cmpl $0x10, 0x24(%rsp)
jge 0x67407
movq 0x28(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x28(%rsp)
movsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x20(%rsp)
movq 0x30(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf980
cmpq $0x1, %rax
je 0x673f8
leaq 0xcd037(%rip), %rdi     # 0x13441b
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x44(%rsp)
jmp 0x674a5
jmp 0x673fa
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x67398
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x67496
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x18(%rsp)
movsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rcx
leaq 0x10(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf980
cmpq $0x1, %rax
je 0x67487
leaq 0xccfd9(%rip), %rdi     # 0x13444f
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x44(%rsp)
jmp 0x674a5
jmp 0x67489
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x67420
movq 0x8(%rsp), %rax
movl 0x24c(%rax), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: int gaps::ReadRawValues<double>(_IO_FILE*, double*, int)
static int
ReadRawValues(FILE *fp, RNScalar *values, int nvalues)
{
  // Read values of type T into array of RNScalar
  for (int i = 0; i < nvalues; i++) {
    T value;
    if (fread(&value, sizeof(T), 1, fp) != 1) return 0;
    values[i] = (RNScalar) value;
  }
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x675ac
movq 0x18(%rsp), %rcx
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0xf780
cmpq $0x1, %rax
je 0x6758b
movl $0x0, 0x24(%rsp)
jmp 0x675b4
movsd (%rsp), %xmm0
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x6755a
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::ReadRawTransformationFile(char const*, gaps::R3Affine&)
static int 
ReadRawTransformationFile(const char *filename, R3Affine& transformation)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) return 0;

  // Read transformation matrix
  RNScalar m[16];
  if (fscanf(fp, "%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf", 
    &m[0], &m[1], &m[2], &m[3],     &m[4], &m[5], &m[6], &m[7],
    &m[8], &m[9], &m[10], &m[11],   &m[12], &m[13], &m[14], &m[15]) != 16) {
    RNFail("Unable to read transformation file %s", filename);
    return 0;
  }
 
  // Close file
  fclose(fp);
   
  // Fill in transformation
  transformation.Reset(R4Matrix(m), 0);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x198(%rsp)
movq %rsi, 0x190(%rsp)
movq 0x198(%rsp), %rdi
leaq 0xd0b83(%rip), %rsi     # 0x138673
callq 0xf5e0
movq %rax, 0x188(%rsp)
cmpq $0x0, 0x188(%rsp)
jne 0x67b18
movl $0x0, 0x1a4(%rsp)
jmp 0x67cb9
movq 0x188(%rsp), %rdi
leaq 0x100(%rsp), %rdx
leaq 0x100(%rsp), %rcx
addq $0x8, %rcx
leaq 0x100(%rsp), %r8
addq $0x10, %r8
leaq 0x100(%rsp), %r9
addq $0x18, %r9
leaq 0x100(%rsp), %rax
addq $0x20, %rax
leaq 0x100(%rsp), %rsi
addq $0x28, %rsi
movq %rsi, 0x68(%rsp)
leaq 0x100(%rsp), %rsi
addq $0x30, %rsi
movq %rsi, 0x70(%rsp)
leaq 0x100(%rsp), %rbp
addq $0x38, %rbp
leaq 0x100(%rsp), %r13
addq $0x40, %r13
leaq 0x100(%rsp), %r12
addq $0x48, %r12
leaq 0x100(%rsp), %r15
addq $0x50, %r15
leaq 0x100(%rsp), %r14
addq $0x58, %r14
leaq 0x100(%rsp), %rbx
addq $0x60, %rbx
leaq 0x100(%rsp), %r11
addq $0x68, %r11
leaq 0x100(%rsp), %r10
addq $0x70, %r10
leaq 0x100(%rsp), %rsi
addq $0x78, %rsi
movq %rsi, 0x78(%rsp)
leaq 0xcd561(%rip), %rsi     # 0x135153
movq %rax, (%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq %rbp, 0x18(%rsp)
movq %r13, 0x20(%rsp)
movq %r12, 0x28(%rsp)
movq %r15, 0x30(%rsp)
movq %r14, 0x38(%rsp)
movq %rbx, 0x40(%rsp)
movq %r11, 0x48(%rsp)
movq %r10, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movb $0x0, %al
callq 0xf910
cmpl $0x10, %eax
je 0x67c6b
movq 0x198(%rsp), %rsi
leaq 0xcd52d(%rip), %rdi     # 0x135184
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x1a4(%rsp)
jmp 0x67cb9
movq 0x188(%rsp), %rdi
callq 0xf4b0
movq 0x190(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x100(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x51d90
movq 0x60(%rsp), %rdi
leaq 0x80(%rsp), %rsi
xorl %edx, %edx
callq 0x4e1c0
movl $0x1, 0x1a4(%rsp)
movl 0x1a4(%rsp), %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::WriteRawSizeFile(char const*, int, int, int, char const*)
static int 
WriteRawSizeFile(const char *filename, int xres, int yres, int zres, const char *format)
{
  // Check format
  if (!strcmp(format, "ZNN")) {
    if (WriteBinaryRawSizeFile(filename, xres, yres, zres, "Double64")) return 1;
  }
  else {
    if (WriteAsciiRawSizeFile(filename, xres, yres, zres, format)) return 1;
  }
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl %edx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq %r8, (%rsp)
movq (%rsp), %rdi
leaq 0xcd4a6(%rip), %rsi     # 0x1351aa
callq 0xf700
cmpl $0x0, %eax
jne 0x67d3c
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
leaq 0xcc791(%rip), %r8      # 0x1344b7
callq 0x6b900
cmpl $0x0, %eax
je 0x67d3a
movl $0x1, 0x24(%rsp)
jmp 0x67d6f
jmp 0x67d67
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %ecx
movq (%rsp), %r8
callq 0x6b9e0
cmpl $0x0, %eax
je 0x67d65
movl $0x1, 0x24(%rsp)
jmp 0x67d6f
jmp 0x67d67
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: int gaps::WriteRawValues<double>(_IO_FILE*, double*, int)
static int
WriteRawValues(FILE *fp, RNScalar *values, int nvalues)
{
  // Write values of type T from array of RNScalar
  for (int i = 0; i < nvalues; i++) {
    T value = (T) values[i];
    if (fwrite(&value, sizeof(T), 1, fp) != 1) return 0;
  }
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x680fe
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rsp)
movq 0x18(%rsp), %rcx
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0xf980
cmpq $0x1, %rax
je 0x680ef
movl $0x0, 0x24(%rsp)
jmp 0x68106
jmp 0x680f1
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x680aa
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x68c7f
movq 0x106319(%rip), %rax    # 0x16ef90
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x138c0
movq 0x30(%rsp), %rdi
movl %eax, 0x28(%rsp)
callq 0x138e0
movq 0x30(%rsp), %rdi
movl %eax, 0x2c(%rsp)
callq 0x13900
movq 0x20(%rsp), %rdi
movl 0x28(%rsp), %edx
movl 0x2c(%rsp), %ecx
movl %eax, %r8d
leaq 0xcada7(%rip), %rsi     # 0x133a6d
movb $0x0, %al
callq 0xf730
movl $0x0, 0x44(%rsp)
movq 0x30(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x1c(%rsp)
callq 0x13900
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x68dc7
movl $0x0, 0x40(%rsp)
movq 0x30(%rsp), %rdi
movl 0x40(%rsp), %eax
movl %eax, 0x18(%rsp)
callq 0x138e0
movl %eax, %ecx
movl 0x18(%rsp), %eax
cmpl %ecx, %eax
jge 0x68da4
movl $0x0, 0x3c(%rsp)
movq 0x30(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x138c0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x68d81
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x3c(%rsp), %esi
movl 0x40(%rsp), %edx
movl 0x44(%rsp), %ecx
callq 0x6bad0
movq 0x8(%rsp), %rdi
leaq 0xcc314(%rip), %rsi     # 0x135081
movb $0x1, %al
callq 0xf730
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x68d25
movq 0x48(%rsp), %rdi
leaq 0xcfc85(%rip), %rsi     # 0x138a12
movb $0x0, %al
callq 0xf730
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x68cfd
movq 0x48(%rsp), %rdi
leaq 0xcfc62(%rip), %rsi     # 0x138a12
movb $0x0, %al
callq 0xf730
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x68cd5
movq 0x30(%rsp), %rax
movl 0x24c(%rax), %eax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::ReadBinaryRawSizeFile(char const*, int&, int&, int&, char*)
static int 
ReadBinaryRawSizeFile(const char *filename, int& xres, int& yres, int& zres, char *format)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open size file %s", filename);
    return 0;
  }

  // Read dimensions
  unsigned int values[3];
  if (fread(values, sizeof(unsigned int), 3, fp) != 3) {
    RNFail("Unable to read size file %s", filename);
    return 0;
  }

  // Close file
  fclose(fp);

  // Assign return values
  xres = values[0];
  yres = values[1];
  zres = values[2];
  strncpy(format, "Double64", 2047);

  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq 0x38(%rsp), %rdi
leaq 0xc7da0(%rip), %rsi     # 0x1335d9
callq 0xf5e0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x6b86b
movq 0x38(%rsp), %rsi
leaq 0xc982e(%rip), %rdi     # 0x135085
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x44(%rsp)
jmp 0x6b8f0
leaq 0x4(%rsp), %rdi
movq 0x10(%rsp), %rcx
movl $0x4, %esi
movl $0x3, %edx
callq 0xf780
cmpq $0x3, %rax
je 0x6b8a7
movq 0x38(%rsp), %rsi
leaq 0xc980b(%rip), %rdi     # 0x1350a1
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x44(%rsp)
jmp 0x6b8f0
movq 0x10(%rsp), %rdi
callq 0xf4b0
movl 0x4(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movl 0x8(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movl 0xc(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rdi
leaq 0xc8bd9(%rip), %rsi     # 0x1344b7
movl $0x7ff, %edx            # imm = 0x7FF
callq 0xf260
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::WriteBinaryRawSizeFile(char const*, int, int, int, char const*)
static int 
WriteBinaryRawSizeFile(const char *filename, int xres, int yres, int zres, const char *format)
{
  // Open file
  FILE *fp = fopen(filename, "wb");
  if (!fp) {
    RNFail("Unable to open size file %s", filename);
    return 0;
  }

  // Write dimensions
  int ngrids = 1;
  fwrite(&xres, sizeof(int), 1, fp);
  fwrite(&yres, sizeof(int), 1, fp);
  fwrite(&zres, sizeof(int), 1, fp);
  fwrite(&ngrids, sizeof(int), 1, fp);

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0xc8194(%rip), %rsi     # 0x133aba
callq 0xf5e0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x6b955
movq 0x28(%rsp), %rsi
leaq 0xc9741(%rip), %rdi     # 0x135085
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x34(%rsp)
jmp 0x6b9d3
movl $0x1, 0x4(%rsp)
movq 0x8(%rsp), %rcx
leaq 0x24(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf980
movq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf980
movq 0x8(%rsp), %rcx
leaq 0x1c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf980
movq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xf980
movq 0x8(%rsp), %rdi
callq 0xf4b0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::WriteAsciiRawSizeFile(char const*, int, int, int, char const*)
static int 
WriteAsciiRawSizeFile(const char *filename, int xres, int yres, int zres, const char *format)
{
  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open size file %s", filename);
    return 0;
  }

  // Write dimensions
  fprintf(fp, "%s(%d,%d,%d,1)\n", format, xres, yres, zres);

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0xc88ed(%rip), %rsi     # 0x1342f3
callq 0xf5e0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x6ba35
movq 0x28(%rsp), %rsi
leaq 0xc9661(%rip), %rdi     # 0x135085
movb $0x0, %al
callq 0xd4f30
movl $0x0, 0x34(%rsp)
jmp 0x6ba6d
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl 0x24(%rsp), %ecx
movl 0x20(%rsp), %r8d
movl 0x1c(%rsp), %r9d
leaq 0xc975a(%rip), %rsi     # 0x1351ae
movb $0x0, %al
callq 0xf730
movq 0x8(%rsp), %rdi
callq 0xf4b0
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x6fca0
movq 0x58(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0x3c0d0
movq (%rsp), %rsi
movq %rax, %rdx
leaq 0x38(%rsp), %rdi
callq 0x6eeb0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x70970
movq 0x50(%rsp), %rdi
callq 0x3c0f0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x70500
movq 0x28(%rsp), %rdi
callq 0x70410
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x13af0
movq 0x28(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
movl $0x1, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0x13af0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movq 0x28(%rsp), %rdi
movaps %xmm0, %xmm3
movsd 0x18(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x2, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x58(%rsp), %rdi
movl $0x2, %esi
callq 0x13af0
movsd 0x20(%rsp), %xmm1
movq 0x28(%rsp), %rax
movaps %xmm0, %xmm2
movsd 0x30(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
movsd %xmm0, 0x18(%rax)
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x6fca0
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x70af0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x70970
movq 0x20(%rsp), %rdi
callq 0x70410
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x13af0
movq 0x20(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
movl $0x1, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0x13af0
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq 0x20(%rsp), %rdi
movaps %xmm0, %xmm3
movsd 0x10(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movl $0x2, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x58(%rsp), %rdi
movl $0x2, %esi
callq 0x13af0
movsd 0x18(%rsp), %xmm1
movq 0x20(%rsp), %rax
movaps %xmm0, %xmm2
movsd 0x28(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
movsd %xmm0, 0x18(%rax)
addq $0x68, %rsp
retq
nop
// File: 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:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq 0x80(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x6fca0
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x6eeb0
movq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x70970
movq 0x68(%rsp), %rsi
movq 0x78(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x6eeb0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x70500
movq 0x28(%rsp), %rdi
callq 0x70410
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x13af0
movq 0x28(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
movl $0x1, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x78(%rsp), %rdi
movl $0x1, %esi
callq 0x13af0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movq 0x28(%rsp), %rdi
movaps %xmm0, %xmm3
movsd 0x18(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0x2, %esi
callq 0x36c00
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x78(%rsp), %rdi
movl $0x2, %esi
callq 0x13af0
movsd 0x20(%rsp), %xmm1
movq 0x28(%rsp), %rax
movaps %xmm0, %xmm2
movsd 0x30(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
movsd %xmm0, 0x18(%rax)
addq $0x88, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rsi
movq %rsi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x6d000
movq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x6f300
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x70da0
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6d0d0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rsi
movq %rsi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x6d000
movq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x6f7c0
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x78(%rax)
movq 0x8(%rsp), %rdi
callq 0x70410
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6d0d0
addq $0x38, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rsi
movq %rsi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x6d000
movq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x6f7f0
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x80(%rax)
movq 0x8(%rsp), %rdi
callq 0x70410
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x6d0d0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x6e3d0
movq (%rsp), %rdi
addq $0x30, %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x6f110
movq 0x20(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6fcf0
leaq 0x8(%rsp), %rdi
callq 0x6fe90
movq (%rsp), %rax
movsd %xmm0, 0x48(%rax)
movsd 0x48(%rax), %xmm0
leaq 0x10afda(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x555a0
cmpl $0x0, %eax
je 0x6d527
movq (%rsp), %rax
movsd 0x48(%rax), %xmm0
leaq 0x8(%rsp), %rdi
callq 0x70ec0
movq (%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movl $0x1, %ecx
callq 0x6e1a0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x6e3d0
movq (%rsp), %rdi
addq $0x30, %rdi
movq 0x20(%rsp), %rsi
callq 0x6eb90
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x6eeb0
leaq 0x8(%rsp), %rdi
callq 0x6fe90
movq (%rsp), %rax
movsd %xmm0, 0x48(%rax)
movsd 0x48(%rax), %xmm0
leaq 0x10af2a(%rip), %rax    # 0x1784e0
movsd (%rax), %xmm1
callq 0x555a0
cmpl $0x0, %eax
je 0x6d5d7
movq (%rsp), %rax
movsd 0x48(%rax), %xmm0
leaq 0x8(%rsp), %rdi
callq 0x70ec0
movq (%rsp), %rdi
movq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movl $0x1, %ecx
callq 0x6e1a0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)