LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::~R3SurfelObject()
R3SurfelObject::
~R3SurfelObject(void)
{
  // Delete object properties
  while (NObjectProperties() > 0) {
    R3SurfelObjectProperty *property = ObjectProperty(NObjectProperties()-1);
    delete property;
  }

  // Delete object relationships
  while (NObjectRelationships() > 0) {
    R3SurfelObjectRelationship *relationship = ObjectRelationship(NObjectRelationships()-1);
    delete relationship;
  }

  // Delete object assignments
  while (NLabelAssignments() > 0) {
    R3SurfelLabelAssignment *assignment = LabelAssignment(NLabelAssignments()-1);
    delete assignment;
  }

  // Remove nodes from object
  while (NNodes() > 0) {
    R3SurfelNode *node = Node(NNodes()-1);
    RemoveNode(node);
  }

  // Delete parts
  while (NParts() > 0) {
    R3SurfelObject *part = Part(NParts()-1);
    delete part;
  }

  // Remove from parent
  SetParent(NULL);

  // Remove object from scene (handles all removals)
  if (scene) scene->RemoveObject(this);

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x116ed4(%rip), %rax    # 0x12dd30
movq %rax, (%rdi)
movl 0x3c(%rdi), %eax
testl %eax, %eax
jle 0x16e81
movq 0x30(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x16e62
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x3c(%rbx), %eax
jmp 0x16e62
movl 0x4c(%rbx), %eax
testl %eax, %eax
jle 0x16ea0
movq 0x40(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x16e84
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16e81
movl 0x5c(%rbx), %eax
testl %eax, %eax
jle 0x16ebf
movq 0x50(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x16ea3
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16ea0
leaq 0x60(%rbx), %r14
movslq 0x6c(%rbx), %rax
testq %rax, %rax
jle 0x16edf
movq 0x60(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x16f82
jmp 0x16ec3
movl 0x2c(%rbx), %eax
testl %eax, %eax
jle 0x16efe
movq 0x20(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x16ee2
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16edf
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x38(%rax)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x16f1b
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x20(%rax)
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x16f2c
callq 0x135e0
leaq 0xa0(%rbx), %rdi
callq 0x6e174
leaq 0x70(%rbx), %rdi
callq 0x3e2f8
movq %r14, %rdi
callq 0xa9d12
leaq 0x50(%rbx), %rdi
callq 0xa9d12
leaq 0x40(%rbx), %rdi
callq 0xa9d12
leaq 0x30(%rbx), %rdi
callq 0xa9d12
addq $0x20, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa9d12
jmp 0x16f79
movq %rax, %rdi
callq 0x183c3
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::RemoveNode(gaps::R3SurfelNode*)
void R3SurfelObject::
RemoveNode(R3SurfelNode *node)
{
  // Just checking
  assert(node);
  assert(nodes.FindEntry(node));
  assert(node->object == this);

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

  // Update node
  node->object = NULL;

  // Remove node
  nodes.Remove(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;
  }

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, 0x8(%rsi)
leaq 0x60(%rdi), %r15
movq %r15, %rdi
callq 0xa9d20
subq 0x60(%rbx), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0xa9ec8
movq %r14, %rdi
callq 0x3742e
movsd 0x98(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rbx)
movsd 0xc6191(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rbx, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x16ff4
jnp 0x17004
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x16fe4
movq %rbx, %rcx
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17017
jnp 0x17027
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17007
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17037
orb $0x1, 0x1e8(%rax)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::Identifier() const
int R3SurfelObject::
Identifier(void) const
{
  // Update ID 
  if (identifier < 0) {
    ((R3SurfelObject *) this)->identifier = R3surfel_next_object_identifier++;
  }

  // Return identifier 
  return identifier;
}

// Assembly:
movl 0x90(%rdi), %eax
testl %eax, %eax
js 0x17061
retq
movl 0x11cc35(%rip), %eax    # 0x133c9c
leal 0x1(%rax), %ecx
movl %ecx, 0x11cc2c(%rip)    # 0x133c9c
movl %eax, 0x90(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BBox() const
const R3Box& R3SurfelObject::
BBox(void) const
{
  // Return bounding box of object
  if (bbox[0][0] == FLT_MAX) 
    ((R3SurfelObject *) this)->UpdateBBox();
  return bbox;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd 0xa8(%rdi), %xmm0
ucomisd 0xc60dc(%rip), %xmm0    # 0xdd168
jne 0x17098
jp 0x17098
movq %rbx, %rdi
callq 0x170a4
addq $0xa0, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBBox()
void R3SurfelObject::
UpdateBBox(void)
{
  // Check if bounding box is uptodate
  if (bbox[0][0] != FLT_MAX) return;

  // Initialize bounding box
  bbox = R3null_box;

  // Union bounding boxes of nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    bbox.Union(node->BBox());
  }

  // Union bounding boxes of parts
  for (int i = 0; i < NParts(); i++) {
    R3SurfelObject *part = Part(i);
    bbox.Union(part->BBox());
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd 0xa8(%rdi), %xmm0
ucomisd 0xc60ac(%rip), %xmm0    # 0xdd168
jne 0x17175
jp 0x17175
movq %rdi, %rbx
leaq 0xa0(%rdi), %r14
addq $0xa8, %rdi
leaq 0x11d8e8(%rip), %r15    # 0x1349c8
leaq 0x8(%r15), %rsi
callq 0x8412a
leaq 0xc0(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x8412a
cmpl $0x0, 0x6c(%rbx)
jle 0x17129
xorl %r15d, %r15d
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x3755c
movq %r14, %rdi
movq %rax, %rsi
callq 0x6de0c
incq %r15
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jl 0x17105
cmpl $0x0, 0x2c(%rbx)
jle 0x17175
xorl %r12d, %r12d
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %r15
movsd 0xa8(%r15), %xmm0
ucomisd 0xc601d(%rip), %xmm0    # 0xdd168
jne 0x17157
jp 0x17157
movq %r15, %rdi
callq 0x170a4
addq $0xa0, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x6de0c
incq %r12
movslq 0x2c(%rbx), %rax
cmpq %rax, %r12
jl 0x17132
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::ElevationRange() const
RNInterval R3SurfelObject::
ElevationRange(void) const
{
  // Initialize elevation range
  RNInterval elevation_range = RNnull_interval;

  // Compute elevation range
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    RNInterval node_range = node->ElevationRange();
    elevation_range.Union(node_range);
  }

  // Return elevation range
  return elevation_range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x51f636(%rip), %rsi    # 0x5367d0
callq 0xab9b4
cmpl $0x0, 0x6c(%r14)
jle 0x171f8
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movq 0x60(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x37584
movq %r15, %rdi
movq %rax, %rsi
callq 0xab9b4
movsd 0x8(%rsp), %xmm0
movsd (%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x171da
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm0
ucomisd 0x8(%rbx), %xmm0
jbe 0x171ec
movsd %xmm0, 0x8(%rbx)
incq %r12
movslq 0x6c(%r14), %rax
cmpq %rax, %r12
jl 0x171ae
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::TimestampRange() const
const RNInterval& R3SurfelObject::
TimestampRange(void) const
{
  // Return timestamp range of object
  if (timestamp_range.Min() == FLT_MAX) 
    ((R3SurfelObject *) this)->UpdateTimestampRange();
  return timestamp_range;
}

// Assembly:
pushq %rbx
leaq 0xd8(%rdi), %rbx
movsd 0xd8(%rdi), %xmm0
ucomisd 0xc5f48(%rip), %xmm0    # 0xdd168
jne 0x17229
jp 0x17229
callq 0x1722e
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateTimestampRange()
void R3SurfelObject::
UpdateTimestampRange(void)
{
  // Check if bounding box is uptodate
  if (timestamp_range[0] != FLT_MAX) return;

  // Initialize timestamp range
  timestamp_range.Reset(FLT_MAX,-FLT_MAX);

  // Union timestamp ranges of nodes
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    timestamp_range.Union(node->TimestampRange());
  }

  // Union timestamp ranges of parts
  for (int i = 0; i < NParts(); i++) {
    R3SurfelObject *part = Part(i);
    timestamp_range.Union(part->TimestampRange());
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movsd 0xd8(%rdi), %xmm0
ucomisd 0xc5f25(%rip), %xmm0    # 0xdd168
jne 0x1733b
jp 0x1733b
movq %rdi, %rbx
movapd 0xc60d6(%rip), %xmm0    # 0xdd330
movupd %xmm0, 0xd8(%rdi)
cmpl $0x0, 0x6c(%rdi)
jle 0x172bb
xorl %r14d, %r14d
movq 0x60(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x375ac
movsd (%rax), %xmm1
movsd 0xd8(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x17296
movsd %xmm1, 0xd8(%rbx)
movapd %xmm1, %xmm0
movsd 0x8(%rax), %xmm1
ucomisd 0xe0(%rbx), %xmm1
jbe 0x172ad
movsd %xmm1, 0xe0(%rbx)
incq %r14
movslq 0x6c(%rbx), %rax
cmpq %rax, %r14
jl 0x1726b
jmp 0x172c3
movsd 0xc5ea5(%rip), %xmm0    # 0xdd168
cmpl $0x0, 0x2c(%rbx)
jle 0x1733b
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %r14
movsd 0xd8(%r14), %xmm1
ucomisd 0xc5e83(%rip), %xmm1    # 0xdd168
jne 0x17302
jp 0x17302
movq %r14, %rdi
callq 0x1722e
movsd 0xd8(%r14), %xmm1
movsd 0xd8(%rbx), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x17314
movsd %xmm1, 0xd8(%rbx)
movapd %xmm1, %xmm0
movsd 0xe0(%r14), %xmm1
ucomisd 0xe0(%rbx), %xmm1
jbe 0x1732f
movsd %xmm1, 0xe0(%rbx)
incq %r15
movslq 0x2c(%rbx), %rax
cmpq %rax, %r15
jl 0x172cc
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::FeatureVector() const
const R3SurfelFeatureVector& R3SurfelObject::
FeatureVector(void) const
{
  // Update feature vector
  if (feature_vector.NValues() == 0) {
    if (scene->NFeatures() > 0) {
      ((R3SurfelObject *) this)->UpdateFeatureVector();
    }
  }

  // Return feature vector
  return feature_vector;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x80(%rdi)
jne 0x17364
movq 0x8(%rbx), %rax
cmpl $0x0, 0xac(%rax)
jle 0x17364
movq %rbx, %rdi
callq 0x1736e
addq $0x70, %rbx
movq %rbx, %rax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateFeatureVector()
void R3SurfelObject::
UpdateFeatureVector(void)
{
  // Check if need update
  if (!scene) return;
  if (scene->NFeatures() == 0) return;
  if (feature_vector.NValues() == scene->NFeatures()) return;

  // Create feature vector
  R3SurfelFeatureVector vector(scene->NFeatures());

  // Evaluate features
  for (int i = 0; i < scene->NFeatures(); i++) {
    R3SurfelFeature *feature = scene->Feature(i);
    feature->UpdateFeatureVector(this, vector);
  }

  // Set feature vector
  SetFeatureVector(vector);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x173f6
movl 0xac(%rax), %esi
testl %esi, %esi
je 0x173f6
movq %rdi, %rbx
cmpl %esi, 0x80(%rdi)
je 0x173f6
leaq 0x8(%rsp), %rdi
callq 0x3e1c4
movq 0x8(%rbx), %rax
cmpl $0x0, 0xac(%rax)
jle 0x173de
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq 0xa0(%rax), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
movq %r14, %rdx
callq *0x48(%rax)
incq %r15
movq 0x8(%rbx), %rax
movslq 0xac(%rax), %rcx
cmpq %rcx, %r15
jl 0x173b4
movq (%rbx), %rax
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq *0x20(%rax)
leaq 0x8(%rsp), %rdi
callq 0x3e2f8
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x17402
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3e2f8
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::Scan() const
R3SurfelScan *R3SurfelObject::
Scan(void) const
{
  // Search for scan amongst object's nodes
  R3SurfelScan *scan = NULL;
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    R3SurfelScan *s = node->Scan();
    if (s && (s != scan)) {
      if (scan) return NULL;
      else scan = s;
    }
  }

  // Return scan, or NULL if not found
  return scan;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $0x0, 0x6c(%rdi)
jle 0x17476
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x60(%rbx), %rax
movq (%rax,%r15,8), %rdi
movl $0x1, %esi
callq 0x37798
testq %rax, %rax
sete %cl
cmpq %r14, %rax
sete %dl
orb %cl, %dl
jne 0x17468
testq %r14, %r14
movq %rax, %r14
jne 0x17476
incq %r15
movslq 0x6c(%rbx), %rax
cmpq %rax, %r15
jl 0x1743e
jmp 0x17479
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::FindObjectProperty(int) const
R3SurfelObjectProperty *R3SurfelObject::
FindObjectProperty(int type) const
{
  // Search for property of type
  for (int i = 0; i < NObjectProperties(); i++) {
    R3SurfelObjectProperty *property = ObjectProperty(i);
    if (property->Type() == type) return property;
  }

  // Property not found
  return NULL;
}

// Assembly:
movslq 0x3c(%rdi), %rcx
testq %rcx, %rcx
jle 0x174a2
movq 0x30(%rdi), %rdx
xorl %edi, %edi
movq (%rdx,%rdi,8), %rax
cmpl %esi, 0x2c(%rax)
je 0x174a4
incq %rdi
cmpq %rdi, %rcx
jne 0x17491
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0x1754e
cmpl $0x0, 0x2c(%r15)
jle 0x1754e
xorl %r12d, %r12d
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd (%rsp), %xmm0
callq 0x17506
incq %r12
movslq 0x2c(%r15), %rax
cmpq %rax, %r12
jl 0x17529
jmp 0x1757b
cmpl $0x0, 0x6c(%r15)
jle 0x1757b
xorl %r12d, %r12d
movq 0x60(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
movsd (%rsp), %xmm0
callq 0x37816
incq %r12
movslq 0x6c(%r15), %rax
cmpq %rax, %r12
jl 0x17558
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x0, 0x6c(%rdi)
jle 0x175ba
xorl %r15d, %r15d
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x375d4
testl %eax, %eax
jne 0x175ed
incq %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jl 0x1759b
xorl %eax, %eax
testl %ebx, %ebx
je 0x175f2
cmpl $0x0, 0x2c(%r14)
jle 0x175f2
xorl %r15d, %r15d
movq 0x20(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x17588
testl %eax, %eax
jne 0x175ed
incq %r15
movslq 0x2c(%r14), %rax
cmpq %rax, %r15
jl 0x175ca
xorl %eax, %eax
jmp 0x175f2
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x5c(%rdi), %rcx
testq %rcx, %rcx
jle 0x1767e
movq 0x50(%rdi), %rdx
movsd 0xc5b1f(%rip), %xmm0    # 0xdd170
xorl %edi, %edi
xorl %eax, %eax
movq (%rdx,%rdi,8), %r8
cmpl %esi, 0x40(%r8)
jne 0x17675
movsd 0x38(%r8), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %r8, %rax
movapd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rcx
jne 0x17655
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movslq 0x5c(%rdi), %rcx
testq %rcx, %rcx
jle 0x17750
movq 0x50(%rdi), %rdx
movsd 0xc5a51(%rip), %xmm0    # 0xdd170
xorl %esi, %esi
xorl %eax, %eax
movq (%rdx,%rsi,8), %rdi
cmpl $0x0, 0x40(%rdi)
jne 0x17742
movsd 0x38(%rdi), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %rdi, %rax
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x17723
testq %rax, %rax
je 0x17753
retq
xorl %eax, %eax
retq
movsd 0xc5a15(%rip), %xmm0    # 0xdd170
xorl %esi, %esi
xorl %eax, %eax
movq (%rdx,%rsi,8), %rdi
cmpl $0x1, 0x40(%rdi)
jne 0x1777e
movsd 0x38(%rdi), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %rdi, %rax
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x1775f
jmp 0x1774f
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::GroundTruthLabel() const
R3SurfelLabel *R3SurfelObject::
GroundTruthLabel(void) const
{
  // Return ground truth label
  R3SurfelLabelAssignment *assignment = GroundTruthLabelAssignment();
  if (assignment) return assignment->Label();
  return NULL;
}

// Assembly:
movslq 0x5c(%rdi), %rax
testq %rax, %rax
jle 0x177d2
movq 0x50(%rdi), %rcx
movsd 0xc59d3(%rip), %xmm0    # 0xdd170
xorl %esi, %esi
xorl %edx, %edx
movq (%rcx,%rsi,8), %rdi
cmpl $0x2, 0x40(%rdi)
jne 0x177c0
movsd 0x38(%rdi), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %rdi, %rdx
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x177a1
testq %rdx, %rdx
je 0x177d2
movq 0x28(%rdx), %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::HumanLabel() const
R3SurfelLabel *R3SurfelObject::
HumanLabel(void) const
{
  // Return human generated label
  R3SurfelLabelAssignment *assignment = HumanLabelAssignment();
  if (assignment) return assignment->Label();
  return NULL;
}

// Assembly:
movslq 0x5c(%rdi), %rax
testq %rax, %rax
jle 0x17820
movq 0x50(%rdi), %rcx
movsd 0xc5985(%rip), %xmm0    # 0xdd170
xorl %esi, %esi
xorl %edx, %edx
movq (%rcx,%rsi,8), %rdi
cmpl $0x0, 0x40(%rdi)
jne 0x1780e
movsd 0x38(%rdi), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %rdi, %rdx
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x177ef
testq %rdx, %rdx
je 0x17820
movq 0x28(%rdx), %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::PredictedLabel() const
R3SurfelLabel *R3SurfelObject::
PredictedLabel(void) const
{
  // Return predicted label
  R3SurfelLabelAssignment *assignment = PredictedLabelAssignment();
  if (assignment) return assignment->Label();
  return NULL;
}

// Assembly:
movslq 0x5c(%rdi), %rax
testq %rax, %rax
jle 0x1786e
movq 0x50(%rdi), %rcx
movsd 0xc5937(%rip), %xmm0    # 0xdd170
xorl %esi, %esi
xorl %edx, %edx
movq (%rcx,%rsi,8), %rdi
cmpl $0x1, 0x40(%rdi)
jne 0x1785c
movsd 0x38(%rdi), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %rdi, %rdx
movapd %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0x1783d
testq %rdx, %rdx
je 0x1786e
movq 0x28(%rdx), %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BestLabel(int) const
R3SurfelLabel *R3SurfelObject::
BestLabel(int originator) const
{
  // Return best label with given origniator
  R3SurfelLabelAssignment *assignment = BestLabelAssignment(originator);
  if (assignment) return assignment->Label();
  return NULL;
}

// Assembly:
movslq 0x5c(%rdi), %rax
testq %rax, %rax
jle 0x178d7
movq 0x50(%rdi), %rcx
movsd 0xc58cf(%rip), %xmm0    # 0xdd170
xorl %edi, %edi
xorl %edx, %edx
movq (%rcx,%rdi,8), %r8
cmpl %esi, 0x40(%r8)
jne 0x178c5
movsd 0x38(%r8), %xmm1
ucomisd %xmm0, %xmm1
maxsd %xmm0, %xmm1
cmovaq %r8, %rdx
movapd %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rax
jne 0x178a5
testq %rdx, %rdx
je 0x178d7
movq 0x28(%rdx), %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::BestOrientedBBox(int) const
R3OrientedBox R3SurfelObject::
BestOrientedBBox(int originator) const
{
  // Return best OBB (or an empty box if there is none)
  RNScalar best_confidence = -FLT_MAX;
  R3OrientedBox best_obb = R3null_oriented_box;
  for (int i = 0; i < properties.NEntries(); i++) {
    R3SurfelObjectProperty *property = properties.Kth(i);
    if (property->Type() != R3_SURFEL_OBJECT_AMODAL_OBB_PROPERTY) continue;
    if (property->NOperands() != 20) continue;
    int orig = (int) (property->Operand(16) + 0.5);
    if (orig != originator) continue;
    RNScalar confidence = property->Operand(15);
    if (confidence > best_confidence) {
      R3Point centroid(property->Operand(0), property->Operand(1), property->Operand(2));
      R3Vector axis1(property->Operand(3), property->Operand(4), property->Operand(5));
      R3Vector axis2(property->Operand(6), property->Operand(7), property->Operand(8));
      // R3Vector axis3(property->Operand(9), property->Operand(10), property->Operand(11));
      RNScalar radius1 = property->Operand(12);
      RNScalar radius2 = property->Operand(13);
      RNScalar radius3 = property->Operand(14);
      best_obb.Reset(centroid, axis1, axis2, radius1, radius2, radius3);
      best_confidence = confidence;
    }
  }

  // Return best obb
  return best_obb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x11ce99(%rip), %rsi    # 0x134790
callq 0x6bf0a
movl 0x3c(%r14), %eax
testl %eax, %eax
jle 0x17a0e
movsd 0xc5860(%rip), %xmm0    # 0xdd170
xorl %r15d, %r15d
movsd 0xc581d(%rip), %xmm2    # 0xdd138
leaq 0x40(%rsp), %r13
movq 0x30(%r14), %rcx
movq (%rcx,%r15,8), %r12
cmpl $0x2, 0x2c(%r12)
jne 0x179ff
cmpl $0x14, 0x28(%r12)
jne 0x179ff
movq 0x20(%r12), %rcx
movsd 0x80(%rcx), %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %edx
cmpl %ebp, %edx
jne 0x179ff
movsd 0x78(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x179ff
movsd %xmm1, 0x8(%rsp)
movsd (%rcx), %xmm0
movsd 0x8(%rcx), %xmm1
movsd 0x10(%rcx), %xmm2
leaq 0x28(%rsp), %rdi
callq 0x83dc2
movq 0x20(%r12), %rax
movsd 0x18(%rax), %xmm0
movsd 0x20(%rax), %xmm1
movsd 0x28(%rax), %xmm2
leaq 0x10(%rsp), %rdi
callq 0x84856
movq 0x20(%r12), %rax
movsd 0x30(%rax), %xmm0
movsd 0x38(%rax), %xmm1
movsd 0x40(%rax), %xmm2
movq %r13, %rdi
callq 0x84856
movq 0x20(%r12), %rax
movsd 0x60(%rax), %xmm0
movsd 0x68(%rax), %xmm1
movsd 0x70(%rax), %xmm2
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r13, %rcx
callq 0x6d17a
movl 0x3c(%r14), %eax
movsd 0x8(%rsp), %xmm0
movsd 0xc5739(%rip), %xmm2    # 0xdd138
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x17920
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17a26
jmp 0x17a26
jmp 0x17a26
movq %rax, %r14
movq %rbx, %rdi
callq 0x6e174
movq %r14, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x178da
movsd 0x70(%r15), %xmm0
movsd 0x78(%r15), %xmm1
minsd 0x68(%r15), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x17ac8
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
callq 0x6bf0a
jmp 0x17b18
movq %rsp, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x178da
movsd 0x70(%rsp), %xmm0
movsd 0x78(%rsp), %xmm1
minsd 0x68(%rsp), %xmm0
minsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
ja 0x17b05
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6bf0a
jmp 0x17b10
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28040
movq %rsp, %rdi
callq 0x6e174
leaq 0x80(%rsp), %rdi
callq 0x6e174
movq %rbx, %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6e174
jmp 0x17b47
jmp 0x17b44
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x70, %rsi
addq $0x70, %rdi
callq 0x3e33a
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0x17b86
callq 0xac67b
jmp 0x17b88
xorl %eax, %eax
movq %rax, 0x88(%rbx)
movl 0x90(%r14), %eax
movl %eax, 0x90(%rbx)
movsd 0x98(%r14), %xmm0
movsd %xmm0, 0x98(%rbx)
movl $0xa8, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x8412a
movl $0xc0, %esi
leaq (%rbx,%rsi), %rdi
addq %r14, %rsi
callq 0x8412a
movups 0xd8(%r14), %xmm0
movups %xmm0, 0xd8(%rbx)
movq $0x0, 0xe8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::SetParent(gaps::R3SurfelObject*)
void R3SurfelObject::
SetParent(R3SurfelObject *parent)
{
  // Just checking
  // assert(parent);
  // assert(this->parent);
  assert(!this->parent || (scene == this->parent->scene));
  assert(!parent || !this->parent || (parent->scene == this->parent->scene));
  if (parent == this->parent) return;

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

  // Invalidate timestamps starting at current parent
  ancestor = this->parent;
  while (ancestor) {
    if (ancestor->timestamp_range[0] == FLT_MAX) break;
    ancestor->timestamp_range[0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

  // Invalidate bounding boxes starting at new parent
  ancestor = parent;
  while (ancestor) {
    if (ancestor->bbox[0][0] == FLT_MAX) break;
    ancestor->bbox[0][0] = FLT_MAX;
    ancestor = ancestor->parent;
  }

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

  // Update hierarchy
  if (this->parent) this->parent->parts.Remove(this);
  if (parent) parent->parts.Insert(this);
  this->parent = parent;

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x18(%rdi), %r12
cmpq %rsi, %r12
je 0x17d15
movq %rsi, %r14
movq %rdi, %rbx
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
testq %r12, %r12
je 0x17c71
movsd 0xc5542(%rip), %xmm0    # 0xdd168
movq %r12, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17c39
jnp 0x17c49
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17c29
testq %r12, %r12
je 0x17c71
movq %r12, %rcx
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17c61
jnp 0x17c71
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17c51
testq %r14, %r14
je 0x17cc4
movsd 0xc54ea(%rip), %xmm0    # 0xdd168
movq %r14, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17c91
jnp 0x17ca1
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17c81
movq %r14, %rcx
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17cb4
jnp 0x17cc4
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17ca4
testq %r12, %r12
je 0x17cec
leaq 0x20(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa9d20
subq 0x20(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0xa9ec8
testq %r14, %r14
je 0x17d01
leaq 0x20(%r14), %rdi
movl 0x2c(%r14), %edx
movq %rbx, %rsi
callq 0xa9d3e
movq %r14, 0x18(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17d15
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x17d3d
callq 0x135e0
testq %r14, %r14
je 0x17d4c
movq %r14, %rdi
callq 0xac67b
jmp 0x17d4e
xorl %eax, %eax
movq %rax, 0x88(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17d65
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x60, %rdi
movl 0x6c(%rbx), %edx
callq 0xa9d3e
movq %r14, %rdi
callq 0x3742e
addsd 0x98(%rbx), %xmm0
movsd %xmm0, 0x98(%rbx)
movsd 0xc5358(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rbx, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17e2d
jnp 0x17e3d
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17e1d
movq %rbx, %rcx
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x17e50
jnp 0x17e60
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x17e40
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x17e70
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x6c(%rdi)
jle 0x17eac
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x40(%rax)
incq %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jl 0x17e8b
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x6c(%rdi)
jle 0x17ee1
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x37c3e
incq %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jl 0x17ec1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x6c(%rdi)
jle 0x17f15
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x37cdc
incq %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jl 0x17ef5
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x6c(%rdi)
jle 0x17f53
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x60(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x37db6
testl %eax, %eax
je 0x17f43
incq %r14
movslq 0x6c(%rbx), %rcx
cmpq %rcx, %r14
jl 0x17f26
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x17f58
movl $0x1, %ecx
movl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x6c(%rdi)
jle 0x17f92
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x48(%rax)
incq %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jl 0x17f70
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x6c(%rdi)
jle 0x17fca
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x58(%rax)
incq %r15
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jl 0x17fa8
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %rsi, %rsi
jne 0x17ff0
movq 0x11af83(%rip), %rax    # 0x132f70
movq (%rax), %r15
testq %r14, %r14
je 0x18000
movq %r14, %rdi
movq %r15, %rsi
callq 0x135b0
movl 0x10(%r12), %edx
movq 0x88(%r12), %rax
testq %rax, %rax
leaq 0xc532f(%rip), %rcx     # 0xdd346
cmovneq %rax, %rcx
leaq 0xc531e(%rip), %rsi     # 0xdd340
movq %r15, %rdi
xorl %eax, %eax
callq 0x13740
testq %rbx, %rbx
je 0x1803c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x135b0
movl $0xa, %edi
movq %r15, %rsi
callq 0x13670
cmpl $0x0, 0x6c(%r12)
jle 0x18079
xorl %r13d, %r13d
movq 0x60(%r12), %rax
movq (%rax,%r13,8), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x60(%rax)
incq %r13
movslq 0x6c(%r12), %rax
cmpq %rax, %r13
jl 0x18054
movl $0xa, %edi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13670
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x180f0
movsd 0xc50c7(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rcx # imm = 0x47EFFFFFE0000000
movq %rax, %rdx
movsd 0xa8(%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x180be
jnp 0x180eb
movq %rcx, 0xa8(%rdx)
movq 0x18(%rdx), %rdx
testq %rdx, %rdx
jne 0x180ae
jmp 0x180eb
movsd 0xd8(%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0x180e0
jnp 0x180f0
movq %rcx, 0xd8(%rax)
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x180d0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x18152
movsd 0xc5065(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rcx # imm = 0x47EFFFFFE0000000
movq %rax, %rdx
movsd 0xa8(%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x18120
jnp 0x1814d
movq %rcx, 0xa8(%rdx)
movq 0x18(%rdx), %rdx
testq %rdx, %rdx
jne 0x18110
jmp 0x1814d
movsd 0xd8(%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0x18142
jnp 0x18152
movq %rcx, 0xd8(%rax)
movq 0x18(%rax), %rax
testq %rax, %rax
jne 0x18132
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBeforeRemoveObjectProperty(gaps::R3SurfelObjectProperty*)
void R3SurfelObject::
UpdateBeforeRemoveObjectProperty(R3SurfelObjectProperty *property)
{
  // Just checking
  assert(property->Scene());
  assert(property->Scene() == scene);

  // Remove property
  properties.Remove(property);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %r14
movq %r14, %rdi
callq 0xa9d20
subq 0x30(%rbx), %rax
shrq $0x3, %rax
movq %r14, %rdi
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa9ec8
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObject.cpp
// Function: gaps::R3SurfelObject::UpdateBeforeRemoveObjectRelationship(gaps::R3SurfelObjectRelationship*)
void R3SurfelObject::
UpdateBeforeRemoveObjectRelationship(R3SurfelObjectRelationship *relationship)
{
  // Just checking
  assert(relationship->Scene());
  assert(relationship->Scene() == scene);

  // Remove relationship
  relationships.Remove(relationship);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movq %r14, %rdi
callq 0xa9d20
subq 0x40(%rbx), %rax
shrq $0x3, %rax
movq %r14, %rdi
movl %eax, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa9ec8
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rsi, %rbx
leaq 0x50(%rdi), %rax
movslq 0x20(%rsi), %rcx
movq 0x50(%rdi), %rdx
movslq 0x5c(%rdi), %rsi
movq -0x8(%rdx,%rsi,8), %rdi
movl %ecx, 0x20(%rdi)
movq %rdi, (%rdx,%rcx,8)
decl %esi
movq %rax, %rdi
callq 0xa9ec8
movl $0xffffffff, 0x20(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cvtsi2sdl 0x8(%rdx), %xmm0
addsd 0x98(%rdi), %xmm0
movsd %xmm0, 0x98(%rdi)
movsd 0xc4f43(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x18242
jnp 0x18252
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x18232
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x18278
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1826b
jnp 0x18278
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x18256
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cvtsi2sdl 0x8(%rdx), %xmm0
movsd 0x98(%rdi), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x98(%rdi)
movsd 0xc4ecd(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x182b8
jnp 0x182c8
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
jne 0x182a8
movq 0x18(%rdi), %rcx
testq %rcx, %rcx
je 0x182ee
movsd 0xd8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x182e1
jnp 0x182ee
movq %rax, 0xd8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x182cc
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
movsd 0xc4e70(%rip), %xmm0    # 0xdd168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movsd 0xa8(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jne 0x18312
jnp 0x18322
movq %rax, 0xa8(%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x18302
retq
nop