LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/apps/sflview/sflview.cpp
// Function: ReadModel(char const*)
static R3Scene *
ReadModel(const char *filename)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Allocate model
  R3Scene *model = new R3Scene();
  if (!model) {
    RNFail("Unable to allocate model for %s\n", filename);
    return NULL;
  }

  // Read model from file
  if (!model->ReadFile(filename)) {
    delete model;
    return NULL;
  }

  // Print statistics
  if (print_verbose) {
    printf("Read model from %s ...\n", filename);
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Nodes = %d\n", model->NNodes());
    fflush(stdout);
  }

  // Return model
  return model;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1a20c0
movq 0x10(%rsp), %rdi
callq 0x2ef40
movl $0x160, %edi            # imm = 0x160
callq 0x28a30
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
callq 0x9f980
jmp 0x2ea2e
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x2ea83
movq 0x48(%rsp), %rsi
leaq 0x2129f8(%rip), %rdi    # 0x241444
movb $0x0, %al
callq 0x1a7770
movq $0x0, 0x50(%rsp)
jmp 0x2eb36
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
movl $0x160, %esi            # imm = 0x160
callq 0x28a50
jmp 0x2eb40
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xa1fe0
cmpl $0x0, %eax
jne 0x2eacf
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x2eac4
movq 0x8(%rsp), %rdi
callq 0x9fc00
movq 0x8(%rsp), %rdi
movl $0x160, %esi            # imm = 0x160
callq 0x28a50
movq $0x0, 0x50(%rsp)
jmp 0x2eb36
cmpl $0x0, 0x2a3a2a(%rip)    # 0x2d2500
je 0x2eb2c
movq 0x48(%rsp), %rsi
leaq 0x212981(%rip), %rdi    # 0x241465
movb $0x0, %al
callq 0x28090
leaq 0x38(%rsp), %rdi
callq 0x1a2180
leaq 0x21273c(%rip), %rdi    # 0x241238
movb $0x1, %al
callq 0x28090
movq 0x30(%rsp), %rdi
callq 0x2f360
movl %eax, %esi
leaq 0x2127a6(%rip), %rdi    # 0x2412bc
movb $0x0, %al
callq 0x28090
movq 0x2943ec(%rip), %rax    # 0x2c2f10
movq (%rax), %rdi
callq 0x28c50
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x292e0
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/sflview/sflview.cpp
// Function: ReadImagesFromPixelDatabase(gaps::R3SurfelScene*, char const*)
static int
ReadImagesFromPixelDatabase(R3SurfelScene *scene, const char *pixel_database)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Read all image channels
  if (!ReadPixelDatabase(scene, pixel_database)) return 0;

  // Print statistics
  if (print_verbose) {
    // Gather statistics
    int color_count = 0;
    int depth_count = 0;
    for (int i = 0; i < scene->NImages(); i++) {
      R3SurfelImage *image = scene->Image(i);
      if (image->RedChannel()) color_count++;
      if (image->DepthChannel()) depth_count++;
    }

    // Print statistics
    printf("Read image channels from %s ...\n", pixel_database);
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", scene->NImages());
    printf("  # Color Reads = %d\n", color_count);
    printf("  # Depth Reads = %d\n", depth_count);
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x1a20c0
leaq 0x20(%rsp), %rdi
callq 0x2ef40
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x84230
cmpl $0x0, %eax
jne 0x2eb95
movl $0x0, 0x44(%rsp)
jmp 0x2ecae
cmpl $0x0, 0x2a3964(%rip)    # 0x2d2500
je 0x2eca6
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2f000
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x2ec2e
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x2f840
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2f870
cmpq $0x0, %rax
je 0x2ec04
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2f890
cmpq $0x0, %rax
je 0x2ec1f
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x2ec21
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2ebba
movq 0x30(%rsp), %rsi
leaq 0x212843(%rip), %rdi    # 0x24147d
movb $0x0, %al
callq 0x28090
leaq 0x20(%rsp), %rdi
callq 0x1a2180
leaq 0x2125e6(%rip), %rdi    # 0x241238
movb $0x1, %al
callq 0x28090
movq 0x38(%rsp), %rdi
callq 0x2f000
movl %eax, %esi
leaq 0x21263f(%rip), %rdi    # 0x2412ab
movb $0x0, %al
callq 0x28090
movl 0x1c(%rsp), %esi
leaq 0x212820(%rip), %rdi    # 0x24149e
movb $0x0, %al
callq 0x28090
movl 0x18(%rsp), %esi
leaq 0x212824(%rip), %rdi    # 0x2414b4
movb $0x0, %al
callq 0x28090
movq 0x294272(%rip), %rax    # 0x2c2f10
movq (%rax), %rdi
callq 0x28c50
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/sflview/sflview.cpp
// Function: ReadImagesFromDirectory(gaps::R3SurfelScene*, char const*)
static int
ReadImagesFromDirectory(R3SurfelScene *scene, const char *image_directory)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Read all image channels
  if (!ReadImageDirectory(scene, image_directory,
    depth_scale, depth_exponent)) return 0;

  // Print statistics
  if (print_verbose) {
    // Gather statistics
    int color_count = 0;
    int depth_count = 0;
    for (int i = 0; i < scene->NImages(); i++) {
      R3SurfelImage *image = scene->Image(i);
      if (image->RedChannel()) color_count++;
      if (image->DepthChannel()) depth_count++;
    }

    // Print statistics
    printf("Read image channels from %s ...\n", image_directory);
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", scene->NImages());
    printf("  # Color Reads = %d\n", color_count);
    printf("  # Depth Reads = %d\n", depth_count);
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x1a20c0
leaq 0x20(%rsp), %rdi
callq 0x2ef40
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movsd 0x294dfc(%rip), %xmm0   # 0x2c3af0
movsd 0x294dfc(%rip), %xmm1   # 0x2c3af8
xorl %edx, %edx
callq 0x839b0
cmpl $0x0, %eax
jne 0x2ed15
movl $0x0, 0x44(%rsp)
jmp 0x2ee2e
cmpl $0x0, 0x2a37e4(%rip)    # 0x2d2500
je 0x2ee26
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2f000
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x2edae
movq 0x38(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x2f840
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2f870
cmpq $0x0, %rax
je 0x2ed84
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movq 0x8(%rsp), %rdi
callq 0x2f890
cmpq $0x0, %rax
je 0x2ed9f
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x2eda1
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2ed3a
movq 0x30(%rsp), %rsi
leaq 0x2126c3(%rip), %rdi    # 0x24147d
movb $0x0, %al
callq 0x28090
leaq 0x20(%rsp), %rdi
callq 0x1a2180
leaq 0x212466(%rip), %rdi    # 0x241238
movb $0x1, %al
callq 0x28090
movq 0x38(%rsp), %rdi
callq 0x2f000
movl %eax, %esi
leaq 0x2124bf(%rip), %rdi    # 0x2412ab
movb $0x0, %al
callq 0x28090
movl 0x1c(%rsp), %esi
leaq 0x2126a0(%rip), %rdi    # 0x24149e
movb $0x0, %al
callq 0x28090
movl 0x18(%rsp), %esi
leaq 0x2126a4(%rip), %rdi    # 0x2414b4
movb $0x0, %al
callq 0x28090
movq 0x2940f2(%rip), %rax    # 0x2c2f10
movq (%rax), %rdi
callq 0x28c50
movl $0x1, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/apps/sflview/../../pkgs/R3Surfels/R3SurfelTree.h
// Function: gaps::R3SurfelTree::NBlocks() const
inline int R3SurfelTree::
NBlocks(void) const
{
  // Return number of blocks in tree
  long long n = 0;
  for (int i = 0; i < NNodes(); i++) {
    R3SurfelNode *node = Node(i);
    n += node->NBlocks();
  }
  return n;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movl %eax, 0xc(%rsp)
callq 0x2f030
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x2f0c6
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2f1d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2f200
cltq
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x2f074
movq 0x28(%rsp), %rax
addq $0x38, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::~R3SurfelViewer()
R3SurfelViewer::
~R3SurfelViewer(void)
{
  // Delete selected image texture
  if (selected_image_texture_id > 0) glDeleteTextures(1, &selected_image_texture_id);

#if (R3_SURFEL_VIEWER_DRAW_METHOD == R3_SURFEL_VIEWER_DRAW_WITH_VBO)
  // Delete VBO buffers
  if (vbo_position_buffer > 0) glDeleteBuffers(1, &vbo_position_buffer);
  if (vbo_normal_buffer > 0) glDeleteBuffers(1, &vbo_normal_buffer);
  if (vbo_color_buffer > 0) glDeleteBuffers(1, &vbo_color_buffer);
#endif
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x28aaf6(%rip), %rcx    # 0x2baae0
addq $0x10, %rcx
movq %rcx, (%rax)
cmpl $0x0, 0x5e8(%rax)
jbe 0x30014
movq 0x8(%rsp), %rsi
addq $0x5e8, %rsi            # imm = 0x5E8
movl $0x1, %edi
callq 0x28e80
jmp 0x30012
jmp 0x30014
movq 0x8(%rsp), %rax
cmpl $0x0, 0x5f8(%rax)
jbe 0x30043
movq 0x8(%rsp), %rsi
movq 0x292f92(%rip), %rax    # 0x2c2fc0
movq (%rax), %rax
addq $0x5f8, %rsi            # imm = 0x5F8
movl $0x1, %edi
callq *%rax
jmp 0x30041
jmp 0x30043
movq 0x8(%rsp), %rax
cmpl $0x0, 0x5fc(%rax)
jbe 0x30072
movq 0x8(%rsp), %rsi
movq 0x292f63(%rip), %rax    # 0x2c2fc0
movq (%rax), %rax
addq $0x5fc, %rsi            # imm = 0x5FC
movl $0x1, %edi
callq *%rax
jmp 0x30070
jmp 0x30072
movq 0x8(%rsp), %rax
cmpl $0x0, 0x600(%rax)
jbe 0x300a1
movq 0x8(%rsp), %rsi
movq 0x292f34(%rip), %rax    # 0x2c2fc0
movq (%rax), %rax
addq $0x600, %rsi            # imm = 0x600
movl $0x1, %edi
callq *%rax
jmp 0x3009f
jmp 0x300a1
movq 0x8(%rsp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x196e00
movq 0x8(%rsp), %rdi
addq $0x4f8, %rdi            # imm = 0x4F8
callq 0x173460
movq 0x8(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
callq 0x3d1b0
movq 0x8(%rsp), %rdi
addq $0x168, %rdi            # imm = 0x168
callq 0x3d210
movq 0x8(%rsp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x3d220
movq 0x8(%rsp), %rdi
addq $0x78, %rdi
callq 0xcd500
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x5afd0
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x3d230
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::SurfelColorSchemeName() const
const char *R3SurfelViewer::
SurfelColorSchemeName(void) const
{
  // Return name of color scheme
  switch (surfel_color_scheme) {
  case R3_SURFEL_VIEWER_COLOR_BY_RGB: return "RGB";
  case R3_SURFEL_VIEWER_COLOR_BY_SHADING: return "Shading";
  case R3_SURFEL_VIEWER_COLOR_BY_Z: return "Z";
  case R3_SURFEL_VIEWER_COLOR_BY_NORMAL: return "Normal";
  case R3_SURFEL_VIEWER_COLOR_BY_SCAN: return "Scan";
  case R3_SURFEL_VIEWER_COLOR_BY_OBJECT: return "Object";
  case R3_SURFEL_VIEWER_COLOR_BY_NODE: return "Node";
  case R3_SURFEL_VIEWER_COLOR_BY_BLOCK: return "Block";
  case R3_SURFEL_VIEWER_COLOR_BY_CURRENT_LABEL: return "Current Label";
  case R3_SURFEL_VIEWER_COLOR_BY_GROUND_TRUTH_LABEL: return "Ground Truth Label";
  case R3_SURFEL_VIEWER_COLOR_BY_SURFEL_LABEL: return "Surfel Label";
  case R3_SURFEL_VIEWER_COLOR_BY_CONFIDENCE: return "Confidence";
  case R3_SURFEL_VIEWER_COLOR_BY_ELEVATION: return "Elevation";
  case R3_SURFEL_VIEWER_COLOR_BY_OBJECT_ATTRIBUTES: return "Attributes";
  case R3_SURFEL_VIEWER_COLOR_BY_PICK_INDEX: return "Pick Index";
  default: return "Unknown";
  }
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movl 0x360(%rax), %eax
movq %rax, -0x18(%rsp)
subq $0xe, %rax
ja 0x30268
movq -0x18(%rsp), %rax
leaq 0x211445(%rip), %rcx    # 0x2415c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2228db(%rip), %rax    # 0x252a66
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x2118a4(%rip), %rax    # 0x241a40
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21189b(%rip), %rax    # 0x241a48
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21188c(%rip), %rax    # 0x241a4a
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211882(%rip), %rax    # 0x241a51
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211876(%rip), %rax    # 0x241a56
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21186c(%rip), %rax    # 0x241a5d
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211863(%rip), %rax    # 0x241a62
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21185b(%rip), %rax    # 0x241a68
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21185b(%rip), %rax    # 0x241a76
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211860(%rip), %rax    # 0x241a89
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21185f(%rip), %rax    # 0x241a96
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x21185c(%rip), %rax    # 0x241aa1
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211858(%rip), %rax    # 0x241aab
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211855(%rip), %rax    # 0x241ab6
movq %rax, -0x8(%rsp)
jmp 0x30274
leaq 0x211852(%rip), %rax    # 0x241ac1
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::ObjectVisibility(gaps::R3SurfelObject*) const
int R3SurfelViewer::
ObjectVisibility(R3SurfelObject *object) const
{
  // Check if any part is visible
  for (int i = 0; i < object->NParts(); i++) {
    R3SurfelObject *part = object->Part(i);
    if (ObjectVisibility(part)) return 1;
  }

  // Check if any node is visible
  for (int i = 0; i < object->NNodes(); i++) {
    R3SurfelNode *node = object->Node(i);
    if (NodeVisibility(node)) return 1;
  }

  // Not visible
  return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rdi
callq 0x3d240
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x302fc
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x3d260
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x30280
cmpl $0x0, %eax
je 0x302ed
movl $0x1, 0x44(%rsp)
jmp 0x30366
jmp 0x302ef
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x302a0
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, (%rsp)
movq 0x30(%rsp), %rdi
callq 0x3d290
movl %eax, %ecx
movl (%rsp), %eax
cmpl %ecx, %eax
jge 0x3035e
movq 0x30(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x3d2b0
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
callq 0x30370
cmpl $0x0, %eax
je 0x3034f
movl $0x1, 0x44(%rsp)
jmp 0x30366
jmp 0x30351
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x30304
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::LabelVisibility(int) const
int R3SurfelViewer::
LabelVisibility(int label_index) const
{
  // Check label index
  if (label_index < 0) return FALSE;
  if (label_index >= scene->NLabels()) return FALSE;

  // Label is visible if not in list
  if (label_visibilities.size() <= (unsigned int) label_index) 
    return TRUE;

  // Return whether label is visible
  return label_visibilities[label_index];
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x14(%rsp)
jge 0x30688
movl $0x0, 0x24(%rsp)
jmp 0x306f2
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movl %ecx, 0x4(%rsp)
movq 0x8(%rax), %rdi
callq 0x2ef80
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jl 0x306b2
movl $0x0, 0x24(%rsp)
jmp 0x306f2
movq 0x8(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
callq 0x3d400
movl 0x14(%rsp), %ecx
cmpq %rcx, %rax
ja 0x306d6
movl $0x1, 0x24(%rsp)
jmp 0x306f2
movq 0x8(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
movslq 0x14(%rsp), %rsi
callq 0x3d420
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::SetLabelVisibility(int, int)
void R3SurfelViewer::
SetLabelVisibility(int label_index, int visibility)
{
  // Check label index
  if (label_index == -1) {
    if (visibility == 1) {
      // Turn all visibilities on
      label_visibilities.clear();
    }
    else {
      // Set all visibilities
      for (int i = 0; i < scene->NLabels(); i++) {
        SetLabelVisibility(i, visibility);
      }
    }
  }
  else {
    // Check label index
    if (label_index < 0) return;
    if (label_index >= scene->NLabels()) return;

    // Add label visibilities
    while (label_visibilities.size() <= (unsigned int) label_index) {
      label_visibilities.push_back(1);
    }

    // Set visibility
    if (visibility == -1) label_visibilities[label_index] = 1 - label_visibilities[label_index];
    else if (visibility == 0) label_visibilities[label_index] = 0;
    else label_visibilities[label_index] = 1;
  }

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $-0x1, 0x2c(%rsp)
jne 0x3078e
cmpl $0x1, 0x28(%rsp)
jne 0x3073c
movq 0x18(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
callq 0x3d440
jmp 0x30789
movl $0x0, 0x24(%rsp)
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq 0x8(%rax), %rdi
callq 0x2ef80
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x30787
movq 0x18(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x28(%rsp), %edx
movq (%rdi), %rax
callq *0x148(%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x30744
jmp 0x30789
jmp 0x30889
cmpl $0x0, 0x2c(%rsp)
jge 0x3079a
jmp 0x30897
movq 0x18(%rsp), %rax
movl 0x2c(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movq 0x8(%rax), %rdi
callq 0x2ef80
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jl 0x307bf
jmp 0x30897
jmp 0x307c1
movq 0x18(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
callq 0x3d400
movl 0x2c(%rsp), %ecx
cmpq %rcx, %rax
ja 0x307fb
movq 0x18(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
movl $0x1, 0x20(%rsp)
leaq 0x20(%rsp), %rsi
callq 0x3d460
jmp 0x307c1
cmpl $-0x1, 0x28(%rsp)
jne 0x30844
movq 0x18(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
movslq 0x2c(%rsp), %rsi
callq 0x3d490
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl $0x1, %eax
subl (%rcx), %eax
movl %eax, 0xc(%rsp)
addq $0x340, %rdi            # imm = 0x340
movslq 0x2c(%rsp), %rsi
callq 0x3d490
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
jmp 0x30887
cmpl $0x0, 0x28(%rsp)
jne 0x30869
movq 0x18(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
movslq 0x2c(%rsp), %rsi
callq 0x3d490
movl $0x0, (%rax)
jmp 0x30885
movq 0x18(%rsp), %rdi
addq $0x340, %rdi            # imm = 0x340
movslq 0x2c(%rsp), %rsi
callq 0x3d490
movl $0x1, (%rax)
jmp 0x30887
jmp 0x30889
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x378(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::SetAttributeVisibility(gaps::RNFlags, int)
void R3SurfelViewer::
SetAttributeVisibility(RNFlags attribute_flags, int visibility)
{
  // Check if changing all flags
  if (attribute_flags == 0) attribute_flags = 0xFFFFFFFF;

  // Update attribute visibility flags
  if (visibility == -1) attribute_visibility_flags.XOR(attribute_flags);
  else if (!visibility) attribute_visibility_flags.Remove(attribute_flags);
  else attribute_visibility_flags.Add(attribute_flags);

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0x48, %rsp
movq %rsi, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x3d4b0
cmpq $0x0, %rax
jne 0x308e5
leaq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x2f310
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpl $-0x1, 0x34(%rsp)
jne 0x3090e
movq 0x8(%rsp), %rdi
addq $0x358, %rdi            # imm = 0x358
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
callq 0x3d540
jmp 0x30959
cmpl $0x0, 0x34(%rsp)
jne 0x30937
movq 0x8(%rsp), %rdi
addq $0x358, %rdi            # imm = 0x358
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x3d580
jmp 0x30957
movq 0x8(%rsp), %rdi
addq $0x358, %rdi            # imm = 0x358
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
callq 0x3d4c0
jmp 0x30959
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x378(%rax)
addq $0x48, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::CreateColor(unsigned char*, int) const
void R3SurfelViewer::
CreateColor(unsigned char *color, int k) const
{
  // Make array of colors
  static const int ncolors = 72;
  static const unsigned char colors[ncolors][3] = {
    { 128, 52, 52 }, { 0, 255, 0 }, { 0, 0, 255 }, 
    { 78, 156, 0 }, { 0, 255, 255 }, { 255, 0, 255 }, 
    { 255, 128, 0 }, { 0, 255, 128 }, { 128, 0, 255 }, 
    { 128, 255, 0 }, { 0, 128, 255 }, { 255, 0, 128 }, 
    { 128, 0, 0 }, { 0, 128, 0 }, { 0, 0, 128 }, 
    { 128, 128, 0 }, { 0, 128, 128 }, { 128, 0, 128 },
    { 182, 0, 0 }, { 0, 182, 0 }, { 0, 0, 182 }, 
    { 182, 182, 0 }, { 0, 182, 182 }, { 182, 0, 182 }, 
    { 182, 78, 0 }, { 0, 182, 78 }, { 78, 0, 182 }, 
    { 78, 182, 0 }, { 0, 78, 182 }, { 182, 0, 78 }, 
    { 78, 0, 0 }, { 0, 78, 0 }, { 0, 0, 78 }, 
    { 78, 78, 0 }, { 0, 78, 78 }, { 78, 0, 78 },
    { 255, 78, 78 }, { 78, 255, 78 }, { 78, 78, 255 }, 
    { 255, 0, 78 }, { 78, 255, 255 }, { 255, 78, 255 }, 
    { 255, 52, 182 }, { 78, 255, 128 }, { 128, 78, 255 }, 
    { 128, 255, 78 }, { 78, 128, 255 }, { 255, 78, 128 }, 
    { 128, 78, 78 }, { 78, 128, 78 }, { 78, 78, 128 }, 
    { 128, 128, 78 }, { 78, 128, 128 }, { 128, 78, 128 },
    { 78, 128, 128 }, { 128, 78, 128 }, { 128, 128, 78 }, 
    { 78, 78, 128 }, { 128, 78, 78 }, { 78, 128, 78 }, 
    { 78, 204, 128 }, { 128, 78, 204 }, { 204, 128, 78 }, 
    { 204, 78, 128 }, { 128, 204, 78 }, { 78, 128, 204 }, 
    { 204, 128, 128 }, { 128, 204, 128 }, { 128, 128, 204 }, 
    { 204, 204, 128 }, { 128, 204, 204 }, { 204, 128, 204 }
  };

  // Fill color
  int index = (k > 0) ? (k+1) % ncolors : 0;
  color[0] = colors[index][0];
  color[1] = colors[index][1];
  color[2] = colors[index][2];
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
cmpl $0x0, -0x14(%rsp)
jle 0x3099a
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl $0x48, %ecx
cltd
idivl %ecx
movl %edx, -0x1c(%rsp)
jmp 0x309a2
xorl %eax, %eax
movl %eax, -0x1c(%rsp)
jmp 0x309a2
movl -0x1c(%rsp), %eax
movl %eax, -0x18(%rsp)
movslq -0x18(%rsp), %rcx
leaq 0x210f7a(%rip), %rax    # 0x241930
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movb (%rax), %cl
movq -0x10(%rsp), %rax
movb %cl, (%rax)
movslq -0x18(%rsp), %rcx
leaq 0x210f5e(%rip), %rax    # 0x241930
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movb 0x1(%rax), %cl
movq -0x10(%rsp), %rax
movb %cl, 0x1(%rax)
movslq -0x18(%rsp), %rcx
leaq 0x210f40(%rip), %rax    # 0x241930
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movb 0x2(%rax), %cl
movq -0x10(%rsp), %rax
movb %cl, 0x2(%rax)
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawViewingExtent() const
void R3SurfelViewer::
DrawViewingExtent(void) const
{
  // Check extent visibility
  if (!viewing_extent_visibility) return;
  
  // Check extent
  const R3Box& bbox = scene->BBox();  
  const R3Box& extent = ViewingExtent();
  if (extent.IsEmpty() || R3Contains(extent, bbox)) return;

  // Draw extent
  glDisable(GL_LIGHTING);
  RNLoadRgb(0.5, 0.5, 0.5);
  extent.Outline();
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x338(%rax)
jne 0x317d1
jmp 0x31861
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x3d7d0
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
callq 0x3d7f0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x2f3f0
cmpl $0x0, %eax
jne 0x31816
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xef350
cmpl $0x0, %eax
je 0x31818
jmp 0x31861
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movsd 0x20f80e(%rip), %xmm2   # 0x241038
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x2f2e0
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x2f310
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
callq *0xb0(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::UpdateViewingFrustum()
void R3SurfelViewer::
UpdateViewingFrustum(void)
{
  // Update viewing frustum
  const R3Camera& camera = viewer.Camera();
  viewing_frustum = R3Frustum(camera.Origin(), camera.Towards(), camera.Up(),
    camera.XFOV(), camera.YFOV(), camera.Near(), camera.Far());
}

// Assembly:
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, 0x1b8(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x2ee60
movq %rax, 0x8(%rsp)
movq 0x1b8(%rsp), %rsi
leaq 0x58(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2eea0
movq 0x1b8(%rsp), %rdi
callq 0x2ef20
movq %rax, 0x18(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x3d850
movsd %xmm0, 0x30(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x3d860
movsd %xmm0, 0x20(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x3d870
movsd %xmm0, 0x28(%rsp)
movq 0x1b8(%rsp), %rdi
callq 0x3d880
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x30(%rsp), %xmm0
leaq 0x70(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x12dfc0
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x168, %rdi            # imm = 0x168
callq 0x3d890
jmp 0x31c09
leaq 0x70(%rsp), %rdi
callq 0x3d210
addq $0x1c8, %rsp            # imm = 0x1C8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x3d210
movq 0x50(%rsp), %rdi
callq 0x292e0
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::UpdateSelectedImageColorPixels()
void R3SurfelViewer::
UpdateSelectedImageColorPixels(void)
{
  // Check stuff
  if (!selected_image) return;
  if (selected_image == previous_color_image) return;

  // Get color image
  selected_image_color_pixels = selected_image->ColorChannels();
  if ((selected_image_color_pixels.Width() <= 0) ||
      (selected_image_color_pixels.Height() <= 0) ||
      (selected_image_color_pixels.Depth() != 3)) {
    selected_image_color_pixels = R2Image();
  }

  // Remember last selected image
  previous_color_image = selected_image;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x2d0(%rax)
jne 0x32302
jmp 0x32415
movq 0x18(%rsp), %rcx
movq 0x2d0(%rcx), %rax
cmpq 0x5e0(%rcx), %rax
jne 0x3231c
jmp 0x32415
movq 0x18(%rsp), %rax
movq 0x2d0(%rax), %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x60920
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x196fb0
jmp 0x3234f
leaq 0x48(%rsp), %rdi
callq 0x196e00
movq 0x18(%rsp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x3de90
cmpl $0x0, %eax
jle 0x3239b
movq 0x18(%rsp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x3dea0
cmpl $0x0, %eax
jle 0x3239b
movq 0x18(%rsp), %rdi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x3deb0
cmpl $0x3, %eax
je 0x32402
leaq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1963b0
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x5c8, %rdi            # imm = 0x5C8
callq 0x196fb0
jmp 0x323c2
leaq 0x20(%rsp), %rdi
callq 0x196e00
jmp 0x32402
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x196e00
jmp 0x3241a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x196e00
jmp 0x3241a
movq 0x18(%rsp), %rax
movq 0x2d0(%rax), %rcx
movq %rcx, 0x5e0(%rax)
addq $0x68, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x292e0
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::AdaptWorkingSet()
void R3SurfelViewer::
AdaptWorkingSet(void)
{
  // Check if adapting automatically
  if (!adapt_working_set_automatically) return;

  // Adjust target resolution based on frame time
  if (frame_time > 0.05) {
    SetTargetResolution(0.9 * TargetResolution());
  }
  else if (frame_time < 0.025) {
    SetTargetResolution(1.1 * TargetResolution());
  }

  // Make gross estimate of visible radius
  RNLength camera_height = viewer.Camera().Origin().Z();
  RNLength visible_radius = camera_height;

  // Adjust focus radius 
  SetFocusRadius(visible_radius);

  // Adjust surfel size based on visible radius
  if ((TargetResolution() > 0) && (visible_radius > 0)) {
    RNLength window_width = viewer.Viewport().Width();
    RNLength npixels = window_width / (visible_radius * TargetResolution());
    SetSurfelSize(npixels);
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x460(%rax)
jne 0x32631
jmp 0x32792
movq 0x18(%rsp), %rax
movsd 0x4e8(%rax), %xmm0
movsd 0x20ef02(%rip), %xmm1   # 0x241548
ucomisd %xmm1, %xmm0
jbe 0x32675
movq 0x18(%rsp), %rdi
callq 0x3ded0
movq 0x18(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x20ee8a(%rip), %xmm0   # 0x2414f0
mulsd %xmm1, %xmm0
movq (%rdi), %rax
callq *0x1c8(%rax)
jmp 0x326b5
movq 0x18(%rsp), %rax
movsd 0x20eece(%rip), %xmm0   # 0x241550
ucomisd 0x4e8(%rax), %xmm0
jbe 0x326b3
movq 0x18(%rsp), %rdi
callq 0x3ded0
movq 0x18(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x20eeb2(%rip), %xmm0   # 0x241558
mulsd %xmm1, %xmm0
movq (%rdi), %rax
callq *0x1c8(%rax)
jmp 0x326b5
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, %rdi
callq 0x2ee60
movq %rax, %rdi
callq 0x2ee90
movq 0x18(%rsp), %rdi
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
movq (%rdi), %rax
callq *0x1d0(%rax)
movq 0x18(%rsp), %rdi
callq 0x3ded0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x32792
movsd 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x32792
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
callq 0x3def0
movq %rax, %rdi
callq 0x3df10
movq 0x18(%rsp), %rdi
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x3ded0
movsd 0x8(%rsp), %xmm1
movq 0x18(%rsp), %rdi
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movq (%rdi), %rax
callq *0x98(%rax)
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawSurfels(gaps::R3SurfelNode*, gaps::RNFlags) const
void R3SurfelViewer::
DrawSurfels(R3SurfelNode *node, RNFlags color_draw_flags) const
{
  // Check node
  if (!NodeVisibility(node)) return;

  // Draw all blocks
  for (int i = 0; i < node->NBlocks(); i++) {
    R3SurfelBlock *block = node->Block(i);
    block->Draw(shape_draw_flags | color_draw_flags, subsampling_factor);
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdx, 0x50(%rsp)
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x40(%rsp), %rsi
callq 0x30370
cmpl $0x0, %eax
jne 0x327d1
jmp 0x3286e
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x40(%rsp), %rdi
callq 0x2f200
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3286e
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0x2f280
movq 0x20(%rsp), %rdi
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x458, %rdi            # imm = 0x458
callq 0x3d4b0
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x3d4b0
movq 0x8(%rsp), %rsi
orq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0x2f310
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
movl 0x48c(%rax), %edx
movq 0x28(%rsp), %rsi
callq 0x47280
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x327d9
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawObjectPrincipalAxes() const
void R3SurfelViewer::
DrawObjectPrincipalAxes(void) const
{
  // Check stuff
  if (!object_principal_axes_visibility) return;
  
  // Draw object principal axes
  glDisable(GL_LIGHTING);
  RNLoadRgb(object_principal_axes_color);
  DrawObjectProperties(R3_SURFEL_OBJECT_PCA_PROPERTY);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x308(%rax)
jne 0x3434e
jmp 0x3437c
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x8(%rsp), %rdi
addq $0x398, %rdi            # imm = 0x398
callq 0x3dfe0
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *0x368(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawObjectOrientedBBoxes() const
void R3SurfelViewer::
DrawObjectOrientedBBoxes(void) const
{
  // Check stuff
  if (!object_oriented_bbox_visibility) return;

  // Draw object oriented boxes
  glLineWidth(2);
  glDisable(GL_LIGHTING);
  RNLoadRgb(object_oriented_bbox_color);
  DrawObjectProperties(R3_SURFEL_OBJECT_AMODAL_OBB_PROPERTY);
  glLineWidth(1);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x30c(%rax)
jne 0x343ae
jmp 0x343f6
movss 0x20d67e(%rip), %xmm0   # 0x241a34
callq 0x29370
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x8(%rsp), %rdi
addq $0x3b0, %rdi            # imm = 0x3B0
callq 0x3dfe0
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x368(%rax)
movss 0x20d63b(%rip), %xmm0   # 0x241a2c
callq 0x29370
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawObjectRelationships() const
void R3SurfelViewer::
DrawObjectRelationships(void) const
{
  // Check stuff
  if (!scene) return;
  if (!object_relationship_visibility) return;
  
  // Draw object relationships
  glDisable(GL_LIGHTING);
  RNLoadRgb(1.0, 1.0, 1.0);
  for (int i = 0; i < scene->NObjectRelationships(); i++) {
    R3SurfelObjectRelationship *relationship = scene->ObjectRelationship(i);
    relationship->Draw();
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3441f
jmp 0x344c2
movq 0x10(%rsp), %rax
cmpl $0x0, 0x310(%rax)
jne 0x34432
jmp 0x344c2
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movsd 0x20cbcc(%rip), %xmm2   # 0x241010
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0x2f2e0
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rax
movl 0x2c(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x8(%rax), %rdi
callq 0x2f800
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x344c2
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x2c(%rsp), %esi
callq 0x3e160
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x2f310
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x34457
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawObjectBBoxes() const
void R3SurfelViewer::
DrawObjectBBoxes(void) const
{
  // Check stuff
  if (!scene) return;
  if (!object_bbox_visibility) return;
  
  // Draw node bounding boxes
  glDisable(GL_LIGHTING);
  RNLoadRgb(object_bbox_color);
  for (int i = 0; i < scene->NObjects(); i++) {
    R3SurfelObject *object = scene->Object(i);
    if (!object->Parent()) continue;
    if (object->Parent() != scene->RootObject()) continue;
    if ((object->NParts() == 0) && (object->NNodes() == 0)) continue;    
    object->BBox().Outline();
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x344ef
jmp 0x34605
movq 0x20(%rsp), %rax
cmpl $0x0, 0x314(%rax)
jne 0x34502
jmp 0x34605
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x20(%rsp), %rdi
addq $0x3c8, %rdi            # imm = 0x3C8
callq 0x3dfe0
movl $0x0, 0x3c(%rsp)
movq 0x20(%rsp), %rax
movl 0x3c(%rsp), %ecx
movl %ecx, 0x1c(%rsp)
movq 0x8(%rax), %rdi
callq 0x2ef60
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x34605
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x3c(%rsp), %esi
callq 0x3e190
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x3d2e0
cmpq $0x0, %rax
jne 0x34575
jmp 0x345f5
movq 0x30(%rsp), %rdi
callq 0x3d2e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rdi
callq 0x3d2f0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x345a4
jmp 0x345f5
movq 0x30(%rsp), %rdi
callq 0x3d240
cmpl $0x0, %eax
jne 0x345c4
movq 0x30(%rsp), %rdi
callq 0x3d290
cmpl $0x0, %eax
jne 0x345c4
jmp 0x345f5
movq 0x30(%rsp), %rdi
callq 0x65650
movq %rax, 0x8(%rsp)
leaq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x2f310
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%rdi), %rax
callq *0xb0(%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x34525
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawNodeBBoxes() const
void R3SurfelViewer::
DrawNodeBBoxes(void) const
{
  // Check stuff
  if (!scene) return;
  if (!node_bbox_visibility) return;
  
  // Draw node bounding boxes
  glDisable(GL_LIGHTING);
  RNLoadRgb(node_bbox_color);
  for (int i = 0; i < resident_nodes.NNodes(); i++) {
    R3SurfelNode *node = resident_nodes.Node(i);
    if (node->NParts() > 0) RNLoadRgb(0, 1, 0);
    else RNLoadRgb(1, 0, 0);
    node->BBox().Outline();
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3462f
jmp 0x3470c
movq 0x10(%rsp), %rax
cmpl $0x0, 0x318(%rax)
jne 0x34642
jmp 0x3470c
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x10(%rsp), %rdi
addq $0x3e0, %rdi            # imm = 0x3E0
callq 0x3dfe0
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x10, %rdi
callq 0x3df90
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3470c
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movl 0x2c(%rsp), %esi
callq 0x3dfb0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x2f260
cmpl $0x0, %eax
jle 0x346bf
xorl %edx, %edx
movl $0x1, %esi
movl %edx, %edi
callq 0x2f330
jmp 0x346cd
movl $0x1, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x2f330
movq 0x20(%rsp), %rdi
callq 0x58ae0
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x2f310
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
callq *0xb0(%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x34665
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawBlockBBoxes() const
void R3SurfelViewer::
DrawBlockBBoxes(void) const
{
  // Check stuff
  if (!scene) return;
  if (!block_bbox_visibility) return;

  // Draw block bounding boxes
  glDisable(GL_LIGHTING);
  RNLoadRgb(block_bbox_color);
  for (int i = 0; i < resident_nodes.NNodes(); i++) {
    R3SurfelNode *node = resident_nodes.Node(i);
    for (int j = 0; j < node->NBlocks(); j++) {
      R3SurfelBlock *block = node->Block(j);
      block->BBox().Outline();
    }
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3473f
jmp 0x34835
movq 0x10(%rsp), %rax
cmpl $0x0, 0x31c(%rax)
jne 0x34752
jmp 0x34835
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x10(%rsp), %rdi
addq $0x3f8, %rdi            # imm = 0x3F8
callq 0x3dfe0
movl $0x0, 0x3c(%rsp)
movq 0x10(%rsp), %rdi
movl 0x3c(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x10, %rdi
callq 0x3df90
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x34835
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movl 0x3c(%rsp), %esi
callq 0x3dfb0
movq %rax, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2f200
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x34823
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x2f280
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x45220
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x2f310
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
callq *0xb0(%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x347b8
jmp 0x34825
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x34775
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawCenterPoint() const
void R3SurfelViewer::
DrawCenterPoint(void) const
{
  // Check stuff
  if (!center_point_visibility) return;
  
  // Draw center point
  glEnable(GL_LIGHTING);
  RNLoadRgb(center_point_color);
  R3Sphere(center_point, 0.1).Draw();
  glDisable(GL_LIGHTING);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x334(%rax)
jne 0x3485e
jmp 0x348cd
movl $0xb50, %edi            # imm = 0xB50
callq 0x28960
movq 0x8(%rsp), %rdi
addq $0x440, %rdi            # imm = 0x440
callq 0x3dfe0
movq 0x8(%rsp), %rsi
addq $0x2b0, %rsi            # imm = 0x2B0
leaq 0x28(%rsp), %rdi
movsd 0x20cc56(%rip), %xmm0   # 0x2414e8
callq 0x12f8e0
leaq 0x20(%rsp), %rdi
movl $0x772, %esi            # imm = 0x772
callq 0x2f310
jmp 0x348a8
movq 0x20(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0xdbc70
jmp 0x348b9
leaq 0x28(%rsp), %rdi
callq 0x3e1c0
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x3e1c0
movq 0x18(%rsp), %rdi
callq 0x292e0
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawSelectedPoint() const
void R3SurfelViewer::
DrawSelectedPoint(void) const
{
  // Check stuff
  if (!selected_point) return;
  // if (!selected_point_visibility) return;

  // Draw selected point
  glEnable(GL_LIGHTING);
  RNLoadRgb(RNred_rgb);
  R3Sphere(selected_point->Position(), 0.05).Draw();
  glDisable(GL_LIGHTING);
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x2c8(%rax)
jne 0x3491f
jmp 0x3499d
movl $0xb50, %edi            # imm = 0xB50
callq 0x28960
leaq 0x6a2120(%rip), %rdi    # 0x6d6a50
callq 0x3dfe0
movq 0x10(%rsp), %rax
movq 0x2c8(%rax), %rsi
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x3e1d0
movq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rdi
movsd 0x20cbe6(%rip), %xmm0   # 0x241548
callq 0x12f8e0
leaq 0x28(%rsp), %rdi
movl $0x772, %esi            # imm = 0x772
callq 0x2f310
jmp 0x34978
movq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0xdbc70
jmp 0x34989
leaq 0x48(%rsp), %rdi
callq 0x3e1c0
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
addq $0x78, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x3e1c0
movq 0x20(%rsp), %rdi
callq 0x292e0
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawScanViewpoints() const
void R3SurfelViewer::
DrawScanViewpoints(void) const
{
  // Check stuff
  if (!scene) return;
  if (!scan_viewpoint_visibility) return;
  
  // Draw scan viewpoints
  glDisable(GL_LIGHTING);
  RNLoadRgb(scan_viewpoint_color);
  RNGrfxBegin(RN_GRFX_LINES);
  for (int i = 0; i < scene->NScans(); i++) {
    R3SurfelScan *scan = scene->Scan(i);
    const R3Point& viewpoint = scan->Viewpoint();
    const R3Vector towards = scan->Towards();
    const R3Vector up = scan->Up();
    R3LoadPoint(viewpoint);
    R3LoadPoint(viewpoint + towards);
    R3LoadPoint(viewpoint);
    R3LoadPoint(viewpoint + 0.5 * up);
  }
  RNGrfxEnd();
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x349f8
jmp 0x34b5e
movq 0x18(%rsp), %rax
cmpl $0x0, 0x320(%rax)
jne 0x34a0b
jmp 0x34b5e
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x18(%rsp), %rdi
addq $0x410, %rdi            # imm = 0x410
callq 0x3dfe0
movl $0x1, %edi
callq 0x3e030
movl $0x0, 0xac(%rsp)
movq 0x18(%rsp), %rax
movl 0xac(%rsp), %ecx
movl %ecx, 0x14(%rsp)
movq 0x8(%rax), %rdi
callq 0x2efe0
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x34b59
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0xac(%rsp), %esi
callq 0x3e240
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x3e270
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rsi
leaq 0x80(%rsp), %rdi
callq 0x3e290
movq 0xa0(%rsp), %rdi
callq 0x3e2e0
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x163460
movq 0x98(%rsp), %rdi
callq 0x3e310
movq 0x98(%rsp), %rsi
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x162880
leaq 0x50(%rsp), %rdi
callq 0x3e310
movq 0x98(%rsp), %rdi
callq 0x3e310
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
movsd 0x20c51d(%rip), %xmm0   # 0x241038
leaq 0x68(%rsp), %rsi
callq 0x2f4b0
movq 0x8(%rsp), %rsi
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x162880
leaq 0x38(%rsp), %rdi
callq 0x3e310
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0x34a3b
callq 0x3e090
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawImageViewpoints() const
void R3SurfelViewer::
DrawImageViewpoints(void) const
{
  // Check stuff
  if (!scene) return;
  if (!image_viewpoint_visibility) return;
  
  // Draw image viewpoints
  glDisable(GL_LIGHTING);
  RNLoadRgb(image_viewpoint_color);
  for (int i = 0; i < scene->NImages(); i++) {
    R3SurfelImage *image = scene->Image(i);
    if (image == selected_image) glLineWidth(5);
    image->Draw();
    if (image == selected_image) glLineWidth(1);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x34b8f
jmp 0x34c84
movq 0x10(%rsp), %rax
cmpl $0x0, 0x324(%rax)
jne 0x34ba2
jmp 0x34c84
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movq 0x10(%rsp), %rdi
addq $0x428, %rdi            # imm = 0x428
callq 0x3dfe0
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rax
movl 0x2c(%rsp), %ecx
movl %ecx, 0xc(%rsp)
movq 0x8(%rax), %rdi
callq 0x2f000
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x34c84
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
movl 0x2c(%rsp), %esi
callq 0x2f840
movq 0x10(%rsp), %rcx
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x2d0(%rcx), %rax
jne 0x34c20
movss 0x20ce1d(%rip), %xmm0   # 0x241a38
callq 0x29370
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x2f310
movq (%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rdi), %rax
movsd 0x20c3c4(%rip), %xmm0   # 0x241010
callq *0xf0(%rax)
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
cmpq 0x2d0(%rcx), %rax
jne 0x34c72
movss 0x20cdbf(%rip), %xmm0   # 0x241a2c
callq 0x29370
jmp 0x34c74
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x34bc5
addq $0x38, %rsp
retq
nopl (%rax)