LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawAxes() const
void R3SurfelViewer::
DrawAxes(void) const
{
  // Check stuff
  if (!axes_visibility) return;

  // Draw axes
  RNScalar d = 1.0;
  glDisable(GL_LIGHTING);
  glLineWidth(3);
  R3BeginLine();
  RNLoadRgb(1, 0, 0);
  R3LoadPoint(R3zero_point);
  R3LoadPoint(R3zero_point + d * R3posx_vector);
  R3EndLine();
  R3BeginLine();
  RNLoadRgb(0, 1, 0);
  R3LoadPoint(R3zero_point);
  R3LoadPoint(R3zero_point + d * R3posy_vector);
  R3EndLine();
  R3BeginLine();
  RNLoadRgb(0, 0, 1);
  R3LoadPoint(R3zero_point);
  R3LoadPoint(R3zero_point + d * R3posz_vector);
  R3EndLine();
  glLineWidth(1);
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
cmpl $0x0, 0x33c(%rax)
jne 0x35f95
jmp 0x360ea
movsd 0x20b073(%rip), %xmm0   # 0x241010
movsd %xmm0, 0x98(%rsp)
movl $0xb50, %edi            # imm = 0xB50
callq 0x28240
movss 0x20ba84(%rip), %xmm0   # 0x241a3c
callq 0x29370
callq 0x3e670
movl $0x1, %edi
xorl %edx, %edx
movl %edx, %esi
callq 0x2f330
leaq 0x69fe79(%rip), %rdi    # 0x6d5e50
callq 0x3e310
movsd 0x98(%rsp), %xmm0
leaq 0x68(%rsp), %rdi
leaq 0x69ff7f(%rip), %rsi    # 0x6d5f70
callq 0x2f4b0
leaq 0x80(%rsp), %rdi
leaq 0x69fe4b(%rip), %rsi    # 0x6d5e50
leaq 0x68(%rsp), %rdx
callq 0x162880
leaq 0x80(%rsp), %rdi
callq 0x3e310
callq 0x3e680
callq 0x3e670
xorl %edx, %edx
movl $0x1, %esi
movl %edx, %edi
callq 0x2f330
leaq 0x69fe15(%rip), %rdi    # 0x6d5e50
callq 0x3e310
movsd 0x98(%rsp), %xmm0
leaq 0x38(%rsp), %rdi
leaq 0x69ff33(%rip), %rsi    # 0x6d5f88
callq 0x2f4b0
leaq 0x50(%rsp), %rdi
leaq 0x69fdea(%rip), %rsi    # 0x6d5e50
leaq 0x38(%rsp), %rdx
callq 0x162880
leaq 0x50(%rsp), %rdi
callq 0x3e310
callq 0x3e680
callq 0x3e670
xorl %esi, %esi
movl $0x1, %edx
movl %esi, %edi
callq 0x2f330
leaq 0x69fdb7(%rip), %rdi    # 0x6d5e50
callq 0x3e310
movsd 0x98(%rsp), %xmm0
leaq 0x8(%rsp), %rdi
leaq 0x69feed(%rip), %rsi    # 0x6d5fa0
callq 0x2f4b0
leaq 0x20(%rsp), %rdi
leaq 0x69fd8c(%rip), %rsi    # 0x6d5e50
leaq 0x8(%rsp), %rdx
callq 0x162880
leaq 0x20(%rsp), %rdi
callq 0x3e310
callq 0x3e680
movss 0x20b947(%rip), %xmm0   # 0x241a2c
callq 0x29370
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::CaptureImage(char const*) const
void R3SurfelViewer::
CaptureImage(const char *filename) const
{
  // Check stuff
  if (!filename) return;

  // Capture iamge
  R2Image image(viewer.Viewport().Width(), viewer.Viewport().Height(), 3);
  image.Capture();

  // Wrimte to file
  image.Write(filename);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x36122
jmp 0x36192
movq 0x18(%rsp), %rdi
addq $0x78, %rdi
movq %rdi, (%rsp)
callq 0x3def0
movq %rax, %rdi
callq 0x3df10
movq (%rsp), %rdi
movl %eax, 0xc(%rsp)
callq 0x3def0
movq %rax, %rdi
callq 0x3e370
movl 0xc(%rsp), %esi
movl %eax, %edx
leaq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x3, %ecx
callq 0x1968e0
movq 0x10(%rsp), %rdi
callq 0x197d00
jmp 0x36177
movq 0x48(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x3e690
jmp 0x36188
leaq 0x30(%rsp), %rdi
callq 0x196e00
addq $0x58, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x196e00
movq 0x28(%rsp), %rdi
callq 0x292e0
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::Resize(int, int)
int R3SurfelViewer::
Resize(int w, int h)
{
  // Resize window
  glViewport(0, 0, w, h);

  // Resize viewer viewport
  viewer.ResizeViewport(0, 0, w, h);

  // Remember window size
  window_width = w;
  window_height = h;

  // Return whether need redraw
  return 1;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
xorl %esi, %esi
movl %esi, %edi
callq 0x28250
movq (%rsp), %rdi
addq $0x78, %rdi
movl 0xc(%rsp), %ecx
movl 0x8(%rsp), %r8d
xorl %edx, %edx
movl %edx, %esi
callq 0xcd740
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, 0x498(%rax)
movl 0x8(%rsp), %ecx
movl %ecx, 0x494(%rax)
movl $0x1, %eax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::Initialize()
void R3SurfelViewer::
Initialize(void)
{
  // Initialize lights
  static GLfloat lmodel_ambient[] = { 0.2, 0.2, 0.2, 1.0 };
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
  glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
  static GLfloat light0_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
  static GLfloat light0_position[] = { 0.0, 0.0, -1.0, 0.0 };
  glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse);
  glLightfv(GL_LIGHT0, GL_POSITION, light0_position);
  glEnable(GL_LIGHT0);
  static GLfloat light1_diffuse[] = { 0.5, 0.5, 0.5, 1.0 };
  static GLfloat light1_position[] = { 0.0, -1.0, 0.0, 0.0 };
  glLightfv(GL_LIGHT1, GL_DIFFUSE, light1_diffuse);
  glLightfv(GL_LIGHT1, GL_POSITION, light1_position);
  glEnable(GL_LIGHT1);
  glEnable(GL_NORMALIZE);

  // Initialize color settings
  glEnable(GL_COLOR_MATERIAL);
  glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);

  // Initialize graphics modes
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_CULL_FACE);

  // Initialize shaders
  CompileShaders();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0xb53, %edi            # imm = 0xB53
leaq 0x28bad1(%rip), %rsi    # 0x2c3b30
callq 0x29430
movl $0xb51, %edi            # imm = 0xB51
movl $0x1, %esi
callq 0x28170
movl $0x4000, %edi           # imm = 0x4000
movl $0x1201, %esi           # imm = 0x1201
leaq 0x28babc(%rip), %rdx    # 0x2c3b40
callq 0x292c0
movl $0x4000, %edi           # imm = 0x4000
movl $0x1203, %esi           # imm = 0x1203
leaq 0x28bab6(%rip), %rdx    # 0x2c3b50
callq 0x292c0
movl $0x4000, %edi           # imm = 0x4000
callq 0x28960
movl $0x4001, %edi           # imm = 0x4001
movl $0x1201, %esi           # imm = 0x1201
leaq 0x28baa6(%rip), %rdx    # 0x2c3b60
callq 0x292c0
movl $0x4001, %edi           # imm = 0x4001
movl $0x1203, %esi           # imm = 0x1203
leaq 0x28baa0(%rip), %rdx    # 0x2c3b70
callq 0x292c0
movl $0x4001, %edi           # imm = 0x4001
callq 0x28960
movl $0xba1, %edi            # imm = 0xBA1
callq 0x28960
movl $0xb57, %edi            # imm = 0xB57
callq 0x28960
movl $0x404, %edi            # imm = 0x404
movl $0x1602, %esi           # imm = 0x1602
callq 0x28660
movl $0xb71, %edi            # imm = 0xB71
callq 0x28960
movl $0xb44, %edi            # imm = 0xB44
callq 0x28960
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x388(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::ResetCamera()
void R3SurfelViewer::
ResetCamera(void)
{
  // Move center point to scene centroid
  if (!scene) return;
  SetCenterPoint(scene->Centroid());
  R3Point eye = CenterPoint() + 2 * scene->BBox().DiagonalRadius() * R3posz_vector;
  viewer.RepositionCamera(eye);
  viewer.ReorientCamera(R3negz_vector, R3posy_vector);
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3816f
jmp 0x38220
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3e990
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
leaq 0x48(%rsp), %rsi
callq *0x80(%rax)
movq 0x10(%rsp), %rdi
callq 0x3e9d0
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x8(%rax), %rdi
callq 0x3d7d0
movq %rax, %rdi
callq 0x3e0a0
movaps %xmm0, %xmm1
movsd 0x2093c0(%rip), %xmm0   # 0x241588
mulsd %xmm1, %xmm0
leaq 0x18(%rsp), %rdi
leaq 0x69ddc8(%rip), %rsi    # 0x6d5fa0
callq 0x2f4b0
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rdx
callq 0x162880
movq 0x10(%rsp), %rdi
addq $0x78, %rdi
leaq 0x30(%rsp), %rsi
callq 0x3e9f0
movq 0x10(%rsp), %rdi
addq $0x78, %rdi
leaq 0x69ddd4(%rip), %rsi    # 0x6d5fe8
leaq 0x69dd6d(%rip), %rdx    # 0x6d5f88
callq 0x3ea20
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::SelectPoint(gaps::R3SurfelObject*)
void R3SurfelViewer::
SelectPoint(R3SurfelObject *object)
{
  // Create pointset
  R3SurfelPointSet *pointset = object->PointSet(TRUE);
  if (!pointset) {
    SelectPoint(NULL, -1);
    return;
  }

  // Get object centroid
  R3Point centroid = object->Centroid();

  // Find point nearest object centroid
  RNLength best_dd = FLT_MAX;
  R3SurfelPoint *best_point = NULL;
  for (int i = 0; i < pointset->NPoints(); i++) {
    R3SurfelPoint *point = pointset->Point(i);
    RNLength dd = R3SquaredDistance(centroid, point->Position());
    if (dd < best_dd) {
      best_point = point;
      best_dd = dd;
    }
  }

  // Select point 
  R3SurfelBlock *block = (best_point) ? best_point->Block() : NULL;
  int surfel_index = (best_point) ? best_point->BlockIndex() : -1;
  SelectPoint(block, surfel_index);

  // Delete pointset
  delete pointset;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rdi
movl $0x1, %esi
xorps %xmm0, %xmm0
callq 0x65d70
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x38368
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
xorl %ecx, %ecx
movl %ecx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq *0x1b8(%rax)
jmp 0x384b6
movq 0x98(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x3d710
movsd 0x20914e(%rip), %xmm0   # 0x2414d0
movsd %xmm0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x90(%rsp), %rdi
callq 0x3ea50
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x3842c
movq 0x90(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x3ea60
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x3e1d0
leaq 0x78(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xf0ea0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm1
movsd 0x70(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3841a
movq 0x58(%rsp), %rax
movq %rax, 0x68(%rsp)
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x3841c
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x38399
cmpq $0x0, 0x68(%rsp)
je 0x38445
movq 0x68(%rsp), %rdi
callq 0x3ea80
movq %rax, 0x10(%rsp)
jmp 0x3844e
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x3844e
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x38470
movq 0x68(%rsp), %rdi
callq 0x3ea90
movl %eax, 0xc(%rsp)
jmp 0x3847b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0xc(%rsp)
jmp 0x3847b
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rsi
movl 0x2c(%rsp), %edx
movq (%rdi), %rax
callq *0x1b8(%rax)
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x384b6
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0xa8, %rsp
retq
nop
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::SelectPoint(gaps::R3SurfelBlock*, int)
void R3SurfelViewer::
SelectPoint(R3SurfelBlock *block, int surfel_index)
{
  // Remember previously selected point
  R3SurfelPoint *previous_selected_point = selected_point;

  // Select point
  selected_point = NULL;
  if (block && (surfel_index >= 0) && (surfel_index < block->NSurfels())) {
    selected_point = new R3SurfelPoint(block, surfel_index);
  }

  // Delete previously selected point
  if (previous_selected_point) delete previous_selected_point;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x2c8(%rax), %rcx
movq %rcx, 0x38(%rsp)
movq $0x0, 0x2c8(%rax)
cmpq $0x0, 0x48(%rsp)
je 0x38575
cmpl $0x0, 0x44(%rsp)
jl 0x38575
movl 0x44(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x48(%rsp), %rdi
callq 0x2f2b0
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0x38575
movl $0x10, %edi
callq 0x28a30
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
callq 0x509c0
jmp 0x38543
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x2c8(%rax)
jmp 0x38575
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
movl $0x10, %esi
callq 0x28a50
jmp 0x385ad
cmpq $0x0, 0x38(%rsp)
je 0x385a8
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x385a6
movq 0x8(%rsp), %rdi
callq 0x50a40
movq 0x8(%rsp), %rdi
movl $0x10, %esi
callq 0x28a50
jmp 0x385a8
addq $0x58, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x292e0
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::SelectImage(gaps::R3SurfelImage*, int, int)
void R3SurfelViewer::
SelectImage(R3SurfelImage *image, RNBoolean update_working_set, RNBoolean jump_to_viewpoint)
{
  // Jump to viewpoint
  if (image && jump_to_viewpoint) {
    R3Camera camera(image->Viewpoint(), image->Towards(), image->Up(),
      image->XFOV(), image->YFOV(), viewer.Camera().Near(), viewer.Camera().Far());
    viewer.SetCamera(camera);
  }

  // Update working set
  if (image && update_working_set) {
    R3SurfelScan *scan = image->Scan();
    R3SurfelNode *node = (scan) ? scan->Node() : NULL;
    if (!node) {
      SetCenterPoint(image->Viewpoint() + 2.0 * image->Towards());
    }
    else {
      EmptyWorkingSet();
      center_point = node->Centroid();
      InsertIntoWorkingSet(node, TRUE);
    }
  }

  // Remember selected image
  selected_image = image;
}

// Assembly:
subq $0x178, %rsp            # imm = 0x178
movq %rdi, 0x170(%rsp)
movq %rsi, 0x168(%rsp)
movl %edx, 0x164(%rsp)
movl %ecx, 0x160(%rsp)
movq 0x170(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x168(%rsp)
je 0x386ea
cmpl $0x0, 0x160(%rsp)
je 0x386ea
movq 0x168(%rsp), %rdi
callq 0x3e430
movq %rax, 0x18(%rsp)
movq 0x168(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x3e450
movq 0x168(%rsp), %rdi
callq 0x3e4e0
movq %rax, 0x20(%rsp)
movq 0x168(%rsp), %rdi
callq 0x3e510
movsd %xmm0, 0x38(%rsp)
movq 0x168(%rsp), %rdi
callq 0x3e570
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x28(%rsp)
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, %rdi
callq 0x3d870
movq 0x40(%rsp), %rdi
movsd %xmm0, 0x30(%rsp)
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, %rdi
callq 0x3d880
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rcx
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x38(%rsp), %xmm0
leaq 0xd0(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0xd09a0
movq 0x40(%rsp), %rdi
addq $0x78, %rdi
leaq 0xd0(%rsp), %rsi
callq 0xcd540
cmpq $0x0, 0x168(%rsp)
je 0x38819
cmpl $0x0, 0x164(%rsp)
je 0x38819
movq 0x168(%rsp), %rdi
callq 0x3ead0
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xb0(%rsp)
je 0x3873b
movq 0xb0(%rsp), %rdi
callq 0x3eae0
movq %rax, 0x10(%rsp)
jmp 0x38744
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0x38744
movq 0x10(%rsp), %rax
movq %rax, 0xa8(%rsp)
cmpq $0x0, 0xa8(%rsp)
jne 0x387c6
movq 0x168(%rsp), %rdi
callq 0x3e430
movq %rax, 0x8(%rsp)
movq 0x168(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x3e450
leaq 0x78(%rsp), %rdi
movsd 0x208dfb(%rip), %xmm0   # 0x241588
leaq 0x60(%rsp), %rsi
callq 0x2f4b0
movq 0x8(%rsp), %rsi
leaq 0x90(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x162880
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
leaq 0x90(%rsp), %rsi
callq *0x80(%rax)
jmp 0x38817
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
callq *0x308(%rax)
movq 0xa8(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3d6d0
movq 0x40(%rsp), %rdi
addq $0x2b0, %rdi            # imm = 0x2B0
leaq 0x48(%rsp), %rsi
callq 0x162950
movq 0x40(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq (%rdi), %rax
movl $0x1, %edx
callq *0x328(%rax)
jmp 0x38819
movq 0x40(%rsp), %rax
movq 0x168(%rsp), %rcx
movq %rcx, 0x2d0(%rax)
addq $0x178, %rsp            # imm = 0x178
retq
nopw %cs:(%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::WriteImage(char const*)
int R3SurfelViewer::
WriteImage(const char *filename)
{
  // Check if can write file
  FILE *fp = fopen(filename, "w");
  if (!fp) return 0;
  else fclose(fp);

  // Remember screenshot image name -- capture image next redraw
  if (screenshot_name) free(screenshot_name);
  if (!filename) screenshot_name = NULL;
  else screenshot_name = RNStrdup(filename);

  // Return success
  return 1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20d98b(%rip), %rsi    # 0x2461ee
callq 0x28c60
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x3887f
movl $0x0, 0x24(%rsp)
jmp 0x388e0
movq 0x8(%rsp), %rdi
callq 0x28a20
movq (%rsp), %rax
cmpq $0x0, 0x4f0(%rax)
je 0x388a7
movq (%rsp), %rax
movq 0x4f0(%rax), %rdi
callq 0x28c80
cmpq $0x0, 0x10(%rsp)
jne 0x388c0
movq (%rsp), %rax
movq $0x0, 0x4f0(%rax)
jmp 0x388d8
movq 0x10(%rsp), %rdi
callq 0x1a7470
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x4f0(%rax)
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::ReadCoarsestBlocks(double)
void R3SurfelViewer::
ReadCoarsestBlocks(RNScalar max_complexity)
{
  // Just checking
  if (!scene) return;

  // Get convenient variables
  R3SurfelTree *tree = scene->Tree();
  if (!tree) return;

  // Seed breadth first search with root node
  RNQueue<R3SurfelNode *> queue;
  queue.Insert(tree->RootNode());

  // Visit nodes in breadth first search reading blocks
  RNScalar total_complexity = 0;
  while (!queue.IsEmpty()) {
    R3SurfelNode *node = queue.Pop();
    if (total_complexity + node->Complexity() > max_complexity) break;
    total_complexity += node->Complexity();
    node->ReadBlocks();
    for (int i = 0; i < node->NParts(); i++) {
      R3SurfelNode *part = node->Part(i);
      queue.Push(part);
    }
  }

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movsd %xmm0, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x38c31
jmp 0x38deb
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x2f020
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x38c57
jmp 0x38deb
leaq 0x78(%rsp), %rdi
callq 0x3eaf0
movq 0x90(%rsp), %rdi
callq 0x3eb30
movq %rax, 0x38(%rsp)
jmp 0x38c75
movq 0x38(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x3eb00
jmp 0x38c86
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x3eb50
movl %eax, 0x34(%rsp)
jmp 0x38c9f
movl 0x34(%rsp), %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x38cb4
jmp 0x38dce
leaq 0x78(%rsp), %rdi
callq 0x3eb70
movq %rax, 0x28(%rsp)
jmp 0x38cc5
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x58(%rsp), %rdi
callq 0x58960
movsd %xmm0, 0x20(%rsp)
jmp 0x38ced
movsd 0x20(%rsp), %xmm1
movsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
ucomisd 0x98(%rsp), %xmm0
jbe 0x38d2a
jmp 0x38dce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x3ec00
jmp 0x38df3
movq 0x58(%rsp), %rdi
callq 0x58960
movsd %xmm0, 0x10(%rsp)
jmp 0x38d3c
movsd 0x10(%rsp), %xmm1
movsd 0x60(%rsp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x59ae0
jmp 0x38d60
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x2f260
movl %eax, 0xc(%rsp)
jmp 0x38d80
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
cmpl %ecx, %eax
jge 0x38dc9
movq 0x58(%rsp), %rdi
movl 0x54(%rsp), %esi
callq 0x3eba0
movq %rax, (%rsp)
jmp 0x38da0
movq (%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x3ebd0
jmp 0x38dba
jmp 0x38dbc
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x38d68
jmp 0x38c8f
movq 0x40(%rsp), %rdi
movq (%rdi), %rax
movq 0x378(%rax), %rax
callq *%rax
jmp 0x38de1
leaq 0x78(%rsp), %rdi
callq 0x3ec00
addq $0xa8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x292e0
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::EmptyWorkingSet()
void R3SurfelViewer::
EmptyWorkingSet(void)
{
  // Just checking
  if (!scene) return;

  // Release blocks from resident nodes
  resident_nodes.ReleaseBlocks();

  // Empty resident nodes
  resident_nodes.Empty();

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3909c
jmp 0x390c6
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x5ba20
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
callq 0x5b950
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
callq *0x378(%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::UpdateWorkingSet(gaps::R3Point const&, double, double)
void R3SurfelViewer::
UpdateWorkingSet(const R3Point& center, RNScalar resolution, RNScalar radius)
{
  // Just checking
  if (!scene) return;

  // Get convenient variables
  R3SurfelTree *tree = scene->Tree();
  if (!tree) return;

  // Check if already at full resolution
  if ((resolution == last_target_resolution) && (resolution >= RN_INFINITY) && 
      (radius == last_focus_radius) && (radius >= RN_INFINITY)) return;

  // Find new set of nodes
  R3SurfelNodeSet new_resident_nodes;
  new_resident_nodes.InsertNodes(tree, center, radius, -FLT_MAX, FLT_MAX, resolution, RN_EPSILON);

  // Read new working set
  new_resident_nodes.ReadBlocks();

  // Release old working set
  resident_nodes.ReleaseBlocks();

  // Now use newnodes 
  resident_nodes = new_resident_nodes;

  // Invalidate VBO buffers
  InvalidateVBO();

  // Remember parameters
  last_target_resolution = resolution;
  last_focus_radius = radius;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movsd %xmm0, 0xa0(%rsp)
movsd %xmm1, 0x98(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x39112
jmp 0x39272
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x2f020
movq %rax, 0x90(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x39138
jmp 0x39272
movq 0x10(%rsp), %rax
movsd 0xa0(%rsp), %xmm0
ucomisd 0x470(%rax), %xmm0
jne 0x3919d
jp 0x3919d
movsd 0xa0(%rsp), %xmm0
leaq 0x2939f6(%rip), %rax    # 0x2ccb58
ucomisd (%rax), %xmm0
jb 0x3919d
movq 0x10(%rsp), %rax
movsd 0x98(%rsp), %xmm0
ucomisd 0x480(%rax), %xmm0
jne 0x3919d
jp 0x3919d
movsd 0x98(%rsp), %xmm0
leaq 0x2939c6(%rip), %rax    # 0x2ccb58
ucomisd (%rax), %xmm0
jb 0x3919d
jmp 0x39272
leaq 0x28(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x5ae40
movq 0x8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movsd 0x98(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm3
leaq 0x29396e(%rip), %rax    # 0x2ccb48
movsd (%rax), %xmm4
movsd 0x2082f2(%rip), %xmm1   # 0x2414d8
movsd 0x2082e2(%rip), %xmm2   # 0x2414d0
movsd 0x20830a(%rip), %xmm5   # 0x241500
callq 0x5b690
jmp 0x391fd
leaq 0x28(%rsp), %rdi
callq 0x5b9b0
jmp 0x39209
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x5ba20
jmp 0x39219
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
leaq 0x28(%rsp), %rsi
callq 0x3ec10
jmp 0x3922e
movq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq 0x378(%rax), %rax
callq *%rax
jmp 0x39241
movq 0x10(%rsp), %rax
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x470(%rax)
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x480(%rax)
leaq 0x28(%rsp), %rdi
callq 0x5afd0
addq $0xb8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5afd0
movq 0x20(%rsp), %rdi
callq 0x292e0
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::InsertIntoWorkingSet(gaps::R3SurfelNode*, int)
void R3SurfelViewer::
InsertIntoWorkingSet(R3SurfelNode *node, RNBoolean full_resolution)
{
  // Just checking
  if (!scene) return;

  // Recurse to children
  if (full_resolution) {
    if (node->NParts() == 0) {
      InsertIntoWorkingSet(node, FALSE);
    }
    else {
      for (int i = 0; i < node->NParts(); i++) {
        R3SurfelNode *part = node->Part(i);
        InsertIntoWorkingSet(part, full_resolution);
      }
    }
  }
  else {
    // Read blocks 
    node->ReadBlocks();

    // Insert into resident nodes
    resident_nodes.InsertNode(node);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3a448
jmp 0x3a4f7
cmpl $0x0, 0x24(%rsp)
je 0x3a4d8
movq 0x28(%rsp), %rdi
callq 0x2f260
cmpl $0x0, %eax
jne 0x3a479
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x328(%rax)
jmp 0x3a4d6
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2f260
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3a4d4
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x3eba0
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %edx
movq (%rdi), %rax
callq *0x328(%rax)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x3a481
jmp 0x3a4d6
jmp 0x3a4f7
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x59ae0
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movq 0x28(%rsp), %rsi
callq 0x5b7c0
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::RemoveFromWorkingSet(gaps::R3SurfelNode*, int)
void R3SurfelViewer::
RemoveFromWorkingSet(R3SurfelNode *node, RNBoolean full_resolution)
{
  // Just checking
  if (!scene) return;

  // Recurse to children
  if (full_resolution) {
    if (node->NParts() == 0) {
      RemoveFromWorkingSet(node, FALSE);
    }
    else {
      for (int i = 0; i < node->NParts(); i++) {
        R3SurfelNode *part = node->Part(i);
        RemoveFromWorkingSet(part, full_resolution);
      }
    }
  }
  else {
    // Release blocks 
    node->ReleaseBlocks();

    // Remove from resident nodes
    resident_nodes.RemoveNode(node);
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x8(%rax)
jne 0x3a528
jmp 0x3a5d7
cmpl $0x0, 0x24(%rsp)
je 0x3a5b8
movq 0x28(%rsp), %rdi
callq 0x2f260
cmpl $0x0, %eax
jne 0x3a559
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq (%rdi), %rax
xorl %edx, %edx
callq *0x330(%rax)
jmp 0x3a5b6
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2f260
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3a5b4
movq 0x28(%rsp), %rdi
movl 0x20(%rsp), %esi
callq 0x3eba0
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %edx
movq (%rdi), %rax
callq *0x330(%rax)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x3a561
jmp 0x3a5b6
jmp 0x3a5d7
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x59bd0
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
movq 0x28(%rsp), %rsi
callq 0x5b850
addq $0x38, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::RotateWorld(double, gaps::R3Point const&, int, int, int, int)
void R3SurfelViewer::
RotateWorld(RNScalar factor, const R3Point& origin, int, int, int dx, int dy)
{
  // Rotate world based on mouse (dx)
  if ((dx == 0) && (dy == 0)) return;
  RNLength vx = (RNLength) dx / (RNLength) viewer.Viewport().Width();
  RNLength vy = (RNLength) dy / (RNLength) viewer.Viewport().Height();
  RNAngle theta = -1 * factor * 4.0 * vx;
  viewer.RotateWorld(origin, viewer.Camera().Up(), theta);
  RNAngle phi = factor * 4.0 * vy;
  RNAngle max_phi = R3InteriorAngle(viewer.Camera().Towards(), R3posz_vector) - RN_PI_OVER_TWO;
  if (phi > max_phi) phi = max_phi;
  viewer.RotateWorld(origin, viewer.Camera().Right(), phi);
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movsd %xmm0, 0x98(%rsp)
movq %rsi, 0x90(%rsp)
movl %edx, 0x8c(%rsp)
movl %ecx, 0x88(%rsp)
movl %r8d, 0x84(%rsp)
movl %r9d, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpl $0x0, 0x84(%rsp)
jne 0x3a644
cmpl $0x0, 0x80(%rsp)
jne 0x3a644
jmp 0x3a7e1
movq 0x38(%rsp), %rdi
cvtsi2sdl 0x84(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
addq $0x78, %rdi
callq 0x3def0
movq %rax, %rdi
callq 0x3df10
movsd 0x18(%rsp), %xmm0
movq 0x38(%rsp), %rdi
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rsp)
cvtsi2sdl 0x80(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
addq $0x78, %rdi
callq 0x3def0
movq %rax, %rdi
callq 0x3e370
movsd 0x20(%rsp), %xmm0
movq 0x38(%rsp), %rdi
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x206945(%rip), %xmm0   # 0x241008
mulsd 0x98(%rsp), %xmm0
movsd 0x206eac(%rip), %xmm1   # 0x241580
mulsd %xmm1, %xmm0
mulsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
movq %rdi, %rax
addq $0x78, %rax
movq %rax, 0x28(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, %rdi
callq 0x2ef20
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rdx
movsd 0x68(%rsp), %xmm0
callq 0xcd8c0
movq 0x38(%rsp), %rdi
movsd 0x206e4d(%rip), %xmm0   # 0x241580
mulsd 0x98(%rsp), %xmm0
mulsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, %rsi
leaq 0x40(%rsp), %rdi
callq 0x2eea0
leaq 0x40(%rsp), %rdi
leaq 0x69b836(%rip), %rsi    # 0x6d5fa0
callq 0xf6550
leaq 0x20dd52(%rip), %rax    # 0x2484c8
subsd (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x60(%rsp), %xmm0
ucomisd 0x58(%rsp), %xmm0
jbe 0x3a79a
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x78, %rax
movq %rax, 0x8(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x78, %rdi
callq 0x2f6d0
movq %rax, %rdi
callq 0x3ed70
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
movsd 0x60(%rsp), %xmm0
callq 0xcd8c0
addq $0xa8, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::PickObject(int, int, gaps::R3Point*)
R3SurfelObject *R3SurfelViewer::
PickObject(int x, int y, R3Point *picked_position)
{
  // Pick node
  R3SurfelNode *node = PickNode(x, y, picked_position, NULL, NULL, TRUE);
  if (!node) return NULL;

  // Get picked object
  R3SurfelObject *picked_object = node->Object(TRUE);
  if (!picked_object) return NULL;

  // Adjust picked object to be ancestor directly under root object
  while (picked_object && picked_object->Parent() && (picked_object->Parent() != scene->RootObject())) {
    picked_object = picked_object->Parent();
  }

  // Return picked object
  return picked_object;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movl %edx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movl 0x44(%rsp), %esi
movl 0x40(%rsp), %edx
movq 0x38(%rsp), %rcx
movq (%rdi), %rax
xorl %r8d, %r8d
movl %r8d, %r9d
movq %r9, %r8
movl $0x1, (%rsp)
callq *0x1f8(%rax)
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x3acc1
movq $0x0, 0x50(%rsp)
jmp 0x3ad6d
movq 0x30(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x58f70
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x3aced
movq $0x0, 0x50(%rsp)
jmp 0x3ad6d
jmp 0x3acef
xorl %eax, %eax
cmpq $0x0, 0x28(%rsp)
movb %al, 0x1f(%rsp)
je 0x3ad48
movq 0x28(%rsp), %rdi
callq 0x3d2e0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, 0x1f(%rsp)
je 0x3ad48
movq 0x28(%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
setne %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x3ad52
jmp 0x3ad63
movq 0x28(%rsp), %rdi
callq 0x3d2e0
movq %rax, 0x28(%rsp)
jmp 0x3acef
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DrawObject(gaps::R3SurfelObject*, gaps::RNFlags) const
void R3SurfelViewer::
DrawObject(R3SurfelObject *object, RNFlags draw_flags) const
{
  // Draw nodes
  for (int i = 0; i < object->NNodes(); i++) {
    R3SurfelNode *node = object->Node(i);
    if (!node->DrawResidentDescendents(draw_flags)) {
      if (!node->DrawResidentAncestor(draw_flags)) {
        // const char *object_name = (object->Name()) ? object->Name() : "None";
        // RNFail("Did not draw object %s\n", object_name);
      }
    }
  }

  // Draw parts
  for (int i = 0; i < object->NParts(); i++) {
    R3SurfelObject *part = object->Part(i);
    DrawObject(part, draw_flags);
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdx, 0x60(%rsp)
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x50(%rsp), %rdi
callq 0x3d290
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0x3b815
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
callq 0x3d2b0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
movq (%rdi), %rax
callq *0x58(%rax)
cmpl $0x0, %eax
jne 0x3b806
movq 0x40(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
movq (%rdi), %rax
callq *0x50(%rax)
cmpl $0x0, %eax
jne 0x3b804
jmp 0x3b804
jmp 0x3b806
jmp 0x3b808
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x3b795
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
callq 0x3d240
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x3b87b
movq 0x50(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x3d260
movq 0x10(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdx
movq (%rdi), %rax
callq *0x360(%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x3b81d
addq $0x68, %rsp
retq
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::DeleteShaders()
void R3SurfelViewer::
DeleteShaders(void)
{
  // Delete shader program
  if (shader_program > 0) {
    glDetachShader(shader_program, vertex_shader);
    glDetachShader(shader_program, fragment_shader);
    glDeleteProgram(shader_program);
    shader_program = 0;
  }

  // Delete vertex shader
  if (vertex_shader > 0) {
    glDeleteShader(vertex_shader);
    vertex_shader = 0;
  }

  // Delete fragment shader
  if (fragment_shader > 0) {
    glDeleteShader(fragment_shader);
    fragment_shader = 0;
  }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x608(%rax)
jbe 0x3d12c
movq 0x8(%rsp), %rcx
movq 0x285e48(%rip), %rax    # 0x2c2f20
movq (%rax), %rax
movl 0x608(%rcx), %edi
movl 0x60c(%rcx), %esi
callq *%rax
movq 0x8(%rsp), %rcx
movq 0x285e2b(%rip), %rax    # 0x2c2f20
movq (%rax), %rax
movl 0x608(%rcx), %edi
movl 0x610(%rcx), %esi
callq *%rax
movq 0x8(%rsp), %rcx
movq 0x285e16(%rip), %rax    # 0x2c2f28
movq (%rax), %rax
movl 0x608(%rcx), %edi
callq *%rax
movq 0x8(%rsp), %rax
movl $0x0, 0x608(%rax)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x60c(%rax)
jbe 0x3d160
movq 0x8(%rsp), %rcx
movq 0x285e6a(%rip), %rax    # 0x2c2fb0
movq (%rax), %rax
movl 0x60c(%rcx), %edi
callq *%rax
movq 0x8(%rsp), %rax
movl $0x0, 0x60c(%rax)
movq 0x8(%rsp), %rax
cmpl $0x0, 0x610(%rax)
jbe 0x3d194
movq 0x8(%rsp), %rcx
movq 0x285e36(%rip), %rax    # 0x2c2fb0
movq (%rax), %rax
movl 0x610(%rcx), %edi
callq *%rax
movq 0x8(%rsp), %rax
movl $0x0, 0x610(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetSurfelVisibility(int)
inline void R3SurfelViewer::
SetSurfelVisibility(int visibility)
{
  // Set surfel visibililty
  if (visibility == -1) surfel_visibility = 1 - surfel_visibility;
  else if (visibility == 0) surfel_visibility = 0;
  else surfel_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f3c2
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x2f0(%rax), %ecx
movl %ecx, 0x2f0(%rax)
jmp 0x3f3eb
cmpl $0x0, -0xc(%rsp)
jne 0x3f3da
movq -0x18(%rsp), %rax
movl $0x0, 0x2f0(%rax)
jmp 0x3f3e9
movq -0x18(%rsp), %rax
movl $0x1, 0x2f0(%rax)
jmp 0x3f3eb
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetNormalVisibility(int)
inline void R3SurfelViewer::
SetNormalVisibility(int visibility)
{
  // Set normal visibililty
  if (visibility == -1) normal_visibility = 1 - normal_visibility;
  else if (visibility == 0) normal_visibility = 0;
  else normal_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f422
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x2f4(%rax), %ecx
movl %ecx, 0x2f4(%rax)
jmp 0x3f44b
cmpl $0x0, -0xc(%rsp)
jne 0x3f43a
movq -0x18(%rsp), %rax
movl $0x0, 0x2f4(%rax)
jmp 0x3f449
movq -0x18(%rsp), %rax
movl $0x1, 0x2f4(%rax)
jmp 0x3f44b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetBackfacingVisibility(int)
inline void R3SurfelViewer::
SetBackfacingVisibility(int visibility)
{
  // Set backfacing visibililty
  if (visibility == -1) backfacing_visibility = 1 - backfacing_visibility;
  else if (visibility == 0) backfacing_visibility = 0;
  else backfacing_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f482
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x2f8(%rax), %ecx
movl %ecx, 0x2f8(%rax)
jmp 0x3f4ab
cmpl $0x0, -0xc(%rsp)
jne 0x3f49a
movq -0x18(%rsp), %rax
movl $0x0, 0x2f8(%rax)
jmp 0x3f4a9
movq -0x18(%rsp), %rax
movl $0x1, 0x2f8(%rax)
jmp 0x3f4ab
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetAerialVisibility(int)
inline void R3SurfelViewer::
SetAerialVisibility(int visibility)
{
  // Set background visibililty
  if (visibility == -1) aerial_visibility = 1 - aerial_visibility;
  else if (visibility == 0) aerial_visibility = 0;
  else aerial_visibility = 1;

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x3f4e4
movq (%rsp), %rax
movl $0x1, %ecx
subl 0x2fc(%rax), %ecx
movl %ecx, 0x2fc(%rax)
jmp 0x3f50b
cmpl $0x0, 0xc(%rsp)
jne 0x3f4fb
movq (%rsp), %rax
movl $0x0, 0x2fc(%rax)
jmp 0x3f509
movq (%rsp), %rax
movl $0x1, 0x2fc(%rax)
jmp 0x3f50b
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x378(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetTerrestrialVisibility(int)
inline void R3SurfelViewer::
SetTerrestrialVisibility(int visibility)
{
  // Set background visibililty
  if (visibility == -1) terrestrial_visibility = 1 - terrestrial_visibility;
  else if (visibility == 0) terrestrial_visibility = 0;
  else terrestrial_visibility = 1;

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x3f554
movq (%rsp), %rax
movl $0x1, %ecx
subl 0x300(%rax), %ecx
movl %ecx, 0x300(%rax)
jmp 0x3f57b
cmpl $0x0, 0xc(%rsp)
jne 0x3f56b
movq (%rsp), %rax
movl $0x0, 0x300(%rax)
jmp 0x3f579
movq (%rsp), %rax
movl $0x1, 0x300(%rax)
jmp 0x3f57b
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x378(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetHumanLabeledObjectVisibility(int)
inline void R3SurfelViewer::
SetHumanLabeledObjectVisibility(int visibility)
{
  // Set human labeled object visibililty
  if (visibility == -1) human_labeled_object_visibility = 1 - human_labeled_object_visibility;
  else if (visibility == 0) human_labeled_object_visibility = 0;
  else human_labeled_object_visibility = 1;

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0x3f5c4
movq (%rsp), %rax
movl $0x1, %ecx
subl 0x304(%rax), %ecx
movl %ecx, 0x304(%rax)
jmp 0x3f5eb
cmpl $0x0, 0xc(%rsp)
jne 0x3f5db
movq (%rsp), %rax
movl $0x0, 0x304(%rax)
jmp 0x3f5e9
movq (%rsp), %rax
movl $0x1, 0x304(%rax)
jmp 0x3f5eb
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x378(%rax)
addq $0x18, %rsp
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetObjectPrincipalAxesVisibility(int)
inline void R3SurfelViewer::
SetObjectPrincipalAxesVisibility(int visibility)
{
  // Set object principal axes visibililty
  if (visibility == -1) object_principal_axes_visibility = 1 - object_principal_axes_visibility;
  else if (visibility == 0) object_principal_axes_visibility = 0;
  else object_principal_axes_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f632
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x308(%rax), %ecx
movl %ecx, 0x308(%rax)
jmp 0x3f65b
cmpl $0x0, -0xc(%rsp)
jne 0x3f64a
movq -0x18(%rsp), %rax
movl $0x0, 0x308(%rax)
jmp 0x3f659
movq -0x18(%rsp), %rax
movl $0x1, 0x308(%rax)
jmp 0x3f65b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetObjectOrientedBBoxVisibility(int)
inline void R3SurfelViewer::
SetObjectOrientedBBoxVisibility(int visibility)
{
  // Set object oriented bbox visibililty
  if (visibility == -1) object_oriented_bbox_visibility = 1 - object_oriented_bbox_visibility;
  else if (visibility == 0) object_oriented_bbox_visibility = 0;
  else object_oriented_bbox_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f692
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x30c(%rax), %ecx
movl %ecx, 0x30c(%rax)
jmp 0x3f6bb
cmpl $0x0, -0xc(%rsp)
jne 0x3f6aa
movq -0x18(%rsp), %rax
movl $0x0, 0x30c(%rax)
jmp 0x3f6b9
movq -0x18(%rsp), %rax
movl $0x1, 0x30c(%rax)
jmp 0x3f6bb
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetObjectRelationshipVisibility(int)
inline void R3SurfelViewer::
SetObjectRelationshipVisibility(int visibility)
{
  // Set object relationship visibililty
  if (visibility == -1) object_relationship_visibility = 1 - object_relationship_visibility;
  else if (visibility == 0) object_relationship_visibility = 0;
  else object_relationship_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f6f2
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x310(%rax), %ecx
movl %ecx, 0x310(%rax)
jmp 0x3f71b
cmpl $0x0, -0xc(%rsp)
jne 0x3f70a
movq -0x18(%rsp), %rax
movl $0x0, 0x310(%rax)
jmp 0x3f719
movq -0x18(%rsp), %rax
movl $0x1, 0x310(%rax)
jmp 0x3f71b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetObjectBBoxVisibility(int)
inline void R3SurfelViewer::
SetObjectBBoxVisibility(int visibility)
{
  // Set object bbox visibililty
  if (visibility == -1) object_bbox_visibility = 1 - object_bbox_visibility;
  else if (visibility == 0) object_bbox_visibility = 0;
  else object_bbox_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f752
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x314(%rax), %ecx
movl %ecx, 0x314(%rax)
jmp 0x3f77b
cmpl $0x0, -0xc(%rsp)
jne 0x3f76a
movq -0x18(%rsp), %rax
movl $0x0, 0x314(%rax)
jmp 0x3f779
movq -0x18(%rsp), %rax
movl $0x1, 0x314(%rax)
jmp 0x3f77b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetNodeBBoxVisibility(int)
inline void R3SurfelViewer::
SetNodeBBoxVisibility(int visibility)
{
  // Set node bbox visibililty
  if (visibility == -1) node_bbox_visibility = 1 - node_bbox_visibility;
  else if (visibility == 0) node_bbox_visibility = 0;
  else node_bbox_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f7b2
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x318(%rax), %ecx
movl %ecx, 0x318(%rax)
jmp 0x3f7db
cmpl $0x0, -0xc(%rsp)
jne 0x3f7ca
movq -0x18(%rsp), %rax
movl $0x0, 0x318(%rax)
jmp 0x3f7d9
movq -0x18(%rsp), %rax
movl $0x1, 0x318(%rax)
jmp 0x3f7db
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetBlockBBoxVisibility(int)
inline void R3SurfelViewer::
SetBlockBBoxVisibility(int visibility)
{
  // Set block bbox visibililty
  if (visibility == -1) block_bbox_visibility = 1 - block_bbox_visibility;
  else if (visibility == 0) block_bbox_visibility = 0;
  else block_bbox_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f812
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x31c(%rax), %ecx
movl %ecx, 0x31c(%rax)
jmp 0x3f83b
cmpl $0x0, -0xc(%rsp)
jne 0x3f82a
movq -0x18(%rsp), %rax
movl $0x0, 0x31c(%rax)
jmp 0x3f839
movq -0x18(%rsp), %rax
movl $0x1, 0x31c(%rax)
jmp 0x3f83b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetScanViewpointVisibility(int)
inline void R3SurfelViewer::
SetScanViewpointVisibility(int visibility)
{
  // Set scan viewpoint visibililty
  if (visibility == -1) scan_viewpoint_visibility = 1 - scan_viewpoint_visibility;
  else if (visibility == 0) scan_viewpoint_visibility = 0;
  else scan_viewpoint_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f872
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x320(%rax), %ecx
movl %ecx, 0x320(%rax)
jmp 0x3f89b
cmpl $0x0, -0xc(%rsp)
jne 0x3f88a
movq -0x18(%rsp), %rax
movl $0x0, 0x320(%rax)
jmp 0x3f899
movq -0x18(%rsp), %rax
movl $0x1, 0x320(%rax)
jmp 0x3f89b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetImageViewpointVisibility(int)
inline void R3SurfelViewer::
SetImageViewpointVisibility(int visibility)
{
  // Set image viewpoint visibililty
  if (visibility == -1) image_viewpoint_visibility = 1 - image_viewpoint_visibility;
  else if (visibility == 0) image_viewpoint_visibility = 0;
  else image_viewpoint_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f8d2
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x324(%rax), %ecx
movl %ecx, 0x324(%rax)
jmp 0x3f8fb
cmpl $0x0, -0xc(%rsp)
jne 0x3f8ea
movq -0x18(%rsp), %rax
movl $0x0, 0x324(%rax)
jmp 0x3f8f9
movq -0x18(%rsp), %rax
movl $0x1, 0x324(%rax)
jmp 0x3f8fb
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetImagePlaneVisibility(int)
inline void R3SurfelViewer::
SetImagePlaneVisibility(int visibility)
{
  // Set image plane visibililty
  if (visibility == -1) image_plane_visibility = 1 - image_plane_visibility;
  else if (visibility == 0) image_plane_visibility = 0;
  else image_plane_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f932
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x328(%rax), %ecx
movl %ecx, 0x328(%rax)
jmp 0x3f95b
cmpl $0x0, -0xc(%rsp)
jne 0x3f94a
movq -0x18(%rsp), %rax
movl $0x0, 0x328(%rax)
jmp 0x3f959
movq -0x18(%rsp), %rax
movl $0x1, 0x328(%rax)
jmp 0x3f95b
retq
nopl (%rax)
// File: tomfunkhouser[P]gaps/pkgs/R3Utils/./R3SurfelViewer.h
// Function: gaps::R3SurfelViewer::SetImageInsetVisibility(int)
inline void R3SurfelViewer::
SetImageInsetVisibility(int visibility)
{
  // Set image inset visibililty
  if (visibility == -1) image_inset_visibility = 1 - image_inset_visibility;
  else if (visibility == 0) image_inset_visibility = 0;
  else image_inset_visibility = 1;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $-0x1, -0xc(%rsp)
jne 0x3f992
movq -0x18(%rsp), %rax
movl $0x1, %ecx
subl 0x32c(%rax), %ecx
movl %ecx, 0x32c(%rax)
jmp 0x3f9bb
cmpl $0x0, -0xc(%rsp)
jne 0x3f9aa
movq -0x18(%rsp), %rax
movl $0x0, 0x32c(%rax)
jmp 0x3f9b9
movq -0x18(%rsp), %rax
movl $0x1, 0x32c(%rax)
jmp 0x3f9bb
retq
nopl (%rax)