LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/apps/conf2conf/conf2conf.cpp
// Function: Transform(gaps::RGBDConfiguration*, gaps::R4Matrix const&)
static int
Transform(RGBDConfiguration *configuration, const R4Matrix& matrix)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();
  if (print_verbose) {
    printf("Transforming ...\n");
    fflush(stdout);
  }

  // Transform all images
  R3Affine transformation(matrix, 0);
  for (int i = 0; i < configuration->NImages(); i++) {
    RGBDImage *image = configuration->Image(i);
    image->Transform(transformation);
  }

  // Print statistics
  if (print_verbose) {
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", configuration->NImages());
    printf("  Matrix =\n    %g %g %g %g\n    %g %g %g %g\n    %g %g %g %g\n    %g %g %g %g\n",
      matrix[0][0], matrix[0][1], matrix[0][2], matrix[0][3],
      matrix[1][0], matrix[1][1], matrix[1][2], matrix[1][3],
      matrix[2][0], matrix[2][1], matrix[2][2], matrix[2][3],
      matrix[3][0], matrix[3][1], matrix[3][2], matrix[3][3]);
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x74e34
movq %r15, %rdi
xorl %esi, %esi
callq 0x119a0
cmpb $0x1, 0xef03f(%rip)     # 0x104de8
jne 0x15dc6
leaq 0xa56e7(%rip), %rdi     # 0xbb499
callq 0x11900
movq 0xee1a2(%rip), %rax     # 0x103f60
movq (%rax), %rdi
callq 0x116f0
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x45c1a
cmpl $0x0, 0x14(%r14)
jle 0x15e04
xorl %r12d, %r12d
leaq 0x58(%rsp), %r15
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x88(%rax)
incq %r12
movslq 0x14(%r14), %rax
cmpq %rax, %r12
jl 0x15de4
cmpb $0x0, 0xeefdd(%rip)     # 0x104de8
je 0x15eaa
leaq 0x48(%rsp), %rdi
callq 0x74e96
leaq 0xa54cc(%rip), %rdi     # 0xbb2ee
movb $0x1, %al
callq 0x11080
movl 0x14(%r14), %esi
leaq 0xa54d1(%rip), %rdi     # 0xbb305
xorl %eax, %eax
callq 0x11080
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
movsd 0x18(%rbx), %xmm3
movsd 0x20(%rbx), %xmm4
movsd 0x28(%rbx), %xmm5
movsd 0x30(%rbx), %xmm6
movsd 0x38(%rbx), %xmm7
movups 0x40(%rbx), %xmm8
movups 0x50(%rbx), %xmm9
movups 0x60(%rbx), %xmm10
movups 0x70(%rbx), %xmm11
movups %xmm11, 0x30(%rsp)
movups %xmm10, 0x20(%rsp)
movups %xmm9, 0x10(%rsp)
movups %xmm8, (%rsp)
leaq 0xa553b(%rip), %rdi     # 0xbb3cf
movb $0x8, %al
callq 0x11080
movq 0xee0be(%rip), %rax     # 0x103f60
movq (%rax), %rdi
callq 0x116f0
leaq 0x58(%rsp), %rdi
callq 0x45c68
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x15ec5
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x45c68
movq %rbx, %rdi
callq 0x11a60
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformTextureToWorld(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDSurface const*)
int RGBDTransformTextureToWorld(const R2Point& texture_position, R3Point& world_position, const RGBDSurface *surface)
{
  // Transform from position in texture coordinates to world coordinates
  R2Point surface_position;
  if (!RGBDTransformTextureToSurface(texture_position, surface_position, surface)) return 0;
  if (!RGBDTransformSurfaceToWorld(surface_position, world_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6f0d4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x38(%rax)
testl %eax, %eax
je 0x15f41
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x48(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x15f43
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformTextureToCamera(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDSurface const*, gaps::RGBDImage const*)
int RGBDTransformTextureToCamera(const R2Point& texture_position, R3Point& camera_position, const RGBDSurface *surface, const RGBDImage *image)
{
  // Transform from position in texture coordinates to camera coordinates
  R3Point world_position;
  if (!RGBDTransformTextureToWorld(texture_position, world_position, surface)) return 0;
  if (!RGBDTransformWorldToCamera(world_position, camera_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4b600
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x15ef1
testl %eax, %eax
je 0x15fbb
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0xa8(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x15fbd
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformWorldToImage(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*)
int RGBDTransformWorldToImage(const R3Point& world_position, R2Point& image_position, const RGBDImage *image)
{
  // Transform from position in world coordinates to image coordinates
  R3Point camera_position;
  if (!RGBDTransformWorldToCamera(world_position, camera_position, image)) return 0;
  if (!RGBDTransformCameraToImage(camera_position, image_position, image)) return 0;
  return 1;

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x4b600
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0xa8(%rax)
testl %eax, %eax
je 0x16082
movq %rsp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x161db
jmp 0x16084
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformSurfaceToCamera(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDSurface const*, gaps::RGBDImage const*)
int RGBDTransformSurfaceToCamera(const R2Point& surface_position, R3Point& camera_position, const RGBDSurface *surface, const RGBDImage *image)
{
  // Transform from position in surface coordinates to camera coordinates
  R3Point world_position;
  if (!RGBDTransformSurfaceToWorld(surface_position, world_position, surface)) return 0;
  if (!RGBDTransformWorldToCamera(world_position, camera_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4b600
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x48(%rax)
testl %eax, %eax
je 0x160fd
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0xa8(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x160ff
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformSurfaceToImage(gaps::R2Point const&, gaps::R2Point&, gaps::RGBDSurface const*, gaps::RGBDImage const*)
int RGBDTransformSurfaceToImage(const R2Point& surface_position, R2Point& image_position, const RGBDSurface *surface, const RGBDImage *image)
{
  // Transform from position in surface coordinates to image coordinates
  R3Point world_position;
  if (!RGBDTransformSurfaceToWorld(surface_position, world_position, surface)) return 0;
  if (!RGBDTransformWorldToImage(world_position, image_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4b600
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x48(%rax)
testl %eax, %eax
je 0x16158
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1603d
jmp 0x1615a
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformWorldToTexture(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDSurface const*)
int RGBDTransformWorldToTexture(const R3Point& world_position, R2Point& texture_position, const RGBDSurface *surface)
{
  // Transform from position in world coordinates to texture coordinates
  R2Point surface_position;
  if (!RGBDTransformWorldToSurface(world_position, surface_position, surface)) return 0;
  if (!RGBDTransformSurfaceToTexture(surface_position, texture_position, surface)) return 0;
  return 1;

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6f0d4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x50(%rax)
testl %eax, %eax
je 0x161b8
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x40(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x161ba
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformCameraToImage(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*)
int RGBDTransformCameraToImage(const R3Point& camera_position, R2Point& image_position, const RGBDImage *image)
{
  // Transform from position in camera coordinates to image coordinates
  if (!image->TransformCameraToImage(camera_position, image_position)) return 0;

  // Check pixel position
  int image_ix = (int) (image_position.X() + 0.5);
  if ((image_ix < 0) || (image_ix >= image->NPixels(RN_X))) return 0;
  int image_iy = (int) (image_position.Y() + 0.5);
  if ((image_iy < 0) || (image_iy >= image->NPixels(RN_Y))) return 0;

#if 0
  // Get/check point depth
  RNScalar point_depth = -camera_position[2];
  if (RNIsNegativeOrZero(point_depth)) return 0;

  // Check depth
  RNScalar image_depth = image->PixelDepth(image_ix, image_iy);
  if ((image_depth == R2_GRID_UNKNOWN_VALUE) || (image_depth == 0)) return 0;

  // If depth is not within 10% of image depth, then probably not 
  if (image_depth < 0.9 * point_depth) return 0;
  if (image_depth > 1.1 * point_depth) return 0;
#endif
  
  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq (%rdx), %rax
movq %rdx, %rdi
movq %r14, %rdx
callq *0x98(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x16237
movsd (%r14), %xmm0
addsd 0xa4e14(%rip), %xmm0    # 0xbb020
cvttsd2si %xmm0, %ecx
testl %ecx, %ecx
js 0x16237
cmpl %ecx, 0x28(%rbx)
jle 0x16237
movsd 0x8(%r14), %xmm0
addsd 0xa4df9(%rip), %xmm0    # 0xbb020
cvttsd2si %xmm0, %ecx
testl %ecx, %ecx
js 0x16237
xorl %eax, %eax
cmpl %ecx, 0x2c(%rbx)
setg %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformCameraToTexture(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*, gaps::RGBDSurface const*)
int RGBDTransformCameraToTexture(const R3Point& camera_position, R2Point& texture_position, const RGBDImage *image, const RGBDSurface *surface)
{
  // Transform from position in camera coordinates to texture coordinates
  R3Point world_position;
  if (!RGBDTransformCameraToWorld(camera_position, world_position, image)) return 0;
  if (!RGBDTransformWorldToTexture(world_position, texture_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4b600
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xa0(%rax)
testl %eax, %eax
je 0x1628d
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x16168
jmp 0x1628f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformCameraToSurface(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*, gaps::RGBDSurface const*)
int RGBDTransformCameraToSurface(const R3Point& camera_position, R2Point& surface_position, const RGBDImage *image, const RGBDSurface *surface)
{
  // Transform from position in camera coordinates to surface coordinates
  R3Point world_position;
  if (!RGBDTransformCameraToWorld(camera_position, world_position, image)) return 0;
  if (!RGBDTransformWorldToSurface(world_position, surface_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4b600
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xa0(%rax)
testl %eax, %eax
je 0x1630d
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x50(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x1630f
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformImageToWorld(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDImage const*)
int RGBDTransformImageToWorld(const R2Point& image_position, R3Point& world_position, const RGBDImage *image)
{
  // Transform from position in image coordinates to world coordinates
  R3Point camera_position;
  if (!RGBDTransformImageToCamera(image_position, camera_position, image)) return 0;
  if (!RGBDTransformCameraToWorld(camera_position, world_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x4b600
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x90(%rax)
testl %eax, %eax
je 0x163c9
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0xa0(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x163cb
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformImageToSurface(gaps::R2Point const&, gaps::R2Point&, gaps::RGBDImage const*, gaps::RGBDSurface const*)
int RGBDTransformImageToSurface(const R2Point& image_position, R2Point& surface_position, const RGBDImage *image, const RGBDSurface *surface)
{
  // Transform from position in image coordinates to surface coordinates
  R3Point world_position;
  if (!RGBDTransformImageToWorld(image_position, world_position, image)) return 0;
  if (!RGBDTransformWorldToSurface(world_position, surface_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4b600
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x16377
testl %eax, %eax
je 0x1642b
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x50(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x1642d
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::~RGBDConfiguration()
RGBDConfiguration::
~RGBDConfiguration(void)
{
  // Delete everything
  while (NImages() > 0) delete Image(NImages()-1);
  while (NSurfaces() > 0) delete Surface(NSurfaces()-1);

  // Delete name
  if (name) free(name);

  // Delete directory names
  if (color_directory) free(color_directory);
  if (depth_directory) free(depth_directory);
  if (category_directory) free(category_directory);
  if (instance_directory) free(instance_directory);
  if (texture_directory) free(texture_directory);

  // Delete dataset format
  if (dataset_format) free(dataset_format);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xe9771(%rip), %rax     # 0xffc60
movq %rax, (%rdi)
movl 0x14(%rdi), %eax
testl %eax, %eax
jle 0x16514
movq 0x8(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x164f5
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x14(%rbx), %eax
jmp 0x164f5
movl 0x24(%rbx), %eax
testl %eax, %eax
jle 0x16533
movq 0x18(%rbx), %rcx
movl %eax, %edx
movq -0x8(%rcx,%rdx,8), %rdi
testq %rdi, %rdi
je 0x16517
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16514
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x16541
callq 0x11710
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x1654f
callq 0x11710
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x1655d
callq 0x11710
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x1656b
callq 0x11710
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x16579
callq 0x11710
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x16587
callq 0x11710
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x16595
callq 0x11710
leaq 0x60(%rbx), %rdi
callq 0x43d34
leaq 0x18(%rbx), %rdi
callq 0x7543a
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x7543a
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::WorldCentroid() const
R3Point RGBDConfiguration::
WorldCentroid(void) const
{
  // Compute weighed sum of surface centroids
  RNArea weight = 0;
  R3Point position = R3zero_point;
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    position += surface->WorldArea() * surface->WorldCentroid();
    weight += surface->WorldArea();
  }

  // Return weighted average
  if (RNIsZero(weight)) return R3zero_point;
  return position / weight;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
leaq 0xef5b7(%rip), %rsi     # 0x105ba0
leaq 0x20(%rsp), %rdi
callq 0x4b612
cmpl $0x0, 0x24(%r14)
jle 0x166ee
xorpd %xmm2, %xmm2
xorl %r15d, %r15d
leaq 0x38(%rsp), %r12
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rbx
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
movsd %xmm2, 0x18(%rsp)
je 0x16636
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x1664c
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x16649
callq 0x2bac2
jmp 0x1664c
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0x16669
movq (%rsi), %rax
movq %r12, %rdi
callq *0x68(%rax)
jmp 0x1668b
movq 0x88(%rbx), %rsi
movq %r12, %rdi
testq %rsi, %rsi
je 0x1667f
callq 0x2b900
jmp 0x1668b
leaq 0xef51a(%rip), %rsi     # 0x105ba0
callq 0x4b612
movq %r13, %rdi
movq %r12, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x4c046
movq %rbp, %rdi
movq %r13, %rsi
callq 0x4bf3c
movq 0x80(%rbx), %rdi
testq %rdi, %rdi
je 0x166bb
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x166d2
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x166ce
callq 0x2bac2
jmp 0x166d2
xorpd %xmm0, %xmm0
movsd 0x18(%rsp), %xmm2
addsd %xmm0, %xmm2
incq %r15
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jl 0x16614
jmp 0x166f2
xorpd %xmm2, %xmm2
leaq 0xee5df(%rip), %rax     # 0x104cd8
movsd (%rax), %xmm0
movapd 0xa494b(%rip), %xmm1    # 0xbb050
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jb 0x1672b
ucomisd %xmm2, %xmm0
jb 0x1672b
leaq 0xef484(%rip), %rsi     # 0x105ba0
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x4b612
jmp 0x16741
leaq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movapd %xmm2, %xmm0
callq 0x4c068
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::InsertImage(gaps::RGBDImage*)
void RGBDConfiguration::
InsertImage(RGBDImage *image)
{
  // Just checking
  assert(image);
  assert(image->configuration == NULL);
  assert(image->configuration_index == -1);

  // Insert image into configuration
  image->configuration = this;
  image->configuration_index = images.NEntries();
  images.Insert(image);

  // Update bounding box
  world_bbox.Union(image->WorldBBox());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, 0x8(%rsi)
addq $0x8, %rdi
movl 0x14(%r14), %edx
movl %edx, 0x10(%rsi)
callq 0x75466
addq $0x60, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1d25a
movq %r14, %rdi
movq %r15, %rsi
callq 0x439cc
leaq 0x8(%rsp), %rdi
callq 0x43d34
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x43d34
movq %rbx, %rdi
callq 0x11a60
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::RemoveImage(gaps::RGBDImage*)
void RGBDConfiguration::
RemoveImage(RGBDImage *image)
{
  // Just checking
  assert(image);
  assert(image->configuration == this);
  assert(image->configuration_index >= 0);
  assert(images.Kth(image->configuration_index) == image);

  // Remove image from configuration
  RNArrayEntry *entry = images.KthEntry(image->configuration_index);
  RGBDImage *tail = images.Tail();
  tail->configuration_index = image->configuration_index;
  images.EntryContents(entry) = tail;
  images.RemoveTail();
  image->configuration_index = -1;
  image->configuration = NULL;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x8(%rdi), %rax
movslq 0x10(%rsi), %rcx
movq 0x8(%rdi), %rdx
movslq 0x14(%rdi), %rsi
movq -0x8(%rdx,%rsi,8), %rdi
movl %ecx, 0x10(%rdi)
movq %rdi, (%rdx,%rcx,8)
decl %esi
movq %rax, %rdi
callq 0x755f0
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::InsertSurface(gaps::RGBDSurface*)
void RGBDConfiguration::
InsertSurface(RGBDSurface *surface)
{
  // Just checking
  assert(surface);
  assert(surface->configuration == NULL);
  assert(surface->configuration_index == -1);

  // Insert surface into configuration
  surface->configuration = this;
  surface->configuration_index = surfaces.NEntries();
  surfaces.Insert(surface);

  // Update bounding box
  world_bbox.Union(surface->WorldBBox());
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rdi, 0x8(%rsi)
addq $0x18, %rdi
movl 0x24(%rbx), %edx
movl %edx, 0x10(%rsi)
callq 0x75466
addq $0x60, %rbx
movq 0x80(%r14), %rsi
testq %rsi, %rsi
je 0x1683a
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x88(%rax)
jmp 0x1685e
movq 0x88(%r14), %rsi
testq %rsi, %rsi
je 0x1684f
addq $0xf8, %rsi
jmp 0x16856
leaq 0xeead2(%rip), %rsi     # 0x105328
movq %rsp, %rdi
callq 0x42f14
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x439cc
movq %rsp, %rdi
callq 0x43d34
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x43d34
movq %rbx, %rdi
callq 0x11a60
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::RemoveSurface(gaps::RGBDSurface*)
void RGBDConfiguration::
RemoveSurface(RGBDSurface *surface)
{
  // Just checking
  assert(surface);
  assert(surface->configuration == this);
  assert(surface->configuration_index >= 0);
  assert(surfaces.Kth(surface->configuration_index) == surface);

  // Remove surface from configuration
  RNArrayEntry *entry = surfaces.KthEntry(surface->configuration_index);
  RGBDSurface *tail = surfaces.Tail();
  tail->configuration_index = surface->configuration_index;
  surfaces.EntryContents(entry) = tail;
  surfaces.RemoveTail();
  surface->configuration_index = -1;
  surface->configuration = NULL;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
leaq 0x18(%rdi), %rax
movslq 0x10(%rsi), %rcx
movq 0x18(%rdi), %rdx
movslq 0x24(%rdi), %rsi
movq -0x8(%rdx,%rsi,8), %rdi
movl %ecx, 0x10(%rdi)
movq %rdi, (%rdx,%rcx,8)
decl %esi
movq %rax, %rdi
callq 0x755f0
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
movq $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::Transform(gaps::R3Transformation const&)
void RGBDConfiguration::
Transform(const R3Transformation& transformation)
{
  // Transform images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->Transform(transformation);
  }
  
  // Transform surfaces
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    surface->Transform(transformation);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, 0x14(%rdi)
jle 0x168fc
xorl %r15d, %r15d
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x88(%rax)
incq %r15
movslq 0x14(%r14), %rax
cmpq %rax, %r15
jl 0x168dc
cmpl $0x0, 0x24(%r14)
jle 0x16923
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x30(%rax)
incq %r15
movslq 0x24(%r14), %rax
cmpq %rax, %r15
jl 0x16906
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadFile(char const*, int)
int RGBDConfiguration::
ReadFile(const char *filename, int read_every_kth_image)
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .conf)\n", filename);
    return 0;
  }

  // Read file of appropriate type
  if (!strncmp(extension, ".conf", 5)) {
    if (!ReadConfigurationFile(filename, read_every_kth_image)) return 0;
  }
  else if (!strncmp(extension, ".json", 5)) {
    if (!ReadNeRFFile(filename, read_every_kth_image)) return 0;
  }
  else if (!strncmp(extension, ".seg", 4)) {
    if (!ReadSegmentationFile(filename)) return 0;
  }
  else if (!strncmp(extension, ".obb", 4)) {
    if (!ReadOrientedBoxFile(filename)) return 0;
  }
  else {
    RNFail("Unable to read file %s (unrecognized extension: %s)\n", filename, extension);
    return 0;
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x11640
testq %rax, %rax
je 0x16b94
movq %rax, %r15
leaq 0xa4ab9(%rip), %rsi     # 0xbb5dc
movl $0x5, %edx
movq %rax, %rdi
callq 0x11290
testl %eax, %eax
je 0x16ba9
leaq 0xa4aa7(%rip), %rsi     # 0xbb5e2
movl $0x5, %edx
movq %r15, %rdi
callq 0x11290
testl %eax, %eax
je 0x16bb9
leaq 0xa4a95(%rip), %rsi     # 0xbb5e8
movl $0x4, %edx
movq %r15, %rdi
callq 0x11290
testl %eax, %eax
je 0x16bcc
leaq 0xa4a82(%rip), %rsi     # 0xbb5ed
movl $0x4, %edx
movq %r15, %rdi
callq 0x11290
testl %eax, %eax
je 0x16bdd
leaq 0xa4a6f(%rip), %rdi     # 0xbb5f2
xorl %ebp, %ebp
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x77f42
jmp 0x16bf9
leaq 0xa4a15(%rip), %rdi     # 0xbb5b0
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x11080
jmp 0x16bf9
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *0x78(%rax)
jmp 0x16bec
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *0x80(%rax)
jmp 0x16bec
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x88(%rax)
jmp 0x16bec
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x90(%rax)
testl %eax, %eax
je 0x16bf7
movl $0x1, %ebp
jmp 0x16bf9
xorl %ebp, %ebp
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/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::WriteFile(char const*, int) const
int RGBDConfiguration::
WriteFile(const char *filename, int write_every_kth_image) const
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .conf)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strncmp(extension, ".conf", 5)) {
    if (!WriteConfigurationFile(filename, write_every_kth_image)) return 0;
  }
  else if (!strncmp(extension, ".json", 5)) {
    if (!WriteNeRFFile(filename, write_every_kth_image)) return 0;
  }
  else if (!strncmp(extension, ".cam", 4)) {
    if (!WriteCameraFile(filename)) return 0;
  }
  else if (!strncmp(extension, ".obj", 4)) {
    if (!WriteObjFile(filename)) return 0;
  }
  else {
    RNFail("Unable to write file %s (unrecognized extension: %s)\n", filename, extension);
    return 0;
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x11640
testq %rax, %rax
je 0x16ca2
movq %rax, %r15
leaq 0xa49ab(%rip), %rsi     # 0xbb5dc
movl $0x5, %edx
movq %rax, %rdi
callq 0x11290
testl %eax, %eax
je 0x16cb7
leaq 0xa4999(%rip), %rsi     # 0xbb5e2
movl $0x5, %edx
movq %r15, %rdi
callq 0x11290
testl %eax, %eax
je 0x16cca
leaq 0xa49c6(%rip), %rsi     # 0xbb627
movl $0x4, %edx
movq %r15, %rdi
callq 0x11290
testl %eax, %eax
je 0x16cdd
leaq 0xa49b3(%rip), %rsi     # 0xbb62c
movl $0x4, %edx
movq %r15, %rdi
callq 0x11290
testl %eax, %eax
je 0x16cf3
leaq 0xa49a0(%rip), %rdi     # 0xbb631
xorl %ebp, %ebp
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x77f42
jmp 0x16d0f
leaq 0xa4907(%rip), %rdi     # 0xbb5b0
xorl %ebp, %ebp
movq %rbx, %rsi
xorl %eax, %eax
callq 0x11080
jmp 0x16d0f
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *0xa0(%rax)
jmp 0x16d02
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *0xa8(%rax)
jmp 0x16d02
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq *0xb0(%rax)
jmp 0x16d02
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xb8(%rax)
testl %eax, %eax
je 0x16d0d
movl $0x1, %ebp
jmp 0x16d0f
xorl %ebp, %ebp
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/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadConfigurationFile(char const*, int)
int RGBDConfiguration::
ReadConfigurationFile(const char *filename, int read_every_kth_image)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open configuration file %s\n", filename);
    return 0;
  }

  // Read file
  if (!ReadConfigurationStream(fp, read_every_kth_image)) return 0;
  
  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
leaq 0xaad30(%rip), %rsi     # 0xc1a63
movq %r15, %rdi
callq 0x11700
testq %rax, %rax
je 0x16d68
movq %rax, %r14
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq *0xc0(%rax)
testl %eax, %eax
je 0x16d7d
movq %r14, %rdi
callq 0x115a0
movl $0x1, %ebx
jmp 0x16d7f
leaq 0xa48f8(%rip), %rdi     # 0xbb667
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x77f42
jmp 0x16d7f
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::WriteConfigurationFile(char const*, int) const
int RGBDConfiguration::
WriteConfigurationFile(const char *filename, int write_every_kth_image) const
{
#if 0
  // Create directories
  char cmd[4096];
  if (color_directory) { sprintf(cmd, "mkdir -p %s", color_directory); system(cmd); }
  if (depth_directory) { sprintf(cmd, "mkdir -p %s", depth_directory); system(cmd); }
  if (category_directory) { sprintf(cmd, "mkdir -p %s", category_directory); system(cmd); }
  if (instance_directory) { sprintf(cmd, "mkdir -p %s", instance_directory); system(cmd); }
  if (texture_directory) { sprintf(cmd, "mkdir -p %s", texture_directory); system(cmd); }
#endif

  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open configuration file %s\n", filename);
    return 0;
  }

  // Write file
  if (!WriteConfigurationStream(fp, write_every_kth_image)) return 0;

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
leaq 0xa6ea5(%rip), %rsi     # 0xbdc4a
movq %r15, %rdi
callq 0x11700
testq %rax, %rax
je 0x16dda
movq %rax, %r14
movq (%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq *0xc8(%rax)
testl %eax, %eax
je 0x16def
movq %r14, %rdi
callq 0x115a0
movl $0x1, %ebx
jmp 0x16df1
leaq 0xa4886(%rip), %rdi     # 0xbb667
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x77f42
jmp 0x16df1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::GetJsonObjectMember(Json::Value*&, Json::Value*, char const*, int)
static int
GetJsonObjectMember(Json::Value *&result, Json::Value *object, const char *str, int expected_type = 0)
{
  // Check object type
  if (object->type() != Json::objectValue) {
    // RNFail("JSON: not an object\n");
    return 0;
  }

  // Check object member
  if (!object->isMember(str)) {
    // RNFail("JSON object has no member named %s\n", str);
    return 0;
  }

  // Get object member
  result = &((*object)[str]);
  if (result->type() == Json::nullValue) {
    // RNFail("JSON object has null member named %s\n", str);
    return 0;
  }

  // Check member type
  if (expected_type > 0) {
    if (result->type() != expected_type) {
      // RNFail("JSON object member %s has unexpected type %d (rather than %d)\n", str, result->type(), expected_type);
      return 0;
    }
  }
  
  // Check for empty strings
  if (result->type() == Json::stringValue) {
    if (result->asString().length() == 0) {
      // RNFail("JSON object has zero length string named %s\n", str);
      return 0;
    }
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x807cc
xorl %ebx, %ebx
cmpl $0x7, %eax
jne 0x19545
movq %r12, %rdi
movq %r15, %rsi
callq 0x829f4
testb %al, %al
je 0x19545
movq %r12, %rdi
movq %r15, %rsi
callq 0x7f81a
movq %rax, (%r14)
movq %rax, %rdi
callq 0x807cc
testl %eax, %eax
je 0x19545
movq (%r14), %rdi
callq 0x807cc
cmpl $0x4, %eax
jne 0x19540
movq (%r14), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x79efc
movq (%r14), %rdi
movq 0x8(%r14), %r14
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1953b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x115c0
testq %r14, %r14
je 0x19545
movl $0x1, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::GetJsonArrayEntry(Json::Value*&, Json::Value*, unsigned int, int)
static int
GetJsonArrayEntry(Json::Value *&result, Json::Value *array, unsigned int k, int expected_type = -1)
{
  // Check array type
  if (array->type() != Json::arrayValue) {
    RNFail("JSON: not an array\n");
    return 0;
  }

  // Check array size
  if (array->size() <= k) {
    // RNFail("JSON array has no member %d\n", k);
    return 0;
  }

  // Get entry
  result = &((*array)[k]);
  if (result->type() == Json::nullValue) {
    // RNFail("JSON array has null member %d\n", k);
    return 0;
  }

  // Check entry type
  if (expected_type > 0) {
    if (result->type() != expected_type) {
      // RNFail("JSON array entry %d has unexpected type %d (rather than %d)\n", k, result->type(), expected_type);
      return 0;
    }
  }
  
  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x807cc
cmpl $0x6, %eax
jne 0x19591
movq %r14, %rdi
callq 0x7f26c
cmpl %ebp, %eax
jbe 0x195a3
movq %r14, %rdi
movl %ebp, %esi
callq 0x819ea
movq %rax, (%rbx)
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x807cc
leaq 0xa2877(%rip), %rdi     # 0xbbe0f
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x77f42
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadChannels()
int RGBDConfiguration::
ReadChannels(void)
{
  // Read images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReadChannels();
  }

  // Read surfaces
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    surface->ReadChannels();
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
jle 0x19f35
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0xf8(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x19f18
cmpl $0x0, 0x24(%rbx)
jle 0x19f5b
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x88(%rax)
incq %r14
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jl 0x19f3e
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReleaseChannels()
int RGBDConfiguration::
ReleaseChannels(void)
{
  // Release images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReleaseChannels();
  }

  // Release surfaces
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    surface->ReleaseChannels();
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
jle 0x19f95
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x148(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x19f78
cmpl $0x0, 0x24(%rbx)
jle 0x19fbb
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
incq %r14
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jl 0x19f9e
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadColorChannels()
int RGBDConfiguration::
ReadColorChannels(void)
{
  // Read images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReadColorChannels();
  }

  // Read surfaces
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    surface->ReadColorChannels();
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
jle 0x19ff5
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x100(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x19fd8
cmpl $0x0, 0x24(%rbx)
jle 0x1a01b
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x90(%rax)
incq %r14
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jl 0x19ffe
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReleaseColorChannels()
int RGBDConfiguration::
ReleaseColorChannels(void)
{
  // Release images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReleaseColorChannels();
  }

  // Release surfaces
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    surface->ReleaseColorChannels();
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x14(%rdi)
jle 0x1a055
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x150(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a038
cmpl $0x0, 0x24(%rbx)
jle 0x1a07b
xorl %r14d, %r14d
movq 0x18(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0xb0(%rax)
incq %r14
movslq 0x24(%rbx), %rax
cmpq %rax, %r14
jl 0x1a05e
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadDepthChannels()
int RGBDConfiguration::
ReadDepthChannels(void)
{
  // Read images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReadDepthChannel();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x1a0bc
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x108(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a098
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReleaseDepthChannels()
int RGBDConfiguration::
ReleaseDepthChannels(void)
{
  // Release images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReleaseDepthChannel();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x1a0f6
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x158(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a0d2
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadCategoryChannels()
int RGBDConfiguration::
ReadCategoryChannels(void)
{
  // Read images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReadCategoryChannel();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x1a130
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x110(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a10c
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReleaseCategoryChannels()
int RGBDConfiguration::
ReleaseCategoryChannels(void)
{
  // Release images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReleaseCategoryChannel();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x1a16a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x160(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a146
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReadInstanceChannels()
int RGBDConfiguration::
ReadInstanceChannels(void)
{
  // Read images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReadInstanceChannel();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x1a1a4
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x118(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a180
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::ReleaseInstanceChannels()
int RGBDConfiguration::
ReleaseInstanceChannels(void)
{
  // Release images
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    image->ReleaseInstanceChannel();
  }

  // Return success
  return 1;
}

// Assembly:
cmpl $0x0, 0x14(%rdi)
jle 0x1a1de
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
callq *0x168(%rax)
incq %r14
movslq 0x14(%rbx), %rax
cmpq %rax, %r14
jl 0x1a1ba
addq $0x8, %rsp
popq %rbx
popq %r14
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::UpdateWorldBBox()
void RGBDConfiguration::
UpdateWorldBBox(void)
{
  // Initialize bounding box
  world_bbox = R3null_box;

  // Union image bounding boxes
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    world_bbox.Union(image->WorldViewpoint());
    if (!image->world_bbox.IsEmpty()) {
      world_bbox.Union(image->world_bbox);
    }
  }

  // Union surface bounding boxes
  for (int i = 0; i < NSurfaces(); i++) {
    RGBDSurface *surface = Surface(i);
    world_bbox.Union(surface->WorldBBox());
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
addq $0x68, %rdi
leaq 0xeb0c8(%rip), %r15     # 0x105328
leaq 0x8(%r15), %rsi
callq 0x4b96a
leaq 0x80(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x4b96a
cmpl $0x0, 0x14(%rbx)
jle 0x1a30e
xorl %ebp, %ebp
leaq 0xeb911(%rip), %r15     # 0x105ba0
movq %rsp, %r12
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %r13
leaq 0x38(%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
callq 0x49ffa
movq %r14, %rdi
movq %r12, %rsi
callq 0x43906
movsd 0x190(%r13), %xmm0
ucomisd 0x1a8(%r13), %xmm0
ja 0x1a302
movsd 0x198(%r13), %xmm0
ucomisd 0x1b0(%r13), %xmm0
ja 0x1a302
movsd 0x1a0(%r13), %xmm0
ucomisd 0x1b8(%r13), %xmm0
ja 0x1a302
addq $0x188, %r13            # imm = 0x188
movq %r14, %rdi
movq %r13, %rsi
callq 0x439cc
incq %rbp
movslq 0x14(%rbx), %rax
cmpq %rax, %rbp
jl 0x1a292
cmpl $0x0, 0x24(%rbx)
jle 0x1a385
xorl %r13d, %r13d
leaq 0xeb00a(%rip), %r15     # 0x105328
movq %rsp, %r12
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rax
movq 0x80(%rax), %rsi
testq %rsi, %rsi
je 0x1a343
movq (%rsi), %rax
movq %r12, %rdi
callq *0x88(%rax)
jmp 0x1a366
movq 0x88(%rax), %rsi
testq %rsi, %rsi
je 0x1a35b
addq $0xf8, %rsi
movq %r12, %rdi
jmp 0x1a361
movq %r12, %rdi
movq %r15, %rsi
callq 0x42f14
movq %r14, %rdi
movq %r12, %rsi
callq 0x439cc
movq %r12, %rdi
callq 0x43d34
incq %r13
movslq 0x24(%rbx), %rax
cmpq %rax, %r13
jl 0x1a321
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x43d34
movq %rbx, %rdi
callq 0x11a60
nop
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDConfiguration.cpp
// Function: gaps::RGBDConfiguration::FindImage(char const*) const
RGBDImage *RGBDConfiguration::
FindImage(const char *name) const
{
  // Find image with matching name
  for (int i = 0; i < NImages(); i++) {
    RGBDImage *image = Image(i);
    if (image->Name() && !strcmp(image->Name(), name)) return image;
  }

  // Image not found
  return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x14(%rdi), %r15
testq %r15, %r15
jle 0x1a424
movq %rsi, %rbx
movq 0x8(%rdi), %r12
xorl %r13d, %r13d
movq (%r12,%r13,8), %r14
movq 0x1d0(%r14), %rdi
testq %rdi, %rdi
je 0x1a41c
movq %rbx, %rsi
callq 0x11840
testl %eax, %eax
je 0x1a427
incq %r13
cmpq %r13, %r15
jne 0x1a400
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq