LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::InsertPanorama(gaps::GSVPanorama*)
void GSVSegment::
InsertPanorama(GSVPanorama *panorama)
{
  // Just checking
  assert(panorama->segment_index == -1);
  assert(panorama->segment == NULL);

  // Insert camera panorama
  panorama->segment = this;
  panorama->segment_index = panoramas.NEntries();
  panoramas.Insert(panorama);

  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x8(%rsp), %rax
movq %rdi, 0x8(%rax)
addq $0x40, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x40, %rdi
movq 0x8(%rsp), %rsi
callq 0x47d00
movq (%rsp), %rdi
callq 0x48ec0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::RemovePanorama(gaps::GSVPanorama*)
void GSVSegment::
RemovePanorama(GSVPanorama *panorama)
{
  // Just checking
  assert(panorama->segment_index >= 0);
  assert(panorama->segment_index < panoramas.NEntries());
  assert(panorama->segment == this);

  // Remove camera panorama
  RNArrayEntry *entry = panoramas.KthEntry(panorama->segment_index);
  GSVPanorama *tail = panoramas.Tail();
  tail->segment_index = panorama->segment_index;
  panoramas.EntryContents(entry) = tail;
  panoramas.RemoveTail();
  panorama->segment_index = -1;
  panorama->segment = NULL;

  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x40, %rdi
movq 0x28(%rsp), %rax
movl 0x10(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x40, %rdi
callq 0x4a810
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x40, %rdi
movq 0x20(%rsp), %rsi
callq 0x4a820
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x40, %rdi
callq 0x443d0
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq 0x28(%rsp), %rax
movq $0x0, 0x8(%rax)
callq 0x48ec0
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::SetName(char const*)
void GSVSegment::
SetName(const char *name)
{
  // Delete previous name
  if (this->name) free(this->name);

  // Set new name
  if (name) this->name = strdup(name);
  else this->name = NULL;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x88(%rax)
je 0x49291
movq (%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x29350
cmpq $0x0, 0x8(%rsp)
je 0x492b3
movq 0x8(%rsp), %rdi
callq 0x29070
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x88(%rax)
jmp 0x492c2
movq (%rsp), %rax
movq $0x0, 0x88(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Draw(gaps::RNFlags) const
void GSVSegment::
Draw(RNFlags flags) const
{
  // Draw surveys
  for (int i = 0; i < NSurveys(); i++) {
    GSVSurvey *survey = Survey(i);
    survey->Draw(flags);
  }

  // Draw tapestries
  for (int i = 0; i < NTapestries(); i++) {
    GSVTapestry *tapestry = Tapestry(i);
    tapestry->Draw(flags);
  }
}

// Assembly:
subq $0x58, %rsp
movq %rsi, 0x50(%rsp)
movq %rdi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x10(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x49346
movq 0x10(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x3a050
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x492f0
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
callq 0x44b60
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x493a4
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x44810
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x4934e
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::UpdateBBox()
void GSVSegment::
UpdateBBox(void) 
{
  // Update bounding box
  bbox = R3null_box;
  for (int i = 0; i < NSurveys(); i++) bbox.Union(Survey(i)->BBox());
  for (int i = 0; i < NTapestries(); i++) bbox.Union(Tapestry(i)->BBox());
  for (int i = 0; i < NPanoramas(); i++) bbox.Union(Panorama(i)->Viewpoint());
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x50, %rdi
leaq 0x2b8efa(%rip), %rsi    # 0x3024f8
callq 0x386d0
movl $0x0, 0x4c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0x34(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0x34(%rsp), %eax
cmpl %ecx, %eax
jge 0x49663
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, 0x28(%rsp)
movl 0x4c(%rsp), %esi
callq 0x3a050
movq %rax, %rdi
callq 0x4a830
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1538e0
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x4960b
movl $0x0, 0x48(%rsp)
movq 0x38(%rsp), %rdi
movl 0x48(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x44b60
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x496c3
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, 0x18(%rsp)
movl 0x48(%rsp), %esi
callq 0x44810
movq %rax, %rdi
callq 0x4a880
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x1538e0
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x4966b
movl $0x0, 0x44(%rsp)
movq 0x38(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x3a290
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x49723
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, 0x8(%rsp)
movl 0x44(%rsp), %esi
callq 0x3a2b0
movq %rax, %rdi
callq 0x44d40
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x153680
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x496cb
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::CreateArrayOfPoints(gaps::GSVSegment const*, gaps::RNArray<gaps::GSVPoint const*>&)
static int
CreateArrayOfPoints(const GSVSegment *segment, RNArray<const GSVPoint *>& points)
{
  // Create array of GSVPoints
  for (int iu = 0; iu < segment->NSurveys(); iu++) {
    GSVSurvey *survey = segment->Survey(iu);
    for (int ia = 0; ia < survey->NScans(); ia++) {
      GSVScan *scan = survey->Scan(ia);
      for (int ie = 0; ie < scan->NScanlines(); ie++) {
        GSVScanline *scanline = scan->Scanline(ie);
        if (!scanline->ArePointsResident()) continue;
        for (int ik = 0; ik < scanline->NPoints(); ik++) {
          const GSVPoint *point = &(scanline->Point(ik));
          points.Insert(point);
        }
      }
    }
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x60(%rsp), %rdi
callq 0x3a030
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a3b9
movq 0x60(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x3a050
movq %rax, 0x48(%rsp)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
callq 0x3a080
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a3a7
movq 0x48(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x3a0a0
movq %rax, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3a0d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a395
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x3a0f0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x4ab90
cmpl $0x0, %eax
jne 0x4a330
jmp 0x4a385
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0x3a120
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a383
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3a130
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x4b0d0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x4a338
jmp 0x4a385
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x4a2ec
jmp 0x4a397
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x4a2b1
jmp 0x4a3a9
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x4a276
movl $0x1, %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::IsGSVPointCompatible(gaps::GSVPoint const*, gaps::GSVPoint const*, void*)
static int
IsGSVPointCompatible(const GSVPoint *point1, const GSVPoint *point2, void *data)
{
  // Check timestamp difference
  static const double max_timestamp_difference = 0.5;
  double timestamp1 = point1->Timestamp();
  double timestamp2 = point2->Timestamp();
  if (fabs(timestamp1 - timestamp2) > max_timestamp_difference) return 0;
  return 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x4b100
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x4b100
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
movaps 0x21cb7a(%rip), %xmm1   # 0x266fc0
pand %xmm1, %xmm0
movsd 0x21bbfe(%rip), %xmm1   # 0x266050
ucomisd %xmm1, %xmm0
jbe 0x4a462
movl $0x0, 0x34(%rsp)
jmp 0x4a46a
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::InvalidateNormals()
void GSVSegment::
InvalidateNormals(void)
{
  // Invalidate all normals
  for (int iu = 0; iu < NSurveys(); iu++) {
    GSVSurvey *survey = Survey(iu);
    for (int ia = 0; ia < survey->NScans(); ia++) {
      GSVScan *scan = survey->Scan(ia);
      for (int ie = 0; ie < scan->NScanlines(); ie++) {
        GSVScanline *scanline = scan->Scanline(ie);
        if (!scanline->ArePointsResident()) continue;
        for (int ik = 0; ik < scanline->NPoints(); ik++) {
          GSVPoint& point = (GSVPoint&) scanline->Point(ik);
          point.SetNormal(R3zero_vector);
        }
      }
    }
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x18(%rsp), %rdi
movl 0x5c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a5e0
movq 0x18(%rsp), %rdi
movl 0x5c(%rsp), %esi
callq 0x3a050
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x10(%rsp)
movq 0x50(%rsp), %rdi
callq 0x3a080
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a5ce
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x3a0a0
movq %rax, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x40(%rsp), %rdi
callq 0x3a0d0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a5bc
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x3a0f0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x4ab90
cmpl $0x0, %eax
jne 0x4a555
jmp 0x4a5ac
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x3a120
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x4a5aa
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x3a130
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x6b8df8(%rip), %rsi    # 0x703390
callq 0x4ad50
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x4a55d
jmp 0x4a5ac
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x4a511
jmp 0x4a5be
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x4a4d6
jmp 0x4a5d0
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x4a49b
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<gaps::GSVPoint const*>::FindAll(gaps::GSVPoint const*, double, double, int (*)(gaps::GSVPoint const*, gaps::GSVPoint const*, void*), void*, gaps::RNArray<gaps::GSVPoint const*>&) const
int R3Kdtree<PtrType>::
FindAll(PtrType query_point,
  RNScalar min_distance, RNScalar max_distance, 
  int (*IsCompatible)(PtrType, PtrType, void *), void *compatible_data, 
  RNArray<PtrType>& points) const
{
  // Check root
  if (!root) return 0;

  // Use squared distances for efficiency
  if (max_distance < 0) return 0;
  if (min_distance < 0) min_distance = 0;
  RNLength min_distance_squared = min_distance * min_distance;
  RNLength max_distance_squared = max_distance * max_distance;

  // Search nodes recursively
  FindAll(root, bbox, 
    query_point, Position(query_point), 
    min_distance_squared, max_distance_squared, 
    IsCompatible, compatible_data, 
    points);

  // Return number of points
  return points.NEntries();
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movsd %xmm0, 0x78(%rsp)
movsd %xmm1, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x50(%rax)
jne 0x4ac26
movl $0x0, 0x94(%rsp)
jmp 0x4acf7
xorps %xmm0, %xmm0
ucomisd 0x70(%rsp), %xmm0
jbe 0x4ac41
movl $0x0, 0x94(%rsp)
jmp 0x4acf7
xorps %xmm0, %xmm0
ucomisd 0x78(%rsp), %xmm0
jbe 0x4ac55
xorps %xmm0, %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0x28(%rsp), %rsi
movsd 0x78(%rsp), %xmm0
mulsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x70(%rsp), %xmm0
mulsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x50(%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x80(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0x4b180
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x20(%rsp), %rcx
movsd 0x50(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movq 0x68(%rsp), %r9
movq 0x60(%rsp), %r10
movq 0x58(%rsp), %rax
leaq 0x30(%rsp), %r8
movq %rdx, %rdi
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4bbc0
movq 0x58(%rsp), %rdi
callq 0x38730
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/./GSVPoint.h
// Function: gaps::GSVPoint::SetRadius(int, double)
inline void GSVPoint::
SetRadius(int k, RNLength radius)
{
  // Set radius
  if (radius <= 0) this->radius[k] = 0;
  else if (radius > 64) this->radius[k] = 1e3 * 64;
  else this->radius[k] = 1e3 * radius + 0.5;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movsd %xmm0, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
xorps %xmm0, %xmm0
ucomisd -0x18(%rsp), %xmm0
jb 0x4aee7
movq -0x20(%rsp), %rax
movslq -0xc(%rsp), %rcx
movw $0x0, 0x40(%rax,%rcx,2)
jmp 0x4af44
movsd -0x18(%rsp), %xmm0
movsd 0x21c0bb(%rip), %xmm1   # 0x266fb0
ucomisd %xmm1, %xmm0
jbe 0x4af0e
movq -0x20(%rsp), %rax
movslq -0xc(%rsp), %rcx
movw $0xfa00, 0x40(%rax,%rcx,2) # imm = 0xFA00
jmp 0x4af42
movq -0x20(%rsp), %rax
movsd -0x18(%rsp), %xmm0
movsd 0x21c097(%rip), %xmm1   # 0x266fb8
mulsd %xmm1, %xmm0
movsd 0x21b123(%rip), %xmm1   # 0x266050
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, %dx
movslq -0xc(%rsp), %rcx
movw %dx, 0x40(%rax,%rcx,2)
jmp 0x4af44
retq
nopw %cs:(%rax,%rax)
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::~GSVCamera()
GSVCamera::
~GSVCamera(void)
{
  // Remove camera from run
  if (run) run->RemoveCamera(this);

  // Remove camera tapestries from this camera
  while (NTapestries() > 0) RemoveTapestry(Tapestry(0));
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x29a22e(%rip), %rcx    # 0x2e6948
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x8(%rax)
je 0x4c73a
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rdi
callq 0x459f0
jmp 0x4c738
jmp 0x4c73a
jmp 0x4c73c
movq 0x18(%rsp), %rdi
callq 0x44930
movl %eax, 0x14(%rsp)
jmp 0x4c74c
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jle 0x4c77b
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x4e2c0
movq %rax, 0x8(%rsp)
jmp 0x4c768
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x4c7b0
jmp 0x4c779
jmp 0x4c73c
movq 0x18(%rsp), %rdi
addq $0x88, %rdi
callq 0x386c0
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x4a610
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x44300
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::RemoveTapestry(gaps::GSVTapestry*)
void GSVCamera::
RemoveTapestry(GSVTapestry *tapestry)
{
  // Just checking
  assert(tapestry->camera_index >= 0);
  assert(tapestry->camera_index < tapestries.NEntries());
  assert(tapestry->camera == this);

  // Remove tapestry
  RNArrayEntry *entry = tapestries.KthEntry(tapestry->camera_index);
  GSVTapestry *tail = tapestries.Tail();
  tail->camera_index = tapestry->camera_index;
  tapestries.EntryContents(entry) = tail;
  tapestries.RemoveTail();
  tapestry->camera_index = -1;
  tapestry->camera = NULL;

  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x18, %rdi
movq 0x28(%rsp), %rax
movl 0x20(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x18, %rdi
callq 0x4a7f0
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movl 0x20(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x18, %rdi
movq 0x20(%rsp), %rsi
callq 0x4a800
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x18, %rdi
callq 0x443d0
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq 0x28(%rsp), %rax
movq $0x0, 0x18(%rax)
callq 0x4c9e0
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::SceneIndex() const
int GSVCamera::
SceneIndex(void) const
{
  // Get convenient variables
  GSVScene *scene = Scene();
  if (!scene) return -1;

  // Compute scene index
  int scene_index = RunIndex();
  for (int i = 0; i < run->SceneIndex(); i++) {
    GSVRun *r = scene->Run(i);
    scene_index += r->NCameras();
  }

  // Return scene index
  return scene_index;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4c890
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x4c8ff
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x4c96f
movq 0x8(%rsp), %rdi
callq 0x44d10
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x8(%rax), %rdi
callq 0x443f0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4c967
movq 0x20(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x39fb0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44320
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x4c915
movl 0x1c(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::InsertTapestry(gaps::GSVTapestry*)
void GSVCamera::
InsertTapestry(GSVTapestry *tapestry)
{
  // Just checking
  assert(tapestry->camera_index == -1);
  assert(tapestry->camera == NULL);

  // Insert tapestry
  tapestry->camera = this;
  tapestry->camera_index = tapestries.NEntries();
  tapestries.Insert(tapestry);

  // Invalidate bounding box
  InvalidateBBox();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x8(%rsp), %rax
movq %rdi, 0x18(%rax)
addq $0x18, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
callq 0x4a7c0
movq (%rsp), %rdi
callq 0x4c9e0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::Draw(gaps::RNFlags) const
void GSVCamera::
Draw(RNFlags flags) const
{
  // Draw tapestries
  for (int i = 0; i < NTapestries(); i++) {
    GSVTapestry *tapestry = Tapestry(i);
    tapestry->Draw(flags);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rsi, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x44930
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ccc6
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x4e2c0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x4cc70
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::Print(_IO_FILE*, char const*, char const*) const
void GSVCamera::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print camera header
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "Camera %d:", run_index);
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");

  // Add indentation to prefix
  char indented_prefix[1024];
  sprintf(indented_prefix, "%s  ", prefix);

   // Print tapestries
  for (int i = 0; i < NTapestries(); i++) {
    GSVTapestry *tapestry = Tapestry(i);
    tapestry->Print(fp, indented_prefix, suffix);
  }
}

// Assembly:
subq $0x448, %rsp            # imm = 0x448
movq %rdi, 0x440(%rsp)
movq %rsi, 0x438(%rsp)
movq %rdx, 0x430(%rsp)
movq %rcx, 0x428(%rsp)
movq 0x440(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x438(%rsp)
jne 0x4cd21
movq 0x2a22b2(%rip), %rax    # 0x2eefc8
movq (%rax), %rax
movq %rax, 0x438(%rsp)
cmpq $0x0, 0x430(%rsp)
je 0x4cd4a
movq 0x438(%rsp), %rdi
movq 0x430(%rsp), %rdx
leaq 0x2334e4(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x8(%rsp), %rax
movq 0x438(%rsp), %rdi
movl 0x10(%rax), %edx
leaq 0x21a2bf(%rip), %rsi    # 0x267020
movb $0x0, %al
callq 0x293c0
cmpq $0x0, 0x428(%rsp)
je 0x4cd91
movq 0x438(%rsp), %rdi
movq 0x428(%rsp), %rdx
leaq 0x23349d(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x438(%rsp), %rdi
leaq 0x21a066(%rip), %rsi    # 0x266e06
movb $0x0, %al
callq 0x293c0
leaq 0x20(%rsp), %rdi
movq 0x430(%rsp), %rdx
leaq 0x219d3b(%rip), %rsi    # 0x266af6
movb $0x0, %al
callq 0x2a280
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x44930
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ce26
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x4e2c0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x438(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq 0x428(%rsp), %rcx
movq (%rdi), %rax
callq *0x18(%rax)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4cdca
addq $0x448, %rsp            # imm = 0x448
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::UpdateBBox()
void GSVCamera::
UpdateBBox(void) 
{
  // Update bounding box
  bbox = R3null_box;
  for (int i = 0; i < NTapestries(); i++) {
    bbox.Union(Tapestry(i)->BBox());
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x88, %rdi
leaq 0x2b56a7(%rip), %rsi    # 0x3024f8
callq 0x386d0
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x44930
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ceb6
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x88, %rax
movq %rax, (%rsp)
movl 0x1c(%rsp), %esi
callq 0x4e2c0
movq %rax, %rdi
callq 0x4a880
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x1538e0
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4ce5e
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::DistortedPosition(gaps::R2Point const&) const
R2Point GSVCamera::
DistortedPosition(const R2Point& undistorted_image_position) const
{
  // Check focal lengths
  if (RNIsNegativeOrZero(focal_x) || RNIsNegativeOrZero(focal_y))
    return R2Point(-1,-1);
  
  // Check if there is no distortion
  if ((k1 == 0) && (k2 == 0) && (k3 == 0) && (p1 == 0) && (p2 == 0))
    return undistorted_image_position;
  
  // Undistorted_position and distorted position are both given in pixel coordinates 
  double delta_x = undistorted_image_position.X() - center_x;
  double delta_y = undistorted_image_position.Y() - center_y;
  double dir_x = delta_x / focal_x;
  double dir_y = delta_y / focal_y;
  return DistortedPositionFromUndistortedNormalizedPosition(dir_x, dir_y);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movsd 0x38(%rax), %xmm0
leaq 0x2aba72(%rip), %rax    # 0x2f8e28
movsd (%rax), %xmm1
callq 0x4e2f0
cmpl $0x0, %eax
jne 0x4d3e3
movq 0x18(%rsp), %rax
movsd 0x40(%rax), %xmm0
leaq 0x2aba53(%rip), %rax    # 0x2f8e28
movsd (%rax), %xmm1
callq 0x4e2f0
cmpl $0x0, %eax
je 0x4d3fd
movq 0x8(%rsp), %rdi
movsd 0x218c18(%rip), %xmm1   # 0x266008
movaps %xmm1, %xmm0
callq 0x1b9a30
jmp 0x4d4e3
movq 0x18(%rsp), %rax
movsd 0x58(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d477
jp 0x4d477
movq 0x18(%rsp), %rax
movsd 0x60(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d477
jp 0x4d477
movq 0x18(%rsp), %rax
movsd 0x68(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d477
jp 0x4d477
movq 0x18(%rsp), %rax
movsd 0x70(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d477
jp 0x4d477
movq 0x18(%rsp), %rax
movsd 0x78(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d477
jp 0x4d477
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x1b9a60
jmp 0x4d4e3
movq 0x40(%rsp), %rdi
callq 0x39990
movq 0x18(%rsp), %rax
subsd 0x48(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x40(%rsp), %rdi
callq 0x399a0
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
subsd 0x50(%rsi), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x38(%rsp), %xmm0
divsd 0x38(%rsi), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x30(%rsp), %xmm0
divsd 0x40(%rsi), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x4cec0
movq 0x10(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVCamera.cpp
// Function: gaps::GSVCamera::UndistortedPosition(gaps::R2Point const&) const
R2Point GSVCamera::
UndistortedPosition(const R2Point& distorted_image_position) const
{
  // Check if there is no distortion
  if ((k1 == 0) && (k2 == 0) && (k3 == 0) && (p1 == 0) && (p2 == 0))
    return distorted_image_position;
  
  // Not implemented yet
  RNAbort("Not implemented");
  return R2null_point;
}

// 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)
movsd 0x58(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d58f
jp 0x4d58f
movq 0x18(%rsp), %rax
movsd 0x60(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d58f
jp 0x4d58f
movq 0x18(%rsp), %rax
movsd 0x68(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d58f
jp 0x4d58f
movq 0x18(%rsp), %rax
movsd 0x70(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d58f
jp 0x4d58f
movq 0x18(%rsp), %rax
movsd 0x78(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4d58f
jp 0x4d58f
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x1b9a60
jmp 0x4d5ae
leaq 0x219ab7(%rip), %rdi    # 0x26704d
movb $0x0, %al
callq 0x1cbee0
movq 0x8(%rsp), %rdi
leaq 0x6b66ff(%rip), %rsi    # 0x703ca8
callq 0x1b9a60
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::~GSVPanorama()
GSVPanorama::
~GSVPanorama(void)
{
  // Remove panorama from segment
  if (segment) segment->RemovePanorama(this);

  // Delete images 
  while (NImages() > 0) delete Image(0);

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

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x2983fe(%rip), %rcx    # 0x2e6988
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x8(%rax)
je 0x4e5aa
movq 0x18(%rsp), %rsi
movq 0x8(%rsi), %rdi
callq 0x491b0
jmp 0x4e5a8
jmp 0x4e5aa
jmp 0x4e5ac
movq 0x18(%rsp), %rdi
callq 0x3a2e0
movl %eax, 0x14(%rsp)
jmp 0x4e5bc
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jle 0x4e5f0
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x3a300
movq %rax, 0x8(%rsp)
jmp 0x4e5d8
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4e5ee
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4e5ac
movq 0x18(%rsp), %rax
cmpq $0x0, 0x78(%rax)
je 0x4e60a
movq 0x18(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x29350
movq 0x18(%rsp), %rdi
addq $0x18, %rdi
callq 0x4f370
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x44300
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::SceneIndex() const
int GSVPanorama::
SceneIndex(void) const
{
  // Get convenient variables
  GSVRun *run = Run();
  if (!run) return -1;
  GSVScene *scene = run->Scene();
  if (!scene) return -1;

  // Compute scene index
  int scene_index = RunIndex();
  for (int i = 0; i < run->SceneIndex(); i++) {
    GSVRun *r = scene->Run(i);
    scene_index += r->NPanoramas();
  }

  // Return scene index
  return scene_index;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4e6a0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x4e712
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x4e79f
movq 0x30(%rsp), %rdi
callq 0x4a630
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x4e733
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x4e79f
movq 0x10(%rsp), %rdi
callq 0x4e7b0
movl %eax, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
callq 0x443f0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4e797
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x39fb0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x454b0
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x4e749
movl 0x24(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::RunIndex() const
int GSVPanorama::
RunIndex(void) const
{
  // Get convenient variables
  GSVRun *run = Run();
  if (!run) return -1;

  // Compute run index
  int run_index = SegmentIndex();
  for (int i = 0; i < segment->RunIndex(); i++) {
    GSVSegment *s = run->Segment(i);
    run_index += s->NPanoramas();
  }

  // Return run index
  return run_index;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4e6a0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x4e7df
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x4e84f
movq 0x8(%rsp), %rdi
callq 0x4a680
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x8(%rax), %rdi
callq 0x4a640
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4e847
movq 0x20(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3a290
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x4e7f5
movl 0x1c(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::Image(char const*) const
GSVImage *GSVPanorama::
Image(const char *name) const
{
  // Return image with matching name
  for (int i = 0; i < NImages(); i++) {
    GSVImage *image = Image(i);
    if (!image->Name()) continue;
    if (!strcmp(image->Name(), name)) return image;
  }

  // None found
  return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3a2e0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4e8f8
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a300
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3ae10
cmpq $0x0, %rax
jne 0x4e8c1
jmp 0x4e8eb
movq 0x10(%rsp), %rdi
callq 0x3ae10
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x29f00
cmpl $0x0, %eax
jne 0x4e8e9
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x4e901
jmp 0x4e8eb
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4e880
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::InsertImage(gaps::GSVImage*)
void GSVPanorama::
InsertImage(GSVImage *image)
{
  // Just checking
  assert(image->panorama_index == -1);
  assert(image->panorama == NULL);

  // Insert image
  image->panorama = this;
  image->panorama_index = images.NEntries();
  images.Insert(image);

  // Invalidate stuff
  viewpoint.Reset(FLT_MAX, FLT_MAX, FLT_MAX);
  timestamp = -1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x8(%rsp), %rax
movq %rdi, 0x18(%rax)
addq $0x18, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x20(%rax)
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
callq 0x4f390
movq (%rsp), %rdi
addq $0x28, %rdi
movsd 0x217653(%rip), %xmm2   # 0x266018
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x4f3c0
movq (%rsp), %rax
movsd 0x21762c(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x70(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::RemoveImage(gaps::GSVImage*)
void GSVPanorama::
RemoveImage(GSVImage *image)
{
  // Just checking
  assert(image->panorama_index >= 0);
  assert(image->panorama_index < images.NEntries());
  assert(image->panorama == this);

  // Remove image
  RNArrayEntry *entry = images.KthEntry(image->panorama_index);
  GSVImage *tail = images.Tail();
  tail->panorama_index = image->panorama_index;
  images.EntryContents(entry) = tail;
  images.RemoveTail();
  image->panorama_index = -1;
  image->panorama = NULL;

  // Invalidate stuff
  viewpoint.Reset(FLT_MAX, FLT_MAX, FLT_MAX);
  timestamp = -1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x18, %rdi
movq 0x28(%rsp), %rax
movl 0x20(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x18, %rdi
callq 0x4f400
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movl 0x20(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x18, %rdi
movq 0x20(%rsp), %rsi
callq 0x4f410
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x18, %rdi
callq 0x443d0
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movq 0x28(%rsp), %rax
movq $0x0, 0x18(%rax)
addq $0x28, %rdi
movsd 0x21757a(%rip), %xmm2   # 0x266018
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x4f3c0
movq 0x10(%rsp), %rax
movsd 0x217552(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x70(%rax)
addq $0x38, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::Draw(gaps::RNFlags) const
void GSVPanorama::
Draw(RNFlags flags) const
{
  // Draw images
  for (int i = 0; i < NImages(); i++) {
    GSVImage *image = Image(i);
    image->Draw(flags);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rsi, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3a2e0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4eb36
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3a300
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x4eae0
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::Print(_IO_FILE*, char const*, char const*) const
void GSVPanorama::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print panorama header
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "Panorama %d:", segment_index);
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");

  // Add indentation to prefix
  char indented_prefix[1024];
  sprintf(indented_prefix, "%s  ", prefix);

   // Print images
  for (int i = 0; i < NImages(); i++) {
    GSVImage *image = Image(i);
    image->Print(fp, indented_prefix, suffix);
  }
}

// Assembly:
subq $0x448, %rsp            # imm = 0x448
movq %rdi, 0x440(%rsp)
movq %rsi, 0x438(%rsp)
movq %rdx, 0x430(%rsp)
movq %rcx, 0x428(%rsp)
movq 0x440(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x438(%rsp)
jne 0x4eb91
movq 0x2a0442(%rip), %rax    # 0x2eefc8
movq (%rax), %rax
movq %rax, 0x438(%rsp)
cmpq $0x0, 0x430(%rsp)
je 0x4ebba
movq 0x438(%rsp), %rdi
movq 0x430(%rsp), %rdx
leaq 0x231674(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x8(%rsp), %rax
movq 0x438(%rsp), %rdi
movl 0x10(%rax), %edx
leaq 0x21849e(%rip), %rsi    # 0x26706f
movb $0x0, %al
callq 0x293c0
cmpq $0x0, 0x428(%rsp)
je 0x4ec01
movq 0x438(%rsp), %rdi
movq 0x428(%rsp), %rdx
leaq 0x23162d(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x438(%rsp), %rdi
leaq 0x2181f6(%rip), %rsi    # 0x266e06
movb $0x0, %al
callq 0x293c0
leaq 0x20(%rsp), %rdi
movq 0x430(%rsp), %rdx
leaq 0x217ecb(%rip), %rsi    # 0x266af6
movb $0x0, %al
callq 0x2a280
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3a2e0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ec96
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a300
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x438(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq 0x428(%rsp), %rcx
movq (%rdi), %rax
callq *0x18(%rax)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4ec3a
addq $0x448, %rsp            # imm = 0x448
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVPanorama.cpp
// Function: gaps::GSVPanorama::UpdateTimestamp()
void GSVPanorama::
UpdateTimestamp(void) 
{
  // Update timestamp
  timestamp = 0;
  if (NImages() > 0) {
    for (int i = 0; i < NImages(); i++) 
      timestamp += Image(i)->Timestamp();
    timestamp /= NImages();
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x70(%rdi)
callq 0x3a2e0
cmpl $0x0, %eax
jle 0x4f353
movl $0x0, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3a2e0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4f330
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a300
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4fc90
movq 0x10(%rsp), %rax
addsd 0x70(%rax), %xmm0
movsd %xmm0, 0x70(%rax)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x4f2dd
movq 0x10(%rsp), %rdi
callq 0x3a2e0
movl %eax, %ecx
movq 0x10(%rsp), %rax
cvtsi2sd %ecx, %xmm1
movsd 0x70(%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVImage.cpp
// Function: gaps::GSVImage::~GSVImage()
GSVImage::
~GSVImage(void)
{
  // Remove image from tapestry
  if (tapestry) tapestry->RemoveImage(this);

  // Remove image from panorama
  if (panorama) panorama->RemoveImage(this);

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

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x29740e(%rip), %rcx    # 0x2e69c8
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x8(%rax)
je 0x4f5da
movq 0x8(%rsp), %rsi
movq 0x8(%rsi), %rdi
callq 0x52500
jmp 0x4f5d8
jmp 0x4f5da
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4f5f8
movq 0x8(%rsp), %rsi
movq 0x18(%rsi), %rdi
callq 0x4e9f0
jmp 0x4f5f6
jmp 0x4f5f8
movq 0x8(%rsp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x4f618
movq 0x8(%rsp), %rax
movq 0xb8(%rax), %rdi
callq 0x29350
movq 0x8(%rsp), %rdi
addq $0x68, %rdi
callq 0x5e680
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
callq 0x5e680
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x44300
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVImage.cpp
// Function: gaps::GSVImage::SceneIndex() const
int GSVImage::
SceneIndex(void) const
{
  // Get convenient variables
  GSVRun *run = Run();
  if (!run) return -1;
  GSVScene *scene = run->Scene();
  if (!scene) return -1;

  // Compute scene index
  int scene_index = RunIndex();
  for (int ir = 0; ir < run->SceneIndex(); ir++) {
    GSVRun *r = scene->Run(ir);
    scene_index += r->NImages();
  }

  // Return scene index
  return scene_index;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4f6c0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x4f7b2
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f83f
movq 0x30(%rsp), %rdi
callq 0x4a630
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x4f7d3
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f83f
movq 0x10(%rsp), %rdi
callq 0x4f850
movl %eax, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
callq 0x443f0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4f837
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x39fb0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x45530
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x4f7e9
movl 0x24(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVImage.cpp
// Function: gaps::GSVImage::RunIndex() const
int GSVImage::
RunIndex(void) const
{
  // Get convenient variables
  GSVSegment *segment = Segment();
  if (!segment) return -1;
  GSVRun *run = segment->Run();
  if (!run) return -1;

  // Compute run index
  int run_index = SegmentIndex();
  for (int i = 0; i < segment->RunIndex(); i++) {
    GSVSegment *s = run->Segment(i);
    run_index += s->NImages();
  }

  // Return runindex
  return run_index;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x4f740
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x4f882
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f90f
movq 0x30(%rsp), %rdi
callq 0x4f380
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x4f8a3
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f90f
movq 0x10(%rsp), %rdi
callq 0x4f920
movl %eax, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
callq 0x4a640
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4f907
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x3a000
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x48210
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x4f8b9
movl 0x24(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVImage.cpp
// Function: gaps::GSVImage::SegmentIndex() const
int GSVImage::
SegmentIndex(void) const
{
  // Get convenient variables
  GSVSegment *segment = Segment();
  if (!segment) return -1;

  // Compute segment index
  int segment_index = TapestryIndex();
  for (int i = 0; i < tapestry->SegmentIndex(); i++) {
    GSVTapestry *t = segment->Tapestry(i);
    segment_index += t->NImages();
  }

  // Return segment index
  return segment_index;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x4f740
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x4f94f
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f9bf
movq 0x8(%rsp), %rdi
callq 0x51760
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x8(%rax), %rdi
callq 0x44e00
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4f9b7
movq 0x20(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x44810
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44d20
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x4f965
movl 0x1c(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVImage.cpp
// Function: gaps::GSVImage::Pose(int) const
GSVPose GSVImage::
Pose(int column_index) const
{
  // Return pose estimate for given column
  int ncolumns = Width();
  if (ncolumns <= 0) return GSVPose(0,0,0,0,0,0,0);
  if (column_index < 0) column_index = ncolumns/2;
  RNScalar t = (RNScalar) column_index / (RNScalar) (ncolumns-1);
  R3Point viewpoint = (1-t)*pose0.Viewpoint() + t*pose1.Viewpoint();
  R3Quaternion orientation = R3QuaternionSlerp(pose0.Orientation(), pose1.Orientation(), t);
  return GSVPose(viewpoint, orientation);
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movl %edx, 0xa4(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x4fa70
movl %eax, 0xa0(%rsp)
cmpl $0x0, 0xa0(%rsp)
jg 0x4fb62
movq 0x18(%rsp), %rdi
xorps %xmm6, %xmm6
movaps %xmm6, %xmm0
movaps %xmm6, %xmm1
movaps %xmm6, %xmm2
movaps %xmm6, %xmm3
movaps %xmm6, %xmm4
movaps %xmm6, %xmm5
callq 0x5e5f0
jmp 0x4fc76
cmpl $0x0, 0xa4(%rsp)
jge 0x4fb82
movl 0xa0(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0xa4(%rsp)
movq 0x28(%rsp), %rdi
cvtsi2sdl 0xa4(%rsp), %xmm0
movl 0xa0(%rsp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x21645d(%rip), %xmm0   # 0x266010
subsd 0x98(%rsp), %xmm0
movsd %xmm0, (%rsp)
addq $0x28, %rdi
callq 0x3a330
movsd (%rsp), %xmm0
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x4a690
movq 0x28(%rsp), %rdi
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
addq $0x68, %rdi
callq 0x3a330
movsd 0x8(%rsp), %xmm0
movq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x4a690
leaq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x180c80
movq 0x28(%rsp), %rdi
addq $0x28, %rdi
callq 0x44c70
movq 0x28(%rsp), %rdi
movq %rax, 0x10(%rsp)
addq $0x68, %rdi
callq 0x44c70
movq 0x10(%rsp), %rsi
movq %rax, %rdx
movsd 0x98(%rsp), %xmm0
leaq 0x30(%rsp), %rdi
callq 0x15e4f0
movq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x5e450
movq 0x20(%rsp), %rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVImage.cpp
// Function: gaps::GSVImage::Timestamp(int) const
RNScalar GSVImage::
Timestamp(int column_index) const
{
  // Return timestamp estimate for given column
  int ncolumns = Width();
  if (ncolumns <= 0) return -1;
  if (column_index < 0) column_index = ncolumns/2;
  RNScalar t = (RNScalar) column_index / (RNScalar) (ncolumns-1);
  return (1-t)*timestamp0 + t*timestamp1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x4fa70
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jg 0x4fcc6
movsd 0x21634a(%rip), %xmm0   # 0x266008
movsd %xmm0, 0x20(%rsp)
jmp 0x4fd2e
cmpl $0x0, 0x14(%rsp)
jge 0x4fcdd
movl 0x10(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x14(%rsp)
movq (%rsp), %rax
cvtsi2sdl 0x14(%rsp), %xmm0
movl 0x10(%rsp), %ecx
subl $0x1, %ecx
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x21630c(%rip), %xmm0   # 0x266010
subsd 0x8(%rsp), %xmm0
movsd 0xa8(%rax), %xmm2
movsd 0x8(%rsp), %xmm1
mulsd 0xb0(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
addq $0x28, %rsp
retq
nopl (%rax)