// File: 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:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0x1d10ca(%rip), %rcx    # 0x1eddb0
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0xc0(%rsp), %rdi
callq 0x16c80
movl %eax, 0xbc(%rsp)
jmp 0x1cd03
movl 0xbc(%rsp), %eax
cmpl $0x0, %eax
jle 0x1cd63
movq 0xc0(%rsp), %rdi
callq 0x16c80
movl %eax, 0xb8(%rsp)
jmp 0x1cd25
movq 0xc0(%rsp), %rdi
movl 0xb8(%rsp), %esi
decl %esi
callq 0x1c120
movq %rax, 0xb0(%rsp)
jmp 0x1cd45
movq 0xb0(%rsp), %rax
cmpq $0x0, %rax
je 0x1cd61
movq 0xb0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cced
jmp 0x1cd65
movq 0xc0(%rsp), %rdi
callq 0x16c60
movl %eax, 0xac(%rsp)
jmp 0x1cd7b
movl 0xac(%rsp), %eax
cmpl $0x0, %eax
jle 0x1cddb
movq 0xc0(%rsp), %rdi
callq 0x16c60
movl %eax, 0xa8(%rsp)
jmp 0x1cd9d
movq 0xc0(%rsp), %rdi
movl 0xa8(%rsp), %esi
decl %esi
callq 0x30630
movq %rax, 0xa0(%rsp)
jmp 0x1cdbd
movq 0xa0(%rsp), %rax
cmpq $0x0, %rax
je 0x1cdd9
movq 0xa0(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cd65
jmp 0x1cddd
movq 0xc0(%rsp), %rdi
callq 0x30660
movl %eax, 0x9c(%rsp)
jmp 0x1cdf3
movl 0x9c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1ce53
movq 0xc0(%rsp), %rdi
callq 0x30660
movl %eax, 0x98(%rsp)
jmp 0x1ce15
movq 0xc0(%rsp), %rdi
movl 0x98(%rsp), %esi
decl %esi
callq 0x30680
movq %rax, 0x90(%rsp)
jmp 0x1ce35
movq 0x90(%rsp), %rax
cmpq $0x0, %rax
je 0x1ce51
movq 0x90(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cddd
jmp 0x1ce55
movq 0xc0(%rsp), %rdi
callq 0x306b0
movl %eax, 0x8c(%rsp)
jmp 0x1ce6b
movl 0x8c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1cecb
movq 0xc0(%rsp), %rdi
callq 0x306b0
movl %eax, 0x88(%rsp)
jmp 0x1ce8d
movq 0xc0(%rsp), %rdi
movl 0x88(%rsp), %esi
decl %esi
callq 0x306d0
movq %rax, 0x80(%rsp)
jmp 0x1cead
movq 0x80(%rsp), %rax
cmpq $0x0, %rax
je 0x1cec9
movq 0x80(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1ce55
jmp 0x1cecd
movq 0xc0(%rsp), %rdi
callq 0x30700
movl %eax, 0x7c(%rsp)
jmp 0x1cee0
movl 0x7c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1cf2e
movq 0xc0(%rsp), %rdi
callq 0x30700
movl %eax, 0x78(%rsp)
jmp 0x1cefc
movq 0xc0(%rsp), %rdi
movl 0x78(%rsp), %esi
decl %esi
callq 0x30720
movq %rax, 0x70(%rsp)
jmp 0x1cf16
movq 0x70(%rsp), %rax
cmpq $0x0, %rax
je 0x1cf2c
movq 0x70(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cecd
jmp 0x1cf30
movq 0xc0(%rsp), %rdi
callq 0x30750
movl %eax, 0x6c(%rsp)
jmp 0x1cf43
movl 0x6c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1cf91
movq 0xc0(%rsp), %rdi
callq 0x30750
movl %eax, 0x68(%rsp)
jmp 0x1cf5f
movq 0xc0(%rsp), %rdi
movl 0x68(%rsp), %esi
decl %esi
callq 0x30770
movq %rax, 0x60(%rsp)
jmp 0x1cf79
movq 0x60(%rsp), %rax
cmpq $0x0, %rax
je 0x1cf8f
movq 0x60(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cf30
jmp 0x1cf93
movq 0xc0(%rsp), %rdi
callq 0x16c40
movl %eax, 0x5c(%rsp)
jmp 0x1cfa6
movl 0x5c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1cff4
movq 0xc0(%rsp), %rdi
callq 0x16c40
movl %eax, 0x58(%rsp)
jmp 0x1cfc2
movq 0xc0(%rsp), %rdi
movl 0x58(%rsp), %esi
decl %esi
callq 0x307a0
movq %rax, 0x50(%rsp)
jmp 0x1cfdc
movq 0x50(%rsp), %rax
cmpq $0x0, %rax
je 0x1cff2
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cf93
jmp 0x1cff6
movq 0xc0(%rsp), %rdi
callq 0x16c20
movl %eax, 0x4c(%rsp)
jmp 0x1d009
movl 0x4c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1d057
movq 0xc0(%rsp), %rdi
callq 0x16c20
movl %eax, 0x48(%rsp)
jmp 0x1d025
movq 0xc0(%rsp), %rdi
movl 0x48(%rsp), %esi
decl %esi
callq 0x185f0
movq %rax, 0x40(%rsp)
jmp 0x1d03f
movq 0x40(%rsp), %rax
cmpq $0x0, %rax
je 0x1d055
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1cff6
jmp 0x1d059
movq 0xc0(%rsp), %rdi
callq 0x16ca0
movl %eax, 0x3c(%rsp)
jmp 0x1d06c
movl 0x3c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1d0ba
movq 0xc0(%rsp), %rdi
callq 0x16ca0
movl %eax, 0x38(%rsp)
jmp 0x1d088
movq 0xc0(%rsp), %rdi
movl 0x38(%rsp), %esi
decl %esi
callq 0x307d0
movq %rax, 0x30(%rsp)
jmp 0x1d0a2
movq 0x30(%rsp), %rax
cmpq $0x0, %rax
je 0x1d0b8
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1d059
jmp 0x1d0bc
movq 0xc0(%rsp), %rdi
callq 0x16cc0
movl %eax, 0x2c(%rsp)
jmp 0x1d0cf
movl 0x2c(%rsp), %eax
cmpl $0x0, %eax
jle 0x1d11d
movq 0xc0(%rsp), %rdi
callq 0x16cc0
movl %eax, 0x28(%rsp)
jmp 0x1d0eb
movq 0xc0(%rsp), %rdi
movl 0x28(%rsp), %esi
decl %esi
callq 0x30800
movq %rax, 0x20(%rsp)
jmp 0x1d105
movq 0x20(%rsp), %rax
cmpq $0x0, %rax
je 0x1d11b
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1d0bc
movq 0xc0(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1d150
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x1d14e
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1d150
movq 0xc0(%rsp), %rax
cmpq $0x0, 0x1c0(%rax)
je 0x1d176
movq 0xc0(%rsp), %rax
movq 0x1c0(%rax), %rdi
callq 0x136a0
movq 0xc0(%rsp), %rax
cmpq $0x0, 0x1c8(%rax)
je 0x1d19c
movq 0xc0(%rsp), %rax
movq 0x1c8(%rax), %rdi
callq 0x136a0
movq 0xc0(%rsp), %rax
cmpq $0x0, 0x1d0(%rax)
je 0x1d1c2
movq 0xc0(%rsp), %rax
movq 0x1d0(%rax), %rdi
callq 0x136a0
movl $0x0, 0xcc(%rsp)
movq 0xc0(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, 0x10(%rsp)
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x16d50
movl %eax, 0x14(%rsp)
jmp 0x1d1f2
movl 0x10(%rsp), %eax
movl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1d240
movq 0xc0(%rsp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
movl 0xcc(%rsp), %esi
callq 0x30830
movq %rax, 0x8(%rsp)
jmp 0x1d220
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x136a0
movl 0xcc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xcc(%rsp)
jmp 0x1d1cd
movq 0xc0(%rsp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
callq 0x305c0
movq 0xc0(%rsp), %rdi
addq $0xb0, %rdi
callq 0xd4520
movq 0xc0(%rsp), %rdi
addq $0xa0, %rdi
callq 0x305d0
movq 0xc0(%rsp), %rdi
addq $0x90, %rdi
callq 0x305e0
movq 0xc0(%rsp), %rdi
addq $0x80, %rdi
callq 0x305f0
movq 0xc0(%rsp), %rdi
addq $0x70, %rdi
callq 0x1b9b0
movq 0xc0(%rsp), %rdi
addq $0x60, %rdi
callq 0x30600
movq 0xc0(%rsp), %rdi
addq $0x50, %rdi
callq 0x1b9c0
movq 0xc0(%rsp), %rdi
addq $0x40, %rdi
callq 0x30610
movq 0xc0(%rsp), %rdi
addq $0x30, %rdi
callq 0x1b9d0
movq 0xc0(%rsp), %rdi
addq $0x20, %rdi
callq 0x30620
movq 0xc0(%rsp), %rdi
addq $0x10, %rdi
callq 0x1b9e0
addq $0xd8, %rsp
retq
movq %rax, %rdi
callq 0x187d0
nopl (%rax,%rax)