LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %ecx, %ecx
movq %rcx, %r14
movslq 0x6c(%rbx), %r15
cmpq %r15, %rcx
jge 0x173d9
movq 0x60(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x33e9e
leaq 0x1(%r14), %rcx
testl %eax, %eax
jne 0x173b8
xorl %eax, %eax
cmpq %r15, %r14
setge %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x17415
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x48(%rax)
incq %r15
jmp 0x173f6
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x6c(%r14), %rax
cmpq %rax, %r15
jge 0x17449
movq 0x60(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x58(%rax)
incq %r15
jmp 0x1742a
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x17474
movq 0x10cb0f(%rip), %rax    # 0x123f80
movq (%rax), %r15
testq %r14, %r14
je 0x17484
movq %r14, %rdi
movq %r15, %rsi
callq 0x135d0
movl 0x10(%r12), %edx
movq 0x88(%r12), %rax
testq %rax, %rax
leaq 0xb0eab(%rip), %rcx     # 0xc8346
cmovneq %rax, %rcx
leaq 0xb0e9a(%rip), %rsi     # 0xc8340
movq %r15, %rdi
xorl %eax, %eax
callq 0x13780
testq %rbx, %rbx
je 0x174c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x135d0
pushq $0xa
popq %rdi
movq %r15, %rsi
callq 0x13690
xorl %r13d, %r13d
movslq 0x6c(%r12), %rax
cmpq %rax, %r13
jge 0x174f5
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
jmp 0x174ce
pushq $0xa
popq %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13690
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
addq $0x18, %rdi
movsd 0xb0c52(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x17567
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1753b
jnp 0x17567
movq %rax, 0xa8(%rcx)
addq $0x18, %rcx
jmp 0x17523
movsd 0xd8(%rdi), %xmm0
ucomisd 0xb0c10(%rip), %xmm0    # 0xc8168
jne 0x1755c
jnp 0x1756f
movq %rax, 0xd8(%rdi)
addq $0x18, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x17548
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
addq $0x18, %rdi
movsd 0xb0bec(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x175cd
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x175a1
jnp 0x175cd
movq %rax, 0xa8(%rcx)
addq $0x18, %rcx
jmp 0x17589
movsd 0xd8(%rdi), %xmm0
ucomisd 0xb0baa(%rip), %xmm0    # 0xc8168
jne 0x175c2
jnp 0x175d5
movq %rax, 0xd8(%rdi)
addq $0x18, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x175ae
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb0b0f(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
testq %rcx, %rcx
je 0x176a3
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1767b
jnp 0x176a3
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x17666
movsd 0xd8(%rdi), %xmm0
ucomisd 0xb0ad0(%rip), %xmm0    # 0xc8168
jne 0x1769c
jnp 0x176ac
movq %rax, 0xd8(%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x17688
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb0a99(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rdi, %rcx
testq %rcx, %rcx
je 0x17719
movsd 0xa8(%rcx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x176f1
jnp 0x17719
movq %rax, 0xa8(%rcx)
movq 0x18(%rcx), %rcx
jmp 0x176dc
movsd 0xd8(%rdi), %xmm0
ucomisd 0xb0a5a(%rip), %xmm0    # 0xc8168
jne 0x17712
jnp 0x17722
movq %rax, 0xd8(%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
jne 0x176fe
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xb0a3c(%rip), %xmm0    # 0xc8168
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
testq %rdi, %rdi
je 0x17758
movsd 0xa8(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1774b
jnp 0x17758
movq %rax, 0xa8(%rdi)
movq 0x18(%rdi), %rdi
jmp 0x17736
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorpd %xmm0, %xmm0
addsd 0x98(%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x16860
movsd 0x8(%rsp), %xmm0
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x16996
movsd 0x8(%rsp), %xmm0
addsd (%rax), %xmm0
ucomisd 0xb0b7c(%rip), %xmm0    # 0xc8320
jne 0x177b9
jp 0x177b9
leaq 0xb0b99(%rip), %rdi     # 0xc8348
addq $0x10, %rsp
popq %rbx
jmp 0x13800
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movslq 0x1c(%rdi), %r15
movq 0x10(%rdi), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x17fb1
movq (%r12,%r13,8), %r14
movq 0x88(%r14), %rdi
testq %rdi, %rdi
je 0x17fac
movq %rbx, %rsi
callq 0x13750
testl %eax, %eax
je 0x17fb4
incq %r13
jmp 0x17f8b
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
movslq 0x1c(%r14), %rax
cmpq %rax, %r12
jge 0x18000
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %r15
movq %r15, %rdi
callq 0x1683e
testl %eax, %eax
js 0x17ffb
movq %r15, %rdi
callq 0x1683e
cmpl %ebx, %eax
je 0x18003
incq %r12
jmp 0x17fd2
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movslq 0x2c(%rdi), %r15
movq 0x20(%rdi), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x1804c
movq (%r12,%r13,8), %r14
movq 0x60(%r14), %rdi
testq %rdi, %rdi
je 0x18047
movq %rbx, %rsi
callq 0x13750
testl %eax, %eax
je 0x1804f
incq %r13
jmp 0x18029
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
movslq 0x2c(%r14), %rax
cmpq %rax, %r12
jge 0x1809a
movq 0x20(%r14), %rax
movq (%rax,%r12,8), %r15
movq %r15, %rdi
callq 0x3b59e
testl %eax, %eax
js 0x18095
movq %r15, %rdi
callq 0x3b59e
cmpl %ebx, %eax
je 0x1809d
incq %r12
jmp 0x1806c
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movslq 0x2c(%rdi), %rcx
movq 0x20(%rdi), %rdx
xorl %edi, %edi
cmpq %rcx, %rdi
jge 0x180da
movq (%rdx,%rdi,8), %rax
movl 0x6c(%rax), %r8d
testl %r8d, %r8d
sets %r9b
cmpl %esi, %r8d
setne %r8b
incq %rdi
orb %r9b, %r8b
jne 0x180b6
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
movslq 0x5c(%rsi), %rdi
xorl %r8d, %r8d
cmpq %rdi, %r8
jge 0x1810f
movq 0x50(%rsi), %rax
movq (%rax,%r8,8), %rax
cmpq %rdx, 0x28(%rax)
jne 0x1810a
movsd 0x38(%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0x1810a
jp 0x1810a
cmpl %ecx, 0x40(%rax)
je 0x18111
incq %r8
jmp 0x180e5
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movslq 0x8c(%rdi), %r15
movq 0x80(%rdi), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x18155
movq (%r12,%r13,8), %r14
movq 0xb8(%r14), %rdi
testq %rdi, %rdi
je 0x18150
movq %rbx, %rsi
callq 0x13750
testl %eax, %eax
je 0x18158
incq %r13
jmp 0x1812f
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movslq 0x9c(%rdi), %r15
movq 0x90(%rdi), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x181a9
movq (%r12,%r13,8), %r14
movq 0x1c0(%r14), %rdi
testq %rdi, %rdi
je 0x181a4
movq %rbx, %rsi
callq 0x13750
testl %eax, %eax
je 0x181ac
incq %r13
jmp 0x18183
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movslq 0xac(%rdi), %r15
movq 0xa0(%rdi), %r12
xorl %r13d, %r13d
cmpq %r15, %r13
jge 0x18396
movq (%r12,%r13,8), %r14
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x18391
movq %rbx, %rsi
callq 0x13750
testl %eax, %eax
je 0x18399
incq %r13
jmp 0x18373
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1d0(%rdi), %rdi
callq 0x13600
testq %r14, %r14
je 0x183cb
movq %r14, %rdi
callq 0x9cc91
jmp 0x183cd
xorl %eax, %eax
movq %rax, 0x1d0(%rbx)
orb $0x1, 0x1e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::Transform(gaps::R3Affine const&, int)
void R3SurfelScene::
Transform(const R3Affine& transformation, RNBoolean update_surfels)
{
  // Check if should update surfels
  if (update_surfels) {
    // Compute total transformation
    R3Affine t = R3identity_affine;
    t.Transform(transformation);
    t.Transform(this->transformation);
    this->transformation = R3identity_affine;
    
    // Transform all nodes                                                                                                     
    R3SurfelTree *tree = Tree();
    for (int i = 0; i < tree->NNodes(); i++) {
      R3SurfelNode *node = tree->Node(i);
      node->Transform(t);
    }

    // Transform all scans                                                                                                
    for (int i = 0; i < NScans(); i++) {
      R3SurfelScan *scan = Scan(i);
      scan->Transform(t);
    }

    // Transform all image poses                                                                                               
    for (int i = 0; i < NImages(); i++) {
      R3SurfelImage *image = Image(i);
      image->Transform(t);
    }
  }
  else {
    // Update transformation only
    R3Affine t = R3identity_affine;
    t.Transform(transformation);
    t.Transform(this->transformation);
    this->transformation = t;
  }

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10d737(%rip), %rsi    # 0x125b50
leaq 0x8(%rsp), %r15
movq %r15, %rdi
testl %edx, %edx
je 0x184e4
callq 0x20a04
movq %r15, %rdi
movq %r14, %rsi
callq 0x669d6
leaq 0xb0(%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x669d6
leaq 0x10d6fc(%rip), %rsi    # 0x125b50
movq %r14, %rdi
callq 0x209c2
movq 0x8(%rbx), %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movslq 0x24(%r15), %rax
cmpq %rax, %r12
jge 0x18487
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x38(%rax)
incq %r12
jmp 0x18468
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movslq 0x8c(%rbx), %rax
cmpq %rax, %r15
jge 0x184b4
movq 0x80(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x70(%rax)
incq %r15
jmp 0x1848f
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movslq 0x9c(%rbx), %rax
cmpq %rax, %r15
jge 0x18515
movq 0x90(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0xe8(%rax)
incq %r15
jmp 0x184bc
callq 0x20a04
movq %r15, %rdi
movq %r14, %rsi
callq 0x669d6
leaq 0xb0(%rbx), %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x669d6
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x209c2
leaq 0x8(%rsp), %rdi
callq 0x6686a
orb $0x1, 0x1e8(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1853d
jmp 0x1853d
jmp 0x1853d
jmp 0x1853d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6686a
movq %rbx, %rdi
callq 0x138f0
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x10, %rdi
movl 0x1c(%rbx), %eax
movl %eax, 0x10(%rsi)
callq 0x1784c
movq %r15, 0x18(%r14)
testq %r15, %r15
je 0x1858b
addq $0x20, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1784c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1750a
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveObject(gaps::R3SurfelObject*)
void R3SurfelScene::
RemoveObject(R3SurfelObject *object)
{
  // Just checking
  assert(object);
  assert(object->scene == this);
  assert(object->scene_index >= 0);
  assert(objects.Kth(object->scene_index) == object);

  // Remove object propertys from scene
  while (object->NObjectProperties() > 0) {
    R3SurfelObjectProperty *property = object->ObjectProperty(object->NObjectProperties()-1);
    RemoveObjectProperty(property);
  }

  // Remove object relationships from scene
  while (object->NObjectRelationships() > 0) {
    R3SurfelObjectRelationship *relationship = object->ObjectRelationship(object->NObjectRelationships()-1);
    RemoveObjectRelationship(relationship);
  }

  // Remove label assignments
  while (object->NLabelAssignments() > 0) {
    R3SurfelLabelAssignment *assignment = object->LabelAssignment(object->NLabelAssignments()-1);
    RemoveLabelAssignment(assignment);
  }

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

  // Remove object from parent
  if (object->parent) {
    object->parent->parts.Remove(object);
    object->parent = NULL;
  }

  // Remove object from parts
  for (int i = 0; i < object->NParts(); i++) {
    R3SurfelObject *part = object->Part(i);
    part->parent = NULL;
  }

  // Remove parts from object
  object->parts.Empty();

  // Remove object from scene
  RNArrayEntry *entry = objects.KthEntry(object->scene_index);
  R3SurfelObject *tail = objects.Tail();
  tail->scene_index = object->scene_index;
  objects.EntryContents(entry) = tail;
  objects.RemoveTail();
  object->scene_index = -1;
  object->scene = NULL;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x3c(%r14), %rax
testq %rax, %rax
jle 0x1871f
movq 0x30(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x48(%rax)
jmp 0x186f0
movq 0x40(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x68(%rax)
movslq 0x4c(%r14), %rax
testq %rax, %rax
jg 0x1870d
jmp 0x1873f
movq 0x50(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
movslq 0x5c(%r14), %rax
testq %rax, %rax
jg 0x1872a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17570
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x1876d
addq $0x20, %rdi
movq %r14, %rsi
callq 0x1782a
andq $0x0, 0x18(%r14)
movslq 0x2c(%r14), %rax
leaq 0x20(%r14), %rdi
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x1878d
movq (%rdi), %rdx
movq (%rdx,%rcx,8), %rdx
andq $0x0, 0x18(%rdx)
incq %rcx
jmp 0x18777
xorl %esi, %esi
callq 0x9a9cc
leaq 0x10(%rbx), %rdi
movslq 0x10(%r14), %rax
movq 0x10(%rbx), %rcx
movslq 0x1c(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl %eax, 0x10(%rdx)
movq %rdx, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%r14)
andq $0x0, 0x8(%r14)
orb $0x1, 0x1e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x20, %rdi
movl 0x2c(%rbx), %eax
movl %eax, 0x10(%rsi)
callq 0x1784c
movq %r15, 0x18(%r14)
testq %r15, %r15
je 0x18807
addq $0x20, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1784c
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveLabel(gaps::R3SurfelLabel*)
void R3SurfelScene::
RemoveLabel(R3SurfelLabel *label)
{
  // Just checking
  assert(label);
  assert(label->scene == this);
  assert(label->scene_index >= 0);
  assert(labels.Kth(label->scene_index) == label);

  // Remove label properties from scene
  while (label->NLabelProperties() > 0) {
    R3SurfelLabelProperty *property = label->LabelProperty(label->NLabelProperties()-1);
    RemoveLabelProperty(property);
  }

  // Remove label relationships from scene
  while (label->NLabelRelationships() > 0) {
    R3SurfelLabelRelationship *relationship = label->LabelRelationship(label->NLabelRelationships()-1);
    RemoveLabelRelationship(relationship);
  }

  // Remove label assignments
  while (label->NLabelAssignments() > 0) {
    R3SurfelLabelAssignment *assignment = label->LabelAssignment(label->NLabelAssignments()-1);
    RemoveLabelAssignment(assignment);
  }

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

  // Remove label from parent
  if (label->parent) {
    label->parent->parts.Remove(label);
    label->parent = NULL;
  }

  // Remove label from parts
  for (int i = 0; i < label->NParts(); i++) {
    R3SurfelLabel *part = label->Part(i);
    part->parent = NULL;
  }

  // Remove parts from label
  label->parts.Empty();

  // Remove label from scene
  RNArrayEntry *entry = labels.KthEntry(label->scene_index);
  R3SurfelLabel *tail = labels.Tail();
  tail->scene_index = label->scene_index;
  labels.EntryContents(entry) = tail;
  labels.RemoveTail();
  label->scene_index = -1;
  label->scene = NULL;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x3c(%r14), %rax
testq %rax, %rax
jle 0x1884d
movq 0x30(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x58(%rax)
jmp 0x1881e
movq 0x40(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x78(%rax)
movslq 0x4c(%r14), %rax
testq %rax, %rax
jg 0x1883b
jmp 0x1886d
movq 0x50(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x88(%rax)
movslq 0x5c(%r14), %rax
testq %rax, %rax
jg 0x18858
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x18890
addq $0x20, %rdi
movq %r14, %rsi
callq 0x1782a
andq $0x0, 0x18(%r14)
movslq 0x2c(%r14), %rax
leaq 0x20(%r14), %rdi
xorl %ecx, %ecx
cmpq %rax, %rcx
jge 0x188b0
movq (%rdi), %rdx
movq (%rdx,%rcx,8), %rdx
andq $0x0, 0x18(%rdx)
incq %rcx
jmp 0x1889a
xorl %esi, %esi
callq 0x9a9cc
leaq 0x20(%rbx), %rdi
movslq 0x10(%r14), %rax
movq 0x20(%rbx), %rcx
movslq 0x2c(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl %eax, 0x10(%rdx)
movq %rdx, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%r14)
andq $0x0, 0x8(%r14)
orb $0x1, 0x1e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertObjectRelationship(gaps::R3SurfelObjectRelationship*)
void R3SurfelScene::
InsertObjectRelationship(R3SurfelObjectRelationship *relationship)
{
  // Just checking
  assert(relationship);
  assert(relationship->scene == NULL);
  assert(relationship->scene_index == -1);

  // Insert relationship into scene
  relationship->scene = this;
  relationship->scene_index = object_relationships.NEntries();
  object_relationships.Insert(relationship);

  // Update objects
  for (int i = 0; i < relationship->NObjects(); i++) {
    R3SurfelObject *object = relationship->Object(i);
    object->UpdateAfterInsertObjectRelationship(relationship);
  }

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x50, %rdi
movl 0x5c(%rbx), %eax
movl %eax, 0x10(%rsi)
callq 0x1784c
xorl %r15d, %r15d
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jge 0x18a41
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x175ea
incq %r15
jmp 0x18a23
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveObjectRelationship(gaps::R3SurfelObjectRelationship*)
void R3SurfelScene::
RemoveObjectRelationship(R3SurfelObjectRelationship *relationship)
{
  // Just checking
  assert(relationship);
  assert(relationship->scene == this);
  assert(relationship->scene_index >= 0);
  assert(object_relationships.Kth(relationship->scene_index) == relationship);

  // Update object relationship
  relationship->UpdateBeforeRemove(this);

  // Update objects
  for (int i = 0; i < relationship->NObjects(); i++) {
    R3SurfelObject *object = relationship->Object(i);
    object->UpdateBeforeRemoveObjectRelationship(relationship);
  }

  // Remove relationship from scene
  RNArrayEntry *entry = object_relationships.KthEntry(relationship->scene_index);
  R3SurfelObjectRelationship *tail = object_relationships.Tail();
  tail->scene_index = relationship->scene_index;
  object_relationships.EntryContents(entry) = tail;
  object_relationships.RemoveTail();
  relationship->scene_index = -1;
  relationship->scene = NULL;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jge 0x18a7a
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x175f4
incq %r15
jmp 0x18a5c
leaq 0x50(%rbx), %rdi
movslq 0x10(%r14), %rax
movq 0x50(%rbx), %rcx
movslq 0x5c(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl %eax, 0x10(%rdx)
movq %rdx, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%r14)
andq $0x0, 0x8(%r14)
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertLabelRelationship(gaps::R3SurfelLabelRelationship*)
void R3SurfelScene::
InsertLabelRelationship(R3SurfelLabelRelationship *relationship)
{
  // Just checking
  assert(relationship);
  assert(relationship->scene == this);
  assert(relationship->scene_index == -1);

  // Insert relationship into scene
  relationship->scene = this;
  relationship->scene_index = label_relationships.NEntries();
  label_relationships.Insert(relationship);

  // Update labels
  for (int i = 0; i < relationship->NLabels(); i++) {
    R3SurfelLabel *label = relationship->Label(i);
    label->UpdateAfterInsertLabelRelationship(relationship);
  }

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x60, %rdi
movl 0x6c(%rbx), %eax
movl %eax, 0x10(%rsi)
callq 0x1784c
xorl %r15d, %r15d
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jge 0x18af1
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x3b800
incq %r15
jmp 0x18ad3
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveLabelRelationship(gaps::R3SurfelLabelRelationship*)
void R3SurfelScene::
RemoveLabelRelationship(R3SurfelLabelRelationship *relationship)
{
  // Just checking
  assert(relationship);
  assert(relationship->scene == this);
  assert(relationship->scene_index >= 0);
  assert(label_relationships.Kth(relationship->scene_index) == relationship);

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

  // Update labels
  for (int i = 0; i < relationship->NLabels(); i++) {
    R3SurfelLabel *label = relationship->Label(i);
    label->UpdateBeforeRemoveLabelRelationship(relationship);
  }

  // Remove relationship from scene
  RNArrayEntry *entry = label_relationships.KthEntry(relationship->scene_index);
  R3SurfelLabelRelationship *tail = label_relationships.Tail();
  tail->scene_index = relationship->scene_index;
  label_relationships.EntryContents(entry) = tail;
  label_relationships.RemoveTail();
  relationship->scene_index = -1;
  relationship->scene = NULL;

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

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jge 0x18b2a
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x3b80a
incq %r15
jmp 0x18b0c
leaq 0x60(%rbx), %rdi
movslq 0x10(%r14), %rax
movq 0x60(%rbx), %rcx
movslq 0x6c(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl %eax, 0x10(%rdx)
movq %rdx, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%r14)
andq $0x0, 0x8(%r14)
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveScan(gaps::R3SurfelScan*)
void R3SurfelScene::
RemoveScan(R3SurfelScan *scan)
{
  // Just checking
  assert(scan);

  // Remove scan from scene
  RNArrayEntry *entry = scans.KthEntry(scan->scene_index);
  R3SurfelScan *tail = scans.Tail();
  tail->scene_index = scan->scene_index;
  scans.EntryContents(entry) = tail;
  scans.RemoveTail();
  scan->scene_index = -1;
  scan->scene = NULL;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x80, %rdi
movslq 0x10(%rsi), %rax
movq 0x80(%r14), %rcx
movslq 0x8c(%r14), %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl %eax, 0x10(%rdx)
movq %rdx, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%rbx)
andq $0x0, 0x8(%rbx)
orb $0x1, 0x1e8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveImage(gaps::R3SurfelImage*)
void R3SurfelScene::
RemoveImage(R3SurfelImage *image)
{
  // Just checking
  assert(image);

  // Remove image from scene
  RNArrayEntry *entry = images.KthEntry(image->scene_index);
  R3SurfelImage *tail = images.Tail();
  tail->scene_index = image->scene_index;
  images.EntryContents(entry) = tail;
  images.RemoveTail();
  image->scene_index = -1;
  image->scene = NULL;

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x90, %rdi
movslq 0x10(%rsi), %rax
movq 0x90(%r14), %rcx
movslq 0x9c(%r14), %rdx
movq -0x8(%rcx,%rdx,8), %rdx
movl %eax, 0x10(%rdx)
movq %rdx, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%rbx)
andq $0x0, 0x8(%rbx)
orb $0x1, 0x1e8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertFeature(gaps::R3SurfelFeature*)
void R3SurfelScene::
InsertFeature(R3SurfelFeature *feature)
{
  // Just checking
  assert(feature);

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

  // Update all object feature vectors
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    if (object->feature_vector.NValues() > 0) {
      object->feature_vector.Resize(NFeatures());
      feature->UpdateFeatureVector(object, object->feature_vector);
    }
  }

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0xa0, %rdi
movl 0xac(%rbx), %eax
movl %eax, 0x10(%rsi)
callq 0x1784c
xorl %r13d, %r13d
movslq 0x1c(%rbx), %rax
cmpq %rax, %r13
jge 0x18d56
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %r15
cmpl $0x0, 0x80(%r15)
jle 0x18d51
leaq 0x70(%r15), %r12
movl 0xac(%rbx), %esi
movq %r12, %rdi
callq 0x39bb4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x48(%rax)
incq %r13
jmp 0x18d15
orb $0x1, 0x1e8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveFeature(gaps::R3SurfelFeature*)
void R3SurfelScene::
RemoveFeature(R3SurfelFeature *feature)
{
  // Just checking
  assert(feature);
  assert(feature->scene == this);
  assert(feature->scene_index >= 0);
  assert(feature->scene_index < NFeatures());

  // Remove feature from scene
  RNArrayEntry *entry = features.KthEntry(feature->scene_index);
  R3SurfelFeature *tail = features.Tail();
  tail->scene_index = feature->scene_index;
  features.EntryContents(entry) = tail;
  features.RemoveTail();
  feature->scene_index = -1;
  feature->scene = NULL;

  // Update all object feature vectors
  if (feature != tail) {
    for (int i = 0; i < NObjects(); i++) {
      R3SurfelObject *object = Object(i);
      R3SurfelFeatureVector& vector = object->feature_vector;
      if (vector.NValues() == 0) continue;
      assert(vector.NValues() == NFeatures()+1);
      RNScalar tail_value = vector.Value(vector.NValues()-1);
      object->feature_vector.SetValue(tail->scene_index, tail_value);
      object->feature_vector.Resize(NFeatures());
    }
  }

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

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0xa0, %rdi
movslq 0x10(%rsi), %rax
movq 0xa0(%rbx), %rcx
movslq 0xac(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %r15
movl %eax, 0x10(%r15)
movq %r15, (%rcx,%rax,8)
callq 0x17820
orl $-0x1, 0x10(%r14)
andq $0x0, 0x8(%r14)
cmpq %r14, %r15
je 0x18dfd
xorl %r12d, %r12d
movslq 0x1c(%rbx), %rax
cmpq %rax, %r12
jge 0x18dfd
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %r14
movslq 0x80(%r14), %rax
testq %rax, %rax
je 0x18df8
movq 0x78(%r14), %rcx
addq $0x70, %r14
movsd -0x8(%rcx,%rax,8), %xmm0
movl 0x10(%r15), %esi
movq %r14, %rdi
callq 0x39c5e
movl 0xac(%rbx), %esi
movq %r14, %rdi
callq 0x39bb4
incq %r12
jmp 0x18db3
orb $0x1, 0x1e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::InsertComment(char const*)
void R3SurfelScene::
InsertComment(const char *comment)
{
  // Check if already have same comment
  for (int i = 0; i < comments.NEntries(); i++) {
    if (!strcmp(comment, comments[i])) return;
  }
  
  // Insert comment
  comments.Insert(strdup(comment));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1d8(%rdi), %r14
movl 0x1e4(%rdi), %r12d
movq 0x1d8(%rdi), %r13
xorl %ebp, %ebp
testl %r12d, %r12d
cmovlel %ebp, %r12d
cmpq %rbp, %r12
je 0x18e5a
movq (%r13,%rbp,8), %rsi
movq %r15, %rdi
callq 0x13750
incq %rbp
testl %eax, %eax
jne 0x18e3f
jmp 0x18e74
movq %r15, %rdi
callq 0x13950
movq %r14, %rdi
movq %rax, %rsi
callq 0x1784c
orb $0x1, 0x1e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::RemoveComment(char const*)
void R3SurfelScene::
RemoveComment(const char *comment)
{
  // Remove comment
  for (int i = 0; i < comments.NEntries(); i++) {
    if (!strcmp(comment, comments[i])) {
      free(comments[i]);
      comments.RemoveKth(i);
      break;
    }
  }

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x1d8(%rdi), %rax
movq %rax, (%rsp)
movl 0x1e4(%rdi), %ebp
movq 0x1d8(%rdi), %r14
xorl %r15d, %r15d
testl %ebp, %ebp
cmovlel %r15d, %ebp
cmpq %r15, %rbp
je 0x18ee7
movq (%r14,%r15,8), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x13750
testl %eax, %eax
je 0x18ed3
incq %r15
jmp 0x18eb6
movq %r13, %rdi
callq 0x13600
movq (%rsp), %rdi
movl %r15d, %esi
callq 0x9a9a6
orb $0x1, 0x1e8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::ReadBlocks()
void R3SurfelScene::
ReadBlocks(void)
{
  // Read blocks for entire tree
  if (!tree) return;
  if (!tree->RootNode()) return;
  tree->RootNode()->ReadBlocks(TRUE);
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x19b27
movq 0x18(%rax), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x19b27
pushq $0x1
popq %rsi
jmp 0x33de2
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::ReleaseBlocks()
void R3SurfelScene::
ReleaseBlocks(void)
{
  // Read blocks for entire tree
  if (!tree) return;
  if (!tree->RootNode()) return;
  tree->RootNode()->ReleaseBlocks(TRUE);
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x19b45
movq 0x18(%rax), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x19b45
pushq $0x1
popq %rsi
jmp 0x33e40
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::Draw(gaps::RNFlags) const
void R3SurfelScene::
Draw(RNFlags flags) const
{
  // Draw all objects
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    object->Draw(flags);
  } 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movslq 0x1c(%r14), %rax
cmpq %rax, %r15
jge 0x19f85
movq 0x10(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x48(%rax)
incq %r15
jmp 0x19f66
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelScene::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print scene header
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "%s", (name) ? name : "Scene");
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");

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

  // Print all objects
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    object->Print(fp, indented_prefix, suffix);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
jne 0x19fb8
movq 0x109fcb(%rip), %rax    # 0x123f80
movq (%rax), %r15
testq %r12, %r12
je 0x19fc8
movq %r12, %rdi
movq %r15, %rsi
callq 0x135d0
movq 0x1d0(%r14), %rax
testq %rax, %rax
leaq 0xae440(%rip), %rdi     # 0xc8419
cmovneq %rax, %rdi
movq %r15, %rsi
callq 0x135d0
testq %rbx, %rbx
je 0x19ff5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x135d0
pushq $0xa
popq %rdi
movq %r15, %rsi
callq 0x13690
leaq 0xae418(%rip), %rsi     # 0xc841f
xorl %ebp, %ebp
movq %rsp, %r13
movq %r13, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x130e0
movslq 0x1c(%r14), %rax
cmpq %rax, %rbp
jge 0x1a03e
movq 0x10(%r14), %rax
movq (%rax,%rbp,8), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq *0x58(%rax)
incq %rbp
jmp 0x1a019
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq