LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/./R3Surfel.h
// Function: gaps::R3Surfel::SetNormal(float, float, float)
inline void R3Surfel::
SetNormal(float x, float y, float z)
{
  // Set normal
  normal[0] = (RNInt16) (32767.0 * x + 0.5);
  normal[1] = (RNInt16) (32767.0 * y + 0.5);
  normal[2] = (RNInt16) (32767.0 * z + 0.5);

  // Update flags
  if ((x != 0) || (y != 0) || (z != 0)) flags |= R3_SURFEL_NORMAL_FLAG;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movss %xmm0, -0xc(%rsp)
movss %xmm1, -0x10(%rsp)
movss %xmm2, -0x14(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movss -0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x15d65d(%rip), %xmm2   # 0x1a4ec0
mulsd %xmm2, %xmm0
movsd 0x15c8e9(%rip), %xmm1   # 0x1a4158
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x10(%rax)
movss -0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x12(%rax)
movss -0x14(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x14(%rax)
movss -0xc(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x478e1
jp 0x478e1
movss -0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x478e1
jp 0x478e1
movss -0x14(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x478e1
jp 0x478e1
jmp 0x478f0
movq -0x20(%rsp), %rax
movzbl 0x2f(%rax), %ecx
orl $0x40, %ecx
movb %cl, 0x2f(%rax)
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/./R3Surfel.h
// Function: gaps::R3Surfel::SetTangent(float, float, float)
inline void R3Surfel::
SetTangent(float x, float y, float z)
{
  // Set tangent
  tangent[0] = (RNInt16) (32767.0 * x + 0.5);
  tangent[1] = (RNInt16) (32767.0 * y + 0.5);
  tangent[2] = (RNInt16) (32767.0 * z + 0.5);

  // Update flags
  if ((x != 0) || (y != 0) || (z != 0)) flags |= R3_SURFEL_TANGENT_FLAG;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movss %xmm0, -0xc(%rsp)
movss %xmm1, -0x10(%rsp)
movss %xmm2, -0x14(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movss -0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x15d58d(%rip), %xmm2   # 0x1a4ec0
mulsd %xmm2, %xmm0
movsd 0x15c819(%rip), %xmm1   # 0x1a4158
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x16(%rax)
movss -0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x18(%rax)
movss -0x14(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x1a(%rax)
movss -0xc(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x479b1
jp 0x479b1
movss -0x10(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x479b1
jp 0x479b1
movss -0x14(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x479b1
jp 0x479b1
jmp 0x479c0
movq -0x20(%rsp), %rax
movzbl 0x2f(%rax), %ecx
orl $0x1, %ecx
movb %cl, 0x2f(%rax)
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/./R3Surfel.h
// Function: gaps::R3Surfel::SetRadius(float)
inline void R3Surfel::
SetRadius(float radius)
{
  // Set radius
  float r = 8192.0 * radius + 0.5;
  if (r > 65535) r = 65535;
  this->radius[0] = (RNUInt16) r;
  this->radius[1] = this->radius[0];
}

// Assembly:
movq %rdi, -0x8(%rsp)
movss %xmm0, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movss -0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x15d4d1(%rip), %xmm1   # 0x1a4ec8
mulsd %xmm1, %xmm0
movsd 0x15c755(%rip), %xmm1   # 0x1a4158
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x10(%rsp)
movss -0x10(%rsp), %xmm0
movss 0x15d4b9(%rip), %xmm1   # 0x1a4ed8
ucomiss %xmm1, %xmm0
jbe 0x47a32
movss 0x15d4ac(%rip), %xmm0   # 0x1a4ed8
movss %xmm0, -0x10(%rsp)
movq -0x18(%rsp), %rax
cvttss2si -0x10(%rsp), %ecx
movw %cx, 0x1c(%rax)
movw 0x1c(%rax), %cx
movw %cx, 0x1e(%rax)
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/./R3Surfel.h
// Function: gaps::R3Surfel::SetElevation(float)
inline void R3Surfel::
SetElevation(float elevation)
{
  // Set elevation
  float d = 400.0 * elevation + 0.5;
  if (d < -32767) d = -32767;
  else if (d > 32767) d = 32767;
  this->elevation = (RNInt16) d;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movss %xmm0, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movss -0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x15d319(%rip), %xmm1   # 0x1a4ed0
mulsd %xmm1, %xmm0
movsd 0x15c595(%rip), %xmm1   # 0x1a4158
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x10(%rsp)
movss 0x15d303(%rip), %xmm0   # 0x1a4edc
ucomiss -0x10(%rsp), %xmm0
jbe 0x47bf0
movss 0x15d2f4(%rip), %xmm0   # 0x1a4edc
movss %xmm0, -0x10(%rsp)
jmp 0x47c13
movss -0x10(%rsp), %xmm0
movss 0x15d2e2(%rip), %xmm1   # 0x1a4ee0
ucomiss %xmm1, %xmm0
jbe 0x47c11
movss 0x15d2d5(%rip), %xmm0   # 0x1a4ee0
movss %xmm0, -0x10(%rsp)
jmp 0x47c13
movq -0x18(%rsp), %rax
movss -0x10(%rsp), %xmm0
cvttss2si %xmm0, %ecx
movw %cx, 0x2a(%rax)
retq
nopw (%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0xb8(%rax)
je 0x4a1f6
movq 0x8(%rsp), %rsi
movq 0xb8(%rsi), %rdi
movq (%rdi), %rax
movq 0x30(%rax), %rax
callq *%rax
jmp 0x4a1f4
jmp 0x4a1f6
movq 0x8(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4a21e
movq 0x8(%rsp), %rsi
movq 0x98(%rsi), %rdi
movq (%rdi), %rax
movq 0x18(%rax), %rax
callq *%rax
jmp 0x4a21c
jmp 0x4a21e
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x4a246
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x4a244
movq (%rsp), %rdi
callq 0x13750
jmp 0x4a246
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
callq 0x1b990
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x187d0
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::BBox() const
const R3Box& R3SurfelBlock::
BBox(void) const
{
  // Update bbox
  if (!flags[R3_SURFEL_BLOCK_BBOX_UPTODATE_FLAG]) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateBBox();
  }

  // Return bbox
  return bbox;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
addq $0x88, %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x31a20
cmpl $0x0, %eax
jne 0x4a553
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4a560
movq (%rsp), %rax
addq $0x28, %rax
addq $0x28, %rsp
retq
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x98(%rax)
je 0x4a58e
movq 0x20(%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x31140
movq 0x20(%rsp), %rdi
addq $0x28, %rdi
leaq 0x1b2d6a(%rip), %rsi    # 0x1fd308
callq 0x1bd40
movl $0x0, 0x6c(%rsp)
movq 0x20(%rsp), %rcx
movl 0x6c(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x4a63e
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movslq 0x6c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x4feb0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x60(%rsp)
addq $0x28, %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x60(%rsp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq 0x60(%rsp), %rax
movss 0x8(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
leaq 0x48(%rsp), %rdi
callq 0xf8350
movq 0x18(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xcb9d0
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x4a5ab
movq 0x20(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4a65e
movq 0x20(%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x311c0
movq 0x20(%rsp), %rsi
movq %rsi, %rax
addq $0x28, %rax
movq %rax, 0x8(%rsp)
addq $0x10, %rsi
leaq 0x30(%rsp), %rdi
callq 0x4f890
movq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xcb990
movq 0x20(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x1c2d0
addq $0x78, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x5b4dc5(%rip), %rsi    # 0x5ff4b0
callq 0x144dc0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4a710
movq 0x10(%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x31140
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rcx
movl 0x24(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x4a756
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x4fbb0
movq (%rsp), %rdi
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x4fbf0
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x4a718
movq 0x10(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4a776
movq 0x10(%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x311c0
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::TimestampRange() const
const RNInterval& R3SurfelBlock::
TimestampRange(void) const
{
  // Update timestamp range
  if (timestamp_range.IsEmpty()) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateTimestampRange();
  }

  // Return timestamp range
  return timestamp_range;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x68, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x4a7b3
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x4a7c0
movq (%rsp), %rax
addq $0x68, %rax
addq $0x18, %rsp
retq
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x98(%rax)
je 0x4a7ec
movq (%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x31140
movq (%rsp), %rax
leaq 0x5b4cb9(%rip), %rcx    # 0x5ff4b0
movq (%rcx), %rdx
movq %rdx, 0x68(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x70(%rax)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x4a85d
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x45410
movq (%rsp), %rdi
movss %xmm0, 0x8(%rsp)
addq $0x68, %rdi
movss 0x8(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x4fbf0
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4a80e
movq (%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4a87b
movq (%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x311c0
movq (%rsp), %rdi
movsd 0x60(%rdi), %xmm0
addq $0x68, %rdi
callq 0x4fec0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::MinIdentifier() const
unsigned int R3SurfelBlock::
MinIdentifier(void) const
{
  // Update min identifier
  if (max_identifier < min_identifier) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateIdentifierRange();
  }

  // Return min identifier
  return min_identifier;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movl 0x7c(%rcx), %eax
cmpl 0x78(%rcx), %eax
jae 0x4a8cd
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x4a8e0
movq (%rsp), %rax
movl 0x78(%rax), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x98(%rax)
je 0x4a90c
movq (%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x31140
movq (%rsp), %rax
movl $0xffffffff, 0x78(%rax) # imm = 0xFFFFFFFF
movl $0x0, 0x7c(%rax)
movl $0x0, 0xc(%rsp)
movq (%rsp), %rcx
movl 0xc(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x4a98e
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x31f20
movq (%rsp), %rcx
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x78(%rcx), %eax
jae 0x4a967
movq (%rsp), %rax
movl 0x8(%rsp), %ecx
movl %ecx, 0x78(%rax)
movq (%rsp), %rcx
movl 0x8(%rsp), %eax
cmpl 0x7c(%rcx), %eax
jbe 0x4a97f
movq (%rsp), %rax
movl 0x8(%rsp), %ecx
movl %ecx, 0x7c(%rax)
jmp 0x4a981
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x4a926
movq (%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4a9ac
movq (%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x311c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::MaxIdentifier() const
unsigned int R3SurfelBlock::
MaxIdentifier(void) const
{
  // Update max identifier
  if (max_identifier < min_identifier) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateIdentifierRange();
  }

  // Return max identifier
  return max_identifier;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movl 0x7c(%rcx), %eax
cmpl 0x78(%rcx), %eax
jae 0x4a9ed
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x4a8e0
movq (%rsp), %rax
movl 0x7c(%rax), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::Resolution() const
RNScalar R3SurfelBlock::
Resolution(void) const
{
  // Update resolution
  if (!flags[R3_SURFEL_BLOCK_RESOLUTION_UPTODATE_FLAG]) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateResolution();
  }

  // Return resolution
  return resolution;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
addq $0x88, %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x1b970
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x31a20
cmpl $0x0, %eax
jne 0x4aa53
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4aa70
movq (%rsp), %rax
movsd 0x80(%rax), %xmm0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::HasActive() const
RNBoolean R3SurfelBlock::
HasActive(void) const
{
  // Update active flags
  if (!flags[R3_SURFEL_BLOCK_FLAGS_UPTODATE_FLAG]) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateFlags();
  }

   // Return whether block has active 
  return flags[R3_SURFEL_BLOCK_HAS_ACTIVE_FLAG];
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x88, %rax
movq %rax, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x1b970
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x31a20
cmpl $0x0, %eax
jne 0x4ac75
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x4acb0
movq 0x8(%rsp), %rax
addq $0x88, %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x40, %esi
callq 0x1b970
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x31a20
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::HasTangents() const
RNBoolean R3SurfelBlock::
HasTangents(void) const
{
  // Update tangents flags
  if (!flags[R3_SURFEL_BLOCK_FLAGS_UPTODATE_FLAG]) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateFlags();
  }

   // Return whether block has tangents 
  return flags[R3_SURFEL_BLOCK_HAS_TANGENTS_FLAG];
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x88, %rax
movq %rax, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x1b970
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x31a20
cmpl $0x0, %eax
jne 0x4b0a5
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x4acb0
movq 0x8(%rsp), %rax
addq $0x88, %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x8, %esi
callq 0x1b970
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x31a20
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::HasAerial() const
RNBoolean R3SurfelBlock::
HasAerial(void) const
{
  // Update aerial/terrestrial flags
  if (!flags[R3_SURFEL_BLOCK_FLAGS_UPTODATE_FLAG]) {
    R3SurfelBlock *block = (R3SurfelBlock *) this;
    block->UpdateFlags();
  }

   // Return whether block has aerial scanner points
  return flags[R3_SURFEL_BLOCK_HAS_AERIAL_FLAG];
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0x88, %rax
movq %rax, 0x10(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x1b970
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x31a20
cmpl $0x0, %eax
jne 0x4b135
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x4acb0
movq 0x8(%rsp), %rax
addq $0x88, %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x10, %esi
callq 0x1b970
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x31a20
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, (%rax)
jne 0x4b365
leaq 0x159bab(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x50(%rsp), %rdi
xorl %esi, %esi
callq 0x1bba0
movq 0x28(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0x10, %rdi
xorl %esi, %esi
callq 0x1bde0
movsd (%rsp), %xmm0
subsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x4c(%rsp)
movq 0x50(%rsp), %rdi
movl $0x1, %esi
callq 0x1bba0
movq 0x28(%rsp), %rdi
movsd %xmm0, 0x8(%rsp)
addq $0x10, %rdi
movl $0x1, %esi
callq 0x1bde0
movsd 0x8(%rsp), %xmm0
subsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movl $0x2, %esi
callq 0x1bba0
movq 0x28(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x10, %rdi
movl $0x2, %esi
callq 0x1bde0
movsd 0x10(%rsp), %xmm0
movq %rax, %rcx
movq 0x28(%rsp), %rax
subsd (%rcx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x44(%rsp)
movq (%rax), %rdi
movslq 0x5c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movss 0x4c(%rsp), %xmm0
movss 0x48(%rsp), %xmm1
movss 0x44(%rsp), %xmm2
callq 0x44cd0
movq 0x28(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x18(%rsp)
leaq 0x38(%rsp), %rdi
movl $0x1, %esi
callq 0x1b970
movq 0x18(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x31a80
movq 0x28(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x20(%rsp)
leaq 0x30(%rsp), %rdi
movl $0x2, %esi
callq 0x1b970
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x31a80
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x68, %rsp
retq
nop
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, (%rax)
jne 0x4b4e5
leaq 0x159a2b(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x18(%rsp), %rax
movq (%rax), %rax
movslq 0x2c(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31c70
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31c80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31c90
movq 0x8(%rsp), %rdi
movss 0x10(%rsp), %xmm1
movaps %xmm0, %xmm2
movss 0x14(%rsp), %xmm0
cvtsd2ss %xmm2, %xmm2
callq 0x47830
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, (%rax)
jne 0x4b5a5
leaq 0x15996b(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x18(%rsp), %rax
movq (%rax), %rax
movslq 0x2c(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31c70
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31c80
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31c90
movq 0x8(%rsp), %rdi
movss 0x10(%rsp), %xmm1
movaps %xmm0, %xmm2
movss 0x14(%rsp), %xmm0
cvtsd2ss %xmm2, %xmm2
callq 0x47900
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x4b666
leaq 0x1598aa(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x1c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movsd 0x10(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x479d0
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x4b6da
leaq 0x159836(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x1c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x18(%rsp), %esi
movsd 0x10(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x47a90
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x4b756
leaq 0x1597ba(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x1c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movsd 0x10(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x47b10
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x4b7c6
leaq 0x15974a(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x1c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movsd 0x10(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x47b90
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x4b835
leaq 0x1596db(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x1c(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x4fc50
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movsd %xmm0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x4b8a6
leaq 0x15966a(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x1c(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rdi
movsd 0x10(%rsp), %xmm0
subsd 0x60(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
callq 0x4fa40
movq 0x8(%rsp), %rdi
addq $0x68, %rdi
callq 0x4fce0
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x28, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::SetSurfelIdentifier(int, unsigned int)
void R3SurfelBlock::
SetSurfelIdentifier(int surfel_index, unsigned int identifier)
{
  // Check if surfels are resident
  if (!surfels) {
    RNFail("Unable to set surfel position for non-resident block\n");
    abort();
  }

  // Set surfel identifier
  surfels[surfel_index].SetIdentifier(identifier);

  // Remember that identifier range is out of date
  min_identifier = UINT_MAX;
  max_identifier = 0;

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

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4b923
leaq 0x1595ed(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x4fab0
movq (%rsp), %rdi
movl $0xffffffff, 0x78(%rdi) # imm = 0xFFFFFFFF
movl $0x0, 0x7c(%rdi)
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4b993
leaq 0x15957d(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x4faf0
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4ba03
leaq 0x15950d(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x4fd30
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4ba73
leaq 0x15949d(%rip), %rdi    # 0x1a4f04
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x44d50
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movb %dl, %al
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movb %al, 0xb(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4bae5
leaq 0x159461(%rip), %rdi    # 0x1a4f3a
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movzbl 0xb(%rsp), %esi
callq 0x4fb30
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4bb53
leaq 0x1593f3(%rip), %rdi    # 0x1a4f3a
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x4fd70
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4bbc3
leaq 0x159383(%rip), %rdi    # 0x1a4f3a
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x4fdb0
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x4b240
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x4bca3
leaq 0x1592a3(%rip), %rdi    # 0x1a4f3a
movb $0x0, %al
callq 0x1464b0
callq 0x132d0
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0xc(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0x8(%rsp), %esi
callq 0x4fe30
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x4bcf9
movq (%rsp), %rax
cmpq $0x0, (%rax)
jne 0x4bcf9
jmp 0x4bd37
movl $0x0, 0x8(%rsp)
movq (%rsp), %rcx
movl 0x8(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x4bd37
movq (%rsp), %rax
movq (%rax), %rdi
movslq 0x8(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl 0xc(%rsp), %esi
callq 0x4fe30
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4bd01
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::UpdateProperties()
void R3SurfelBlock::
UpdateProperties(void)
{
  // Read block
  if (database) database->ReadBlock(this);

  // Update properties
  double dummy = 0;
  dummy += BBox().Min().X();
  dummy += TimestampRange().Min();
  dummy += MinIdentifier();
  dummy += MaxIdentifier();
  dummy += Resolution();
  dummy += (HasAerial()) ? 1 : 2;
  if (dummy == 927612.21242) {
    printf("Amazing!\n");
  }

  // Update normals
  UpdateSurfelNormals();

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

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x98(%rax)
je 0x4c3ac
movq (%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x31140
movq (%rsp), %rdi
movq $0x0, 0x8(%rsp)
callq 0x4a500
movq %rax, %rdi
callq 0x1c110
movq %rax, %rdi
callq 0x187b0
movq (%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x4a780
movq %rax, %rdi
callq 0x1bc30
movq (%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x4a8a0
movq (%rsp), %rdi
movl %eax, %eax
cvtsi2sd %rax, %xmm1
movsd 0x8(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x4a9c0
movq (%rsp), %rdi
movl %eax, %eax
cvtsi2sd %rax, %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x4aa00
movq (%rsp), %rdi
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x4b0e0
movl %eax, %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
cvtsi2sd %eax, %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd 0x157eb1(%rip), %xmm1   # 0x1a4340
ucomisd %xmm1, %xmm0
jne 0x4c4a5
jp 0x4c4a5
leaq 0x157ed0(%rip), %rdi    # 0x1a436e
movb $0x0, %al
callq 0x13070
movq (%rsp), %rdi
callq 0x4c4e0
movq (%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0x4c4cc
movq (%rsp), %rsi
movq 0x98(%rsi), %rdi
callq 0x311c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::Print(_IO_FILE*, char const*, char const*) const
void R3SurfelBlock::
Print(FILE *fp, const char *prefix, const char *suffix) const
{
  // Check fp
  if (!fp) fp = stdout;

  // Print block
  if (prefix) fprintf(fp, "%s", prefix);
  fprintf(fp, "%d %d", DatabaseIndex(), NSurfels());
  if (suffix) fprintf(fp, "%s", suffix);
  fprintf(fp, "\n");
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x4cca9
movq 0x1a62ef(%rip), %rax    # 0x1f2f90
movq (%rax), %rax
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x4ccc9
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rdx
leaq 0x15a901(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
callq 0x31b10
movq 0x10(%rsp), %rdi
movl %eax, 0xc(%rsp)
callq 0x1c0e0
movq (%rsp), %rdi
movl 0xc(%rsp), %edx
movl %eax, %ecx
leaq 0x157bbd(%rip), %rsi    # 0x1a48b8
movb $0x0, %al
callq 0x13810
cmpq $0x0, 0x18(%rsp)
je 0x4cd22
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x15a8a8(%rip), %rsi    # 0x1a75c3
movb $0x0, %al
callq 0x13810
movq 0x28(%rsp), %rdi
leaq 0x15e9c4(%rip), %rsi    # 0x1ab6f2
movb $0x0, %al
callq 0x13810
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ReadFile(char const*)
int R3SurfelBlock::
ReadFile(const char *filename)
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .ply)\n", filename);
    return 0;
  }

  // Read file of appropriate type
  if (!strncmp(extension, ".obj", 4)) {
    return ReadOBJFile(filename);
  }
  else if (!strncmp(extension, ".ply", 4)) {
    return ReadPlyFile(filename);
  }
  else if (!strncmp(extension, ".xyz", 4)) {
    return ReadXYZAsciiFile(filename);
  }
  else if (!strncmp(extension, ".bin", 4)) {
    return ReadXYZBinaryFile(filename);
  }
  else if (!strncmp(extension, ".blk", 4)) {
    return ReadBinaryFile(filename);
  }
  else if (!strncmp(extension, ".upc", 4)) {
    return ReadUPCFile(filename);
  }
  else { 
    RNFail("Unable to read file %s (unrecognized extension: %s)\n", filename, extension); 
    return 0; 
  }

  // Should never get here
  return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movl $0x2e, %esi
callq 0x13630
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4cd91
movq 0x10(%rsp), %rsi
leaq 0x1581f3(%rip), %rdi    # 0x1a4f70
movb $0x0, %al
callq 0x13070
movl $0x0, 0x24(%rsp)
jmp 0x4ced4
movq 0x8(%rsp), %rdi
leaq 0x1581fe(%rip), %rsi    # 0x1a4f9b
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4cdc3
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4cee0
movl %eax, 0x24(%rsp)
jmp 0x4ced4
movq 0x8(%rsp), %rdi
leaq 0x1581d1(%rip), %rsi    # 0x1a4fa0
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4cdf5
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4cf90
movl %eax, 0x24(%rsp)
jmp 0x4ced4
movq 0x8(%rsp), %rdi
leaq 0x1581a4(%rip), %rsi    # 0x1a4fa5
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4ce27
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4d040
movl %eax, 0x24(%rsp)
jmp 0x4ced4
movq 0x8(%rsp), %rdi
leaq 0x158177(%rip), %rsi    # 0x1a4faa
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4ce56
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4d0f0
movl %eax, 0x24(%rsp)
jmp 0x4ced4
movq 0x8(%rsp), %rdi
leaq 0x15814d(%rip), %rsi    # 0x1a4faf
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4ce85
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4d1a0
movl %eax, 0x24(%rsp)
jmp 0x4ced4
movq 0x8(%rsp), %rdi
leaq 0x158123(%rip), %rsi    # 0x1a4fb4
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4ceb4
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4d250
movl %eax, 0x24(%rsp)
jmp 0x4ced4
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x15756b(%rip), %rdi    # 0x1a4430
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ReadOBJFile(char const*)
int R3SurfelBlock::
ReadOBJFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "r"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadOBJ(fp)) {
    RNFail("Unable to read OBJ file %s\n", filename);
    fclose(fp);
    return 0;
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x15e450(%rip), %rsi    # 0x1ab353
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4cf30
movq 0x10(%rsp), %rsi
leaq 0x157587(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4cf7c
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4d530
cmpl $0x0, %eax
jne 0x4cf6a
movq 0x10(%rsp), %rsi
leaq 0x15806a(%rip), %rdi    # 0x1a4fb9
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4cf7c
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ReadPlyFile(char const*)
int R3SurfelBlock::
ReadPlyFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "r"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadPly(fp)) {
    RNFail("Unable to read ply file %s\n", filename);
    fclose(fp);
    return 0;
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x15e3a0(%rip), %rsi    # 0x1ab353
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4cfe0
movq 0x10(%rsp), %rsi
leaq 0x1574d7(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d02c
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4d980
cmpl $0x0, %eax
jne 0x4d01a
movq 0x10(%rsp), %rsi
leaq 0x158035(%rip), %rdi    # 0x1a5034
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4d02c
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ReadXYZAsciiFile(char const*)
int R3SurfelBlock::
ReadXYZAsciiFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "r"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadXYZAscii(fp)) {
    RNFail("Unable to read XYZ file %s\n", filename);
    fclose(fp);
    return 0;
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x15e2f0(%rip), %rsi    # 0x1ab353
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4d090
movq 0x10(%rsp), %rsi
leaq 0x157427(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d0dc
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4e080
cmpl $0x0, %eax
jne 0x4d0ca
movq 0x10(%rsp), %rsi
leaq 0x157fbd(%rip), %rdi    # 0x1a506c
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4d0dc
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)