LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::R4Matrix::Scale(int, double)
void R4Matrix:: 
Scale(RNAxis axis, RNScalar scale)
{
    // Scale matrix along axis
    switch (axis) {
    case RN_XAXIS: 
	XScale(scale); 
	break;

    case RN_YAXIS: 
	YScale(scale); 
	break;

    case RN_ZAXIS: 
	ZScale(scale); 
	break;

    default: 
	RNWarning("Matrix scale along undefined axis");
	break;
    }
}

// Assembly:
cmpl $0x2, %esi
je 0x2d570
cmpl $0x1, %esi
je 0x2d549
testl %esi, %esi
jne 0x2d597
movsd (%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rdi)
movsd 0x20(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rdi)
mulsd 0x40(%rdi), %xmm0
movsd %xmm0, 0x40(%rdi)
retq
movsd 0x8(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rdi)
movsd 0x28(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rdi)
mulsd 0x48(%rdi), %xmm0
movsd %xmm0, 0x48(%rdi)
retq
movsd 0x10(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rdi)
movsd 0x30(%rdi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rdi)
mulsd 0x50(%rdi), %xmm0
movsd %xmm0, 0x50(%rdi)
retq
leaq 0x75976(%rip), %rdi     # 0xa2f14
xorl %eax, %eax
jmp 0x71a8d
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::R4Matrix::YRotate(double)
void R4Matrix:: 
YRotate(RNAngle radians)
{
    // rotate matrix around Y axis counterclockwise
    RNScalar c = cos(radians);
    RNScalar s = sin(radians);
    R4Matrix rotation(
        c,   0.0, s,   0.0,
        0.0, 1.0, 0.0, 0.0,
        -s,  0.0, c,   0.0,
        0.0, 0.0, 0.0, 1.0 );
    *this *= rotation;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movsd %xmm0, (%rsp)
movq %rdi, %rbx
callq 0xe860
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0xe0f0
movaps 0x74898(%rip), %xmm1    # 0xa2020
xorps %xmm0, %xmm1
leaq 0x98(%rsp), %rdx
movsd 0x8(%rsp), %xmm2
movsd %xmm2, (%rdx)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movsd %xmm0, 0x10(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdx)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x28(%rdx)
movups %xmm0, 0x30(%rdx)
movlps %xmm1, 0x40(%rdx)
movq %rax, 0x48(%rdx)
movsd %xmm2, 0x50(%rdx)
movups %xmm0, 0x58(%rdx)
movups %xmm0, 0x68(%rdx)
movq %rcx, 0x78(%rdx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2e2af
movaps (%r14), %xmm0
movups %xmm0, (%rbx)
movaps 0x10(%r14), %xmm0
movups %xmm0, 0x10(%rbx)
movaps 0x20(%r14), %xmm0
movups %xmm0, 0x20(%rbx)
movaps 0x30(%r14), %xmm0
movups %xmm0, 0x30(%rbx)
movaps 0x40(%r14), %xmm0
movups %xmm0, 0x40(%rbx)
movaps 0x50(%r14), %xmm0
movups %xmm0, 0x50(%rbx)
movaps 0x60(%r14), %xmm0
movups %xmm0, 0x60(%rbx)
movaps 0x70(%r14), %xmm0
movups %xmm0, 0x70(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::R4Matrix::Rotate(gaps::R3Vector const&)
void R4Matrix:: 
Rotate(const R3Vector& radians)
{
#if 1
    // Rotate first around X, then around Y, and finally around Z
    R4Matrix rotation = R4identity_matrix;
    rotation.ZRotate(radians.Z());
    rotation.YRotate(radians.Y());
    rotation.XRotate(radians.X());
    *this *= rotation;
#else
    // This is faster way to do same thing (not tested)
    // Note: this matrix is for pre-multiplication -- need one for postmultiplication
    R4Matrix rotation(
      cos(radians.Y())*cos(radians.Z()),  
      sin(radians.X())*sin(radians.Y())*cos(radians.Z()) - cos(radians.X())*sin(radians.Z()), 
      cos(radians.X())*sin(radians.Y())*cos(radians.Z()) + sin(radians.X())*sin(radians.Z()), 0,
      cos(radians.Y())*sin(radians.Z()),
      sin(radians.X())*sin(radians.Y())*sin(radians.Z()) + cos(radians.X())*cos(radians.Z()),
      cos(radians.X())*sin(radians.Y())*sin(radians.Z()) - sin(radians.X())*cos(radians.Z()), 0,
      -sin(radians.Y()), 
      sin(radians.X())*cos(radians.Y()),
      cos(radians.X())*cos(radians.Y()), 0,
      0, 0, 0, 1);
    *this *= rotation;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %r15
movq %rdi, %rbx
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq 0x80(%rsp), %r14
movq %rax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x18(%r14)
movq %rax, 0x28(%r14)
movups %xmm0, 0x30(%r14)
movups %xmm0, 0x40(%r14)
movq %rax, 0x50(%r14)
movups %xmm0, 0x58(%r14)
movups %xmm0, 0x68(%r14)
movq %rax, 0x78(%r14)
movsd 0x10(%rsi), %xmm0
movq %r14, %rdi
callq 0x2d83c
movsd 0x8(%r15), %xmm0
movq %r14, %rdi
callq 0x2d75a
movsd (%r15), %xmm0
movq %r14, %rdi
callq 0x2d67e
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x2e2af
movaps (%r15), %xmm0
movups %xmm0, (%rbx)
movaps 0x10(%r15), %xmm0
movups %xmm0, 0x10(%rbx)
movaps 0x20(%r15), %xmm0
movups %xmm0, 0x20(%rbx)
movaps 0x30(%r15), %xmm0
movups %xmm0, 0x30(%rbx)
movaps 0x40(%r15), %xmm0
movups %xmm0, 0x40(%rbx)
movaps 0x50(%r15), %xmm0
movups %xmm0, 0x50(%rbx)
movaps 0x60(%r15), %xmm0
movups %xmm0, 0x60(%rbx)
movaps 0x70(%r15), %xmm0
movups %xmm0, 0x70(%rbx)
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R4Matrix.cpp
// Function: gaps::R4Matrix::Rotate(gaps::R3Vector const&, gaps::R3Vector const&)
void R4Matrix:: 
Rotate(const R3Vector& from, const R3Vector& to)
{
    // rotate matrix that takes direction of vector "from" -> "to"
    // This is a quickie hack -- there's got to be a better way
    RNAngle radians = R3InteriorAngle(from, to);
    R3Vector axis = from % to;
    axis.Normalize();
    Rotate(axis, radians);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x4bc63
movsd %xmm0, 0x8(%rsp)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3d8fa
movq %r12, %rdi
callq 0x3d2dc
movq %r15, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x2da22
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
callq 0x29f8c
leaq 0x110(%rbx), %r14
movq %r14, %rdi
callq 0x29f8c
movl %r12d, 0x238(%rbx)
movl %ebp, 0x23c(%rbx)
movl %r15d, 0x240(%rbx)
movl %r12d, 0x244(%rbx)
imull %r12d, %ebp
movl %ebp, 0x248(%rbx)
imull %r15d, %ebp
movl %ebp, 0x24c(%rbx)
testl %ebp, %ebp
je 0x2e4e5
movl %ebp, %r15d
leaq (,%r15,8), %rax
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
movq %rax, 0x230(%rbx)
testl %ebp, %ebp
jle 0x2e4f0
shlq $0x3, %r15
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0xe260
jmp 0x2e4f0
movq $0x0, 0x230(%rbx)
leaq 0x8(%rbx), %rdi
leaq 0xb7b05(%rip), %r12     # 0xe6000
leaq 0x8(%r12), %r15
movq %r15, %rsi
callq 0x2dea2
movl $0x88, %esi
leaq (%rbx,%rsi), %rdi
addq 0xb6ac8(%rip), %rsi     # 0xe4fe0
callq 0x2dea2
movq 0x108(%r12), %rax
movq %rax, 0x108(%rbx)
leaq 0x118(%rbx), %rdi
movq %r15, %rsi
callq 0x2dea2
leaq 0x198(%rbx), %rdi
movl $0x88, %esi
addq 0xb6a92(%rip), %rsi     # 0xe4fe0
callq 0x2dea2
movq 0x108(%r12), %rax
movq %rax, 0x218(%rbx)
movaps 0x749f7(%rip), %xmm0    # 0xa2f60
movups %xmm0, 0x220(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x2e589
movq %rax, %r15
movq %r14, %rdi
callq 0x2a028
movq %rbx, %rdi
callq 0x2a028
movq %r15, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movl %ecx, %r12d
movl %edx, %ebp
movl %esi, %r13d
movq %rdi, %rbx
callq 0x29f8c
leaq 0x110(%rbx), %r14
movq %r14, %rdi
callq 0x29f8c
movl %r13d, 0x238(%rbx)
movl %ebp, 0x23c(%rbx)
movl %r12d, 0x240(%rbx)
movl %r13d, 0x244(%rbx)
imull %r13d, %ebp
movl %ebp, 0x248(%rbx)
imull %r12d, %ebp
movl %ebp, 0x24c(%rbx)
testl %ebp, %ebp
je 0x2e635
movl %ebp, %r12d
leaq (,%r12,8), %rax
testl %ebp, %ebp
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
movq %rax, 0x230(%rbx)
testl %ebp, %ebp
jle 0x2e640
shlq $0x3, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0xe260
jmp 0x2e640
movq $0x0, 0x230(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2e67a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x2e66a
movq %rax, %r15
movq %r14, %rdi
callq 0x2a028
movq %rbx, %rdi
callq 0x2a028
movq %r15, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x230(%rdi), %rax
testq %rax, %rax
je 0x2ed4a
movl 0x24c(%rbx), %ecx
cmpl 0x24c(%r14), %ecx
je 0x2ed6a
movq %rax, %rdi
callq 0xe5b0
movq $0x0, 0x230(%rbx)
movslq 0x24c(%r14), %rdi
testq %rdi, %rdi
jle 0x2ed68
shlq $0x3, %rdi
callq 0xe030
movq %rax, 0x230(%rbx)
jmp 0x2ed6a
xorl %eax, %eax
movl 0x238(%r14), %ecx
movl %ecx, 0x238(%rbx)
movl 0x23c(%r14), %ecx
movl %ecx, 0x23c(%rbx)
movl 0x240(%r14), %ecx
movl %ecx, 0x240(%rbx)
movq 0x244(%r14), %rcx
movq %rcx, 0x244(%rbx)
movslq 0x24c(%r14), %rcx
movl %ecx, 0x24c(%rbx)
testq %rcx, %rcx
jle 0x2edcc
movq 0x230(%r14), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x2edba
leaq 0x8(%rbx), %rdi
leaq 0x8(%r14), %rsi
callq 0x2dea2
movl $0x88, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x2dea2
movq 0x108(%r14), %rax
movq %rax, 0x108(%rbx)
movl $0x118, %esi            # imm = 0x118
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x2dea2
movl $0x198, %esi            # imm = 0x198
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x2dea2
movq 0x218(%r14), %rax
movq %rax, 0x218(%rbx)
movups 0x220(%r14), %xmm0
movups %xmm0, 0x220(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movslq 0x24c(%rdi), %r14
testq %r14, %r14
je 0x2efd5
movq %rdi, %rbx
movsd %xmm0, 0x8(%rsp)
leaq (,%r14,8), %rax
testl %r14d, %r14d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0xe030
movq %rax, %r15
testl %r14d, %r14d
jle 0x2ef8b
movq 0x230(%rbx), %rax
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %r14
jne 0x2ef78
leaq 0x4268f(%rip), %rcx     # 0x71621
movl $0x8, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xe880
xorps %xmm0, %xmm0
cvtsi2sdl 0x24c(%rbx), %xmm0
mulsd 0x8(%rsp), %xmm0
cvttsd2si %xmm0, %eax
cltq
movsd (%r15,%rax,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0xe5b0
movsd 0x8(%rsp), %xmm0
jmp 0x2efd8
xorps %xmm0, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movl 0x24c(%rsi), %eax
testl %eax, %eax
jle 0x2f02b
movq 0x230(%rsi), %rcx
movsd 0x73041(%rip), %xmm3    # 0xa2040
movsd 0x73cb1(%rip), %xmm2    # 0xa2cb8
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
movapd %xmm1, %xmm0
minsd %xmm3, %xmm0
maxsd %xmm2, %xmm1
incq %rdx
movapd %xmm1, %xmm2
movapd %xmm0, %xmm3
cmpl %edx, %eax
jne 0x2f009
jmp 0x2f03b
movsd 0x73c85(%rip), %xmm1    # 0xa2cb8
movsd 0x73005(%rip), %xmm0    # 0xa2040
movq %rbx, %rdi
callq 0x7150e
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x2f06c
movq 0x230(%rdi), %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
addsd (%rcx,%rdx,8), %xmm0
incq %rdx
cmpl %edx, %eax
jne 0x2f05f
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x2f09c
movq 0x230(%rdi), %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpl %edx, %eax
jne 0x2f087
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %ecx
testl %ecx, %ecx
jle 0x2f0d2
movq 0x230(%rdi), %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
xorl %eax, %eax
movsd (%rdx,%rsi,8), %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rdi
subl %edi, %eax
incq %rsi
cmpl %esi, %ecx
jne 0x2f0b9
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x3c532
xorpd %xmm0, %xmm0
movl 0x240(%r14), %ecx
testl %ecx, %ecx
jle 0x2f82a
movq 0x230(%r14), %r13
movl 0x23c(%r14), %eax
movl $0x0, (%rsp)
leaq 0x40(%rsp), %r15
leaq 0x28(%rsp), %r12
testl %eax, %eax
jle 0x2f808
xorps %xmm1, %xmm1
cvtsi2sdl (%rsp), %xmm1
movl 0x238(%r14), %ecx
xorl %edx, %edx
movsd %xmm1, 0x8(%rsp)
testl %ecx, %ecx
jle 0x2f7f7
movl %edx, 0x4(%rsp)
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
movsd %xmm2, 0x10(%rsp)
xorl %ebp, %ebp
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movq %r15, %rdi
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
callq 0x3cfc6
movsd (%r13), %xmm0
movsd %xmm0, 0x18(%rsp)
addq $0x8, %r13
movq %r12, %rdi
movq %r15, %rsi
callq 0x3d962
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c914
movsd 0x20(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
incl %ebp
movl 0x238(%r14), %ecx
cmpl %ecx, %ebp
jl 0x2f78c
movl 0x23c(%r14), %eax
movl 0x4(%rsp), %edx
incl %edx
cmpl %eax, %edx
jl 0x2f775
movl 0x240(%r14), %ecx
movl (%rsp), %edx
incl %edx
movl %edx, (%rsp)
cmpl %ecx, %edx
jl 0x2f756
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2f82a
movq %rbx, %rdi
callq 0x3ceea
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x300b5
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movaps 0x721ce(%rip), %xmm0    # 0xa2270
movsd (%rcx,%rdx,8), %xmm1
andps %xmm0, %xmm1
movlps %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x300a2
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x24c(%rdi)
jle 0x30107
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x230(%rdi), %r14
xorl %r15d, %r15d
xorpd %xmm1, %xmm1
movsd (%r14,%r15,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x300e7
sqrtsd %xmm0, %xmm0
jmp 0x300f0
callq 0xe340
xorpd %xmm1, %xmm1
movsd %xmm0, (%r14,%r15,8)
incq %r15
cmpl 0x24c(%rbx), %r15d
jl 0x300d5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x30130
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x3011b
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x3015f
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movaps 0x71ed4(%rip), %xmm0    # 0xa2020
movsd (%rcx,%rdx,8), %xmm1
xorps %xmm0, %xmm1
movlps %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x3014c
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x301b2
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movapd 0x720f5(%rip), %xmm0    # 0xa2270
movsd 0x72e1d(%rip), %xmm1    # 0xa2fa0
movsd 0x71ead(%rip), %xmm2    # 0xa2038
movsd (%rcx,%rdx,8), %xmm3
movapd %xmm3, %xmm4
andpd %xmm0, %xmm4
ucomisd %xmm1, %xmm4
jbe 0x301ab
movapd %xmm2, %xmm4
divsd %xmm3, %xmm4
movsd %xmm4, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x3018b
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdi, %rbx
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x2ee42
movl 0x240(%rbx), %eax
movq %rax, 0x10(%rsp)
testl %eax, %eax
jle 0x3029c
movl 0x238(%rbx), %esi
movl 0x23c(%rbx), %edx
leal -0x1(%rsi), %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
leal -0x1(%rax), %edi
leal -0x1(%rdx), %eax
movl %eax, 0x8(%rsp)
xorl %r9d, %r9d
testl %edx, %edx
jle 0x3028c
movq 0x248(%rsp), %r10
movl 0x25c(%rsp), %r11d
movq 0x230(%rbx), %r14
movl 0x244(%rbx), %ebp
movl 0x260(%rsp), %eax
imull %edi, %eax
addl 0xc(%rsp), %eax
movl 0x8(%rsp), %r15d
imull %r11d, %r15d
addl %eax, %r15d
movl 0x248(%rbx), %r12d
imull %r9d, %r12d
xorl %r13d, %r13d
movq %rsi, %rcx
movl %r12d, %r8d
movl %r15d, %eax
testl %esi, %esi
jle 0x3027e
cltq
movsd (%r10,%rax,8), %xmm0
movslq %r8d, %r8
movsd %xmm0, (%r14,%r8,8)
decl %eax
incl %r8d
decq %rcx
jne 0x30263
incl %r13d
subl %r11d, %r15d
addl %ebp, %r12d
cmpl %edx, %r13d
jne 0x30256
incl %r9d
decl %edi
cmpl 0x10(%rsp), %r9d
jne 0x3020d
leaq 0x18(%rsp), %rdi
callq 0x2ee9e
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Divide(double)
void R3Grid::
Divide(RNScalar value) 
{
  // Just checking
  if (RNIsZero(value, 1.0E-20)) return;

  // Multiply by recipricol
  Multiply(1.0 / value);
}

// Assembly:
movapd 0x71f1c(%rip), %xmm1    # 0xa2270
andpd %xmm0, %xmm1
movsd 0x72c40(%rip), %xmm2    # 0xa2fa0
ucomisd %xmm1, %xmm2
jae 0x3039a
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x3039a
movsd 0x71cc0(%rip), %xmm1    # 0xa2038
divsd %xmm0, %xmm1
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x30385
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x309f0
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movsd 0x725e1(%rip), %xmm3    # 0xa2fa8
ucomisd (%rcx,%rdx,8), %xmm0
jae 0x309d8
ucomisd %xmm3, %xmm2
movapd %xmm2, %xmm4
jmp 0x309e0
ucomisd %xmm3, %xmm1
movapd %xmm1, %xmm4
jne 0x309e4
jnp 0x309e9
movsd %xmm4, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x309c7
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::Erode(double)
void R3Grid::
Erode(RNLength grid_distance) 
{
  // Keep only voxels at least distance from some zero voxel
  Threshold(1.0E-20, 1, 0);
  SquaredDistanceTransform();
  Threshold(grid_distance * grid_distance, 0, 1);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x30a3d
movq 0x230(%rbx), %rcx
xorl %edx, %edx
movsd 0x72585(%rip), %xmm0    # 0xa2fa0
movsd 0x71615(%rip), %xmm1    # 0xa2038
movsd (%rcx,%rdx,8), %xmm2
cmpnlesd %xmm0, %xmm2
andnpd %xmm1, %xmm2
movlpd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x30a23
movq %rbx, %rdi
callq 0x303f4
movl 0x24c(%rbx), %eax
testl %eax, %eax
movsd 0x8(%rsp), %xmm2
jle 0x30a84
mulsd %xmm2, %xmm2
movq 0x230(%rbx), %rcx
xorl %edx, %edx
movsd 0x715ce(%rip), %xmm0    # 0xa2038
movsd (%rcx,%rdx,8), %xmm1
cmpnlesd %xmm2, %xmm1
andpd %xmm0, %xmm1
movlpd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x30a6a
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x6f8, %rsp            # imm = 0x6F8
movq %rdi, %rbx
leaq 0x4a8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ee42
leaq 0x718a5(%rip), %rsi     # 0xa30c0
movq %r14, %rdi
callq 0x3149e
leaq 0x258(%rsp), %rdi
movq %rbx, %rsi
callq 0x2ee42
leaq 0x71966(%rip), %rsi     # 0xa31a0
leaq 0x258(%rsp), %rdi
callq 0x3149e
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x2ee42
leaq 0x71a25(%rip), %rsi     # 0xa3280
leaq 0x8(%rsp), %rdi
callq 0x3149e
movslq 0x24c(%rbx), %rax
testq %rax, %rax
jle 0x318ce
movq 0x6d8(%rsp), %rcx
movq 0x488(%rsp), %rdx
movq 0x238(%rsp), %rsi
movq 0x230(%rbx), %rdi
xorl %r8d, %r8d
movsd (%rcx,%r8,8), %xmm0
movsd (%rdx,%r8,8), %xmm1
movsd (%rsi,%r8,8), %xmm2
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm2
addsd %xmm0, %xmm2
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rax
jne 0x31893
leaq 0x8(%rsp), %rdi
callq 0x2ee9e
leaq 0x258(%rsp), %rdi
callq 0x2ee9e
leaq 0x4a8(%rsp), %rdi
callq 0x2ee9e
addq $0x6f8, %rsp            # imm = 0x6F8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2ee9e
jmp 0x31911
jmp 0x3190e
movq %rax, %rbx
leaq 0x258(%rsp), %rdi
callq 0x2ee9e
jmp 0x31925
jmp 0x31922
movq %rax, %rbx
leaq 0x4a8(%rsp), %rdi
callq 0x2ee9e
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movsd %xmm0, (%rsp)
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ee42
xorps %xmm1, %xmm1
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x3197a
movslq 0x24c(%rbx), %rax
testq %rax, %rax
jle 0x31def
movq 0x230(%rbx), %rcx
movq 0x238(%rsp), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm0
ucomisd (%rdx,%rsi,8), %xmm0
jbe 0x31de7
movq $0x0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x31dd3
leaq 0x8(%rsp), %rdi
callq 0x2ee9e
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2ee9e
movq %rbx, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movsd %xmm0, (%rsp)
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ee42
movsd 0x701f4(%rip), %xmm1    # 0xa2038
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x3197a
movslq 0x24c(%rbx), %rax
testq %rax, %rax
jle 0x31e8a
movq 0x230(%rbx), %rcx
movq 0x238(%rsp), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
ucomisd (%rcx,%rsi,8), %xmm0
jbe 0x31e82
movq $0x0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x31e6e
leaq 0x8(%rsp), %rdi
callq 0x2ee9e
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2ee9e
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x24c(%rdi), %rdx
testq %rdx, %rdx
jle 0x3237f
movq 0x230(%rdi), %rax
leal 0x1(%rdx), %ecx
andl $-0x2, %ecx
decq %rdx
movq %rdx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
xorl %edx, %edx
movdqa 0x6ff70(%rip), %xmm2    # 0xa2280
movdqa 0x6ff78(%rip), %xmm3    # 0xa2290
pxor %xmm3, %xmm1
pcmpeqd %xmm4, %xmm4
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
por %xmm2, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm1, %xmm6
pcmpeqd %xmm1, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x32361
movsd %xmm0, (%rax,%rdx,8)
pxor %xmm4, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x32376
movsd %xmm0, 0x8(%rax,%rdx,8)
addq $0x2, %rdx
cmpq %rdx, %rcx
jne 0x32320
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x24c(%rdi), %rax
testq %rax, %rax
jle 0x323af
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm2
ucomisd %xmm0, %xmm2
jne 0x323a7
jp 0x323a7
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x32395
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x323d8
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x323c3
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x24c(%rdi), %eax
testl %eax, %eax
jle 0x327a0
movq 0x230(%rdi), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x3278b
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x24c(%rdi), %rax
testq %rax, %rax
jle 0x3282b
movq 0x230(%rsi), %rcx
movq 0x230(%rdi), %rdx
xorl %esi, %esi
movapd 0x6fa76(%rip), %xmm0    # 0xa2270
movsd 0x7079e(%rip), %xmm1    # 0xa2fa0
movsd (%rcx,%rsi,8), %xmm2
movapd %xmm2, %xmm3
andpd %xmm0, %xmm3
ucomisd %xmm1, %xmm3
jbe 0x32823
movsd (%rdx,%rsi,8), %xmm3
divsd %xmm2, %xmm3
movsd %xmm3, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x32802
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x24c(%rdi), %rax
testq %rax, %rax
jle 0x32865
movq 0x230(%rdi), %rcx
movq 0x230(%rsi), %rdx
xorl %esi, %esi
movsd (%rcx,%rsi,8), %xmm1
movsd (%rdx,%rsi,8), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x3285d
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x32848
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x24c(%rdi), %rax
testq %rax, %rax
jle 0x3289b
movq 0x230(%rdi), %rcx
movq 0x230(%rsi), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
ucomisd (%rcx,%rsi,8), %xmm0
jbe 0x32893
movsd %xmm0, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x32882
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x24c(%rdi)
jle 0x32901
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movapd %xmm0, %xmm1
movq %rdi, %rbx
movq 0x230(%rdi), %r14
xorl %r15d, %r15d
movsd %xmm0, 0x8(%rsp)
movsd (%r14,%r15,8), %xmm2
movapd %xmm2, %xmm0
xorpd 0x6f749(%rip), %xmm0    # 0xa2020
maxsd %xmm2, %xmm0
callq 0xe7d0
movsd 0x8(%rsp), %xmm1
movsd %xmm0, (%r14,%r15,8)
incq %r15
cmpl 0x24c(%rbx), %r15d
jl 0x328c5
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
addq $0x118, %rdi            # imm = 0x118
addq $0x8, %rsi
callq 0x2dea2
leaq 0x198(%rbx), %rdi
leaq 0x88(%r14), %rsi
callq 0x2dea2
movq 0x108(%r14), %rax
movq %rax, 0x218(%rbx)
movq %r14, %rdi
callq 0x2a046
movl 0x108(%r14), %edx
andl $0x1, %edx
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x29fda
leaq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2dea2
movl $0x88, %eax
leaq (%rbx,%rax), %rdi
addq %rax, %r15
movq %r15, %rsi
callq 0x2dea2
movq %rsp, %rdi
movq 0x108(%rdi), %rax
movq %rax, 0x108(%rbx)
callq 0x2a028
movq (%r14), %rax
movq %r14, %rdi
callq *0xc0(%rax)
movsd %xmm0, 0x220(%rbx)
movsd 0x6edcb(%rip), %xmm1    # 0xa2038
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
xorpd %xmm3, %xmm3
cmpneqsd %xmm0, %xmm3
andpd %xmm3, %xmm2
andnpd %xmm1, %xmm3
orpd %xmm2, %xmm3
movlpd %xmm3, 0x228(%rbx)
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2a028
movq %rbx, %rdi
callq 0xe7e0
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x250, %rsp            # imm = 0x250
movq %rdi, %rbx
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2ee42
movq %rbx, %rdi
callq 0x303f4
cmpl $0x0, 0x24c(%rbx)
jle 0x33318
movq 0x230(%rbx), %r14
xorl %r15d, %r15d
xorpd %xmm1, %xmm1
movsd (%r14,%r15,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x332fd
sqrtsd %xmm0, %xmm0
jmp 0x33306
callq 0xe340
xorpd %xmm1, %xmm1
movsd %xmm0, (%r14,%r15,8)
incq %r15
cmpl 0x24c(%rbx), %r15d
jl 0x332eb
movl 0x24c(%rsp), %eax
testl %eax, %eax
jle 0x33380
movq 0x230(%rsp), %rcx
xorl %edx, %edx
xorpd %xmm0, %xmm0
movsd 0x6ecff(%rip), %xmm1    # 0xa2038
movsd (%rcx,%rdx,8), %xmm2
cmpnlesd %xmm0, %xmm2
andnpd %xmm1, %xmm2
movlpd %xmm2, (%rcx,%rdx,8)
incq %rdx
cmpl %edx, %eax
jne 0x33339
xorl %edx, %edx
movsd 0x6fc5b(%rip), %xmm0    # 0xa2fb8
movabsq $0x3ff0000000000000, %rsi # imm = 0x3FF0000000000000
movsd (%rcx,%rdx,8), %xmm1
ucomisd %xmm0, %xmm1
jne 0x33378
jp 0x33378
movq %rsi, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x33367
movq %rsp, %rdi
callq 0x303f4
cmpl $0x0, 0x24c(%rsp)
jle 0x333cf
movq 0x230(%rsp), %r14
xorl %r15d, %r15d
xorpd %xmm1, %xmm1
movsd (%r14,%r15,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x333b3
sqrtsd %xmm0, %xmm0
jmp 0x333bc
callq 0xe340
xorpd %xmm1, %xmm1
movsd %xmm0, (%r14,%r15,8)
incq %r15
cmpl 0x24c(%rsp), %r15d
jl 0x333a1
movslq 0x24c(%rbx), %rax
testq %rax, %rax
jle 0x33403
movq 0x230(%rsp), %rcx
movq 0x230(%rbx), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
subsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rdx,%rsi,8)
incq %rsi
cmpq %rsi, %rax
jne 0x333ec
movq %rsp, %rdi
callq 0x2ee9e
addq $0x250, %rsp            # imm = 0x250
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x2ee9e
movq %rbx, %rdi
callq 0xe7e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x33439
jp 0x33439
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movapd %xmm0, %xmm3
movq %rdi, %r14
leaq 0x76b96(%rip), %rax     # 0xa9fe8
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x33462
sqrtsd %xmm0, %xmm0
jmp 0x33471
movsd %xmm3, (%rsp)
callq 0xe340
movsd (%rsp), %xmm3
movsd 0x6ed87(%rip), %xmm2    # 0xa2200
mulsd %xmm3, %xmm2
mulsd %xmm3, %xmm2
movapd 0x6ede7(%rip), %xmm1    # 0xa2270
movapd %xmm2, (%rsp)
andpd %xmm2, %xmm1
movsd 0x6ed46(%rip), %xmm2    # 0xa21e0
ucomisd %xmm1, %xmm2
jae 0x33510
cmpl $0x0, 0x24c(%r14)
jle 0x33510
mulsd %xmm3, %xmm0
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0x6eb76(%rip), %xmm0    # 0xa2038
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x230(%r14), %rax
xorl %r15d, %r15d
movsd (%rax,%r15,8), %xmm0
testl %ebx, %ebx
je 0x334e4
mulsd %xmm0, %xmm0
divsd (%rsp), %xmm0
callq 0xe7f0
mulsd 0x18(%rsp), %xmm0
movq 0x230(%r14), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movslq 0x24c(%r14), %rcx
cmpq %rcx, %r15
jl 0x334d6
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testl %esi, %esi
js 0x340b4
testl %edx, %edx
js 0x340b4
cmpl %esi, 0x238(%rdi)
jle 0x340b4
testl %ecx, %ecx
js 0x340b4
cmpl %edx, 0x23c(%rdi)
jle 0x340b4
cmpl %ecx, 0x240(%rdi)
jle 0x340b4
cmpl $0x2, %r8d
je 0x340b5
cmpl $0x1, %r8d
je 0x3408a
testl %r8d, %r8d
jne 0x340d7
movq 0x230(%rdi), %rax
imull 0x248(%rdi), %ecx
imull 0x244(%rdi), %edx
addl %esi, %ecx
addl %edx, %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm0
jmp 0x340d1
movq 0x230(%rdi), %rax
imull 0x248(%rdi), %ecx
imull 0x244(%rdi), %edx
addl %esi, %ecx
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rcx,8)
retq
movq 0x230(%rdi), %rax
imull 0x248(%rdi), %ecx
imull 0x244(%rdi), %edx
addl %esi, %ecx
addl %edx, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
retq
leaq 0x73694(%rip), %rdi     # 0xa7772
xorl %eax, %eax
jmp 0x718f6
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Grid.cpp
// Function: gaps::R3Grid::RasterizeGridBox(gaps::R3Box const&, double, int)
void R3Grid::
RasterizeGridBox(const R3Box& box, RNScalar value, int operation)
{
  // Get corner coordinates
  int ix1 = (int) (box.XMin() + 0.5);
  int ix2 = (int) (box.XMax() + 0.5);
  int iy1 = (int) (box.YMin() + 0.5);
  int iy2 = (int) (box.YMax() + 0.5);
  int iz1 = (int) (box.ZMin() + 0.5);
  int iz2 = (int) (box.ZMax() + 0.5);

  // Check for intersection
  if (ix1 >= XResolution()) return;
  if (iy1 >= YResolution()) return;
  if (iz1 >= ZResolution()) return;
  if (ix2 < 0) return;
  if (iy2 < 0) return;
  if (iz2 < 0) return;

  // Clip coordinates
  if (ix1 < 0) ix1 = 0;
  if (iy1 < 0) iy1 = 0;
  if (iz1 < 0) iz1 = 0;
  if (ix2 >= XResolution()) ix2 = XResolution()-1;
  if (iy2 >= YResolution()) iy2 = YResolution()-1;
  if (iz2 >= ZResolution()) iz2 = ZResolution()-1;

  // Add value to grid entries
  for (int iz = iz1; iz <= iz2; iz++) {
    for (int iy = iy1; iy <= iy2; iy++) {
      for (int ix = ix1; ix <= ix2; ix++) {
        RasterizeGridValue(ix, iy, iz, value, operation);
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd 0x6c8fa(%rip), %xmm1    # 0xa2030
movsd 0x8(%rsi), %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %ecx
movl 0x238(%rdi), %eax
cmpl %ecx, %eax
jle 0x3588e
movl %edx, %ebx
movq %rdi, %r14
movl %ecx, %r11d
movsd 0x10(%rsi), %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %edx
movl 0x23c(%rdi), %ecx
cmpl %edx, %ecx
jle 0x3588e
movl %edx, %ebp
movupd 0x20(%rsi), %xmm2
addpd 0x6c88d(%rip), %xmm2    # 0xa2010
cvttpd2dq %xmm2, %xmm3
movsd 0x18(%rsi), %xmm2
addsd %xmm1, %xmm2
cvttsd2si %xmm2, %edi
addsd 0x30(%rsi), %xmm1
cvttsd2si %xmm1, %edx
movl 0x240(%r14), %esi
cmpl %edi, %esi
setle %r8b
pshufd $0x50, %xmm3, %xmm1     # xmm1 = xmm3[0,0,1,1]
movmskpd %xmm1, %r9d
orb %r9b, %r8b
shrb %r9b
testl %edx, %edx
sets %r10b
orb %r9b, %r10b
orb %r8b, %r10b
testb $0x1, %r10b
jne 0x3588e
xorl %r15d, %r15d
testl %r11d, %r11d
cmovlel %r15d, %r11d
movl %r11d, 0x14(%rsp)
testl %ebp, %ebp
cmovlel %r15d, %ebp
movl %ebp, 0x8(%rsp)
testl %edi, %edi
cmovgl %edi, %r15d
leal -0x1(%rsi), %edi
cmpl %edx, %esi
cmovgl %edx, %edi
movl %edi, 0x10(%rsp)
cmpl %edi, %r15d
jg 0x3588e
pshufd $0x55, %xmm3, %xmm1     # xmm1 = xmm3[1,1,1,1]
movd %xmm1, %edx
leal -0x1(%rcx), %esi
cmpl %edx, %ecx
cmovgl %edx, %esi
movl %esi, 0xc(%rsp)
movd %xmm3, %ecx
leal -0x1(%rax), %edx
cmpl %ecx, %eax
cmovgl %ecx, %edx
movq %rdx, 0x18(%rsp)
leal 0x1(%rdx), %r13d
movsd %xmm0, 0x20(%rsp)
movl 0xc(%rsp), %eax
cmpl %eax, 0x8(%rsp)
jg 0x35880
movl 0x8(%rsp), %eax
movl %eax, %r12d
movl 0x14(%rsp), %eax
movl %eax, %ebp
cmpl 0x18(%rsp), %eax
jg 0x35871
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebx, %r8d
callq 0x34032
movsd 0x20(%rsp), %xmm0
incl %ebp
cmpl %ebp, %r13d
jne 0x35851
leal 0x1(%r12), %eax
cmpl 0xc(%rsp), %r12d
movl %eax, %r12d
jne 0x35845
leal 0x1(%r15), %eax
cmpl 0x10(%rsp), %r15d
movl %eax, %r15d
jne 0x35834
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop