LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::InsertIntoPointSet(gaps::R3SurfelPointSet*, int, double) const
void R3SurfelObject::
InsertIntoPointSet(R3SurfelPointSet *pointset, RNBoolean leaf_level, RNScalar max_resolution) const
{
  // Insert points
  if (leaf_level && (NParts() > 0)) {
    // Insert points from leaf level of all parts of object
    for (int i = 0; i < NParts(); i++) {
      R3SurfelObject *part = Part(i);
      part->InsertIntoPointSet(pointset, leaf_level, max_resolution);     
    }
  }
  else {
    // Insert points from all nodes
    for (int i = 0; i < NNodes(); i++) {
      R3SurfelNode *node = Node(i);
      node->InsertIntoPointSet(pointset, leaf_level, max_resolution);
    }
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movsd %xmm0, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x44(%rsp)
je 0x19c27
movq 0x10(%rsp), %rdi
callq 0x1bb10
cmpl $0x0, %eax
jle 0x19c27
movl $0x0, 0x34(%rsp)
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x1bb10
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x19c25
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x1bb30
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movsd 0x38(%rsp), %xmm0
callq 0x19b90
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x19bd0
jmp 0x19c86
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x19c84
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x18680
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movsd 0x38(%rsp), %xmm0
callq 0x5f580
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x19c2f
jmp 0x19c86
addq $0x58, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::HasSurfels(int) const
RNBoolean R3SurfelObject::
HasSurfels(RNBoolean leaf_level) const
{
  // Check nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    if (node->HasSurfels(leaf_level)) return TRUE;
  }

  // Check parts
  if (leaf_level) {
    for (int i = 0; i < NParts(); i++) {
      R3SurfelObject *part = Part(i);
      if (part->HasSurfels(leaf_level)) return TRUE;
    }
  }

  // Did not find anything
  return FALSE;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x30(%rsp)
movq 0x10(%rsp), %rdi
movl 0x30(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x19d0d
movq 0x10(%rsp), %rdi
movl 0x30(%rsp), %esi
callq 0x18680
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x5ef30
cmpl $0x0, %eax
je 0x19cfe
movl $0x1, 0x44(%rsp)
jmp 0x19d81
jmp 0x19d00
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x19caf
cmpl $0x0, 0x34(%rsp)
je 0x19d79
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rsp)
callq 0x1bb10
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x19d77
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x1bb30
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x19c90
cmpl $0x0, %eax
je 0x19d68
movl $0x1, 0x44(%rsp)
jmp 0x19d81
jmp 0x19d6a
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x19d1c
jmp 0x19d79
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BestLabelAssignment(int) const
R3SurfelLabelAssignment *R3SurfelObject::
BestLabelAssignment(int originator) const
{
  // Return best assignment (or NULL if there is none)
  R3SurfelLabelAssignment *best_assignment = NULL;
  RNScalar best_confidence = -FLT_MAX;
  for (int i = 0; i < assignments.NEntries(); i++) {
    R3SurfelLabelAssignment *assignment = assignments.Kth(i);
    if (assignment->Originator() == originator) {
      RNScalar confidence = assignment->Confidence();
      if (confidence > best_confidence) {
        best_assignment = assignment;
        best_confidence = confidence;
      }
    }
  }

  // Return best assignment
  return best_assignment;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x30(%rsp)
movsd 0x18a3b0(%rip), %xmm0   # 0x1a4188
movsd %xmm0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
addq $0x50, %rdi
callq 0x16d50
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x19e75
movq 0x8(%rsp), %rdi
addq $0x50, %rdi
movl 0x24(%rsp), %esi
callq 0x1bc60
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x1bc80
cmpl 0x3c(%rsp), %eax
jne 0x19e63
movq 0x18(%rsp), %rdi
callq 0x1bc90
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x19e61
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0x19e63
jmp 0x19e65
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x19de6
movq 0x30(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::CurrentLabelAssignment() const
R3SurfelLabelAssignment *R3SurfelObject::
CurrentLabelAssignment(void) const
{
  // Return best assignment (either human or predicted)
  R3SurfelLabelAssignment *human_assignment = HumanLabelAssignment();
  if (human_assignment) return human_assignment;
  R3SurfelLabelAssignment *predicted_assignment = PredictedLabelAssignment();
  if (predicted_assignment) return predicted_assignment;
  return NULL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x19e80
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x19ef0
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x19f1b
movq (%rsp), %rdi
callq 0x19ea0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x19f12
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x19f1b
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::CurrentLabel() const
R3SurfelLabel *R3SurfelObject::
CurrentLabel(void) const
{
  // Return best label (either human or predicted)
  R3SurfelLabel *human_label = HumanLabel();
  if (human_label) return human_label;
  R3SurfelLabel *predicted_label = PredictedLabel();
  if (predicted_label) return predicted_label;
  return NULL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x19f80
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1a050
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x1a07b
movq (%rsp), %rdi
callq 0x19fd0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1a072
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x1a07b
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::CurrentOrientedBBox() const
R3OrientedBox R3SurfelObject::
CurrentOrientedBBox(void) const
{
  // Return best obb (either human or predicted)
  R3OrientedBox human_obb = HumanOrientedBBox();
  if (!human_obb.IsEmpty()) return human_obb;
  R3OrientedBox predicted_obb = PredictedOrientedBBox();
  if (!predicted_obb.IsEmpty()) return predicted_obb;
  return EstimateOrientedBBox((R3SurfelObject *) this);
}

// Assembly:
subq $0x158, %rsp            # imm = 0x158
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq 0x148(%rsp), %rsi
movq %rsi, 0x20(%rsp)
leaq 0xc8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1a560
movq 0x28(%rsp), %rdi
callq 0x1bd10
movl %eax, 0x34(%rsp)
jmp 0x1a613
movl 0x34(%rsp), %eax
cmpl $0x0, %eax
jne 0x1a659
movq 0x10(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xc7980
jmp 0x1a630
movl $0x1, 0xb8(%rsp)
jmp 0x1a6e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
jmp 0x1a701
movq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x1a590
jmp 0x1a66a
leaq 0x38(%rsp), %rdi
callq 0x1bd10
movl %eax, 0xc(%rsp)
jmp 0x1a67a
movl 0xc(%rsp), %eax
cmpl $0x0, %eax
jne 0x1a6c1
movq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xc7980
jmp 0x1a694
movl $0x1, 0xb8(%rsp)
jmp 0x1a6dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc0(%rsp)
movl %eax, 0xbc(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1bd00
jmp 0x1a701
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x3e060
jmp 0x1a6d2
movl $0x1, 0xb8(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1bd00
leaq 0xc8(%rsp), %rdi
callq 0x1bd00
movq 0x18(%rsp), %rax
addq $0x158, %rsp            # imm = 0x158
retq
leaq 0xc8(%rsp), %rdi
callq 0x1bd00
movq 0xc0(%rsp), %rdi
callq 0x13970
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::operator=(gaps::R3SurfelObject const&)
R3SurfelObject& R3SurfelObject::
operator=(const R3SurfelObject& object)
{
  // Copy properties
  this->feature_vector = object.feature_vector;
  this->name = (object.name) ? RNStrdup(object.name) : NULL;
  this->identifier = object.identifier;
  this->complexity = object.complexity;
  this->bbox = object.bbox;
  this->timestamp_range = object.timestamp_range;
  this->flags = 0;

  // Return this
  return *this;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x18(%rsp), %rsi
addq $0x70, %rsi
addq $0x70, %rdi
callq 0x6c2d0
movq 0x18(%rsp), %rax
cmpq $0x0, 0x88(%rax)
je 0x1a770
movq 0x18(%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x1461b0
movq %rax, (%rsp)
jmp 0x1a778
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x1a778
movq 0x8(%rsp), %rdi
movq (%rsp), %rax
movq %rax, 0x88(%rdi)
movq 0x18(%rsp), %rax
movl 0x90(%rax), %eax
movl %eax, 0x90(%rdi)
movq 0x18(%rsp), %rax
movsd 0x98(%rax), %xmm0
movsd %xmm0, 0x98(%rdi)
movq 0x18(%rsp), %rsi
addq $0xa0, %rsi
addq $0xa0, %rdi
callq 0x1bd40
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0xd8(%rcx), %rdx
movq %rdx, 0xd8(%rax)
movq 0xe0(%rcx), %rcx
movq %rcx, 0xe0(%rax)
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b970
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0xe8(%rax)
addq $0x28, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetName(char const*)
void R3SurfelObject::
SetName(const char *name)
{
  // Delete previous name
  if (this->name) free(this->name);
  this->name = (name) ? RNStrdup(name) : NULL;

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

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x88(%rax)
je 0x1aab3
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x136a0
cmpq $0x0, 0x18(%rsp)
je 0x1aacc
movq 0x18(%rsp), %rdi
callq 0x1461b0
movq %rax, 0x8(%rsp)
jmp 0x1aad5
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x1aad5
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x88(%rax)
cmpq $0x0, 0x8(%rax)
je 0x1aafb
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1bea0
addq $0x28, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetIdentifier(int)
void R3SurfelObject::
SetIdentifier(int identifier)
{
  // Set identifier
  this->identifier = identifier;

  // Update next identifier
  if (identifier >= R3surfel_next_object_identifier) {
    R3surfel_next_object_identifier = identifier+1;
  }

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

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %ecx
movl %ecx, 0x90(%rax)
movl 0xc(%rsp), %eax
cmpl 0x1e1ab2(%rip), %eax    # 0x1fc5dc
jl 0x1ab39
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1e1aa3(%rip)    # 0x1fc5dc
movq (%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1ab51
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1bea0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::InsertNode(gaps::R3SurfelNode*)
void R3SurfelObject::
InsertNode(R3SurfelNode *node)
{
  // Just checking
  assert(node);
  assert(!nodes.FindEntry(node));
  assert(node->object == NULL);

  // Update node
  node->object = this;

  // Insert node
  nodes.Insert(node);

  // Update complexity
  complexity += node->Complexity();

  // Invalidate bounding box
  R3SurfelObject *ancestor = this;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp range
  ancestor = this;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Update node
  node->UpdateAfterInsert(this);

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

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rdi, 0x8(%rax)
addq $0x60, %rdi
movq 0x18(%rsp), %rsi
callq 0x1bee0
movq 0x18(%rsp), %rdi
callq 0x5ecb0
movq 0x8(%rsp), %rax
addsd 0x98(%rax), %xmm0
movsd %xmm0, 0x98(%rax)
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1acd7
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x1894fc(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1ac9e
jp 0x1ac9e
jmp 0x1acd7
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x1894cd(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1ac63
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1ad41
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x189488(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1ad12
jp 0x1ad12
jmp 0x1ad41
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd 0x189463(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1ace1
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0x1bf10
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1ad6a
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x1bea0
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetMarks(int)
void R3SurfelObject::
SetMarks(RNBoolean mark)
{
  // Set mark for all nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->SetMarks(mark);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1adda
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x18680
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
movq (%rdi), %rax
callq *0x40(%rax)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x1ad8f
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::ReadBlocks(int)
void R3SurfelObject::
ReadBlocks(RNBoolean entire_subtree)
{
  // Read blocks in object
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->ReadBlocks(entire_subtree);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1ae49
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x18680
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x5fe30
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x1adff
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::ReleaseBlocks(int)
void R3SurfelObject::
ReleaseBlocks(RNBoolean entire_subtree)
{
  // Release blocks in object
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->ReleaseBlocks(entire_subtree);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1aeb9
movq 0x8(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x18680
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x5ff20
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x1ae6f
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::AreBlocksResident() const
RNBoolean R3SurfelObject::
AreBlocksResident(void) const
{
  // Return whether blocks are in memory
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    if (!node->AreBlocksResident()) return FALSE;
  }

  // All blocks are resident
  return TRUE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x1af32
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x18680
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x60010
cmpl $0x0, %eax
jne 0x1af23
movl $0x0, 0x34(%rsp)
jmp 0x1af3a
jmp 0x1af25
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1aedb
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::Draw(gaps::RNFlags) const
void R3SurfelObject::
Draw(RNFlags flags) const
{
  // Draw all nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->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 0x18660
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1afc6
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x18680
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
callq *0x48(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1af70
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::DrawResidentDescendents(gaps::RNFlags) const
void R3SurfelObject::
DrawResidentDescendents(RNFlags flags) const
{
  // Draw all nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->DrawResidentDescendents(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 0x18660
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1b046
movq 0x8(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x18680
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
movq (%rdi), %rax
callq *0x58(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x1aff0
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelObject::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

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

  // Print all nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    node->Print(fp, prefix, suffix);
  }
  fprintf(fp, "\n");
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x1b089
movq 0x1d7f0f(%rip), %rax    # 0x1f2f90
movq (%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x1b0a9
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0x18c521(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x20(%rsp), %rdi
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x1bf60
movq 0x20(%rsp), %rdi
movl %eax, 0x1c(%rsp)
callq 0x1bf70
cmpq $0x0, %rax
je 0x1b0e2
movq 0x20(%rsp), %rdi
callq 0x1bf70
movq %rax, 0x8(%rsp)
jmp 0x1b0f0
leaq 0x189283(%rip), %rax    # 0x1a436c
movq %rax, 0x8(%rsp)
jmp 0x1b0f0
movl 0x1c(%rsp), %edx
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rcx
leaq 0x189261(%rip), %rsi    # 0x1a4366
movb $0x0, %al
callq 0x13810
cmpq $0x0, 0x38(%rsp)
je 0x1b12c
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rdx
leaq 0x18c49e(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x48(%rsp), %rdi
leaq 0x1905ba(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
movl $0x0, 0x34(%rsp)
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x18660
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1b19d
movq 0x20(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x18680
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq (%rdi), %rax
callq *0x60(%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x1b147
movq 0x48(%rsp), %rdi
leaq 0x190549(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateAfterInsert(gaps::R3SurfelScene*)
void R3SurfelObject::
UpdateAfterInsert(R3SurfelScene *scene)
{
  // Invalidate bounding boxes
  R3SurfelObject *ancestor = parent;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp ranges
  ancestor = parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1b255
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x188f7e(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b21c
jp 0x1b21c
jmp 0x1b255
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x188f4f(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1b1e1
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1b2c3
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x188f06(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b294
jp 0x1b294
jmp 0x1b2c3
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd 0x188ee1(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1b263
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBeforeRemove(gaps::R3SurfelScene*)
void R3SurfelObject::
UpdateBeforeRemove(R3SurfelScene *scene)
{
  // Invalidate bounding boxes
  R3SurfelObject *ancestor = parent;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp ranges
  ancestor = parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1b365
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x188e6e(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b32c
jp 0x1b32c
jmp 0x1b365
movq 0x10(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x188e3f(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1b2f1
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x1b3d3
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x188df6(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b3a4
jp 0x1b3a4
jmp 0x1b3d3
movq 0x10(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd 0x188dd1(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0x1b373
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBeforeRemoveLabelAssignment(gaps::R3SurfelLabelAssignment*)
void R3SurfelObject::
UpdateBeforeRemoveLabelAssignment(R3SurfelLabelAssignment *assignment)
{
  // Check assignment
  assert(assignment->Scene());
  assert(assignment->Scene() == scene);
  assert(assignment->Object() == this);

  // Remove assignment
  RNArrayEntry *entry = assignments.KthEntry(assignment->object_index);
  R3SurfelLabelAssignment *tail = assignments.Tail();
  tail->object_index = assignment->object_index;
  assignments.EntryContents(entry) = tail;
  assignments.RemoveTail();
  assignment->object_index = -1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
addq $0x50, %rdi
movq 0x28(%rsp), %rax
movl 0x20(%rax), %esi
callq 0x1c080
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x50, %rdi
callq 0x1c0a0
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 $0x50, %rdi
movq 0x20(%rsp), %rsi
callq 0x1c0b0
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %rcx, (%rax)
addq $0x50, %rdi
callq 0x1c0c0
movq 0x28(%rsp), %rax
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateAfterInsertBlock(gaps::R3SurfelNode*, gaps::R3SurfelBlock*)
void R3SurfelObject::
UpdateAfterInsertBlock(R3SurfelNode *node, R3SurfelBlock *block)
{
  // Update complexity
  complexity += block->NSurfels();

  // Invalidate bounding boxes
  R3SurfelObject *ancestor = this;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp ranges
  ancestor = parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x1c0e0
movl %eax, %ecx
movq (%rsp), %rax
cvtsi2sd %ecx, %xmm0
addsd 0x98(%rax), %xmm0
movsd %xmm0, 0x98(%rax)
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1b649
movq 0x8(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x188b8a(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b610
jp 0x1b610
jmp 0x1b649
movq 0x8(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x188b5b(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1b5d5
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1b6b6
movq 0x8(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x188b13(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b687
jp 0x1b687
jmp 0x1b6b6
movq 0x8(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd 0x188aee(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1b656
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBeforeRemoveBlock(gaps::R3SurfelNode*, gaps::R3SurfelBlock*)
void R3SurfelObject::
UpdateBeforeRemoveBlock(R3SurfelNode *node, R3SurfelBlock *block)
{
  // Update complexity
  complexity -= block->NSurfels();

  // Invalidate properties
  R3SurfelObject *ancestor = this;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate timestamp ranges
  ancestor = parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x1c0e0
movl %eax, %ecx
movq (%rsp), %rax
cvtsi2sd %ecx, %xmm1
movsd 0x98(%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rax)
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1b77d
movq 0x8(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x188a56(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b744
jp 0x1b744
jmp 0x1b77d
movq 0x8(%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x188a27(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1b709
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x1b7ea
movq 0x8(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd (%rax), %xmm0
movsd 0x1889df(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b7bb
jp 0x1b7bb
jmp 0x1b7ea
movq 0x8(%rsp), %rdi
addq $0xd8, %rdi
xorl %esi, %esi
callq 0x1be00
movsd 0x1889ba(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x1b78a
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateAfterTransform(gaps::R3SurfelNode*)
void R3SurfelObject::
UpdateAfterTransform(R3SurfelNode *node)
{
  // Invalidate bboxes
  R3SurfelObject *ancestor = this;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x1b876
movq (%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rax), %xmm0
movsd 0x18895a(%rip), %xmm1   # 0x1a4190
ucomisd %xmm1, %xmm0
jne 0x1b840
jp 0x1b840
jmp 0x1b876
movq (%rsp), %rdi
addq $0xa0, %rdi
xorl %esi, %esi
callq 0x1bda0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd 0x18892c(%rip), %xmm0   # 0x1a4190
movsd %xmm0, (%rax)
movq (%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
jmp 0x1b807
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateProperties()
void R3SurfelObject::
UpdateProperties(void)
{
  // Update properties
  double dummy = 0;
  dummy += Complexity();
  dummy += BBox().Min().X();
  dummy += TimestampRange().Min();
  if (dummy == 927612.21242) {
    printf("Amazing!\n");
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x1c0f0
movq (%rsp), %rdi
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x193b0
movq %rax, %rdi
callq 0x1c110
movq %rax, %rdi
callq 0x187b0
movq (%rsp), %rdi
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x19600
movq %rax, %rdi
callq 0x1bc30
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x188a44(%rip), %xmm1   # 0x1a4340
ucomisd %xmm1, %xmm0
jne 0x1b912
jp 0x1b912
leaq 0x188a63(%rip), %rdi    # 0x1a436e
movb $0x0, %al
callq 0x13070
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindObjectByName(char const*) const
R3SurfelObject *R3SurfelScene::
FindObjectByName(const char *object_name) const
{
  // Search for object
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    if (!object->Name()) continue;
    if (strcmp(object->Name(), object_name)) continue;
    return object;
  }

  // Not 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 0x16c20
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d3f8
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x185f0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1bf70
cmpq $0x0, %rax
jne 0x1d3c1
jmp 0x1d3eb
movq 0x10(%rsp), %rdi
callq 0x1bf70
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x137e0
cmpl $0x0, %eax
je 0x1d3df
jmp 0x1d3eb
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d401
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1d380
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindObjectByIdentifier(int) const
R3SurfelObject *R3SurfelScene::
FindObjectByIdentifier(int identifier) const
{
  // Search for object
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    if (object->Identifier() < 0) continue;
    if (object->Identifier() != identifier) continue;
    return object;
  }

  // Not found
  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 0x16c20
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d49a
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x185f0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x19370
cmpl $0x0, %eax
jge 0x1d46f
jmp 0x1d48d
movq 0x18(%rsp), %rdi
callq 0x19370
cmpl 0x24(%rsp), %eax
je 0x1d481
jmp 0x1d48d
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d4a3
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x1d42f
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindLabelByName(char const*) const
R3SurfelLabel *R3SurfelScene::
FindLabelByName(const char *label_name) const
{
  // Search for label
  for (int i = 0; i < NLabels(); i++) {
    R3SurfelLabel *label = Label(i);
    if (!label->Name()) continue;
    if (strcmp(label->Name(), label_name)) continue;
    return label;
  }

  // Not 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 0x16c40
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d548
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x307a0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x30850
cmpq $0x0, %rax
jne 0x1d511
jmp 0x1d53b
movq 0x10(%rsp), %rdi
callq 0x30850
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x137e0
cmpl $0x0, %eax
je 0x1d52f
jmp 0x1d53b
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d551
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1d4d0
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindLabelByIdentifier(int) const
R3SurfelLabel *R3SurfelScene::
FindLabelByIdentifier(int identifier) const
{
  // Search for label
  for (int i = 0; i < NLabels(); i++) {
    R3SurfelLabel *label = Label(i);
    if (label->Identifier() < 0) continue;
    if (label->Identifier() != identifier) continue;
    return label;
  }

  // Not found
  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 0x16c40
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d5ea
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x307a0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x70720
cmpl $0x0, %eax
jge 0x1d5bf
jmp 0x1d5dd
movq 0x18(%rsp), %rdi
callq 0x70720
cmpl 0x24(%rsp), %eax
je 0x1d5d1
jmp 0x1d5dd
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d5f3
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x1d57f
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindLabelByAssignmentKeystroke(int) const
R3SurfelLabel *R3SurfelScene::
FindLabelByAssignmentKeystroke(int key) const
{
  // Search for label
  for (int i = 0; i < NLabels(); i++) {
    R3SurfelLabel *label = Label(i);
    if (label->AssignmentKeystroke() < 0) continue;
    if (label->AssignmentKeystroke() != key) continue;
    return label;
  }

  // Not found
  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 0x16c40
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d68a
movq 0x10(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x307a0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x30860
cmpl $0x0, %eax
jge 0x1d65f
jmp 0x1d67d
movq 0x18(%rsp), %rdi
callq 0x30860
cmpl 0x24(%rsp), %eax
je 0x1d671
jmp 0x1d67d
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d693
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x1d61f
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindLabelAssignment(gaps::R3SurfelObject*, gaps::R3SurfelLabel*, double, int) const
R3SurfelLabelAssignment *R3SurfelScene::
FindLabelAssignment(R3SurfelObject *object, R3SurfelLabel *label, RNScalar confidence, int originator) const
{
  // Search for label assignment
  for (int i = 0; i < object->NLabelAssignments(); i++) {
    R3SurfelLabelAssignment *assignment = object->LabelAssignment(i);
    if (assignment->Label() != label) continue;
    if (assignment->Confidence() != confidence) continue;
    if (assignment->Originator() != originator) continue;
    return assignment;
  }

  // Not found
  return NULL;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1bac0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d74d
movq 0x30(%rsp), %rdi
movl 0x18(%rsp), %esi
callq 0x1bae0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x1bca0
cmpq 0x28(%rsp), %rax
je 0x1d707
jmp 0x1d73d
movq 0x10(%rsp), %rdi
callq 0x1bc90
ucomisd 0x20(%rsp), %xmm0
jne 0x1d71d
jp 0x1d71d
jmp 0x1d71f
jmp 0x1d73d
movq 0x10(%rsp), %rdi
callq 0x1bc80
cmpl 0x1c(%rsp), %eax
je 0x1d731
jmp 0x1d73d
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x1d756
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x1d6c5
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindScanByName(char const*) const
R3SurfelScan *R3SurfelScene::
FindScanByName(const char *scan_name) const
{
  // Search for scan
  for (int i = 0; i < NScans(); i++) {
    R3SurfelScan *scan = Scan(i);
    if (!scan->Name()) continue;
    if (strcmp(scan->Name(), scan_name)) continue;
    return scan;
  }

  // Not 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 0x16ca0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d7f8
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x307d0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x30870
cmpq $0x0, %rax
jne 0x1d7c1
jmp 0x1d7eb
movq 0x10(%rsp), %rdi
callq 0x30870
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x137e0
cmpl $0x0, %eax
je 0x1d7df
jmp 0x1d7eb
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d801
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1d780
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindImageByName(char const*) const
R3SurfelImage *R3SurfelScene::
FindImageByName(const char *image_name) const
{
  // Search for image
  for (int i = 0; i < NImages(); i++) {
    R3SurfelImage *image = Image(i);
    if (!image->Name()) continue;
    if (strcmp(image->Name(), image_name)) continue;
    return image;
  }

  // Not 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 0x16cc0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1d8a8
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x30800
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x30890
cmpq $0x0, %rax
jne 0x1d871
jmp 0x1d89b
movq 0x10(%rsp), %rdi
callq 0x30890
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x137e0
cmpl $0x0, %eax
je 0x1d88f
jmp 0x1d89b
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1d8b1
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1d830
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::FindFeatureByName(char const*) const
R3SurfelFeature *R3SurfelScene::
FindFeatureByName(const char *feature_name) const
{
  // Search for feature
  for (int i = 0; i < NFeatures(); i++) {
    R3SurfelFeature *feature = Feature(i);
    if (!feature->Name()) continue;
    if (strcmp(feature->Name(), feature_name)) continue;
    return feature;
  }

  // Not 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 0x16c80
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x1dc98
movq 0x8(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x1c120
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x30960
cmpq $0x0, %rax
jne 0x1dc61
jmp 0x1dc8b
movq 0x10(%rsp), %rdi
callq 0x30960
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x137e0
cmpl $0x0, %eax
je 0x1dc7f
jmp 0x1dc8b
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x1dca1
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1dc20
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::SetName(char const*)
void R3SurfelScene::
SetName(const char *name)
{
  // Delete previous name
  if (this->name) free(this->name);

  // Set new name
  this->name = (name) ? RNStrdup(name) : NULL;

  // Mark scene as dirty
  flags.Add(R3_SURFEL_SCENE_DIRTY_FLAG);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x1d0(%rax)
je 0x1dce3
movq 0x18(%rsp), %rax
movq 0x1d0(%rax), %rdi
callq 0x136a0
cmpq $0x0, 0x28(%rsp)
je 0x1dcfc
movq 0x28(%rsp), %rdi
callq 0x1461b0
movq %rax, 0x10(%rsp)
jmp 0x1dd05
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x1dd05
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x1d0(%rax)
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x1c2d0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertObject(gaps::R3SurfelObject*, gaps::R3SurfelObject*)
void R3SurfelScene::
InsertObject(R3SurfelObject *object, R3SurfelObject *parent)
{
  // Just checking
  assert(object);
  assert(object->scene == NULL);
  assert(object->scene_index == -1);

  // Insert object into scene
  object->scene = this;
  object->scene_index = objects.NEntries();
  objects.Insert(object);

  // Insert object into parent
  object->parent = parent;
  if (parent) parent->parts.Insert(object);

  // Update object
  object->UpdateAfterInsert(this);

  // Mark scene as dirty
  flags.Add(R3_SURFEL_SCENE_DIRTY_FLAG);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rdi, 0x8(%rax)
addq $0x10, %rdi
callq 0x16d50
movq 0x10(%rsp), %rdi
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x10, %rdi
movq 0x28(%rsp), %rsi
callq 0x1be70
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x20(%rsp)
je 0x1e185
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x1be70
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x1b1c0
movq 0x10(%rsp), %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1c2d0
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertLabel(gaps::R3SurfelLabel*, gaps::R3SurfelLabel*)
void R3SurfelScene::
InsertLabel(R3SurfelLabel *label, R3SurfelLabel *parent)
{
  // Just checking
  assert(label);
  assert(label->scene == NULL);
  assert(label->scene_index == -1);

  // Insert label 
  label->scene = this;
  label->scene_index = labels.NEntries();
  labels.Insert(label);

  // Insert label into parent
  label->parent = parent;
  if (parent) parent->parts.Insert(label);

  // Update label
  label->UpdateAfterInsert(this);

  // Mark scene as dirty
  flags.Add(R3_SURFEL_SCENE_DIRTY_FLAG);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rdi, 0x8(%rax)
addq $0x20, %rdi
callq 0x16d50
movq 0x10(%rsp), %rdi
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x10(%rax)
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x30ae0
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, 0x20(%rsp)
je 0x1e825
movq 0x20(%rsp), %rdi
addq $0x20, %rdi
movq 0x28(%rsp), %rsi
callq 0x30ae0
movq 0x10(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x30b10
movq 0x10(%rsp), %rax
addq $0x1e8, %rax            # imm = 0x1E8
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1c2d0
addq $0x38, %rsp
retq
nopw (%rax,%rax)