// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelScene.cpp
// Function: gaps::R3SurfelScene::~R3SurfelScene()
R3SurfelScene::
~R3SurfelScene(void)
{
  // Delete everything
  while (NFeatures() > 0) delete Feature(NFeatures()-1);
  while (NLabelAssignments() > 0) delete LabelAssignment(NLabelAssignments()-1);
  while (NObjectRelationships() > 0) delete ObjectRelationship(NObjectRelationships()-1);
  while (NLabelRelationships() > 0) delete LabelRelationship(NLabelRelationships()-1);
  while (NObjectProperties() > 0) delete ObjectProperty(NObjectProperties()-1);
  while (NLabelProperties() > 0) delete LabelProperty(NLabelProperties()-1);
  while (NLabels() > 0) delete Label(NLabels()-1);
  while (NObjects() > 0) delete Object(NObjects()-1);
  while (NScans() > 0) delete Scan(NScans()-1);
  while (NImages() > 0) delete Image(NImages()-1);
  
  // Delete tree
  if (tree) delete tree;
  
  // Delete filename
  if (filename) free(filename);

  // Delete rwaccess
  if (rwaccess) free(rwaccess);

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

  // Delete comments
  for (int i = 0; i < comments.NEntries(); i++) free(comments[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x1070da(%rip), %rax    # 0x11edc0
movq %rax, (%rdi)
leaq 0xa0(%rdi), %rbx
movslq 0xac(%r14), %rax
testq %rax, %rax
jle 0x17d11
movq (%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17cf0
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17cf0
leaq 0x70(%r14), %r15
movslq 0x7c(%r14), %rax
testq %rax, %rax
jle 0x17d33
movq (%r15), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17d15
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17d15
leaq 0x50(%r14), %r12
movslq 0x5c(%r14), %rax
testq %rax, %rax
jle 0x17d56
movq (%r12), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17d37
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17d37
leaq 0x60(%r14), %r13
movslq 0x6c(%r14), %rax
testq %rax, %rax
jle 0x17d79
movq (%r13), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17d5a
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17d5a
leaq 0x30(%r14), %rbp
movslq 0x3c(%r14), %rax
testq %rax, %rax
jle 0x17d9c
movq (%rbp), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17d7d
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17d7d
leaq 0x40(%r14), %rax
movq %rax, 0x8(%rsp)
movslq 0x4c(%r14), %rax
testq %rax, %rax
jle 0x17dc8
movq 0x8(%rsp), %rcx
movq (%rcx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17da5
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17da5
leaq 0x20(%r14), %rax
movq %rax, (%rsp)
movslq 0x2c(%r14), %rax
testq %rax, %rax
jle 0x17df2
movq (%rsp), %rcx
movq (%rcx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17dd0
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17dd0
movq %r12, 0x20(%rsp)
leaq 0x10(%r14), %r12
movslq 0x1c(%r14), %rax
testq %rax, %rax
jle 0x17e1a
movq (%r12), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17dfb
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17dfb
movq %r13, 0x18(%rsp)
leaq 0x80(%r14), %r13
movslq 0x8c(%r14), %rax
testq %rax, %rax
jle 0x17e48
movq (%r13), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17e26
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17e26
movq %rbp, 0x10(%rsp)
leaq 0x90(%r14), %rbp
movslq 0x9c(%r14), %rax
testq %rax, %rax
jle 0x17e76
movq (%rbp), %rcx
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x17e54
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x17e54
movq %r15, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x17e8f
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x1c0(%r14), %rdi
callq 0x13600
movq 0x1c8(%r14), %rdi
callq 0x13600
movq 0x1d0(%r14), %rdi
callq 0x13600
leaq 0x1d8(%r14), %rbx
xorl %r15d, %r15d
movslq 0x1e4(%r14), %rax
cmpq %rax, %r15
jge 0x17eda
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x13600
incq %r15
jmp 0x17ebd
movq %rbx, %rdi
callq 0x9a81c
addq $0xb0, %r14
movq %r14, %rdi
callq 0x6686a
movq 0x30(%rsp), %rdi
callq 0x9a81c
movq %rbp, %rdi
callq 0x9a81c
movq %r13, %rdi
callq 0x9a81c
movq 0x28(%rsp), %rdi
callq 0x9a81c
movq 0x18(%rsp), %rdi
callq 0x9a81c
movq 0x20(%rsp), %rdi
callq 0x9a81c
movq 0x8(%rsp), %rdi
callq 0x9a81c
movq 0x10(%rsp), %rdi
callq 0x9a81c
movq (%rsp), %rdi
callq 0x9a81c
movq %r12, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9a81c