LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3Surfel.cpp
// Function: gaps::R3Surfel::R3Surfel(float, float, float, float, float, float, float, float, float, float, float, unsigned char, unsigned char, unsigned char, float, unsigned int, unsigned char)
R3Surfel::
R3Surfel(float x, float y, float z,
  float nx, float ny, float nz,
  float tx, float ty, float tz,
  float radius0, float radius1,
  unsigned char r, unsigned char g, unsigned char b, 
  float timestamp, unsigned int identifier,
  unsigned char flags)
  : timestamp(timestamp),
    identifier(identifier),
    attribute(0),
    depth(0),
    elevation(0),
    flags(flags)
{
  // Set everything
  SetPosition(x, y, z);
  SetNormal(nx, ny, nz);
  SetTangent(tx, ty, tz);
  SetRadius(0, radius0);
  SetRadius(1, radius1);
  SetColor(r, g, b);
}

// Assembly:
movss 0x8(%rsp), %xmm8
movss 0x20(%rsp), %xmm9
movss %xmm9, 0xc(%rdi)
movl %r8d, 0x20(%rdi)
movq $0x0, 0x24(%rdi)
movb %r9b, 0x2f(%rdi)
movss %xmm0, (%rdi)
movss %xmm1, 0x4(%rdi)
movss %xmm2, 0x8(%rdi)
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm3
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
cvtps2pd %xmm3, %xmm1
mulpd 0xb2b04(%rip), %xmm1    # 0xddd80
addpd 0xb2b0c(%rip), %xmm1    # 0xddd90
cvttpd2dq %xmm1, %xmm1
pshuflw $0xe8, %xmm1, %xmm1     # xmm1 = xmm1[0,2,2,3,4,5,6,7]
xorps %xmm2, %xmm2
cvtss2sd %xmm5, %xmm2
mulsd 0xb2b24(%rip), %xmm2    # 0xdddc0
addsd 0xb1e94(%rip), %xmm2    # 0xdd138
movd %xmm1, 0x10(%rdi)
cvttsd2si %xmm2, %eax
movw %ax, 0x14(%rdi)
jne 0x2b2c3
jp 0x2b2c3
ucomiss %xmm0, %xmm4
jne 0x2b2c3
jp 0x2b2c3
ucomiss %xmm0, %xmm5
jne 0x2b2c3
jnp 0x2b2cb
orb $0x40, %r9b
movb %r9b, 0x2f(%rdi)
movss 0x18(%rsp), %xmm0
movaps %xmm6, %xmm1
unpcklps %xmm7, %xmm1            # xmm1 = xmm1[0],xmm7[0],xmm1[1],xmm7[1]
cvtps2pd %xmm1, %xmm2
mulpd 0xb2a9e(%rip), %xmm2    # 0xddd80
addpd 0xb2aa6(%rip), %xmm2    # 0xddd90
movss 0x10(%rsp), %xmm1
cvttpd2dq %xmm2, %xmm2
pshuflw $0xe8, %xmm2, %xmm2     # xmm2 = xmm2[0,2,2,3,4,5,6,7]
movd %xmm2, 0x16(%rdi)
xorps %xmm2, %xmm2
cvtss2sd %xmm8, %xmm2
mulsd 0xb2ab2(%rip), %xmm2    # 0xdddc0
addsd 0xb1e22(%rip), %xmm2    # 0xdd138
cvttsd2si %xmm2, %eax
movw %ax, 0x1a(%rdi)
xorpd %xmm2, %xmm2
ucomiss %xmm2, %xmm6
jne 0x2b338
jp 0x2b338
ucomiss %xmm2, %xmm7
jne 0x2b338
jp 0x2b338
ucomiss %xmm2, %xmm8
jne 0x2b338
jnp 0x2b340
orb $0x1, %r9b
movb %r9b, 0x2f(%rdi)
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
cvtps2pd %xmm1, %xmm0
mulpd 0xb2a52(%rip), %xmm0    # 0xddda0
addpd 0xb2a3a(%rip), %xmm0    # 0xddd90
cvtpd2ps %xmm0, %xmm0
movaps 0xb2a4f(%rip), %xmm1    # 0xdddb0
minps %xmm0, %xmm1
cvttps2dq %xmm1, %xmm0
pshuflw $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3,4,5,6,7]
movd %xmm0, 0x1c(%rdi)
movb %sil, 0x2c(%rdi)
movb %dl, 0x2d(%rdi)
movb %cl, 0x2e(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::R3SurfelBlock(gaps::R3SurfelBlock const&)
R3SurfelBlock::
R3SurfelBlock(const R3SurfelBlock& block)
  : surfels(NULL),
    nsurfels(block.nsurfels),
    position_origin(block.position_origin),
    bbox(block.bbox),
    timestamp_origin(block.timestamp_origin),
    timestamp_range(block.timestamp_range),
    min_identifier(block.min_identifier),
    max_identifier(block.max_identifier),
    resolution(block.resolution),
    flags(block.flags & R3_SURFEL_BLOCK_PROPERTY_FLAGS),
    data(NULL),
    database(NULL),
    database_index(-1),
    file_surfels_offset(0),
    file_surfels_count(0),
    file_read_count(0),
    node(NULL),
    opengl_id(0)
{
  // Copy surfels
  if (nsurfels > 0) {
    surfels = new R3Surfel [ nsurfels ];
    for (int i = 0; i < nsurfels; i++) {
      surfels[i] = block.surfels[i];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x8(%rdi)
addq $0x10, %rdi
addq $0x10, %rsi
callq 0x83dd2
leaq 0x28(%r14), %r15
leaq 0x28(%rbx), %rsi
movq %r15, %rdi
callq 0x6d354
movsd 0x60(%rbx), %xmm0
movsd %xmm0, 0x60(%r14)
leaq 0x68(%r14), %rdi
leaq 0x68(%rbx), %rsi
callq 0xab9b4
movq 0x78(%rbx), %rax
movq %rax, 0x78(%r14)
movsd 0x80(%rbx), %xmm0
movsd %xmm0, 0x80(%r14)
movzbl 0x88(%rbx), %eax
movq %rax, 0x88(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%r14)
movl $0xffffffff, 0xa0(%r14) # imm = 0xFFFFFFFF
movups %xmm0, 0xa8(%r14)
movups %xmm0, 0xb4(%r14)
movslq 0x8(%r14), %rax
testq %rax, %rax
jle 0x2b81c
shlq $0x4, %rax
leaq (%rax,%rax,2), %r12
movq %r12, %rdi
callq 0x13030
movq %rax, %r13
xorl %ebp, %ebp
movq %r13, %rdi
addq %rbp, %rdi
callq 0x2b118
addq $0x30, %rbp
cmpq %rbp, %r12
jne 0x2b7c8
movq %r13, (%r14)
cmpl $0x0, 0x8(%r14)
jle 0x2b81c
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rbx), %rdx
movq (%r14), %rsi
movups (%rdx,%rax), %xmm0
movups 0x10(%rdx,%rax), %xmm1
movups 0x20(%rdx,%rax), %xmm2
movups %xmm2, 0x20(%rsi,%rax)
movups %xmm1, 0x10(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
incq %rcx
movslq 0x8(%r14), %rdx
addq $0x30, %rax
cmpq %rdx, %rcx
jl 0x2b7ea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2b83e
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x139b0
movq %r15, %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::R3SurfelBlock(gaps::R3Surfel const*, int, gaps::R3Point const&, double)
R3SurfelBlock::
R3SurfelBlock(const R3Surfel *surfels, int nsurfels,
  const R3Point& position_origin, RNScalar timestamp_origin)
  : surfels(NULL),
    nsurfels(nsurfels),
    position_origin(position_origin),
    bbox(FLT_MAX,FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX),
    timestamp_origin(timestamp_origin),
    timestamp_range(FLT_MAX,-FLT_MAX),
    min_identifier(UINT_MAX),
    max_identifier(0),
    resolution(0),
    flags(0),
    data(NULL),
    database(NULL),
    database_index(-1),
    file_surfels_offset(0),
    file_surfels_count(0),
    file_read_count(0),
    node(NULL),
    opengl_id(0)
{
  // Copy surfels
  if (nsurfels > 0) {
    this->surfels = new R3Surfel [ nsurfels ];
    for (int i = 0; i < nsurfels; i++) {
      this->surfels[i] = surfels[i];
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rdi)
movl %edx, 0x8(%rdi)
addq $0x10, %rdi
movq %rcx, %rsi
callq 0x83dd2
leaq 0x28(%r14), %r15
movsd 0xb0ecc(%rip), %xmm0    # 0xdd168
movsd 0xb0ecc(%rip), %xmm3    # 0xdd170
movq %r15, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x6d3f4
movsd (%rsp), %xmm0
movsd %xmm0, 0x60(%r14)
leaq 0x68(%r14), %rdi
movsd 0xb0e99(%rip), %xmm0    # 0xdd168
movsd 0xb0e99(%rip), %xmm1    # 0xdd170
callq 0xab9aa
movl $0xffffffff, 0x78(%r14) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x7c(%r14)
movups %xmm0, 0x8c(%r14)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x9c(%r14)
movups %xmm0, 0xa8(%r14)
movups %xmm0, 0xb4(%r14)
testl %ebp, %ebp
jle 0x2c371
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r12
movq %r12, %rdi
callq 0x13030
movq %rax, %r13
xorl %ebp, %ebp
movq %r13, %rdi
addq %rbp, %rdi
callq 0x2b118
addq $0x30, %rbp
cmpq %rbp, %r12
jne 0x2c330
movq %r13, (%r14)
xorl %eax, %eax
movq (%r14), %rcx
movups (%rbx,%rax), %xmm0
movups 0x10(%rbx,%rax), %xmm1
movups 0x20(%rbx,%rax), %xmm2
movups %xmm2, 0x20(%rcx,%rax)
movups %xmm1, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
addq $0x30, %rax
cmpq %rax, %r12
jne 0x2c349
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2c393
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x139b0
movq %r15, %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::R3SurfelBlock(gaps::RNArray<gaps::R3Surfel const*> const&, gaps::R3Point const&, double)
R3SurfelBlock::
R3SurfelBlock(const RNArray<const R3Surfel *>& array,
  const R3Point& position_origin, RNScalar timestamp_origin)
  : surfels(NULL),
    nsurfels(array.NEntries()),
    position_origin(position_origin),
    bbox(FLT_MAX,FLT_MAX,FLT_MAX,-FLT_MAX,-FLT_MAX,-FLT_MAX),
    timestamp_origin(timestamp_origin),
    timestamp_range(FLT_MAX,-FLT_MAX),
    min_identifier(UINT_MAX),
    max_identifier(0),
    resolution(0),
    flags(0),
    data(NULL),
    database(NULL),
    database_index(-1),
    file_surfels_offset(0),
    file_surfels_count(0),
    file_read_count(0),
    node(NULL),
    opengl_id(0)
{
  // Copy surfels
  if (nsurfels > 0) {
    surfels = new R3Surfel [ nsurfels ];
    for (int i = 0; i < nsurfels; i++) {
      this->surfels[i] = *(array[i]);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rdi)
movl 0xc(%rsi), %eax
movl %eax, 0x8(%rdi)
addq $0x10, %rdi
movq %rdx, %rsi
callq 0x83dd2
leaq 0x28(%r14), %r15
movsd 0xb0d89(%rip), %xmm0    # 0xdd168
movsd 0xb0d89(%rip), %xmm3    # 0xdd170
movq %r15, %rdi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm3, %xmm4
movaps %xmm3, %xmm5
callq 0x6d3f4
movsd (%rsp), %xmm0
movsd %xmm0, 0x60(%r14)
leaq 0x68(%r14), %rdi
movsd 0xb0d56(%rip), %xmm0    # 0xdd168
movsd 0xb0d56(%rip), %xmm1    # 0xdd170
callq 0xab9aa
movl $0xffffffff, 0x78(%r14) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x7c(%r14)
movups %xmm0, 0x8c(%r14)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x9c(%r14)
movups %xmm0, 0xa8(%r14)
movups %xmm0, 0xb4(%r14)
movslq 0x8(%r14), %rax
testq %rax, %rax
jle 0x2c4cb
shlq $0x4, %rax
leaq (%rax,%rax,2), %r12
movq %r12, %rdi
callq 0x13030
movq %rax, %r13
xorl %ebp, %ebp
movq %r13, %rdi
addq %rbp, %rdi
callq 0x2b118
addq $0x30, %rbp
cmpq %rbp, %r12
jne 0x2c476
movq %r13, (%r14)
cmpl $0x0, 0x8(%r14)
jle 0x2c4cb
xorl %eax, %eax
xorl %ecx, %ecx
movq (%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movq (%r14), %rsi
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups %xmm2, 0x20(%rsi,%rax)
movups %xmm1, 0x10(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
incq %rcx
movslq 0x8(%r14), %rdx
addq $0x30, %rax
cmpq %rdx, %rcx
jl 0x2c498
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2c4ed
movq %rax, %rbx
movq %r13, %rdi
movq %r12, %rsi
callq 0x139b0
movq %r15, %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::~R3SurfelBlock()
R3SurfelBlock::
~R3SurfelBlock(void)
{
  // Safety check
  assert(file_read_count == 0);

  // Remove from node
  if (node) node->RemoveBlock(this);

  // Remove from database
  if (database) database->RemoveBlock(this);

  // Delete surfels
  if (surfels) delete [] surfels;

#if (R3_SURFEL_BLOCK_DRAW_METHOD == R3_SURFEL_BLOCK_DRAW_WITH_VBO)
  // Delete opengl VBO buffer
  if (opengl_id > 0) glDeleteBuffers(1, &opengl_id);
#elif (R3_SURFEL_BLOCK_DRAW_METHOD == R3_SURFEL_BLOCK_DRAW_WITH_DISPLAY_LIST)
  // Delete opengl display lists
  if (opengl_id > 0) glDeleteLists(opengl_id, 2);
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0xb8(%rdi), %rdi
testq %rdi, %rdi
je 0x2ca1f
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x30(%rax)
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x2ca34
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x18(%rax)
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2ca41
callq 0x13680
addq $0x28, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x6e174
movq %rax, %rdi
callq 0x183c3
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::operator=(gaps::R3SurfelBlock const&)
R3SurfelBlock& R3SurfelBlock::
operator=(const R3SurfelBlock& block)
{
  // Delete old surfels
  if (this->surfels) delete this->surfels;
  this->surfels = NULL;

  // Copy properties
  this->nsurfels = block.nsurfels;
  this->position_origin = block.position_origin;
  this->bbox = block.bbox;
  this->timestamp_origin = block.timestamp_origin;
  this->timestamp_range = block.timestamp_range;
  this->min_identifier = block.min_identifier;
  this->max_identifier = block.max_identifier;
  this->resolution = block.resolution;
  this->flags = block.flags & R3_SURFEL_BLOCK_PROPERTY_FLAGS;
  this->data = NULL;
  this->database = NULL;
  this->database_index = -1;
  this->file_surfels_offset = 0;
  this->file_surfels_count = 0;
  this->file_read_count = 0;
  this->node = NULL;
  this->opengl_id = 0;

  // Copy surfels
  if (this->nsurfels > 0) {
    this->surfels = new R3Surfel [ this->nsurfels ];
    for (int i = 0; i < this->nsurfels; i++) {
      this->surfels[i] = block.surfels[i];
    }
  }

  // Return this
  return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2ca77
movl $0x30, %esi
callq 0x134f0
movq $0x0, (%rbx)
movl 0x8(%r14), %eax
movl %eax, 0x8(%rbx)
leaq 0x10(%r14), %rsi
leaq 0x10(%rbx), %rdi
callq 0x8412a
leaq 0x30(%rbx), %rdi
leaq 0x30(%r14), %rsi
callq 0x8412a
leaq 0x48(%rbx), %rdi
leaq 0x48(%r14), %rsi
callq 0x8412a
movsd 0x60(%r14), %xmm0
movsd %xmm0, 0x60(%rbx)
movups 0x68(%r14), %xmm0
movups %xmm0, 0x68(%rbx)
movq 0x78(%r14), %rax
movq %rax, 0x78(%rbx)
movsd 0x80(%r14), %xmm0
movsd %xmm0, 0x80(%rbx)
movzbl 0x88(%r14), %eax
movq %rax, 0x88(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rbx)
movl $0xffffffff, 0xa0(%rbx) # imm = 0xFFFFFFFF
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb4(%rbx)
movslq 0x8(%rbx), %rax
testq %rax, %rax
jle 0x2cb7a
shlq $0x4, %rax
leaq (%rax,%rax,2), %r15
movq %r15, %rdi
callq 0x13030
movq %rax, %r12
xorl %r13d, %r13d
leaq (%r12,%r13), %rdi
callq 0x2b118
addq $0x30, %r13
cmpq %r13, %r15
jne 0x2cb29
movq %r12, (%rbx)
cmpl $0x0, 0x8(%rbx)
jle 0x2cb7a
xorl %eax, %eax
xorl %ecx, %ecx
movq (%r14), %rdx
movq (%rbx), %rsi
movups (%rdx,%rax), %xmm0
movups 0x10(%rdx,%rax), %xmm1
movups 0x20(%rdx,%rax), %xmm2
movups %xmm2, 0x20(%rsi,%rax)
movups %xmm1, 0x10(%rsi,%rax)
movups %xmm0, (%rsi,%rax)
incq %rcx
movslq 0x8(%rbx), %rdx
addq $0x30, %rax
cmpq %rdx, %rcx
jl 0x2cb48
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
callq 0x139b0
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::UpdateBBox()
void R3SurfelBlock::
UpdateBBox(void)
{
  // Read block
  if (database) database->ReadBlock(this);

  // Update bounding box
  bbox = R3null_box;
  for (int i = 0; i < nsurfels; i++) {
    const float *p = surfels[i].PositionPtr();
    bbox.Union(R3Point(p[0], p[1], p[2]));
  }

  // Release block
  if (database) database->ReleaseBlock(this);

  // Translate bounding box by position_origin
  bbox.Translate(position_origin.Vector());

  // Mark bbox uptodate
  flags.Add(R3_SURFEL_BLOCK_BBOX_UPTODATE_FLAG);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x2cc07
movl 0xb4(%rbx), %eax
testl %eax, %eax
jne 0x2cbff
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movl 0x28(%rdi), %ecx
movq %rbx, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x2cc07
movl 0xb4(%rbx), %eax
incl %eax
movl %eax, 0xb4(%rbx)
leaq 0x28(%rbx), %r14
leaq 0x30(%rbx), %rdi
leaq 0x107db2(%rip), %r15    # 0x1349c8
leaq 0x8(%r15), %rsi
callq 0x8412a
leaq 0x48(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x8412a
cmpl $0x0, 0x8(%rbx)
jle 0x2cc86
movl $0x8, %r12d
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
movq (%rbx), %rax
xorps %xmm0, %xmm0
cvtss2sd -0x8(%rax,%r12), %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0x4(%rax,%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd (%rax,%r12), %xmm2
movq %r15, %rdi
callq 0x83dc2
movq %r14, %rdi
movq %r15, %rsi
callq 0x6dd46
incq %r13
movslq 0x8(%rbx), %rax
addq $0x30, %r12
cmpq %rax, %r13
jl 0x2cc43
movq 0x98(%rbx), %r15
testq %r15, %r15
je 0x2ccf2
movl 0xb4(%rbx), %eax
cmpl $0x1, %eax
jne 0x2ccbe
movq (%r15), %rax
movq 0x8(%r15), %rdx
movl 0x28(%r15), %ecx
movq %r15, %rdi
movq %rbx, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x2ccf2
movl 0xb4(%rbx), %eax
decl %eax
movl %eax, 0xb4(%rbx)
jne 0x2ccf2
testb $0x2, 0x89(%rbx)
je 0x2ccf2
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %rbx, %rdi
callq 0x134f0
movsd 0x10(%rbx), %xmm0
movsd 0x18(%rbx), %xmm1
movsd 0x20(%rbx), %xmm2
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x84856
movq %r14, %rdi
movq %r15, %rsi
callq 0x6dd1c
orb $0x1, 0x88(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ElevationRange() const
RNInterval R3SurfelBlock::
ElevationRange(void) const
{
  // Initialize elevation range
  RNInterval elevation_range = RNnull_interval;

  // Read block
  if (database) database->ReadBlock((R3SurfelBlock *) this);
  
  // Compute elevation range
  for (int i = 0; i < nsurfels; i++) {
    double elevation = SurfelElevation(i);
    elevation_range.Union(elevation);
  }

  // Release block
  if (database) database->ReleaseBlock((R3SurfelBlock *) this);

  // Return elevation range
  return elevation_range;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x509a90(%rip), %rsi    # 0x5367d0
callq 0xab9b4
movq 0x98(%r14), %rdi
testq %rdi, %rdi
je 0x2cd83
movl 0xb4(%r14), %eax
testl %eax, %eax
jne 0x2cd7a
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movl 0x28(%rdi), %ecx
movq %r14, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x2cd83
movl 0xb4(%r14), %eax
incl %eax
movl %eax, 0xb4(%r14)
movslq 0x8(%r14), %rcx
testq %rcx, %rcx
jle 0x2cde8
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movq (%r14), %rax
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movsd 0xb1026(%rip), %xmm2    # 0xdddd0
movswl 0x2a(%rax,%rdx), %esi
xorps %xmm3, %xmm3
cvtsi2sd %esi, %xmm3
divsd %xmm2, %xmm3
cvtsd2ss %xmm3, %xmm3
cvtss2sd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jbe 0x2cdd0
movsd %xmm3, (%rbx)
movapd %xmm3, %xmm0
ucomisd %xmm1, %xmm3
jbe 0x2cddf
movsd %xmm3, 0x8(%rbx)
movapd %xmm3, %xmm1
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x2cdaa
movq 0x98(%r14), %r15
testq %r15, %r15
je 0x2ce58
movl 0xb4(%r14), %eax
cmpl $0x1, %eax
jne 0x2ce22
movq (%r15), %rax
movq 0x8(%r15), %rdx
movl 0x28(%r15), %ecx
movq %r15, %rdi
movq %r14, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x2ce58
movl 0xb4(%r14), %eax
decl %eax
movl %eax, 0xb4(%r14)
jne 0x2ce58
testb $0x2, 0x89(%r14)
je 0x2ce58
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x18(%rax)
movq %r14, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %r14, %rdi
callq 0x134f0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::UpdateTimestampRange()
void R3SurfelBlock::
UpdateTimestampRange(void)
{
  // Read block
  if (database) database->ReadBlock(this);

  // Update timestamp range
  timestamp_range = RNnull_interval;
  for (int i = 0; i < nsurfels; i++) {
    float t = surfels[i].Timestamp();
    timestamp_range.Union(t);
  }

  // Release block
  if (database) database->ReleaseBlock(this);

  // Translate bounding box by timestamp origin
  timestamp_range += timestamp_origin;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x2cec0
movl 0xb4(%rbx), %eax
testl %eax, %eax
jne 0x2ceb8
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movl 0x28(%rdi), %ecx
movq %rbx, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x2cec0
movl 0xb4(%rbx), %eax
incl %eax
movl %eax, 0xb4(%rbx)
leaq 0x509909(%rip), %rax    # 0x5367d0
movupd (%rax), %xmm0
movupd %xmm0, 0x68(%rbx)
movslq 0x8(%rbx), %rdx
testq %rdx, %rdx
jle 0x2cf23
leaq 0x68(%rbx), %rax
movsd 0x68(%rbx), %xmm0
movq (%rbx), %rcx
movsd 0x70(%rbx), %xmm1
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
xorps %xmm2, %xmm2
cvtss2sd 0xc(%rcx,%rsi), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x2cf0b
movsd %xmm2, (%rax)
movapd %xmm2, %xmm0
ucomisd %xmm1, %xmm2
jbe 0x2cf1a
movsd %xmm2, 0x70(%rbx)
movapd %xmm2, %xmm1
addq $0x30, %rsi
cmpq %rsi, %rdx
jne 0x2cef4
movq 0x98(%rbx), %r14
testq %r14, %r14
je 0x2cf8f
movl 0xb4(%rbx), %eax
cmpl $0x1, %eax
jne 0x2cf5b
movq (%r14), %rax
movq 0x8(%r14), %rdx
movl 0x28(%r14), %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x2cf8f
movl 0xb4(%rbx), %eax
decl %eax
movl %eax, 0xb4(%rbx)
jne 0x2cf8f
testb $0x2, 0x89(%rbx)
je 0x2cf8f
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %rbx, %rdi
callq 0x134f0
movupd 0x60(%rbx), %xmm0
movapd %xmm0, %xmm1
shufpd $0x1, %xmm0, %xmm1      # xmm1 = xmm1[1],xmm0[0]
movhpd 0x70(%rbx), %xmm0       # xmm0 = xmm0[0],mem[0]
addpd %xmm1, %xmm0
movupd %xmm0, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::UpdateIdentifierRange()
void R3SurfelBlock::
UpdateIdentifierRange(void)
{
  // Read block
  if (database) database->ReadBlock(this);

  // Update max identifier
  min_identifier = UINT_MAX;
  max_identifier = 0;
  for (int i = 0; i < nsurfels; i++) {
    unsigned int id = surfels[i].Identifier();
    if (id < min_identifier) min_identifier = id;
    if (id > max_identifier) max_identifier = id;
  }

  // Release block
  if (database) database->ReleaseBlock(this);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x2d00c
movl 0xb4(%rbx), %eax
testl %eax, %eax
jne 0x2d004
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movl 0x28(%rdi), %ecx
movq %rbx, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x2d00c
movl 0xb4(%rbx), %eax
incl %eax
movl %eax, 0xb4(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x78(%rbx)
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x2d058
movq (%rbx), %rax
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edi, %edi
movl 0x20(%rax,%rdx), %r8d
cmpl %esi, %r8d
jae 0x2d043
movl %r8d, 0x78(%rbx)
movl %r8d, %esi
cmpl %edi, %r8d
jbe 0x2d04f
movl %r8d, 0x7c(%rbx)
movl %r8d, %edi
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x2d032
movq 0x98(%rbx), %r14
testq %r14, %r14
je 0x2d0a3
movl 0xb4(%rbx), %eax
cmpl $0x1, %eax
jne 0x2d090
movq (%r14), %rax
movq 0x8(%r14), %rdx
movl 0x28(%r14), %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x2d0a3
movl 0xb4(%rbx), %eax
decl %eax
movl %eax, 0xb4(%rbx)
jne 0x2d0a3
testb $0x2, 0x89(%rbx)
jne 0x2d0ab
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x134f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::UpdateResolution()
void R3SurfelBlock::
UpdateResolution(void)
{
  // Initialize resolution
  resolution = 0;

#if 0
  // Estimate resoluton based on surfel radii
  if (nsurfels > 0) {
    // Read block
    if (database) database->ReadBlock(this);

    // Sum surfel radii
    int nsamples = 1000;
    if (nsurfels < nsamples) nsamples = nsurfels;
    int step = nsurfels / nsamples;
    RNLength total_radius = 0;
    for (int i = 0; i < nsamples; i++) {
      R3Surfel *surfel = &surfels[i*step];
      RNLength radius = surfel->Radius();
      total_radius += radius;
    }

    // Resolution is samples / area
    if (RNIsZero(total_radius)) return;
    RNLength average_radius = total_radius / nsamples;
    RNScalar area = RN_PI * average_radius * average_radius;
    resolution = 1.0 / area;

    // Release block
    if (database) database->ReleaseBlock(this);
  }
#else
  // Estimate resolution based on number of surfels per cross-section of bounding box
  R3Box box = BBox();
  int dim = box.ShortestAxis();
  RNLength length1 = box.AxisLength((dim+1)%3);
  RNLength length2 = box.AxisLength((dim+2)%3);
  RNArea area = length1 * length2;
  resolution = (area > 0) ? sqrt(nsurfels / area) : 0;
#endif

  // Mark resolution uptodate
  flags.Add(R3_SURFEL_BLOCK_RESOLUTION_UPTODATE_FLAG);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq $0x0, 0x80(%rdi)
testb $0x1, 0x88(%rdi)
jne 0x2d130
movq %rbx, %rdi
callq 0x2cbbc
leaq 0x28(%rbx), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x6d354
movq %r14, %rdi
callq 0x6d8d8
leal 0x1(%rax), %ecx
movslq %ecx, %rcx
imulq $0x55555556, %rcx, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %eax, %ecx
incl %ecx
movslq %ecx, %rcx
movsd 0x20(%rsp,%rcx,8), %xmm0
subsd 0x8(%rsp,%rcx,8), %xmm0
movl %eax, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
imulq $0x55555556, %rcx, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
negl %ecx
addl %ecx, %eax
addl $0x2, %eax
cltq
movsd 0x20(%rsp,%rax,8), %xmm1
subsd 0x8(%rsp,%rax,8), %xmm1
mulsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x2d1dc
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rbx), %xmm0
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x2d1d7
sqrtsd %xmm0, %xmm0
jmp 0x2d1dc
callq 0x133c0
movsd %xmm0, 0x80(%rbx)
orb $0x2, 0x88(%rbx)
movq %rsp, %rdi
callq 0x6e174
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::UpdateFlags()
void R3SurfelBlock::
UpdateFlags(void)
{
  // Read block
  if (database) database->ReadBlock(this);

  // Reset flags
  flags.Remove(R3_SURFEL_BLOCK_HAS_ACTIVE_FLAG);
  flags.Remove(R3_SURFEL_BLOCK_HAS_NORMALS_FLAG);
  flags.Remove(R3_SURFEL_BLOCK_HAS_AERIAL_FLAG);
  flags.Remove(R3_SURFEL_BLOCK_HAS_TERRESTRIAL_FLAG);

  // Update flags
  for (int i = 0; i < nsurfels; i++) {
    if (surfels[i].IsActive()) flags.Add(R3_SURFEL_BLOCK_HAS_ACTIVE_FLAG);
    if (surfels[i].HasNormal()) flags.Add(R3_SURFEL_BLOCK_HAS_NORMALS_FLAG);
    if (surfels[i].HasTangent()) flags.Add(R3_SURFEL_BLOCK_HAS_TANGENTS_FLAG);
    if (surfels[i].IsAerial()) flags.Add(R3_SURFEL_BLOCK_HAS_AERIAL_FLAG);
    else flags.Add(R3_SURFEL_BLOCK_HAS_TERRESTRIAL_FLAG);
  }

  // Release block
  if (database) database->ReleaseBlock(this);

  // Mark flags uptodate
  flags.Add(R3_SURFEL_BLOCK_FLAGS_UPTODATE_FLAG);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x2d274
movl 0xb4(%rbx), %eax
testl %eax, %eax
jne 0x2d26c
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movl 0x28(%rdi), %ecx
movq %rbx, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x2d274
movl 0xb4(%rbx), %eax
incl %eax
movl %eax, 0xb4(%rbx)
movq $-0xf1, %rsi
andq 0x88(%rbx), %rsi
movq %rsi, 0x88(%rbx)
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x2d2ee
movq (%rbx), %rax
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movzbl 0x2f(%rax,%rdx), %edi
movl %edi, %r8d
shll $0x4, %r8d
andl $0x40, %r8d
orq %rsi, %r8
movl %edi, %esi
andl $0x40, %esi
addl %esi, %esi
movl %edi, %r9d
shll $0x3, %r9d
andl $0x8, %r9d
orq %rsi, %r9
orq %r8, %r9
xorl %esi, %esi
testb $0x2, %dil
sete %sil
shll $0x4, %esi
addq $0x10, %rsi
orq %r9, %rsi
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x2d29f
movq %rsi, 0x88(%rbx)
movq 0x98(%rbx), %r14
testq %r14, %r14
je 0x2d35a
movl 0xb4(%rbx), %eax
cmpl $0x1, %eax
jne 0x2d326
movq (%r14), %rax
movq 0x8(%r14), %rdx
movl 0x28(%r14), %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x2d35a
movl 0xb4(%rbx), %eax
decl %eax
movl %eax, 0xb4(%rbx)
jne 0x2d35a
testb $0x2, 0x89(%rbx)
je 0x2d35a
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %rbx, %rdi
callq 0x134f0
orb $0x4, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelPosition(int, gaps::R3Point const&)
void R3SurfelBlock::
SetSurfelPosition(int surfel_index, const R3Point& position)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel position (relative to position origin)
  float x = position[0] - position_origin[0];
  float y = position[1] - position_origin[1];
  float z = position[2] - position_origin[2];
  surfels[surfel_index].SetPosition(x, y, z);

  // Mark properties out of date
  flags.Remove(R3_SURFEL_BLOCK_BBOX_UPTODATE_FLAG);
  flags.Remove(R3_SURFEL_BLOCK_RESOLUTION_UPTODATE_FLAG);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d49d
movsd 0x10(%rdx), %xmm0
subsd 0x20(%rdi), %xmm0
cvtsd2ss %xmm0, %xmm0
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
movupd (%rdx), %xmm1
movupd 0x10(%rdi), %xmm2
subpd %xmm2, %xmm1
cvtpd2ps %xmm1, %xmm1
shlq $0x4, %rcx
movlpd %xmm1, (%rax,%rcx)
movss %xmm0, 0x8(%rax,%rcx)
movq $-0x104, %rax           # imm = 0xFEFC
andq 0x88(%rdi), %rax
orq $0x100, %rax            # imm = 0x100
movq %rax, 0x88(%rdi)
retq
pushq %rax
leaq 0xb098b(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelNormal(int, gaps::R3Vector const&)
void R3SurfelBlock::
SetSurfelNormal(int surfel_index, const R3Vector& normal)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel normal
  surfels[surfel_index].SetNormal(normal.X(), normal.Y(), normal.Z());

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d547
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
cvtsd2ss 0x10(%rdx), %xmm0
movupd (%rdx), %xmm1
cvtpd2ps %xmm1, %xmm1
cvtps2pd %xmm1, %xmm2
mulpd 0xb08a3(%rip), %xmm2    # 0xddd80
addpd 0xb08ab(%rip), %xmm2    # 0xddd90
shlq $0x4, %rcx
cvttpd2dq %xmm2, %xmm2
pshuflw $0xe8, %xmm2, %xmm2     # xmm2 = xmm2[0,2,2,3,4,5,6,7]
movd %xmm2, 0x10(%rax,%rcx)
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
mulsd 0xb08b9(%rip), %xmm2    # 0xdddc0
addsd 0xafc29(%rip), %xmm2    # 0xdd138
cvttsd2si %xmm2, %edx
movw %dx, 0x14(%rax,%rcx)
xorpd %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x2d538
jp 0x2d538
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
ucomiss %xmm2, %xmm1
jne 0x2d538
jp 0x2d538
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2d538
jnp 0x2d53f
addq %rcx, %rax
orb $0x40, 0x2f(%rax)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb08e1(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelTangent(int, gaps::R3Vector const&)
void R3SurfelBlock::
SetSurfelTangent(int surfel_index, const R3Vector& tangent)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel tangent
  surfels[surfel_index].SetTangent(tangent.X(), tangent.Y(), tangent.Z());

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d5f1
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
cvtsd2ss 0x10(%rdx), %xmm0
movupd (%rdx), %xmm1
cvtpd2ps %xmm1, %xmm1
cvtps2pd %xmm1, %xmm2
mulpd 0xb07f9(%rip), %xmm2    # 0xddd80
addpd 0xb0801(%rip), %xmm2    # 0xddd90
shlq $0x4, %rcx
cvttpd2dq %xmm2, %xmm2
pshuflw $0xe8, %xmm2, %xmm2     # xmm2 = xmm2[0,2,2,3,4,5,6,7]
movd %xmm2, 0x16(%rax,%rcx)
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
mulsd 0xb080f(%rip), %xmm2    # 0xdddc0
addsd 0xafb7f(%rip), %xmm2    # 0xdd138
cvttsd2si %xmm2, %edx
movw %dx, 0x1a(%rax,%rcx)
xorpd %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jne 0x2d5e2
jp 0x2d5e2
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
ucomiss %xmm2, %xmm1
jne 0x2d5e2
jp 0x2d5e2
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x2d5e2
jnp 0x2d5e9
addq %rcx, %rax
orb $0x1, 0x2f(%rax)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb0837(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelRadius(int, double)
void R3SurfelBlock::
SetSurfelRadius(int surfel_index, RNLength radius)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel normal
  surfels[surfel_index].SetRadius(radius);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d657
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0xb07a3(%rip), %xmm0    # 0xdddc8
addsd 0xafb0b(%rip), %xmm0    # 0xdd138
shlq $0x4, %rcx
cvtsd2ss %xmm0, %xmm0
movss 0xb079b(%rip), %xmm1    # 0xdddd8
minss %xmm0, %xmm1
cvttss2si %xmm1, %edx
movw %dx, 0x1c(%rax,%rcx)
movw %dx, 0x1e(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb07d1(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelRadius(int, int, double)
void R3SurfelBlock::
SetSurfelRadius(int surfel_index, int axis, RNLength radius)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel normal
  surfels[surfel_index].SetRadius(axis, radius);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d6be
cvtsd2ss %xmm0, %xmm0
movslq %esi, %rcx
cvtss2sd %xmm0, %xmm0
mulsd 0xb0741(%rip), %xmm0    # 0xdddc8
addsd 0xafaa9(%rip), %xmm0    # 0xdd138
cvtsd2ss %xmm0, %xmm0
movss 0xb073d(%rip), %xmm1    # 0xdddd8
minss %xmm0, %xmm1
cvttss2si %xmm1, %esi
movslq %edx, %rdx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movw %si, 0x1c(%rax,%rdx,2)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb076a(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelDepth(int, double)
void R3SurfelBlock::
SetSurfelDepth(int surfel_index, RNLength depth)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel normal
  surfels[surfel_index].SetDepth(depth);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d71e
movslq %esi, %rcx
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0xb06e3(%rip), %xmm0    # 0xdddd0
addsd 0xafa43(%rip), %xmm0    # 0xdd138
cvtsd2ss %xmm0, %xmm0
movss 0xb06d7(%rip), %xmm1    # 0xdddd8
minss %xmm0, %xmm1
cvttss2si %xmm1, %edx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movw %dx, 0x28(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb070a(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelElevation(int, double)
void R3SurfelBlock::
SetSurfelElevation(int surfel_index, RNLength elevation)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel normal
  surfels[surfel_index].SetElevation(elevation);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d793
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0xb0686(%rip), %xmm0    # 0xdddd0
addsd 0xaf9e6(%rip), %xmm0    # 0xdd138
cvtsd2ss %xmm0, %xmm1
movss 0xb067e(%rip), %xmm0    # 0xddddc
ucomiss %xmm1, %xmm0
ja 0x2d777
ucomiss 0xb0676(%rip), %xmm1    # 0xddde0
movaps %xmm1, %xmm0
jbe 0x2d777
movss 0xb0669(%rip), %xmm0    # 0xddde0
movslq %esi, %rcx
cvttss2si %xmm0, %edx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movw %dx, 0x2a(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb0695(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelColor(int, gaps::RNRgb const&)
void R3SurfelBlock::
SetSurfelColor(int surfel_index, const RNRgb& color)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel color
  surfels[surfel_index].SetColor(color);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d7fb
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movsd 0xb0625(%rip), %xmm0    # 0xddde8
movsd (%rdx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %esi
movb %sil, 0x2c(%rax,%rcx)
movsd 0x8(%rdx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %esi
movb %sil, 0x2d(%rax,%rcx)
mulsd 0x10(%rdx), %xmm0
cvttsd2si %xmm0, %edx
movb %dl, 0x2e(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb062d(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelTimestamp(int, double)
void R3SurfelBlock::
SetSurfelTimestamp(int surfel_index, RNScalar timestamp)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel timestamp (relative to timestamp_origin)
  surfels[surfel_index].SetTimestamp(timestamp - timestamp_origin);

  // Remember that timestamp range is out of date
  timestamp_range.Empty();

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d855
movslq %esi, %rcx
subsd 0x60(%rdi), %xmm0
cvtsd2ss %xmm0, %xmm0
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movss %xmm0, 0xc(%rax,%rcx)
leaq 0x1063df(%rip), %rax    # 0x133c18
movsd (%rax), %xmm0
movsd %xmm0, 0x68(%rdi)
xorps 0xafb57(%rip), %xmm0    # 0xdd3a0
movlps %xmm0, 0x70(%rdi)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb05d3(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelAttribute(int, unsigned int)
void R3SurfelBlock::
SetSurfelAttribute(int surfel_index, unsigned int attribute)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel attribute
  surfels[surfel_index].SetAttribute(attribute);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d8c5
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movl %edx, 0x24(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb0563(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelActive(int, int)
void R3SurfelBlock::
SetSurfelActive(int surfel_index, RNBoolean active)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel active
  surfels[surfel_index].SetActive(active);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d90d
movslq %esi, %rcx
testl %edx, %edx
setne %dl
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x2f(%rax,%rcx), %sil
andb $-0x5, %sil
shlb $0x2, %dl
orb %sil, %dl
movb %dl, 0x2f(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb051b(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelAerial(int, int)
void R3SurfelBlock::
SetSurfelAerial(int surfel_index, RNBoolean aerial)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel aerial
  surfels[surfel_index].SetAerial(aerial);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d954
movslq %esi, %rcx
testl %edx, %edx
setne %dl
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x2f(%rax,%rcx), %sil
andb $-0x3, %sil
addb %dl, %dl
orb %sil, %dl
movb %dl, 0x2f(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb04d4(%rip), %rdi     # 0xdde30
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelFlags(int, unsigned char)
void R3SurfelBlock::
SetSurfelFlags(int surfel_index, unsigned char flags)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel property for non-resident block\n");
    abort();
  }

  // Set surfel mark
  surfels[surfel_index].SetFlags(flags);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d987
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb %dl, 0x2f(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb04d7(%rip), %rdi     # 0xdde66
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelSilhouetteBoundary(int, int)
void R3SurfelBlock::
SetSurfelSilhouetteBoundary(int surfel_index, RNBoolean boundary)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel property for non-resident block\n");
    abort();
  }

  // Set surfel mark
  surfels[surfel_index].SetSilhouetteBoundary(boundary);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2d9cf
movslq %esi, %rcx
testl %edx, %edx
setne %dl
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x2f(%rax,%rcx), %sil
andb $-0x11, %sil
shlb $0x4, %dl
orb %sil, %dl
movb %dl, 0x2f(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb048f(%rip), %rdi     # 0xdde66
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelShadowBoundary(int, int)
void R3SurfelBlock::
SetSurfelShadowBoundary(int surfel_index, RNBoolean boundary)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel property for non-resident block\n");
    abort();
  }

  // Set surfel mark
  surfels[surfel_index].SetShadowBoundary(boundary);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2da17
movslq %esi, %rcx
testl %edx, %edx
setne %dl
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x2f(%rax,%rcx), %sil
andb $-0x21, %sil
shlb $0x5, %dl
orb %sil, %dl
movb %dl, 0x2f(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb0447(%rip), %rdi     # 0xdde66
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelBorderBoundary(int, int)
void R3SurfelBlock::
SetSurfelBorderBoundary(int surfel_index, RNBoolean boundary)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel property for non-resident block\n");
    abort();
  }

  // Set surfel mark
  surfels[surfel_index].SetBorderBoundary(boundary);

  // Remember that block is dirty
  SetDirty();
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2da64
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x2f(%rax,%rcx), %sil
andb $-0x31, %sil
testl %edx, %edx
movl $0x30, %r8d
cmovel %edx, %r8d
orb %sil, %r8b
movb %r8b, 0x2f(%rax,%rcx)
orb $0x1, 0x89(%rdi)
retq
pushq %rax
leaq 0xb03fa(%rip), %rdi     # 0xdde66
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelMark(int, int)
void R3SurfelBlock::
SetSurfelMark(int surfel_index, RNBoolean mark)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel property for non-resident block\n");
    abort();
  }

  // Set surfel mark
  surfels[surfel_index].SetMark(mark);
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x2daa4
movslq %esi, %rcx
testl %edx, %edx
setne %dl
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x2f(%rax,%rcx), %sil
andb $0x7f, %sil
shlb $0x7, %dl
orb %sil, %dl
movb %dl, 0x2f(%rax,%rcx)
retq
pushq %rax
leaq 0xb03ba(%rip), %rdi     # 0xdde66
xorl %eax, %eax
callq 0xac81a
callq 0x132b0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetMarks(int)
void R3SurfelBlock::
SetMarks(RNBoolean mark)
{
  // Check surfels
  if (!mark && !surfels) return;

  // Set mark for all surfels
  for (int i = 0; i < nsurfels; i++) {
    surfels[i].SetMark(mark);
  }
}

// Assembly:
testl %esi, %esi
sete %cl
movq (%rdi), %rax
testq %rax, %rax
sete %dl
testb %dl, %cl
jne 0x2daff
movslq 0x8(%rdi), %rdx
testq %rdx, %rdx
jle 0x2daff
testl %esi, %esi
setne %cl
shlb $0x7, %cl
shlq $0x4, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
movb 0x2f(%rax,%rsi), %dil
andb $0x7f, %dil
orb %cl, %dil
movb %dil, 0x2f(%rax,%rsi)
addq $0x30, %rsi
cmpq %rsi, %rdx
jne 0x2dae5
retq