LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::TrajectoryDirection() const
R3Vector R3SurfelImage::
TrajectoryDirection(void) const
{
  // Check scene
  if (!scene) return R3zero_vector;
  if (scene_index < 0) return R3zero_vector;
  
  // Find images before/after this image
  int delta = 7;
  int index = scene_index;
  int indexA = index - delta;
  int indexB = index + delta;
  if (indexA < 0) indexA = 0;
  if (indexB > scene->NImages()-1) indexB = scene->NImages()-1;
  R3SurfelImage *imageA = scene->Image(indexA);
  R3SurfelImage *imageB = scene->Image(indexB);

  // Compute trajector direction
  R3Point viewpointA = imageA->Viewpoint();
  R3Point viewpointB = imageB->Viewpoint();
  R3Vector trajectory_direction = viewpointB - viewpointA;
  trajectory_direction.Normalize();

  // Return trajectory direction
  return trajectory_direction;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x68018
movq 0x10(%rsp), %rdi
leaq 0x596192(%rip), %rsi    # 0x5fe1a0
callq 0xf94f0
jmp 0x68129
movq 0x20(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jge 0x68039
movq 0x10(%rsp), %rdi
leaq 0x596171(%rip), %rsi    # 0x5fe1a0
callq 0xf94f0
jmp 0x68129
movq 0x20(%rsp), %rax
movl $0x7, 0x74(%rsp)
movl 0x10(%rax), %eax
movl %eax, 0x70(%rsp)
movl 0x70(%rsp), %eax
subl 0x74(%rsp), %eax
movl %eax, 0x6c(%rsp)
movl 0x70(%rsp), %eax
addl 0x74(%rsp), %eax
movl %eax, 0x68(%rsp)
cmpl $0x0, 0x6c(%rsp)
jge 0x68074
movl $0x0, 0x6c(%rsp)
movq 0x20(%rsp), %rax
movl 0x68(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x8(%rax), %rdi
callq 0x16cc0
movl %eax, %ecx
movl 0xc(%rsp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x680ac
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x16cc0
subl $0x1, %eax
movl %eax, 0x68(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x6c(%rsp), %esi
callq 0x30800
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rdi
movl 0x68(%rsp), %esi
callq 0x30800
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0x30940
movq %rax, %rsi
leaq 0x40(%rsp), %rdi
callq 0xf8390
movq 0x58(%rsp), %rdi
callq 0x30940
movq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0xf8390
movq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0xf86b0
movq 0x10(%rsp), %rdi
callq 0xf9c10
movq 0x18(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetChannel(int, gaps::R2Grid const&)
void R3SurfelImage::
SetChannel(int channel_index, const R2Grid& channel)
{
  // Check channel index
  assert(channel_index >= 0);

  // Insert channels up to channel index
  for (int i = channels.NEntries(); i <= channel_index; i++) {
    channels.Insert(NULL);
  }

  // Delete previous channel
  if (channels[channel_index]) delete channels[channel_index];

  // Update image width and height
  if (image_width <= 0) image_width = channel.XResolution();
  if (image_height <= 0) image_height = channel.YResolution();
  
  // Copy image into channel
  channels[channel_index] = new R2Grid(channel);

  // Resample if necessary
  if ((image_width != channel.XResolution()) || (image_height != channel.YResolution())) {
    channels[channel_index]->Resample(image_width, image_height, TRUE);
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x20, %rdi
callq 0x16d50
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jg 0x68472
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x6b860
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x68449
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movl 0x4c(%rsp), %esi
callq 0x6b920
cmpq $0x0, (%rax)
je 0x684c5
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movl 0x4c(%rsp), %esi
callq 0x6b920
movq (%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x684c3
movq 0x18(%rsp), %rdi
callq 0x1127b0
movq 0x18(%rsp), %rdi
movl $0xd0, %esi
callq 0x13580
jmp 0x684c5
movq 0x20(%rsp), %rax
cmpl $0x0, 0x98(%rax)
jg 0x684ea
movq 0x40(%rsp), %rdi
callq 0x6b940
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x98(%rax)
movq 0x20(%rsp), %rax
cmpl $0x0, 0x9c(%rax)
jg 0x6850f
movq 0x40(%rsp), %rdi
callq 0x6b960
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x9c(%rax)
movl $0xd0, %edi
callq 0x13570
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rsi
callq 0x1124c0
jmp 0x68530
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movl 0x4c(%rsp), %esi
callq 0x6b920
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rdx, (%rcx)
movl 0x98(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0x6b940
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jne 0x68593
movq 0x20(%rsp), %rax
movl 0x9c(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x6b960
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
je 0x685e7
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movl 0x4c(%rsp), %esi
callq 0x6b920
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq (%rcx), %rdi
movl 0x98(%rax), %esi
movl 0x9c(%rax), %edx
movl $0x1, %ecx
callq 0x11b220
jmp 0x685e7
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
movl $0xd0, %esi
callq 0x13580
jmp 0x685ec
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x13970
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::RemoveChannel(int)
void R3SurfelImage::
RemoveChannel(int channel_index)
{
  // Check channel index
  if (channel_index < 0) return;
  if (channel_index >= channels.NEntries()) return;
  if (!channels[channel_index]) return;

  // Remove channel
  delete channels[channel_index];
  channels[channel_index] = NULL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x1c(%rsp)
jge 0x68aa3
jmp 0x68b2e
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x20, %rdi
callq 0x16d50
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jl 0x68ac5
jmp 0x68b2e
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
movl 0x1c(%rsp), %esi
callq 0x6b920
cmpq $0x0, (%rax)
jne 0x68adf
jmp 0x68b2e
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
movl 0x1c(%rsp), %esi
callq 0x6b920
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x68b15
movq (%rsp), %rdi
callq 0x1127b0
movq (%rsp), %rdi
movl $0xd0, %esi
callq 0x13580
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
movl 0x1c(%rsp), %esi
callq 0x6b920
movq $0x0, (%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetScan(gaps::R3SurfelScan*)
void R3SurfelImage::
SetScan(R3SurfelScan *scan) 
{
  // Check if the same
  if (this->scan == scan) return;

  // Update old scan
  if (this->scan) {
    assert(this->scan->image == this);
    this->scan->image = NULL;
  }

  // Update new scan
  if (scan) {
    assert(scan->image == NULL);
    scan->image = this;
  }

  // Assign scan
  this->scan = scan;

  // Mark scene as dirty
  if (Scene()) Scene()->SetDirty();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rax), %rax
cmpq 0x8(%rsp), %rax
jne 0x68b64
jmp 0x68bbd
movq (%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x68b7f
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq $0x0, 0x20(%rax)
cmpq $0x0, 0x8(%rsp)
je 0x68b94
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rdi)
callq 0x6b9f0
cmpq $0x0, %rax
je 0x68bbd
movq (%rsp), %rdi
callq 0x6b9f0
movq %rax, %rdi
callq 0x1bea0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetPose(gaps::R3CoordSystem const&)
void R3SurfelImage::
SetPose(const R3CoordSystem& pose) 
{
  // Set pose
  this->pose = pose;

  // Update rollling shutter poses
  this->rolling_shutter_poses[0] = this->pose;
  this->rolling_shutter_poses[1] = this->pose;
  flags.Remove(R3_SURFEL_IMAGE_HAS_ROLLING_SHUTTER);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x18(%rsp), %rsi
addq $0x30, %rdi
callq 0x457f0
movq (%rsp), %rdi
movq %rdi, %rsi
addq $0x30, %rsi
addq $0xf0, %rdi
callq 0x457f0
movq (%rsp), %rdi
movq %rdi, %rsi
addq $0x30, %rsi
addq $0xf0, %rdi
addq $0x60, %rdi
callq 0x457f0
movq (%rsp), %rax
addq $0x1c8, %rax            # imm = 0x1C8
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x31a80
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetOrientation(gaps::R3Vector const&, gaps::R3Vector const&)
void R3SurfelImage::
SetOrientation(const R3Vector& towards, const R3Vector& up) 
{
  // Set orientation
  this->pose.SetAxes(R3Triad(towards, up));

  // Update rollling shutter poses
  this->rolling_shutter_poses[0] = this->pose;
  this->rolling_shutter_poses[1] = this->pose;
  flags.Remove(R3_SURFEL_IMAGE_HAS_ROLLING_SHUTTER);
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x30, %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0xd5d60
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xd56e0
movq 0x10(%rsp), %rdi
movq %rdi, %rsi
addq $0x30, %rsi
addq $0xf0, %rdi
callq 0x457f0
movq 0x10(%rsp), %rdi
movq %rdi, %rsi
addq $0x30, %rsi
addq $0xf0, %rdi
addq $0x60, %rdi
callq 0x457f0
movq 0x10(%rsp), %rax
addq $0x1c8, %rax            # imm = 0x1C8
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x31a80
addq $0x88, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetTimestamp(double)
void R3SurfelImage::
SetTimestamp(RNScalar timestamp) 
{
  // Set timestamp
  this->timestamp = timestamp;

  // Update rollling shutter timestamps
  this->rolling_shutter_timestamps[0] = timestamp;
  this->rolling_shutter_timestamps[1] = timestamp;
  flags.Remove(R3_SURFEL_IMAGE_HAS_ROLLING_SHUTTER);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq 0x20(%rsp), %rax
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x90(%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x1b0(%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x1b8(%rax)
addq $0x1c8, %rax            # imm = 0x1C8
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x31a80
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetRollingShutterTimestamps(double, double)
void R3SurfelImage::
SetRollingShutterTimestamps(RNScalar timestamp0, RNScalar timestamp1) 
{
  // Check if timestamps are different
  if (timestamp0 == timestamp1) {
    SetTimestamp(timestamp0);
  }
  else {
    // Set rollling shutter timestamps
    this->rolling_shutter_timestamps[0] = timestamp0;
    this->rolling_shutter_timestamps[1] = timestamp1;

    // Update center timestamp
    this->timestamp = 0.5 * (timestamp0 + timestamp1);

    // Update flags
    flags.Add(R3_SURFEL_IMAGE_HAS_ROLLING_SHUTTER);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0x28(%rsp), %xmm0
ucomisd 0x20(%rsp), %xmm0
jne 0x68fe5
jp 0x68fe5
movq 0x10(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
movq (%rdi), %rax
callq *0x98(%rax)
jmp 0x6904f
movq 0x10(%rsp), %rax
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x1b0(%rax)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x1b8(%rax)
movsd 0x28(%rsp), %xmm1
addsd 0x20(%rsp), %xmm1
movsd 0x13b13e(%rip), %xmm0   # 0x1a4158
mulsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rax)
addq $0x1c8, %rax            # imm = 0x1C8
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1c2d0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::SetRollingShutterPoses(gaps::R3CoordSystem const&, gaps::R3CoordSystem const&)
void R3SurfelImage::
SetRollingShutterPoses(const R3CoordSystem& pose0, const R3CoordSystem& pose1) 
{
  // Check if poses are different
  if (pose0 == pose1) {
    SetPose(pose0);
  }
  else {    
    // Set rollling shutter poses
    this->rolling_shutter_poses[0] = pose0;
    this->rolling_shutter_poses[1] = pose1;

    // Update center pose
    this->pose = R3CoordSystemSlerp(pose0, pose1, 0.5);

    // Update flags
    flags.Add(R3_SURFEL_IMAGE_HAS_ROLLING_SHUTTER);
  }
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x6ba00
cmpl $0x0, %eax
je 0x690be
movq 0x10(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x69157
movq 0x10(%rsp), %rdi
movq 0x88(%rsp), %rsi
addq $0xf0, %rdi
callq 0x457f0
movq 0x10(%rsp), %rdi
movq 0x80(%rsp), %rsi
addq $0xf0, %rdi
addq $0x60, %rdi
callq 0x457f0
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
leaq 0x20(%rsp), %rdi
movsd 0x13b047(%rip), %xmm0   # 0x1a4158
callq 0xd5950
movq 0x10(%rsp), %rdi
addq $0x30, %rdi
leaq 0x20(%rsp), %rsi
callq 0x457f0
movq 0x10(%rsp), %rax
addq $0x1c8, %rax            # imm = 0x1C8
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1c2d0
addq $0x98, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::RollingShutterPoseAtImagePosition(gaps::R2Point const&) const
R3CoordSystem R3SurfelImage::
RollingShutterPoseAtImagePosition(const R2Point& image_position) const
{
  // Check rolling shutter parameters
  if (!HasRollingShutter()) return pose;
  if (image_width <= 1) return rolling_shutter_poses[0];

  // Get interpolation parameter
  double u = (double) image_position.X() / (double) (image_width-1);
  if (u <= 0) return rolling_shutter_poses[0];
  if (u >= 1) return rolling_shutter_poses[1];

  // Return slerped pose
  return R3CoordSystemSlerp(rolling_shutter_poses[0], rolling_shutter_poses[1], u);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x31d40
cmpl $0x0, %eax
jne 0x6951a
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x30, %rsi
callq 0xd5530
jmp 0x695e2
movq 0x10(%rsp), %rax
cmpl $0x1, 0x98(%rax)
jg 0x69542
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0xf0, %rsi
callq 0xd5530
jmp 0x695e2
movq 0x20(%rsp), %rdi
callq 0x308e0
movq 0x10(%rsp), %rax
movl 0x98(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x18(%rsp), %xmm0
jb 0x6958a
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0xf0, %rsi
callq 0xd5530
jmp 0x695e2
movsd 0x18(%rsp), %xmm0
movsd 0x13abd0(%rip), %xmm1   # 0x1a4168
ucomisd %xmm1, %xmm0
jb 0x695b9
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0xf0, %rsi
addq $0x60, %rsi
callq 0xd5530
jmp 0x695e2
movq (%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rdx, %rsi
addq $0xf0, %rsi
addq $0xf0, %rdx
addq $0x60, %rdx
movsd 0x18(%rsp), %xmm0
callq 0xd5950
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::TransformFromCameraToImage(gaps::R3Point const&) const
R2Point R3SurfelImage::
TransformFromCameraToImage(const R3Point& camera_position) const
{
  // Project 3D point in camera coordinates into pixels
  const R2Point c = ImageCenter();
  RNCoord x = c.X() + xfocal * camera_position.X() / -camera_position.Z();
  RNCoord y = c.Y() + yfocal * camera_position.Y() / -camera_position.Z();
  R2Point undistorted_image_position(x, y);
  
  // Distort image position
  return DistortImagePosition(undistorted_image_position);
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x38(%rsp)
movq %rdi, %rax
movq %rax, 0x48(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x88(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x31580
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
callq 0x133990
leaq 0x70(%rsp), %rdi
callq 0x308e0
movq 0x40(%rsp), %rax
movsd %xmm0, 0x18(%rsp)
movsd 0xb0(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x80(%rsp), %rdi
callq 0x187b0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x80(%rsp), %rdi
callq 0x187a0
movsd 0x10(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x18(%rsp), %xmm0
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x30910
movq 0x40(%rsp), %rax
movsd %xmm0, 0x30(%rsp)
movsd 0xb8(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x80(%rsp), %rdi
callq 0x187c0
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x80(%rsp), %rdi
callq 0x187a0
movsd 0x28(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x30(%rsp), %xmm0
movq %xmm2, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm2
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x68(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
leaq 0x50(%rsp), %rdi
callq 0x133960
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x69810
movq 0x48(%rsp), %rax
addq $0x98, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::TransformFromWorldToImage(gaps::R3Point const&) const
R2Point R3SurfelImage::
TransformFromWorldToImage(const R3Point& world_position) const
{
  // Transform into camera coordinates
  R3Point camera_position = TransformFromWorldToCamera(world_position);
  if (RNIsPositiveOrZero(camera_position.Z())) return R2unknown_point;

  // Transform into image coordinates
  return TransformFromCameraToImage(camera_position);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movq 0x30(%rsp), %rdx
leaq 0x18(%rsp), %rdi
callq 0x69290
leaq 0x18(%rsp), %rdi
callq 0x187a0
leaq 0x192d7f(%rip), %rax    # 0x1fc548
movsd (%rax), %xmm1
callq 0x503b0
cmpl $0x0, %eax
je 0x697e9
movq (%rsp), %rdi
leaq 0x595726(%rip), %rsi    # 0x5fef08
callq 0x133990
jmp 0x697fc
movq 0x10(%rsp), %rsi
movq (%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x695f0
movq 0x8(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::TransformFromCameraToWorld(gaps::R3Point const&) const
R3Point R3SurfelImage::
TransformFromCameraToWorld(const R3Point& camera_position) const
{
  // Check if rolling shutter
  if (HasRollingShutter()) {
    // Get projected image position
    R2Point image_position = TransformFromCameraToImage(camera_position);

    // Get rolling shutter pose
    R3CoordSystem rs_pose = RollingShutterPoseAtImagePosition(image_position);

    // Transform 3D point from camera into world coordinate system
    return rs_pose.Matrix() * camera_position;
  }
  else {
    // Transform 3D point from camera into world coordinate system
    return CameraToWorld() * camera_position;
  }
}

// Assembly:
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
movq %rdx, 0x190(%rsp)
movq 0x198(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x31d40
cmpl $0x0, %eax
je 0x69fe8
movq 0x18(%rsp), %rsi
movq 0x190(%rsp), %rdx
leaq 0x180(%rsp), %rdi
callq 0x695f0
movq 0x18(%rsp), %rsi
leaq 0x120(%rsp), %rdi
leaq 0x180(%rsp), %rdx
callq 0x694d0
leaq 0xa0(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xd55b0
movq 0x8(%rsp), %rdi
movq 0x190(%rsp), %rdx
leaq 0xa0(%rsp), %rsi
callq 0xdc230
jmp 0x6a00e
movq 0x18(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x6b8f0
movq 0x8(%rsp), %rdi
movq 0x190(%rsp), %rdx
leaq 0x20(%rsp), %rsi
callq 0xdc230
movq 0x10(%rsp), %rax
addq $0x1a8, %rsp            # imm = 0x1A8
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::TransformFromImageToWorld(gaps::R2Point const&, double) const
R3Point R3SurfelImage::
TransformFromImageToWorld(const R2Point& image_position, RNLength depth) const
{
  // Transform from image to camera coordinates
  R3Point camera_position = TransformFromImageToCamera(image_position, depth);

  // Transform from camera to world coordinates
  if (HasRollingShutter()) {
    // Get rolling shutter pose
    R3CoordSystem rs_pose = RollingShutterPoseAtImagePosition(image_position);

    // Return position in world coordinates
    return rs_pose.Matrix() * camera_position;
  }
  else {
    // Return position in world coordinates
    return TransformFromCameraToWorld(camera_position);
  }
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq %rdx, 0x120(%rsp)
movsd %xmm0, 0x118(%rsp)
movq 0x128(%rsp), %rsi
movq %rsi, 0x18(%rsp)
movq 0x120(%rsp), %rdx
movsd 0x118(%rsp), %xmm0
leaq 0x100(%rsp), %rdi
callq 0x6a100
movq 0x18(%rsp), %rdi
callq 0x31d40
cmpl $0x0, %eax
je 0x6a0d4
movq 0x18(%rsp), %rsi
movq 0x120(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x694d0
leaq 0x20(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xd55b0
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x100(%rsp), %rdx
callq 0xdc230
jmp 0x6a0eb
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
leaq 0x100(%rsp), %rdx
callq 0x69f40
movq 0x10(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::UndistortImagePosition(gaps::R2Point const&) const
R2Point R3SurfelImage::
UndistortImagePosition(const R2Point& distorted_image_position) const
{
  // Check distortion type
  if (distortion_type == R3_SURFEL_NO_DISTORTION)
    return distorted_image_position;

  // Check distortion parameters
  if ((radial_distortion[0] == 0) && (radial_distortion[1] == 0) && (radial_distortion[2] == 0) &&
      (tangential_distortion[0] == 0) && (tangential_distortion[1] == 0))
    return distorted_image_position;

  // Check focal lengths
  if ((xfocal <= 0) || (yfocal <= 0))
    return distorted_image_position;
  
  // Not implemented yet
  RNWarning("R3SurfelImage::UndistortImagePosition not implemented");
  return distorted_image_position;
}

// 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)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0xc0(%rax)
jne 0x6a397
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x133990
jmp 0x6a472
movq 0x18(%rsp), %rax
movsd 0xc8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6a420
jp 0x6a420
movq 0x18(%rsp), %rax
movsd 0xd0(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6a420
jp 0x6a420
movq 0x18(%rsp), %rax
movsd 0xd8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6a420
jp 0x6a420
movq 0x18(%rsp), %rax
movsd 0xe0(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6a420
jp 0x6a420
movq 0x18(%rsp), %rax
movsd 0xe8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6a420
jp 0x6a420
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x133990
jmp 0x6a472
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0xb0(%rax), %xmm0
jae 0x6a444
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd 0xb8(%rax), %xmm0
jb 0x6a455
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x133990
jmp 0x6a472
leaq 0x13b46c(%rip), %rdi    # 0x1a58c8
movb $0x0, %al
callq 0x146590
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x133990
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::ContainsImagePosition(gaps::R2Point const&) const
RNBoolean R3SurfelImage::
ContainsImagePosition(const R2Point& image_position) const
{
  // Check if within bounds
  if (image_position.X() < -0.49) return FALSE;
  if (image_position.Y() < -0.49) return FALSE;
  if (image_position.X() >= ImageWidth() - 0.51) return FALSE;
  if (image_position.Y() >= ImageHeight() - 0.51) return FALSE;
  return TRUE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x308e0
movaps %xmm0, %xmm1
movsd 0x13b40b(%rip), %xmm0   # 0x1a58b8
ucomisd %xmm1, %xmm0
jbe 0x6a4c0
movl $0x0, 0x34(%rsp)
jmp 0x6a570
movq 0x20(%rsp), %rdi
callq 0x30910
movaps %xmm0, %xmm1
movsd 0x13b3e3(%rip), %xmm0   # 0x1a58b8
ucomisd %xmm1, %xmm0
jbe 0x6a4e8
movl $0x0, 0x34(%rsp)
jmp 0x6a570
movq 0x20(%rsp), %rdi
callq 0x308e0
movq 0x18(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x308f0
movsd 0x10(%rsp), %xmm0
cvtsi2sd %eax, %xmm1
movsd 0x13b3ac(%rip), %xmm2   # 0x1a58c0
subsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6a528
movl $0x0, 0x34(%rsp)
jmp 0x6a570
movq 0x20(%rsp), %rdi
callq 0x30910
movq 0x18(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x30920
movsd 0x8(%rsp), %xmm0
cvtsi2sd %eax, %xmm1
movsd 0x13b36c(%rip), %xmm2   # 0x1a58c0
subsd %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6a568
movl $0x0, 0x34(%rsp)
jmp 0x6a570
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::RollingShutterPoseAtTimestamp(double) const
R3CoordSystem R3SurfelImage::
RollingShutterPoseAtTimestamp(RNScalar t) const
{
  // Check rolling shutter parameters
  if (!HasRollingShutter()) return pose;
  double dt = rolling_shutter_timestamps[1] - rolling_shutter_timestamps[0];
  if (RNIsZero(dt)) return rolling_shutter_poses[0];

  // Get interpolation parameter
  double u = (t - rolling_shutter_timestamps[0]) / dt;
  if (u <= 0) return rolling_shutter_poses[0];
  if (u >= 1) return rolling_shutter_poses[1];
  
  // Return slerped pose
  return R3CoordSystemSlerp(rolling_shutter_poses[0], rolling_shutter_poses[1], u);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x31d40
cmpl $0x0, %eax
jne 0x6a5cd
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x30, %rsi
callq 0xd5530
jmp 0x6a6ba
movq 0x18(%rsp), %rax
movsd 0x1b8(%rax), %xmm0
subsd 0x1b0(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
leaq 0x191f53(%rip), %rax    # 0x1fc548
movsd (%rax), %xmm1
callq 0x50350
cmpl $0x0, %eax
je 0x6a61e
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0xf0, %rsi
callq 0xd5530
jmp 0x6a6ba
movq 0x18(%rsp), %rax
movsd 0x30(%rsp), %xmm0
subsd 0x1b0(%rax), %xmm0
divsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x20(%rsp), %xmm0
jb 0x6a660
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0xf0, %rsi
callq 0xd5530
jmp 0x6a6ba
movsd 0x20(%rsp), %xmm0
movsd 0x139afa(%rip), %xmm1   # 0x1a4168
ucomisd %xmm1, %xmm0
jb 0x6a690
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0xf0, %rsi
addq $0x60, %rsi
callq 0xd5530
jmp 0x6a6ba
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq %rdx, %rsi
addq $0xf0, %rsi
addq $0xf0, %rdx
addq $0x60, %rdx
movsd 0x20(%rsp), %xmm0
callq 0xd5950
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::RollingShutterTimestampAtImagePosition(gaps::R2Point const&) const
RNScalar R3SurfelImage::
RollingShutterTimestampAtImagePosition(const R2Point& image_position) const
{
  // Check rolling shutter parameters
  if (!HasRollingShutter()) return timestamp;
  if (image_width <= 1) return rolling_shutter_timestamps[0];

  // Get interpolation parameter
  double u = (double) image_position.X() / (double) (image_width-1);
  if (u <= 0) return rolling_shutter_timestamps[0];
  if (u >= 1) return rolling_shutter_timestamps[1];

  // Return interpolated timestamp
  return (1-u)*rolling_shutter_timestamps[0] + u*rolling_shutter_timestamps[1];
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x31d40
cmpl $0x0, %eax
jne 0x6a708
movq (%rsp), %rax
movsd 0x90(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x6a7ce
movq (%rsp), %rax
cmpl $0x1, 0x98(%rax)
jg 0x6a72c
movq (%rsp), %rax
movsd 0x1b0(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x6a7ce
movq 0x10(%rsp), %rdi
callq 0x308e0
movq (%rsp), %rax
movl 0x98(%rax), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x8(%rsp), %xmm0
jb 0x6a770
movq (%rsp), %rax
movsd 0x1b0(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x6a7ce
movsd 0x8(%rsp), %xmm0
movsd 0x1399ea(%rip), %xmm1   # 0x1a4168
ucomisd %xmm1, %xmm0
jb 0x6a798
movq (%rsp), %rax
movsd 0x1b8(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x6a7ce
movq (%rsp), %rax
movsd 0x1399c4(%rip), %xmm0   # 0x1a4168
subsd 0x8(%rsp), %xmm0
movsd 0x1b0(%rax), %xmm2
movsd 0x8(%rsp), %xmm1
mulsd 0x1b8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelImage::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print image
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "%d %s", SceneIndex(), (Name()) ? Name() : "-");
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x6a819
movq 0x18877f(%rip), %rax    # 0x1f2f90
movq (%rax), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x6a839
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x13cd91(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x670a0
movq 0x20(%rsp), %rdi
movl %eax, 0x1c(%rsp)
callq 0x30890
cmpq $0x0, %rax
je 0x6a872
movq 0x20(%rsp), %rdi
callq 0x30890
movq %rax, 0x8(%rsp)
jmp 0x6a880
leaq 0x139af3(%rip), %rax    # 0x1a436c
movq %rax, 0x8(%rsp)
jmp 0x6a880
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rcx
leaq 0x139ad1(%rip), %rsi    # 0x1a4366
movb $0x0, %al
callq 0x13810
cmpq $0x0, 0x28(%rsp)
je 0x6a8bc
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rdx
leaq 0x13cd0e(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x38(%rsp), %rdi
leaq 0x140e2a(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelImage.cpp
// Function: gaps::R3SurfelImage::Draw(gaps::RNFlags, double) const
void R3SurfelImage::
Draw(RNFlags flags, RNScalar scale) const
{
#if 1
  // Draw towards and up
  RNGrfxBegin(RN_GRFX_LINES);
  const R3Point& viewpoint = Viewpoint();
  const R3Vector towards = Towards();
  const R3Vector up = Up();
  R3LoadPoint(viewpoint);
  R3LoadPoint(viewpoint + scale * towards);
  R3LoadPoint(viewpoint);
  R3LoadPoint(viewpoint + 0.5 * scale * up);
  RNGrfxEnd();
#else
  // Draw R3Camera approximation
  Camera().Draw(scale);
#endif
}

// Assembly:
subq $0xc8, %rsp
movq %rsi, 0xc0(%rsp)
movq %rdi, 0xb8(%rsp)
movsd %xmm0, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, (%rsp)
movl $0x1, %edi
callq 0x4ff50
movq (%rsp), %rdi
callq 0x30940
movq (%rsp), %rsi
movq %rax, 0xa8(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x31ca0
movq (%rsp), %rdi
callq 0x31cf0
movq %rax, %rsi
leaq 0x78(%rsp), %rdi
callq 0xf94f0
movq 0xa8(%rsp), %rdi
callq 0x50050
movq 0xa8(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0xb0(%rsp), %xmm0
leaq 0x48(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x31980
movq 0x8(%rsp), %rsi
leaq 0x60(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0xf8910
leaq 0x60(%rsp), %rdi
callq 0x50050
movq 0xa8(%rsp), %rdi
callq 0x50050
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0x139795(%rip), %xmm0   # 0x1a4158
mulsd 0xb0(%rsp), %xmm0
leaq 0x18(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x31980
movq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0xf8910
leaq 0x30(%rsp), %rdi
callq 0x50050
callq 0x50070
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeature.cpp
// Function: gaps::R3SurfelFeature::~R3SurfelFeature()
R3SurfelFeature::
~R3SurfelFeature(void)
{
  // Remove from scene
  if (scene) scene->RemoveFeature(this);

  // Delete name
  if (name) free(name);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x183056(%rip), %rcx    # 0x1eed80
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x8(%rax)
je 0x6bd51
movq 0x8(%rsp), %rsi
movq 0x8(%rsi), %rdi
movq (%rdi), %rax
movq 0xb8(%rax), %rax
callq *%rax
jmp 0x6bd4f
jmp 0x6bd51
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6bd6b
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x136a0
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x187d0
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeature.cpp
// Function: gaps::R3SurfelFeature::operator=(gaps::R3SurfelFeature const&)
R3SurfelFeature& R3SurfelFeature::
operator=(const R3SurfelFeature& feature)
{
  // Assign properties
  this->name = (feature.name) ? RNStrdup(feature.name) : NULL;
  this->range = feature.range;
  this->weight = feature.weight;

  // Return this
  return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x6bdf9
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x1461b0
movq %rax, 0x8(%rsp)
jmp 0x6be02
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x6be02
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0x28(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq 0x18(%rsp), %rcx
movsd 0x30(%rcx), %xmm0
movsd %xmm0, 0x30(%rax)
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeature.cpp
// Function: gaps::R3SurfelFeature::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelFeature::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print feature name
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "%s ", Name());
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x6c009
movq 0x186f8f(%rip), %rax    # 0x1f2f90
movq (%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x6c029
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x13b5a1(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x30960
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x138904(%rip), %rsi    # 0x1a4950
movb $0x0, %al
callq 0x13810
cmpq $0x0, 0x18(%rsp)
je 0x6c073
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x13b557(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x28(%rsp), %rdi
leaq 0x13f673(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::R3SurfelFeatureVector(int)
R3SurfelFeatureVector::
R3SurfelFeatureVector(int nvalues)
  : values(NULL),
    nvalues(nvalues)
{
  // Allocate values
  if (nvalues > 0) {
    values = new RNScalar [ nvalues ];
    for (int i = 0; i < nvalues; i++) {
      values[i] = RN_UNKNOWN;
    }
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x182d0b(%rip), %rcx    # 0x1eedf8
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movl 0xc(%rsp), %ecx
movl %ecx, 0x10(%rax)
cmpl $0x0, 0xc(%rsp)
jle 0x6c176
movslq 0xc(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x13030
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x6c174
movq (%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x8(%rsp), %rcx
movsd 0x13801e(%rip), %xmm0   # 0x1a4180
movsd %xmm0, (%rax,%rcx,8)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x6c143
jmp 0x6c176
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::R3SurfelFeatureVector(gaps::R3SurfelFeatureVector const&)
R3SurfelFeatureVector::
R3SurfelFeatureVector(const R3SurfelFeatureVector& vector)
  : values(NULL),
    nvalues(vector.nvalues)
{
  // Allocate values
  if (nvalues > 0) {
    values = new RNScalar [ nvalues ];
    for (int i = 0; i < nvalues; i++) {
      values[i] = vector.values[i];
    }
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x182c59(%rip), %rcx    # 0x1eedf8
addq $0x10, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
cmpl $0x0, 0x10(%rax)
jle 0x6c244
movq 0x8(%rsp), %rax
movslq 0x10(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x13030
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c242
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq 0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x8(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x6c201
jmp 0x6c244
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator=(gaps::R3SurfelFeatureVector const&)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator=(const R3SurfelFeatureVector& vector)
{
  // Reallocate values
  if (nvalues != vector.nvalues) {
    nvalues = vector.nvalues;
    if (values) delete [] values;
    if (nvalues > 0) values = new RNScalar [ nvalues ];
    else values = NULL;
  }

  // Copy values
  for (int i = 0; i < nvalues; i++) {
    values[i] = vector.values[i];
  }

  // Return this
  return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x10(%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x10(%rcx), %eax
je 0x6c380
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
cmpq $0x0, 0x8(%rax)
je 0x6c32e
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x6c32c
movq (%rsp), %rdi
callq 0x13750
jmp 0x6c32e
movq 0x8(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jle 0x6c371
movq 0x8(%rsp), %rax
movslq 0x10(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x13030
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x6c37e
movq 0x8(%rsp), %rax
movq $0x0, 0x8(%rax)
jmp 0x6c380
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c3c9
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq 0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x8(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x6c388
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator+=(gaps::R3SurfelFeatureVector const&)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator+=(const R3SurfelFeatureVector& vector)
{
  // Check number of values
  assert(nvalues == vector.nvalues);

  // Add values
  for (int i = 0; i < nvalues; i++) {
    values[i] += vector.values[i];
  }

  // Return this
  return *this;
}

// 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 0x10(%rcx), %eax
jge 0x6c442
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x8(%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 0x6c3fc
movq -0x20(%rsp), %rax
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator-=(gaps::R3SurfelFeatureVector const&)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator-=(const R3SurfelFeatureVector& vector)
{
  // Check number of values
  assert(nvalues == vector.nvalues);

  // Subtract values
  for (int i = 0; i < nvalues; i++) {
    values[i] -= vector.values[i];
  }

  // Return this
  return *this;
}

// 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 0x10(%rcx), %eax
jge 0x6c4b6
movq -0x20(%rsp), %rax
movq -0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm1
movq 0x8(%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 0x6c46c
movq -0x20(%rsp), %rax
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator/=(gaps::R3SurfelFeatureVector const&)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator/=(const R3SurfelFeatureVector& vector)
{
  // Check number of values
  assert(nvalues == vector.nvalues);

  // Divide values
  for (int i = 0; i < nvalues; i++) {
    if (RNIsNotZero(vector.values[i])) values[i] /= vector.values[i];
  }

  // Return this
  return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rcx
movl 0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c5c4
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
leaq 0x18ffd0(%rip), %rax    # 0x1fc548
movsd (%rax), %xmm1
callq 0x55410
cmpl $0x0, %eax
je 0x6c5b5
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rcx), %rcx
movslq 0x14(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm1
movq 0x8(%rax), %rax
movslq 0x14(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x6c5b7
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x6c550
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator+=(double)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator+=(RNScalar a)
{
  // Add values
  for (int i = 0; i < nvalues; i++) {
    values[i] += a;
  }

  // Return this
  return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c626
movq -0x20(%rsp), %rax
movsd -0x10(%rsp), %xmm0
movq 0x8(%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 0x6c5ed
movq -0x20(%rsp), %rax
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator-=(double)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator-=(RNScalar a)
{
  // Subtract values
  for (int i = 0; i < nvalues; i++) {
    values[i] -= a;
  }

  // Return this
  return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c68a
movq -0x20(%rsp), %rax
movsd -0x10(%rsp), %xmm1
movq 0x8(%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 0x6c64d
movq -0x20(%rsp), %rax
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator*=(double)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator*=(RNScalar a)
{
  // Multiply values
  for (int i = 0; i < nvalues; i++) {
    values[i] *= a;
  }

  // Return this
  return *this;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x20(%rsp), %rcx
movl -0x14(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c6e6
movq -0x20(%rsp), %rax
movsd -0x10(%rsp), %xmm0
movq 0x8(%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 0x6c6ad
movq -0x20(%rsp), %rax
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::R3SurfelFeatureVector::operator/=(double)
R3SurfelFeatureVector& R3SurfelFeatureVector::
operator/=(RNScalar a)
{
  // Check a
  if (RNIsZero(a)) return *this;

  // Divide values
  for (int i = 0; i < nvalues; i++) {
    values[i] /= a;
  }

  // Return this
  return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movsd 0x10(%rsp), %xmm0
leaq 0x18fe33(%rip), %rax    # 0x1fc548
movsd (%rax), %xmm1
callq 0x50350
cmpl $0x0, %eax
je 0x6c72e
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x6c77a
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x10(%rcx), %eax
jge 0x6c771
movq (%rsp), %rax
movsd 0x10(%rsp), %xmm1
movq 0x8(%rax), %rax
movslq 0xc(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x6c736
movq (%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelFeatureVector.cpp
// Function: gaps::operator-(double, gaps::R3SurfelFeatureVector const&)
R3SurfelFeatureVector 
operator-(const RNScalar a, const R3SurfelFeatureVector& vector1)
{
  // Subtract from scalar
  R3SurfelFeatureVector vector;
  vector *= -1.0;
  vector += a;
  return vector;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movb $0x0, 0x1f(%rsp)
xorl %esi, %esi
callq 0x6c0d0
movq 0x10(%rsp), %rdi
movsd 0x1376e6(%rip), %xmm0   # 0x1a4180
callq 0x6c690
movq 0x10(%rsp), %rdi
movsd 0x28(%rsp), %xmm0
callq 0x6c5d0
movb $0x1, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
jne 0x6cac5
movq 0x10(%rsp), %rdi
callq 0x6c250
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nop