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

  // Print feature values
  if (prefix) fprintf(fp, "%s", prefix);
  for (int i = 0; i < NValues(); i++) {
    fprintf(fp, "%g ", Value(i));
  }
  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 0x3eaa7
movq 0xf44cc(%rip), %rax     # 0x132f70
movq (%rax), %rbx
testq %rdx, %rdx
je 0x3eab7
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x135b0
cmpl $0x0, 0x10(%r15)
jle 0x3eaeb
xorl %r13d, %r13d
leaq 0x9ede6(%rip), %r12     # 0xdd8ae
movq 0x8(%r15), %rax
movsd (%rax,%r13,8), %xmm0
movq %rbx, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x13740
incq %r13
movslq 0x10(%r15), %rax
cmpq %rax, %r13
jl 0x3eac8
testq %r14, %r14
je 0x3eafb
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
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::BBox() const
const R3Box& R3SurfelObjectSet::
BBox(void) const
{
  // Update bounding box
  if (bbox[0][0] == FLT_MAX) {
    R3SurfelObjectSet *objectset = (R3SurfelObjectSet *) this;
    objectset->bbox = R3null_box;
    for (int i = 0; i < NObjects(); i++) {
      R3SurfelObject *object = Object(i);
      objectset->bbox.Union(object->BBox());
    }
  }

  // Return bounding box
  return bbox;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x18(%rdi), %rbx
movsd 0x20(%rdi), %xmm0
ucomisd 0x9e4ec(%rip), %xmm0    # 0xdd168
jne 0x3ecd5
jp 0x3ecd5
movq %rdi, %r14
addq $0x20, %rdi
leaq 0xf5d3a(%rip), %r15     # 0x1349c8
leaq 0x8(%r15), %rsi
callq 0x8412a
leaq 0x38(%r14), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x8412a
cmpl $0x0, 0x14(%r14)
jle 0x3ecd5
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x17078
movq %rbx, %rdi
movq %rax, %rsi
callq 0x6de0c
incq %r15
movslq 0x14(%r14), %rax
cmpq %rax, %r15
jl 0x3ecb1
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::TimestampRange() const
const RNInterval& R3SurfelObjectSet::
TimestampRange(void) const
{
  // Update timestamp range
  if (timestamp_range.Min() == FLT_MAX) {
    R3SurfelObjectSet *objectset = (R3SurfelObjectSet *) this;
    objectset->timestamp_range.Reset(FLT_MAX,-FLT_MAX);
    for (int i = 0; i < NObjects(); i++) {
      R3SurfelObject *object = Object(i);
      objectset->timestamp_range.Union(object->TimestampRange());
    }
  }

  // Return timestamp range
  return timestamp_range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x50(%rdi), %rbx
movsd 0x50(%rdi), %xmm0
ucomisd 0x9e474(%rip), %xmm0    # 0xdd168
jne 0x3ed51
jp 0x3ed51
movq %rdi, %r14
movapd 0x9e62d(%rip), %xmm0    # 0xdd330
movupd %xmm0, 0x50(%rdi)
cmpl $0x0, 0x14(%rdi)
jle 0x3ed51
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x17208
movsd (%rax), %xmm0
movsd 0x50(%r14), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x3ed32
movsd %xmm0, (%rbx)
movsd 0x8(%rax), %xmm0
ucomisd 0x58(%r14), %xmm0
jbe 0x3ed45
movsd %xmm0, 0x58(%r14)
incq %r15
movslq 0x14(%r14), %rax
cmpq %rax, %r15
jl 0x3ed11
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::InsertObject(gaps::R3SurfelObject*)
void R3SurfelObjectSet::
InsertObject(R3SurfelObject *object)
{
  // Insert object
  objects.Insert(object);

  // Update bounding box
  bbox[0][0] = FLT_MAX;

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
movl 0x14(%rbx), %edx
callq 0xa9d3e
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rax, 0x20(%rbx)
movaps 0x9e5b1(%rip), %xmm0    # 0xdd330
movups %xmm0, 0x50(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::RemoveObject(int)
void R3SurfelObjectSet::
RemoveObject(int k)
{
  // Copy last object over object
  RNArrayEntry *entry = objects.KthEntry(k);
  assert(entry);
  R3SurfelObject *tail = objects.Tail();
  objects.EntryContents(entry) = tail;
  objects.RemoveTail();

  // Update bounding box
  bbox[0][0] = FLT_MAX;

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
movq 0x8(%rbx), %rax
movslq %esi, %rcx
movslq 0x14(%rbx), %rdx
movq -0x8(%rax,%rdx,8), %rsi
movq %rsi, (%rax,%rcx,8)
leal -0x1(%rdx), %esi
callq 0xa9ec8
movabsq $0x47efffffe0000000, %rax # imm = 0x47EFFFFFE0000000
movq %rax, 0x20(%rbx)
movaps 0x9e545(%rip), %xmm0    # 0xdd330
movups %xmm0, 0x50(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::Empty()
void R3SurfelObjectSet::
Empty(void)
{
  // Remove objects
  objects.Empty();

  // Update bounding box
  bbox = R3Box(FLT_MAX, FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX, -FLT_MAX);

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

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
addq $0x8, %rdi
xorl %esi, %esi
callq 0xa9f08
leaq 0x8(%rsp), %rdi
movsd 0x9e356(%rip), %xmm0    # 0xdd168
movsd 0x9e356(%rip), %xmm3    # 0xdd170
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x6d3f4
leaq 0x20(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0x8412a
leaq 0x38(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq 0x8412a
leaq 0x8(%rsp), %rdi
callq 0x6e174
movaps 0x9e4d8(%rip), %xmm0    # 0xdd330
movups %xmm0, 0x50(%rbx)
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelObjectSet.cpp
// Function: gaps::R3SurfelObjectSet::Draw(gaps::RNFlags) const
void R3SurfelObjectSet::
Draw(RNFlags flags) const
{
  // Draw objects
  for (int i = 0; i < NObjects(); i++) {
    R3SurfelObject *object = Object(i);
    object->Draw(flags);
  }
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x3eeae
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x48(%rax)
incq %r15
movslq 0x14(%r14), %rax
cmpq %rax, %r15
jl 0x3ee8c
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3eed1
movq 0xf40a2(%rip), %rax     # 0x132f70
movq (%rax), %rbx
testq %rdx, %rdx
je 0x3eee1
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x135b0
cmpl $0x0, 0x14(%r15)
jle 0x3ef16
leaq 0x9e9b4(%rip), %r12     # 0xdd8a3
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 0x3eef2
testq %r14, %r14
je 0x3ef26
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_O3/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 0xeff5a(%rip), %rax     # 0x12eea8
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 0x3efaa
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 0x3efb8
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xefa48(%rip), %rax     # 0x12eea8
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 0x3f4cc
movq %rsi, %rbx
cmpq $0x0, 0x20(%rsi)
je 0x3f4cc
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 0x3f4ba
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3f55a
callq 0x13680
movq $0x0, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movslq 0x28(%r14), %r15
testq %r15, %r15
jle 0x3f597
cmpq $0x0, 0x20(%r14)
je 0x3f597
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 0x3f585
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3f5bd
callq 0x13680
movq $0x0, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
testl %ebp, %ebp
setle %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x3f61a
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 0x3f60f
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 0x3efb8
// File: /workspace/github_cpp_makefile_star2_O3/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 0x84fe2
leaq 0x18(%rbx), %rsi
leaq 0x18(%r14), %rdi
callq 0x84fe2
addq $0x30, %rbx
leaq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x84fe2
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0xef0e2(%rip), %rax     # 0x12eee0
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 0xa9cb0
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 0x3fe70
movl %ebp, 0x30(%r14)
movl %ebp, %r12d
shlq $0x3, %r12
movq %r12, %rdi
callq 0x13030
movq %rax, 0x28(%r14)
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 0xa9d12
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0xef022(%rip), %rax     # 0x12eee0
movq %rax, (%rdi)
xorl %r12d, %r12d
movq %r12, 0x8(%rdi)
movl $0xffffffff, 0x10(%rdi) # imm = 0xFFFFFFFF
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0xa9ca8
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl %ebx, 0x34(%r14)
movl 0x24(%r14), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0xa9d3e
movl 0x24(%r14), %edx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0xa9d3e
movl 0xc(%rsp), %edx
testl %edx, %edx
setle %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
jne 0x3ff51
movl %edx, 0x30(%r14)
movl %edx, %r12d
shlq $0x3, %r12
movq %r12, %rdi
callq 0x13030
movq %rax, 0x28(%r14)
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 0xa9d12
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xeef57(%rip), %rax     # 0x12eee0
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 0xa9cb0
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl 0x34(%rbx), %eax
movl %eax, 0x34(%r14)
movslq 0x30(%rbx), %r12
testq %r12, %r12
jle 0x3fffa
cmpq $0x0, 0x28(%rbx)
je 0x3fffa
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 0x3ffe8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xa9d12
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa9cbc
movl 0x34(%r14), %eax
movl %eax, 0x34(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x400b2
callq 0x13680
movq $0x0, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
movslq 0x30(%r14), %r15
testq %r15, %r15
jle 0x400ef
cmpq $0x0, 0x28(%r14)
je 0x400ef
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 0x400dd
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x40188
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpl $0x2, 0x24(%rdi)
jne 0x40181
testb $0x1, %sil
je 0x4012b
movss 0x9e6f4(%rip), %xmm1    # 0xde814
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
callq 0x139e0
movl $0x1, %edi
callq 0x13130
movq 0x18(%rbx), %rax
movq (%rax), %rdi
callq 0x17078
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 0x17078
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
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0xeeba7(%rip), %rax     # 0x12ef18
movq %rax, (%rdi)
movl 0x3c(%rdi), %eax
testl %eax, %eax
jle 0x40396
movq 0x30(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x40377
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x3c(%rbx), %eax
jmp 0x40377
movl 0x4c(%rbx), %eax
testl %eax, %eax
jle 0x403b5
movq 0x40(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x40399
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x40396
movl 0x5c(%rbx), %eax
testl %eax, %eax
jle 0x403d4
movq 0x50(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x403b8
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x403b5
movl 0x2c(%rbx), %eax
testl %eax, %eax
jle 0x403f3
movq 0x20(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x403d7
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x403d4
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x10(%rax)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x40410
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x38(%rax)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x4041e
callq 0x135e0
leaq 0x50(%rbx), %rdi
callq 0xa9d12
leaq 0x40(%rbx), %rdi
callq 0xa9d12
leaq 0x30(%rbx), %rdi
callq 0xa9d12
addq $0x20, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0xa9d12
movq %rax, %rdi
callq 0x183c3
// File: /workspace/github_cpp_makefile_star2_O3/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 0x40486
movq 0x30(%rdi), %rdx
xorl %edi, %edi
movq (%rdx,%rdi,8), %rax
cmpl %esi, 0x2c(%rax)
je 0x40488
incq %rdi
cmpq %rdi, %rcx
jne 0x40475
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabel.cpp
// Function: gaps::R3SurfelLabel::Identifier() const
int R3SurfelLabel::
Identifier(void) const
{
  // Update ID 
  if (identifier < 0) {
    ((R3SurfelLabel *) this)->identifier = R3surfel_next_label_identifier++;
  }

  // Return identifier 
  return identifier;
}

// Assembly:
movl 0x68(%rdi), %eax
testl %eax, %eax
js 0x40492
retq
movl 0xf3808(%rip), %eax     # 0x133ca0
leal 0x1(%rax), %ecx
movl %ecx, 0xf37ff(%rip)     # 0x133ca0
movl %eax, 0x68(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x405a1
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0x4054d
cmpl $0x0, 0x2c(%r15)
jle 0x4054d
xorl %r12d, %r12d
movq 0x20(%r15), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x40504
incq %r12
movslq 0x2c(%r15), %rax
cmpq %rax, %r12
jl 0x4052d
jmp 0x40596
movl 0x5c(%r15), %eax
testl %eax, %eax
jle 0x40596
xorl %r12d, %r12d
movq 0x50(%r15), %rcx
movq (%rcx,%r12,8), %rcx
movq 0x18(%rcx), %rdi
testq %rdi, %rdi
je 0x4058b
movq 0x18(%rdi), %rcx
movq 0x8(%r15), %rdx
movq 0x10(%rdx), %rdx
cmpq (%rdx), %rcx
jne 0x4058b
xorps %xmm0, %xmm0
movq %r14, %rsi
movl %ebx, %edx
callq 0x17506
movl 0x5c(%r15), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x40558
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x405bc
callq 0xac67b
jmp 0x405be
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq 0x68(%r14), %rax
movq %rax, 0x68(%rbx)
leaq 0x70(%r14), %rsi
leaq 0x70(%rbx), %rdi
callq 0xa9bae
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_O3/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 0x40658
movq %rsi, %r14
movq %rdi, %rbx
testq %r12, %r12
je 0x4062f
leaq 0x20(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xa9d20
subq 0x20(%r12), %rax
shrq $0x3, %rax
movq %r15, %rdi
movl %eax, %esi
callq 0xa9ec8
testq %r14, %r14
je 0x40644
leaq 0x20(%r14), %rdi
movl 0x2c(%r14), %edx
movq %rbx, %rsi
callq 0xa9d3e
movq %r14, 0x18(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x40658
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4067c
callq 0x135e0
testq %r14, %r14
je 0x4068b
movq %r14, %rdi
callq 0xac67b
jmp 0x4068d
xorl %eax, %eax
movq %rax, 0x60(%rbx)
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x406a1
orb $0x1, 0x1e8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/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 0xa9ec8
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x407dd
movq 0xf2796(%rip), %rax     # 0x132f70
movq (%rax), %rbx
testq %rdx, %rdx
je 0x407ed
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x135b0
movl 0x10(%r15), %edx
movq 0x60(%r15), %rax
testq %rax, %rax
leaq 0x9cb47(%rip), %rcx     # 0xdd346
cmovneq %rax, %rcx
leaq 0x9cb36(%rip), %rsi     # 0xdd340
movq %rbx, %rdi
xorl %eax, %eax
callq 0x13740
testq %r14, %r14
je 0x40824
movq %r14, %rdi
movq %rbx, %rsi
callq 0x135b0
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x13670
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xee741(%rip), %rax     # 0x12ef88
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 0x408a6
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_O3/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 0xee6d0(%rip), %rax     # 0x12ef88
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 0x40924
movq %rsi, %rbx
cmpq $0x0, 0x20(%rsi)
je 0x40924
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 0x40912
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x409b2
callq 0x13680
movq $0x0, 0x20(%rbx)
movl $0x0, 0x28(%rbx)
movslq 0x28(%r14), %r15
testq %r15, %r15
jle 0x409ef
cmpq $0x0, 0x20(%r14)
je 0x409ef
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 0x409dd
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelLabelRelationship.cpp
// Function: gaps::R3SurfelLabelRelationship::R3SurfelLabelRelationship(int, gaps::RNArray<gaps::R3SurfelLabel*> const&, double*, int)
R3SurfelLabelRelationship::
R3SurfelLabelRelationship(int type, const RNArray<R3SurfelLabel *>& labels, RNScalar *operands, int noperands)
  : scene(NULL),
    scene_index(-1),
    labels(labels),
    operands(NULL),
    noperands(0),
    type(type)
{
  // 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
pushq %rax
movl %r8d, %ebp
movq %rcx, %rbx
movl %esi, %r12d
movq %rdi, %r14
leaq 0xee59e(%rip), %rax     # 0x12efb8
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 0xa9cb0
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 0x40a8c
movl %ebp, 0x30(%r14)
movl %ebp, %r12d
shlq $0x3, %r12
movq %r12, %rdi
callq 0x13030
movq %rax, 0x28(%r14)
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 0xa9d12
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O3/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 0xee415(%rip), %rax     # 0x12efb8
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 0xa9cb0
movq %r12, 0x28(%r14)
movl $0x0, 0x30(%r14)
movl 0x34(%rbx), %eax
movl %eax, 0x34(%r14)
movslq 0x30(%rbx), %r12
testq %r12, %r12
jle 0x40c14
cmpq $0x0, 0x28(%rbx)
je 0x40c14
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 0x40c02
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xa9d12
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa9cbc
movl 0x34(%r14), %eax
movl %eax, 0x34(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x40ccc
callq 0x13680
movq $0x0, 0x28(%rbx)
movl $0x0, 0x30(%rbx)
movslq 0x30(%r14), %r15
testq %r15, %r15
jle 0x40d09
cmpq $0x0, 0x28(%r14)
je 0x40d09
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 0x40cf7
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xee01c(%rip), %rax     # 0x12f020
movq %rax, (%rdi)
cmpq $0x0, 0x8(%rdi)
je 0x4104f
movq %rbx, %rdi
callq 0x43400
jmp 0x4104f
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)
movq %r14, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %r14, %rdi
callq 0x134f0
movl 0x4c(%rbx), %eax
testl %eax, %eax
jg 0x41018
movq 0xb0(%rbx), %rax
testq %rax, %rax
je 0x4106a
movq $0x0, 0x10(%rax)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x41078
callq 0x135e0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x41086
callq 0x135e0
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x41097
callq 0x135e0
leaq 0x58(%rbx), %rdi
callq 0x6e174
addq $0x40, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa9d12
jmp 0x410b5
movq %rax, %rdi
callq 0x183c3
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x41141
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 0x2dab8
incq %r15
movslq 0x4c(%r14), %rax
cmpq %rax, %r15
jl 0x41121
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x2d408
movl 0x4c(%rbx), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xa9d3e
leaq 0x58(%rbx), %r15
movq %r14, %rdi
callq 0x2cb9e
movq %r15, %rdi
movq %rax, %rsi
callq 0x6de0c
movq %r14, %rdi
callq 0x2ce62
movsd (%rax), %xmm0
movsd 0x90(%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x411d9
movsd %xmm0, 0x90(%rbx)
movsd 0x8(%rax), %xmm0
ucomisd 0x98(%rbx), %xmm0
jbe 0x411f0
movsd %xmm0, 0x98(%rbx)
movq %r14, %rdi
callq 0x2d0d4
cmpl 0xa0(%rbx), %eax
jbe 0x4120e
movq %r14, %rdi
callq 0x2d0d4
movl %eax, 0xa0(%rbx)
movslq 0x8(%r14), %rax
addq %rax, 0x50(%rbx)
cmpq $0x0, (%r14)
je 0x41223
addq %rax, 0xb8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x412c6
orb $0x2, 0x89(%rbx)
popq %rbx
retq
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x134f0
nop