LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Mesh.h
// Function: gaps::R3Mesh::EdgeOnFace(gaps::R3MeshFace const*, gaps::R3MeshVertex const*, int) const
inline R3MeshEdge *R3Mesh:: 
EdgeOnFace(const R3MeshFace *f, const R3MeshVertex *v, RNDirection dir) const
{
  // Returns edge on face in dir with respect to vertex
  if (f->vertex[0] == v) {
    if (dir == RN_CCW) return f->edge[0];
    else return f->edge[2];
  }
  else if (f->vertex[1] == v) {
    if (dir == RN_CCW) return f->edge[1];
    else return f->edge[0];
  }
  else if (f->vertex[2] == v) {
    if (dir == RN_CCW) return f->edge[2];
    else return f->edge[1];
  }
  else {
    // Vertex not found
    return NULL;
  }
}

// Assembly:
cmpq %rdx, 0x8(%rsi)
je 0x21513
cmpq %rdx, 0x10(%rsi)
je 0x21523
cmpq %rdx, 0x18(%rsi)
je 0x21534
xorl %eax, %eax
retq
xorl %eax, %eax
testl %ecx, %ecx
setne %al
shll $0x4, %eax
orq $0x20, %rax
jmp 0x21543
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0x20(,%rax,8), %rax
jmp 0x21543
xorl %eax, %eax
testl %ecx, %ecx
sete %al
leaq 0x28(,%rax,8), %rax
movq (%rsi,%rax), %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Push(gaps::R3MeshEdge*)
void RNHeap<PtrType>::
Push(PtrType entry)
{
  // Allocate space for entry
  if (nentries == nallocated) {
    nallocated = (nallocated == 0) ? 1 : 2 * nallocated;
    PtrType *newentries = new PtrType [nallocated];
    for (int i = 0; i < nentries; i++) {
      newentries[i] = entries[i];
      if (entry_offset >= 0) *((PtrType **) ((unsigned char *) newentries[i] + entry_offset)) = &newentries[i];
      if (entry_callback) *((PtrType **) (*entry_callback)(newentries[i], callback_data)) = &newentries[i];
    }
    if (entries) delete [] entries;
    entries = newentries;
  }

  // Put entry into tail
  entries[nentries] = entry;

  // Update entry backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[nentries] + entry_offset)) = &entries[nentries];
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[nentries], callback_data)) = &entries[nentries];

  // Increment number of entries
  nentries++;

  // Bubble tail entry up to its rightful spot
  BubbleUp(nentries-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdi), %r14d
cmpl 0xc(%rdi), %r14d
jne 0x2162b
leal (%r14,%r14), %eax
testl %r14d, %r14d
pushq $0x1
popq %rcx
cmovnel %eax, %ecx
movl %ecx, 0xc(%rbx)
movslq %ecx, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
pushq $-0x1
popq %rdi
cmovnsq %rcx, %rdi
callq 0xe030
movq %rax, %r12
xorl %r13d, %r13d
movq %rax, %rbp
movslq %r14d, %rax
movq (%rbx), %rdi
cmpq %rax, %r13
jge 0x21618
movq (%rdi,%r13,8), %rax
movq %rax, (%rbp)
movslq 0x14(%rbx), %rcx
testq %rcx, %rcx
js 0x215f5
movq %rbp, (%rax,%rcx)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x2160f
movq (%rbp), %rdi
movq 0x28(%rbx), %rsi
callq *%rax
movq %rbp, (%rax)
movl 0x8(%rbx), %r14d
incq %r13
addq $0x8, %rbp
jmp 0x215d5
testq %rdi, %rdi
je 0x21626
callq 0xe5d0
movl 0x8(%rbx), %r14d
movq %r12, (%rbx)
jmp 0x2162e
movq (%rbx), %r12
movslq %r14d, %rax
movq %r15, (%r12,%rax,8)
movslq 0x14(%rbx), %rcx
testq %rcx, %rcx
js 0x2164c
movq (%rbx), %rdx
leaq (%rdx,%rax,8), %rdx
movq (%rdx), %rsi
movq %rdx, (%rsi,%rcx)
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x2166c
movq (%rbx), %rdx
movq 0x28(%rbx), %rsi
leaq (%rdx,%rax,8), %r14
movq (%r14), %rdi
callq *%rcx
movq %r14, (%rax)
movl 0x8(%rbx), %r14d
leal 0x1(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22c26
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Pop()
PtrType RNHeap<PtrType>::
Pop(void)
{
  // Check number of entries	
  if (nentries == 0) return NULL;

  // Get head entry
  PtrType result = entries[0];

  // Update deleted entry backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[0] + entry_offset)) = NULL;
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[0], callback_data)) = NULL;

  // Remove head entry, by copying tail over it
  entries[0] = entries[nentries-1];

  // Update new entry[0] backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[0] + entry_offset)) = &entries[0];
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[0], callback_data)) = &entries[0];

  // Decrement number of entries
  nentries--;

  // Bubble the head entry down to its rightful spot
  BubbleDown(0);

  // Return original head entry
  return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x21721
movq %rdi, %r14
movq (%rdi), %rdx
movq (%rdx), %rbx
movslq 0x14(%rdi), %rcx
testq %rcx, %rcx
js 0x216b6
andq $0x0, (%rbx,%rcx)
movq (%r14), %rdx
movq 0x20(%r14), %r8
testq %r8, %r8
je 0x216d8
movq (%rdx), %rdi
movq 0x28(%r14), %rsi
callq *%r8
andq $0x0, (%rax)
movq (%r14), %rdx
movl 0x8(%r14), %eax
movl 0x14(%r14), %ecx
movslq %eax, %rsi
movq -0x8(%rdx,%rsi,8), %rsi
movq %rsi, (%rdx)
testl %ecx, %ecx
js 0x216f3
movq (%r14), %rdx
movq (%rdx), %rsi
movl %ecx, %ecx
movq %rdx, (%rsi,%rcx)
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0x2170f
movq (%r14), %r15
movq 0x28(%r14), %rsi
movq (%r15), %rdi
callq *%rcx
movq %r15, (%rax)
movl 0x8(%r14), %eax
decl %eax
movl %eax, 0x8(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x22d88
jmp 0x21723
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Remove(gaps::R3MeshEdge*)
void RNHeap<PtrType>::
Remove(PtrType entry)
{
  // Search for entry
  PtrType *entryp = NULL;
  if (entry_offset >= 0) entryp = *((PtrType **) ((unsigned char *) entry + entry_offset));
  if (entry_callback) entryp = *((PtrType **) (*entry_callback)(entry, callback_data));
  else {
    // Find entry in heap
    for (int i = 0; i < nentries; i++) {
      if (entries[i] == entry) {
        entryp = &entries[i];
        break;
      }
    }
  }

  // Move data into place
  if (!entryp) return;
  int index = entryp - entries;
  assert((0 <= index) && (index < nentries));

  // Update deleted entry backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[index] + entry_offset)) = NULL;
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[index], callback_data)) = NULL;

  // Remove entry, by copying tail over it
  entries[index] = entries[nentries-1];

  // Update new entry[0] backpointer
  if (entry_offset >= 0) *((PtrType **) ((unsigned char *) entries[index] + entry_offset)) = &entries[index];
  if (entry_callback) *((PtrType **) (*entry_callback)(entries[index], callback_data)) = &entries[index];

  // Decrement number of entries
  nentries--;

  // Bubble the entry down to its rightful spot
  BubbleDown(index);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x14(%rdi), %rax
