LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelObjectSet::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print objects
  // Print all surfel objects
  if (prefix) fprintf(fp, "%s", prefix);
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    fprintf(fp, "%d ", object->SceneIndex());
  }
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rsi, %rsi
jne 0x3f269
movq 0xf4d0a(%rip), %rax     # 0x133f70
movq (%rax), %rbx
testq %rdx, %rdx
je 0x3f279
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x135b0
cmpl $0x0, 0x14(%r15)
jle 0x3f2ae
leaq 0x9f61c(%rip), %r12     # 0xde8a3
xorl %r13d, %r13d
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rax
movl 0x10(%rax), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x13740
incq %r13
movslq 0x14(%r15), %rax
cmpq %rax, %r13
jl 0x3f28a
testq %r14, %r14
je 0x3f2be
movq %r14, %rdi
movq %rbx, %rsi
callq 0x135b0
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x13670
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectProperty.cpp
// Function: gaps::R3SurfelObjectProperty::R3SurfelObjectProperty(int, gaps::R3SurfelObject*, double*, int)
R3SurfelObjectProperty::
R3SurfelObjectProperty(int type, R3SurfelObject *object, RNScalar *operands, int noperands)
  : scene(NULL),
    scene_index(-1),
    object(object),
    operands(NULL),
    noperands(0),
    type(type)
{
  // Check if operands were provided
  if ((noperands > 0) && (operands)) {
    // Copy operands
    this->noperands = noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = operands[i];
    }
  }
  else {
    // Compute operands
    UpdateOperands();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
leaq 0xf0bc2(%rip), %rax     # 0x12fea8
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
movq %rdx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movl $0x0, 0x28(%rdi)
movl %esi, 0x2c(%rdi)
testl %r8d, %r8d
setle %al
testq %rcx, %rcx
sete %cl
orb %al, %cl
jne 0x3f342
movl %r8d, 0x28(%r14)
movl %r8d, %r15d
shlq $0x3, %r15
movq %r15, %rdi
callq 0x13030
movq %rax, 0x20(%r14)
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x133f0
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3f350
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectProperty.cpp
// Function: gaps::R3SurfelObjectProperty::R3SurfelObjectProperty(gaps::R3SurfelObjectProperty const&)
R3SurfelObjectProperty::
R3SurfelObjectProperty(const R3SurfelObjectProperty& property)
  : scene(NULL),
    scene_index(-1),
    object(property.object),
    operands(NULL),
    noperands(0),
    type(property.type)
{
  // Initialize operands
  if ((property.noperands > 0) && (property.operands)) {
    this->noperands = property.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = property.operands[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xf06ae(%rip), %rax     # 0x12fea8
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movl $0x0, 0x28(%rdi)
movl 0x2c(%rsi), %eax
movl %eax, 0x2c(%rdi)
movslq 0x28(%rsi), %r15
testq %r15, %r15
jle 0x3f866
movq %rsi, %rbx
cmpq $0x0, 0x20(%rsi)
je 0x3f866
movq %rdi, %r14
movl %r15d, 0x28(%rdi)
leaq (,%r15,8), %rdi
callq 0x13030
movq %rax, 0x20(%r14)
movq 0x20(%rbx), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x3f854
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectProperty.cpp
// Function: gaps::R3SurfelObjectProperty::operator=(gaps::R3SurfelObjectProperty const&)
R3SurfelObjectProperty& R3SurfelObjectProperty::
operator=(const R3SurfelObjectProperty& property)
{
  // Assign stuff
  this->object = property.object;
  this->type = property.type;
  
  // Delete previous operands
  if (this->operands) {
    delete [] this->operands;
    this->operands = NULL;
    this->noperands = 0;
  }

  // Copy operands
  if ((property.noperands > 0) && (property.operands)) {
    this->noperands = property.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = property.operands[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movl 0x2c(%rsi), %eax
movl %eax, 0x2c(%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x3f8f4
callq 0x13680
movq $0x0, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movslq 0x28(%r14), %r15
testq %r15, %r15
jle 0x3f931
cmpq $0x0, 0x20(%r14)
je 0x3f931
movl %r15d, 0x28(%rbx)
leaq (,%r15,8), %rdi
callq 0x13030
movq %rax, 0x20(%rbx)
movq 0x20(%r14), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x3f91f
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectProperty.cpp
// Function: gaps::R3SurfelObjectProperty::ResetOperands(double*, int)
void R3SurfelObjectProperty::
ResetOperands(RNScalar *operands, int noperands)
{
  // Delete previous operands
  if (this->operands) delete [] this->operands;
  this->operands = NULL;
  this->noperands = 0;
  
  // Check if operands were provided
  if ((noperands > 0) && (operands)) {
    // Copy operands
    this->noperands = noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = operands[i];
    }
    
    // Mark scene as dirty
    if (scene) scene->SetDirty();
  }
  else {
    // Compute operands
    UpdateOperands();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x3f957
callq 0x13680
movq $0x0, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
testl %ebp, %ebp
setle %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x3f9b4
movl %ebp, 0x28(%rbx)
movl %ebp, %r15d
shlq $0x3, %r15
movq %r15, %rdi
callq 0x13030
movq %rax, 0x20(%rbx)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x133f0
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x3f9a9
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3f350
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/../../pkgs/R3Shapes/R3Triad.h
// Function: gaps::R3Triad::operator=(gaps::R3Triad const&)
inline R3Triad& R3Triad::
operator=(const R3Triad& triad)
{
    axis[0] = triad.axis[0];
    axis[1] = triad.axis[1];
    axis[2] = triad.axis[2];
    return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x85fc2
leaq 0x18(%rbx), %rsi
leaq 0x18(%r14), %rdi
callq 0x85fc2
addq $0x30, %rbx
leaq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x85fc2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectRelationship.cpp
// Function: gaps::R3SurfelObjectRelationship::R3SurfelObjectRelationship(int, gaps::RNArray<gaps::R3SurfelObject*> const&, double*, int)
R3SurfelObjectRelationship::
R3SurfelObjectRelationship(int type, const RNArray<R3SurfelObject *>& objects, RNScalar *operands, int noperands)
  : scene(NULL),
    scene_index(-1),
    objects(objects),
    operands(NULL),
    noperands(0),
    type(type)
{
  // Check if operands were provided
  if ((noperands > 0) && (operands)) {
    // Copy operands
    this->noperands = noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = operands[i];
    }
  }
  else {
    // Compute operands
    UpdateOperands();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movl %esi, %r12d
movq %rdi, %r14
leaq 0xefd4e(%rip), %rax     # 0x12fee0
movq %rax, (%rdi)
xorl %r13d, %r13d
movq %r13, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
leaq 0x18(%rdi), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0xaaf3c
movq %r13, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl %r12d, 0x34(%r14)
testl %ebp, %ebp
setle %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x40209
movl %ebp, 0x30(%r14)
movl %ebp, %r12d
leaq (,%r12,8), %rdi
callq 0x13030
movq %rax, 0x28(%r14)
shlq $0x3, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x133f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xaaf9e
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectRelationship.cpp
// Function: gaps::R3SurfelObjectRelationship::R3SurfelObjectRelationship(int, gaps::R3SurfelObject*, gaps::R3SurfelObject*, double*, int)
R3SurfelObjectRelationship::
R3SurfelObjectRelationship(int type, R3SurfelObject *object0, R3SurfelObject *object1, RNScalar *operands, int noperands)
  : scene(NULL),
    scene_index(-1),
    objects(),
    operands(NULL),
    noperands(0),
    type(type)
{
  // Insert objects
  objects.Insert(object0);
  objects.Insert(object1);

  // Check if operands were provided
  if ((noperands > 0) && (operands)) {
    // Copy operands
    this->noperands = noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = operands[i];
    }
  }
  else {
    // Compute operands
    UpdateOperands();
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %rbp
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movl %esi, %ebx
movq %rdi, %r14
leaq 0xefc88(%rip), %rax     # 0x12fee0
movq %rax, (%rdi)
xorl %r12d, %r12d
movq %r12, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0xaaf34
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl %ebx, 0x34(%r14)
movl 0x24(%r14), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0xaafca
movl 0x24(%r14), %edx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0xaafca
movl 0xc(%rsp), %edx
testl %edx, %edx
setle %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
jne 0x402f0
movl %edx, 0x30(%r14)
movl %edx, %r12d
leaq (,%r12,8), %rdi
callq 0x13030
movq %rax, 0x28(%r14)
shlq $0x3, %r12
movq %rax, %rdi
movq %rbp, %rsi
movq %r12, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x133f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xaaf9e
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectRelationship.cpp
// Function: gaps::R3SurfelObjectRelationship::R3SurfelObjectRelationship(gaps::R3SurfelObjectRelationship const&)
R3SurfelObjectRelationship::
R3SurfelObjectRelationship(const R3SurfelObjectRelationship& relationship)
  : scene(NULL),
    scene_index(-1),
    objects(relationship.objects),
    operands(NULL),
    noperands(0),
    type(relationship.type)
{
  // Copy operands
  if ((relationship.noperands > 0) && (relationship.operands)) {
    this->noperands = relationship.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = relationship.operands[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xefbb9(%rip), %rax     # 0x12fee0
movq %rax, (%rdi)
xorl %r12d, %r12d
movq %r12, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
leaq 0x18(%rdi), %r15
addq $0x18, %rsi
movq %r15, %rdi
callq 0xaaf3c
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl 0x34(%rbx), %eax
movl %eax, 0x34(%r14)
movslq 0x30(%rbx), %r12
testq %r12, %r12
jle 0x40398
cmpq $0x0, 0x28(%rbx)
je 0x40398
movl %r12d, 0x30(%r14)
leaq (,%r12,8), %rdi
callq 0x13030
movq %rax, 0x28(%r14)
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r12
jne 0x40386
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xaaf9e
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectRelationship.cpp
// Function: gaps::R3SurfelObjectRelationship::operator=(gaps::R3SurfelObjectRelationship const&)
R3SurfelObjectRelationship& R3SurfelObjectRelationship::
operator=(const R3SurfelObjectRelationship& relationship)
{
  // Copy stuff
  this->objects = relationship.objects;
  this->type = relationship.type;

  // Delete previous operands
  if (this->operands) {
    delete [] this->operands;
    this->operands = NULL;
    this->noperands =0;
  }
  
  // Copy operands
  if ((relationship.noperands > 0) && (relationship.operands)) {
    this->noperands = relationship.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = relationship.operands[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18, %rsi
addq $0x18, %rdi
callq 0xaaf48
movl 0x34(%r14), %eax
movl %eax, 0x34(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x40450
callq 0x13680
movq $0x0, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
movslq 0x30(%r14), %r15
testq %r15, %r15
jle 0x4048d
cmpq $0x0, 0x28(%r14)
je 0x4048d
movl %r15d, 0x30(%rbx)
leaq (,%r15,8), %rdi
callq 0x13030
movq %rax, 0x28(%rbx)
movq 0x28(%r14), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x4047b
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectRelationship.cpp
// Function: gaps::R3SurfelObjectRelationship::Draw(gaps::RNFlags) const
void R3SurfelObjectRelationship::
Draw(RNFlags flags) const
{
  // Draw property based on type
  switch (type) {
  case R3_SURFEL_OBJECT_OVERLAP_RELATIONSHIP: 
    // Draw line between objects
    if (objects.NEntries() == 2) {
      if (flags[R3_SURFEL_COLOR_DRAW_FLAG]) RNLoadRgb(0, 1, 0);
      RNGrfxBegin(RN_GRFX_LINES);
      R3LoadPoint(objects[0]->Centroid());
      R3LoadPoint(objects[1]->Centroid());
      RNGrfxEnd();
      break;
    }
  }
}

// Assembly:
cmpl $0x2, 0x34(%rdi)
jne 0x40526
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpl $0x2, 0x24(%rdi)
jne 0x4051f
testb $0x1, %sil
je 0x404c9
movss 0x9f356(%rip), %xmm1    # 0xdf814
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
callq 0x139e0
movl $0x1, %edi
callq 0x13130
movq 0x18(%rbx), %rax
movq (%rax), %rdi
callq 0x170be
movq (%rax), %rcx
movq %rsp, %r14
movq %r14, %rdi
movq %rax, %rsi
callq *0x68(%rcx)
movq %r14, %rdi
callq 0x13150
movq 0x18(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x170be
movq (%rax), %rcx
movq %rsp, %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq *0x68(%rcx)
movq %rbx, %rdi
callq 0x13150
callq 0x136a0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::~R3SurfelLabel()
R3SurfelLabel::
~R3SurfelLabel(void)
{
  // Delete label properties
  while (NLabelProperties() > 0) {
    R3SurfelLabelProperty *property = LabelProperty(NLabelProperties()-1);
    delete property;
  }

  // Delete label relationships
  while (NLabelRelationships() > 0) {
    R3SurfelLabelRelationship *relationship = LabelRelationship(NLabelRelationships()-1);
    delete relationship;
  }

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

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

  // Remove from parent
  SetParent(NULL);

  // Remove label from scene (handles all removals)
  if (scene) scene->RemoveLabel(this);

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xef80b(%rip), %rax     # 0x12ff18
movq %rax, (%rdi)
movl 0x3c(%rdi), %eax
testl %eax, %eax
jle 0x40748
movq 0x30(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x4072d
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x3c(%rbx), %eax
jmp 0x40713
movq 0x40(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x40748
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x4c(%rbx), %eax
testl %eax, %eax
jg 0x40732
jmp 0x40767
movq 0x50(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x40767
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x5c(%rbx), %eax
testl %eax, %eax
jg 0x40751
jmp 0x40786
movq 0x20(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x40786
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x2c(%rbx), %eax
testl %eax, %eax
jg 0x40770
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x10(%rax)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x407aa
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x38(%rax)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x407b8
callq 0x135e0
leaq 0x50(%rbx), %rdi
callq 0xaaf9e
leaq 0x40(%rbx), %rdi
callq 0xaaf9e
leaq 0x30(%rbx), %rdi
callq 0xaaf9e
addq $0x20, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0xaaf9e
movq %rax, %rdi
callq 0x1848f
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::FindLabelProperty(int) const
R3SurfelLabelProperty *R3SurfelLabel::
FindLabelProperty(int type) const
{
  // Search for property of type
  for (int i = 0; i < NLabelProperties(); i++) {
    R3SurfelLabelProperty *property = LabelProperty(i);
    if (property->Type() == type) return property;
  }

  // Property not found
  return NULL;
}

// Assembly:
movslq 0x3c(%rdi), %rcx
testq %rcx, %rcx
jle 0x40825
movq 0x30(%rdi), %rdx
xorl %edi, %edi
movq (%rdx,%rdi,8), %r8
cmpl %esi, 0x2c(%r8)
cmoveq %r8, %rax
je 0x40827
incq %rdi
cmpq %rdi, %rcx
jne 0x4080f
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::InsertIntoPointSet(gaps::R3SurfelPointSet*, int) const
void R3SurfelLabel::
InsertIntoPointSet(R3SurfelPointSet *pointset, RNBoolean leaf_level) const
{
  // Check scene
  if (!Scene()) return;

  // Insert points
  if (leaf_level && (NParts() > 0)) {
    // Insert points from leaf level of all parts of label
    for (int i = 0; i < NParts(); i++) {
      R3SurfelLabel *part = Part(i);
      part->InsertIntoPointSet(pointset, leaf_level);     
    }
  }
  else {
    // Insert points from all objects
    for (int i = 0; i < NLabelAssignments(); i++) {
      R3SurfelLabelAssignment *assignment = LabelAssignment(i);
      R3SurfelObject *object = assignment->Object();
      if (!object) continue;
      if (object->Parent() != scene->RootObject()) continue;
      object->InsertIntoPointSet(pointset, leaf_level);
    }
  }
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x40942
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0x408f2
cmpl $0x0, 0x2c(%r15)
jle 0x408f2
cmpl $0x0, 0x2c(%r15)
jle 0x40937
xorl %r12d, %r12d
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x408a2
incq %r12
movslq 0x2c(%r15), %rax
cmpq %rax, %r12
jl 0x408d2
jmp 0x40937
cmpl $0x0, 0x5c(%r15)
jle 0x40937
xorl %r12d, %r12d
movq 0x50(%r15), %rax
movq (%rax,%r12,8), %rax
movq 0x18(%rax), %rdi
testq %rdi, %rdi
je 0x4092b
movq 0x18(%rdi), %rax
movq 0x8(%r15), %rcx
movq 0x10(%rcx), %rcx
cmpq (%rcx), %rax
jne 0x4092b
xorps %xmm0, %xmm0
movq %r14, %rsi
movl %ebx, %edx
callq 0x17546
incq %r12
movslq 0x5c(%r15), %rax
cmpq %rax, %r12
jl 0x408fc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::operator=(gaps::R3SurfelLabel const&)
R3SurfelLabel& R3SurfelLabel::
operator=(const R3SurfelLabel& label)
{
  // Copy properties
  this->name = (label.name) ? RNStrdup(label.name) : NULL;
  this->identifier = label.identifier;
  this->assignment_keystroke = label.assignment_keystroke;
  this->color = label.color;
  this->flags = label.flags;

  // Return this
  return *this;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rsi), %rdi
testq %rdi, %rdi
je 0x4095e
callq 0xadc0f
jmp 0x40960
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq 0x68(%r14), %rax
movq %rax, 0x68(%rbx)
leaq 0x70(%r14), %rsi
leaq 0x70(%rbx), %rdi
callq 0xaae3a
movq 0x88(%r14), %rax
movq %rax, 0x88(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::SetParent(gaps::R3SurfelLabel*)
void R3SurfelLabel::
SetParent(R3SurfelLabel *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;

  // 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 0x409fa
movq %rsi, %r14
movq %rdi, %rbx
testq %r12, %r12
je 0x409d1
leaq 0x20(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xaafac
subq 0x20(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0xab13e
testq %r14, %r14
je 0x409e6
leaq 0x20(%r14), %rdi
movl 0x2c(%r14), %edx
movq %rbx, %rsi
callq 0xaafca
movq %r14, 0x18(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x409fa
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::SetName(char const*)
void R3SurfelLabel::
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
  if (scene) scene->SetDirty();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
testq %rdi, %rdi
je 0x40a1e
callq 0x135e0
testq %r14, %r14
je 0x40a2d
movq %r14, %rdi
callq 0xadc0f
jmp 0x40a2f
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x40a43
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::UpdateBeforeRemoveLabelAssignment(gaps::R3SurfelLabelAssignment*)
void R3SurfelLabel::
UpdateBeforeRemoveLabelAssignment(R3SurfelLabelAssignment *assignment)
{
  // Just checking
  assert(assignment->Scene());
  assert(assignment->Scene() == scene);
  assert(assignment->Label() == this);

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

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x50(%rdi), %rax
movslq 0x30(%rsi), %rcx
movq 0x50(%rdi), %rdx
movslq 0x5c(%rdi), %rsi
movq -0x8(%rdx,%rsi,8), %rdi
movl %ecx, 0x30(%rdi)
movq %rdi, (%rdx,%rcx,8)
decl %esi
movq %rax, %rdi
callq 0xab13e
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelLabel::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print label
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "%d %s", scene_index, (name) ? name : "-");
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rsi, %rsi
jne 0x40b7f
movq 0xf33f4(%rip), %rax     # 0x133f70
movq (%rax), %rbx
testq %rdx, %rdx
je 0x40b8f
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x135b0
movl 0x10(%r15), %edx
movq 0x60(%r15), %rax
testq %rax, %rax
leaq 0x9d7a5(%rip), %rcx     # 0xde346
cmovneq %rax, %rcx
leaq 0x9d794(%rip), %rsi     # 0xde340
movq %rbx, %rdi
xorl %eax, %eax
callq 0x13740
testq %r14, %r14
je 0x40bc6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x135b0
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x13670
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelProperty.cpp
// Function: gaps::R3SurfelLabelProperty::R3SurfelLabelProperty(int, gaps::R3SurfelLabel*, double*, int)
R3SurfelLabelProperty::
R3SurfelLabelProperty(int type, R3SurfelLabel *label, RNScalar *operands, int noperands)
  : scene(NULL),
    scene_index(-1),
    label(label),
    operands(NULL),
    noperands(0),
    type(type)
{
  // Check if operands were provided
  if ((noperands > 0) && (operands)) {
    // Copy operands
    this->noperands = noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = operands[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
leaq 0xef3a1(%rip), %rax     # 0x12ff88
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
movq %rdx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movl $0x0, 0x28(%rdi)
movl %esi, 0x2c(%rdi)
testl %r8d, %r8d
setle %al
testq %rcx, %rcx
sete %cl
orb %al, %cl
jne 0x40c46
movq %rdi, %r14
movl %r8d, 0x28(%rdi)
movl %r8d, %r15d
shlq $0x3, %r15
movq %r15, %rdi
callq 0x13030
movq %rax, 0x20(%r14)
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x133f0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelProperty.cpp
// Function: gaps::R3SurfelLabelProperty::R3SurfelLabelProperty(gaps::R3SurfelLabelProperty const&)
R3SurfelLabelProperty::
R3SurfelLabelProperty(const R3SurfelLabelProperty& property)
  : scene(NULL),
    scene_index(-1),
    label(property.label),
    operands(NULL),
    noperands(0),
    type(property.type)
{
  // Copy operands
  if ((property.noperands > 0) && (property.operands)) {
    this->noperands = property.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = property.operands[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xef330(%rip), %rax     # 0x12ff88
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movl $0x0, 0x28(%rdi)
movl 0x2c(%rsi), %eax
movl %eax, 0x2c(%rdi)
movslq 0x28(%rsi), %r15
testq %r15, %r15
jle 0x40cc4
movq %rsi, %rbx
cmpq $0x0, 0x20(%rsi)
je 0x40cc4
movq %rdi, %r14
movl %r15d, 0x28(%rdi)
leaq (,%r15,8), %rdi
callq 0x13030
movq %rax, 0x20(%r14)
movq 0x20(%rbx), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x40cb2
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelProperty.cpp
// Function: gaps::R3SurfelLabelProperty::operator=(gaps::R3SurfelLabelProperty const&)
R3SurfelLabelProperty& R3SurfelLabelProperty::
operator=(const R3SurfelLabelProperty& property)
{
  // Assign stuff
  this->label = property.label;
  this->type = property.type;
  
  // Delete previous operands
  if (this->operands) {
    delete [] this->operands;
    this->operands = NULL;
    this->noperands = 0;
  }

  // Copy operands
  if ((property.noperands > 0) && (property.operands)) {
    this->noperands = property.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = property.operands[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movl 0x2c(%rsi), %eax
movl %eax, 0x2c(%rdi)
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x40d52
callq 0x13680
movq $0x0, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movslq 0x28(%r14), %r15
testq %r15, %r15
jle 0x40d8f
cmpq $0x0, 0x20(%r14)
je 0x40d8f
movl %r15d, 0x28(%rbx)
leaq (,%r15,8), %rdi
callq 0x13030
movq %rax, 0x20(%rbx)
movq 0x20(%r14), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x40d7d
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelRelationship.cpp
// Function: gaps::R3SurfelLabelRelationship::R3SurfelLabelRelationship(int, gaps::R3SurfelLabel*, gaps::R3SurfelLabel*, double*, int)
R3SurfelLabelRelationship::
R3SurfelLabelRelationship(int type, R3SurfelLabel *label0, R3SurfelLabel *label1, RNScalar *operands, int noperands)
  : scene(NULL),
    scene_index(-1),
    labels(),
    operands(NULL),
    noperands(0),
    type(type)
{
  // Insert labels
  labels.Insert(label0);
  labels.Insert(label1);

  // Copy operands, if provided
  if ((noperands > 0) && (operands)) {
    this->noperands = noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = operands[i];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %rbp
movq %rcx, 0x10(%rsp)
movq %rdx, %r13
movl %esi, %ebx
movq %rdi, %r14
leaq 0xef13a(%rip), %rax     # 0x12ffb8
movq %rax, (%rdi)
xorl %r12d, %r12d
movq %r12, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0xaaf34
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl %ebx, 0x34(%r14)
movl 0x24(%r14), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0xaafca
movl 0x24(%r14), %edx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0xaafca
movl 0xc(%rsp), %edx
testl %edx, %edx
setle %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
jne 0x40f16
movl %edx, 0x30(%r14)
movl %edx, %r12d
leaq (,%r12,8), %rdi
callq 0x13030
movq %rax, 0x28(%r14)
shlq $0x3, %r12
movq %rax, %rdi
movq %rbp, %rsi
movq %r12, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x133f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xaaf9e
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelRelationship.cpp
// Function: gaps::R3SurfelLabelRelationship::R3SurfelLabelRelationship(gaps::R3SurfelLabelRelationship const&)
R3SurfelLabelRelationship::
R3SurfelLabelRelationship(const R3SurfelLabelRelationship& relationship)
  : scene(NULL),
    scene_index(-1),
    labels(relationship.labels),
    operands(NULL),
    noperands(0),
    type(relationship.type)
{
  // Copy operands
  if ((relationship.noperands > 0) && (relationship.operands)) {
    this->noperands = relationship.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = relationship.operands[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xef06b(%rip), %rax     # 0x12ffb8
movq %rax, (%rdi)
xorl %r12d, %r12d
movq %r12, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
leaq 0x18(%rdi), %r15
addq $0x18, %rsi
movq %r15, %rdi
callq 0xaaf3c
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl 0x34(%rbx), %eax
movl %eax, 0x34(%r14)
movslq 0x30(%rbx), %r12
testq %r12, %r12
jle 0x40fbe
cmpq $0x0, 0x28(%rbx)
je 0x40fbe
movl %r12d, 0x30(%r14)
leaq (,%r12,8), %rdi
callq 0x13030
movq %rax, 0x28(%r14)
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r12
jne 0x40fac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xaaf9e
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelRelationship.cpp
// Function: gaps::R3SurfelLabelRelationship::operator=(gaps::R3SurfelLabelRelationship const&)
R3SurfelLabelRelationship& R3SurfelLabelRelationship::
operator=(const R3SurfelLabelRelationship& relationship)
{
  // Copy stuff
  this->labels = relationship.labels;
  this->type = relationship.type;

  // Delete previous operands
  if (this->operands) {
    delete [] this->operands;
    this->operands = NULL;
    this->noperands =0;
  }
  
  // Copy operands
  if ((relationship.noperands > 0) && (relationship.operands)) {
    this->noperands = relationship.noperands;
    this->operands = new RNScalar [ this->noperands ];
    for (int i = 0; i < this->noperands; i++) {
      this->operands[i] = relationship.operands[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
addq $0x18, %rsi
addq $0x18, %rdi
callq 0xaaf48
movl 0x34(%r14), %eax
movl %eax, 0x34(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x41076
callq 0x13680
movq $0x0, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
movslq 0x30(%r14), %r15
testq %r15, %r15
jle 0x410b3
cmpq $0x0, 0x28(%r14)
je 0x410b3
movl %r15d, 0x30(%rbx)
leaq (,%r15,8), %rdi
callq 0x13030
movq %rax, 0x28(%rbx)
movq 0x28(%r14), %rcx
xorl %edx, %edx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x410a1
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelAssignment.cpp
// Function: gaps::R3SurfelLabelAssignment::operator=(gaps::R3SurfelLabelAssignment const&)
R3SurfelLabelAssignment& R3SurfelLabelAssignment::
operator=(const R3SurfelLabelAssignment& assignment)
{
  // Copy properties
  this->object = assignment.object;
  this->object_index = -1;
  this->label = assignment.label;
  this->label_index = -1;
  this->confidence = assignment.confidence;
  this->originator = assignment.originator;

  // Return this
  return *this;
}

// Assembly:
movq %rdi, %rax
movq 0x18(%rsi), %rcx
movq %rcx, 0x18(%rdi)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x20(%rdi)
movq 0x28(%rsi), %rdx
movq %rdx, 0x28(%rdi)
movl %ecx, 0x30(%rdi)
movsd 0x38(%rsi), %xmm0
movsd %xmm0, 0x38(%rdi)
movl 0x40(%rsi), %ecx
movl %ecx, 0x40(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelDatabase.cpp
// Function: gaps::R3SurfelDatabase::~R3SurfelDatabase()
R3SurfelDatabase::
~R3SurfelDatabase(void)
{
  // Close database
  if (IsOpen()) CloseFile();

  // Delete blocks
  while (NBlocks() > 0) {
    R3SurfelBlock *block = Block(NBlocks()-1);
    // This allows delete of database without releasing all blocks
    block->file_read_count = 0; 
    RemoveBlock(block);
    delete block;
  }

  // Remove from tree
  if (tree) tree->database = NULL;

  // Delete filename
  if (filename) free(filename);

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

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

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xeec74(%rip), %rax     # 0x130020
movq %rax, (%rdi)
cmpq $0x0, 0x8(%rdi)
je 0x413fc
movq %rbx, %rdi
callq 0x4379a
jmp 0x413fc
movq 0x40(%rbx), %rcx
movl %eax, %eax
movq -0x8(%rcx,%rax,8), %r14
movl $0x0, 0xb4(%r14)
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rax)
testq %r14, %r14
je 0x413fc
movq %r14, %rdi
callq 0x2ce2e
movl $0xc8, %esi
movq %r14, %rdi
callq 0x134f0
movl 0x4c(%rbx), %eax
testl %eax, %eax
jg 0x413c0
movq 0xb0(%rbx), %rax
testq %rax, %rax
je 0x41417
movq $0x0, 0x10(%rax)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x41425
callq 0x135e0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x41433
callq 0x135e0
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x41444
callq 0x135e0
leaq 0x58(%rbx), %rdi
callq 0x6ede0
addq $0x40, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xaaf9e
jmp 0x41462
movq %rax, %rdi
callq 0x1848f
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelDatabase.cpp
// Function: gaps::R3SurfelDatabase::SetMarks(int)
void R3SurfelDatabase::
SetMarks(RNBoolean mark)
{
  // Mark all surfels
  for (int i = 0; i < NBlocks(); i++) {
    R3SurfelBlock *block = Block(i);
    block->SetMarks(mark);
  }
}

// Assembly:
cmpl $0x0, 0x4c(%rdi)
jle 0x414ed
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebx, %esi
callq 0x2de7e
incq %r15
movslq 0x4c(%r14), %rax
cmpq %rax, %r15
jl 0x414cd
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelDatabase.cpp
// Function: gaps::R3SurfelDatabase::InsertBlock(gaps::R3SurfelBlock*)
void R3SurfelDatabase::
InsertBlock(R3SurfelBlock *block)
{
  // Just checking
  assert(block->database == NULL);
  assert(block->database_index == -1);
  assert(block->file_surfels_offset == 0);
  assert(block->file_surfels_count == 0);
  assert(block->file_read_count == 0);

  // Update block database info
  block->database = this;
  block->database_index = blocks.NEntries();
  block->file_surfels_offset = 0;
  block->file_surfels_count = 0;
  block->file_read_count = (block->surfels) ? 1 : 0;
  block->SetDirty(TRUE);

  // Insert block
  blocks.Insert(block);

  // Update bounding box
  bbox.Union(block->BBox());

  // Update timestamp range
  timestamp_range.Union(block->TimestampRange());

  // Update max identifier
  if (block->MaxIdentifier() > max_identifier)
    max_identifier = block->MaxIdentifier();

  // Update number of surfels
  nsurfels += block->NSurfels();

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

  // Update resident surfels
  if (block->surfels) resident_surfels += block->NSurfels();

#ifdef PRINT_DEBUG
  // Print debug message
  printf("Inserted Block %6d : %6d %9ld : %9.3f %9.3f %9.3f\n", 
    block->database_index, block->nsurfels, resident_surfels,
    block->Centroid().X(), block->Centroid().Y(), block->Centroid().Z()); 
  fflush(stdout);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x98(%rsi)
leaq 0x40(%rdi), %r15
movl 0x4c(%rdi), %eax
movl %eax, 0xa0(%rsi)
movq $0x0, 0xa8(%rsi)
movl $0x0, 0xb0(%rsi)
xorl %eax, %eax
cmpq $0x0, (%rsi)
setne %al
movl %eax, 0xb4(%rsi)
movq %rsi, %rdi
movl $0x1, %esi
callq 0x2d7ce
movl 0x4c(%rbx), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xaafca
leaq 0x58(%rbx), %r15
movq %r14, %rdi
callq 0x2cfc6
movq %r15, %rdi
movq %rax, %rsi
callq 0x6ea70
movq %r14, %rdi
callq 0x2d262
movsd (%rax), %xmm0
movsd 0x90(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x41585
movsd %xmm0, 0x90(%rbx)
movsd 0x8(%rax), %xmm0
ucomisd 0x98(%rbx), %xmm0
jbe 0x4159c
movsd %xmm0, 0x98(%rbx)
movq %r14, %rdi
callq 0x2d4b0
cmpl 0xa0(%rbx), %eax
jbe 0x415ba
movq %r14, %rdi
callq 0x2d4b0
movl %eax, 0xa0(%rbx)
movslq 0x8(%r14), %rax
addq %rax, 0x50(%rbx)
cmpq $0x0, (%r14)
je 0x415cf
addq %rax, 0xb8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelDatabase.cpp
// Function: gaps::R3SurfelDatabase::RemoveAndDeleteBlock(gaps::R3SurfelBlock*)
void R3SurfelDatabase::
RemoveAndDeleteBlock(R3SurfelBlock *block)
{
  // Check if still referenced
  if (block->file_read_count == 0) {
    // Block is not referenced, can simply delete it
    RemoveBlock(block);
    delete block;
  }
  else {
    // Block is referenced, mark for delete later
    block->flags.Add(R3_SURFEL_BLOCK_DELETE_PENDING_FLAG);
  }
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, 0xb4(%rsi)
je 0x41672
orb $0x2, 0x89(%rbx)
popq %rbx
retq
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
testq %rbx, %rbx
je 0x41670
movq %rbx, %rdi
callq 0x2ce2e
movl $0xc8, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x134f0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelDatabase.cpp
// Function: gaps::R3SurfelDatabase::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelDatabase::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print name
  fprintf(fp, "%s%s%s\n", (prefix) ? prefix : "", (name) ? name : "Database", (suffix) ? suffix : "");

  // Add indent to prefix
  char indent_prefix[1024];
  sprintf(indent_prefix, "%s  ", (prefix) ? prefix : "");

  // Print blocks
  for (int i = 0; i < NBlocks(); i++) {
    blocks[i]->Print(fp, indent_prefix, suffix);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
jne 0x4198d
movq 0xf25e6(%rip), %rax     # 0x133f70
movq (%rax), %r15
testq %r12, %r12
leaq 0x9e65e(%rip), %r8      # 0xdfff5
cmoveq %r8, %r12
movq 0xa8(%r14), %rax
testq %rax, %rax
leaq 0x9e03b(%rip), %rcx     # 0xdf9e7
cmovneq %rax, %rcx
testq %rbx, %rbx
cmovneq %rbx, %r8
leaq 0x9df26(%rip), %rsi     # 0xdf8e4
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x13740
leaq 0x9ca4d(%rip), %rsi     # 0xde41f
movq %rsp, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x130e0
cmpl $0x0, 0x4c(%r14)
jle 0x41a0e
xorl %r13d, %r13d
movq %rsp, %r12
movq 0x40(%r14), %rax
movq (%rax,%r13,8), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x2e97e
incq %r13
movslq 0x4c(%r14), %rax
cmpq %rax, %r13
jl 0x419ec
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelDatabase.cpp
// Function: gaps::R3SurfelDatabase::WriteFile(char const*)
int R3SurfelDatabase::
WriteFile(const char *filename)
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .xyz)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strncmp(extension, ".ssb", 5)) {
    // Open file
    FILE *f = fopen(filename, "wb");
    if (!f) {
      RNFail("Unable to open file %s\n", filename);
      return 0;
    }

    // Write stream
    if (!WriteStream(f)) {
      fclose(f);
      return 0;
    }

    // Close file
    fclose(f);
  }
  else if (NBlocks() == 1) {
    R3SurfelDatabase *database = (R3SurfelDatabase *) this;
    R3SurfelBlock *block = Block(0);
    if (!database->ReadBlock(block)) return 0;
    if (!block->WriteFile(filename)) return 0;
    if (!database->ReleaseBlock(block)) return 0;
  }
  else {
    RNFail("Invalid file extension %s for database with more than one block\n", extension);
    return 0;
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x13560
testq %rax, %rax
je 0x41d94
movq %rax, %r15
leaq 0x9dc2d(%rip), %rsi     # 0xdf8ec
movl $0x5, %edx
movq %rax, %rdi
callq 0x13240
testl %eax, %eax
je 0x41da9
cmpl $0x1, 0x4c(%rbx)
jne 0x41dde
movq 0x40(%rbx), %rax
movq (%rax), %r15
cmpl $0x0, 0xb4(%r15)
jne 0x41d0d
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movl 0x28(%rbx), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x41e0c
incl 0xb4(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ee2e
xorl %ebp, %ebp
testl %eax, %eax
je 0x41dff
cmpl $0x1, 0xb4(%r15)
jne 0x41d51
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movl 0x28(%rbx), %ecx
movq %rbx, %rdi
movq %r15, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x41dff
decl 0xb4(%r15)
movl $0x1, %ebp
jne 0x41dff
testb $0x2, 0x89(%r15)
je 0x41dff
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x18(%rax)
movq %r15, %rdi
callq 0x2ce2e
movl $0xc8, %esi
movq %r15, %rdi
callq 0x134f0
jmp 0x41dff
leaq 0x9db5c(%rip), %rdi     # 0xdf8f7
xorl %ebp, %ebp
movq %r14, %rsi
xorl %eax, %eax
callq 0x13070
jmp 0x41dff
leaq 0x9d239(%rip), %rsi     # 0xdefe9
movq %r14, %rdi
callq 0x135d0
testq %rax, %rax
je 0x41dec
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
callq *0x68(%rax)
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movq %r15, %rdi
callq 0x134d0
jmp 0x41dff
leaq 0x9db3d(%rip), %rdi     # 0xdf922
xorl %ebp, %ebp
movq %r15, %rsi
jmp 0x41df8
leaq 0x9c6df(%rip), %rdi     # 0xde4d2
xorl %ebp, %ebp
movq %r14, %rsi
xorl %eax, %eax
callq 0xaddb2
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x41dff