LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x98(%rdi), %rdi
testq %rdi, %rdi
je 0x2dffa
movl 0xb4(%rbx), %eax
testl %eax, %eax
jne 0x2dff2
movq (%rdi), %rax
movq 0x8(%rdi), %rdx
movl 0x28(%rdi), %ecx
movq %rbx, %rsi
callq *0x88(%rax)
testl %eax, %eax
je 0x2dffa
movl 0xb4(%rbx), %eax
incl %eax
movl %eax, 0xb4(%rbx)
testb $0x1, 0x88(%rbx)
jne 0x2e00b
movq %rbx, %rdi
callq 0x2cbbc
xorpd %xmm1, %xmm1
addsd 0x30(%rbx), %xmm1
movsd 0x68(%rbx), %xmm0
ucomisd 0x70(%rbx), %xmm0
jbe 0x2e037
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x2ce7e
movsd (%rsp), %xmm1
movsd 0x68(%rbx), %xmm0
addsd %xmm0, %xmm1
movl 0x78(%rbx), %ecx
movl 0x7c(%rbx), %eax
cmpl %ecx, %eax
jae 0x2e05d
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x2cfca
movsd (%rsp), %xmm1
movl 0x78(%rbx), %ecx
movl 0x7c(%rbx), %eax
movl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
addsd %xmm0, %xmm1
cmpl %ecx, %eax
jae 0x2e084
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x2cfca
movsd (%rsp), %xmm1
movl 0x7c(%rbx), %eax
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
addsd %xmm0, %xmm1
movq 0x88(%rbx), %rax
testb $0x2, %al
jne 0x2e0b6
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x2d10a
movsd (%rsp), %xmm1
movq 0x88(%rbx), %rax
addsd 0x80(%rbx), %xmm1
testb $0x4, %al
jne 0x2e0db
movq %rbx, %rdi
movsd %xmm1, (%rsp)
callq 0x2d232
movsd (%rsp), %xmm1
movq 0x88(%rbx), %rax
xorl %ecx, %ecx
testb $0x10, %al
sete %cl
leaq 0xafd37(%rip), %rax     # 0xdde20
addsd (%rax,%rcx,8), %xmm1
ucomisd 0xaf22a(%rip), %xmm1    # 0xdd320
jne 0x2e106
jp 0x2e106
leaq 0xaf247(%rip), %rdi     # 0xdd348
callq 0x137c0
movq %rbx, %rdi
callq 0x2e18a
movq 0x98(%rbx), %r14
testq %r14, %r14
je 0x2e159
movl 0xb4(%rbx), %eax
cmpl $0x1, %eax
jne 0x2e146
movq (%r14), %rax
movq 0x8(%r14), %rdx
movl 0x28(%r14), %ecx
movq %r14, %rdi
movq %rbx, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x2e159
movl 0xb4(%rbx), %eax
decl %eax
movl %eax, 0xb4(%rbx)
jne 0x2e159
testb $0x2, 0x89(%rbx)
jne 0x2e161
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x2ca06
movl $0xc8, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x134f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelBlock.cpp
// Function: gaps::R3SurfelBlock::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:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rsi, %rsi
jne 0x2e617
movq 0x10495c(%rip), %rax    # 0x132f70
movq (%rax), %rbx
testq %rdx, %rdx
je 0x2e627
movq %rdx, %rdi
movq %rbx, %rsi
callq 0x135b0
movl 0x8(%r15), %ecx
movl 0xa0(%r15), %edx
leaq 0xaf2a3(%rip), %rsi     # 0xdd8dc
movq %rbx, %rdi
xorl %eax, %eax
callq 0x13740
testq %r14, %r14
je 0x2e653
movq %r14, %rdi
movq %rbx, %rsi
callq 0x135b0
movl $0xa, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x13670
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x13560
testq %rax, %rax
je 0x2e744
movq %rax, %r15
leaq 0xaf836(%rip), %rsi     # 0xddec7
movl $0x4, %edx
movq %rax, %rdi
callq 0x13240
testl %eax, %eax
je 0x2e75d
leaq 0xaf81f(%rip), %rsi     # 0xddecc
movl $0x4, %edx
movq %r15, %rdi
callq 0x13240
testl %eax, %eax
je 0x2e76d
leaq 0xaf808(%rip), %rsi     # 0xdded1
movl $0x4, %edx
movq %r15, %rdi
callq 0x13240
testl %eax, %eax
je 0x2e77d
leaq 0xaf7f1(%rip), %rsi     # 0xdded6
movl $0x4, %edx
movq %r15, %rdi
callq 0x13240
testl %eax, %eax
je 0x2e78d
leaq 0xaf7da(%rip), %rsi     # 0xddedb
movl $0x4, %edx
movq %r15, %rdi
callq 0x13240
testl %eax, %eax
je 0x2e79d
leaq 0xaf7c3(%rip), %rsi     # 0xddee0
movl $0x4, %edx
movq %r15, %rdi
callq 0x13240
testl %eax, %eax
je 0x2e7ad
leaq 0xaed27(%rip), %rdi     # 0xdd45c
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xac81a
jmp 0x2e755
leaq 0xaf751(%rip), %rdi     # 0xdde9c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x13070
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2e7be
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2e83e
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2e8be
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2e93e
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2e9be
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2ea3e
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xba0c1(%rip), %rsi     # 0xe8893
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2e800
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2ec28
testl %eax, %eax
je 0x2e815
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2e830
leaq 0xaeccb(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
jmp 0x2e830
leaq 0xaf6c9(%rip), %rdi     # 0xddee5
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movq %r14, %rdi
callq 0x134d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xba041(%rip), %rsi     # 0xe8893
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2e880
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2eef8
testl %eax, %eax
je 0x2e895
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2e8b0
leaq 0xaec4b(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
jmp 0x2e8b0
leaq 0xaf6a3(%rip), %rdi     # 0xddf3f
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movq %r14, %rdi
callq 0x134d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xb9fc1(%rip), %rsi     # 0xe8893
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2e900
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2f1f4
testl %eax, %eax
je 0x2e915
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2e930
leaq 0xaebcb(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
jmp 0x2e930
leaq 0xaf63f(%rip), %rdi     # 0xddf5b
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movq %r14, %rdi
callq 0x134d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xae883(%rip), %rsi     # 0xdd1d5
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2e980
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2f542
testl %eax, %eax
je 0x2e995
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2e9b0
leaq 0xaeb4b(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
jmp 0x2e9b0
leaq 0xaf5f2(%rip), %rdi     # 0xddf8e
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movq %r14, %rdi
callq 0x134d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xae803(%rip), %rsi     # 0xdd1d5
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2ea00
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2f758
testl %eax, %eax
je 0x2ea15
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2ea30
leaq 0xaeacb(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
jmp 0x2ea30
leaq 0xaf5ae(%rip), %rdi     # 0xddfca
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movq %r14, %rdi
callq 0x134d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xae783(%rip), %rsi     # 0xdd1d5
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2ea80
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2fa3e
testl %eax, %eax
je 0x2ea89
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2ea9c
leaq 0xaea4b(%rip), %rdi     # 0xdd4d2
jmp 0x2ea90
leaq 0xaf53a(%rip), %rdi     # 0xddfca
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x13560
testq %rax, %rax
je 0x2eb10
movq %rax, %r15
leaq 0xaf400(%rip), %rsi     # 0xdded1
movl $0x4, %edx
movq %rax, %rdi
callq 0x13240
testl %eax, %eax
je 0x2eb29
leaq 0xaf3f2(%rip), %rsi     # 0xddedb
movl $0x4, %edx
movq %r15, %rdi
callq 0x13240
testl %eax, %eax
je 0x2eb39
leaq 0xae99b(%rip), %rdi     # 0xdd49c
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0xac81a
jmp 0x2eb21
leaq 0xaf385(%rip), %rdi     # 0xdde9c
movq %rbx, %rsi
xorl %eax, %eax
callq 0x13070
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2eb4a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2eba8
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb5786(%rip), %rsi     # 0xe42e4
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2eb88
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x2f48a
movq %r15, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2eb9b
leaq 0xae943(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xaf42d(%rip), %rsi     # 0xddfe9
movq %rbx, %rdi
callq 0x135d0
testq %rax, %rax
je 0x2ebea
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x2f910
testl %eax, %eax
je 0x2ebff
movq %r14, %rdi
callq 0x134d0
movl $0x1, %ebp
jmp 0x2ec1a
leaq 0xae8e1(%rip), %rdi     # 0xdd4d2
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
jmp 0x2ec1a
leaq 0xaf3e6(%rip), %rdi     # 0xddfec
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0xac81a
movq %r14, %rdi
callq 0x134d0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x8(%rdi)
jle 0x2f53b
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x2e, %ebp
leaq 0xafebc(%rip), %r13     # 0xdf36d
xorl %r15d, %r15d
movq (%r14), %r12
xorps %xmm0, %xmm0
cvtss2sd -0x2e(%r12,%rbp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0x2a(%r12,%rbp), %xmm1
xorps %xmm2, %xmm2
cvtss2sd -0x26(%r12,%rbp), %xmm2
movq %rbx, %rdi
leaq 0xae3c9(%rip), %rsi     # 0xdd8a8
movb $0x3, %al
callq 0x13740
movzbl -0x2(%r12,%rbp), %edx
movzbl -0x1(%r12,%rbp), %ecx
movzbl (%r12,%rbp), %r8d
movq %rbx, %rdi
leaq 0xaea83(%rip), %rsi     # 0xddf84
xorl %eax, %eax
callq 0x13740
movl $0x4, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %rbx, %rcx
callq 0x139a0
incq %r15
movslq 0x8(%r14), %rax
addq $0x30, %rbp
cmpq %rax, %r15
jl 0x2f4b4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
movl $0x1, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdi), %eax
leaq 0xc(%rsp), %rdi
movl %eax, (%rdi)
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x139a0
cmpq $0x1, %rax
jne 0x2f9fe
leaq 0x28(%r14), %rdi
movl $0x38, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x139a0
cmpq $0x1, %rax
jne 0x2fa07
leaq 0x80(%r14), %rdi
movl $0x38, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x139a0
cmpq $0x1, %rax
jne 0x2fa10
movq $-0xff01, %rax          # imm = 0xFFFF00FF
andq 0x88(%r14), %rax
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x139a0
cmpq $0x1, %rax
jne 0x2fa19
cmpl $0x0, 0x8(%r14)
jle 0x2fa37
xorl %r15d, %r15d
xorl %r12d, %r12d
movq (%r14), %rdi
addq %r15, %rdi
movl $0x30, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x139a0
cmpq $0x1, %rax
jne 0x2f9f3
incq %r12
movslq 0x8(%r14), %rcx
addq $0x30, %r15
cmpq %rcx, %r12
jl 0x2f9c5
xorl %ebx, %ebx
cmpq $0x1, %rax
sete %bl
jmp 0x2fa29
leaq 0xae6c4(%rip), %rdi     # 0xde0c9
jmp 0x2fa20
leaq 0xae6de(%rip), %rdi     # 0xde0ec
jmp 0x2fa20
leaq 0xae703(%rip), %rdi     # 0xde11a
jmp 0x2fa20
leaq 0xae726(%rip), %rdi     # 0xde146
xorl %ebx, %ebx
xorl %eax, %eax
callq 0xac81a
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x1, %ebx
jmp 0x2fa29
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x2fdfe
callq 0x13680
movq $0x0, (%rbx)
movl $0x0, 0x8(%rbx)
leaq 0x10(%rbx), %rdi
leaq 0x505859(%rip), %rsi    # 0x535670
callq 0x8412a
leaq 0x30(%rbx), %rdi
leaq 0x104ba1(%rip), %r14    # 0x1349c8
leaq 0x8(%r14), %rsi
callq 0x8412a
leaq 0x48(%rbx), %rdi
addq $0x20, %r14
movq %r14, %rsi
callq 0x8412a
xorps %xmm0, %xmm0
movhps 0xad31e(%rip), %xmm0    # xmm0 = xmm0[0,1],mem[0,1]
xorps %xmm1, %xmm1
movups %xmm0, 0x60(%rbx)
movabsq $-0x3810000020000000, %rax # imm = 0xC7EFFFFFE0000000
movq %rax, 0x70(%rbx)
movl $0xffffffff, 0x78(%rbx) # imm = 0xFFFFFFFF
movups %xmm1, 0x7c(%rbx)
movups %xmm1, 0x8c(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x9c(%rbx)
movups %xmm1, 0xa8(%rbx)
movups %xmm1, 0xb4(%rbx)
testl %ebp, %ebp
jle 0x2fec4
movl %ebp, 0x8(%rbx)
movl %ebp, %eax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r14
movq %r14, %rdi
callq 0x13030
movq %rax, %r15
xorl %r12d, %r12d
leaq (%r15,%r12), %rdi
callq 0x2b118
addq $0x30, %r12
cmpq %r12, %r14
jne 0x2feaf
movq %r15, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x139b0
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/./R3SurfelBlock.h
// Function: gaps::R3SurfelTimestampConstraint::Check(gaps::R3SurfelBlock const*, gaps::R3Surfel const*) const
inline int R3SurfelBlock::
SurfelIndex(const R3Surfel *surfel) const
{
  // Return index of surfel in this block
  if (!surfels) return 0;
  int index = surfel - surfels;
  assert((index >= 0) && (index < nsurfels));
  return index;
}

// Assembly:
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x30162
subq %rcx, %rdx
shrq $0x4, %rdx
imull $0xaaaaaaab, %edx, %eax # imm = 0xAAAAAAAB
movslq %eax, %rdx
jmp 0x30164
xorl %edx, %edx
movsd 0x8(%rdi), %xmm0
movsd 0x10(%rdi), %xmm1
movl $0x2, %eax
ucomisd %xmm1, %xmm0
ja 0x301a0
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
cvtss2sd 0xc(%rcx,%rax), %xmm2
addsd 0x60(%rsi), %xmm2
xorl %ecx, %ecx
ucomisd %xmm2, %xmm1
setae %cl
addl %ecx, %ecx
xorl %eax, %eax
ucomisd %xmm0, %xmm2
cmovael %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
leaq 0xfddc7(%rip), %rax     # 0x12e038
movq %rax, (%rdi)
movupd (%rsi), %xmm1
cvtpd2ps %xmm1, %xmm1
movlpd %xmm1, 0x8(%rdi)
xorps %xmm1, %xmm1
cvtsd2ss 0x10(%rsi), %xmm1
movss %xmm1, 0x10(%rdi)
callq 0x13950
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x14(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelLineConstraint::Check(gaps::R3Point const&) const
int R3SurfelLineConstraint::
Check(const R3Point& point) const
{
  // Return whether line contains point
  RNScalar d = R3Distance(line, point);
  if (d <= tolerance) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
movq %rax, %rdi
callq 0x4ff3a
movsd 0x38(%rbx), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
setae %al
addl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x51978
movapd 0xacd15(%rip), %xmm2    # 0xdd3d0
andpd %xmm0, %xmm2
movsd 0x38(%rbx), %xmm1
movl $0x1, %eax
ucomisd %xmm2, %xmm1
jae 0x306f5
ucomisd %xmm1, %xmm0
jbe 0x306e0
movl $0x2, %eax
cmpl $0x0, 0x30(%rbx)
jne 0x306f5
cmpl $0x0, 0x28(%rbx)
setne %al
ucomisd %xmm0, %xmm1
seta %cl
andb %al, %cl
movzbl %cl, %eax
addl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
callq 0x50127
cmpl $0x0, 0x30(%rbx)
movsd 0x38(%rbx), %xmm1
movl $0x2, %eax
je 0x3071b
ucomisd %xmm1, %xmm0
ja 0x30748
cmpl $0x0, 0x2c(%rbx)
je 0x30733
movapd 0xacca7(%rip), %xmm2    # 0xdd3d0
andpd %xmm0, %xmm2
ucomisd %xmm2, %xmm1
jae 0x30748
cmpl $0x0, 0x28(%rbx)
setne %al
ucomisd %xmm0, %xmm1
seta %cl
andb %al, %cl
movzbl %cl, %eax
addl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x51937
xorl %eax, %eax
ucomisd 0x10(%rbx), %xmm0
ja 0x30a43
movl $0x200, %esi            # imm = 0x200
addq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x51f72
xorl %eax, %eax
ucomisd 0x10(%rbx), %xmm0
setbe %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movsd 0x8(%rsi), %xmm0
movsd 0x10(%rsi), %xmm1
movsd 0x20(%rsi), %xmm2
movsd 0x28(%rsi), %xmm3
leaq 0x68(%rsp), %rdi
callq 0x9f838
movq 0x8(%rbx), %rbx
leaq 0x10(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
callq 0xa2542
movl 0xc0(%rbx), %eax
decl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl 0xc4(%rbx), %eax
decl %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movq %rsp, %rdi
callq 0xa2542
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x97fd0
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x97fd0
leaq 0x40(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x9f766
leaq 0x68(%rsp), %rdi
leaq 0x40(%rsp), %rsi
xorl %edx, %edx
callq 0x90a62
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
leaq 0x40(%rsp), %rdi
callq 0xa00b0
leaq 0x68(%rsp), %rdi
callq 0xa00b0
movl %ebx, %eax
addq $0x90, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xa00b0
jmp 0x30d15
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xa00b0
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelViewConstraint::R3SurfelViewConstraint(gaps::R3Viewer const&, gaps::R2Grid const*, int)
R3SurfelViewConstraint::
R3SurfelViewConstraint(
  const R3Viewer& viewer,
  const R2Grid *image_mask,
  RNBoolean must_be_inside_frustum)
  : frustum(viewer.Camera().Frustum()),
    world_to_camera(viewer.Camera().CoordSystem().InverseMatrix()),
    w(viewer.Viewport().Width()),
    h(viewer.Viewport().Height()),
    fx(0),
    fy(0),
    cx(0.5*viewer.Viewport().Width()),
    cy(0.5*viewer.Viewport().Height()),
    neardist(viewer.Camera().Near()),
    fardist(viewer.Camera().Far()),
    image_mask(image_mask),
    must_be_inside_frustum(must_be_inside_frustum)
{
  // Update focal lengths
  const R3Camera& camera = viewer.Camera();
  RNScalar xfov = camera.XFOV();
  RNScalar yfov = camera.YFOV();
  RNScalar tan_xfov = tan(xfov);
  RNScalar tan_yfov = tan(yfov);
  this->fx = (tan_xfov != 0) ? 0.5 * w / tan(xfov) : 0;
  this->fy = (tan_yfov != 0) ? 0.5 * h / tan(yfov) : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xfd4fe(%rip), %rax     # 0x12e3a8
movq %rax, (%rdi)
leaq 0x8(%rdi), %r12
leaq 0x8(%rsi), %r13
addq $0x50, %rsi
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
callq 0x85490
leaq 0x38(%r14), %rcx
movsd 0x68(%r14), %xmm0
movsd 0x70(%r14), %xmm1
movsd 0x78(%r14), %xmm2
movsd 0x80(%r14), %xmm3
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x6abf0
leaq 0x150(%rbx), %rdi
movq %r13, %rsi
callq 0x70856
leaq 0x1d8(%rbx), %r12
movq 0xa0(%r14), %rax
movq %rax, %xmm0
movq %rax, 0x1d0(%rbx)
xorps %xmm1, %xmm1
cvtdq2pd %xmm0, %xmm0
mulpd 0xace65(%rip), %xmm0    # 0xddd90
movups %xmm1, 0x1d8(%rbx)
movupd %xmm0, 0x1e8(%rbx)
movups 0x78(%r14), %xmm0
movups %xmm0, 0x1f8(%rbx)
movq %r15, 0x208(%rbx)
movl 0x8(%rsp), %eax
movl %eax, 0x210(%rbx)
movsd 0x68(%r14), %xmm0
movsd 0x70(%r14), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x18(%rsp)
callq 0x132d0
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x132d0
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movsd (%rsp), %xmm2
ucomisd %xmm0, %xmm2
xorpd %xmm2, %xmm2
jne 0x30f9d
jnp 0x30fd9
xorps %xmm0, %xmm0
cvtsi2sdl 0x1d0(%rbx), %xmm0
mulsd 0xac188(%rip), %xmm0    # 0xdd138
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm1, (%rsp)
callq 0x132d0
movsd 0x10(%rsp), %xmm2
movsd (%rsp), %xmm1
divsd %xmm0, %xmm2
xorpd %xmm0, %xmm0
movsd %xmm2, (%r12)
ucomisd %xmm0, %xmm1
jne 0x30fe7
jnp 0x31017
xorps %xmm0, %xmm0
cvtsi2sdl 0x1d4(%rbx), %xmm0
mulsd 0xac13e(%rip), %xmm0    # 0xdd138
movsd %xmm0, (%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x132d0
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm0, 0x1e0(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelViewConstraint::Check(gaps::R3Point const&) const
int R3SurfelViewConstraint::
Check(const R3Point& point) const
{
  // Transform into camera coordinates (z is negative)
  R3Point camera_point = world_to_camera * point;
  RNScalar depth = -camera_point.Z();

  // Check if z is too near or far
  if (depth < neardist) return R3_SURFEL_CONSTRAINT_FAIL;
  if (depth > fardist) return R3_SURFEL_CONSTRAINT_FAIL;

  // Compute image position
  int ix = (int) (cx + fx*camera_point.X()/depth);
  int iy = (int) (cy + fy*camera_point.Y()/depth);

  // Check image position
  if (must_be_inside_frustum) {
    // Return fail if outside
    if ((ix < 0) || (ix >= w)) return R3_SURFEL_CONSTRAINT_FAIL;
    if ((iy < 0) || (iy >= h)) return R3_SURFEL_CONSTRAINT_FAIL;
  }
  else {
    // Snap to closest pixel on boundary
    if (ix < 0) ix = 0;
    if (ix >= w) ix = w-1;
    if (iy < 0) iy = 0;
    if (iy >= h) iy = h-1;
  }

  // Check if point is masked
  if (image_mask) {
    RNScalar mask_value = image_mask->GridValue(ix, iy);
    if (mask_value == R2_GRID_UNKNOWN_VALUE) return R3_SURFEL_CONSTRAINT_FAIL;
    if (mask_value == 0.0) return R3_SURFEL_CONSTRAINT_FAIL;
  }
  
  // Passed all tests
  return R3_SURFEL_CONSTRAINT_PASS;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x150(%rdi), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x7443a
movsd 0x10(%r14), %xmm0
movapd 0xabecb(%rip), %xmm1    # 0xdd3a0
xorpd %xmm0, %xmm1
movsd 0x1f8(%rbx), %xmm2
xorl %eax, %eax
ucomisd %xmm1, %xmm2
ja 0x315f2
ucomisd 0x200(%rbx), %xmm1
ja 0x315f2
movupd 0x1e8(%rbx), %xmm1
movupd 0x1d8(%rbx), %xmm2
mulpd (%rsp), %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm2
subpd %xmm2, %xmm1
cvttpd2dq %xmm1, %xmm0
cmpl $0x0, 0x210(%rbx)
movl 0x1d0(%rbx), %ecx
je 0x31568
movd %xmm0, %edx
testl %edx, %edx
setns %sil
cmpl %edx, %ecx
setg %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x315f2
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
movd %xmm1, %ecx
testl %ecx, %ecx
js 0x315f2
cmpl %ecx, 0x1d4(%rbx)
jg 0x315a4
jmp 0x315f2
xorpd %xmm1, %xmm1
movdqa %xmm0, %xmm2
pcmpgtd %xmm1, %xmm2
pand %xmm0, %xmm2
movd 0x1d4(%rbx), %xmm0
movd %ecx, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
pcmpeqd %xmm3, %xmm3
paddd %xmm1, %xmm3
movdqa %xmm1, %xmm0
pcmpgtd %xmm2, %xmm0
pand %xmm0, %xmm2
pandn %xmm3, %xmm0
por %xmm2, %xmm0
movq 0x208(%rbx), %rcx
testq %rcx, %rcx
je 0x315ed
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
movd %xmm1, %edx
imull 0xc8(%rcx), %edx
movq 0xb8(%rcx), %rcx
movd %xmm0, %esi
addl %edx, %esi
movslq %esi, %rdx
movsd (%rcx,%rdx,8), %xmm0
ucomisd 0xaccc3(%rip), %xmm0    # 0xde2a0
jne 0x315e1
jnp 0x315f2
pxor %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x315ed
jnp 0x315f2
movl $0x2, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
leaq 0xfcde1(%rip), %rax     # 0x12e3f8
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
leaq 0x10(%rdi), %rbx
leaq 0xff3cf(%rip), %rax     # 0x1309f8
addq $0x10, %rax
movq %rax, 0x10(%rdi)
addq $0x18, %rdi
leaq 0x8(%rdx), %rsi
callq 0x7233e
leaq 0x98(%r14), %rdi
leaq 0x88(%r12), %rsi
callq 0x7233e
movq 0x108(%r12), %rax
movq %rax, 0x118(%r14)
movsd (%rsp), %xmm0
movsd %xmm0, 0x120(%r14)
movq $0x0, 0x128(%r14)
movl $0x18, %edi
callq 0x134e0
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x45650
movq %r12, 0x128(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movl $0x18, %esi
movq %r12, %rdi
callq 0x134f0
jmp 0x316ba
movq %rax, %r14
movq %rbx, %rdi
callq 0x700a8
jmp 0x316cf
movq %rax, %r14
movq %rbx, %rdi
callq 0x7073c
movq %r14, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x6d354
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x6e040
movl $0xf8, %esi
addq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x51f72
xorl %ebp, %ebp
ucomisd 0x120(%rbx), %xmm0
setbe %bpl
leaq 0x8(%rsp), %rdi
callq 0x6e174
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x31792
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6e174
movq %rbx, %rdi
callq 0x138b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/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:
cmpq $0x0, 0x8(%rdi)
je 0x31813
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x83dd2
leaq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x846d8
leaq 0x38(%rsp), %rdi
callq 0x83dc0
movq 0x128(%rbx), %rdi
movsd 0x120(%rbx), %xmm1
leaq 0x18(%rsp), %rbx
xorps %xmm0, %xmm0
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4706c
xorl %eax, %eax
cmpl $0x0, (%rbx)
setne %al
addl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rsi, %rsi
je 0x31853
movq 0x8(%rdi), %rax
testq %rax, %rax
setne %cl
cmpq %rsi, %rax
setne %al
andb %cl, %al
movzbl %al, %ecx
notb %al
movzbl %al, %eax
andl $0x1, %eax
addl %eax, %eax
andl $0x1, %ecx
addl %ecx, %ecx
jmp 0x3185a
movl $0x2, %ecx
xorl %eax, %eax
cmpl $0x0, 0x10(%rdi)
cmovnel %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x318fb
movq %rsi, %rdi
callq 0x17872
testq %rax, %rax
je 0x318fb
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
sete %dl
cmpq %rcx, %rax
sete %al
orb %dl, %al
je 0x318fb
xorl %ecx, %ecx
movl $0x2, %eax
jmp 0x31902
movl $0x2, %ecx
xorl %eax, %eax
cmpl $0x0, 0x10(%rbx)
cmovnel %ecx, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $0x0, 0x8(%rdi)
je 0x31984
testb $0x30, 0x2f(%rdx)
je 0x319c8
cmpl $0x0, 0x10(%rdi)
je 0x3199a
movb 0x2f(%rdx), %cl
andb $0x30, %cl
movl $0x2, %eax
cmpb $0x10, %cl
je 0x319c7
cmpl $0x0, 0x14(%rdi)
je 0x319b0
movb 0x2f(%rdx), %cl
andb $0x30, %cl
movl $0x2, %eax
cmpb $0x20, %cl
je 0x319c7
cmpl $0x0, 0xc(%rdi)
je 0x319c5
movb 0x2f(%rdx), %cl
notb %cl
movl $0x2, %eax
testb $0x30, %cl
je 0x319c7
xorl %eax, %eax
retq
movl $0x2, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelSourceConstraint::Check(gaps::R3SurfelBlock const*, gaps::R3Surfel const*) const
int R3SurfelSourceConstraint::
Check(const R3SurfelBlock *block, const R3Surfel *surfel) const
{
  // Return whether surfel satisfies constraint
  if (include_terrestrial && surfel->IsTerrestrial()) return R3_SURFEL_CONSTRAINT_PASS;
  if (include_aerial && surfel->IsAerial()) return R3_SURFEL_CONSTRAINT_PASS;
  return R3_SURFEL_CONSTRAINT_FAIL;
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
je 0x31ae9
movl $0x2, %eax
testb $0x2, 0x2f(%rdx)
je 0x31afc
cmpl $0x0, 0x8(%rdi)
je 0x31afa
movl $0x2, %eax
testb $0x2, 0x2f(%rdx)
jne 0x31afc
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMultiConstraint::Check(gaps::R3SurfelObject const*) const
int R3SurfelMultiConstraint::
Check(const R3SurfelObject *object) const
{
  // Initialize return status 
  int status = R3_SURFEL_CONSTRAINT_PASS;

  // Check whether all constraints are met
  for (int i = 0; i < constraints.NEntries(); i++) {
    const R3SurfelConstraint *constraint = constraints.Kth(i);
    int s = constraint->Check(object);
    if (s == R3_SURFEL_CONSTRAINT_FAIL) return R3_SURFEL_CONSTRAINT_FAIL;
    else if (s == R3_SURFEL_CONSTRAINT_MAYBE) status = R3_SURFEL_CONSTRAINT_MAYBE;
  }

  // Return how all constraints are met
  return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x14(%rdi)
jle 0x31be9
movq %rsi, %r14
movq %rdi, %r15
movl $0x2, %ebx
xorl %r12d, %r12d
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
testl %eax, %eax
je 0x31bf0
cmpl $0x1, %eax
cmovel %eax, %ebx
incq %r12
movslq 0x14(%r15), %rax
cmpq %rax, %r12
jl 0x31bc0
jmp 0x31bf2
movl $0x2, %ebx
jmp 0x31bf2
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMultiConstraint::Check(gaps::R3SurfelNode const*) const
int R3SurfelMultiConstraint::
Check(const R3SurfelNode *node) const
{
  // Initialize return status 
  int status = R3_SURFEL_CONSTRAINT_PASS;

  // Check whether all constraints are met
  for (int i = 0; i < constraints.NEntries(); i++) {
    const R3SurfelConstraint *constraint = constraints.Kth(i);
    int s = constraint->Check(node);
    if (s == R3_SURFEL_CONSTRAINT_FAIL) return R3_SURFEL_CONSTRAINT_FAIL;
    else if (s == R3_SURFEL_CONSTRAINT_MAYBE) status = R3_SURFEL_CONSTRAINT_MAYBE;
  }

  // Return how all constraints are met
  return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x14(%rdi)
jle 0x31c45
movq %rsi, %r14
movq %rdi, %r15
movl $0x2, %ebx
xorl %r12d, %r12d
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x18(%rax)
testl %eax, %eax
je 0x31c4c
cmpl $0x1, %eax
cmovel %eax, %ebx
incq %r12
movslq 0x14(%r15), %rax
cmpq %rax, %r12
jl 0x31c1c
jmp 0x31c4e
movl $0x2, %ebx
jmp 0x31c4e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/R3Surfels/R3SurfelConstraint.cpp
// Function: gaps::R3SurfelMultiConstraint::Check(gaps::R3SurfelBlock const*) const
int R3SurfelMultiConstraint::
Check(const R3SurfelBlock *block) const
{
  // Initialize return status 
  int status = R3_SURFEL_CONSTRAINT_PASS;

  // Check whether all constraints are met
  for (int i = 0; i < constraints.NEntries(); i++) {
    const R3SurfelConstraint *constraint = constraints.Kth(i);
    int s = constraint->Check(block);
    if (s == R3_SURFEL_CONSTRAINT_FAIL) return R3_SURFEL_CONSTRAINT_FAIL;
    else if (s == R3_SURFEL_CONSTRAINT_MAYBE) status = R3_SURFEL_CONSTRAINT_MAYBE;
  }

  // Return how all constraints are met
  return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x14(%rdi)
jle 0x31ca1
movq %rsi, %r14
movq %rdi, %r15
movl $0x2, %ebx
xorl %r12d, %r12d
movq 0x8(%r15), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x20(%rax)
testl %eax, %eax
je 0x31ca8
cmpl $0x1, %eax
cmovel %eax, %ebx
incq %r12
movslq 0x14(%r15), %rax
cmpq %rax, %r12
jl 0x31c78
jmp 0x31caa
movl $0x2, %ebx
jmp 0x31caa
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq