LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %r13d, %r13d
movslq 0x6c(%r14), %rax
cmpq %rax, %r13
jge 0x31bbd
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 0x31bb8
movq (%r12), %rax
movq %r12, %rdi
movq %rbx, %rsi
callq *0x50(%rax)
incq %r13
jmp 0x31b89
xorl %r12d, %r12d
movslq 0x2c(%r14), %rax
cmpq %rax, %r12
jge 0x31be5
movq 0x20(%r14), %rax
movq (%rax,%r12,8), %rsi
movq (%r15), %rax
movq %r15, %rdi
movq %rbx, %rdx
callq *0x360(%rax)
incq %r12
jmp 0x31bc0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x328cc
movq 0x17464a(%rip), %r14    # 0x1a6ee8
movl 0x60c(%rbx), %esi
callq *(%r14)
movl 0x608(%rbx), %edi
movl 0x610(%rbx), %esi
callq *(%r14)
movq 0x174633(%rip), %rax    # 0x1a6ef0
movl 0x608(%rbx), %edi
callq *(%rax)
andl $0x0, 0x608(%rbx)
movl 0x60c(%rbx), %edi
testl %edi, %edi
je 0x328e6
movq 0x1746bb(%rip), %rax    # 0x1a6f98
callq *(%rax)
andl $0x0, 0x60c(%rbx)
movl 0x610(%rbx), %edi
testl %edi, %edi
je 0x32900
movq 0x1746a1(%rip), %rax    # 0x1a6f98
callq *(%rax)
andl $0x0, 0x610(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movl 0x14(%rdi), %r8d
movl 0x8(%rdi), %r10d
movq (%rdi), %rdi
xorl %ecx, %ecx
testl %r9d, %r9d
cmovlel %ecx, %r9d
subl $0x1, %r9d
jb 0xd0ac7
movl %r8d, %eax
cltd
idivl %r10d
movslq %edx, %rax
incl %r8d
cmpq %rsi, (%rdi,%rax,8)
jne 0xd0aaa
leaq (%rdi,%rax,8), %rcx
movq %rcx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd0b36
movl 0x10(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x10(%r14)
testl %ebp, %ebp
je 0xd0b06
cmpl %ebp, %eax
jle 0xd0b19
pushq $0x1
popq %rcx
movq %r14, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xd0bc4
jmp 0xd0b19
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_O2/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 %r14
pushq %rbx
movl %ecx, %r9d
negl %r9d
cmpl %esi, %r9d
cmovlel %esi, %r9d
xorl %r8d, %r8d
testl %ecx, %ecx
movl %esi, %r10d
cmovsl %r9d, %r10d
cmovgl %ecx, %r8d
movl 0x10(%rdi), %eax
addl %r10d, %r8d
subl %r8d, %eax
testl %eax, %eax
jle 0xd0c82
cmpl %edx, %eax
movl %edx, %r8d
cmovbl %eax, %r8d
testl %edx, %edx
cmovlel %eax, %r8d
testl %ecx, %ecx
js 0xd0c4b
jle 0xd0c82
addl %esi, %r8d
movl 0x8(%rdi), %esi
movl 0x14(%rdi), %r9d
addl %r9d, %ecx
decl %ecx
decl %r9d
cmpl %r10d, %r8d
jle 0xd0c82
leal -0x1(%r8), %r11d
leal (%r9,%r8), %eax
cltd
idivl %esi
movq (%rdi), %rbx
movslq %edx, %rax
movq (%rbx,%rax,8), %r14
addl %ecx, %r8d
movl %r8d, %eax
cltd
idivl %esi
movslq %edx, %rax
movq %r14, (%rbx,%rax,8)
movl %r11d, %r8d
jmp 0xd0c1c
addl %r9d, %r8d
movl 0x8(%rdi), %r10d
movl 0x14(%rdi), %esi
addl %r9d, %esi
cmpl %r8d, %r9d
jge 0xd0c82
movl %esi, %eax
cltd
idivl %r10d
movq (%rdi), %r11
movslq %edx, %rax
movq (%r11,%rax,8), %rbx
leal (%rcx,%rsi), %eax
cltd
idivl %r10d
movslq %edx, %rax
movq %rbx, (%r11,%rax,8)
incl %r9d
incl %esi
jmp 0xd0c58
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd0ca8
movl 0x10(%rbx), %eax
decl %eax
cmpl %esi, %eax
jle 0xd0cb4
incl %esi
pushq $-0x1
popq %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xd0bc4
jmp 0xd0cb4
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_O2/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 0xd0d6b
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl %edx, %eax
movl %edx, %ecx
cmovbl %eax, %ecx
testl %edx, %edx
cmovlel %eax, %ecx
leal (%rcx,%rbx), %r15d
decl %r15d
pushq $0x8
popq %rbp
cmpl %r15d, %ebx
jge 0xd0d61
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 %r15d, %ecx
movl %ecx, %eax
cltd
idivl %esi
movslq %edx, %rax
leaq (%r8,%rax,8), %rsi
xorl %edx, %edx
movl %ebp, %ecx
callq 0xd31a1
incl %ebx
decl %r15d
jmp 0xd0d25
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdi, %rbx
movq 0x1a0(%rdi), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0x2a20b
pushq $0x1
popq %r15
cmpq $0x0, 0x1266c7(%rip)    # 0x150880
je 0x2a208
leaq 0xb0471(%rip), %rsi     # 0xda633
pushq $0x6
popq %rdx
callq 0x223c0
testl %eax, %eax
jne 0x2a20b
xorl %eax, %eax
leaq 0xb0463(%rip), %r14     # 0xda63a
movq %rbx, %r12
testq %r12, %r12
je 0x2a1f6
testq %rax, %rax
jne 0x2a1f6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b35a
movq 0x10(%r12), %r12
jmp 0x2a1da
testq %rax, %rax
je 0x2a208
xorl %ebp, %ebp
cmpb $0x32, (%rax)
jne 0x2a20b
cmpb $0x0, 0x1(%rax)
jne 0x2a20b
movl %r15d, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %eax
incl %eax
movl %eax, %ecx
shrl $0x10, %ecx
leaq 0xc(%rsp), %rdi
movb %cl, (%rdi)
movb %ah, 0xd(%rsp)
movb %al, 0x2(%rdi)
callq 0x22b70
xorl %r15d, %r15d
pushq $0x2
popq %r14
movslq 0x3c(%rbx), %rax
cmpq %rax, %r15
jge 0x2a74d
movq 0x30(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3ed36
incq %r15
jmp 0x2a72d
xorl %r15d, %r15d
pushq $0x2
popq %r14
movslq 0x4c(%rbx), %rax
cmpq %rax, %r15
jge 0x2a774
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3f0d4
incq %r15
jmp 0x2a754
xorl %r14d, %r14d
movslq 0x2c(%rbx), %rax
cmpq %rax, %r14
jge 0x2a792
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x2a6fd
incq %r14
jmp 0x2a777
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x73b86
leaq 0x48(%rbx), %rsi
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x73b86
movq %r15, %rdi
movq %r12, %rsi
callq 0x4f6d7
ucomisd 0x1260e8(%rip), %xmm0   # 0x1508d8
jbe 0x2a7f7
pushq $0x1
popq %rax
jmp 0x2a837
addq $0x30, %r14
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x73230
addq $0x30, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x73230
movq %r15, %rdi
movq %r14, %rsi
callq 0x4f6d7
xorl %eax, %eax
ucomisd 0x1260a4(%rip), %xmm0   # 0x1508d8
seta %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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, 0x126034(%rip)    # 0x150880
je 0x2a876
movq 0x1a0(%rdi), %rdi
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x2a872
leaq 0xafe89(%rip), %rsi     # 0xda6ec
pushq $0x5
popq %rdx
callq 0x223c0
testl %eax, %eax
jne 0x2a872
pushq $0x1
popq %rbx
movl %ebx, %eax
popq %rbx
retq
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rdi)
jne 0x2a872
jmp 0x2a86f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2b77a
xorl %eax, %eax
jmp 0x2b7d5
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 0x2bcf8
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 0x2b8a2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x73e05
leaq 0x108(%rbx), %rsi
movq 0xd71d0(%rip), %rax     # 0x14afd0
pushq $0x1
popq %rdi
callq *(%rax)
cmpl $0x0, 0x10c(%rbx)
je 0x73e21
leaq 0x10c(%rbx), %rsi
movq 0xd71b4(%rip), %rax     # 0x14afd0
pushq $0x1
popq %rdi
callq *(%rax)
cmpl $0x0, 0x110(%rbx)
je 0x73e3d
leaq 0x110(%rbx), %rsi
movq 0xd7198(%rip), %rax     # 0x14afd0
pushq $0x1
popq %rdi
callq *(%rax)
cmpl $0x0, 0x114(%rbx)
je 0x73e59
leaq 0x114(%rbx), %rsi
movq 0xd717c(%rip), %rax     # 0x14afd0
pushq $0x1
popq %rdi
callq *(%rax)
leaq 0x118(%rbx), %rdi
callq 0x6bbbe
leaq 0xf0(%rbx), %rdi
callq 0x75cce
leaq 0xd8(%rbx), %rdi
callq 0x75cce
leaq 0xc0(%rbx), %rdi
callq 0x6450c
leaq 0xa8(%rbx), %rdi
callq 0x6450c
leaq 0x90(%rbx), %rdi
callq 0x75cce
leaq 0x78(%rbx), %rdi
callq 0x75d3e
pushq $0x60
popq %r14
leaq (%rbx,%r14), %rdi
callq 0x75cce
addq $-0x18, %r14
cmpq $0x30, %r14
jne 0x73eae
leaq 0x30(%rbx), %rdi
callq 0x75d02
leaq 0x18(%rbx), %rdi
callq 0x75d02
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x630a8
movq %rax, %rdi
callq 0x2b638
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r15
movq (%rsi), %r12
leaq 0xe5daa(%rip), %rsi     # 0x159cb0
callq 0x72a70
cmpq %r12, %r15
je 0x73f50
xorl %eax, %eax
pushq $0x18
popq %r15
movl %eax, %r12d
movq (%r14), %rsi
movq 0x8(%r14), %rax
subq %rsi, %rax
cqto
idivq %r15
cmpq %r12, %rax
jbe 0x73f43
imulq $0x18, %r12, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x730ca
leal 0x1(%r12), %eax
jmp 0x73f16
cvtsi2sd %rax, %xmm0
movq %rbx, %rdi
callq 0x73148
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::FindPointIndex(gaps::R3Point const&, double) const
int R3PointSet::
FindPointIndex(const R3Point& point, double tolerance) const
{
  // Return first point within tolerance
  double squared_tolerance = tolerance * tolerance;
  for (unsigned int i = 0; i < positions.size(); i++) {
    if (R3SquaredDistance(positions[i], point) <= squared_tolerance) {
      return i;
    }
  }

  // No point found
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
mulsd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorl %ebp, %ebp
pushq $0x18
popq %r12
pushq $-0x1
popq %rbx
movl %ebp, %ecx
movq (%r15), %rdi
movq 0x8(%r15), %rax
subq %rdi, %rax
cqto
idivq %r12
cmpq %rcx, %rax
jbe 0x73fbc
imulq $0x18, %rcx, %rax
addq %rax, %rdi
movq %r14, %rsi
callq 0x4d369
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jae 0x73fba
incl %ebp
jmp 0x73f85
movl %ebp, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
subq %rsi, %rax
pushq $0x18
popq %r15
cqto
idivq %r15
movslq %ebp, %r14
cmpl %ebp, %eax
jle 0x74001
imulq $0x18, %r14, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x75bf0
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rax
subq %rsi, %rax
cqto
idivq %r15
cmpl %ebp, %eax
jle 0x74025
leaq 0x18(%rbx), %rdi
imulq $0x18, %r14, %rax
addq %rax, %rsi
callq 0x75bf6
movq 0x78(%rbx), %rsi
movq 0x80(%rbx), %rax
subq %rsi, %rax
cqto
idivq %r15
cmpl %ebp, %eax
jle 0x7404c
leaq 0x78(%rbx), %rdi
imulq $0x18, %r14, %rax
addq %rax, %rsi
callq 0x75bfc
movq 0x90(%rbx), %rax
movq 0x98(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x74075
leaq 0x90(%rbx), %rdi
leaq (%rax,%r14,8), %rsi
callq 0x75c02
movq 0xa8(%rbx), %rax
movq 0xb0(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jle 0x7409e
leaq 0xa8(%rbx), %rdi
leaq (%rax,%r14,4), %rsi
callq 0x75c3c
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jle 0x740c7
leaq 0xc0(%rbx), %rdi
leaq (%rax,%r14,4), %rsi
callq 0x75c3c
movq 0xd8(%rbx), %rax
movq 0xe0(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x740f0
leaq 0xf0(%rbx), %rdi
leaq (%rax,%r14,8), %rsi
callq 0x75c02
movq 0xf0(%rbx), %rax
movq 0xf8(%rbx), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebp, %ecx
jle 0x74126
addq $0xf0, %rbx
leaq (%rax,%r14,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x75c02
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
pushq $0x18
popq %r12
leaq 0xe5b3f(%rip), %r15     # 0x159cb0
movq (%r14), %rdi
movq 0x8(%r14), %rax
subq %rdi, %rax
cqto
idivq %r12
cmpl %ebp, %eax
jg 0x74191
movq %r14, %rdi
movq %r15, %rsi
callq 0x62e86
jmp 0x74171
movslq %ebp, %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq %rbx, %rsi
callq 0x72d4a
addq $0x118, %r14            # imm = 0x118
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6b86c
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x18(%rdi), %r15
pushq $0x18
popq %r13
leaq 0x69070(%rip), %r12     # 0xdd250
movq 0x18(%r14), %rdi
movq 0x20(%r14), %rax
subq %rdi, %rax
cqto
idivq %r13
cmpl %ebp, %eax
jg 0x74201
movq %r15, %rdi
movq %r12, %rsi
callq 0x75c76
jmp 0x741e0
movslq %ebp, %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73790
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x30(%rdi), %r15
pushq $0x18
popq %r13
leaq 0x6900c(%rip), %r12     # 0xdd250
movq 0x30(%r14), %rdi
movq 0x38(%r14), %rax
subq %rdi, %rax
cqto
idivq %r13
cmpl %ebp, %eax
jg 0x74265
movq %r15, %rdi
movq %r12, %rsi
callq 0x75c76
jmp 0x74244
movslq %ebp, %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x73790
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
imulq $0x18, %rax, %rax
leaq (%rdi,%rax), %r14
addq $0x48, %r14
leaq 0x8(%rsp), %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x742cf
andq $0x0, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x760da
jmp 0x742aa
movslq %ebx, %rcx
movsd (%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x78(%rdi), %r15
pushq $0x18
popq %r13
leaq 0xe6388(%rip), %r12     # 0x15a690
movq 0x78(%r14), %rdi
movq 0x80(%r14), %rax
subq %rdi, %rax
cqto
idivq %r13
cmpl %ebp, %eax
jg 0x7432c
movq %r15, %rdi
movq %r12, %rsi
callq 0x75ca2
jmp 0x74308
movslq %ebp, %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9164e
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %r14
leaq 0x90(%rdi), %r15
movabsq $-0x4010000000000000, %r13 # imm = 0xBFF0000000000000
leaq 0x8(%rsp), %r12
movq 0x90(%r14), %rax
movq 0x98(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x743a4
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x760da
jmp 0x74379
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_O2/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 %rdi, %r14
leaq 0xa8(%rdi), %r15
leaq 0xc(%rsp), %r12
movq 0xa8(%r14), %rax
movq 0xb0(%r14), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jg 0x7440a
orl $-0x1, 0xc(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x76438
jmp 0x743df
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_O2/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 %rdi, %r14
leaq 0xc0(%rdi), %r15
leaq 0xc(%rsp), %r12
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ebp, %ecx
jg 0x74468
orl $-0x1, 0xc(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x76438
jmp 0x7443d
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_O2/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 %rdi, %r14
leaq 0xd8(%rdi), %r15
leaq 0x10(%rsp), %r12
movq 0xd8(%r14), %rax
movq 0xe0(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x744ca
andq $0x0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x760da
jmp 0x7449e
movslq %ebx, %rcx
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %r14
leaq 0xf0(%rdi), %r15
movabsq $-0x4010000000000000, %r13 # imm = 0xBFF0000000000000
leaq 0x8(%rsp), %r12
movq 0xf0(%r14), %rax
movq 0xf8(%r14), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
cmpl %ebx, %ecx
jg 0x7453c
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x760da
jmp 0x74511
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_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadFile(char const*)
int R3PointSet::
ReadFile(const char *filename)
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .mm)\n", filename);
    return 0;
  }

  // Read file of appropriate type
  if (!strcmp(extension, ".xyz")) return ReadXYZFile(filename);
  else if (!strcmp(extension, ".xyzn")) return ReadXYZNFile(filename);
  else if (!strcmp(extension, ".pset")) return ReadBinaryFile(filename);
  else if (!strcmp(extension, ".pts")) return ReadPTSFile(filename);
  else if (!strcmp(extension, ".sdf")) return ReadSDFFile(filename);
  else if (!strcmp(extension, ".vts")) return ReadVTSFile(filename);
  else return ReadMeshFile(filename);

  // Should not get here
  RNFail("Unrecognized file extension in %s\n", filename);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x2e
popq %rsi
movq %rbx, %rdi
callq 0x22990
testq %rax, %rax
je 0x74d48
movq %rax, %r15
leaq 0x68691(%rip), %rsi     # 0xdd352
movq %rax, %rdi
callq 0x22d00
testl %eax, %eax
je 0x74d61
leaq 0x6867f(%rip), %rsi     # 0xdd357
movq %r15, %rdi
callq 0x22d00
testl %eax, %eax
je 0x74d71
leaq 0x6866e(%rip), %rsi     # 0xdd35d
movq %r15, %rdi
callq 0x22d00
testl %eax, %eax
je 0x74d81
leaq 0x6865d(%rip), %rsi     # 0xdd363
movq %r15, %rdi
callq 0x22d00
testl %eax, %eax
je 0x74d91
leaq 0x6864f(%rip), %rsi     # 0xdd368
movq %r15, %rdi
callq 0x22d00
testl %eax, %eax
je 0x74da1
leaq 0x68641(%rip), %rsi     # 0xdd36d
movq %r15, %rdi
callq 0x22d00
movq %r14, %rdi
movq %rbx, %rsi
testl %eax, %eax
je 0x74db1
popq %rbx
popq %r14
popq %r15
jmp 0x7535a
leaq 0x685d9(%rip), %rdi     # 0xdd328
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22080
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x74dbc
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x74e72
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x74f76
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x75110
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x751ee
popq %rbx
popq %r14
popq %r15
jmp 0x752a2
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadXYZFile(char const*)
int R3PointSet::
ReadXYZFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open %s\n", filename);
    return 0;
  }

  // Read points
  double px, py, pz;
  while (fscanf(fp, "%lf%lf%lf", &px, &py, &pz) == (unsigned int) 3) {
    R3Point position(px,py,pz);
    InsertPoint(position);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6ca1c(%rip), %rsi     # 0xe17f3
movq %r15, %rdi
callq 0x22a70
testq %rax, %rax
je 0x74e4e
movq %rax, %r14
leaq 0x18(%rsp), %r12
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
leaq 0x20(%rsp), %r15
movq %r14, %rdi
leaq 0x67a9d(%rip), %rsi     # 0xdc8a2
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x23170
cmpl $0x3, %eax
jne 0x74e41
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %r15, %rdi
callq 0x72a60
movq %rbx, %rdi
movq %r15, %rsi
callq 0x74132
jmp 0x74dfb
movq %r14, %rdi
callq 0x22890
pushq $0x1
popq %rbx
jmp 0x74e61
leaq 0x6851d(%rip), %rdi     # 0xdd372
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadXYZNFile(char const*)
int R3PointSet::
ReadXYZNFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open %s\n", filename);
    return 0;
  }

  // Read points
  double px, py, pz, nx, ny, nz;
  while (fscanf(fp, "%lf%lf%lf%lf%lf%lf", &px, &py, &pz, &nx, &ny, &nz) == (unsigned int) 6) {
    R3Point position(px,py,pz);
    R3Vector normal(nx,ny,nz);
    normal.Normalize();
    int index = InsertPoint(position);
    SetPointNormal(index, normal);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6c966(%rip), %rsi     # 0xe17f3
movq %r15, %rdi
callq 0x22a70
testq %rax, %rax
je 0x74f51
movq %rax, %r14
leaq 0x20(%rsp), %rbp
leaq 0x18(%rsp), %r15
leaq 0x50(%rsp), %r12
leaq 0x38(%rsp), %r13
movq %r14, %rdi
leaq 0x65eeb(%rip), %rsi     # 0xdadaa
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rbp, %r8
movq %r15, %r9
xorl %eax, %eax
leaq 0x8(%rsp), %r10
pushq %r10
leaq 0x18(%rsp), %r10
pushq %r10
callq 0x23170
popq %rcx
popq %rdx
cmpl $0x6, %eax
jne 0x74f44
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
movq %r12, %rdi
callq 0x72a60
movsd 0x18(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movq %r13, %rdi
callq 0x73220
movq %r13, %rdi
callq 0x73522
movq %rbx, %rdi
movq %r12, %rsi
callq 0x74132
movq %rbx, %rdi
movl %eax, %esi
movq %r13, %rdx
callq 0x741be
jmp 0x74eb5
movq %r14, %rdi
callq 0x22890
pushq $0x1
popq %rbx
jmp 0x74f64
leaq 0x6841a(%rip), %rdi     # 0xdd372
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadBinaryFile(char const*)
int R3PointSet::
ReadBinaryFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open %s\n", filename);
    return 0;
  }

  // Read points
  float buf[16];
  while (fread(buf, sizeof(float), 16, fp) == (unsigned int) 16) {
    R3Point position(buf[0], buf[1], buf[2]);
    R3Vector normal(buf[3], buf[4], buf[5]);
    RNRgb color(buf[6], buf[7], buf[8]);
    double timestamp = buf[9];
    int category_identifier = buf[10] + 0.5;
    int instance_identifier = buf[11] + 0.5;
    double value = buf[12];
    normal.Normalize();
    int index = InsertPoint(position);
    SetPointNormal(index, normal);
    SetPointColor(index, color);
    SetPointTimestamp(index, timestamp);
    SetPointCategoryIdentifier(index, category_identifier);
    SetPointInstanceIdentifier(index, instance_identifier);
    SetPointValue(index, value);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x666b6(%rip), %rsi     # 0xdb64a
movq %r15, %rdi
callq 0x22a70
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x750e8
leaq 0x78(%rsp), %r15
leaq 0x20(%rsp), %rdi
pushq $0x4
popq %rsi
pushq $0x10
popq %rdx
movq 0x8(%rsp), %rcx
callq 0x22e30
cmpq $0x10, %rax
jne 0x750d9
cvtss2sd 0x20(%rsp), %xmm0
cvtss2sd 0x24(%rsp), %xmm1
cvtss2sd 0x28(%rsp), %xmm2
leaq 0x90(%rsp), %r12
movq %r12, %rdi
callq 0x72a60
cvtss2sd 0x2c(%rsp), %xmm0
cvtss2sd 0x30(%rsp), %xmm1
cvtss2sd 0x34(%rsp), %xmm2
movq %r15, %rdi
callq 0x73220
cvtss2sd 0x38(%rsp), %xmm0
cvtss2sd 0x3c(%rsp), %xmm1
cvtss2sd 0x40(%rsp), %xmm2
leaq 0x60(%rsp), %r14
movq %r14, %rdi
callq 0x915be
cvtss2sd 0x44(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
cvtss2sd 0x48(%rsp), %xmm0
movsd 0x64fc5(%rip), %xmm1    # 0xda008
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ebp
cvtss2sd 0x4c(%rsp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r13d
cvtss2sd 0x50(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
callq 0x73522
movq %rbx, %rdi
movq %r12, %rsi
callq 0x74132
movl %eax, %r12d
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x741be
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x742e6
movq %rbx, %rdi
movl %r12d, %esi
movsd 0x10(%rsp), %xmm0
callq 0x7434c
movq %rbx, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x743c0
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x7441e
movq %rbx, %rdi
movl %r12d, %esi
movsd 0x18(%rsp), %xmm0
callq 0x744e4
jmp 0x74faf
movq 0x8(%rsp), %rdi
callq 0x22890
pushq $0x1
popq %rbx
jmp 0x750fb
leaq 0x68283(%rip), %rdi     # 0xdd372
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadPTSFile(char const*)
int R3PointSet::
ReadPTSFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open %s\n", filename);
    return 0;
  }

  // Read points
  float buf[6];
  while (fread(buf, sizeof(float), 6, fp) == (unsigned int) 6) {
    R3Point position(buf[0], buf[1], buf[2]);
    R3Vector normal(buf[3], buf[4], buf[5]);
    normal.Normalize();
    int index = InsertPoint(position);
    SetPointNormal(index, normal);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6651f(%rip), %rsi     # 0xdb64a
movq %r15, %rdi
callq 0x22a70
testq %rax, %rax
je 0x751ca
movq %rax, %r14
pushq $0x4
popq %r12
pushq $0x6
popq %r13
leaq 0x30(%rsp), %rbp
leaq 0x18(%rsp), %r15
movq %rsp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x22e30
cmpq $0x6, %rax
jne 0x751bd
cvtss2sd (%rsp), %xmm0
cvtss2sd 0x4(%rsp), %xmm1
cvtss2sd 0x8(%rsp), %xmm2
movq %rbp, %rdi
callq 0x72a60
cvtss2sd 0xc(%rsp), %xmm0
cvtss2sd 0x10(%rsp), %xmm1
cvtss2sd 0x14(%rsp), %xmm2
movq %r15, %rdi
callq 0x73220
movq %r15, %rdi
callq 0x73522
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x74132
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x741be
jmp 0x75151
movq %r14, %rdi
callq 0x22890
pushq $0x1
popq %rbx
jmp 0x751dd
leaq 0x681a1(%rip), %rdi     # 0xdd372
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadSDFFile(char const*)
int R3PointSet::
ReadSDFFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "rb");
  if (!fp) {
    RNFail("Unable to open %s\n", filename);
    return 0;
  }

  // Read points
  float buf[4];
  while (fread(buf, sizeof(float), 4, fp) == (unsigned int) 4) {
    R3Point position(buf[0], buf[1], buf[2]);
    int index = InsertPoint(position);
    SetPointValue(index, buf[3]);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x66442(%rip), %rsi     # 0xdb64a
movq %r15, %rdi
callq 0x22a70
testq %rax, %rax
je 0x7527e
movq %rax, %r14
movq %rsp, %r15
pushq $0x4
popq %r12
leaq 0x18(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x22e30
cmpq $0x4, %rax
jne 0x75271
cvtss2sd (%rsp), %xmm0
cvtss2sd 0x4(%rsp), %xmm1
cvtss2sd 0x8(%rsp), %xmm2
movq %r13, %rdi
callq 0x72a60
movq %rbx, %rdi
movq %r13, %rsi
callq 0x74132
cvtss2sd 0xc(%rsp), %xmm0
movq %rbx, %rdi
movl %eax, %esi
callq 0x744e4
jmp 0x75224
movq %r14, %rdi
callq 0x22890
pushq $0x1
popq %rbx
jmp 0x75291
leaq 0x680ed(%rip), %rdi     # 0xdd372
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadVTSFile(char const*)
int R3PointSet::
ReadVTSFile(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open %s\n", filename);
    return 0;
  }

  // Read points
  int vertex_index;
  double px, py, pz;
  while (fscanf(fp, "%d%lf%lf%lf", &vertex_index, &px, &py, &pz) == (unsigned int) 4) {
    R3Point position(px,py,pz);
    InsertPoint(position);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x6c536(%rip), %rsi     # 0xe17f3
movq %r15, %rdi
callq 0x22a70
testq %rax, %rax
je 0x75336
movq %rax, %r14
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %rsp, %r15
leaq 0x20(%rsp), %r12
movq %r14, %rdi
leaq 0x675b7(%rip), %rsi     # 0xdc8a0
leaq 0x1c(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x23170
cmpl $0x4, %eax
jne 0x75329
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd (%rsp), %xmm2
movq %r12, %rdi
callq 0x72a60
movq %rbx, %rdi
movq %r12, %rsi
callq 0x74132
jmp 0x752df
movq %r14, %rdi
callq 0x22890
pushq $0x1
popq %rbx
jmp 0x75349
leaq 0x68035(%rip), %rdi     # 0xdd372
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3PointSet.cpp
// Function: gaps::R3PointSet::ReadMeshFile(char const*)
int R3PointSet::
ReadMeshFile(const char *filename)
{
  // Read mesh file
  R3Mesh mesh;
  if (!mesh.ReadFile(filename)) {
    RNFail("Unable to read %s\n", filename);
    return 0;
  }

  // Create point for each vertex
  for (int i = 0; i < mesh.NVertices(); i++) {
    R3MeshVertex *vertex = mesh.Vertex(i);
    int index = InsertPoint(mesh.VertexPosition(vertex));
    SetPointNormal(index, mesh.VertexNormal(vertex));
    SetPointColor(index, mesh.VertexColor(vertex));
  }

  // Return success
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x51bb4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5d044
testl %eax, %eax
je 0x753e4
xorl %r13d, %r13d
pushq $0x1
popq %rbx
movq %rsp, %r15
movslq 0x14(%rsp), %rax
cmpq %rax, %r13
jge 0x753f7
movq 0x8(%rsp), %rax
movq (%rax,%r13,8), %r12
leaq 0x18(%r12), %rsi
movq %r14, %rdi
callq 0x74132
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
callq 0x61ff4
movq %r14, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x741be
addq $0x58, %r12
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x742e6
incq %r13
jmp 0x75394
xorl %ebx, %ebx
leaq 0x6627e(%rip), %rdi     # 0xdb66b
movq %r15, %rsi
xorl %eax, %eax
callq 0x93dbe
movq %rsp, %rdi
callq 0x5209c
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x75415
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5209c
movq %rbx, %rdi
callq 0x230b0