LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ReadXYZBinaryFile(char const*)
int R3SurfelBlock::
ReadXYZBinaryFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "rb"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadXYZBinary(fp)) {
    RNFail("Unable to read XYZ binary 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 0x1570e2(%rip), %rsi    # 0x1a41f5
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4d140
movq 0x10(%rsp), %rsi
leaq 0x157377(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d18c
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4e5b0
cmpl $0x0, %eax
jne 0x4d17a
movq 0x10(%rsp), %rsi
leaq 0x157f5d(%rip), %rdi    # 0x1a50bc
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4d18c
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::ReadBinaryFile(char const*)
int R3SurfelBlock::
ReadBinaryFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "rb"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadBinary(fp)) {
    RNFail("Unable to read surfel 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 0x157032(%rip), %rsi    # 0x1a41f5
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4d1f0
movq 0x10(%rsp), %rsi
leaq 0x1572c7(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d23c
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4eaa0
cmpl $0x0, %eax
jne 0x4d22a
movq 0x10(%rsp), %rsi
leaq 0x157ee9(%rip), %rdi    # 0x1a50f8
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4d23c
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::ReadUPCFile(char const*)
int R3SurfelBlock::
ReadUPCFile(const char *filename)
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "rb"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadUPC(fp)) {
    RNFail("Unable to read surfel file %s\n", filename);
    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 0x156f82(%rip), %rsi    # 0x1a41f5
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4d2a0
movq 0x10(%rsp), %rsi
leaq 0x157217(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d2e2
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4ef20
cmpl $0x0, %eax
jne 0x4d2d0
movq 0x10(%rsp), %rsi
leaq 0x157e39(%rip), %rdi    # 0x1a50f8
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d2e2
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::WriteFile(char const*) const
int R3SurfelBlock::
WriteFile(const char *filename) const
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .ply)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strncmp(extension, ".xyz", 4)) {
    return WriteXYZAsciiFile(filename);
  }
  else if (!strncmp(extension, ".blk", 4)) {
    return WriteBinaryFile(filename);
  }
  else { 
    RNFail("Unable to write 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 0x4d33e
movq 0x10(%rsp), %rsi
leaq 0x157c43(%rip), %rdi    # 0x1a4f70
movb $0x0, %al
callq 0x13070
movl $0x0, 0x24(%rsp)
jmp 0x4d3bc
movq 0x8(%rsp), %rdi
leaq 0x157c5b(%rip), %rsi    # 0x1a4fa5
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4d36d
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4d3d0
movl %eax, 0x24(%rsp)
jmp 0x4d3bc
movq 0x8(%rsp), %rdi
leaq 0x157c36(%rip), %rsi    # 0x1a4faf
movl $0x4, %edx
callq 0x13260
cmpl $0x0, %eax
jne 0x4d39c
movq (%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x4d480
movl %eax, 0x24(%rsp)
jmp 0x4d3bc
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x1570c3(%rip), %rdi    # 0x1a4470
movb $0x0, %al
callq 0x1464b0
movl $0x0, 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::WriteXYZAsciiFile(char const*) const
int R3SurfelBlock::
WriteXYZAsciiFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "w"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Write file
  if (!WriteXYZAscii(fp)) {
    RNFail("Unable to write 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 0x159b0b(%rip), %rsi    # 0x1a6efe
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4d420
movq 0x10(%rsp), %rsi
leaq 0x157097(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d46c
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4e4a0
cmpl $0x0, %eax
jne 0x4d45a
movq 0x10(%rsp), %rsi
leaq 0x157c49(%rip), %rdi    # 0x1a5088
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4d46c
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::WriteBinaryFile(char const*) const
int R3SurfelBlock::
WriteBinaryFile(const char *filename) const
{
  // Open file
  FILE *fp;
  if (!(fp = fopen(filename, "wb"))) {
    RNFail("Unable to open file %s\n", filename);
    return 0;
  }

  // Write file
  if (!WriteBinary(fp)) {
    RNFail("Unable to write surfel 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 0x157c74(%rip), %rsi    # 0x1a5117
callq 0x13690
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x4d4d0
movq 0x10(%rsp), %rsi
leaq 0x156fe7(%rip), %rdi    # 0x1a44a6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x24(%rsp)
jmp 0x4d51c
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4ed60
cmpl $0x0, %eax
jne 0x4d50a
movq 0x10(%rsp), %rsi
leaq 0x157c2b(%rip), %rdi    # 0x1a511a
movb $0x0, %al
callq 0x1464b0
movq 0x8(%rsp), %rdi
callq 0x13560
movl $0x0, 0x24(%rsp)
jmp 0x4d51c
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::WriteXYZAscii(_IO_FILE*) const
int R3SurfelBlock::
WriteXYZAscii(FILE *fp) const
{
  // Write surfels
  for (int i = 0; i < NSurfels(); i++) {
    const R3Surfel *surfel = Surfel(i);
    const float *position = surfel->PositionPtr();
    const unsigned char *color = surfel->ColorPtr();
    fprintf(fp, "%g %g %g ", position[0], position[1], position[2]);
    fprintf(fp, "%u %u %u ", color[0], color[1], color[2]);
    fprintf(fp, "0 0\n");
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x34(%rsp)
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x1c0e0
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x4e59e
movq 0x10(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x43660
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x4feb0
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
callq 0x4ff80
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rax
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movq 0x20(%rsp), %rax
movss 0x4(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
movq 0x20(%rsp), %rax
movss 0x8(%rax), %xmm2
cvtss2sd %xmm2, %xmm2
leaq 0x15633e(%rip), %rsi    # 0x1a4884
movb $0x3, %al
callq 0x13810
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rax
movzbl (%rax), %edx
movq 0x18(%rsp), %rax
movzbl 0x1(%rax), %ecx
movq 0x18(%rsp), %rax
movzbl 0x2(%rax), %r8d
leaq 0x156b3e(%rip), %rsi    # 0x1a50b2
movb $0x0, %al
callq 0x13810
movq 0x38(%rsp), %rdi
leaq 0x157ee3(%rip), %rsi    # 0x1a646a
movb $0x0, %al
callq 0x13810
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x4e4c0
movl $0x1, %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::WriteBinary(_IO_FILE*) const
int R3SurfelBlock::
WriteBinary(FILE *fp) const
{
  // Write number of surfels
  int nsurfels = NSurfels();
  if (fwrite(&nsurfels, sizeof(int), 1, fp) != (size_t) 1) {
    RNFail("Unable to write number of surfels\n");
    return 0;
  }

  // Write bounding box
  if (fwrite(&bbox, sizeof(R3Box), 1, fp) != (size_t) 1) {
    RNFail("Unable to write bounding box of surfel block\n");
    return 0;
  }

  // Write resolution
  if (fwrite(&resolution, sizeof(R3Box), 1, fp) != (size_t) 1) {
    RNFail("Unable to write resolution of surfel block\n");
    return 0;
  }

  // Write flags
  RNFlags tmp = flags; tmp.Remove(R3_SURFEL_BLOCK_DATABASE_FLAGS);
  if (fwrite(&tmp, sizeof(RNFlags), 1, fp) != (size_t) 1) {
    RNFail("Unable to write flags of surfel block\n");
    return 0;
  }

  // Write surfels
  for (int i = 0; i < NSurfels(); i++) {
    if (fwrite(&surfels[i], sizeof(R3Surfel), 1, fp) != (size_t) 1) {
      return 0;
    }
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1c0e0
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rcx
leaq 0x2c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x13a80
cmpq $0x1, %rax
je 0x4edbb
leaq 0x156450(%rip), %rdi    # 0x1a51f7
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x44(%rsp)
jmp 0x4ef13
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
movq 0x30(%rsp), %rcx
movl $0x38, %esi
movl $0x1, %edx
callq 0x13a80
cmpq $0x1, %rax
je 0x4edf9
leaq 0x156435(%rip), %rdi    # 0x1a521a
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x44(%rsp)
jmp 0x4ef13
movq 0x8(%rsp), %rdi
addq $0x80, %rdi
movq 0x30(%rsp), %rcx
movl $0x38, %esi
movl $0x1, %edx
callq 0x13a80
cmpq $0x1, %rax
je 0x4ee3a
leaq 0x156422(%rip), %rdi    # 0x1a5248
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x44(%rsp)
jmp 0x4ef13
movq 0x8(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x20(%rsp)
leaq 0x18(%rsp), %rdi
movl $0xff00, %esi           # imm = 0xFF00
callq 0x1b970
movq 0x18(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x31a80
movq 0x30(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq 0x13a80
cmpq $0x1, %rax
je 0x4eea0
leaq 0x1563e5(%rip), %rdi    # 0x1a5274
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x44(%rsp)
jmp 0x4ef13
movl $0x0, 0x14(%rsp)
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x1c0e0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x4ef0b
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movslq 0x14(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movq 0x30(%rsp), %rcx
movl $0x30, %esi
movl $0x1, %edx
callq 0x13a80
cmpq $0x1, %rax
je 0x4eefc
movl $0x0, 0x44(%rsp)
jmp 0x4ef13
jmp 0x4eefe
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x4eea8
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::ReadUPCHeader(_IO_FILE*, gaps::UPCHeader&)
static int 
ReadUPCHeader(FILE *fp, UPCHeader& header)
{
  // Read preamble
  if (!ReadUPCPreamble(fp)) {
    RNFail("Unable to read signature of UPC file\n");
    return 0;
  }

  // Read signature
  if (fread(&header.versionMajor, 1, 4, fp) != (size_t) 4) {
    RNFail("Unable to read UPC header signature\n");
    return 0;
  }

  // Read versionMajor
  if (fread(&header.versionMajor, 1, 1, fp) != (size_t) 1) {
    RNFail("Unable to read UPC header versionMajor\n");
    return 0;
  }

  // Read versionMinor
  if (fread(&header.versionMinor, 1, 1, fp) != (size_t) 1) {
    RNFail("Unable to read UPC header versionMinor\n");
    return 0;
  }

  // Read headerSize
  if (fread(&header.headerSize, 2, 1, fp) != (size_t) 1) {
    RNFail("Unable to read UPC header size\n");
    return 0;
  }

  // Read number of points
  if (fread(&header.numOfPts, 8, 1, fp) != (size_t) 1) {
    RNFail("Unable to read number of points in header of UPC file\n");
    return 0;
  }

  // Read scales and offsets
  if (fread(&header.xScale, 8, 6, fp) != (size_t) 6) {
    RNFail("Unable to read scales and offsets in header of UPC file\n");
    return 0;
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq %rsi, (%rsp)
movq 0x8(%rsp), %rdi
callq 0x4f7a0
cmpl $0x0, %eax
jne 0x4f3d7
leaq 0x155ed8(%rip), %rdi    # 0x1a529b
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movq (%rsp), %rdi
addq $0x4, %rdi
movq 0x8(%rsp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x13860
cmpq $0x4, %rax
je 0x4f414
leaq 0x155ec1(%rip), %rdi    # 0x1a52c1
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movq (%rsp), %rdi
addq $0x4, %rdi
movq 0x8(%rsp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x13860
cmpq $0x1, %rax
je 0x4f44f
leaq 0x155eab(%rip), %rdi    # 0x1a52e6
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movq (%rsp), %rdi
addq $0x5, %rdi
movq 0x8(%rsp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x13860
cmpq $0x1, %rax
je 0x4f48a
leaq 0x155e98(%rip), %rdi    # 0x1a530e
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movq (%rsp), %rdi
addq $0x6, %rdi
movq 0x8(%rsp), %rcx
movl $0x2, %esi
movl $0x1, %edx
callq 0x13860
cmpq $0x1, %rax
je 0x4f4c4
leaq 0x155e83(%rip), %rdi    # 0x1a5336
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movq (%rsp), %rdi
addq $0x8, %rdi
movq 0x8(%rsp), %rcx
movl $0x8, %esi
movl $0x1, %edx
callq 0x13860
cmpq $0x1, %rax
je 0x4f4fe
leaq 0x155e69(%rip), %rdi    # 0x1a5356
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movq (%rsp), %rdi
addq $0x10, %rdi
movq 0x8(%rsp), %rcx
movl $0x8, %esi
movl $0x6, %edx
callq 0x13860
cmpq $0x6, %rax
je 0x4f538
leaq 0x155e66(%rip), %rdi    # 0x1a538d
movb $0x0, %al
callq 0x1464b0
movl $0x0, 0x14(%rsp)
jmp 0x4f540
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::ResetSurfels(int)
void R3SurfelBlock::
ResetSurfels(int nsurfels)
{
  // Delete old surfels
  if (surfels) delete [] surfels;

  // Reset everything
  this->surfels = NULL;
  this->nsurfels = 0;
  this->position_origin = R3zero_point;
  this->bbox = R3null_box;
  this->timestamp_origin = 0;
  this->timestamp_range.Reset(FLT_MAX,-FLT_MAX);
  this->min_identifier = UINT_MAX;
  this->max_identifier = 0;
  this->resolution = 0;
  this->flags = 0;
  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;

  // Allocate new surfels
  if (nsurfels > 0) {
    this->nsurfels = nsurfels;
    this->surfels = new R3Surfel [ nsurfels ];
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq $0x0, (%rax)
je 0x4f58c
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0x4f58a
movq 0x30(%rsp), %rdi
callq 0x13750
jmp 0x4f58c
movq 0x38(%rsp), %rdi
movq $0x0, (%rdi)
movl $0x0, 0x8(%rdi)
addq $0x10, %rdi
leaq 0x5aeb06(%rip), %rsi    # 0x5fe0b0
callq 0xf89e0
movq 0x38(%rsp), %rdi
addq $0x28, %rdi
leaq 0x1add49(%rip), %rsi    # 0x1fd308
callq 0x1bd40
movq 0x38(%rsp), %rdi
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rdi)
addq $0x68, %rdi
movsd 0x154bb3(%rip), %xmm0   # 0x1a4190
movsd 0x154ba3(%rip), %xmm1   # 0x1a4188
callq 0x1c150
movq 0x38(%rsp), %rax
movl $0xffffffff, 0x78(%rax) # imm = 0xFFFFFFFF
movl $0x0, 0x7c(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x80(%rax)
leaq 0x50(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1b970
movq 0x38(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x88(%rax)
movq $0x0, 0x90(%rax)
movq $0x0, 0x98(%rax)
movl $0xffffffff, 0xa0(%rax) # imm = 0xFFFFFFFF
movq $0x0, 0xa8(%rax)
movl $0x0, 0xb0(%rax)
movl $0x0, 0xb4(%rax)
movq $0x0, 0xb8(%rax)
movl $0x0, 0xc0(%rax)
cmpl $0x0, 0x5c(%rsp)
jle 0x4f748
movq 0x38(%rsp), %rax
movl 0x5c(%rsp), %ecx
movl %ecx, 0x8(%rax)
movslq 0x5c(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x30, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, 0x18(%rsp)
callq 0x13030
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x28(%rsp)
cmpq $0x0, %rax
je 0x4f71a
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
imulq $0x30, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x47310
jmp 0x4f703
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
addq $0x30, %rax
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0x4f6f3
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x4f748
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x13a90
jmp 0x4f74d
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x13970
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::ReadUPCPreamble(_IO_FILE*)
static int 
ReadUPCPreamble(FILE *fp)
{
  // Read preamble (some upc files have junk at front!)
  unsigned long offset = 0;
  char signature[8] = { '\0' };
  while (TRUE) {
    // Read/check signature
    if (fread(signature, sizeof(char), 4, fp) != (size_t) 4) return 0;
    if (!strcmp(signature, "UPCf")) break;
    else offset += 4;
  }
   
  // Seek to start of header
  RNFileSeek(fp, offset, RN_FILE_SEEK_SET);

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x132c0
leaq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rcx
movl $0x1, %esi
movl $0x4, %edx
callq 0x13860
cmpq $0x4, %rax
je 0x4f7ec
movl $0x0, 0x24(%rsp)
jmp 0x4f82d
leaq 0x8(%rsp), %rdi
leaq 0x155bce(%rip), %rsi    # 0x1a53c6
callq 0x137e0
cmpl $0x0, %eax
jne 0x4f804
jmp 0x4f814
movq 0x10(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x10(%rsp)
jmp 0x4f7c3
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x145360
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/../../pkgs/RNBasics/RNGrfx.hh
// Function: gaps::RNLoadRgba(unsigned int)
inline void 
RNLoadRgba(unsigned int value)
{
  // Load identifer
  unsigned char rgba[4];
  rgba[0] = value & 0xFF;
  rgba[1] = (value >> 8) & 0xFF;
  rgba[2] = (value >> 16) & 0xFF;
  rgba[3] = (value >> 24) & 0xFF;
  RNLoadRgba(rgba);
}

// Assembly:
pushq %rax
movl %edi, 0x4(%rsp)
movl 0x4(%rsp), %eax
andl $0xff, %eax
movb %al, (%rsp)
movl 0x4(%rsp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, 0x1(%rsp)
movl 0x4(%rsp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, 0x2(%rsp)
movl 0x4(%rsp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, 0x3(%rsp)
movq %rsp, %rdi
callq 0x50400
popq %rax
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelTimestampConstraint::Check(gaps::R3SurfelObject const*) const
int R3SurfelTimestampConstraint::
Check(const R3SurfelObject *object) const
{
  // Return whether object intersects timestamp range
  if (timestamp_range.IsEmpty()) return R3_SURFEL_CONSTRAINT_PASS;
  if (object->TimestampRange().IsEmpty()) return R3_SURFEL_CONSTRAINT_FAIL;
  if (timestamp_range.Intersects(object->TimestampRange())) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x8, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x50770
movl $0x2, 0x24(%rsp)
jmp 0x507cb
movq 0x10(%rsp), %rdi
callq 0x19600
movq %rax, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x50791
movl $0x0, 0x24(%rsp)
jmp 0x507cb
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x19600
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x54490
cmpl $0x0, %eax
je 0x507c3
movl $0x2, 0x24(%rsp)
jmp 0x507cb
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelTimestampConstraint::Check(gaps::R3SurfelNode const*) const
int R3SurfelTimestampConstraint::
Check(const R3SurfelNode *node) const
{
  // Return whether node intersects timestamp range
  if (timestamp_range.IsEmpty()) return R3_SURFEL_CONSTRAINT_PASS;
  if (node->TimestampRange().IsEmpty()) return R3_SURFEL_CONSTRAINT_FAIL;
  if (timestamp_range.Intersects(node->TimestampRange())) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x8, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x50810
movl $0x2, 0x24(%rsp)
jmp 0x5086b
movq 0x10(%rsp), %rdi
callq 0x5eee0
movq %rax, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x50831
movl $0x0, 0x24(%rsp)
jmp 0x5086b
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x5eee0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x54490
cmpl $0x0, %eax
je 0x50863
movl $0x2, 0x24(%rsp)
jmp 0x5086b
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelTimestampConstraint::Check(gaps::R3SurfelBlock const*) const
int R3SurfelTimestampConstraint::
Check(const R3SurfelBlock *block) const
{
  // Return whether block intersects timestamp range
  if (timestamp_range.IsEmpty()) return R3_SURFEL_CONSTRAINT_PASS;
  if (block->TimestampRange().IsEmpty()) return R3_SURFEL_CONSTRAINT_FAIL;
  if (timestamp_range.Intersects(block->TimestampRange())) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x8, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x508b0
movl $0x2, 0x24(%rsp)
jmp 0x5090b
movq 0x10(%rsp), %rdi
callq 0x4a780
movq %rax, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x508d1
movl $0x0, 0x24(%rsp)
jmp 0x5090b
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x4a780
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x54490
cmpl $0x0, %eax
je 0x50903
movl $0x2, 0x24(%rsp)
jmp 0x5090b
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelTimestampConstraint::Check(gaps::R3SurfelBlock const*, gaps::R3Surfel const*) const
int R3SurfelTimestampConstraint::
Check(const R3SurfelBlock *block, const R3Surfel *surfel) const
{
  // Return whether block intersects timestamp range
  int surfel_index = block->SurfelIndex(surfel);
  assert((surfel_index >= 0) && (surfel_index < block->NSurfels()));
  if (timestamp_range.IsEmpty()) return R3_SURFEL_CONSTRAINT_PASS;
  if (timestamp_range.Contains(block->SurfelTimestamp(surfel_index))) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x544f0
movq 0x8(%rsp), %rdi
movl %eax, 0x14(%rsp)
addq $0x8, %rdi
callq 0x4f850
cmpl $0x0, %eax
je 0x5096d
movl $0x2, 0x34(%rsp)
jmp 0x509a8
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x43dc0
movq (%rsp), %rdi
callq 0x54540
cmpl $0x0, %eax
je 0x509a0
movl $0x2, 0x34(%rsp)
jmp 0x509a8
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelCoordinateConstraint::Check(gaps::R3Box const&) const
int R3SurfelCoordinateConstraint::
Check(const R3Box& box) const
{
  // Return whether any point in box can satisfy constraint
  RNInterval box_interval(box.Min()[dimension], box.Max()[dimension]);
  if (interval.Contains(box_interval)) return R3_SURFEL_CONSTRAINT_PASS;
  else if (interval.Intersects(box_interval)) return R3_SURFEL_CONSTRAINT_MAYBE;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1c110
movq %rax, %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
callq 0x1bba0
movsd %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x54590
movq %rax, %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
callq 0x1bba0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
leaq 0x10(%rsp), %rdi
callq 0x144d90
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x10(%rsp), %rsi
callq 0x545a0
cmpl $0x0, %eax
je 0x50ab5
movl $0x2, 0x34(%rsp)
jmp 0x50ae1
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x10(%rsp), %rsi
callq 0x54490
cmpl $0x0, %eax
je 0x50ad7
movl $0x1, 0x34(%rsp)
jmp 0x50ae1
jmp 0x50ad9
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelNormalConstraint::R3SurfelNormalConstraint(gaps::R3Vector const&, double)
R3SurfelNormalConstraint::
R3SurfelNormalConstraint(const R3Vector& direction, RNAngle max_angle)
{
  // Remember reference vector
  this->direction[0] = direction.X();
  this->direction[1] = direction.Y();
  this->direction[2] = direction.Z();

  // Compute min dot product
  this->min_dot = cos(max_angle);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x50470
movq 0x10(%rsp), %rax
leaq 0x19d4c9(%rip), %rcx    # 0x1ee048
movq %rcx, (%rax)
movq 0x38(%rsp), %rdi
callq 0x31c70
movsd %xmm0, 0x18(%rsp)
jmp 0x50b94
movq 0x10(%rsp), %rax
movsd 0x18(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq 0x38(%rsp), %rdi
callq 0x31c80
movsd %xmm0, 0x8(%rsp)
jmp 0x50bba
movq 0x10(%rsp), %rax
movsd 0x8(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq 0x38(%rsp), %rdi
callq 0x31c90
movsd %xmm0, (%rsp)
jmp 0x50bdf
movq 0x10(%rsp), %rax
movsd (%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movsd 0x30(%rsp), %xmm0
callq 0x13a30
movq 0x10(%rsp), %rax
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rax)
addq $0x48, %rsp
retq
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x50490
movq 0x28(%rsp), %rdi
callq 0x13970
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelNormalConstraint::Check(gaps::R3SurfelBlock const*, gaps::R3Surfel const*) const
int R3SurfelNormalConstraint::
Check(const R3SurfelBlock *block, const R3Surfel *surfel) const
{
  // Return whether surfel normal is within max_angle of reference
  RNScalar dot = 0.0;
  dot += surfel->NX() * direction[0];
  dot += surfel->NY() * direction[1];
  dot += surfel->NZ() * direction[2];
  if (dot < min_dot) return R3_SURFEL_CONSTRAINT_FAIL;
  return R3_SURFEL_CONSTRAINT_PASS;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x31fb0
movq 0x8(%rsp), %rax
mulss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x31fd0
movq 0x8(%rsp), %rax
mulss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x31ff0
movq 0x8(%rsp), %rax
mulss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
addsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm1
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x50cf1
movl $0x0, 0x34(%rsp)
jmp 0x50cf9
movl $0x2, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelCylinderConstraint::Check(gaps::R3Point const&) const
int R3SurfelCylinderConstraint::
Check(const R3Point& point) const
{
  // Return whether cylinder contains point
  RNScalar dx = point.X() - center.X();
  RNScalar dy = point.Y() - center.Y();
  RNScalar d_squared = dx*dx + dy*dy;
  if (d_squared > radius_squared) return R3_SURFEL_CONSTRAINT_FAIL;
  if (point.Z() < zmin) return R3_SURFEL_CONSTRAINT_FAIL;
  if (point.Z() > zmax) return R3_SURFEL_CONSTRAINT_FAIL;
  return R3_SURFEL_CONSTRAINT_PASS;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x187b0
movq 0x8(%rsp), %rdi
movsd %xmm0, (%rsp)
addq $0x8, %rdi
callq 0x187b0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x187c0
movq 0x8(%rsp), %rdi
movsd %xmm0, 0x10(%rsp)
addq $0x8, %rdi
callq 0x187c0
movq 0x8(%rsp), %rax
movaps %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
ucomisd 0x20(%rax), %xmm0
jbe 0x512da
movl $0x0, 0x44(%rsp)
jmp 0x51329
movq 0x30(%rsp), %rdi
callq 0x187a0
movq 0x8(%rsp), %rax
movaps %xmm0, %xmm1
movsd 0x28(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x51301
movl $0x0, 0x44(%rsp)
jmp 0x51329
movq 0x30(%rsp), %rdi
callq 0x187a0
movq 0x8(%rsp), %rax
ucomisd 0x30(%rax), %xmm0
jbe 0x51321
movl $0x0, 0x44(%rsp)
jmp 0x51329
movl $0x2, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelPlaneConstraint::Check(gaps::R3Box const&) const
int R3SurfelPlaneConstraint::
Check(const R3Box& box) const
{
  // Returncontains/intersects box
  RNScalar d = R3SignedDistance(plane, box);
  if (fabs(d) <= tolerance) return R3_SURFEL_CONSTRAINT_MAYBE;
  if (above && (d > tolerance)) return R3_SURFEL_CONSTRAINT_PASS;
  if (below && (d < tolerance)) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x8, %rdi
movq 0x10(%rsp), %rsi
callq 0x91ed0
movq (%rsp), %rax
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm1
movaps 0x152c44(%rip), %xmm0   # 0x1a43c0
pand %xmm0, %xmm1
movsd 0x38(%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x51795
movl $0x1, 0x24(%rsp)
jmp 0x517eb
movq (%rsp), %rax
cmpl $0x0, 0x30(%rax)
je 0x517ba
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm0
ucomisd 0x38(%rax), %xmm0
jbe 0x517ba
movl $0x2, 0x24(%rsp)
jmp 0x517eb
movq (%rsp), %rax
cmpl $0x0, 0x28(%rax)
je 0x517e3
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm1
movsd 0x38(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x517e3
movl $0x2, 0x24(%rsp)
jmp 0x517eb
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelPlaneConstraint::Check(gaps::R3Point const&) const
int R3SurfelPlaneConstraint::
Check(const R3Point& point) const
{
  // Return whether plane contains point
  RNScalar d = R3SignedDistance(plane, point);
  if (above && (d > tolerance)) return R3_SURFEL_CONSTRAINT_PASS;
  if (on && (fabs(d) <= tolerance)) return R3_SURFEL_CONSTRAINT_PASS;
  if (below && (d < tolerance)) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x8, %rdi
movq 0x10(%rsp), %rsi
callq 0x8eb30
movq (%rsp), %rax
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, 0x30(%rax)
je 0x51850
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm0
ucomisd 0x38(%rax), %xmm0
jbe 0x51850
movl $0x2, 0x24(%rsp)
jmp 0x518b5
movq (%rsp), %rax
cmpl $0x0, 0x2c(%rax)
je 0x51884
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm1
movaps 0x152b55(%rip), %xmm0   # 0x1a43c0
pand %xmm0, %xmm1
movsd 0x38(%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x51884
movl $0x2, 0x24(%rsp)
jmp 0x518b5
movq (%rsp), %rax
cmpl $0x0, 0x28(%rax)
je 0x518ad
movq (%rsp), %rax
movsd 0x8(%rsp), %xmm1
movsd 0x38(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x518ad
movl $0x2, 0x24(%rsp)
jmp 0x518b5
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelPlanarGridConstraint::Check(gaps::R3Box const&) const
int R3SurfelPlanarGridConstraint::
Check(const R3Box& box) const
{
  // Check distance from box to plane
  RNLength offplane_distance = R3Distance(grid->Plane(), box);
  if (offplane_distance > max_offplane_distance) return R3_SURFEL_CONSTRAINT_FAIL;

  // Check distance from box to grid
  RNLength bbox_distance = R3Distance(box, grid->WorldBox());
  if (bbox_distance > max_offplane_distance) return R3_SURFEL_CONSTRAINT_FAIL;

  // Points might pass
  return R3_SURFEL_CONSTRAINT_MAYBE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rax), %rdi
callq 0x54840
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x91e30
movq 0x8(%rsp), %rax
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
ucomisd 0x10(%rax), %xmm0
jbe 0x51d30
movl $0x0, 0x34(%rsp)
jmp 0x51d7d
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rdi
callq 0x54850
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x92970
movq 0x8(%rsp), %rax
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
ucomisd 0x10(%rax), %xmm0
jbe 0x51d75
movl $0x0, 0x34(%rsp)
jmp 0x51d7d
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelOverheadGridConstraint::Check(gaps::R3Box const&) const
int R3SurfelOverheadGridConstraint::
Check(const R3Box& box) const
{
  // Return whether any point in box can satisfy constraint
  R2Box projected_box(box[0][0], box[0][1], box[1][0], box[1][1]);
  if (R2Intersects(projected_box, grid->WorldBox())) return R3_SURFEL_CONSTRAINT_MAYBE;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x90(%rsp), %rdi
xorl %esi, %esi
movl %esi, 0x8(%rsp)
callq 0x1bb60
movl 0x8(%rsp), %esi
movq %rax, %rdi
callq 0x1bba0
movl 0x8(%rsp), %esi
movsd %xmm0, 0x20(%rsp)
movq 0x90(%rsp), %rdi
callq 0x1bb60
movq %rax, %rdi
movl $0x1, %esi
movl %esi, 0xc(%rsp)
callq 0x1bba0
movl 0xc(%rsp), %esi
movsd %xmm0, 0x10(%rsp)
movq 0x90(%rsp), %rdi
callq 0x1bb60
movl 0x8(%rsp), %esi
movq %rax, %rdi
callq 0x1bba0
movl 0xc(%rsp), %esi
movsd %xmm0, 0x18(%rsp)
movq 0x90(%rsp), %rdi
callq 0x1bb60
movl 0xc(%rsp), %esi
movq %rax, %rdi
callq 0x1bba0
movsd 0x10(%rsp), %xmm1
movsd 0x18(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x20(%rsp), %xmm0
leaq 0x68(%rsp), %rdi
callq 0x12de70
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x40(%rsp), %rdi
callq 0x548f0
jmp 0x52185
xorl %eax, %eax
movl %eax, %edx
leaq 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1107a0
movl %eax, 0x4(%rsp)
jmp 0x5219e
leaq 0x40(%rsp), %rdi
callq 0x54990
movl 0x4(%rsp), %eax
cmpl $0x0, %eax
je 0x521f0
movl $0x1, 0xa4(%rsp)
movl $0x1, 0x30(%rsp)
jmp 0x52203
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0x5221c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x54990
jmp 0x5221c
movl $0x0, 0xa4(%rsp)
movl $0x1, 0x30(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x54990
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
leaq 0x68(%rsp), %rdi
callq 0x54990
movq 0x38(%rsp), %rdi
callq 0x13970
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMeshConstraint::R3SurfelMeshConstraint(gaps::R3Mesh*, gaps::R3Affine const&, double)
R3SurfelMeshConstraint::
R3SurfelMeshConstraint(R3Mesh *mesh, const R3Affine& surfels_to_mesh, RNLength max_distance)
  : mesh(mesh),
    surfels_to_mesh(surfels_to_mesh),
    max_distance(max_distance),
    tree(NULL)
{
  // Just checking
  assert(mesh);
  tree = new R3MeshSearchTree(mesh);
  assert(tree);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x50470
movq 0x8(%rsp), %rdi
leaq 0x19b084(%rip), %rax    # 0x1ee408
movq %rax, (%rdi)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rdi)
addq $0x10, %rdi
movq %rdi, 0x10(%rsp)
movq 0x30(%rsp), %rsi
callq 0x309e0
jmp 0x533a5
movq 0x8(%rsp), %rax
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x120(%rax)
movq $0x0, 0x128(%rax)
movl $0x18, %edi
callq 0x13570
movq %rax, (%rsp)
jmp 0x533d3
movq (%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x79c50
jmp 0x533e3
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, 0x128(%rax)
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x5343e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x53434
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
movl $0x18, %esi
callq 0x13580
movq 0x10(%rsp), %rdi
callq 0xd4520
movq 0x8(%rsp), %rdi
callq 0x50490
movq 0x20(%rsp), %rdi
callq 0x13970
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMeshConstraint::Check(gaps::R3Box const&) const
int R3SurfelMeshConstraint::
Check(const R3Box& box) const
{
  // Return whether any point in box can satisfy constraint
  R3Box transformed_box = box;
  transformed_box.Transform(surfels_to_mesh);
  RNLength distance = R3Distance(transformed_box, mesh->BBox());
  if (distance > max_distance) return R3_SURFEL_CONSTRAINT_FAIL;
  return R3_SURFEL_CONSTRAINT_MAYBE;
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xc9de0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0x10, %rsi
callq 0xcc170
jmp 0x53560
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x54c70
movq %rax, 0x10(%rsp)
jmp 0x53575
movq 0x10(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x92970
movsd %xmm0, 0x8(%rsp)
jmp 0x5358c
movq 0x18(%rsp), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
ucomisd 0x120(%rax), %xmm0
jbe 0x535dc
movl $0x0, 0x94(%rsp)
movl $0x1, 0x2c(%rsp)
jmp 0x535ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1b990
jmp 0x53608
movl $0x1, 0x94(%rsp)
movl $0x1, 0x2c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x1b990
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x13970
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMeshConstraint::Check(gaps::R3Point const&) const
int R3SurfelMeshConstraint::
Check(const R3Point& point) const
{
  // Check mesh
  if (!mesh) return R3_SURFEL_CONSTRAINT_FAIL;

  // Transform position
  R3Point transformed_point = point;
  transformed_point.Transform(surfels_to_mesh);

  // Check if closest point is within max_distance
  R3MeshIntersection closest;
  tree->FindClosest(transformed_point, closest, 0, max_distance);
  if (closest.type == R3_MESH_NULL_TYPE) return R3_SURFEL_CONSTRAINT_FAIL;
  return R3_SURFEL_CONSTRAINT_PASS;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x53648
movl $0x0, 0x74(%rsp)
jmp 0x536b9
movq 0x60(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0xf8390
movq (%rsp), %rsi
addq $0x10, %rsi
leaq 0x48(%rsp), %rdi
callq 0xf8fc0
leaq 0x8(%rsp), %rdi
callq 0x54c90
movq (%rsp), %rax
movq 0x128(%rax), %rdi
movsd 0x120(%rax), %xmm1
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
xorps %xmm0, %xmm0
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x7d040
cmpl $0x0, 0x8(%rsp)
jne 0x536b1
movl $0x0, 0x74(%rsp)
jmp 0x536b9
movl $0x2, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelObjectConstraint::Check(gaps::R3SurfelObject const*) const
int R3SurfelObjectConstraint::
Check(const R3SurfelObject *object) const
{
  // Return whether surfel satisfies constraint
  int status = R3_SURFEL_CONSTRAINT_PASS;
  if (!object) status = R3_SURFEL_CONSTRAINT_FAIL;
  else if (target_object && (object != target_object)) status = R3_SURFEL_CONSTRAINT_FAIL;
  if (converse) {
    if (status == R3_SURFEL_CONSTRAINT_FAIL) status = R3_SURFEL_CONSTRAINT_PASS;
    else status = R3_SURFEL_CONSTRAINT_FAIL;
  }
  return status;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x2, -0x14(%rsp)
cmpq $0x0, -0x10(%rsp)
jne 0x5374e
movl $0x0, -0x14(%rsp)
jmp 0x53774
movq -0x20(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x53772
movq -0x20(%rsp), %rcx
movq -0x10(%rsp), %rax
cmpq 0x8(%rcx), %rax
je 0x53772
movl $0x0, -0x14(%rsp)
jmp 0x53774
movq -0x20(%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x5379a
cmpl $0x0, -0x14(%rsp)
jne 0x53790
movl $0x2, -0x14(%rsp)
jmp 0x53798
movl $0x0, -0x14(%rsp)
jmp 0x5379a
movl -0x14(%rsp), %eax
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelObjectConstraint::Check(gaps::R3SurfelBlock const*) const
int R3SurfelObjectConstraint::
Check(const R3SurfelBlock *block) const
{
  // Return whether surfel satisfies constraint
  R3SurfelNode *node = block->Node();
  R3SurfelObject *object = (node) ? node->Object() : NULL;
  return Check(object);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x43710
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x53824
movq 0x20(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x5f2c0
movq %rax, 0x8(%rsp)
jmp 0x5382d
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x5382d
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelLabelConstraint::Check(gaps::R3SurfelObject const*) const
int R3SurfelLabelConstraint::
Check(const R3SurfelObject *object) const
{
  // Return whether surfel satisfies constraint
  int status = R3_SURFEL_CONSTRAINT_PASS;
  if (!object) status = R3_SURFEL_CONSTRAINT_FAIL;
  else {
    R3SurfelLabel *label = object->CurrentLabel();
    if (!label) status = R3_SURFEL_CONSTRAINT_FAIL;
    else {
      if (target_label && (label != target_label)) status = R3_SURFEL_CONSTRAINT_FAIL;
    }
  }
  if (converse) {
    if (status == R3_SURFEL_CONSTRAINT_FAIL) status = R3_SURFEL_CONSTRAINT_PASS;
    else status = R3_SURFEL_CONSTRAINT_FAIL;
  }
  return status;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movl $0x2, 0x14(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x538f1
movl $0x0, 0x14(%rsp)
jmp 0x53938
movq 0x18(%rsp), %rdi
callq 0x1a020
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x53912
movl $0x0, 0x14(%rsp)
jmp 0x53936
movq (%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x53934
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
cmpq 0x8(%rcx), %rax
je 0x53934
movl $0x0, 0x14(%rsp)
jmp 0x53936
jmp 0x53938
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x5395d
cmpl $0x0, 0x14(%rsp)
jne 0x53953
movl $0x2, 0x14(%rsp)
jmp 0x5395b
movl $0x0, 0x14(%rsp)
jmp 0x5395d
movl 0x14(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelBoundaryConstraint::Check(gaps::R3SurfelBlock const*, gaps::R3Surfel const*) const
int R3SurfelBoundaryConstraint::
Check(const R3SurfelBlock *block, const R3Surfel *surfel) const
{
  // Return whether surfel satisfies constraint
  if (include_interior && !(surfel->Flags() & R3_SURFEL_BOUNDARY_FLAGS)) return R3_SURFEL_CONSTRAINT_PASS;
  if (include_silhouette && surfel->IsOnSilhouetteBoundary()) return R3_SURFEL_CONSTRAINT_PASS;
  if (include_shadow && surfel->IsOnShadowBoundary()) return R3_SURFEL_CONSTRAINT_PASS;
  if (include_border && surfel->IsOnBorderBoundary()) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x8(%rax)
je 0x53ae1
movq 0x8(%rsp), %rdi
callq 0x50340
movzbl %al, %eax
andl $0x30, %eax
cmpl $0x0, %eax
jne 0x53ae1
movl $0x2, 0x24(%rsp)
jmp 0x53b52
movq (%rsp), %rax
cmpl $0x0, 0x10(%rax)
je 0x53b04
movq 0x8(%rsp), %rdi
callq 0x54cb0
cmpl $0x0, %eax
je 0x53b04
movl $0x2, 0x24(%rsp)
jmp 0x53b52
movq (%rsp), %rax
cmpl $0x0, 0x14(%rax)
je 0x53b27
movq 0x8(%rsp), %rdi
callq 0x54cd0
cmpl $0x0, %eax
je 0x53b27
movl $0x2, 0x24(%rsp)
jmp 0x53b52
movq (%rsp), %rax
cmpl $0x0, 0xc(%rax)
je 0x53b4a
movq 0x8(%rsp), %rdi
callq 0x54cf0
cmpl $0x0, %eax
je 0x53b4a
movl $0x2, 0x24(%rsp)
jmp 0x53b52
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMarkConstraint::Check(gaps::R3SurfelBlock const*) const
int R3SurfelMarkConstraint::
Check(const R3SurfelBlock *block) const
{
  // Get block database
  R3SurfelDatabase *database = block->Database();
  if (!database) return R3_SURFEL_CONSTRAINT_MAYBE;

  // Check whether block is resident
  RNBoolean resident = database->IsBlockResident((R3SurfelBlock *) block);
  if (!resident) {
    if (include_unmarked) return R3_SURFEL_CONSTRAINT_PASS; 
    else return R3_SURFEL_CONSTRAINT_FAIL; 
  }

  // Block is resident -- check surfels
  return R3_SURFEL_CONSTRAINT_MAYBE;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x43610
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x53ec9
movl $0x1, 0x34(%rsp)
jmp 0x53f0a
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x43630
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x53f02
movq 0x8(%rsp), %rax
cmpl $0x0, 0xc(%rax)
je 0x53ef8
movl $0x2, 0x34(%rsp)
jmp 0x53f0a
movl $0x0, 0x34(%rsp)
jmp 0x53f0a
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)