LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/CHEN-Zhihan[P]Compiler/Node.cpp
// Function: VarNode::ex(std::vector<int, std::allocator<int>>&, int, int, int) const
void VarNode::ex(vector<int>& sList, int functionID, int blbl, int clbl) const {
    int definitionScope = getDefinitionScope(sList, functionID);
    if (sizeMap[{definitionScope, i}].size() != 0 and subscriptions.size() == 0) { // pass by reference
        int address = addressTable[functionID].second[definitionScope][i];
        if (address < 0) { // is parameter
            printf("\tpush\tfp[%d]\n", address);
        } else {
            if (global) {
                printf("\tpush\t%d\n", addressTable[GLOBAL].second[GLOBAL][i]);
            } else if (functionID == GLOBAL) {
                auto address = addressTable[GLOBAL].second[getDefinitionScope(sList, functionID)][i];
                printf("\tpush\t%d\n", address);
            } else {
                printf("\tpush\t%d\n", addressTable[functionID].second[definitionScope][i]);
                printf("\tpush\tfp\n");
                printf("\tadd\n");
            }
        }
    } else {
        push(sList, functionID);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl %edx, -0x24(%rbp)
callq 0xd3b6
movl %eax, -0x28(%rbp)
leaq -0x30(%rbp), %rsi
movl %eax, (%rsi)
movl 0x8(%r15), %eax
movl %eax, 0x4(%rsi)
leaq 0xc27c(%rip), %rdi      # 0x1c4c8
callq 0x10bf4
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0x10264
movq 0x18(%r15), %rax
cmpq 0x10(%r15), %rax
je 0x1027c
movl -0x24(%rbp), %edx
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xf91c
jmp 0x1033b
leaq 0x8(%r15), %rbx
leaq 0xc1f9(%rip), %rdi      # 0x1c480
leaq -0x24(%rbp), %rsi
callq 0xb5dc
leaq 0x8(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x11870
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12922
movl (%rax), %esi
testl %esi, %esi
js 0x102d9
cmpb $0x1, 0xc(%r15)
jne 0x102e2
leaq 0xc1c4(%rip), %rdi      # 0x1c480
leaq 0xc201(%rip), %r14      # 0x1c4c4
movq %r14, %rsi
callq 0xb5dc
leaq 0x8(%rax), %rdi
movq %r14, %rsi
callq 0x11870
jmp 0x10320
leaq 0x4719(%rip), %rdi      # 0x149f9
jmp 0x10334
movl -0x24(%rbp), %eax
cmpl 0xc1d9(%rip), %eax      # 0x1c4c4
jne 0x10348
leaq 0xc18c(%rip), %rdi      # 0x1c480
leaq 0xc1c9(%rip), %rsi      # 0x1c4c4
callq 0xb5dc
leaq 0x8(%rax), %r12
movl -0x24(%rbp), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xd3b6
leaq -0x30(%rbp), %rsi
movl %eax, (%rsi)
movq %r12, %rdi
callq 0x12a08
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12922
movl (%rax), %esi
leaq 0x42ee(%rip), %rdi      # 0x14622
xorl %eax, %eax
callq 0x4050
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc131(%rip), %rdi      # 0x1c480
leaq -0x24(%rbp), %rsi
callq 0xb5dc
leaq 0x8(%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0x11870
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12922
movl (%rax), %esi
leaq 0x42a9(%rip), %rdi      # 0x14622
xorl %eax, %eax
callq 0x4050
leaq 0x47b2(%rip), %rdi      # 0x14b39
callq 0x4330
leaq 0x42e5(%rip), %rdi      # 0x14678
callq 0x4330
jmp 0x1033b
// File: /workspace/github_cpp_makefile_star2_O1/CHEN-Zhihan[P]Compiler/Node.cpp
// Function: VarNode::check(std::vector<int, std::allocator<int>>&, int)
void VarNode::check(vector<int>& sList, int functionID) {
    if (global) {
        if (variableTable[GLOBAL].count(i) == 0) {
            cerr << "Undefined reference to global variable: " << reverseLookup[i] << endl;
            exit(-1);
        }
        if (functionID == GLOBAL) {
            cerr << "Refer to a global variable: " << reverseLookup[i] << " in the global scope" << endl;
            exit(-1);
        }
    } else {
        auto s = getDefinitionScope(sList, functionID);
        if (s == NOT_FOUND) {
            cerr << "Undefined reference to variable " << reverseLookup[i] << endl;
            exit(-1);
        }
    }
    for (auto & i : subscriptions) {
        i->check(sList, functionID);
        i->evaluate();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x1, 0xc(%rdi)
jne 0x108a7
leaq 0xbb66(%rip), %rdi      # 0x1c3a0
leaq 0xbc83(%rip), %rsi      # 0x1c4c4
callq 0xbe56
leaq 0x8(%r15), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x12038
testq %rax, %rax
je 0x108ef
cmpl %ebx, 0xbc60(%rip)      # 0x1c4c4
jne 0x108bb
movq 0xb783(%rip), %rdi      # 0x1bff0
leaq 0x4248(%rip), %rsi      # 0x14abc
callq 0x4200
movslq (%r12), %rsi
leaq 0xbaac(%rip), %rcx      # 0x1c330
shlq $0x5, %rsi
addq (%rcx), %rsi
movq %rax, %rdi
callq 0x41d0
leaq 0x4034(%rip), %rsi      # 0x148ce
movq %rax, %rdi
callq 0x4200
jmp 0x10935
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0xd3b6
cmpl $0x7d0, %eax            # imm = 0x7D0
je 0x10908
movq 0x10(%r15), %r12
movq 0x18(%r15), %r15
cmpq %r15, %r12
je 0x108e6
movq (%r12), %rdi
movq (%rdi), %rax
movq %r14, %rsi
movl %ebx, %edx
callq *0x8(%rax)
movq (%r12), %rdi
callq 0xd9d8
addq $0x10, %r12
jmp 0x108c3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xb6fa(%rip), %rdi      # 0x1bff0
leaq 0x4196(%rip), %rsi      # 0x14a93
callq 0x4200
movslq (%r12), %rsi
jmp 0x1091f
movq 0xb6e1(%rip), %rdi      # 0x1bff0
leaq 0x41c3(%rip), %rsi      # 0x14ad9
callq 0x4200
movslq 0x8(%r15), %rsi
leaq 0xba0a(%rip), %rcx      # 0x1c330
shlq $0x5, %rsi
addq (%rcx), %rsi
movq %rax, %rdi
callq 0x41d0
movq %rax, %rdi
callq 0x4120
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH03_StringsVectorsAndArrays/examples/word_echo.cc
// Function: main
int main() 
{
	string word;
	while (cin >> word)       // read until end-of-file 
		cout << word << endl; // write each word followed by a new line
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq 0x2db7(%rip), %rbx      # 0x3fe0
leaq -0x48(%rbp), %r14
movq 0x2d9c(%rip), %r15      # 0x3fd0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movq -0x48(%rbp), %rsi
jne 0x1289
movq -0x40(%rbp), %rdx
movq %r15, %rdi
callq 0x1080
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x1060
movsbl %al, %esi
movq %r12, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1040
jmp 0x1234
cmpq %r13, %rsi
je 0x12a0
movq -0x38(%rbp), %rax
incq %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0x1070
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x12c9
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x1070
movq %rbx, %rdi
callq 0x10b0
// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/inserters.cc
// Function: print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::list<int, std::allocator<int>> const&)
void print(const string &label, const list<int> &lst)
{
	cout << label << endl;
	for (auto iter : lst)
        cout << iter << " ";
    cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
movq 0x2d1d(%rip), %rbx      # 0x3fd8
movq %rbx, %rdi
callq 0x10f0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x1030
movq %rax, %rdi
callq 0x1070
movq (%r14), %r13
cmpq %r14, %r13
je 0x1328
movq 0x2cdc(%rip), %r15      # 0x3fd8
leaq 0xd2d(%rip), %r12       # 0x2030
movl 0x10(%r13), %esi
movq %r15, %rdi
callq 0x1120
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x10f0
movq (%r13), %r13
cmpq %r14, %r13
jne 0x1303
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x10c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x1030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1070
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/msh2df/msh2df.cpp
// Function: IsManifold(gaps::R3Mesh*)
static RNBoolean
IsManifold(R3Mesh *mesh)
{
  // Check for boundary edges
  for (int i = 0; i < mesh->NEdges(); i++) {
    R3MeshEdge *edge = mesh->Edge(i);
    if (mesh->IsEdgeOnBoundary(edge)) return FALSE;
  }

  // Check connected components
  int ncomponents = mesh->ConnectedComponents();
  if (ncomponents != 1) return FALSE;

  // Passed all tests
  return TRUE;
}

// Assembly:
pushq %rax
movslq 0x24(%rdi), %rax
testq %rax, %rax
setg %cl
jle 0x14d43
movq 0x18(%rdi), %rdx
movq (%rdx), %r8
cmpq $0x0, 0x18(%r8)
je 0x14d3c
movl $0x1, %esi
cmpq $0x0, 0x20(%r8)
je 0x14d3c
cmpq %rsi, %rax
je 0x14d43
seta %cl
movq (%rdx,%rsi,8), %r8
incq %rsi
cmpq $0x0, 0x18(%r8)
jne 0x14d1f
xorl %eax, %eax
testb $0x1, %cl
jne 0x14d52
callq 0x2510a
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sete %al
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/msh2df/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<Point*>::R3Kdtree(gaps::RNArray<Point*> const&, int)
R3Kdtree<PtrType>::
R3Kdtree(const RNArray<PtrType>& points, int position_offset)
  : position_offset(position_offset),
    position_callback(NULL),
    position_callback_data(NULL),
    npoints(points.NEntries()),
    nnodes(1)
{
  // Create root node
  root = new R3KdtreeNode<PtrType>(NULL);
  assert(root);

  // Determine bounding box 
  bbox = R3null_box;
  for (int i = 0; i < points.NEntries(); i++) {
    bbox.Union(Position(points[i]));
  }

  // Allocate copy of points array (so that it can be sorted)
  PtrType *copy = new PtrType [ points.NEntries() ];
  assert(copy);

  // Copy points
  for (int i = 0; i < points.NEntries(); i++) 
    copy[i] = points[i];

  // Insert points into root
  InsertPoints(root, bbox, copy, points.NEntries());

  // Delete copy of points array
  delete [] copy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3b2fc
movl %ebp, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movl 0xc(%r14), %eax
movl %eax, 0x58(%rbx)
movl $0x1, 0x5c(%rbx)
movl $0x130, %edi            # imm = 0x130
callq 0xe440
xorl %ecx, %ecx
movl %ecx, 0x128(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movl %ecx, 0x20(%rax)
movq %rax, 0x50(%rbx)
leaq 0x8(%rbx), %rdi
leaq 0xdb303(%rip), %r15     # 0xf00b8
leaq 0x8(%r15), %rsi
callq 0x50c3c
leaq 0x20(%rbx), %rdi
addq $0x20, %r15
movq %r15, %rsi
callq 0x50c3c
movl 0xc(%r14), %r15d
testl %r15d, %r15d
jle 0x14e06
xorl %r13d, %r13d
movq %rsp, %r12
movq (%r14), %rax
movq (%rax,%r13,8), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x15044
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3bd5e
incq %r13
movslq 0xc(%r14), %r15
cmpq %r15, %r13
jl 0x14ddd
movslq %r15d, %rax
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0xe030
movq %rax, %r12
testl %r15d, %r15d
jle 0x14e43
movq (%r14), %rax
movl %r15d, %ecx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
movq %rsi, (%r12,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x14e33
movq 0x50(%rbx), %rsi
movq %rbx, %rdi
movq %rbx, %rdx
movq %r12, %rcx
movl %r15d, %r8d
callq 0x15098
movq %r12, %rdi
callq 0xe5b0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14e73
jmp 0x14e73
movq %rax, %r14
movq %rbx, %rdi
callq 0x3c198
movq %r14, %rdi
callq 0xe7f0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/msh2df/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<Point*>::FindClosest(gaps::R3Point const&, double, double, int, gaps::RNArray<Point*>&, double*) const
int R3Kdtree<PtrType>::
FindClosest(const R3Point& query_position, RNScalar min_distance, RNScalar max_distance, int max_points, 
  RNArray<PtrType>& points, RNLength *distances) const
{
  // Check root
  if (!root) return 0;

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

  // Allocate temporary array of squared distances to max_points closest points
  RNLength *distances_squared = new RNLength [ max_points ];

  // Search nodes recursively
  FindClosest(root, bbox, 
    NULL, query_position, 
    min_distance_squared, max_distance_squared, max_points, 
    NULL, NULL, 
    points, distances_squared);

  // Update return distances
  if (distances) {
    for (int i = 0; i < points.NEntries(); i++) {
      distances[i] = sqrt(distances_squared[i]);
    }
  }

  // Delete temporary array of squared distances
  delete [] distances_squared;

  // Return number of points
  return points.NEntries();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdi, %r13
movq 0x50(%rdi), %rbp
testq %rbp, %rbp
sete %cl
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
seta %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x14f7d
movq %r8, %r14
maxsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
movsd %xmm2, 0x28(%rsp)
mulsd %xmm1, %xmm1
movsd %xmm1, 0x30(%rsp)
movslq %edx, %r12
leaq (,%r12,8), %rax
testl %r12d, %r12d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
movq %rsi, 0x20(%rsp)
callq 0xe030
movq %rax, %r15
movq %rax, 0x18(%rsp)
movq %rbx, 0x10(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movq 0x20(%rsp), %r8
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movl %r12d, %r9d
callq 0x1542c
testq %r14, %r14
je 0x14f72
cmpl $0x0, 0xc(%rbx)
jle 0x14f72
xorl %r12d, %r12d
xorpd %xmm1, %xmm1
movsd (%r15,%r12,8), %xmm0
ucomisd %xmm1, %xmm0
jb 0x14f57
sqrtsd %xmm0, %xmm0
jmp 0x14f60
callq 0xe340
xorpd %xmm1, %xmm1
movsd %xmm0, (%r14,%r12,8)
incq %r12
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jl 0x14f45
movq %r15, %rdi
callq 0xe5b0
movl 0xc(%rbx), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/msh2df/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<Point*>::~R3Kdtree()
R3Kdtree<PtrType>::
~R3Kdtree(void)
{
  // Check root
  if (!root) return;

  // Traverse tree deleting nodes
  RNArray<R3KdtreeNode<PtrType> *> stack;
  stack.InsertTail(root);
  while (!stack.IsEmpty()) {
    R3KdtreeNode<PtrType> *node = stack.Tail();
    stack.RemoveTail();
    if (node->children[0]) stack.Insert(node->children[0]);
    if (node->children[1]) stack.Insert(node->children[1]);
    delete node;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x50(%rdi)
je 0x15027
movq %rsp, %rdi
callq 0x784c4
movq 0x50(%rbx), %rsi
movq %rsp, %rdi
movl 0xc(%rdi), %edx
callq 0x7855a
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x1501f
movq %rsp, %r14
movq (%rsp), %rcx
movslq %eax, %rsi
movq -0x8(%rcx,%rsi,8), %r15
decl %esi
movq %r14, %rdi
callq 0x786ce
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x14ff0
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x7855a
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0x15005
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x7855a
testq %r15, %r15
je 0x15017
movl $0x130, %esi            # imm = 0x130
movq %r15, %rdi
callq 0xe450
movl 0xc(%rsp), %eax
testl %eax, %eax
jne 0x14fc5
movq %rsp, %rdi
callq 0x7852e
movq %rbx, %rdi
callq 0x3c198
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x1503b
movq %rax, %rdi
callq 0x158e5
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/msh2df/../../pkgs/R3Shapes/R3Kdtree.cpp
// Function: gaps::R3Kdtree<Point*>::FindClosest(gaps::R3Point const&, double, double, double*) const
PtrType R3Kdtree<PtrType>::
FindClosest(const R3Point& query_position, 
  RNScalar min_distance, RNScalar max_distance, 
  RNScalar *closest_distance) 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;

  // Initialize nearest point 
  PtrType nearest_point = NULL;
  RNLength nearest_distance_squared = max_distance_squared;

  // Search nodes recursively
  FindClosest(root, bbox, 
    NULL, query_position, 
    min_distance_squared, max_distance_squared, 
    NULL, NULL, 
    nearest_point, nearest_distance_squared);

  // Return closest distance
  if (closest_distance) *closest_distance = sqrt(nearest_distance_squared);

  // Return closest point
  return nearest_point;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movapd %xmm0, %xmm2
movq 0x50(%rdi), %rax
testq %rax, %rax
sete %cl
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
seta %dl
orb %cl, %dl
je 0x1591b
xorl %eax, %eax
jmp 0x15986
movq %rsi, %r8
maxsd %xmm2, %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
xorl %r10d, %r10d
leaq 0x10(%rsp), %r11
movq %r10, (%r11)
leaq 0x8(%rsp), %r14
movsd %xmm1, (%r14)
subq $0x8, %rsp
movq %rax, %rsi
movq %rdi, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %r14
pushq %r11
pushq %r10
callq 0x1598e
addq $0x20, %rsp
testq %rbx, %rbx
je 0x15981
movsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x15978
sqrtsd %xmm0, %xmm0
jmp 0x1597d
callq 0xe340
movsd %xmm0, (%rbx)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::R3MeshSearchTree(gaps::R3Mesh*)
R3MeshSearchTree::
R3MeshSearchTree(R3Mesh *mesh)
  : mesh(mesh),
    nnodes(1),
    mark(1)
{
  // Create root 
  root = new R3MeshSearchTreeNode(NULL);
  assert(root);

  // Insert faces into tree
  for (int i = 0; i < mesh->NFaces(); i++) {
    R3MeshFace *face = mesh->Face(i);
    InsertFace(face);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, (%rdi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x10(%rdi)
movl $0x48, %edi
callq 0xe440
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x19406
movq %r15, 0x8(%r14)
cmpl $0x0, 0x34(%rbx)
jle 0x15eb4
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x15ed2
incq %r15
movslq 0x34(%rbx), %rax
cmpq %rax, %r15
jl 0x15e98
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x48, %esi
movq %r15, %rdi
callq 0xe450
movq %rbx, %rdi
callq 0xe7f0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::InsertFace(gaps::R3MeshFace*)
void R3MeshSearchTree::
InsertFace(R3MeshFace *face)
{
  // Check if face intersects box
  if (!R3Intersects(mesh, face, BBox())) return;

  // Create container
  R3MeshSearchTreeFace *face_container = new R3MeshSearchTreeFace(mesh, face);
  assert(face_container);

  // Insert face into root
  InsertFace(face_container, root, BBox(), 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xf8(%rdi), %rdx
callq 0x15f96
testl %eax, %eax
je 0x15f4f
movl $0x18, %edi
callq 0xe440
movq %rax, %r15
movq (%rbx), %rdi
movq %r14, (%rax)
testb $0x2, 0xa8(%r14)
jne 0x15f19
movq (%rdi), %rax
movq %r14, %rsi
callq *0x2c0(%rax)
movsd 0x90(%r14), %xmm0
movsd %xmm0, 0x8(%r15)
movq $0x0, 0x10(%r15)
movq 0x8(%rbx), %rdx
movl $0xf8, %ecx
addq (%rbx), %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x16336
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0xe450
movq %rbx, %rdi
callq 0xe7f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::Empty(gaps::R3MeshSearchTreeNode*)
void R3MeshSearchTree::
Empty(R3MeshSearchTreeNode *node)
{
  // Delete children
  if (node->children[0]) {
    Empty(node->children[0]);
    delete node->children[0];
    node->children[0] = NULL;
  }
  if (node->children[1]) {
    Empty(node->children[1]);
    delete node->children[1];
    node->children[1] = NULL;
  }

  // Delete small face containers
  for (int i = 0; i < node->small_faces.NEntries(); i++) {
    R3MeshSearchTreeFace *face = node->small_faces[i];
    assert(face->reference_count > 0);
    if (--(face->reference_count) == 0) delete face;
  }

  // Delete big face containers
  for (int i = 0; i < node->big_faces.NEntries(); i++) {
    R3MeshSearchTreeFace *face = node->big_faces[i];
    assert(face->reference_count > 0);
    if (--(face->reference_count) == 0) delete face;
  }

  // Empty face containers
  node->small_faces.Empty();
  node->big_faces.Empty();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
je 0x16605
movq %r14, %rdi
callq 0x165b6
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x165fd
leaq 0x38(%r15), %rdi
callq 0x7852e
leaq 0x28(%r15), %rdi
callq 0x7852e
movl $0x48, %esi
movq %r15, %rdi
callq 0xe450
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x16646
movq %r14, %rdi
callq 0x165b6
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x1663e
leaq 0x38(%r14), %rdi
callq 0x7852e
leaq 0x28(%r14), %rdi
callq 0x7852e
movl $0x48, %esi
movq %r14, %rdi
callq 0xe450
movq $0x0, 0x10(%rbx)
leaq 0x38(%rbx), %r14
cmpl $0x0, 0x44(%rbx)
jle 0x16680
xorl %r15d, %r15d
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
decl 0x10(%rdi)
setne %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x16674
movl $0x18, %esi
callq 0xe450
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0x16653
leaq 0x28(%rbx), %r15
cmpl $0x0, 0x34(%rbx)
jle 0x166ba
xorl %r12d, %r12d
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
decl 0x10(%rdi)
setne %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x166ae
movl $0x18, %esi
callq 0xe450
incq %r12
movslq 0x34(%rbx), %rax
cmpq %rax, %r12
jl 0x1668d
movq %r14, %rdi
xorl %esi, %esi
callq 0x78704
movq %r15, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x78704
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::DistanceSquared(gaps::R3Point const&, gaps::R3Box const&, double) const
RNScalar R3MeshSearchTree::
DistanceSquared(const R3Point& query_position, const R3Box& box, RNScalar max_distance_squared) const
{
  // Find and check axial distances from face to node box
  RNScalar dx, dy, dz;
  if (query_position.X() > box.XMax()) dx = query_position.X() - box.XMax();
  else if (query_position.X() < box.XMin()) dx = box.XMin()- query_position.X();
  else dx = 0.0;
  RNScalar dx_squared = dx * dx;
  if (dx_squared >= max_distance_squared) return dx_squared;
  if (query_position.Y() > box.YMax()) dy = query_position.Y() - box.YMax();
  else if (query_position.Y() < box.YMin()) dy = box.YMin()- query_position.Y();
  else dy = 0.0;
  RNScalar dy_squared = dy * dy;
  if (dy_squared >= max_distance_squared) return dy_squared;
  if (query_position.Z() > box.ZMax()) dz = query_position.Z() - box.ZMax();
  else if (query_position.Z() < box.ZMin()) dz = box.ZMin()- query_position.Z();
  else dz = 0.0;
  RNScalar dz_squared = dz * dz;
  if (dz_squared >= max_distance_squared) return dz_squared;
    
  // Find and check actual distance from face to node box
  RNScalar distance_squared = 0;
  if ((dy == 0.0) && (dz == 0.0)) distance_squared = dx_squared;
  else if ((dx == 0.0) && (dz == 0.0)) distance_squared = dy_squared;
  else if ((dx == 0.0) && (dy == 0.0)) distance_squared = dz_squared;
  else distance_squared = dx_squared + dy_squared + dz_squared;

  // Return distance squared
  return distance_squared;
}

// Assembly:
movapd %xmm0, %xmm1
movsd (%rsi), %xmm0
movsd 0x20(%rdx), %xmm2
ucomisd %xmm2, %xmm0
jbe 0x1725f
subsd %xmm2, %xmm0
movapd %xmm0, %xmm2
jmp 0x17276
movsd 0x8(%rdx), %xmm3
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm3
jbe 0x17276
subsd %xmm0, %xmm3
movapd %xmm3, %xmm2
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jae 0x1731a
movsd 0x8(%rsi), %xmm4
movsd 0x28(%rdx), %xmm3
ucomisd %xmm3, %xmm4
jbe 0x172a2
subsd %xmm3, %xmm4
movapd %xmm4, %xmm3
jmp 0x172b9
movsd 0x10(%rdx), %xmm5
xorpd %xmm3, %xmm3
ucomisd %xmm4, %xmm5
jbe 0x172b9
subsd %xmm4, %xmm5
movapd %xmm5, %xmm3
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm4
ucomisd %xmm1, %xmm4
jae 0x1732b
movsd 0x10(%rsi), %xmm5
movsd 0x30(%rdx), %xmm6
ucomisd %xmm6, %xmm5
jbe 0x172e1
subsd %xmm6, %xmm5
movapd %xmm5, %xmm6
jmp 0x172f8
movsd 0x18(%rdx), %xmm7
xorpd %xmm6, %xmm6
ucomisd %xmm5, %xmm7
jbe 0x172f8
subsd %xmm5, %xmm7
movapd %xmm7, %xmm6
movapd %xmm6, %xmm5
mulsd %xmm6, %xmm5
ucomisd %xmm1, %xmm5
jae 0x17340
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jne 0x1731b
jp 0x1731b
ucomisd %xmm1, %xmm6
jne 0x1731b
jp 0x1731b
retq
ucomisd %xmm1, %xmm2
jne 0x17330
jp 0x17330
ucomisd %xmm1, %xmm6
jne 0x17330
jp 0x17330
movapd %xmm4, %xmm0
retq
ucomisd %xmm1, %xmm2
jne 0x17345
jp 0x17345
ucomisd %xmm1, %xmm3
jne 0x17345
jp 0x17345
movapd %xmm5, %xmm0
retq
addsd %xmm4, %xmm0
addsd %xmm5, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::FindIntersection(gaps::R3Ray const&, gaps::R3MeshIntersection&, double, double, int (*)(gaps::R3Point const&, gaps::R3Vector const&, gaps::R3Mesh*, gaps::R3MeshFace*, void*), void*)
void R3MeshSearchTree::
FindIntersection(const R3Ray& ray, R3MeshIntersection& closest,
  RNScalar min_t, RNScalar max_t, 
  int (*IsCompatible)(const R3Point&, const R3Vector&, R3Mesh *, R3MeshFace *, void *), void *compatible_data)
{
  // Initialize result
  closest.type = R3_MESH_NULL_TYPE;
  closest.vertex = NULL;
  closest.edge = NULL;
  closest.face = NULL;
  closest.point = R3zero_point;
  closest.t = 0;

  // Check root
  if (!root) return;

  // Update mark (used to avoid checking same face twice)
  mark++;

  // Search nodes recursively
  FindIntersection(ray, closest,
    min_t, max_t,
    IsCompatible, compatible_data, 
    root, BBox());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movsd %xmm0, 0x8(%rsp)
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movsd %xmm1, 0x10(%rsp)
movl $0x0, (%rdx)
leaq 0x20(%rdx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdx)
xorl %ebp, %ebp
movq %rbp, 0x18(%rdx)
leaq 0x4d7b8f(%rip), %rsi    # 0x4f0d60
callq 0x50c3c
movq %rbp, 0x38(%r15)
movq 0x8(%r13), %rax
testq %rax, %rax
je 0x19217
incl 0x14(%r13)
movl $0xf8, %r10d
addq (%r13), %r10
leaq 0x10(%rsp), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movsd 0x8(%rsp), %xmm0
movq %r14, %r8
movq %rbx, %r9
pushq %r10
pushq %rax
callq 0x18e52
addq $0x10, %rsp
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::Outline(gaps::R3MeshSearchTreeNode*, gaps::R3Box const&) const
void R3MeshSearchTree::
Outline(R3MeshSearchTreeNode *node, const R3Box& node_box) const
{
  // Draw kdtree nodes recursively
  if (node->children[0]) {
    assert(node->children[1]);
    assert(node->split_coordinate >= node_box[RN_LO][node->split_dimension]);
    assert(node->split_coordinate <= node_box[RN_HI][node->split_dimension]);
    R3Box child0_box(node_box);
    R3Box child1_box(node_box);
    child0_box[RN_HI][node->split_dimension] = node->split_coordinate;
    child1_box[RN_LO][node->split_dimension] = node->split_coordinate;
    Outline(node->children[0], child0_box);
    Outline(node->children[1], child1_box);
  }
  else {
    node_box.Outline();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r15
cmpq $0x0, 0x8(%rsi)
je 0x192a9
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x3b340
movq %rsp, %rdi
movq %r15, %rsi
callq 0x3b340
movsd 0x18(%r14), %xmm0
movslq 0x20(%r14), %rax
movsd %xmm0, 0x58(%rsp,%rax,8)
movsd %xmm0, 0x8(%rsp,%rax,8)
movq 0x8(%r14), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x19226
movq 0x10(%r14), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x19226
movq %rsp, %rdi
callq 0x3c198
leaq 0x38(%rsp), %rdi
callq 0x3c198
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq (%r15), %rax
movq 0xb0(%rax), %rax
movl $0x1, %esi
movq %r15, %rdi
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
jmpq *%rax
movq %rax, %rbx
jmp 0x192d6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3c198
leaq 0x38(%rsp), %rdi
callq 0x3c198
movq %rbx, %rdi
callq 0xe7f0
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshSearchTree.cpp
// Function: gaps::R3MeshSearchTree::Print(gaps::R3MeshSearchTreeNode*, int) const
int R3MeshSearchTree::
Print(R3MeshSearchTreeNode *node, int depth) const
{
  // Check node
  if (!node) return 0;

  // Initialize number of decendents
  int ndecendents0 = 0;
  int ndecendents1 = 0;

  // Process interior node
  if (node->children[0] && node->children[1]) {
    // Print balance of children
    ndecendents0 = Print(node->children[0], depth+1);
    ndecendents1 = Print(node->children[1], depth+1);

    // Print balance of this node
    printf("%d", depth);
    for (int i = 0; i <= depth; i++) printf("  ");
    printf("I %d : %d %d %g\n", node->big_faces.NEntries(), ndecendents0, ndecendents1, (double) ndecendents0 / (double) ndecendents1);
  }
  else {
    printf("%d", depth);
    for (int i = 0; i <= depth; i++) printf("  ");
    printf("L %d \n", node->small_faces.NEntries());
  }

  // Return number of nodes rooted in this subtree
  return 1 + ndecendents0 + ndecendents1;
}

// Assembly:
testq %rsi, %rsi
je 0x193f3
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
je 0x193a5
cmpq $0x0, 0x10(%rbx)
je 0x193a5
movq %rdi, %r12
leal 0x1(%r14), %ebp
movl %ebp, %edx
callq 0x19300
movl %eax, %r15d
movq 0x10(%rbx), %rsi
movq %r12, %rdi
movl %ebp, %edx
callq 0x19300
movl %eax, %r12d
leaq 0x9aa36(%rip), %rdi     # 0xb3d8a
movl %r14d, %esi
xorl %eax, %eax
callq 0xe070
testl %r14d, %r14d
js 0x19378
leaq 0x98d8b(%rip), %r14     # 0xb20f5
movq %r14, %rdi
xorl %eax, %eax
callq 0xe070
decl %ebp
jne 0x1936a
cvtsi2sd %r15d, %xmm0
movl 0x34(%rbx), %esi
cvtsi2sd %r12d, %xmm1
divsd %xmm1, %xmm0
leaq 0x91238(%rip), %rdi     # 0xaa5c8
movl %r15d, %edx
movl %r12d, %ecx
movb $0x1, %al
callq 0xe070
leal (%r15,%r12), %eax
incl %eax
jmp 0x193ea
leaq 0x9a9de(%rip), %rdi     # 0xb3d8a
movl %r14d, %esi
xorl %eax, %eax
callq 0xe070
testl %r14d, %r14d
js 0x193d4
incl %r14d
leaq 0x98d30(%rip), %r15     # 0xb20f5
movq %r15, %rdi
xorl %eax, %eax
callq 0xe070
decl %r14d
jne 0x193c5
movl 0x44(%rbx), %esi
leaq 0x911fb(%rip), %rdi     # 0xaa5d9
xorl %eax, %eax
callq 0xe070
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/skaringa[P]DistanceCalculation/Sample.cpp
// Function: compareDistanceCalculators(Point&, Point&, std::__cxx11::list<DistanceCalculator*, std::allocator<DistanceCalculator*>>&)
static void compareDistanceCalculators(Point & p1, Point & p2, list<DistanceCalculator*> & calcs) 
{
	cout << "Distance " << p1.name() << " - " << p2.name() << ": " << endl;

	list<DistanceCalculator*>::const_iterator ical;
	for (ical = calcs.begin(); ical != calcs.end(); ++ical) {
		DistanceCalculator::use(*ical);
		cout << setw(12) << (*ical)->name() << ": ";
		cout << setw(8) << setprecision(6) << fixed << p1.distance(p2) << " km" << endl;
	}	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x2d65(%rip), %r12      # 0x5fd0
leaq 0xf19(%rip), %rsi       # 0x418b
movl $0x9, %edx
movq %r12, %rdi
callq 0x21a0
movq (%r15), %rax
movq %r15, %rdi
callq *0x28(%rax)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r12, %rdi
callq 0x21a0
movq %rax, %r13
leaq 0xef4(%rip), %rsi       # 0x4195
movl $0x3, %edx
movq %rax, %rdi
callq 0x21a0
movq (%r14), %rax
movq %r14, %rdi
callq *0x28(%rax)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r13, %rdi
callq 0x21a0
movq %rax, %r13
leaq 0xec9(%rip), %rsi       # 0x4199
movl $0x2, %edx
movq %rax, %rdi
callq 0x21a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq (%rbx), %rbp
cmpq %rbx, %rbp
je 0x3414
movq 0x10(%rbp), %rdi
callq 0x23c4
movq (%r12), %rax
movq -0x18(%rax), %rax
movq $0xc, 0x10(%r12,%rax)
movq 0x10(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
testq %rax, %rax
je 0x3355
movq %rax, %r13
movq %rax, %rdi
callq 0x20b0
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21a0
jmp 0x336e
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x2220
movl $0x2, %edx
movq %r12, %rdi
leaq 0xe1c(%rip), %rsi       # 0x4199
callq 0x21a0
movq (%r12), %rax
movq -0x18(%rax), %rcx
movq $0x8, 0x10(%r12,%rcx)
movq -0x18(%rax), %rcx
movq $0x6, 0x8(%r12,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r12,%rax), %ecx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl %edx, %ecx
orl $0x4, %ecx
movl %ecx, 0x18(%r12,%rax)
movq (%r15), %rax
movq %r15, %rdi
movq %r14, %rsi
callq *0x20(%rax)
movq %r12, %rdi
callq 0x2210
movq %rax, %r13
movl $0x3, %edx
movq %rax, %rdi
leaq 0xdbe(%rip), %rsi       # 0x419c
callq 0x21a0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2170
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq (%rbp), %rbp
jmp 0x3308
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/skaringa[P]DistanceCalculation/./SimpleDistanceCalculator.h
// Function: SimpleDistanceCalculator::distance(Point const&, Point const&) const
virtual double distance(const Point & from, const Point & to) const {
		double lat1 = (from.lat() + to.lat()) / 2 * DEG_TO_RAD;
		double dx = 111.3 * cos(lat1) * (from.lon() - to.lon());
		double dy = 111.3 * (from.lat() - to.lat());
		return sqrt(dx * dx + dy * dy);
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
addsd 0x8(%rsp), %xmm0
mulsd 0xb8d(%rip), %xmm0      # 0x4090
mulsd 0xb8d(%rip), %xmm0      # 0x4098
callq 0x2250
mulsd 0xb70(%rip), %xmm0      # 0x4088
movsd %xmm0, 0x10(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x10(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movsd %xmm0, 0x10(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0xb12(%rip), %xmm1      # 0x4088
mulsd %xmm1, %xmm1
movapd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movapd %xmm1, %xmm0
jb 0x35a6
sqrtsd %xmm0, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/skaringa[P]DistanceCalculation/./SphereDistanceCalculator.h
// Function: SphereDistanceCalculator::distance(Point const&, Point const&) const
virtual double distance(const Point & from, const Point & to) const {
		double lat1 = from.lat() * DEG_TO_RAD;
		double lon1 = from.lon() * DEG_TO_RAD;
		double lat2 = to.lat() * DEG_TO_RAD;
		double lon2 = to.lon() * DEG_TO_RAD;
		return 6378.388 * acos(sin(lat1) * sin(lat2) 
			+ cos(lat1) * cos(lat2) * cos(lon2 - lon1));
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
mulsd 0xac0(%rip), %xmm0      # 0x4098
movsd %xmm0, (%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
mulsd 0xaaa(%rip), %xmm0      # 0x4098
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
mulsd 0xa93(%rip), %xmm0      # 0x4098
movsd %xmm0, 0x10(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
mulsd 0xa7c(%rip), %xmm0      # 0x4098
subsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
callq 0x2060
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2060
movsd %xmm0, 0x18(%rsp)
movsd (%rsp), %xmm0
callq 0x2250
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
callq 0x2250
mulsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x2250
mulsd (%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
addsd %xmm1, %xmm0
callq 0x2160
mulsd 0xa06(%rip), %xmm0      # 0x40a0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/skaringa[P]DistanceCalculation/./SphereDistanceHaversineCalculator.h
// Function: SphereDistanceHaversineCalculator::distance(Point const&, Point const&) const
virtual double distance(const Point & from, const Point & to) const {

		double lat1 = from.lat() * DEG_TO_RAD;
		double lon1 = from.lon() * DEG_TO_RAD;
		double lat2 = to.lat() * DEG_TO_RAD;
		double lon2 = to.lon() * DEG_TO_RAD;
        double dLat = lat2-lat1;
        double dLon = lon2-lon1;
        double a = pow(sin(dLat/2.0), 2) +
            pow(sin(dLon/2.0), 2) * cos(lat1) * cos(lat2); 
        double c = 2.0 * atan2(sqrt(a),sqrt(1.0-a));
        
		return 6378.388 * c;
	}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
mulsd 0x9d0(%rip), %xmm0      # 0x4098
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
mulsd 0x9b9(%rip), %xmm0      # 0x4098
movsd %xmm0, 0x18(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
mulsd 0x9a2(%rip), %xmm0      # 0x4098
movsd %xmm0, 0x20(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
mulsd 0x98b(%rip), %xmm0      # 0x4098
subsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
mulsd 0x963(%rip), %xmm0      # 0x4090
callq 0x2060
mulsd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0x946(%rip), %xmm0      # 0x4090
callq 0x2060
mulsd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x2250
mulsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x2250
movapd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
addsd 0x18(%rsp), %xmm1
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm1
jb 0x379b
sqrtsd %xmm1, %xmm2
jmp 0x37b8
movapd %xmm1, %xmm0
movsd %xmm1, 0x8(%rsp)
callq 0x2120
xorpd %xmm3, %xmm3
movsd 0x8(%rsp), %xmm1
movapd %xmm0, %xmm2
movsd 0x8e8(%rip), %xmm0      # 0x40a8
subsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jb 0x37d3
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
jmp 0x37e8
movsd %xmm2, 0x8(%rsp)
callq 0x2120
movsd 0x8(%rsp), %xmm2
movapd %xmm0, %xmm1
movapd %xmm2, %xmm0
callq 0x2050
addsd %xmm0, %xmm0
mulsd 0x8a3(%rip), %xmm0      # 0x40a0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./util/config.h
// Function: Hash<char [32]>* getInstance<char [32]>(int)
Hash<Key_t>* getInstance(const int index_type){
    const size_t initialTableSize = 1024*16;
    if(index_type == TYPE_EXTENDIBLE_HASH)
	return new ExtendibleHash<Key_t>(initialTableSize/Segment<Key_t>::kNumSlot);
    else if(index_type == TYPE_LINEAR_HASH)
	return new LinearProbingHash<Key_t>(initialTableSize);
    else if(index_type == TYPE_CUCKOO_HASH)
	return new CuckooHash<Key_t>(initialTableSize);
    else
	fprintf(stderr, "unkown index type %d\n", index_type);
    return nullptr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
je 0x828d
movl %edi, %edx
cmpl $0x1, %edi
je 0x82a9
testl %edx, %edx
jne 0x82ce
movl $0x10, %edi
callq 0x21f0
movq %rax, %rbx
movl $0x10, %esi
movq %rax, %rdi
callq 0x83ae
jmp 0x82c3
movl $0xe0, %edi
callq 0x21f0
movq %rax, %rbx
movl $0x4000, %esi           # imm = 0x4000
movq %rax, %rdi
callq 0x866a
jmp 0x82c3
movl $0x50, %edi
callq 0x21f0
movq %rax, %rbx
movl $0x4000, %esi           # imm = 0x4000
movq %rax, %rdi
callq 0x8564
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xbcf3(%rip), %rax      # 0x13fc8
movq (%rax), %rdi
leaq 0x50a7(%rip), %rsi      # 0xd386
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2260
jmp 0x82c3
movq %rax, %r14
movl $0x50, %esi
jmp 0x8306
movq %rax, %r14
movl $0xe0, %esi
jmp 0x8306
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x2200
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./util/pair.h
// Function: void gen_input<char [32]>(Pair<char [32]>*, int)
void gen_input(Pair<Key_t>* arr, int num){
    if constexpr(sizeof(Key_t) > 8){
	char s[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
	for(int i=0; i<num; i++){
	    int j;
	    for(j=0; j<sizeof(Key_t)-1; j++)
		arr[i].key[j] = s[rand() % sizeof(s)-1];
	    arr[i].key[j] = 0;
	    arr[i].value = i+1;
	}
    }
    else{
	for(int i=0; i<num; i++){
	    arr[i].key = i+1;
	    arr[i].value = i+1;
	}
    }
}

// Assembly:
testl %esi, %esi
jle 0x83ad
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %eax
movq %rax, (%rsp)
xorl %r15d, %r15d
movabsq $0x3521cfb2b78c1353, %r12 # imm = 0x3521CFB2B78C1353
leaq 0x51ba(%rip), %r13      # 0xd500
movq %rdi, %rbp
movq $-0x1f, %r14
callq 0x2060
movslq %eax, %rcx
movq %rcx, %rax
mulq %r12
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x5, %rax
imulq $0x35, %rax, %rax
subq %rax, %rcx
movb -0x1(%rcx,%r13), %al
movb %al, 0x1f(%rbp,%r14)
incq %r14
jne 0x8350
leaq (%r15,%r15,4), %rax
movb $0x0, 0x1f(%rbx,%rax,8)
incq %r15
movq %r15, 0x20(%rbx,%rax,8)
addq $0x28, %rbp
cmpq (%rsp), %r15
jne 0x8349
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./index/linear_probing.h
// Function: LinearProbingHash<char [32]>::LinearProbingHash(unsigned long)
LinearProbingHash(size_t _capacity): capacity{_capacity}, dict{new Pair<Key_t>[capacity]} {
	locksize = 256;
	nlocks = capacity / locksize + 1;
	mutex = new shared_mutex[nlocks];
	invalid_initialize<Key_t>();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb6f7(%rip), %rax      # 0x13c70
movq %rax, (%rdi)
movabsq $0x3f73333340000000, %rax # imm = 0x3F73333340000000
movq %rax, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movl $0x28, %ecx
movq %rsi, %rax
mulq %rcx
movq $-0x1, %r15
cmovoq %r15, %rax
movq %rax, %rdi
callq 0x2030
movq %rax, %rcx
testq %r14, %r14
je 0x85d7
leaq (,%r14,8), %rax
leaq (%rax,%rax,4), %rax
xorl %edx, %edx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rcx,%rdx)
movups %xmm0, (%rcx,%rdx)
addq $0x28, %rdx
cmpq %rdx, %rax
jne 0x85c5
shrq $0x8, %r14
leal 0x1(%r14), %esi
movslq %esi, %r12
movl $0x38, %edx
movq %r12, %rax
mulq %rdx
movq %rcx, 0x18(%rbx)
movq $0x0, 0x30(%rbx)
movl $0x0, 0x38(%rbx)
movl $0x100, 0x4c(%rbx)      # imm = 0x100
movl %esi, 0x48(%rbx)
cmovnoq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r15
incl %r14d
je 0x8649
imulq $0x38, %r12, %rax
addq $-0x38, %rax
shrq $0x3, %rax
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulq %rcx
imulq $0x38, %rdx, %rdx
addq $0x38, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r15, 0x40(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0xbc89(%rip)     # 0x142e0
movaps %xmm0, 0xbc72(%rip)     # 0x142d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./index/cuckoo_hash.h
// Function: CuckooHash<char [32]>::CuckooHash(unsigned long)
CuckooHash(size_t _capacity): capacity{_capacity}, table{new Pair<Key_t>[capacity]} {
        memset(&pushed, 0, sizeof(Pair<Key_t>)*2);
        locksize = 256;
        nlocks = capacity / locksize + 1;
        mutex = new std::shared_mutex[nlocks];
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb651(%rip), %rax      # 0x13cd0
movq %rax, (%rdi)
movl $0xc70f6907, %eax       # imm = 0xC70F6907
movq %rax, 0x8(%rdi)
movq $0x200, 0x10(%rdi)      # imm = 0x200
movq $0x2, 0x18(%rdi)
movl $0x3f99999a, 0x20(%rdi) # imm = 0x3F99999A
movq $0x80, 0x28(%rdi)
movq %rsi, 0x30(%rdi)
movl $0x28, %ecx
movq %rsi, %rax
mulq %rcx
movq $-0x1, %rdi
cmovnoq %rax, %rdi
callq 0x2030
testq %r14, %r14
je 0x86ed
shlq $0x3, %r14
leaq (%r14,%r14,4), %rcx
xorl %edx, %edx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%rdx)
movups %xmm0, (%rax,%rdx)
addq $0x28, %rdx
cmpq %rdx, %rcx
jne 0x86db
movq %rax, 0x38(%rbx)
leaq 0x40(%rbx), %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
addq $0x28, %rcx
cmpq $0x50, %rcx
jne 0x86fa
movl $0x0, 0xc8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0xa0(%rbx)
movl $0x100, 0xdc(%rbx)      # imm = 0x100
movq 0x30(%rbx), %r12
shrq $0x8, %r12
leal 0x1(%r12), %eax
movl %eax, 0xd8(%rbx)
movslq %eax, %r15
movl $0x38, %ecx
movq %r15, %rax
mulq %rcx
movq $-0x1, %rdi
cmovnoq %rax, %rdi
callq 0x2030
movq %rax, %r14
incl %r12d
je 0x87ad
imulq $0x38, %r15, %rax
addq $-0x38, %rax
shrq $0x3, %rax
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulq %rcx
imulq $0x38, %rdx, %rdx
addq $0x38, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r14, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./index/extendible_hash.h
// Function: ExtendibleHash<char [32]>::Capacity()
size_t ExtendibleHash<Key_t>::Capacity(void) {
    size_t cnt = 0;
    for(int i=0; i<dir->capacity; cnt++){
	auto target = dir->_[i];
	auto stride = pow(2, dir->depth - target->local_depth);
	i += stride;
    }
    return cnt * Segment<Key_t>::kNumSlot;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
xorl %r15d, %r15d
cmpq $0x0, 0x10(%rax)
je 0x9354
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %ecx, %ecx
movq (%rax), %rdx
movq 0x18(%rax), %rax
movq (%rdx,%rcx,8), %rcx
subq 0xa000(%rcx), %rax
movq %rax, %xmm1
punpckldq 0x3cfc(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x3d04(%rip), %xmm1     # 0xd020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2190
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %r15d
movslq %r15d, %rcx
movq 0x8(%rbx), %rax
addq $0x400, %r14            # imm = 0x400
cmpq %rcx, 0x10(%rax)
ja 0x92f5
jmp 0x9357
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./util/hash.h
// Function: jenkins(void const*, unsigned long, unsigned long)
inline size_t jenkins(const void* _ptr, size_t _len, size_t _seed=0xc70f6907UL){
  size_t i = 0;
  size_t hash = 0;
  const char* key = static_cast<const char*>(_ptr);
  while (i != _len) {
    hash += key[i++];
    hash += hash << (10);
    hash ^= hash >> (6);
  }
  hash += hash << (3);
  hash ^= hash >> (11);
  hash += hash << (15);
  return hash;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x95d7
xorl %ecx, %ecx
movsbq (%rdi,%rax), %rdx
incq %rax
addq %rcx, %rdx
movq %rdx, %r8
shlq $0xa, %r8
addq %rdx, %r8
movq %r8, %rcx
shrq $0x6, %rcx
xorq %r8, %rcx
cmpq %rax, %rsi
jne 0x95af
leaq (%rcx,%rcx,8), %rax
movq %rax, %rcx
shrq $0xb, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0xf, %rax
addq %rcx, %rax
retq