testq %rax, %rax
js 0x21743
movq (%rsi,%rax), %r14
jmp 0x21746
xorl %r14d, %r14d
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x2176f
movq 0x28(%rbx), %rax
movq %rsi, %rdi
movq %rax, %rsi
callq *%rcx
movq (%rax), %r14
testq %r14, %r14
je 0x21827
movq (%rbx), %rcx
movl 0x14(%rbx), %eax
jmp 0x21796
movl 0x8(%rbx), %edi
movq (%rbx), %rcx
xorl %edx, %edx
testl %edi, %edi
cmovgl %edi, %edx
leaq -0x8(%rcx), %rdi
subq $0x1, %rdx
jb 0x2175e
leaq 0x8(%rdi), %r8
cmpq %rsi, 0x8(%rdi)
movq %r8, %rdi
jne 0x21780
movq %r8, %r14
subq %rcx, %r14
shrq $0x3, %r14
testl %eax, %eax
js 0x217b2
movslq %r14d, %rdx
movq (%rcx,%rdx,8), %rcx
movl %eax, %edx
andq $0x0, (%rcx,%rdx)
movq (%rbx), %rcx
movq 0x20(%rbx), %rdx
movslq %r14d, %r15
testq %rdx, %rdx
je 0x217d2
movq (%rcx,%r15,8), %rdi
movq 0x28(%rbx), %rsi
callq *%rdx
andq $0x0, (%rax)
movq (%rbx), %rcx
movl 0x14(%rbx), %eax
movslq 0x8(%rbx), %rdx
movq -0x8(%rcx,%rdx,8), %rsi
movq %rsi, (%rcx,%r15,8)
testl %eax, %eax
js 0x217f3
movq (%rbx), %rcx
leaq (%rcx,%r15,8), %rcx
movq (%rcx), %rsi
movl %eax, %eax
movq %rcx, (%rsi,%rax)
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x21812
movq (%rbx), %rcx
movq 0x28(%rbx), %rsi
leaq (%rcx,%r15,8), %r15
movq (%r15), %rdi
callq *%rax
movq %r15, (%rax)
movl 0x8(%rbx), %edx
decl %edx
movl %edx, 0x8(%rbx)
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x22d88
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshEdge*>::Update(gaps::R3MeshEdge*)
void RNHeap<PtrType>::
Update(PtrType entry)
{
  // Search for entry
  PtrType *entryp = NULL;
  if (entry_offset >= 0) entryp = *((PtrType **) ((unsigned char *) entry + entry_offset));
  if (entry_callback) entryp = *((PtrType **) (*entry_callback)(entry, callback_data));
  else {
    // Find entry in heap
    for (int i = 0; i < nentries; i++) {
      if (entries[i] == entry) {
        entryp = &entries[i];
        break;
      }
    }
  }

  // Move data into place
  if (!entryp) return;
  int index = entryp - entries;
  assert((0 <= index) && (index < nentries));
  BubbleUp(BubbleDown(index));
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movslq 0x14(%rdi), %rcx
testq %rcx, %rcx
js 0x21844
movq (%rax,%rcx), %rsi
jmp 0x21846
xorl %esi, %esi
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x21865
movq 0x28(%rbx), %rsi
movq %rax, %rdi
callq *%rcx
movq (%rax), %rsi
testq %rsi, %rsi
je 0x218a6
movq (%rbx), %rcx
jmp 0x2188c
movl 0x8(%rbx), %edi
movq (%rbx), %rcx
xorl %edx, %edx
testl %edi, %edi
cmovgl %edi, %edx
leaq -0x8(%rcx), %rdi
subq $0x1, %rdx
jb 0x2185b
leaq 0x8(%rdi), %r8
cmpq %rax, 0x8(%rdi)
movq %r8, %rdi
jne 0x21876
movq %r8, %rsi
subq %rcx, %rsi
shrq $0x3, %rsi
movq %rbx, %rdi
callq 0x22d88
movq %rbx, %rdi
movl %eax, %esi
popq %rbx
jmp 0x22c26
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Mesh.h
// Function: gaps::R3Mesh::EdgeOnFace(gaps::R3MeshFace const*, gaps::R3MeshEdge const*, int) const
inline R3MeshEdge *R3Mesh:: 
EdgeOnFace(const R3MeshFace *f, const R3MeshEdge *e, RNDirection dir) const
{
  // Return edge on face in dir with respect to edge
  if (f->edge[0] == e) {
    if (dir == RN_CCW) return f->edge[1];
    else return f->edge[2];
  }
  else if (f->edge[1] == e) {
    if (dir == RN_CCW) return f->edge[2];
    else return f->edge[0];
  }
  else if (f->edge[2] == e) {
    if (dir == RN_CCW) return f->edge[0];
    else return f->edge[1];
  }
  else {
    // Edge not found
    return NULL;
  }
}

// Assembly:
movq 0x20(%rsi), %rax
cmpq %rdx, %rax
je 0x21a79
movq 0x28(%rsi), %rdi
cmpq %rdx, %rdi
je 0x21a82
cmpq %rdx, 0x30(%rsi)
je 0x21a8c
xorl %eax, %eax
retq
testl %ecx, %ecx
jne 0x21a87
movq 0x28(%rsi), %rax
retq
testl %ecx, %ecx
je 0x21a87
retq
movq 0x30(%rsi), %rax
retq
testl %ecx, %ecx
cmovneq %rdi, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Mesh.h
// Function: gaps::R3Mesh::EdgeAcrossFace(gaps::R3MeshFace const*, gaps::R3MeshVertex const*) const
inline R3MeshEdge *R3Mesh:: 
EdgeAcrossFace(const R3MeshFace *f, const R3MeshVertex *v) const
{
  // Returns the edge across a triangle from a vertex (the edge is the base and the vertex is the apex)
  assert(IsVertexOnFace(v, f));
  if (!IsVertexOnEdge(v, f->edge[0]))return f->edge[0];
  if (!IsVertexOnEdge(v, f->edge[1]))return f->edge[1];
  if (!IsVertexOnEdge(v, f->edge[2]))return f->edge[2];
  return NULL;
}

// Assembly:
movq 0x20(%rsi), %rax
cmpq %rdx, 0x8(%rax)
je 0x221b1
cmpq %rdx, 0x10(%rax)
je 0x221b1
retq
movq 0x28(%rsi), %rax
cmpq %rdx, 0x8(%rax)
je 0x221c1
cmpq %rdx, 0x10(%rax)
jne 0x221b0
movq 0x30(%rsi), %rcx
cmpq %rdx, 0x8(%rcx)
je 0x221d6
xorl %eax, %eax
cmpq %rdx, 0x10(%rcx)
cmovneq %rcx, %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3OrientedBox.h
// Function: gaps::R3OrientedBox::Corner(int) const
inline const R3Point R3OrientedBox::
Corner(RNOctant octant) const
{
    // Check if box is empty
    if (IsEmpty()) return R3zero_point;

    // Return corner position
    R3Point corner = Center();
    corner += (octant & RN_PNN_OCTANT) ? Radius(0)*Axis(0) : -Radius(0)*Axis(0);
    corner += (octant & RN_NPN_OCTANT) ? Radius(1)*Axis(1) : -Radius(1)*Axis(1);
    corner += (octant & RN_NNP_OCTANT) ? Radius(2)*Axis(2) : -Radius(2)*Axis(2);
    return corner;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x22b76
testl %eax, %eax
je 0x2220c
leaq 0x4b9871(%rip), %rsi    # 0x4dba70
movq %rbx, %rdi
callq 0x37b5c
jmp 0x222a2
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x37b5c
movsd 0x68(%r14), %xmm0
testb $0x4, %bpl
jne 0x2222b
xorps 0x70e05(%rip), %xmm0    # 0x93030
leaq 0x20(%r14), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x38a02
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37e9c
movsd 0x70(%r14), %xmm0
testb $0x2, %bpl
jne 0x22258
xorps 0x70dd8(%rip), %xmm0    # 0x93030
leaq 0x38(%r14), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x38a02
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37e9c
movsd 0x78(%r14), %xmm0
testb $0x1, %bpl
jne 0x22285
xorps 0x70dab(%rip), %xmm0    # 0x93030
addq $0x50, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x38a02
movq %rbx, %rdi
movq %r15, %rsi
callq 0x37e9c
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNMap.cpp
// Function: gaps::RNMap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>::Find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int*) const
RNBoolean RNMap<KeyType, ValueType>::
Find(KeyType key, ValueType *value) const
{
    // Return value associated with key, or NULL if not found
    typename std::map<KeyType, ValueType, RNMapComparator<KeyType> >::iterator it = m->find(key);
    if (it == m->end()) return FALSE;
    if (value) *value = it->second;
    return TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x23c90
movq %rax, %rcx
movq (%r14), %rax
addq $0x8, %rax
cmpq %rax, %rcx
je 0x2230a
pushq $0x1
popq %rax
testq %rbx, %rbx
je 0x2230c
movl 0x40(%rcx), %ecx
movl %ecx, (%rbx)
jmp 0x2230c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/./R3Mesh.h
// Function: gaps::R3Mesh::Draw(gaps::RNFlags) const
inline void R3Mesh:: 
Draw(const R3DrawFlags draw_flags) const
{
  // Draw the mesh
  if (draw_flags[R3_SURFACES_DRAW_FLAG]) DrawFaces(draw_flags);
  else if (draw_flags[R3_EDGES_DRAW_FLAG]) DrawEdges(draw_flags);
  else DrawVertices(draw_flags);
}

// Assembly:
testb $0x2, %sil
jne 0x223e1
movq (%rdi), %rax
testb $0x1, %sil
jne 0x223eb
addq $0x128, %rax            # imm = 0x128
jmp 0x223f1
movl $0x138, %eax            # imm = 0x138
addq (%rdi), %rax
jmp 0x223f1
addq $0x130, %rax            # imm = 0x130
movq (%rax), %rax
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshBoundaryVertexData*>::BubbleUp(int)
int RNHeap<PtrType>::
BubbleUp(int index)
{
  // Move data up tree to rightful place
  while (index > 0) {
    int parent_index = ((index - 1) >> 1);

    // Compare values
    if (Compare(index, parent_index) >= 0) break;

    // Swap values
    Swap(index, parent_index);

    // Move up tree
    index = parent_index;
  }

  // Return new index
  return index;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
testl %r14d, %r14d
jle 0x228ce
leal -0x1(%r14), %ebp
shrl %ebp
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x228d6
testl %eax, %eax
jns 0x228ce
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x2292e
movl %ebp, %r14d
jmp 0x228a0
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshBoundaryVertexData*>::Compare(int, int) const
int RNHeap<PtrType>::
Compare(int i, int j) const
{
  // Get values
  RNScalar value1 = Value(i);
  RNScalar value2 = Value(j);

  // Compare values
  if (least_first) { 
    if (value1 < value2) return -1;
    else if (value1 > value2) return 1;
    else return 0;
  }
  else {
    if (value1 > value2) return -1;
    else if (value1 < value2) return 1;
    else return 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
callq 0x229ae
movsd %xmm0, (%rsp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x229ae
cmpl $0x0, 0x30(%r14)
je 0x2290d
movsd (%rsp), %xmm1
ucomisd %xmm1, %xmm0
ja 0x22918
xorl %eax, %eax
ucomisd %xmm0, %xmm1
jmp 0x22923
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2291d
pushq $-0x1
popq %rax
jmp 0x22926
xorl %eax, %eax
ucomisd %xmm1, %xmm0
seta %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshBoundaryVertexData*>::Swap(int, int)
void RNHeap<PtrType>::
Swap(int i, int j)
{
  // Swap entries
  PtrType swap = entries[i];
  entries[i] = entries[j];
  entries[j] = swap;
  
  // Update entry backpointers
  if (entry_offset >= 0) {
    *((PtrType **) ((unsigned char *) entries[i] + entry_offset)) = &entries[i];
    *((PtrType **) ((unsigned char *) entries[j] + entry_offset)) = &entries[j];
  }
  if (entry_callback) {
    *((PtrType **) (*entry_callback)(entries[i], callback_data)) = &entries[i];
    *((PtrType **) (*entry_callback)(entries[j], callback_data)) = &entries[j];
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rcx
movslq %esi, %rax
movq (%rcx,%rax,8), %rsi
movslq %edx, %r14
movq (%rcx,%r14,8), %rdx
movq %rdx, (%rcx,%rax,8)
movq (%rdi), %rcx
movq %rsi, (%rcx,%r14,8)
movslq 0x14(%rdi), %rcx
testq %rcx, %rcx
js 0x22977
movq (%rbx), %rdx
leaq (%rdx,%rax,8), %rdx
movq (%rdx), %rsi
movq %rdx, (%rsi,%rcx)
movq (%rbx), %rdx
leaq (%rdx,%r14,8), %rdx
movq (%rdx), %rsi
movq %rdx, (%rsi,%rcx)
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x229a7
movq (%rbx), %rdx
movq 0x28(%rbx), %rsi
leaq (%rdx,%rax,8), %r15
movq (%r15), %rdi
callq *%rcx
movq %r15, (%rax)
movq (%rbx), %rax
movq 0x28(%rbx), %rsi
leaq (%rax,%r14,8), %r14
movq (%r14), %rdi
callq *0x20(%rbx)
movq %r14, (%rax)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/../../pkgs/RNBasics/RNHeap.cpp
// Function: gaps::RNHeap<gaps::R3MeshBoundaryVertexData*>::Value(int) const
RNScalar RNHeap<PtrType>::
Value(int i) const
{
  // Return value}
  if (value_offset >= 0) {
    return *((RNScalar *) ((unsigned char *) entries[i] + value_offset));
  }
  else if (value_callback) {
    return (*value_callback)(entries[i], callback_data);
  }
  else {
    RNAbort("No heap value callback or offset\n");
    return 0;
  }
}

// Assembly:
movslq 0x10(%rdi), %rax
testq %rax, %rax
js 0x229c7
movq (%rdi), %rcx
movslq %esi, %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rcx,%rax), %xmm0
retq
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x229e0
movslq %esi, %rcx
movq (%rdi), %rdx
movq 0x28(%rdi), %rsi
movq (%rdx,%rcx,8), %rdi
jmpq *%rax
pushq %rax
leaq 0x710d0(%rip), %rdi     # 0x93ab8
xorl %eax, %eax
callq 0x680f0
xorps %xmm0, %xmm0
addq $0x8, %rsp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Sphere.cpp
// Function: gaps::R3Sphere::ClosestPoint(gaps::R3Point const&) const
const R3Point R3Sphere::
ClosestPoint(const R3Point& point) const
{
    // Return closest point in sphere
    if (radius <= 0) return center;
    R3Vector v = point - Center();
    RNLength d = v.Length();
    if (d < radius) return point;
    else return center + radius * v / d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r12
movq %rdi, %rbx
xorpd %xmm0, %xmm0
ucomisd 0x20(%rsi), %xmm0
jae 0x24874
movq %rdx, %r15
leaq 0x8(%r12), %r14
leaq 0x8(%rsp), %r13
movq %r13, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x37d29
movq %r13, %rdi
callq 0x38412
movapd %xmm0, %xmm1
movsd 0x20(%r12), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x24885
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x2487e
addq $0x8, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x37b5c
jmp 0x248bf
leaq 0x20(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movsd %xmm1, (%rsp)
callq 0x38a02
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x38d1e
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x37e13
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Sphere.cpp
// Function: gaps::R3Sphere::FurthestPoint(gaps::R3Point const&) const
const R3Point R3Sphere::
FurthestPoint(const R3Point& point) const
{
    // Return furthest point in sphere
    if (radius <= 0) return center;
    R3Vector v = point - Center();
    RNLength d = v.Length();
    if (RNIsZero(d)) return R3Point(center[0] + radius, center[1], center[2]);
    else return center - radius * v / d;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
ucomisd 0x20(%rsi), %xmm0
jae 0x24954
leaq 0x8(%r14), %r15
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %rdx, %rsi
movq %r15, %rdx
callq 0x37d29
movq %r12, %rdi
callq 0x38412
movapd %xmm0, %xmm2
leaq 0xb6292(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm0
movapd 0x6e70e(%rip), %xmm1    # 0x93030
xorpd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
jb 0x24965
ucomisd %xmm2, %xmm0
jb 0x24965
movsd 0x8(%r14), %xmm0
movsd 0x10(%r14), %xmm1
addsd 0x20(%r14), %xmm0
movsd 0x18(%r14), %xmm2
movq %rbx, %rdi
callq 0x37b4c
jmp 0x249a7
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37b5c
jmp 0x249a7
movsd 0x20(%r14), %xmm0
leaq 0x28(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
movsd %xmm2, 0x8(%rsp)
callq 0x38a02
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x38d1e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3829d
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::IsFinite() const
const RNBoolean R3Box::
IsFinite (void) const
{
    // Return whether bounding box contains a finite amount of space
    return ((!IsEmpty()) && 
	    (RNIsFinite(minpt.X()) && RNIsFinite(minpt.Y()) && RNIsFinite(minpt.Z())) && 
	    (RNIsFinite(maxpt.X()) && RNIsFinite(maxpt.Y()) && RNIsFinite(maxpt.Z())));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x257ce
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x24d2b
popq %rbx
retq
movsd 0x8(%rbx), %xmm2
leaq 0xb5e81(%rip), %rcx     # 0xdabb8
movsd (%rcx), %xmm1
movapd 0x6e2ed(%rip), %xmm0    # 0x93030
xorpd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
jbe 0x24d29
ucomisd %xmm2, %xmm1
jbe 0x24d29
movsd 0x10(%rbx), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x24d29
ucomisd %xmm2, %xmm1
jbe 0x24d29
movsd 0x18(%rbx), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x24d29
ucomisd %xmm2, %xmm1
jbe 0x24d29
movsd 0x20(%rbx), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x24d29
ucomisd %xmm2, %xmm1
jbe 0x24d29
movsd 0x28(%rbx), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x24d29
ucomisd %xmm2, %xmm1
jbe 0x24d29
movsd 0x30(%rbx), %xmm2
cmpltpd %xmm2, %xmm0
cmpltpd %xmm1, %xmm2
andpd %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
jmp 0x24d29
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Corner(int) const
const R3Point R3Box::
Corner (RNOctant octant) const
{
    // Return corner point 
    switch (octant) {
    case RN_NNN_OCTANT: return minpt;
    case RN_NNP_OCTANT: return R3Point(minpt.X(), minpt.Y(), maxpt.Z());
    case RN_NPN_OCTANT: return R3Point(minpt.X(), maxpt.Y(), minpt.Z());
    case RN_NPP_OCTANT: return R3Point(minpt.X(), maxpt.Y(), maxpt.Z());
    case RN_PNN_OCTANT: return R3Point(maxpt.X(), minpt.Y(), minpt.Z());
    case RN_PNP_OCTANT: return R3Point(maxpt.X(), minpt.Y(), maxpt.Z());
    case RN_PPN_OCTANT: return R3Point(maxpt.X(), maxpt.Y(), minpt.Z());
    case RN_PPP_OCTANT: return maxpt;
    default: RNAbort("Invalid octant for box corner"); return R3null_point;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x7, %edx
ja 0x24e3c
movl %edx, %eax
leaq 0x6ee64(%rip), %rcx     # 0x93c2c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %rsi
jmp 0x24e51
movsd 0x20(%rsi), %xmm0
movsd 0x10(%rsi), %xmm1
jmp 0x24ded
movsd 0x28(%rsi), %xmm1
movsd 0x8(%rsi), %xmm0
movsd 0x18(%rsi), %xmm2
jmp 0x24e32
movsd 0x8(%rsi), %xmm0
movsd 0x28(%rsi), %xmm1
jmp 0x24e1c
addq $0x20, %rsi
jmp 0x24e51
movsd 0x8(%rsi), %xmm0
movsd 0x10(%rsi), %xmm1
jmp 0x24e1c
movsd 0x10(%rsi), %xmm1
movsd 0x20(%rsi), %xmm0
movsd 0x30(%rsi), %xmm2
jmp 0x24e32
movsd 0x18(%rsi), %xmm2
movsd 0x20(%rsi), %xmm0
movsd 0x28(%rsi), %xmm1
movq %rbx, %rdi
callq 0x37b4c
jmp 0x24e59
leaq 0x6ee33(%rip), %rdi     # 0x93c76
xorl %eax, %eax
callq 0x680f0
leaq 0x4b6c1f(%rip), %rsi    # 0x4dba70
movq %rbx, %rdi
callq 0x37b5c
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Plane(int, int) const
const R3Plane R3Box::
Plane (RNDirection dir, RNDimension dim) const
{
    // Return plane along side
    R3Vector v = R3xyz_triad[dim]; 
    RNCoord d = (*this)[dir][dim];
    if (dir == RN_LO) return R3Plane(-v, d);
    else return R3Plane(v, -d);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movslq %ecx, %r15
imulq $0x18, %r15, %rsi
addq 0xb50f2(%rip), %rsi     # 0xd9fb8
leaq 0x18(%rsp), %rdi
callq 0x3831c
leaq 0x20(%r14), %rax
addq $0x8, %r14
testl %ebp, %ebp
cmovneq %rax, %r14
movsd (%r14,%r15,8), %xmm0
je 0x24ef7
xorps 0x6e143(%rip), %xmm0    # 0x93030
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
jmp 0x24f17
leaq 0x30(%rsp), %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
movaps %xmm0, (%rsp)
callq 0x38c72
movq %rbx, %rdi
movq %r14, %rsi
movaps (%rsp), %xmm0
callq 0x36788
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Octant(int, int, int) const
const R3Box R3Box::
Octant (RNDirection xdir, RNDirection ydir, RNDirection zdir) const
{
    // Return box in octant (xdir, ydir, zdir)
    R3Box result;
    R3Point centroid = Centroid();
    if (xdir == RN_HI) { result[RN_LO][RN_X] = centroid[RN_X]; result[RN_HI][RN_X] = maxpt[RN_X]; }
    else { result[RN_LO][RN_X] = minpt[RN_X]; result[RN_HI][RN_X] = centroid[RN_X]; }
    if (ydir == RN_HI) { result[RN_LO][RN_Y] = centroid[RN_Y]; result[RN_HI][RN_Y] = maxpt[RN_Y]; }
    else { result[RN_LO][RN_Y] = minpt[RN_Y]; result[RN_HI][RN_Y] = centroid[RN_Y]; }
    if (zdir == RN_HI) { result[RN_LO][RN_Z] = centroid[RN_Z]; result[RN_HI][RN_Z] = maxpt[RN_Z]; }
    else { result[RN_LO][RN_Z] = minpt[RN_Z]; result[RN_HI][RN_Z] = centroid[RN_Z]; }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %rbx
callq 0x24afa
movq (%r14), %rax
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq *0x68(%rax)
movsd 0x8(%rsp), %xmm0
cmpl $0x1, %r12d
je 0x24faf
movaps %xmm0, %xmm1
movsd 0x8(%r14), %xmm0
jmp 0x24fb5
movsd 0x20(%r14), %xmm1
movsd %xmm0, 0x8(%rbx)
movsd %xmm1, 0x20(%rbx)
movsd 0x10(%rsp), %xmm0
cmpl $0x1, %r15d
je 0x24fd3
movsd 0x10(%r14), %xmm1
jmp 0x24fdc
movaps %xmm0, %xmm1
movsd 0x28(%r14), %xmm0
movsd %xmm1, 0x10(%rbx)
movsd %xmm0, 0x28(%rbx)
movsd 0x18(%rsp), %xmm0
cmpl $0x1, %ebp
je 0x24ff9
movsd 0x18(%r14), %xmm1
jmp 0x25002
movaps %xmm0, %xmm1
movsd 0x30(%r14), %xmm0
movsd %xmm1, 0x18(%rbx)
movsd %xmm0, 0x30(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x25832
movq %r14, %rdi
callq 0xe810
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::NDimensionsAlongSide(int, int) const
const int R3Box::
NDimensionsAlongSide (RNDirection, RNDimension dim) const
{
    // Return number of non-zero dimensions along side
    int ndimensions = 0;
    int dim1 = (dim+1) % 3;
    int dim2 = (dim+2) % 3;
    if (minpt[dim1] < maxpt[dim1]) ndimensions++;
    if (minpt[dim2] < maxpt[dim2]) ndimensions++;
    return ndimensions;
}

// Assembly:
movl %edx, %ecx
leal 0x1(%rcx), %eax
pushq $0x3
popq %r8
cltd
idivl %r8d
movl %edx, %esi
addl $0x2, %ecx
movl %ecx, %eax
cltd
idivl %r8d
movslq %esi, %rax
movsd 0x20(%rdi,%rax,8), %xmm0
xorl %ecx, %ecx
ucomisd 0x8(%rdi,%rax,8), %xmm0
seta %cl
movslq %edx, %rdx
movsd 0x20(%rdi,%rdx,8), %xmm0
leal 0x1(%rcx), %eax
ucomisd 0x8(%rdi,%rdx,8), %xmm0
cmovbel %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::ClosestPoint(gaps::R3Point const&) const
const R3Point R3Box::
ClosestPoint(const R3Point& point) const
{
    // Return closest point in box
    R3Point closest(point);
    if (closest.X() < XMin()) closest[RN_X] = XMin();
    else if (closest.X() > XMax()) closest[RN_X] = XMax();
    if (closest.Y() < YMin()) closest[RN_Y] = YMin();
    else if (closest.Y() > YMax()) closest[RN_Y] = YMax();
    if (closest.Z() < ZMin()) closest[RN_Z] = ZMin();
    else if (closest.Z() > ZMax()) closest[RN_Z] = ZMax();
    return closest;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x37b5c
movsd (%rbx), %xmm1
movsd 0x8(%r14), %xmm0
ucomisd %xmm1, %xmm0
ja 0x25196
movsd 0x20(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x2519a
movsd %xmm0, (%rbx)
movsd 0x8(%rbx), %xmm1
movsd 0x10(%r14), %xmm0
ucomisd %xmm1, %xmm0
ja 0x251b7
movsd 0x28(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x251bc
movsd %xmm0, 0x8(%rbx)
movsd 0x10(%rbx), %xmm1
movsd 0x18(%r14), %xmm0
ucomisd %xmm1, %xmm0
ja 0x251d9
movsd 0x30(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x251de
movsd %xmm0, 0x10(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::FurthestPoint(gaps::R3Point const&) const
const R3Point R3Box::
FurthestPoint(const R3Point& point) const
{
    // Return furthest point in box
    R3Point furthest(point);
    RNScalar x = (point.X() < XCenter()) ? XMax() : XMin();
    RNScalar y = (point.Y() < YCenter()) ? YMax() : YMin();
    RNScalar z = (point.Z() < ZCenter()) ? ZMax() : ZMin();
    return R3Point(x, y, z);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x37b5c
movsd 0x20(%r15), %xmm1
movsd 0x8(%r15), %xmm2
movapd %xmm1, %xmm3
addsd %xmm2, %xmm3
mulsd 0x6ddeb(%rip), %xmm3    # 0x93010
movsd (%r14), %xmm0
cmpltsd %xmm3, %xmm0
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movupd 0x8(%r14), %xmm1
movupd 0x28(%r15), %xmm2
movupd 0x10(%r15), %xmm3
movapd %xmm2, %xmm4
addpd %xmm3, %xmm4
mulpd 0x6dde3(%rip), %xmm4    # 0x93040
cmpltpd %xmm4, %xmm1
movmskpd %xmm1, %eax
movapd %xmm2, %xmm1
testb $0x1, %al
jne 0x25272
movapd %xmm3, %xmm1
testb $0x2, %al
jne 0x25280
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
movapd %xmm3, %xmm2
jmp 0x25284
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
movq %rbx, %rdi
callq 0x37b4c
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Inflate(double)
void R3Box::
Inflate (RNScalar fraction) 
{
  // Scale box around centroid by fraction
  if (IsEmpty()) return;
  R3Point centroid = Centroid();
  R3Vector diagonal = Max() - centroid;
  Reset(centroid - fraction * diagonal, centroid + fraction * diagonal);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0x257ce
testl %eax, %eax
jne 0x25468
movq (%rbx), %rax
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq *0x68(%rax)
leaq 0x20(%rbx), %rsi
leaq 0x70(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x37d29
leaq 0x40(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x38a02
leaq 0x58(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3829d
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x38a02
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x37e13
movq (%rbx), %rax
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq *0x250(%rax)
addq $0xa0, %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/R3Box.cpp
// Function: gaps::R3Box::Union(gaps::R3Point const&)
void R3Box::
Union (const R3Point& point) 
{
    // Expand this to include point
    if (IsEmpty()) {
        minpt = point;
        maxpt = point;
    }
    else {
        if (minpt.X() > point.X()) minpt[0] = point.X();
        if (minpt.Y() > point.Y()) minpt[1] = point.Y();
        if (minpt.Z() > point.Z()) minpt[2] = point.Z();
        if (maxpt.X() < point.X()) maxpt[0] = point.X();
        if (maxpt.Y() < point.Y()) maxpt[1] = point.Y();
        if (maxpt.Z() < point.Z()) maxpt[2] = point.Z();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x257ce
leaq 0x8(%rbx), %rdi
testl %eax, %eax
je 0x254d9
movq %r14, %rsi
callq 0x37e36
addq $0x20, %rbx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x37e36
movsd (%rdi), %xmm1
movsd (%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x254ec
movsd %xmm0, (%rdi)
movsd 0x10(%rbx), %xmm1
movsd 0x8(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x25502
movsd %xmm0, 0x10(%rbx)
movsd 0x18(%rbx), %xmm1
movsd 0x10(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x25518
movsd %xmm0, 0x18(%rbx)
movsd (%r14), %xmm0
ucomisd 0x20(%rbx), %xmm0
jbe 0x25529
movsd %xmm0, 0x20(%rbx)
movsd 0x8(%r14), %xmm0
ucomisd 0x28(%rbx), %xmm0
jbe 0x2553b
movsd %xmm0, 0x28(%rbx)
movsd 0x10(%r14), %xmm0
ucomisd 0x30(%rbx), %xmm0
jbe 0x2554d
movsd %xmm0, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Union(gaps::R3Box const&)
void R3Box::
Union (const R3Box& box) 
{
    // Expand this to include box
    if (IsEmpty()) {
        *this = box;
    }
    else if (!box.IsEmpty()) {
        if (minpt.X() > box.XMin()) minpt[0] = box.XMin();
        if (minpt.Y() > box.YMin()) minpt[1] = box.YMin();
        if (minpt.Z() > box.ZMin()) minpt[2] = box.ZMin();
        if (maxpt.X() < box.XMax()) maxpt[0] = box.XMax();
        if (maxpt.Y() < box.YMax()) maxpt[1] = box.YMax();
        if (maxpt.Z() < box.ZMax()) maxpt[2] = box.ZMax();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x257ce
testl %eax, %eax
je 0x2557b
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2141e
movq %r14, %rdi
callq 0x257ce
testl %eax, %eax
jne 0x255ff
movsd 0x8(%rbx), %xmm1
movsd 0x8(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x2559d
movsd %xmm0, 0x8(%rbx)
movsd 0x10(%rbx), %xmm1
movsd 0x10(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x255b3
movsd %xmm0, 0x10(%rbx)
movsd 0x18(%rbx), %xmm1
movsd 0x18(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x255c9
movsd %xmm0, 0x18(%rbx)
movsd 0x20(%r14), %xmm0
ucomisd 0x20(%rbx), %xmm0
jbe 0x255db
movsd %xmm0, 0x20(%rbx)
movsd 0x28(%r14), %xmm0
ucomisd 0x28(%rbx), %xmm0
jbe 0x255ed
movsd %xmm0, 0x28(%rbx)
movsd 0x30(%r14), %xmm0
ucomisd 0x30(%rbx), %xmm0
jbe 0x255ff
movsd %xmm0, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Intersect(gaps::R3Box const&)
void R3Box::
Intersect (const R3Box& box) 
{
    // Intersect with box
    if (!IsEmpty()) {
        if (box.IsEmpty()) {
            *this = box;
        }
        else {
            if (minpt.X() < box.XMin()) minpt[0] = box.XMin();
            if (minpt.Y() < box.YMin()) minpt[1] = box.YMin();
            if (minpt.Z() < box.ZMin()) minpt[2] = box.ZMin();
            if (maxpt.X() > box.XMax()) maxpt[0] = box.XMax();
            if (maxpt.Y() > box.YMax()) maxpt[1] = box.YMax();
            if (maxpt.Z() > box.ZMax()) maxpt[2] = box.ZMax();
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x257ce
testl %eax, %eax
je 0x2566f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x257ce
testl %eax, %eax
je 0x2568d
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2141e
movsd 0x8(%r14), %xmm0
ucomisd 0x8(%rbx), %xmm0
jbe 0x2569f
movsd %xmm0, 0x8(%rbx)
movsd 0x10(%r14), %xmm0
ucomisd 0x10(%rbx), %xmm0
jbe 0x256b1
movsd %xmm0, 0x10(%rbx)
movsd 0x18(%r14), %xmm0
ucomisd 0x18(%rbx), %xmm0
jbe 0x256c3
movsd %xmm0, 0x18(%rbx)
movsd 0x20(%rbx), %xmm1
movsd 0x20(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x256d9
movsd %xmm0, 0x20(%rbx)
movsd 0x28(%rbx), %xmm1
movsd 0x28(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x256ef
movsd %xmm0, 0x28(%rbx)
movsd 0x30(%rbx), %xmm1
movsd 0x30(%r14), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x25667
movsd %xmm0, 0x30(%rbx)
jmp 0x25667
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Box.cpp
// Function: gaps::R3Box::Transform(gaps::R3Transformation const&)
void R3Box::
Transform (const R3Transformation& transformation)
{
    // Do not transform empty box
    if (IsEmpty()) return;

    // Transform box ???
    R3Box tmp = R3null_box;
    for (RNOctant octant = 0; octant < RN_NUM_OCTANTS; octant++) {
	R3Point corner(Corner(octant));
	corner.Transform(transformation);
	tmp.Union(corner);
    }
    *this = tmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x257ce
testl %eax, %eax
jne 0x25781
leaq 0xb5778(%rip), %rsi     # 0xdaea8
movq %rsp, %r15
movq %r15, %rdi
callq 0x24b3e
xorl %ebp, %ebp
leaq 0x38(%rsp), %r12
cmpl $0x8, %ebp
je 0x2576e
movq %r12, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x24db6
movq %r12, %rdi
movq %r14, %rsi
callq 0x38192
movq %r15, %rdi
movq %r12, %rsi
callq 0x254a4
incl %ebp
jmp 0x25742
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2141e
movq %rsp, %rdi
callq 0x25832
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x25790
movq %rax, %rbx
movq %rsp, %rdi
callq 0x25832
movq %rbx, %rdi
callq 0xe810
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Affine.cpp
// Function: gaps::R3Affine::InverseMatrix() const
const R4Matrix& R3Affine::
InverseMatrix(void) const
{
    // Update inverse matrix 
    if (!flags[R3_AFFINE_INVERSE_UPTODATE_FLAG]) {
        // Update inverse matrix
        R3Affine *affine = (R3Affine *) this;
	affine->inverse = matrix.Inverse();
	affine->flags.Add(R3_AFFINE_INVERSE_UPTODATE_FLAG);
    }

    // Return inverse matrix
    return inverse;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
testb $0x2, 0x108(%rdi)
jne 0x27749
leaq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x29d94
leaq 0x88(%rbx), %rdi
movq %r14, %rsi
callq 0x2ad04
orb $0x2, 0x108(%rbx)
addq $0x88, %rbx
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Affine.cpp
// Function: gaps::R3Affine::Transform(gaps::R3Affine const&)
void R3Affine::
Transform(const R3Affine& affine) 
{
    // Transform affine transformation
    matrix = matrix * affine.matrix;
    if (affine.HasMirror()) Mirror();
    InvalidateInverse();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
leaq 0x8(%rsi), %rdx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2b111
movq %r15, %rdi
movq %r12, %rsi
callq 0x2ad04
movq 0x108(%rbx), %rax
andl $0x1, %eax
movq 0x108(%r14), %rcx
andq $-0x3, %rcx
xorq %rax, %rcx
movq %rcx, 0x108(%r14)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Affine.cpp
// Function: gaps::R3Affine::InverseTransform(gaps::R3Affine const&)
void R3Affine::
InverseTransform(const R3Affine& affine) 
{
    // Transform affine transformation
    matrix = matrix * affine.InverseMatrix();
    if (affine.HasMirror()) Mirror();
    InvalidateInverse();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq %rsi, %rdi
callq 0x2770c
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2b111
movq %r15, %rdi
movq %r12, %rsi
callq 0x2ad04
movq 0x108(%rbx), %rax
andl $0x1, %eax
movq 0x108(%r14), %rcx
andq $-0x3, %rcx
xorq %rax, %rcx
movq %rcx, 0x108(%r14)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Affine.cpp
// Function: gaps::R3Affine::ApplyInverseTranspose(gaps::R3Vector&) const
void R3Affine::
ApplyInverseTranspose (R3Vector& vector) const
{
    // Transform (normal) vector by inverse transpose
    const R4Matrix& m = InverseMatrix();
    RNCoord x = m[0][0] * vector.X() + m[1][0] * vector.Y() + m[2][0] * vector.Z();
    RNCoord y = m[0][1] * vector.X() + m[1][1] * vector.Y() + m[2][1] * vector.Z();
    RNCoord z = m[0][2] * vector.X() + m[1][2] * vector.Y() + m[2][2] * vector.Z();
    vector = R3Vector(x, y, z);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
callq 0x2770c
movsd (%rbx), %xmm3
movsd 0x8(%rbx), %xmm4
movsd 0x20(%rax), %xmm0
mulsd %xmm4, %xmm0
movsd (%rax), %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%rbx), %xmm2
movsd 0x40(%rax), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x28(%rax), %xmm1
mulsd %xmm4, %xmm1
movsd 0x8(%rax), %xmm5
mulsd %xmm3, %xmm5
addsd %xmm1, %xmm5
movsd 0x48(%rax), %xmm1
mulsd %xmm2, %xmm1
addsd %xmm5, %xmm1
mulsd 0x30(%rax), %xmm4
mulsd 0x10(%rax), %xmm3
addsd %xmm4, %xmm3
mulsd 0x50(%rax), %xmm2
addsd %xmm3, %xmm2
movq %rsp, %r14
movq %r14, %rdi
callq 0x3830c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3887c
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Affine.cpp
// Function: gaps::R3Affine::Mirror(gaps::R3Plane const&)
void R3Affine::
Mirror(const R3Plane& plane)
{
  // Compute translation
  R3Vector translation = plane.D() * plane.Normal();

  // Compute dimension to rotate to and reflect across
  RNDimension dim = plane.Normal().MinDimension();
  R3Vector target_vector = R3xyz_triad[dim];

  // Compute rotation axis
  R3Vector rotation_axis = plane.Normal() % target_vector;
  RNLength rotation_axis_length = rotation_axis.Length();
  if (RNIsZero(rotation_axis_length)) return;
  rotation_axis /= rotation_axis_length;

  // Compute rotation angle
  RNAngle rotation_angle = R3InteriorAngle(plane.Normal(), target_vector);
  
  // Transform
  Translate(-translation);
  Rotate(rotation_axis, -rotation_angle);
  Mirror(dim);
  Rotate(rotation_axis, rotation_angle);
  Translate(translation);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x18(%rsi), %xmm0
leaq 0x40(%rsp), %rdi
callq 0x38a02
movq %r14, %rdi
callq 0x38456
movl %eax, %ebp
cltq
imulq $0x18, %rax, %rsi
addq 0xb23f4(%rip), %rsi     # 0xd9fb8
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x3831c
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x389be
movq %r12, %rdi
callq 0x38412
leaq 0xb2fb5(%rip), %rax     # 0xdaba8
movsd (%rax), %xmm1
movapd 0x6b431(%rip), %xmm2    # 0x93030
xorpd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
jb 0x27c0f
ucomisd %xmm0, %xmm1
jae 0x27c89
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x38c0a
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x4555f
movapd %xmm0, (%rsp)
leaq 0x58(%rsp), %r12
leaq 0x40(%rsp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x38c72
movq %rbx, %rdi
movq %r12, %rsi
callq 0x212e2
movaps 0x6b3db(%rip), %xmm0    # 0x93030
xorps (%rsp), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27d12
movq %rbx, %rdi
movl %ebp, %esi
callq 0x27b6e
movq %rbx, %rdi
movq %r15, %rsi
movapd (%rsp), %xmm0
callq 0x27d12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x212e2
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Crdsys.cpp
// Function: gaps::R3CoordSystem::Matrix() const
const R4Matrix R3CoordSystem::
Matrix(void) const
{
    // Return matrix (std -> cs)
    R4Matrix m(R4identity_matrix);
    m.Translate(origin.Vector());
    m.Transform(axes.Matrix());
    return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6c01b(%rip), %rsi     # 0x93df0
callq 0x2967c
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x212f8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2a5cc
addq $0x18, %r14
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2830c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x280fe
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3Crdsys.cpp
// Function: gaps::R3CoordSystem::InverseMatrix() const
const R4Matrix R3CoordSystem::
InverseMatrix(void) const
{
    // Return matrix (cs -> std)
    R4Matrix m(axes.InverseMatrix());
    m.Translate(-origin.Vector());
    return m;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
addq $0x18, %rsi
callq 0x28386
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x212f8
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x38c72
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a5cc
movq %r14, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq