LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Utils/R3SurfelViewer.cpp
// Function: gaps::R3SurfelViewer::ReleaseCoarsestBlocks(double)
void R3SurfelViewer::
ReleaseCoarsestBlocks(RNScalar max_complexity)
{
  // Just checking
  if (!scene) return;

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

  // Seed breadth first search with root nodes
  RNQueue<R3SurfelNode *> queue;
  for (int i = 0; i < tree->NNodes(); i++) {
    R3SurfelNode *node = tree->Node(i);
    queue.Insert(node);
  }

  // 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->ReleaseBlocks();
    for (int i = 0; i < node->NParts(); i++) {
      R3SurfelNode *part = node->Part(i);
      queue.Push(part);
    }
  }

  // Invalidate VBO buffers
  InvalidateVBO();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x322de
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x322de
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe6ec8
cmpl $0x0, 0x24(%r15)
jle 0x32211
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rsi
movl 0x18(%rsp), %edx
movq %r14, %rdi
callq 0xe6f36
incq %r12
movslq 0x24(%r15), %rax
cmpq %rax, %r12
jl 0x321f1
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
leaq 0x8(%rsp), %r14
cmpl $0x0, 0x18(%rsp)
je 0x322c8
movl 0x1c(%rsp), %eax
cltd
idivl 0x10(%rsp)
movq 0x8(%rsp), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %r15
movq %r14, %rdi
xorl %esi, %esi
callq 0xe70e4
movq %r15, %rdi
callq 0x3fe32
addsd (%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
ucomisd 0x20(%rsp), %xmm0
ja 0x322b6
movq %r15, %rdi
callq 0x3fe32
movsd %xmm0, 0x28(%rsp)
movq %r15, %rdi
xorl %esi, %esi
callq 0x4075e
movsd (%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rsp)
cmpl $0x0, 0x3c(%r15)
jle 0x322b6
xorl %r12d, %r12d
movq 0x30(%r15), %rax
movq (%rax,%r12,8), %rsi
movl 0x18(%rsp), %edx
movq %r14, %rdi
callq 0xe6f36
incq %r12
movslq 0x3c(%r15), %rax
cmpq %rax, %r12
jl 0x32296
movsd 0x30(%rsp), %xmm0
ucomisd 0x20(%rsp), %xmm0
jbe 0x3221f
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x378(%rax)
leaq 0x8(%rsp), %rdi
callq 0xe726e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x322f0
jmp 0x322f0
jmp 0x322f0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xe726e
movq %rbx, %rdi
callq 0x28130
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x3233b
movq %rdi, %rbx
leaq 0x10(%rdi), %r14
movq %r14, %rdi
callq 0x417a4
movq %r14, %rdi
callq 0x4171e
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x378(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3247f
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x3247f
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x470(%rdi), %xmm2
ucomisd %xmm0, %xmm2
jne 0x323aa
jp 0x323aa
leaq 0x18de12(%rip), %rax    # 0x1c0198
movsd (%rax), %xmm2
ucomisd %xmm2, %xmm1
jb 0x323aa
ucomisd %xmm2, %xmm0
jb 0x323aa
movsd 0x480(%rbx), %xmm2
ucomisd %xmm1, %xmm2
jne 0x323aa
jnp 0x3247f
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
callq 0x41110
leaq 0x18ddbf(%rip), %rax    # 0x1c0188
movsd (%rax), %xmm4
movsd 0x108f6b(%rip), %xmm1   # 0x13b340
movsd 0x108f5b(%rip), %xmm2   # 0x13b338
movsd 0x10904b(%rip), %xmm5   # 0x13b430
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm3
callq 0x415e0
leaq 0x10(%rsp), %rdi
callq 0x41770
leaq 0x10(%rbx), %rdi
callq 0x417a4
leaq 0x18(%rbx), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe7218
leaq 0x38(%rsp), %rsi
movsd -0x10(%rsi), %xmm0
movsd %xmm0, 0x28(%rbx)
leaq 0x38(%rbx), %rdi
callq 0xc568c
leaq 0x50(%rbx), %rdi
leaq 0x50(%rsp), %rsi
callq 0xc568c
movups 0x68(%rsp), %xmm0
movups %xmm0, 0x68(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x378(%rax)
movsd (%rsp), %xmm0
movsd %xmm0, 0x470(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x480(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x41224
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x41224
movq %rbx, %rdi
callq 0x28130
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x32c13
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x32c1e
cmpl $0x0, 0x3c(%rbx)
je 0x32c41
cmpl $0x0, 0x3c(%rbx)
jle 0x32c13
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %edx
callq *0x328(%rax)
incq %r15
movslq 0x3c(%rbx), %rax
cmpq %rax, %r15
jl 0x32bf1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
xorl %esi, %esi
callq 0x406ca
addq $0x10, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x41632
movq (%r14), %rax
movq 0x328(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x32cab
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x32cb6
cmpl $0x0, 0x3c(%rbx)
je 0x32cd9
cmpl $0x0, 0x3c(%rbx)
jle 0x32cab
xorl %r15d, %r15d
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %edx
callq *0x330(%rax)
incq %r15
movslq 0x3c(%rbx), %rax
cmpq %rax, %r15
jl 0x32c89
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4075e
addq $0x10, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x416a6
movq (%r14), %rax
movq 0x330(%rax), %rax
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl %r9d, %eax
orl %r8d, %eax
je 0x32dda
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movapd %xmm0, %xmm2
movq %rdi, %r14
cvtsi2sd %r8d, %xmm1
leaq 0x78(%rdi), %r15
xorps %xmm0, %xmm0
cvtsi2sdl 0x118(%rdi), %xmm0
cvtsi2sd %r9d, %xmm3
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x11c(%rdi), %xmm0
divsd %xmm0, %xmm3
movsd %xmm3, 0x8(%rsp)
movsd 0x1086ad(%rip), %xmm0   # 0x13b400
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
leaq 0xb0(%rdi), %rdx
movq %r15, %rdi
movsd %xmm2, (%rsp)
callq 0x78ffe
movsd (%rsp), %xmm0
mulsd 0x10868c(%rip), %xmm0   # 0x13b408
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0xc8(%r14), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0xc6a4c
leaq 0x11251e(%rip), %rsi    # 0x1452c0
movq %r12, %rdi
callq 0x8f2f7
leaq 0x1139c7(%rip), %rax    # 0x146778
subsd (%rax), %xmm0
minsd (%rsp), %xmm0
addq $0x98, %r14
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x78ffe
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rax
movl $0x1, (%rsp)
xorl %ebx, %ebx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq *0x1f8(%rax)
testq %rax, %rax
je 0x33085
xorl %ebx, %ebx
movq %rax, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x4013a
testq %rax, %rax
je 0x33085
movq 0x8(%r14), %rcx
movq %rax, %rbx
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x33085
movq 0x10(%rcx), %rdx
cmpq (%rdx), %rax
jne 0x33070
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x6c(%rsi)
jle 0x336cb
xorl %r13d, %r13d
movq 0x60(%r14), %rax
movq (%rax,%r13,8), %r12
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x58(%rax)
testl %eax, %eax
jne 0x336bf
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x50(%rax)
incq %r13
movslq 0x6c(%r14), %rax
cmpq %rax, %r13
jl 0x33699
cmpl $0x0, 0x2c(%r14)
jle 0x336f8
xorl %r12d, %r12d
movq 0x20(%r14), %rax
movq (%rax,%r12,8), %rsi
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rdx
callq *0x360(%rax)
incq %r12
movslq 0x2c(%r14), %rax
cmpq %rax, %r12
jl 0x336d5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x608(%rdi), %edi
testl %edi, %edi
je 0x3450f
movq 0x18a9ea(%rip), %r14    # 0x1beec8
movl 0x60c(%rbx), %esi
callq *(%r14)
movl 0x608(%rbx), %edi
movl 0x610(%rbx), %esi
callq *(%r14)
movq 0x18a9d3(%rip), %rax    # 0x1beed0
movl 0x608(%rbx), %edi
callq *(%rax)
movl $0x0, 0x608(%rbx)
movl 0x60c(%rbx), %edi
testl %edi, %edi
je 0x3452c
movq 0x18aa70(%rip), %rax    # 0x1bef90
callq *(%rax)
movl $0x0, 0x60c(%rbx)
movl 0x610(%rbx), %edi
testl %edi, %edi
je 0x34549
movq 0x18aa53(%rip), %rax    # 0x1bef90
callq *(%rax)
movl $0x0, 0x610(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNQueue.cpp
// Function: gaps::RNVQueue::FindEntry(void const*) const
RNQueueEntry *RNVQueue::
FindEntry(const void *data) const
{
  // Search for entry matching data
  for (int i = 0; i < nentries; i++) {
    RNQueueEntry *entry = KthEntry(i);
    if (EntryContents(entry) == data) return entry;
  }

  // Entry was not found
  return NULL;
}

// Assembly:
movl 0x10(%rdi), %r9d
testl %r9d, %r9d
jle 0xe6f2f
movl 0x14(%rdi), %r8d
movl 0x8(%rdi), %r10d
movq (%rdi), %rdi
movl %r8d, %eax
cltd
idivl %r10d
movslq %edx, %rax
leaq (%rdi,%rax,8), %rax
cmpq %rsi, (%rax)
cmoveq %rax, %rcx
je 0xe6f31
incl %r8d
decl %r9d
jne 0xe6f10
xorl %ecx, %ecx
movq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNQueue.cpp
// Function: gaps::RNVQueue::InternalInsert(void*, int)
RNQueueEntry *RNVQueue::
InternalInsert(void *data, int k)
{
  // Make sure there is enough storage for new entry
  Resize(nentries + 1);

  // Increment number of entries
  nentries++;

  // Check where entry is being inserted
  if (k == 0) {
    // Insert into head by shifting head back one
    head = (head + entries.NEntries() - 1) % entries.NEntries();
  }
  else if (k < (nentries-1)) {
    // Insert into middle by shifting all subsequent entries up one
    Shift(k, 0, 1);
  }

  // Get Kth entry
  RNQueueEntry *entry = KthEntry(k);

  // Insert data in kth entry 
  EntryContents(entry) = data;

  // Return entry
  return entry;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x10(%rdi), %esi
incl %esi
callq 0xe6fa2
movl 0x10(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
testl %ebp, %ebp
je 0xe6f72
cmpl %ebp, %eax
jle 0xe6f85
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0xe7028
jmp 0xe6f85
movl 0xc(%r14), %ecx
movl 0x14(%r14), %eax
addl %ecx, %eax
decl %eax
cltd
idivl %ecx
movl %edx, 0x14(%r14)
addl 0x14(%r14), %ebp
movl %ebp, %eax
cltd
idivl 0x8(%r14)
movq (%r14), %rax
movslq %edx, %rcx
leaq (%rax,%rcx,8), %rax
movq %rbx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNQueue.cpp
// Function: gaps::RNVQueue::Shift(int, int, int)
void RNVQueue::
Shift(int start, int length, int delta)
{
  /* Compute number of entries to shift */
  if ((delta < 0) && (start < -delta)) start = -delta;
  int nshift = nentries - start;
  if (delta > 0) nshift -= delta;
  if (nshift <= 0) return;
  if ((length > 0) && (length < nshift)) nshift = length;

  /* Shift queue entries */
  if (delta < 0) {
    for (int i = start; i < (start + nshift); i++) {
      EntryContents(KthEntry(i+delta)) = EntryContents(KthEntry(i));
    }
  }
  else if (delta > 0) {
    for (int i = (start + nshift - 1); i >= start; i--) {
      EntryContents(KthEntry(i+delta)) = EntryContents(KthEntry(i));
    }
  }
}

// Assembly:
pushq %rbx
movl %ecx, %r8d
negl %r8d
cmpl %esi, %r8d
cmovlel %esi, %r8d
xorl %r9d, %r9d
testl %ecx, %ecx
cmovnsl %esi, %r8d
cmovgl %ecx, %r9d
movl 0x10(%rdi), %eax
addl %r8d, %r9d
subl %r9d, %eax
testl %eax, %eax
jle 0xe70e1
cmpl %edx, %eax
movl %edx, %esi
cmovll %eax, %esi
testl %edx, %edx
cmovlel %eax, %esi
testl %ecx, %ecx
js 0xe70a6
jle 0xe70e1
testl %esi, %esi
jle 0xe70e1
movl 0x8(%rdi), %r9d
movl 0x14(%rdi), %r10d
addl %r8d, %esi
decl %esi
addl %r10d, %ecx
leal (%r10,%rsi), %eax
cltd
idivl %r9d
movq (%rdi), %r11
movslq %edx, %rax
movq (%r11,%rax,8), %rbx
leal (%rcx,%rsi), %eax
cltd
idivl %r9d
movslq %edx, %rax
movq %rbx, (%r11,%rax,8)
leal -0x1(%rsi), %eax
cmpl %r8d, %esi
movl %eax, %esi
jg 0xe707a
jmp 0xe70e1
testl %esi, %esi
jle 0xe70e1
addl %r8d, %esi
movl 0x8(%rdi), %r9d
movl 0x14(%rdi), %r10d
addl %r10d, %ecx
leal (%r10,%r8), %eax
cltd
idivl %r9d
movq (%rdi), %r11
movslq %edx, %rax
movq (%r11,%rax,8), %rbx
leal (%rcx,%r8), %eax
cltd
idivl %r9d
movslq %edx, %rax
movq %rbx, (%r11,%rax,8)
incl %r8d
cmpl %esi, %r8d
jl 0xe70b8
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNQueue.cpp
// Function: gaps::RNVQueue::InternalRemove(int)
void RNVQueue::
InternalRemove(int k) 
{
  // Check where entry is being removed
  if (k == 0) {
    // Remove from head by shifting head forward one
    head = (head + 1) % entries.NEntries();
  }
  else if (k < (nentries-1)) {
    // Remove from middle by shifting all subsequent entries back one
    Shift(k+1, 0, -1);
  }

  // Decrement number of entries
  nentries--;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0xe7108
movl 0x10(%rbx), %eax
decl %eax
cmpl %esi, %eax
jle 0xe7114
incl %esi
movq %rbx, %rdi
xorl %edx, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0xe7028
jmp 0xe7114
movl 0x14(%rbx), %eax
incl %eax
cltd
idivl 0xc(%rbx)
movl %edx, 0x14(%rbx)
decl 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RNBasics/RNQueue.cpp
// Function: gaps::RNVQueue::Reverse(int, int)
void RNVQueue::
Reverse(int start, int length)
{
  /* Compute number of entries to reverse */
  int nreverse = nentries - start;
  if (nreverse <= 0) return;
  if ((length > 0) && (length < nreverse)) nreverse = length;
  if (nreverse <= 0) return;

  // Reverse length at start
  int i, j;
  for (i = start, j = start + nreverse - 1; i < j; i++, j--) {
    RNSwap(KthEntry(i), KthEntry(j), NULL, sizeof(void *));
  }
}

// Assembly:
movl 0x10(%rdi), %eax
subl %esi, %eax
jle 0xe71d3
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
cmpl %edx, %eax
movl %edx, %ecx
cmovll %eax, %ecx
testl %edx, %edx
cmovlel %eax, %ecx
leal (%rcx,%rbx), %ebp
decl %ebp
cmpl %esi, %ebp
jle 0xe71cf
movq %rdi, %r14
movl 0x14(%r14), %ecx
leal (%rbx,%rcx), %eax
movl 0x8(%r14), %esi
cltd
idivl %esi
movq (%r14), %r8
movslq %edx, %rax
leaq (%r8,%rax,8), %rdi
addl %ebp, %ecx
movl %ecx, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq (%r8,%rax,8), %rsi
xorl %edx, %edx
movl $0x8, %ecx
callq 0xe9e03
incl %ebx
decl %ebp
cmpl %ebp, %ebx
jl 0xe7195
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/scn2cam/scn2cam.cpp
// Function: IsObject(gaps::R3SceneNode*)
static RNBoolean
IsObject(R3SceneNode *node)
{
  // Check name
  if (!node->Name()) return 0;

  // Check category identifier
  if (input_categories_filename) {
    // Check if object with category
    if (strncmp(node->Name(), "Model#", 6)) return 0;
    
    // Get category identifier
    R3SceneNode *ancestor = node;
    const char *category_identifier = NULL;
    while (!category_identifier && ancestor) {
      category_identifier = node->Info("empty_struct_obj");
      ancestor = ancestor->Parent();
    }

    // Check category identifier
    if (category_identifier) {
      if (strcmp(category_identifier, "2")) return 0;
    }
  }

  // Passed all tests
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq 0x1a0(%rdi), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x2b66a
cmpq $0x0, 0x1382c7(%rip)    # 0x163870
je 0x2b665
leaq 0xc9080(%rip), %rsi     # 0xf4636
movl $0x6, %edx
callq 0x223b0
testl %eax, %eax
jne 0x2b66a
testq %r14, %r14
je 0x2b647
leaq 0x18(%rsp), %rbp
leaq 0xc9074(%rip), %r15     # 0xf464d
leaq 0x8(%rsp), %r12
movq %r14, %rbx
movq %rbp, 0x8(%rsp)
movq %r12, %rdi
leaq 0xc904d(%rip), %rsi     # 0xf463d
movq %r15, %rdx
callq 0x2ce5a
movq 0x50(%r14), %rdi
movq %r12, %rsi
callq 0x2ca92
movq 0x50(%r14), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
je 0x2b617
movq 0x40(%rax), %r13
jmp 0x2b61a
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2b631
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x228b0
movq 0x10(%rbx), %rbx
testq %r13, %r13
sete %al
testq %rbx, %rbx
je 0x2b64c
testq %r13, %r13
je 0x2b5e1
jmp 0x2b64c
movb $0x1, %al
xorl %r13d, %r13d
testb %al, %al
jne 0x2b665
leaq 0xd13b9(%rip), %rsi     # 0xfca10
movq %r13, %rdi
callq 0x22ce0
xorl %ebp, %ebp
testl %eax, %eax
jne 0x2b66a
movl $0x1, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2b695
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x228b0
movq %rbx, %rdi
callq 0x230a0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/scn2cam/scn2cam.cpp
// Function: DrawNodeWithOpenGL(gaps::R3Scene*, gaps::R3SceneNode*, gaps::R3SceneNode*, int)
static void 
DrawNodeWithOpenGL(R3Scene *scene, R3SceneNode *node, R3SceneNode *selected_node, int image_type)
{
  // Set color based on node index
  RNFlags draw_flags = R3_DEFAULT_DRAW_FLAGS;
  if (image_type == NODE_INDEX_IMAGE) {
    draw_flags = R3_SURFACES_DRAW_FLAG;
    unsigned int node_index = node->SceneIndex() + 1;
    unsigned char color[4];
    color[0] = (node_index >> 16) & 0xFF;
    color[1] = (node_index >>  8) & 0xFF;
    color[2] = (node_index      ) & 0xFF;
    RNLoadRgb(color);
  }
  
  // Draw elements
  if (!selected_node || (selected_node == node)) {
    for (int i = 0; i < node->NElements(); i++) {
      R3SceneElement *element = node->Element(i);
      element->Draw(draw_flags);
    }
  }

  // Draw references 
  if (!selected_node || (selected_node == node)) {
    for (int i = 0; i < node->NReferences(); i++) {
      R3SceneReference *reference = node->Reference(i);
      reference->Draw(draw_flags);
    }
  }

  // Draw children
  for (int i = 0; i < node->NChildren(); i++) {
    R3SceneNode *child = node->Child(i);
    DrawNodeWithOpenGL(scene, child, selected_node, image_type);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
incl %eax
movl %eax, %ecx
shrl $0x10, %ecx
leaq 0x4(%rsp), %rdi
movb %cl, (%rdi)
movb %ah, 0x5(%rsp)
movb %al, 0x2(%rdi)
callq 0x22b80
cmpl $0x0, 0x3c(%rbx)
jle 0x2bc0d
xorl %r14d, %r14d
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x43a3a
incq %r14
movslq 0x3c(%rbx), %rax
cmpq %rax, %r14
jl 0x2bbed
cmpl $0x0, 0x4c(%rbx)
jle 0x2bc36
xorl %r14d, %r14d
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x43ec6
incq %r14
movslq 0x4c(%rbx), %rax
cmpq %rax, %r14
jl 0x2bc16
cmpl $0x0, 0x2c(%rbx)
jle 0x2bc58
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2bbc0
incq %r14
movslq 0x2c(%rbx), %rax
cmpq %rax, %r14
jl 0x2bc3f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/scn2cam/scn2cam.cpp
// Function: IsDifferentCameraOrientation(Camera*, Camera*, void*)
static int
IsDifferentCameraOrientation(Camera *camera1, Camera *camera2, void *data)
{
  // Check towards angle
  R3Vector towards1 = camera1->Towards();  
  R3Vector towards2 = camera2->Towards();
  if (R3InteriorAngle(towards1, towards2) > angle_sampling) return 1;

  // Check up angle
  R3Vector up1 = camera1->Up();  
  R3Vector up2 = camera2->Up();
  if (R3InteriorAngle(up1, up2) > angle_sampling) return 1;

  // Cameras overlap
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x48(%rdi), %rsi
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x7f77c
leaq 0x48(%rbx), %rsi
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x7f77c
movq %r15, %rdi
movq %r12, %rsi
callq 0x56e4b
movl $0x1, %eax
ucomisd 0x137c0f(%rip), %xmm0   # 0x1638c8
ja 0x2bcfb
addq $0x30, %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x7eaf6
addq $0x30, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7eaf6
movq %r15, %rdi
movq %r14, %rsi
callq 0x56e4b
xorl %eax, %eax
ucomisd 0x137bd0(%rip), %xmm0   # 0x1638c8
seta %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/scn2cam/scn2cam.cpp
// Function: IsRoom(gaps::R3SceneNode*)
static RNBoolean
IsRoom(R3SceneNode *node)
{
  // Check if labeled
  if (input_categories_filename) {
    // Check if node is labeled as a room
    if (!node->Name()) return 0;
    if (strncmp(node->Name(), "Room#", 5)) return 0;
  }
  else {
    // If no "rooms", then include only root node
    if (node->Parent()) return 0;
  }

  // Passed all tests
  return 1;
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x137b60(%rip)    # 0x163870
je 0x2bd3e
movq 0x1a0(%rdi), %rdi
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x2bd3a
leaq 0xc89c8(%rip), %rsi     # 0xf46ef
movl $0x5, %edx
callq 0x223b0
testl %eax, %eax
jne 0x2bd3a
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rdi)
jne 0x2bd3a
jmp 0x2bd35
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/scn2cam/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<Camera*>::FindAny(Camera*, double, double, int (*)(Camera*, Camera*, void*), void*) const
PtrType R3Kdtree<PtrType>::
FindAny(PtrType query_point, 
  RNScalar min_distance, RNScalar max_distance, 
  int (*IsCompatible)(PtrType, PtrType, void *), void *compatible_data) const
{
  // Check root
  if (!root) return NULL;

  // Use squared distances for efficiency
  if (max_distance < 0) return NULL;
  if (min_distance < 0) min_distance = 0;
  RNLength min_distance_squared = min_distance * min_distance;
  RNLength max_distance_squared = max_distance * max_distance;

  // Search nodes recursively
  return FindAny(root, bbox, 
    query_point, Position(query_point),
    min_distance_squared, max_distance_squared, 
    IsCompatible, compatible_data);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq 0x50(%rdi), %r12
testq %r12, %r12
sete %al
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
seta %cl
orb %al, %cl
je 0x2cf84
xorl %eax, %eax
jmp 0x2cfdf
movq %rdx, %rbx
movq %rdi, %r15
movq %rsi, %r13
maxsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
movsd %xmm2, 0x10(%rsp)
mulsd %xmm1, %xmm1
movsd %xmm1, 0x18(%rsp)
leaq 0x20(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2d55c
movq %r14, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
movq %rbp, %r8
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movq %rbx, %r9
callq 0x2d0a6
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::~R3PointSet()
R3PointSet::
~R3PointSet(void)
{
  // Delete OpenGL buffers
  if (vbo_position_buffer > 0) glDeleteBuffers(1, &vbo_position_buffer);
  if (vbo_normal_buffer > 0) glDeleteBuffers(1, &vbo_normal_buffer);
  if (vbo_rgb_color_buffer > 0) glDeleteBuffers(1, &vbo_rgb_color_buffer);
  if (vbo_pick_color_buffer > 0) glDeleteBuffers(1, &vbo_pick_color_buffer);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x108(%rdi)
je 0x7fab9
leaq 0x108(%rbx), %rsi
movq 0xde516(%rip), %rax     # 0x15dfc8
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x10c(%rbx)
je 0x7fad7
leaq 0x10c(%rbx), %rsi
movq 0xde4f8(%rip), %rax     # 0x15dfc8
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x110(%rbx)
je 0x7faf5
leaq 0x110(%rbx), %rsi
movq 0xde4da(%rip), %rax     # 0x15dfc8
movl $0x1, %edi
callq *(%rax)
cmpl $0x0, 0x114(%rbx)
je 0x7fb13
leaq 0x114(%rbx), %rsi
movq 0xde4bc(%rip), %rax     # 0x15dfc8
movl $0x1, %edi
callq *(%rax)
leaq 0x118(%rbx), %rdi
callq 0x766d8
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x7fb3a
movq 0x100(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x7fb55
movq 0xe8(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x7fb70
movq 0xd0(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq 0xa8(%rbx), %rdi
testq %rdi, %rdi
je 0x7fb8b
movq 0xb8(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x7fba6
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
je 0x7fbbe
movq 0x88(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movl $0x70, %r14d
movq -0x10(%rbx,%r14), %rdi
testq %rdi, %rdi
je 0x7fbda
movq (%rbx,%r14), %rsi
subq %rdi, %rsi
callq 0x228b0
addq $-0x18, %r14
cmpq $0x40, %r14
jne 0x7fbc4
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x7fbf9
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x7fc0e
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
callq 0x228b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x7fc29
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x228b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x2cdbf
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::Centroid() const
R3Point R3PointSet::
Centroid(void) const
{
  // Check if no points
  if (positions.size() == 0) return R3zero_point;

  // Return centroid of point set
  R3Point centroid = R3zero_point;
  for (unsigned int i = 0; i < positions.size(); i++) 
    centroid += positions[i];
  centroid /= positions.size();
  return centroid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movq (%rsi), %r12
leaq 0xed04a(%rip), %rsi     # 0x16cca0
callq 0x7e05e
cmpq %r12, %r15
je 0x7fcdb
movq (%r14), %rax
movq 0x8(%r14), %rcx
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
subq %rax, %rcx
je 0x7fcaa
movl $0x1, %ebp
xorl %edx, %edx
leaq (%rdx,%rdx,2), %rcx
leaq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x7e98e
movl %ebp, %edx
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r15, %rcx
incl %ebp
cmpq %rdx, %rcx
ja 0x7fc7d
jmp 0x7fcb2
sarq $0x3, %rcx
imulq %r15, %rcx
movq %rcx, %xmm1
punpckldq 0x776e1(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x776e9(%rip), %xmm1    # 0xf73b0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %rbx, %rdi
callq 0x7ea0c
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::RemovePoint(int)
void R3PointSet::
RemovePoint(int index)
{
  // Remove point at given index
  if (index < (int) positions.size()) positions.erase(positions.begin()+index);
  if (index < (int) normals.size()) normals.erase(normals.begin()+index);
  if (index < (int) colors.size()) colors.erase(colors.begin()+index);
  if (index < (int) timestamps.size()) timestamps.erase(timestamps.begin()+index);
  if (index < (int) category_identifiers.size()) category_identifiers.erase(category_identifiers.begin()+index);
  if (index < (int) instance_identifiers.size()) instance_identifiers.erase(instance_identifiers.begin()+index);
  if (index < (int) weights.size()) values.erase(weights.begin()+index);
  if (index < (int) values.size()) values.erase(values.begin()+index);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
movslq %esi, %r14
cmpl %esi, %ecx
jle 0x7fda0
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x82060
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %ebp, %ecx
jle 0x7fdca
leaq 0x18(%rbx), %rdi
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %rsi
callq 0x820ca
movq 0x78(%rbx), %rax
movq 0x80(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %ebp, %ecx
jle 0x7fdf7
leaq 0x78(%rbx), %rdi
leaq (%r14,%r14,2), %rcx
leaq (%rax,%rcx,8), %rsi
callq 0x82134
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x7fe34
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x7fe2c
leaq (%rax,%r14,8), %rdi
subq %rsi, %rdx
callq 0x22fd0
addq $-0x8, 0x98(%rbx)
movq 0xa8(%rbx), %rax
movq 0xb0(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jle 0x7fe71
leaq (%rax,%r14,4), %rsi
addq $0x4, %rsi
cmpq %rdx, %rsi
je 0x7fe69
leaq (%rax,%r14,4), %rdi
subq %rsi, %rdx
callq 0x22fd0
addq $-0x4, 0xb0(%rbx)
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jle 0x7feae
leaq (%rax,%r14,4), %rsi
addq $0x4, %rsi
cmpq %rdx, %rsi
je 0x7fea6
leaq (%rax,%r14,4), %rdi
subq %rsi, %rdx
callq 0x22fd0
addq $-0x4, 0xc8(%rbx)
movq 0xd8(%rbx), %rax
movq 0xe0(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x7feef
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
movq 0xf8(%rbx), %rdx
cmpq %rdx, %rsi
je 0x7fee7
leaq (%rax,%r14,8), %rdi
subq %rsi, %rdx
callq 0x22fd0
addq $-0x8, 0xf8(%rbx)
movq 0xf0(%rbx), %rax
movq 0xf8(%rbx), %rdx
movq %rdx, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x7ff2c
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x7ff24
leaq (%rax,%r14,8), %rdi
subq %rsi, %rdx
callq 0x22fd0
addq $-0x8, 0xf8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointPosition(int, gaps::R3Point const&)
void R3PointSet::
SetPointPosition(int index, const R3Point& position)
{
  // Set position for point with given index
  while (index >= (int) positions.size())
    positions.push_back(R3zero_point);
  positions[index] = position;
  bbox.Union(position);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %esi, %ecx
jg 0x7ffa3
leaq 0xecd20(%rip), %r15     # 0x16cca0
movq %r14, %rdi
movq %r15, %rsi
callq 0x6ca5a
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %ebp, %ecx
jle 0x7ff80
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
callq 0x7e3bc
addq $0x118, %r14            # imm = 0x118
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x7629e
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointNormal(int, gaps::R3Vector const&)
void R3PointSet::
SetPointNormal(int index, const R3Vector& normal)
{
  // Set normal for point with given index
  while (index >= (int) normals.size())
    normals.push_back(R3zero_vector);
  normals[index] = normal;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq 0x18(%rdi), %rax
movq 0x20(%rdi), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %esi, %ecx
jg 0x8002a
movq %rdi, %r14
leaq 0x18(%rdi), %r15
leaq 0x772ba(%rip), %r12     # 0xf72c0
movq %r15, %rdi
movq %r12, %rsi
callq 0x82008
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %ebp, %ecx
jle 0x80006
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7f292
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointTangent(int, gaps::R3Vector const&)
void R3PointSet::
SetPointTangent(int index, const R3Vector& tangent)
{
  // Set tangent for point with given index
  while (index >= (int) tangents.size())
    tangents.push_back(R3zero_vector);
  tangents[index] = tangent;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq 0x30(%rdi), %rax
movq 0x38(%rdi), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %esi, %ecx
jg 0x8009e
movq %rdi, %r14
leaq 0x30(%rdi), %r15
leaq 0x77246(%rip), %r12     # 0xf72c0
movq %r15, %rdi
movq %r12, %rsi
callq 0x82008
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %ebp, %ecx
jle 0x8007a
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x7f292
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointRadius(int, int, double)
void R3PointSet::
SetPointRadius(int index, int axis, RNLength radius)
{
  // Set radius for point with given index
  while (index >= (int) radii[axis].size())
    radii[axis].push_back(0);
  radii[axis][index] = radius;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movl %esi, %ebx
movslq %edx, %rax
leaq (%rax,%rax,2), %rcx
movq 0x48(%rdi,%rcx,8), %rax
movq 0x50(%rdi,%rcx,8), %rsi
movq %rsi, %rdx
subq %rax, %rdx
shrq $0x3, %rdx
cmpl %ebx, %edx
jg 0x80136
leaq (%rdi,%rcx,8), %r14
addq $0x48, %r14
leaq 0x8(%rsp), %r15
movq $0x0, 0x8(%rsp)
cmpq 0x10(%r14), %rsi
je 0x80116
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%r14)
jmp 0x80121
movq %r14, %rdi
movq %r15, %rdx
callq 0x8238a
movq (%r14), %rax
movq 0x8(%r14), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jle 0x800f6
movslq %ebx, %rcx
movsd (%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointColor(int, gaps::RNRgb const&)
void R3PointSet::
SetPointColor(int index, const RNRgb& color)
{
  // Set color for point with given index
  while (index >= (int) colors.size())
    colors.push_back(RNblack_rgb);
  colors[index] = color;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq 0x78(%rdi), %rax
movq 0x80(%rdi), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %esi, %ecx
jg 0x801ac
movq %rdi, %r14
leaq 0x78(%rdi), %r15
leaq 0xed4fb(%rip), %r12     # 0x16d680
movq %r15, %rdi
movq %r12, %rsi
callq 0x82034
movq 0x78(%r14), %rax
movq 0x80(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xaaaaaaab, %ecx, %ecx # imm = 0xAAAAAAAB
cmpl %ebp, %ecx
jle 0x80185
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9fcd6
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointTimestamp(int, double)
void R3PointSet::
SetPointTimestamp(int index, RNScalar timestamp)
{
  // Set timestamp for point with given index
  while (index >= (int) timestamps.size())
    timestamps.push_back(-1);
  timestamps[index] = timestamp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movl %esi, %ebx
movq 0x90(%rdi), %rax
movq 0x98(%rdi), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x80256
movq %rdi, %r14
leaq 0x90(%rdi), %r15
movabsq $-0x4010000000000000, %r13 # imm = 0xBFF0000000000000
leaq 0x8(%rsp), %r12
movq %r13, 0x8(%rsp)
cmpq 0xa0(%r14), %rsi
je 0x8022f
movq %r13, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x98(%r14)
jmp 0x8023a
movq %r15, %rdi
movq %r12, %rdx
callq 0x8238a
movq 0x90(%r14), %rax
movq 0x98(%r14), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jle 0x80211
movslq %ebx, %rcx
movsd (%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointCategoryIdentifier(int, int)
void R3PointSet::
SetPointCategoryIdentifier(int index, int identifier)
{
  // Set category identifier for point with given index
  while (index >= (int) category_identifiers.size())
    category_identifiers.push_back(-1);
  category_identifiers[index] = identifier;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq 0xa8(%rdi), %rax
movq 0xb0(%rdi), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jg 0x802f8
movq %rdi, %r14
leaq 0xa8(%rdi), %r15
leaq 0xc(%rsp), %r12
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
cmpq 0xb8(%r14), %rsi
je 0x802d1
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
addq $0x4, %rsi
movq %rsi, 0xb0(%r14)
jmp 0x802dc
movq %r15, %rdi
movq %r12, %rdx
callq 0x826b6
movq 0xa8(%r14), %rax
movq 0xb0(%r14), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jle 0x802ad
movslq %ebp, %rcx
movl %ebx, (%rax,%rcx,4)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointInstanceIdentifier(int, int)
void R3PointSet::
SetPointInstanceIdentifier(int index, int identifier)
{
  // Set instance identifier for point with given index
  while (index >= (int) instance_identifiers.size())
    instance_identifiers.push_back(-1);
  instance_identifiers[index] = identifier;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq 0xc0(%rdi), %rax
movq 0xc8(%rdi), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jg 0x80392
movq %rdi, %r14
leaq 0xc0(%rdi), %r15
leaq 0xc(%rsp), %r12
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
cmpq 0xd0(%r14), %rsi
je 0x8036b
movl $0xffffffff, (%rsi)     # imm = 0xFFFFFFFF
addq $0x4, %rsi
movq %rsi, 0xc8(%r14)
jmp 0x80376
movq %r15, %rdi
movq %r12, %rdx
callq 0x826b6
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jle 0x80347
movslq %ebp, %rcx
movl %ebx, (%rax,%rcx,4)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointWeight(int, double)
void R3PointSet::
SetPointWeight(int index, RNScalar weight)
{
  // Set weight for point with given index
  while (index >= (int) weights.size())
    weights.push_back(0);
  weights[index] = weight;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebx
movq 0xd8(%rdi), %rax
movq 0xe0(%rdi), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x80431
movq %rdi, %r14
leaq 0xd8(%rdi), %r15
leaq 0x10(%rsp), %r12
movq $0x0, 0x10(%rsp)
cmpq 0xe8(%r14), %rsi
je 0x8040a
movq $0x0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xe0(%r14)
jmp 0x80415
movq %r15, %rdi
movq %r12, %rdx
callq 0x8238a
movq 0xd8(%r14), %rax
movq 0xe0(%r14), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jle 0x803e4
movslq %ebx, %rcx
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::SetPointValue(int, double)
void R3PointSet::
SetPointValue(int index, RNScalar value)
{
  // Set value for point with given index
  while (index >= (int) values.size())
    values.push_back(-1);
  values[index] = value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movl %esi, %ebx
movq 0xf0(%rdi), %rax
movq 0xf8(%rdi), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x804da
movq %rdi, %r14
leaq 0xf0(%rdi), %r15
movabsq $-0x4010000000000000, %r13 # imm = 0xBFF0000000000000
leaq 0x8(%rsp), %r12
movq %r13, 0x8(%rsp)
cmpq 0x100(%r14), %rsi
je 0x804b3
movq %r13, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xf8(%r14)
jmp 0x804be
movq %r15, %rdi
movq %r12, %rdx
callq 0x8238a
movq 0xf0(%r14), %rax
movq 0xf8(%r14), %rsi
movq %rsi, %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jle 0x80495
movslq %ebx, %rcx
movsd (%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop