LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::~GSVRun()
GSVRun::
~GSVRun(void)
{
  // Remove run from scene
  if (scene) scene->RemoveRun(this);

  // Delete segments
  while (NSegments() > 0) delete Segment(0);

  // Delete cameras
  while (NCameras() > 0) delete Camera(0);

  // Delete lasers
  while (NLasers() > 0) delete Laser(0);

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

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x2a16ce(%rip), %rcx    # 0x2e68c8
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x8(%rax)
je 0x4521a
movq 0x38(%rsp), %rsi
movq 0x8(%rsi), %rdi
callq 0x3b750
jmp 0x45218
jmp 0x4521a
jmp 0x4521c
movq 0x38(%rsp), %rdi
callq 0x39fe0
movl %eax, 0x34(%rsp)
jmp 0x4522c
movl 0x34(%rsp), %eax
cmpl $0x0, %eax
jle 0x45260
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x3a000
movq %rax, 0x28(%rsp)
jmp 0x45248
movq 0x28(%rsp), %rax
cmpq $0x0, %rax
je 0x4525e
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4521c
jmp 0x45262
movq 0x38(%rsp), %rdi
callq 0x44320
movl %eax, 0x24(%rsp)
jmp 0x45272
movl 0x24(%rsp), %eax
cmpl $0x0, %eax
jle 0x452a6
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x447e0
movq %rax, 0x18(%rsp)
jmp 0x4528e
movq 0x18(%rsp), %rax
cmpq $0x0, %rax
je 0x452a4
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x45262
jmp 0x452a8
movq 0x38(%rsp), %rdi
callq 0x44340
movl %eax, 0x14(%rsp)
jmp 0x452b8
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jle 0x452ec
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x44780
movq %rax, 0x8(%rsp)
jmp 0x452d4
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x452ea
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x452a8
movq 0x38(%rsp), %rax
cmpq $0x0, 0x48(%rax)
je 0x45306
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x29350
movq 0x38(%rsp), %rdi
addq $0x50, %rdi
callq 0x386c0
movq 0x38(%rsp), %rdi
addq $0x38, %rdi
callq 0x47bd0
movq 0x38(%rsp), %rdi
addq $0x28, %rdi
callq 0x47be0
movq 0x38(%rsp), %rdi
addq $0x18, %rdi
callq 0x47bf0
addq $0x48, %rsp
retq
movq %rax, %rdi
callq 0x44300
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::Segment(char const*) const
GSVSegment *GSVRun::
Segment(const char *name) const
{
  // Return segment with matching name
  for (int i = 0; i < NSegments(); i++) {
    GSVSegment *segment = Segment(i);
    if (!segment->Name()) continue;
    if (!strcmp(segment->Name(), name)) return segment;
  }

  // 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 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45418
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44bd0
cmpq $0x0, %rax
jne 0x453e1
jmp 0x4540b
movq 0x10(%rsp), %rdi
callq 0x44bd0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x29f00
cmpl $0x0, %eax
jne 0x45409
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x45421
jmp 0x4540b
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x453a0
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NTapestries() const
int GSVRun::
NTapestries(void) const
{
  // Return number of tapestries in run
  int count = 0;
  for (int is = 0; is < NSegments(); is++) {
    GSVSegment *segment = Segment(is);
    count += segment->NTapestries();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x454a1
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44b60
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x45453
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NPanoramas() const
int GSVRun::
NPanoramas(void) const
{
  // Return number of panoramas in run
  int count = 0;
  for (int is = 0; is < NSegments(); is++) {
    GSVSegment *segment = Segment(is);
    count += segment->NPanoramas();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45521
movq 0x8(%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 0x454d3
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NImages() const
int GSVRun::
NImages(void) const
{
  // Return number of images in run
  int count = 0;
  for (int is = 0; is < NSegments(); is++) {
    GSVSegment *segment = Segment(is);
    count += segment->NImages();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x455a1
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x48210
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x45553
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NSurveys() const
int GSVRun::
NSurveys(void) const
{
  // Return number of surveys in run
  int count = 0;
  for (int is = 0; is < NSegments(); is++) {
    GSVSegment *segment = Segment(is);
    count += segment->NSurveys();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45621
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3a030
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x455d3
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NScans() const
int GSVRun::
NScans(void) const
{
  // Return number of scans in run
  int count = 0;
  for (int is = 0; is < NSegments(); is++) {
    GSVSegment *segment = Segment(is);
    count += segment->NScans();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x456a1
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x48350
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x45653
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NScanlines() const
int GSVRun::
NScanlines(void) const
{
  // Return number of scanlines in run
  int count = 0;
  for (int is = 0; is < NSegments(); is++) {
    GSVSegment *segment = Segment(is);
    count += segment->NScanlines();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45721
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x48490
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x456d3
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::NPoints() const
int GSVRun::
NPoints(void) const
{
  // Return number of points in all segments
  int npoints = 0;
  for (int i = 0; i < NSegments(); i++) 
    npoints += Segment(i)->NPoints();
  return npoints;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4579a
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a000
movq %rax, %rdi
callq 0x48880
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x45753
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::InsertSegment(gaps::GSVSegment*)
void GSVRun::
InsertSegment(GSVSegment *segment)
{
  // Just checking
  assert(segment->run_index == -1);
  assert(segment->run == NULL);

  // Insert segment
  segment->run = this;
  segment->run_index = segments.NEntries();
  segments.Insert(segment);

  // 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, 0x10(%rax)
addq $0x18, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
addq $0x18, %rdi
movq 0x8(%rsp), %rsi
callq 0x47c00
movq (%rsp), %rdi
callq 0x45810
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::InvalidateBBox()
void GSVRun::
InvalidateBBox(void) 
{
  // Invalidate bounding box
  if (bbox.XMin() != FLT_MAX) {
    bbox = R3Box(FLT_MAX,FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX);
    if (scene) scene->InvalidateBBox();
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x50, %rdi
callq 0x38b90
movsd 0x2207e4(%rip), %xmm1   # 0x266018
ucomisd %xmm1, %xmm0
jne 0x45841
jp 0x45841
jmp 0x458c3
leaq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x2207c5(%rip), %xmm2   # 0x266018
movsd 0x2207c5(%rip), %xmm5   # 0x266020
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
movaps %xmm5, %xmm3
movaps %xmm5, %xmm4
callq 0x151b90
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x50, %rdi
callq 0x386d0
jmp 0x45881
leaq 0x28(%rsp), %rdi
callq 0x386c0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x458c1
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x3bd70
jmp 0x458c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x386c0
jmp 0x458c8
jmp 0x458c3
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x29c10
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::RemoveSegment(gaps::GSVSegment*)
void GSVRun::
RemoveSegment(GSVSegment *segment)
{
  // Just checking
  assert(segment->run_index >= 0);
  assert(segment->run_index < segments.NEntries());
  assert(segment->run == this);

  // Remove segment
  RNArrayEntry *entry = segments.KthEntry(segment->run_index);
  GSVSegment *tail = segments.Tail();
  tail->run_index = segment->run_index;
  segments.EntryContents(entry) = tail;
  segments.RemoveTail();
  segment->run_index = -1;
  segment->run = 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 0x18(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x18, %rdi
callq 0x47c30
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movl 0x18(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x18, %rdi
movq 0x20(%rsp), %rsi
callq 0x47c40
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, 0x18(%rax) # imm = 0xFFFFFFFF
movq 0x28(%rsp), %rax
movq $0x0, 0x10(%rax)
callq 0x45810
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::InsertCamera(gaps::GSVCamera*)
void GSVRun::
InsertCamera(GSVCamera *camera)
{
  // Just checking
  assert(camera->run_index == -1);
  assert(camera->run == NULL);

  // Insert camera
  camera->run = this;
  camera->run_index = cameras.NEntries();
  cameras.Insert(camera);

  // 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 $0x28, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x28, %rdi
movq 0x8(%rsp), %rsi
callq 0x47c50
movq (%rsp), %rdi
callq 0x45810
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::RemoveCamera(gaps::GSVCamera*)
void GSVRun::
RemoveCamera(GSVCamera *camera)
{
  // Just checking
  assert(camera->run_index >= 0);
  assert(camera->run_index < cameras.NEntries());
  assert(camera->run == this);

  // Remove camera
  RNArrayEntry *entry = cameras.KthEntry(camera->run_index);
  GSVCamera *tail = cameras.Tail();
  tail->run_index = camera->run_index;
  cameras.EntryContents(entry) = tail;
  cameras.RemoveTail();
  camera->run_index = -1;
  camera->run = 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 $0x28, %rdi
movq 0x28(%rsp), %rax
movl 0x10(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x28, %rdi
callq 0x47c80
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 $0x28, %rdi
movq 0x20(%rsp), %rsi
callq 0x47c90
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x28, %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 0x45810
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::InsertLaser(gaps::GSVLaser*)
void GSVRun::
InsertLaser(GSVLaser *laser)
{
  // Just checking
  assert(laser->run_index == -1);
  assert(laser->run == NULL);

  // Insert laser
  laser->run = this;
  laser->run_index = lasers.NEntries();
  lasers.Insert(laser);

  // 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 $0x38, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x38, %rdi
movq 0x8(%rsp), %rsi
callq 0x47ca0
movq (%rsp), %rdi
callq 0x45810
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::RemoveLaser(gaps::GSVLaser*)
void GSVRun::
RemoveLaser(GSVLaser *laser)
{
  // Just checking
  assert(laser->run_index >= 0);
  assert(laser->run_index < lasers.NEntries());
  assert(laser->run == this);

  // Remove laser
  RNArrayEntry *entry = lasers.KthEntry(laser->run_index);
  GSVLaser *tail = lasers.Tail();
  tail->run_index = laser->run_index;
  lasers.EntryContents(entry) = tail;
  lasers.RemoveTail();
  laser->run_index = -1;
  laser->run = 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 $0x38, %rdi
movq 0x28(%rsp), %rax
movl 0x10(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x38, %rdi
callq 0x47cd0
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 $0x38, %rdi
movq 0x20(%rsp), %rsi
callq 0x47ce0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x38, %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 0x45810
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::Draw(gaps::RNFlags) const
void GSVRun::
Draw(RNFlags flags) const
{
  // Draw segments
  for (int i = 0; i < NSegments(); i++) {
    GSVSegment *segment = Segment(i);
    segment->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 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45c86
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3a000
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 0x45c30
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::Print(_IO_FILE*, char const*, char const*) const
void GSVRun::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print run 
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "Run %d:", scene_index);
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");

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

   // Print segments
  for (int i = 0; i < NSegments(); i++) {
    GSVSegment *segment = Segment(i);
    segment->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 0x45ce1
movq 0x2a92f2(%rip), %rax    # 0x2eefc8
movq (%rax), %rax
movq %rax, 0x438(%rsp)
cmpq $0x0, 0x430(%rsp)
je 0x45d0a
movq 0x438(%rsp), %rdi
movq 0x430(%rsp), %rdx
leaq 0x23a524(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x8(%rsp), %rax
movq 0x438(%rsp), %rdi
movl 0x10(%rax), %edx
leaq 0x22109f(%rip), %rsi    # 0x266dc0
movb $0x0, %al
callq 0x293c0
cmpq $0x0, 0x428(%rsp)
je 0x45d51
movq 0x438(%rsp), %rdi
movq 0x428(%rsp), %rdx
leaq 0x23a4dd(%rip), %rsi    # 0x280227
movb $0x0, %al
callq 0x293c0
movq 0x438(%rsp), %rdi
leaq 0x2210a6(%rip), %rsi    # 0x266e06
movb $0x0, %al
callq 0x293c0
leaq 0x20(%rsp), %rdi
movq 0x430(%rsp), %rdx
leaq 0x220d7b(%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 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45de6
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a000
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 0x45d8a
addq $0x448, %rsp            # imm = 0x448
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::UpdateBBox()
void GSVRun::
UpdateBBox(void) 
{
  // Update bounding box
  bbox = R3null_box;
  for (int i = 0; i < NSegments(); i++) bbox.Union(Segment(i)->BBox());
  for (int i = 0; i < NLasers(); i++) bbox.Union(Laser(i)->BBox());
  for (int i = 0; i < NCameras(); i++) bbox.Union(Camera(i)->BBox());
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x50, %rdi
leaq 0x2bc6ea(%rip), %rsi    # 0x3024f8
callq 0x386d0
movl $0x0, 0x4c(%rsp)
movq 0x38(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, 0x34(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x34(%rsp), %eax
cmpl %ecx, %eax
jge 0x45e73
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, 0x28(%rsp)
movl 0x4c(%rsp), %esi
callq 0x3a000
movq %rax, %rdi
callq 0x44b80
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1538e0
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x45e1b
movl $0x0, 0x48(%rsp)
movq 0x38(%rsp), %rdi
movl 0x48(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x44340
movl %eax, %ecx
movl 0x24(%rsp), %eax
cmpl %ecx, %eax
jge 0x45ed3
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, 0x18(%rsp)
movl 0x48(%rsp), %esi
callq 0x44780
movq %rax, %rdi
callq 0x44b10
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x1538e0
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x45e7b
movl $0x0, 0x44(%rsp)
movq 0x38(%rsp), %rdi
movl 0x44(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x44320
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x45f33
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, 0x8(%rsp)
movl 0x44(%rsp), %esi
callq 0x447e0
movq %rax, %rdi
callq 0x44a10
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1538e0
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x45edb
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::UpdateNormals()
void GSVRun::
UpdateNormals(void) 
{
  // Update normals
  for (int i = 0; i < NSegments(); i++) {
    GSVSegment *segment = Segment(i);
    segment->UpdateNormals();
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x45fa1
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x49730
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x45f5b
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVRun.cpp
// Function: gaps::GSVRun::InvalidateNormals()
void GSVRun::
InvalidateNormals(void) 
{
  // Invalidate normals
  for (int i = 0; i < NSegments(); i++) {
    GSVSegment *segment = Segment(i);
    segment->InvalidateNormals();
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x39fe0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x46011
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a000
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4a480
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x45fcb
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::~GSVSegment()
GSVSegment::
~GSVSegment(void)
{
  // Remove segment from scene
  assert(scene_index == -1);

  // Remove segment from run
  if (run) run->RemoveSegment(this);

  // Delete surveys
  while (NSurveys() > 0) delete Survey(0);

  // Delete tapestries
  while (NTapestries() > 0) delete Tapestry(0);

  // Delete panoramas
  while (NPanoramas() > 0) delete Panorama(0);

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

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x29e97e(%rip), %rcx    # 0x2e6908
addq $0x10, %rcx
movq %rcx, (%rax)
cmpq $0x0, 0x10(%rax)
je 0x47faa
movq 0x38(%rsp), %rsi
movq 0x10(%rsi), %rdi
callq 0x458e0
jmp 0x47fa8
jmp 0x47faa
jmp 0x47fac
movq 0x38(%rsp), %rdi
callq 0x3a030
movl %eax, 0x34(%rsp)
jmp 0x47fbc
movl 0x34(%rsp), %eax
cmpl $0x0, %eax
jle 0x47ff0
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x3a050
movq %rax, 0x28(%rsp)
jmp 0x47fd8
movq 0x28(%rsp), %rax
cmpq $0x0, %rax
je 0x47fee
movq 0x28(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x47fac
jmp 0x47ff2
movq 0x38(%rsp), %rdi
callq 0x44b60
movl %eax, 0x24(%rsp)
jmp 0x48002
movl 0x24(%rsp), %eax
cmpl $0x0, %eax
jle 0x48036
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x44810
movq %rax, 0x18(%rsp)
jmp 0x4801e
movq 0x18(%rsp), %rax
cmpq $0x0, %rax
je 0x48034
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x47ff2
jmp 0x48038
movq 0x38(%rsp), %rdi
callq 0x3a290
movl %eax, 0x14(%rsp)
jmp 0x48048
movl 0x14(%rsp), %eax
cmpl $0x0, %eax
jle 0x4807c
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x3a2b0
movq %rax, 0x8(%rsp)
jmp 0x48064
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4807a
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x48038
movq 0x38(%rsp), %rax
cmpq $0x0, 0x88(%rax)
je 0x4809c
movq 0x38(%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x29350
movq 0x38(%rsp), %rdi
addq $0x50, %rdi
callq 0x386c0
movq 0x38(%rsp), %rdi
addq $0x40, %rdi
callq 0x444e0
movq 0x38(%rsp), %rdi
addq $0x30, %rdi
callq 0x4a610
movq 0x38(%rsp), %rdi
addq $0x20, %rdi
callq 0x4a620
addq $0x48, %rsp
retq
movq %rax, %rdi
callq 0x44300
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::SceneIndex() const
int GSVSegment::
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->NSegments();
  }

  // Return scene index
  return scene_index;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x48120
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x4818f
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x481ff
movq 0x8(%rsp), %rdi
callq 0x4a640
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x10(%rax), %rdi
callq 0x443f0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x481f7
movq 0x20(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x39fb0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x39fe0
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x481a5
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/GSVSegment.cpp
// Function: gaps::GSVSegment::NImages() const
int GSVSegment::
NImages(void) const
{
  // Return number of images in segment
  int count = 0;
  for (int i = 0; i < NTapestries(); i++) {
    GSVTapestry *tapestry = Tapestry(i);
    count += tapestry->NImages();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x44b60
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x48281
movq 0x8(%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 0x48233
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Image(int) const
GSVImage *GSVSegment::
Image(int image_index) const
{
  // Return image
  for (int i = 0; i < NTapestries(); i++) {
    GSVTapestry *tapestry = Tapestry(i);
    if (image_index >= tapestry->NImages()) image_index -= tapestry->NImages();
    else return tapestry->Image(image_index);
  }

  // Index too high
  return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x44b60
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x48339
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x44810
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x44d20
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jl 0x48312
movq 0x18(%rsp), %rdi
callq 0x44d20
movl %eax, %ecx
movl 0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0x48327
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x4a650
movq %rax, 0x30(%rsp)
jmp 0x48342
jmp 0x48329
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x482af
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::NScans() const
int GSVSegment::
NScans(void) const
{
  // Return number of scans in segment
  int count = 0;
  for (int i = 0; i < NSurveys(); i++) {
    GSVSurvey *survey = Survey(i);
    count += survey->NScans();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x483c1
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a050
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3a080
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x48373
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Scan(int) const
GSVScan *GSVSegment::
Scan(int scan_index) const
{
  // Return scan
  for (int i = 0; i < NSurveys(); i++) {
    GSVSurvey *survey = Survey(i);
    if (scan_index >= survey->NScans()) scan_index -= survey->NScans();
    else return survey->Scan(scan_index);
  }

  // Index too high
  return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x48479
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x3a050
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x3a080
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jl 0x48452
movq 0x18(%rsp), %rdi
callq 0x3a080
movl %eax, %ecx
movl 0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0x48467
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3a0a0
movq %rax, 0x30(%rsp)
jmp 0x48482
jmp 0x48469
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x483ef
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::NScanlines() const
int GSVSegment::
NScanlines(void) const
{
  // Return number of scanlines in segment
  int count = 0;
  for (int i = 0; i < NSurveys(); i++) {
    GSVSurvey *survey = Survey(i);
    count += survey->NScanlines();
  }
  return count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x48501
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a050
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x533c0
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x484b3
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Scanline(int) const
GSVScanline *GSVSegment::
Scanline(int scanline_index) const
{
  // Return scanline
  for (int i = 0; i < NSurveys(); i++) {
    GSVSurvey *survey = Survey(i);
    if (scanline_index >= survey->NScanlines()) scanline_index -= survey->NScanlines();
    else return survey->Scanline(scanline_index);
  }

  // Index too high
  return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x485b9
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x3a050
movq %rax, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x533c0
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jl 0x48592
movq 0x18(%rsp), %rdi
callq 0x533c0
movl %eax, %ecx
movl 0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0x485a7
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x53440
movq %rax, 0x30(%rsp)
jmp 0x485c2
jmp 0x485a9
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x4852f
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Panorama(char const*) const
GSVPanorama *GSVSegment::
Panorama(const char *name) const
{
  // Return panorama with matching name
  for (int i = 0; i < NPanoramas(); i++) {
    GSVPanorama *panorama = Panorama(i);
    if (!panorama->Name()) continue;
    if (!strcmp(panorama->Name(), name)) return panorama;
  }

  // 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 0x3a290
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x48668
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3a2b0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x44de0
cmpq $0x0, %rax
jne 0x48631
jmp 0x4865b
movq 0x10(%rsp), %rdi
callq 0x44de0
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x29f00
cmpl $0x0, %eax
jne 0x48659
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x48671
jmp 0x4865b
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x485f0
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::FindPanoramaBeforeTimestamp(double, int, int) const
GSVPanorama *GSVSegment::
FindPanoramaBeforeTimestamp(RNScalar timestamp, int imin, int imax) const
{
  // Binary search
  int i = (imin + imax) / 2;
  if (i == imin) return Panorama(imin);
  assert(i < imax);
  GSVPanorama *panorama = Panorama(i);
  RNScalar t = panorama->Timestamp();
  if (t > timestamp) return FindPanoramaBeforeTimestamp(timestamp, imin, i);
  else if (t < timestamp) return FindPanoramaBeforeTimestamp(timestamp, i, imax);
  else return panorama;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x2c(%rsp), %eax
addl 0x28(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jne 0x486d7
movq 0x8(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x3a2b0
movq %rax, 0x40(%rsp)
jmp 0x48762
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x3a2b0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x44d90
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
ucomisd 0x30(%rsp), %xmm0
jbe 0x48727
movq 0x8(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
movl 0x2c(%rsp), %esi
movl 0x24(%rsp), %edx
callq 0x48680
movq %rax, 0x40(%rsp)
jmp 0x48762
movsd 0x10(%rsp), %xmm1
movsd 0x30(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x48758
movq 0x8(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
movl 0x24(%rsp), %esi
movl 0x28(%rsp), %edx
callq 0x48680
movq %rax, 0x40(%rsp)
jmp 0x48762
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::FindPanoramaBeforeTimestamp(double) const
GSVPanorama *GSVSegment::
FindPanoramaBeforeTimestamp(RNScalar timestamp) const
{
  // Binary search
  if (NPanoramas() == 0) return NULL;
  if (timestamp <= Panorama(0)->Timestamp()) return Panorama(0);
  if (timestamp >= Panorama(NPanoramas()-1)->Timestamp()) return Panorama(NPanoramas()-1);
  return FindPanoramaBeforeTimestamp(timestamp, 0, NPanoramas()-1);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3a290
cmpl $0x0, %eax
jne 0x487a1
movq $0x0, 0x30(%rsp)
jmp 0x4886f
movq 0x18(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %esi, %esi
callq 0x3a2b0
movq %rax, %rdi
callq 0x44d90
movsd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jb 0x487e3
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x3a2b0
movq %rax, 0x30(%rsp)
jmp 0x4886f
movq 0x18(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x3a290
movq 0x18(%rsp), %rdi
movl %eax, %esi
subl $0x1, %esi
callq 0x3a2b0
movq %rax, %rdi
callq 0x44d90
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x4883f
movq 0x18(%rsp), %rdi
callq 0x3a290
movq 0x18(%rsp), %rdi
movl %eax, %esi
subl $0x1, %esi
callq 0x3a2b0
movq %rax, 0x30(%rsp)
jmp 0x4886f
movq 0x18(%rsp), %rdi
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%rsp)
callq 0x3a290
movq 0x18(%rsp), %rdi
movsd (%rsp), %xmm0
movl %eax, %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x48680
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::NPoints() const
int GSVSegment::
NPoints(void) const
{
  // Return number of points in all surveys
  int npoints = 0;
  for (int i = 0; i < NSurveys(); i++) 
    npoints += Survey(i)->NPoints();
  return npoints;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x3a030
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x488ea
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x3a050
movq %rax, %rdi
callq 0x53840
addl 0x1c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x488a3
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Viewpoint(double) const
R3Point GSVSegment::
Viewpoint(RNScalar timestamp) const
{  
  // Return "viewpoint" of the car at timestamp
  if (NPanoramas() == 0) return R3zero_point;
  GSVPanorama *panorama0 = FindPanoramaBeforeTimestamp(timestamp);
  if (!panorama0) return R3zero_point;
  int i0 = panorama0->SegmentIndex();
  if (i0 >= NPanoramas()-1) return panorama0->Viewpoint();
  GSVPanorama *panorama1 = Panorama(i0 + 1);
  RNScalar t0 = panorama0->Timestamp();
  RNScalar t1 = panorama1->Timestamp();
  if (t1 <= t0) return panorama0->Viewpoint();
  RNScalar t = (timestamp - t0) / (t1 - t0);
  if (t <= 0) return panorama0->Viewpoint();
  else if (t >= 1) return panorama1->Viewpoint();
  return (1 - t) * panorama0->Viewpoint() + t * panorama1->Viewpoint();
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movsd %xmm0, 0x90(%rsp)
movq 0x98(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x3a290
cmpl $0x0, %eax
jne 0x4895a
movq 0x18(%rsp), %rdi
leaq 0x6ba950(%rip), %rsi    # 0x7032a0
callq 0x17fdd0
jmp 0x48b45
movq 0x28(%rsp), %rdi
movsd 0x90(%rsp), %xmm0
callq 0x48770
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x88(%rsp)
jne 0x48996
movq 0x18(%rsp), %rdi
leaq 0x6ba914(%rip), %rsi    # 0x7032a0
callq 0x17fdd0
jmp 0x48b45
movq 0x88(%rsp), %rdi
callq 0x4a680
movq 0x28(%rsp), %rdi
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x3a290
movl %eax, %ecx
movl 0x14(%rsp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x489eb
movq 0x88(%rsp), %rdi
callq 0x44d40
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x17fdd0
jmp 0x48b45
movq 0x28(%rsp), %rdi
movl 0x84(%rsp), %esi
addl $0x1, %esi
callq 0x3a2b0
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rdi
callq 0x44d90
movsd %xmm0, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x44d90
movsd %xmm0, 0x68(%rsp)
movsd 0x68(%rsp), %xmm1
movsd 0x70(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x48a58
movq 0x88(%rsp), %rdi
callq 0x44d40
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x17fdd0
jmp 0x48b45
movsd 0x90(%rsp), %xmm0
subsd 0x70(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
subsd 0x70(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x60(%rsp), %xmm0
jb 0x48aa7
movq 0x88(%rsp), %rdi
callq 0x44d40
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x17fdd0
jmp 0x48b45
movsd 0x60(%rsp), %xmm0
movsd 0x21d55b(%rip), %xmm1   # 0x266010
ucomisd %xmm1, %xmm0
jb 0x48ad4
movq 0x78(%rsp), %rdi
callq 0x44d40
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x17fdd0
jmp 0x48b45
jmp 0x48ad6
movsd 0x21d532(%rip), %xmm0   # 0x266010
subsd 0x60(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x88(%rsp), %rdi
callq 0x44d40
movsd (%rsp), %xmm0
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x4a690
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x78(%rsp), %rdi
callq 0x44d40
movsd 0x8(%rsp), %xmm0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x4a690
movq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x180c80
movq 0x20(%rsp), %rax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::Right(double) const
R3Vector GSVSegment::
Right(RNScalar timestamp) const
{
  // Return vector to right of car
  R3Vector front = Front(timestamp);
  R3Vector up = Up(timestamp);
  R3Vector right = front % up;
  right.Normalize();
  return right;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movsd %xmm0, 0x50(%rsp)
movq 0x58(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movsd 0x50(%rsp), %xmm0
leaq 0x38(%rsp), %rdi
callq 0x48b60
movq 0x8(%rsp), %rsi
movsd 0x50(%rsp), %xmm0
leaq 0x20(%rsp), %rdi
callq 0x4a730
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x181d30
movq 0x10(%rsp), %rdi
callq 0x181650
movq 0x18(%rsp), %rax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::InsertSurvey(gaps::GSVSurvey*)
void GSVSegment::
InsertSurvey(GSVSurvey *survey)
{
  // Just checking
  assert(survey->segment_index == -1);
  assert(survey->segment == NULL);

  // Insert laser survey
  survey->segment = this;
  survey->segment_index = surveys.NEntries();
  surveys.Insert(survey);

  // 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 $0x20, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x20, %rdi
movq 0x8(%rsp), %rsi
callq 0x4a770
movq (%rsp), %rdi
callq 0x48ec0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::InvalidateBBox()
void GSVSegment::
InvalidateBBox(void) 
{
  // Invalidate bounding box
  if (bbox.XMin() != FLT_MAX) {
    bbox = R3Box(FLT_MAX,FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX);
    if (run) run->InvalidateBBox();
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x50, %rdi
callq 0x38b90
movsd 0x21d134(%rip), %xmm1   # 0x266018
ucomisd %xmm1, %xmm0
jne 0x48ef1
jp 0x48ef1
jmp 0x48f73
leaq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x21d115(%rip), %xmm2   # 0x266018
movsd 0x21d115(%rip), %xmm5   # 0x266020
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
movaps %xmm5, %xmm3
movaps %xmm5, %xmm4
callq 0x151b90
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x50, %rdi
callq 0x386d0
jmp 0x48f31
leaq 0x28(%rsp), %rdi
callq 0x386c0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x48f71
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x45810
jmp 0x48f71
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x386c0
jmp 0x48f78
jmp 0x48f73
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x29c10
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::RemoveSurvey(gaps::GSVSurvey*)
void GSVSegment::
RemoveSurvey(GSVSurvey *survey)
{
  // Just checking
  assert(survey->segment_index >= 0);
  assert(survey->segment_index < surveys.NEntries());
  assert(survey->segment == this);

  // Remove laser survey
  RNArrayEntry *entry = surveys.KthEntry(survey->segment_index);
  GSVSurvey *tail = surveys.Tail();
  tail->segment_index = survey->segment_index;
  surveys.EntryContents(entry) = tail;
  surveys.RemoveTail();
  survey->segment_index = -1;
  survey->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 $0x20, %rdi
movq 0x28(%rsp), %rax
movl 0x10(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x20, %rdi
callq 0x4a7a0
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 $0x20, %rdi
movq 0x20(%rsp), %rsi
callq 0x4a7b0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x20, %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::InsertTapestry(gaps::GSVTapestry*)
void GSVSegment::
InsertTapestry(GSVTapestry *tapestry)
{
  // Just checking
  assert(tapestry->segment_index == -1);
  assert(tapestry->segment == NULL);

  // Insert camera tapestry
  tapestry->segment = this;
  tapestry->segment_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, 0x8(%rax)
addq $0x30, %rdi
callq 0x38730
movq (%rsp), %rdi
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x30, %rdi
movq 0x8(%rsp), %rsi
callq 0x4a7c0
movq (%rsp), %rdi
callq 0x48ec0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/GSV/GSVSegment.cpp
// Function: gaps::GSVSegment::RemoveTapestry(gaps::GSVTapestry*)
void GSVSegment::
RemoveTapestry(GSVTapestry *tapestry)
{
  // Just checking
  assert(tapestry->segment_index >= 0);
  assert(tapestry->segment_index < tapestries.NEntries());
  assert(tapestry->segment == this);

  // Remove camera tapestry
  RNArrayEntry *entry = tapestries.KthEntry(tapestry->segment_index);
  GSVTapestry *tail = tapestries.Tail();
  tail->segment_index = tapestry->segment_index;
  tapestries.EntryContents(entry) = tail;
  tapestries.RemoveTail();
  tapestry->segment_index = -1;
  tapestry->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 $0x30, %rdi
movq 0x28(%rsp), %rax
movl 0x10(%rax), %esi
callq 0x44390
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x30, %rdi
callq 0x4a7f0
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 $0x30, %rdi
movq 0x20(%rsp), %rsi
callq 0x4a800
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x30, %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)