LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::operator*(gaps::R4Matrix const&, gaps::R4Matrix const&)
R4Matrix 
operator*(const R4Matrix& a, const R4Matrix& b) 
{
    R4Matrix result;
    int r, c;

    // Multiply matrix
    for (r=0; r<4; r++)
	for (c=0; c<4; c++)
	    result.m[r][c] = a.m[r][0] * b.m[0][c] + a.m[r][1] * b.m[1][c] +
		             a.m[r][2] * b.m[2][c] + a.m[r][3] * b.m[3][c];

    // Return result
    return result;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
callq 0x51b50
movl $0x0, 0x1c(%rsp)
cmpl $0x4, 0x1c(%rsp)
jge 0x54fd6
movl $0x0, 0x18(%rsp)
cmpl $0x4, 0x18(%rsp)
jge 0x54fc4
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movsd (%rcx), %xmm0
movq 0x20(%rsp), %rcx
movslq 0x18(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm2
movq 0x28(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movsd 0x8(%rcx), %xmm1
movq 0x20(%rsp), %rcx
movslq 0x18(%rsp), %rdx
mulsd 0x20(%rcx,%rdx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x28(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movsd 0x10(%rcx), %xmm1
movq 0x20(%rsp), %rcx
movslq 0x18(%rsp), %rdx
movsd 0x40(%rcx,%rdx,8), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq 0x28(%rsp), %rcx
movslq 0x1c(%rsp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movsd 0x18(%rcx), %xmm0
movq 0x20(%rsp), %rcx
movslq 0x18(%rsp), %rdx
movsd 0x60(%rcx,%rdx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0x1c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movslq 0x18(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x54ee0
jmp 0x54fc6
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x54ecd
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::operator*(gaps::R4Matrix const&, gaps::R3Vector const&)
R3Vector
operator*(const R4Matrix& a, const R3Vector& v)
{
    // Multiply matrix by vector
    RNCoord x = a.m[0][0] * v.X() + a.m[0][1] * v.Y() + a.m[0][2] * v.Z();
    RNCoord y = a.m[1][0] * v.X() + a.m[1][1] * v.Y() + a.m[1][2] * v.Z();
    RNCoord z = a.m[2][0] * v.X() + a.m[2][1] * v.Y() + a.m[2][2] * v.Z();
    return R3Vector(x, y, z);
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x70(%rsp)
movq %rdi, %rax
movq %rax, 0x80(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c20
movsd %xmm0, 0x8(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c30
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x10(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c40
movsd 0x18(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x20(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c20
movsd %xmm0, 0x30(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c30
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x38(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c40
movsd 0x40(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x48(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c20
movsd %xmm0, 0x58(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c30
movsd 0x50(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x60(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x38c40
movsd 0x68(%rsp), %xmm1
movq 0x70(%rsp), %rdi
movaps %xmm0, %xmm2
movsd 0x78(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
callq 0x6fcb0
movq 0x80(%rsp), %rax
addq $0xb8, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::operator*(gaps::R4Matrix const&, gaps::R3Point const&)
R3Point 
operator*(const R4Matrix& a, const R3Point& p)
{
    // Multiply matrix by point
    RNCoord x = a.m[0][0] * p.X() + a.m[0][1] * p.Y() + a.m[0][2] * p.Z() + a.m[0][3];
    RNCoord y = a.m[1][0] * p.X() + a.m[1][1] * p.Y() + a.m[1][2] * p.Z() + a.m[1][3];
    RNCoord z = a.m[2][0] * p.X() + a.m[2][1] * p.Y() + a.m[2][2] * p.Z() + a.m[2][3];
    return R3Point(x, y, z);
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x70(%rsp)
movq %rdi, %rax
movq %rax, 0x80(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37820
movsd %xmm0, 0x8(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37870
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x10(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x378c0
movsd 0x18(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x20(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0xa8(%rsp), %rax
addsd 0x18(%rax), %xmm0
movsd %xmm0, 0x98(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37820
movsd %xmm0, 0x30(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x28(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37870
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x38(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x378c0
movsd 0x40(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x48(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0xa8(%rsp), %rax
addsd 0x38(%rax), %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x40(%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37820
movsd %xmm0, 0x58(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x48(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x37870
movsd 0x50(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x60(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0xa8(%rsp), %rax
movsd 0x50(%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x378c0
movsd 0x68(%rsp), %xmm1
movq 0x70(%rsp), %rdi
movaps %xmm0, %xmm2
movsd 0x78(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0xa8(%rsp), %rax
addsd 0x58(%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x98(%rsp), %xmm0
movsd 0x90(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
callq 0x6eb50
movq 0x80(%rsp), %rax
addq $0xb8, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::R3Grid(int, int, int)
R3Grid::
R3Grid(int xresolution, int yresolution, int zresolution)
{
  // Set grid resolution
  grid_resolution[0] = xresolution;
  grid_resolution[1] = yresolution;
  grid_resolution[2] = zresolution;
  grid_row_size = xresolution;
  grid_sheet_size = grid_row_size * yresolution;
  grid_size = grid_sheet_size * zresolution;

  // Allocate grid values
  if (grid_size == 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);

  // Set all values to zero
  for (int i = 0; i < grid_size; i++) grid_values[i] = 0;

  // Set transformations
  grid_to_world_transform = R3identity_affine;
  world_to_grid_transform = R3identity_affine;
  world_to_grid_scale_factor = 1.0;
  grid_to_world_scale_factor = 1.0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movl %edx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x4d310
movq 0x10(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq %rdi, 0x18(%rsp)
callq 0x4d310
jmp 0x556c4
movq 0x8(%rsp), %rax
movl 0x3c(%rsp), %ecx
movl %ecx, 0x238(%rax)
movl 0x38(%rsp), %ecx
movl %ecx, 0x23c(%rax)
movl 0x34(%rsp), %ecx
movl %ecx, 0x240(%rax)
movl 0x3c(%rsp), %ecx
movl %ecx, 0x244(%rax)
movl 0x244(%rax), %ecx
imull 0x38(%rsp), %ecx
movl %ecx, 0x248(%rax)
movl 0x248(%rax), %ecx
imull 0x34(%rsp), %ecx
movl %ecx, 0x24c(%rax)
cmpl $0x0, 0x24c(%rax)
jne 0x55741
movq 0x8(%rsp), %rax
movq $0x0, 0x230(%rax)
jmp 0x5579d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x55833
movq 0x8(%rsp), %rax
movslq 0x24c(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0xf030
movq %rax, (%rsp)
jmp 0x5576e
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, 0x230(%rax)
jmp 0x5579d
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x4d430
jmp 0x55833
movl $0x0, 0x20(%rsp)
movq 0x8(%rsp), %rcx
movl 0x20(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x557dc
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x20(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x557a5
movq 0x8(%rsp), %rdi
leaq 0x123168(%rip), %rsi    # 0x178950
callq 0x392c0
jmp 0x557ef
movq 0x8(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
leaq 0x12314e(%rip), %rsi    # 0x178950
callq 0x392c0
jmp 0x55809
movq 0x8(%rsp), %rax
movsd 0xdd7f2(%rip), %xmm0    # 0x133008
movsd %xmm0, 0x220(%rax)
movsd 0xdd7e2(%rip), %xmm0    # 0x133008
movsd %xmm0, 0x228(%rax)
addq $0x48, %rsp
retq
movq 0x10(%rsp), %rdi
callq 0x4d430
movq 0x28(%rsp), %rdi
callq 0xf890
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::R3Grid(int, int, int, gaps::R3Box const&)
R3Grid::
R3Grid(int xresolution, int yresolution, int zresolution, const R3Box& bbox)
{
  // Set grid resolution
  grid_resolution[0] = xresolution;
  grid_resolution[1] = yresolution;
  grid_resolution[2] = zresolution;
  grid_row_size = xresolution;
  grid_sheet_size = grid_row_size * yresolution;
  grid_size = grid_sheet_size * zresolution;

  // Allocate grid values
  if (grid_size == 0) grid_values = NULL;
  else grid_values = new RNScalar [ grid_size ];
  assert(!grid_size || grid_values);

  // Set all values to zero
  for (int i = 0; i < grid_size; i++) grid_values[i] = 0;

  // Set transformations
  SetWorldToGridTransformation(bbox);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movl %edx, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
movq %r8, 0x38(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
callq 0x4d310
movq 0x18(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
movq %rdi, 0x20(%rsp)
callq 0x4d310
jmp 0x55899
movq 0x10(%rsp), %rax
movl 0x4c(%rsp), %ecx
movl %ecx, 0x238(%rax)
movl 0x48(%rsp), %ecx
movl %ecx, 0x23c(%rax)
movl 0x44(%rsp), %ecx
movl %ecx, 0x240(%rax)
movl 0x4c(%rsp), %ecx
movl %ecx, 0x244(%rax)
movl 0x244(%rax), %ecx
imull 0x48(%rsp), %ecx
movl %ecx, 0x248(%rax)
movl 0x248(%rax), %ecx
imull 0x44(%rsp), %ecx
movl %ecx, 0x24c(%rax)
cmpl $0x0, 0x24c(%rax)
jne 0x55916
movq 0x10(%rsp), %rax
movq $0x0, 0x230(%rax)
jmp 0x55971
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
jmp 0x559c6
movq 0x10(%rsp), %rax
movslq 0x24c(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0xf030
movq %rax, 0x8(%rsp)
jmp 0x55944
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x230(%rax)
jmp 0x55971
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
callq 0x4d430
jmp 0x559c6
movl $0x0, 0x28(%rsp)
movq 0x10(%rsp), %rcx
movl 0x28(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x559b0
movq 0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x28(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x55979
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x559e0
jmp 0x559c1
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x4d430
movq 0x30(%rsp), %rdi
callq 0xf890
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::operator=(gaps::R3Grid const&)
R3Grid& R3Grid::
operator=(const R3Grid& grid) 
{
  // Delete old grid values
  if (grid_values) {
    if (grid_size != grid.grid_size) {
      delete [] grid_values;
      grid_values = NULL;
    }
  }

  // Allocate new grid values
  if (!grid_values && (grid.grid_size > 0)) {
    grid_values = new RNScalar [ grid.grid_size ];
    assert(grid_values);
  }

  // Copy grid resolution
  grid_resolution[0] = grid.grid_resolution[0];
  grid_resolution[1] = grid.grid_resolution[1];
  grid_resolution[2] = grid.grid_resolution[2];
  grid_row_size = grid.grid_row_size;
  grid_sheet_size = grid.grid_sheet_size;
  grid_size = grid.grid_size;

  // Copy grid values
  for (int i = 0; i < grid_size; i++) {
    grid_values[i] = grid.grid_values[i];
  }

  // Copy transforms
  grid_to_world_transform = grid.grid_to_world_transform;
  world_to_grid_transform = grid.world_to_grid_transform;
  world_to_grid_scale_factor = grid.world_to_grid_scale_factor;
  grid_to_world_scale_factor = grid.grid_to_world_scale_factor;

  // Return this
  return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x230(%rax)
je 0x5673b
movq 0x8(%rsp), %rax
movl 0x24c(%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x24c(%rcx), %eax
je 0x56739
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x56729
movq (%rsp), %rdi
callq 0xf670
movq 0x8(%rsp), %rax
movq $0x0, 0x230(%rax)
jmp 0x5673b
movq 0x8(%rsp), %rax
cmpq $0x0, 0x230(%rax)
jne 0x56794
movq 0x18(%rsp), %rax
cmpl $0x0, 0x24c(%rax)
jle 0x56794
movq 0x18(%rsp), %rax
movslq 0x24c(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x230(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movl 0x238(%rcx), %ecx
movl %ecx, 0x238(%rax)
movq 0x18(%rsp), %rcx
movl 0x23c(%rcx), %ecx
movl %ecx, 0x23c(%rax)
movq 0x18(%rsp), %rcx
movl 0x240(%rcx), %ecx
movl %ecx, 0x240(%rax)
movq 0x18(%rsp), %rcx
movl 0x244(%rcx), %ecx
movl %ecx, 0x244(%rax)
movq 0x18(%rsp), %rcx
movl 0x248(%rcx), %ecx
movl %ecx, 0x248(%rax)
movq 0x18(%rsp), %rcx
movl 0x24c(%rcx), %ecx
movl %ecx, 0x24c(%rax)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56851
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x230(%rcx), %rcx
movslq 0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x230(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x56807
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x392c0
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x110, %rsi            # imm = 0x110
addq $0x110, %rdi            # imm = 0x110
callq 0x392c0
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movsd 0x220(%rcx), %xmm0
movsd %xmm0, 0x220(%rax)
movq 0x18(%rsp), %rcx
movsd 0x228(%rcx), %xmm0
movsd %xmm0, 0x228(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Variance() const
RNScalar R3Grid::
Variance(void) const
{
  // Return the variance of the values in the grid
  RNScalar sum = 0;
  RNScalar mean = Mean();
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    RNScalar delta = (*(grid_valuep++) - mean);
    sum += delta * delta;
  }
  return sum / grid_size;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, (%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
callq 0x6ba80
movq (%rsp), %rax
movsd %xmm0, 0x20(%rsp)
movq 0x230(%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq (%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56a5c
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x18(%rsp)
movsd (%rax), %xmm0
subsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x8(%rsp), %xmm2
movsd 0x28(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x569fe
movq (%rsp), %rax
movsd 0x28(%rsp), %xmm0
cvtsi2sdl 0x24c(%rax), %xmm1
divsd %xmm1, %xmm0
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Percentile(double) const
RNScalar R3Grid::
Percentile(RNScalar percentile) const
{
  // Return value at given percentile 
  if (grid_size == 0) return 0.0;
  RNScalar *tmp_values = new RNScalar [ grid_size ];
  for (int i = 0; i < grid_size; i++) tmp_values[i] = grid_values[i];
  qsort(tmp_values, grid_size, sizeof(RNScalar), RNCompareScalars);
  int percentile_index = percentile * grid_size;
  RNScalar value = tmp_values[percentile_index];
  delete [] tmp_values;
  return value;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x24c(%rax)
jne 0x56ab0
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x56ba9
movq 0x10(%rsp), %rax
movslq 0x24c(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0xf030
movq %rax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56b2d
movq 0x10(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x28(%rsp), %rax
movslq 0x24(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x56aea
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rdi
movslq 0x24c(%rax), %rsi
movl $0x8, %edx
leaq 0x7dbe6(%rip), %rcx     # 0xd4730
callq 0xf950
movq 0x10(%rsp), %rax
movsd 0x30(%rsp), %xmm0
cvtsi2sdl 0x24c(%rax), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movslq 0x20(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x56b9d
movq 0x8(%rsp), %rdi
callq 0xf670
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Range() const
RNInterval R3Grid::
Range(void) const
{
  // Find smallest and largest values
  RNScalar minimum = FLT_MAX;
  RNScalar maximum = -FLT_MAX;
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    if (*grid_valuep < minimum) minimum = *grid_valuep;
    if (*grid_valuep > maximum) maximum = *grid_valuep;
    grid_valuep++;
  }
  return RNInterval(minimum, maximum);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0xdc434(%rip), %xmm0    # 0x133020
movsd %xmm0, 0x30(%rsp)
movsd 0xdd0c6(%rip), %xmm0    # 0x133cc0
movsd %xmm0, 0x28(%rsp)
movq 0x230(%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rcx
movl 0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56c84
movq 0x20(%rsp), %rax
movsd (%rax), %xmm1
movsd 0x30(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x56c49
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x56c69
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x56c14
movq (%rsp), %rdi
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0xd4570
movq 0x8(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::L1Norm() const
RNScalar R3Grid::
L1Norm(void) const
{
  // Return L1 norm of grid
  RNScalar sum = 0.0;
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) 
    sum += *(grid_valuep++);
  return sum;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56d1b
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rsp)
movsd (%rax), %xmm0
addsd -0x10(%rsp), %xmm0
movsd %xmm0, -0x10(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x56cdc
movsd -0x10(%rsp), %xmm0
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::L2NormSquared() const
RNScalar R3Grid::
L2NormSquared(void) const
{
  // Return L2 norm of grid
  RNScalar sum = 0.0;
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = *(grid_valuep++);
    sum += value * value;
  }
  return sum;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x10(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x30(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56db5
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x28(%rsp), %xmm0
movsd -0x28(%rsp), %xmm2
movsd -0x10(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x56d5c
movsd -0x10(%rsp), %xmm0
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Cardinality() const
int R3Grid::
Cardinality(void) const
{
  // Return number of non-zero grid values
  int count = 0;
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    RNScalar value = *(grid_valuep++);
    if (value == 0.0) continue;
    count++;
  }
  return count;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0xc(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x30(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x56e42
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rsp)
movsd -0x28(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x56e2a
jp 0x56e2a
jmp 0x56e35
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x56deb
movl -0xc(%rsp), %eax
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::GridCentroid() const
R3Point R3Grid::
GridCentroid(void) const
{
  // Compute weighted sum
  RNScalar total_value = 0;
  R3Point centroid(0,0,0);
  RNScalar *grid_valuesp = grid_values;
  for (int k = 0; k < grid_resolution[2]; k++) {
    for (int j = 0; j < grid_resolution[1]; j++) {
      for (int i = 0; i < grid_resolution[0]; i++) {
        R3Vector position(i, j, k);
        RNScalar value = *(grid_valuesp++);
        centroid += value * position;
        total_value += value;
      }
    }
  }

  // Divide by total value
  if (total_value > 0) centroid /= total_value;

  // Return centroid
  return centroid;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x70(%rsp)
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x6eb50
movq 0x18(%rsp), %rax
movq 0x230(%rax), %rax
movq %rax, 0x68(%rsp)
movl $0x0, 0x64(%rsp)
movq 0x18(%rsp), %rcx
movl 0x64(%rsp), %eax
cmpl 0x240(%rcx), %eax
jge 0x57aa7
movl $0x0, 0x60(%rsp)
movq 0x18(%rsp), %rcx
movl 0x60(%rsp), %eax
cmpl 0x23c(%rcx), %eax
jge 0x57a95
movl $0x0, 0x5c(%rsp)
movq 0x18(%rsp), %rcx
movl 0x5c(%rsp), %eax
cmpl 0x238(%rcx), %eax
jge 0x57a83
cvtsi2sdl 0x5c(%rsp), %xmm0
cvtsi2sdl 0x60(%rsp), %xmm1
cvtsi2sdl 0x64(%rsp), %xmm2
leaq 0x40(%rsp), %rdi
callq 0x6fcb0
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x68(%rsp)
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x13800
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6f290
movsd 0x38(%rsp), %xmm0
addsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x579f5
jmp 0x57a85
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x579d8
jmp 0x57a97
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x579bb
movsd 0x70(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x57ac6
movq 0x8(%rsp), %rdi
movsd 0x70(%rsp), %xmm0
callq 0x6f960
movq 0x10(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Abs()
void R3Grid::
Abs(void) 
{
  // Take the absolute value of every grid value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    *grid_valuep = fabs(*grid_valuep);
    grid_valuep++;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x588dc
movq -0x10(%rsp), %rax
movsd (%rax), %xmm0
movaps 0xda9bc(%rip), %xmm1    # 0x133270
pand %xmm1, %xmm0
movq -0x10(%rsp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x58893
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Sqrt()
void R3Grid::
Sqrt(void) 
{
  // Take sqrt of every grid value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    *grid_valuep = sqrt(*grid_valuep);
    grid_valuep++;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
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 0x5894a
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
callq 0xf390
movq 0x18(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x58907
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Square()
void R3Grid::
Square(void) 
{
  // Square every grid value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    *grid_valuep = (*grid_valuep) * (*grid_valuep);
    grid_valuep++;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x589ba
movq -0x10(%rsp), %rax
movsd (%rax), %xmm0
movq -0x10(%rsp), %rax
mulsd (%rax), %xmm0
movq -0x10(%rsp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x58973
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Negate()
void R3Grid::
Negate(void) 
{
  // Negate every grid value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    *grid_valuep = -(*grid_valuep);
    grid_valuep++;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x58a38
movq -0x10(%rsp), %rax
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x10(%rsp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x589e3
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Invert()
void R3Grid::
Invert(void) 
{
  // Invert every grid value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    if (RNIsNotZero(*grid_valuep, 1.0E-20)) *grid_valuep = 1.0/(*grid_valuep);
    grid_valuep++;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
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 0x58ac8
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd 0xdb3f7(%rip), %xmm1    # 0x133e80
callq 0x555a0
cmpl $0x0, %eax
je 0x58aad
movq 0x18(%rsp), %rax
movsd 0xda568(%rip), %xmm0    # 0x133008
divsd (%rax), %xmm0
movq 0x18(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x18(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x58a67
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Transpose()
void R3Grid::
Transpose(void)
{
  // Transpose values
  R3Grid copy(*this);
  int xres = XResolution();
  int yres = YResolution();
  int zres = ZResolution();
  for (int iz = 0; iz < zres; iz++) {
    for (int iy = 0; iy < yres; iy++) {
      for (int ix = 0; ix < xres; ix++) {
        RNScalar value = copy.GridValue(xres-1 - ix, yres-1 - iy, zres-1 - iz);
        SetGridValue(ix, iy, iz, value);
      }
    }
  }
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, 0x2a0(%rsp)
movq 0x2a0(%rsp), %rsi
movq %rsi, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x568c0
movq 0x10(%rsp), %rdi
callq 0x138c0
movl %eax, 0x1c(%rsp)
jmp 0x58b06
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4c(%rsp)
callq 0x138e0
movl %eax, 0xc(%rsp)
jmp 0x58b1e
movq 0x10(%rsp), %rdi
movl 0xc(%rsp), %eax
movl %eax, 0x38(%rsp)
callq 0x13900
movl %eax, 0x8(%rsp)
jmp 0x58b36
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x34(%rsp), %eax
jge 0x58c2b
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x38(%rsp), %eax
jge 0x58c19
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x58c07
movl 0x4c(%rsp), %eax
movl 0x28(%rsp), %esi
notl %esi
addl %eax, %esi
movl 0x38(%rsp), %eax
movl 0x2c(%rsp), %edx
notl %edx
addl %eax, %edx
movl 0x34(%rsp), %eax
movl 0x30(%rsp), %ecx
notl %ecx
addl %eax, %ecx
leaq 0x50(%rsp), %rdi
callq 0x6bad0
movsd %xmm0, (%rsp)
jmp 0x58bb5
movq 0x10(%rsp), %rdi
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movl 0x28(%rsp), %esi
movl 0x2c(%rsp), %edx
movl 0x30(%rsp), %ecx
movsd 0x20(%rsp), %xmm0
callq 0x6bc60
jmp 0x58bde
jmp 0x58be0
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x58b72
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x56960
jmp 0x58c3d
jmp 0x58c09
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x58b5c
jmp 0x58c1b
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x58b46
leaq 0x50(%rsp), %rdi
callq 0x56960
addq $0x2a8, %rsp            # imm = 0x2A8
retq
movq 0x40(%rsp), %rdi
callq 0xf890
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Threshold(double, double, double)
void R3Grid::
Threshold(RNScalar threshold, RNScalar low, RNScalar high) 
{
  // Set grid value to low (high) if less/equal (greater) than threshold
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) {
    if (*grid_valuep <= threshold) {
      if (low != R3_GRID_KEEP_VALUE) *grid_valuep = low;
    }
    else {
      if (high != R3_GRID_KEEP_VALUE) *grid_valuep = high;
    }
    grid_valuep++;
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movsd %xmm1, -0x18(%rsp)
movsd %xmm2, -0x20(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x38(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x28(%rsp)
movl $0x0, -0x2c(%rsp)
movq -0x38(%rsp), %rcx
movl -0x2c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x59a1f
movq -0x28(%rsp), %rax
movsd (%rax), %xmm1
movsd -0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x599d8
movsd -0x18(%rsp), %xmm0
movsd 0xda4cb(%rip), %xmm1    # 0x133e88
ucomisd %xmm1, %xmm0
jne 0x599c7
jp 0x599c7
jmp 0x599d6
movsd -0x18(%rsp), %xmm0
movq -0x28(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x59a01
movsd -0x20(%rsp), %xmm0
movsd 0xda4a2(%rip), %xmm1    # 0x133e88
ucomisd %xmm1, %xmm0
jne 0x599f0
jp 0x599f0
jmp 0x599ff
movsd -0x20(%rsp), %xmm0
movq -0x28(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x59a01
movq -0x28(%rsp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rsp)
movl -0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rsp)
jmp 0x59985
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Gradient(int)
void R3Grid::
Gradient(RNDimension dim)
{
  // Set up filters
  const RNScalar w1 = 1.0 / 12.0;
  const RNScalar w2 = 2.0 / 12.0;
  const RNScalar xfilter[3][3][3] = { 
    { { -w1, 0, w1 }, { -w1, 0, w1 }, { -w1, 0, w1 } }, 
    { { -w2, 0, w2 }, { -w2, 0, w2 }, { -w2, 0, w2 } }, 
    { { -w1, 0, w1 }, { -w1, 0, w1 }, { -w1, 0, w1 } } 
  };
  const RNScalar yfilter[3][3][3] = { 
    { { -w1, -w1, -w1 }, { 0, 0, 0 }, { w1, w1, w1 } }, 
    { { -w2, -w2, -w2 }, { 0, 0, 0 }, { w2, w2, w2 } }, 
    { { -w1, -w1, -w1 }, { 0, 0, 0 }, { w1, w1, w1 } } 
  };
  const RNScalar zfilter[3][3][3] = { 
    { { -w1, -w2, -w1 }, { -w1, -w2, -w1 }, { -w1, -w2, -w1 } }, 
    { {  0,    0,   0 }, {  0,    0,   0 }, {  0,    0,   0 } }, 
    { {  w1,  w2,  w1 }, {  w1,  w2,  w1 }, {  w1,  w2,  w1 } }, 
  };

  // Convolve with filter
  if (dim == RN_X) Convolve(xfilter);
  else if (dim == RN_Y) Convolve(yfilter);
  else if (dim == RN_Z) Convolve(zfilter);
  else RNAbort("Invalid dimension");
}

// Assembly:
subq $0x2c8, %rsp            # imm = 0x2C8
movq %rdi, 0x2c0(%rsp)
movl %esi, 0x2bc(%rsp)
movq 0x2c0(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0xd8abd(%rip), %xmm0    # 0x133ea8
movsd %xmm0, 0x2b0(%rsp)
movsd 0xd8aa4(%rip), %xmm0    # 0x133ea0
movsd %xmm0, 0x2a8(%rsp)
leaq 0x1d0(%rsp), %rdi
leaq 0xd8bcc(%rip), %rsi     # 0x133fe0
movl $0xd8, %edx
callq 0xf3d0
leaq 0xf0(%rsp), %rdi
leaq 0xd8c93(%rip), %rsi     # 0x1340c0
movl $0xd8, %edx
callq 0xf3d0
leaq 0x10(%rsp), %rdi
leaq 0xd8d5d(%rip), %rsi     # 0x1341a0
movl $0xd8, %edx
callq 0xf3d0
cmpl $0x0, 0x2bc(%rsp)
jne 0x5b46b
movq 0x8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x5adb0
jmp 0x5b4b6
cmpl $0x1, 0x2bc(%rsp)
jne 0x5b489
movq 0x8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x5adb0
jmp 0x5b4b4
cmpl $0x2, 0x2bc(%rsp)
jne 0x5b4a4
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x5adb0
jmp 0x5b4b2
leaq 0xd8deb(%rip), %rdi     # 0x134296
movb $0x0, %al
callq 0xd4e20
jmp 0x5b4b4
jmp 0x5b4b6
addq $0x2c8, %rsp            # imm = 0x2C8
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::GradientMagnitude()
void R3Grid::
GradientMagnitude(void)
{
  // Compute magnitude of gradient
  R3Grid gx(*this); gx.Gradient(RN_X);
  R3Grid gy(*this); gy.Gradient(RN_Y);
  R3Grid gz(*this); gz.Gradient(RN_Z);
  for (int i = 0; i < grid_size; i++) {
    RNScalar x = gx.GridValue(i);
    RNScalar y = gy.GridValue(i);
    RNScalar z = gz.GridValue(i);
    grid_values[i] = sqrt(x*x + y*y + z*z);
  }
}

// Assembly:
subq $0x758, %rsp            # imm = 0x758
movq %rdi, 0x750(%rsp)
movq 0x750(%rsp), %rsi
movq %rsi, 0x20(%rsp)
leaq 0x500(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x568c0
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x5b3c0
jmp 0x5b4fc
movq 0x20(%rsp), %rsi
leaq 0x2a0(%rsp), %rdi
callq 0x568c0
jmp 0x5b510
leaq 0x2a0(%rsp), %rdi
movl $0x1, %esi
callq 0x5b3c0
jmp 0x5b524
movq 0x20(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0x568c0
jmp 0x5b535
leaq 0x50(%rsp), %rdi
movl $0x2, %esi
callq 0x5b3c0
jmp 0x5b546
movl $0x0, 0x4c(%rsp)
movq 0x20(%rsp), %rcx
movl 0x4c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5b67a
movl 0x4c(%rsp), %esi
leaq 0x500(%rsp), %rdi
callq 0x13870
movsd %xmm0, 0x18(%rsp)
jmp 0x5b57c
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movl 0x4c(%rsp), %esi
leaq 0x2a0(%rsp), %rdi
callq 0x13870
movsd %xmm0, 0x10(%rsp)
jmp 0x5b5a1
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movl 0x4c(%rsp), %esi
leaq 0x50(%rsp), %rdi
callq 0x13870
movsd %xmm0, 0x8(%rsp)
jmp 0x5b5c3
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x40(%rsp), %xmm1
movsd 0x40(%rsp), %xmm2
movsd 0x38(%rsp), %xmm0
mulsd 0x38(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x30(%rsp), %xmm0
movsd 0x30(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0xf390
movq 0x20(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x4c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x5b54e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f8(%rsp)
movl %eax, 0x4f4(%rsp)
jmp 0x5b6b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f8(%rsp)
movl %eax, 0x4f4(%rsp)
jmp 0x5b6a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x4f8(%rsp)
movl %eax, 0x4f4(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x56960
jmp 0x5b6a6
leaq 0x50(%rsp), %rdi
callq 0x56960
leaq 0x2a0(%rsp), %rdi
callq 0x56960
leaq 0x500(%rsp), %rdi
callq 0x56960
addq $0x758, %rsp            # imm = 0x758
retq
leaq 0x2a0(%rsp), %rdi
callq 0x56960
leaq 0x500(%rsp), %rdi
callq 0x56960
movq 0x4f8(%rsp), %rdi
callq 0xf890
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::MaskNonMinima(double)
void R3Grid::
MaskNonMinima(RNLength grid_radius)
{
  // Create grid with local minima
  R3Grid copy(*this);
  copy.MinFilter(grid_radius);

  // Mask values that are not minima
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] > copy.grid_values[i]) grid_values[i] = 0;
  }
}

// Assembly:
subq $0x288, %rsp            # imm = 0x288
movq %rdi, 0x280(%rsp)
movsd %xmm0, 0x278(%rsp)
movq 0x280(%rsp), %rsi
movq %rsi, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x568c0
movq 0x10(%rsp), %rdi
movsd 0x278(%rsp), %xmm0
callq 0x6bcb0
jmp 0x5bd49
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rcx
movl 0x18(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5bdd0
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x258(%rsp), %rax
movslq 0x18(%rsp), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x5bdc1
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5bdc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x56960
jmp 0x5bde2
jmp 0x5bdc3
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x5bd51
leaq 0x28(%rsp), %rdi
callq 0x56960
addq $0x288, %rsp            # imm = 0x288
retq
movq 0x20(%rsp), %rdi
callq 0xf890
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::MaskNonMaxima(double)
void R3Grid::
MaskNonMaxima(RNLength grid_radius)
{
  // Create grid with local maxima
  R3Grid copy(*this);
  copy.MaxFilter(grid_radius);

  // Mask values that are not maxima
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] < copy.grid_values[i]) grid_values[i] = 0;
  }
}

// Assembly:
subq $0x288, %rsp            # imm = 0x288
movq %rdi, 0x280(%rsp)
movsd %xmm0, 0x278(%rsp)
movq 0x280(%rsp), %rsi
movq %rsi, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x568c0
movq 0x10(%rsp), %rdi
movsd 0x278(%rsp), %xmm0
callq 0x6bce0
jmp 0x5be39
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rcx
movl 0x18(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5bec7
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x258(%rsp), %rax
movslq 0x18(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5beb5
movq 0x8(%rsp), %rax
movq 0x230(%rax), %rax
movslq 0x18(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5beb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x56960
jmp 0x5bed9
jmp 0x5beb7
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x5be41
leaq 0x28(%rsp), %rdi
callq 0x56960
addq $0x288, %rsp            # imm = 0x288
retq
movq 0x20(%rsp), %rdi
callq 0xf890
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Clear(double)
void R3Grid::
Clear(RNScalar value) 
{
  // Set all grid values to value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) 
    *(grid_valuep++) = value;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5c6d2
movsd -0x10(%rsp), %xmm0
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rsp)
movsd %xmm0, (%rax)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x5c699
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Substitute(double, double)
void R3Grid::
Substitute(RNScalar old_value, RNScalar new_value) 
{
  // Replace all instances of old_value with new_value
  for (int i = 0; i < grid_size; i++) {
    if (grid_values[i] == old_value) {
      grid_values[i] = new_value;
    }
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movsd %xmm1, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5c75f
movq -0x28(%rsp), %rax
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd -0x10(%rsp), %xmm0
jne 0x5c750
jp 0x5c750
movq -0x28(%rsp), %rax
movsd -0x18(%rsp), %xmm0
movq 0x230(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x5c752
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x5c703
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Add(double)
void R3Grid::
Add(RNScalar value) 
{
  // Add value to all grid values 
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) 
    *(grid_valuep++) += value;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5c7c6
movsd -0x10(%rsp), %xmm0
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rsp)
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x5c789
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Copy(gaps::R3Grid const&)
void R3Grid::
Copy(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]);

  // Copy passed grid values to corresponding entries of this grid
  for (int i = 0; i < grid_size; i++) 
    grid_values[i] = grid.grid_values[i];
}

// 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 0x5c836
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq 0x230(%rcx), %rcx
movslq -0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5c7ec
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Add(gaps::R3Grid const&)
void R3Grid::
Add(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]);

  // Add passed grid values to corresponding entries of this grid
  for (int i = 0; i < grid_size; i++) 
    grid_values[i] += grid.grid_values[i];
}

// 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 0x5c8ab
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq 0x230(%rcx), %rcx
movslq -0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5c85c
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Subtract(gaps::R3Grid const&)
void R3Grid::
Subtract(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]);

  // Subtract passed grid values from corresponding entries of this grid
  for (int i = 0; i < grid_size; i++) 
    grid_values[i] -= grid.grid_values[i];
}

// 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 0x5cf2f
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq 0x230(%rcx), %rcx
movslq -0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm1
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5cedc
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Multiply(double)
void R3Grid::
Multiply(RNScalar value) 
{
  // Multiply grid values by value
  RNScalar *grid_valuep = grid_values;
  for (int i = 0; i < grid_size; i++) 
    *(grid_valuep++) *= value;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
movq 0x230(%rax), %rax
movq %rax, -0x18(%rsp)
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rcx
movl -0x1c(%rsp), %eax
cmpl 0x24c(%rcx), %eax
jge 0x5cf96
movsd -0x10(%rsp), %xmm0
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rsp)
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x5cf59
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Multiply(gaps::R3Grid const&)
void R3Grid::
Multiply(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]);

  // Multiply passed grid values by corresponding entries of this grid
  for (int i = 0; i < grid_size; i++) 
    grid_values[i] *= grid.grid_values[i];
}

// 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 0x5d00b
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq 0x230(%rcx), %rcx
movslq -0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x230(%rax), %rax
movslq -0x14(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x5cfbc
retq
nopl (%rax)