LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x14f52
movq %rsp, %rdi
callq 0x77608
movq 0x50(%rbx), %rsi
movq %rsp, %rdi
movl 0xc(%rdi), %edx
callq 0x7769e
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x14f4a
movq %rsp, %r14
movq (%rsp), %rcx
movslq %eax, %rsi
movq -0x8(%rcx,%rsi,8), %r15
decl %esi
movq %r14, %rdi
callq 0x77828
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x14f20
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x7769e
movq 0x10(%r15), %rsi
testq %rsi, %rsi
je 0x14f35
movl 0xc(%rsp), %edx
movq %r14, %rdi
callq 0x7769e
movl $0x130, %esi            # imm = 0x130
movq %r15, %rdi
callq 0xe450
movl 0xc(%rsp), %eax
testl %eax, %eax
jne 0x14ef5
movq %rsp, %rdi
callq 0x77672
movq %rbx, %rdi
callq 0x3b8a8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x14f66
movq %rax, %rdi
callq 0x1581b
// File: /workspace/github_cpp_makefile_star2_O3/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 0x15851
xorl %eax, %eax
jmp 0x158bc
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 0x158c4
addq $0x20, %rsp
testq %rbx, %rbx
je 0x158b7
movsd 0x8(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x158ae
sqrtsd %xmm0, %xmm0
jmp 0x158b3
callq 0xe340
movsd %xmm0, (%rbx)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x192e0
movq %r15, 0x8(%r14)
cmpl $0x0, 0x34(%rbx)
jle 0x15de8
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x15e06
incq %r15
movslq 0x34(%rbx), %rax
cmpq %rax, %r15
jl 0x15dcc
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_O3/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 0x15ece
testl %eax, %eax
je 0x15e88
movl $0x18, %edi
callq 0xe440
movq %rax, %r15
movq (%rbx), %rcx
movq %r14, (%rax)
testb $0x2, 0xa8(%r14)
jne 0x15e53
movq (%rcx), %rax
movq %rcx, %rdi
movq %r14, %rsi
callq *0x2c0(%rax)
movq (%rbx), %rcx
movsd 0x90(%r14), %xmm0
movsd %xmm0, 0x8(%r15)
movq $0x0, 0x10(%r15)
movq 0x8(%rbx), %rdx
addq $0xf8, %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x16234
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0xe450
movq %rbx, %rdi
callq 0xe7f0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x16507
movq %r14, %rdi
callq 0x164b8
movq 0x8(%rbx), %r15
testq %r15, %r15
je 0x164f2
leaq 0x38(%r15), %rdi
callq 0x77672
leaq 0x28(%r15), %rdi
callq 0x77672
movl $0x48, %esi
movq %r15, %rdi
callq 0xe450
movq $0x0, 0x8(%rbx)
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x16548
movq %r14, %rdi
callq 0x164b8
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x16533
leaq 0x38(%r14), %rdi
callq 0x77672
leaq 0x28(%r14), %rdi
callq 0x77672
movl $0x48, %esi
movq %r14, %rdi
callq 0xe450
movq $0x0, 0x10(%rbx)
leaq 0x38(%rbx), %r14
movl 0x44(%rbx), %eax
testl %eax, %eax
jle 0x1657a
xorl %r15d, %r15d
movq (%r14), %rcx
movq (%rcx,%r15,8), %rdi
decl 0x10(%rdi)
jne 0x1656f
movl $0x18, %esi
callq 0xe450
movl 0x44(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x16556
leaq 0x28(%rbx), %r15
movl 0x34(%rbx), %eax
testl %eax, %eax
jle 0x165ac
xorl %r12d, %r12d
movq (%r15), %rcx
movq (%rcx,%r12,8), %rdi
decl 0x10(%rdi)
jne 0x165a1
movl $0x18, %esi
callq 0xe450
movl 0x34(%rbx), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x16588
movq %r14, %rdi
xorl %esi, %esi
callq 0x77868
movq %r15, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x77868
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x17151
subsd %xmm2, %xmm0
movapd %xmm0, %xmm2
jmp 0x17168
movsd 0x8(%rdx), %xmm3
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm3
jbe 0x17168
subsd %xmm0, %xmm3
movapd %xmm3, %xmm2
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jae 0x1720c
movsd 0x8(%rsi), %xmm4
movsd 0x28(%rdx), %xmm3
ucomisd %xmm3, %xmm4
jbe 0x17194
subsd %xmm3, %xmm4
movapd %xmm4, %xmm3
jmp 0x171ab
movsd 0x10(%rdx), %xmm5
xorpd %xmm3, %xmm3
ucomisd %xmm4, %xmm5
jbe 0x171ab
subsd %xmm4, %xmm5
movapd %xmm5, %xmm3
movapd %xmm3, %xmm4
mulsd %xmm3, %xmm4
ucomisd %xmm1, %xmm4
jae 0x1721d
movsd 0x10(%rsi), %xmm5
movsd 0x30(%rdx), %xmm6
ucomisd %xmm6, %xmm5
jbe 0x171d3
subsd %xmm6, %xmm5
movapd %xmm5, %xmm6
jmp 0x171ea
movsd 0x18(%rdx), %xmm7
xorpd %xmm6, %xmm6
ucomisd %xmm5, %xmm7
jbe 0x171ea
subsd %xmm5, %xmm7
movapd %xmm7, %xmm6
movapd %xmm6, %xmm5
mulsd %xmm6, %xmm5
ucomisd %xmm1, %xmm5
jae 0x17232
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm3
jne 0x1720d
jp 0x1720d
ucomisd %xmm1, %xmm6
jne 0x1720d
jp 0x1720d
retq
ucomisd %xmm1, %xmm2
jne 0x17222
jp 0x17222
ucomisd %xmm1, %xmm6
jne 0x17222
jp 0x17222
movapd %xmm4, %xmm0
retq
ucomisd %xmm1, %xmm2
jne 0x17237
jp 0x17237
ucomisd %xmm1, %xmm3
jne 0x17237
jp 0x17237
movapd %xmm5, %xmm0
retq
addsd %xmm4, %xmm0
addsd %xmm5, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4d7cb5(%rip), %rsi    # 0x4f0d60
callq 0x500a6
movq %rbp, 0x38(%r15)
movq 0x8(%r13), %rax
testq %rax, %rax
je 0x190f1
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 0x18d20
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_O3/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 0x19183
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x3aa88
movq %rsp, %rdi
movq %r15, %rsi
callq 0x3aa88
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 0x19100
movq 0x10(%r14), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x19100
movq %rsp, %rdi
callq 0x3b8a8
leaq 0x38(%rsp), %rdi
callq 0x3b8a8
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 0x191b0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3b8a8
leaq 0x38(%rsp), %rdi
callq 0x3b8a8
movq %rbx, %rdi
callq 0xe7f0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x192cd
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
je 0x1927f
cmpq $0x0, 0x10(%rbx)
je 0x1927f
movq %rdi, %r12
leal 0x1(%r14), %ebp
movl %ebp, %edx
callq 0x191da
movl %eax, %r15d
movq 0x10(%rbx), %rsi
movq %r12, %rdi
movl %ebp, %edx
callq 0x191da
movl %eax, %r12d
leaq 0x9ab8c(%rip), %rdi     # 0xb3dba
movl %r14d, %esi
xorl %eax, %eax
callq 0xe070
testl %r14d, %r14d
js 0x19252
leaq 0x98ec1(%rip), %r14     # 0xb2105
movq %r14, %rdi
xorl %eax, %eax
callq 0xe070
decl %ebp
jne 0x19244
cvtsi2sd %r15d, %xmm0
movl 0x34(%rbx), %esi
cvtsi2sd %r12d, %xmm1
divsd %xmm1, %xmm0
leaq 0x9134e(%rip), %rdi     # 0xaa5b8
movl %r15d, %edx
movl %r12d, %ecx
movb $0x1, %al
callq 0xe070
leal (%r15,%r12), %eax
incl %eax
jmp 0x192c4
leaq 0x9ab34(%rip), %rdi     # 0xb3dba
movl %r14d, %esi
xorl %eax, %eax
callq 0xe070
testl %r14d, %r14d
js 0x192ae
incl %r14d
leaq 0x98e66(%rip), %r15     # 0xb2105
movq %r15, %rdi
xorl %eax, %eax
callq 0xe070
decl %r14d
jne 0x1929f
movl 0x44(%rbx), %esi
leaq 0x91311(%rip), %rdi     # 0xaa5c9
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_O3/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 0x2d93(%rip), %r12      # 0x5fd0
leaq 0xfc7(%rip), %rsi       # 0x420b
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 0xfa2(%rip), %rsi       # 0x4215
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 0xf77(%rip), %rsi       # 0x4219
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 0x33e6
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 0x3327
movq %rax, %r13
movq %rax, %rdi
callq 0x20b0
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x21a0
jmp 0x3340
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 0xeca(%rip), %rsi       # 0x4219
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 0xe6c(%rip), %rsi       # 0x421c
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 0x32da
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xc59(%rip), %xmm0      # 0x4110
mulsd 0xc59(%rip), %xmm0      # 0x4118
callq 0x2250
mulsd 0xc3c(%rip), %xmm0      # 0x4108
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 0xbde(%rip), %xmm1      # 0x4108
mulsd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xbaa(%rip), %xmm0      # 0x4118
movsd %xmm0, (%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
mulsd 0xb94(%rip), %xmm0      # 0x4118
movsd %xmm0, 0x8(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
mulsd 0xb7d(%rip), %xmm0      # 0x4118
movsd %xmm0, 0x10(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
mulsd 0xb66(%rip), %xmm0      # 0x4118
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 0xaf0(%rip), %xmm0      # 0x4120
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaba(%rip), %xmm0      # 0x4118
movsd %xmm0, 0x8(%rsp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
mulsd 0xaa3(%rip), %xmm0      # 0x4118
movsd %xmm0, 0x18(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
mulsd 0xa8c(%rip), %xmm0      # 0x4118
movsd %xmm0, 0x20(%rsp)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
mulsd 0xa75(%rip), %xmm0      # 0x4118
subsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x20(%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
mulsd 0xa4d(%rip), %xmm0      # 0x4110
callq 0x2060
mulsd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0xa30(%rip), %xmm0      # 0x4110
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 0x3731
sqrtsd %xmm1, %xmm2
jmp 0x374e
movapd %xmm1, %xmm0
movsd %xmm1, 0x8(%rsp)
callq 0x2120
xorpd %xmm3, %xmm3
movsd 0x8(%rsp), %xmm1
movapd %xmm0, %xmm2
movsd 0x9d2(%rip), %xmm0      # 0x4128
subsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jb 0x3769
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
jmp 0x377e
movsd %xmm2, 0x8(%rsp)
callq 0x2120
movsd 0x8(%rsp), %xmm2
movapd %xmm0, %xmm1
movapd %xmm2, %xmm0
callq 0x2050
addsd %xmm0, %xmm0
mulsd 0x98d(%rip), %xmm0      # 0x4120
addq $0x28, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0x906d
movl %edi, %edx
cmpl $0x1, %edi
je 0x9089
testl %edx, %edx
jne 0x90ae
movl $0x10, %edi
callq 0x21f0
movq %rax, %rbx
movl $0x10, %esi
movq %rax, %rdi
callq 0x919a
jmp 0x90a3
movl $0xe0, %edi
callq 0x21f0
movq %rax, %rbx
movl $0x4000, %esi           # imm = 0x4000
movq %rax, %rdi
callq 0x945c
jmp 0x90a3
movl $0x50, %edi
callq 0x21f0
movq %rax, %rbx
movl $0x4000, %esi           # imm = 0x4000
movq %rax, %rdi
callq 0x9356
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xbf13(%rip), %rax      # 0x14fc8
movq (%rax), %rdi
leaq 0x5307(%rip), %rsi      # 0xe3c6
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2260
jmp 0x90a3
movq %rax, %r14
movl $0x50, %esi
jmp 0x90e6
movq %rax, %r14
movl $0xe0, %esi
jmp 0x90e6
movq %rax, %r14
movl $0x10, %esi
movq %rbx, %rdi
callq 0x2200
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
testl %esi, %esi
jle 0x918b
movl %esi, %eax
movq %rax, 0x10(%rsp)
xorl %r15d, %r15d
movabsq $0x3521cfb2b78c1353, %r12 # imm = 0x3521CFB2B78C1353
leaq 0x5418(%rip), %r13      # 0xe540
movq 0x8(%rsp), %rbp
leaq (%r15,%r15,4), %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,8), %rbx
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 0x9141
movb $0x0, 0x1f(%rbx)
incq %r15
movq %r15, 0x20(%rbx)
addq $0x28, %rbp
cmpq 0x10(%rsp), %r15
jne 0x912d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb905(%rip), %rax      # 0x14c70
movq %rax, (%rdi)
movsd 0x4cfa(%rip), %xmm0     # 0xe070
movsd %xmm0, 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 0x93c8
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 0x93b6
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 0x943a
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, 0xbe98(%rip)     # 0x152e0
movaps %xmm0, 0xbe81(%rip)     # 0x152d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb85f(%rip), %rax      # 0x14cd0
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, %r15
cmovoq %r15, %rax
movq %rax, %rdi
callq 0x2030
testq %r14, %r14
je 0x94e6
leaq (,%r14,8), %rcx
leaq (%rcx,%rcx,4), %rcx
xorl %edx, %edx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax,%rdx)
movups %xmm0, (%rax,%rdx)
addq $0x28, %rdx
cmpq %rdx, %rcx
jne 0x94d4
movq %rax, 0x38(%rbx)
shrq $0x8, %r14
leal 0x1(%r14), %ecx
movslq %ecx, %r12
movl $0x38, %edx
movq %r12, %rax
mulq %rdx
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
movl %ecx, 0xd8(%rbx)
cmovnoq %rax, %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r15
incl %r14d
je 0x9581
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, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa04c
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 0x4034(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x403c(%rip), %xmm1     # 0xe050
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 0x9fed
jmp 0xa04f
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa2cf
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 0xa2a7
leaq (%rcx,%rcx,8), %rax
movq %rax, %rcx
shrq $0xb, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0xf, %rax
addq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/extendible_hash.h
// Function: Segment<char [32]>::Insert4split(char (&) [32], long, unsigned long)
bool Segment<Key_t>::Insert4split(Key_t& key, Value_t value, size_t loc) {
    for (unsigned i = 0; i < kNumPairPerCacheLine * kNumCacheLine; ++i) {
	auto slot = (loc+i) % kNumSlot;
	if constexpr(sizeof(Key_t) > 8){
	    if(memcmp(_[slot].key, INVALID<Key_t>, sizeof(Key_t)) == 0){
		memcpy(_[slot].key, key, sizeof(Key_t));
		memcpy(&_[slot].value, &value, sizeof(Value_t));
		return true;
	    }
	}
	else{
	    if(memcmp(&_[slot].key, &INVALID<Key_t>, sizeof(Key_t)) == 0){
		memcpy(&_[slot].key, &key, sizeof(Key_t));
		memcpy(&_[slot].value, &value, sizeof(Value_t));
		return true;
	    }
	}
    }
    return false;
}

// Assembly:
movl %ecx, %eax
andl $0x3ff, %eax            # imm = 0x3FF
leaq (%rax,%rax,4), %rax
movdqu (%rdi,%rax,8), %xmm0
movdqu 0x10(%rdi,%rax,8), %xmm1
pcmpeqb 0xafde(%rip), %xmm1     # 0x152e0
pcmpeqb 0xafc6(%rip), %xmm0     # 0x152d0
pand %xmm1, %xmm0
pmovmskb %xmm0, %r8d
cmpl $0xffff, %r8d           # imm = 0xFFFF
je 0xa37f
movq $-0x1, %rax
cmpq $0x3fe, %rax            # imm = 0x3FE
je 0xa398
leal (%rcx,%rax), %r8d
addl $0x2, %r8d
andl $0x3ff, %r8d            # imm = 0x3FF
leaq (%r8,%r8,4), %r8
movdqu (%rdi,%r8,8), %xmm0
movdqu 0x10(%rdi,%r8,8), %xmm1
pcmpeqb 0xaf8d(%rip), %xmm1     # 0x152e0
pcmpeqb 0xaf75(%rip), %xmm0     # 0x152d0
pand %xmm1, %xmm0
pmovmskb %xmm0, %r9d
incq %rax
cmpl $0xffff, %r9d           # imm = 0xFFFF
jne 0xa323
leaq (%rdi,%r8,8), %rcx
cmpq $0x3ff, %rax            # imm = 0x3FF
setb %al
jmp 0xa385
leaq (%rdi,%rax,8), %rcx
movb $0x1, %al
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
movq %rdx, 0x20(%rcx)
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/linear_probing.h
// Function: LinearProbingHash<char [32]>::Update(char (&) [32], long)
bool LinearProbingHash<Key_t>::Update(Key_t& key, Value_t value){
    uint64_t key_hash;
    if constexpr(sizeof(Key_t) > 8)
	key_hash = h(key, sizeof(Key_t));
    else
	key_hash = h(&key, sizeof(Key_t));

RETRY:
    while(resizing_lock){
	asm("nop");
    }
    for(int i=0; i<capacity; i++){
	auto loc = (key_hash + i) % capacity;
	unique_lock<shared_mutex> lock(mutex[loc/locksize]);
	if constexpr(sizeof(Key_t) > 8){
	    if(memcmp(dict[loc].key, key, sizeof(Key_t)) == 0){
		memcpy(&dict[loc].value, &value, sizeof(Value_t));
		return true;
	    }
	}
	else{
	    if(memcmp(&dict[loc].key, &key, sizeof(Key_t)) == 0){
		memcpy(&dict[loc].value, &value, sizeof(Value_t));
		return true;
	    }
	}
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %esi
movl $0xc70697, %edx         # imm = 0xC70697
movq %r14, %rdi
callq 0x2050
movq %rax, %r12
cmpl $0x0, 0x38(%r15)
je 0xa664
nop
jmp 0xa65a
movq 0x10(%r15), %rcx
testq %rcx, %rcx
je 0xa706
movq %rbx, 0x10(%rsp)
xorl %ebx, %ebx
movq %rsp, %r13
leaq (%r12,%rbx), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rbp
movslq 0x4c(%r15), %rcx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
imulq $0x38, %rax, %rax
addq 0x40(%r15), %rax
movq %rax, (%rsp)
movb $0x0, 0x8(%rsp)
movq %r13, %rdi
callq 0xad3c
movb $0x1, 0x8(%rsp)
movq 0x18(%r15), %rax
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
movdqu (%rax,%rcx,8), %xmm0
movdqu 0x10(%rax,%rcx,8), %xmm1
movdqu (%r14), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%r14), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0xa70a
movq %r13, %rdi
callq 0xaa52
incq %rbx
movq 0x10(%r15), %rcx
cmpq %rbx, %rcx
ja 0xa67b
xorl %eax, %eax
jmp 0xa721
leaq (%rax,%rcx,8), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq %rsp, %rdi
callq 0xaa52
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/linear_probing.h
// Function: LinearProbingHash<char [32]>::Delete(char (&) [32])
bool LinearProbingHash<Key_t>::Delete(Key_t& key){
    uint64_t key_hash;
    if constexpr(sizeof(Key_t) > 8)
	key_hash = h(key, sizeof(Key_t));
    else
	key_hash = h(&key, sizeof(Key_t));

RETRY:
    while(resizing_lock){
	asm("nop");
    }
    for(int i=0; i<capacity; i++){
	auto loc = (key_hash + i) % capacity;
	unique_lock<shared_mutex> lock(mutex[loc/locksize]);
	if constexpr(sizeof(Key_t) > 8){
	    if(memcmp(dict[loc].key, key, sizeof(Key_t)) == 0){
		memcpy(dict[loc].key, INVALID<Key_t>, sizeof(Key_t));
		return true;
	    }
	}
	else{
	    if(memcmp(&dict[loc].key, &key, sizeof(Key_t)) == 0){
		memcpy(&dict[loc].key, &INVALID<Key_t>, sizeof(Key_t));
		return true;
	    }
	}
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %esi
movl $0xc70697, %edx         # imm = 0xC70697
movq %rbx, %rdi
callq 0x2050
movq %rax, %r15
cmpl $0x0, 0x38(%r14)
je 0xa763
nop
jmp 0xa759
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0xa801
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
leaq (%r15,%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r13
movslq 0x4c(%r14), %rcx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
imulq $0x38, %rax, %rax
addq 0x40(%r14), %rax
movq %rax, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r12, %rdi
callq 0xad3c
movb $0x1, 0x10(%rsp)
movq 0x18(%r14), %rax
leaq (,%r13,4), %rcx
addq %r13, %rcx
movdqu (%rax,%rcx,8), %xmm0
movdqu 0x10(%rax,%rcx,8), %xmm1
movdqu (%rbx), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%rbx), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0xa805
movq %r12, %rdi
callq 0xaa52
incq %rbp
movq 0x10(%r14), %rcx
cmpq %rbp, %rcx
ja 0xa777
xorl %eax, %eax
jmp 0xa82c
leaq (%rax,%rcx,8), %rax
movaps 0xaad0(%rip), %xmm0     # 0x152e0
movups %xmm0, 0x10(%rax)
movdqa 0xaab4(%rip), %xmm0     # 0x152d0
movdqu %xmm0, (%rax)
leaq 0x8(%rsp), %rdi
callq 0xaa52
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/linear_probing.h
// Function: LinearProbingHash<char [32]>::Get(char (&) [32])
char* LinearProbingHash<Key_t>::Get(Key_t& key){
    uint64_t key_hash;
    if constexpr(sizeof(Key_t) > 8)
	key_hash = h(key, sizeof(Key_t));
    else
	key_hash = h(&key, sizeof(Key_t));

RETRY:
    while(resizing_lock){
	asm("nop");
    }
    for(int i=0; i<capacity; i++){
	auto loc = (key_hash + i) % capacity;
	shared_lock<shared_mutex> lock(mutex[loc/locksize]);
	if constexpr(sizeof(Key_t) > 8){
	    if(memcmp(dict[loc].key, key, sizeof(Key_t)) == 0){
		return (char*)dict[loc].value;
	    }
	}
	else{
	    if(memcmp(&dict[loc].key, &key, sizeof(Key_t)) == 0){
		return (char*)dict[loc].value;
	    }
	}
    }
    return (char*)NONE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x20, %esi
movl $0xc70697, %edx         # imm = 0xC70697
movq %rbx, %rdi
callq 0x2050
movq %rax, %r12
cmpl $0x0, 0x38(%r14)
je 0xa86c
nop
jmp 0xa862
movq 0x10(%r14), %rcx
testq %rcx, %rcx
je 0xa8ef
xorl %r15d, %r15d
leaq (%r12,%r15), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rbp
movslq 0x4c(%r14), %rcx
movq %rdx, %rax
xorl %edx, %edx
divq %rcx
imulq $0x38, %rax, %r13
addq 0x40(%r14), %r13
movq %r13, %rdi
callq 0xad9a
movq 0x18(%r14), %rax
leaq (,%rbp,4), %rcx
addq %rbp, %rcx
movdqu (%rax,%rcx,8), %xmm0
movdqu 0x10(%rax,%rcx,8), %xmm1
movdqu (%rbx), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%rbx), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0xa8f3
movq %r13, %rdi
callq 0x2240
incq %r15
movq 0x10(%r14), %rcx
cmpq %r15, %rcx
ja 0xa878
xorl %ebx, %ebx
jmp 0xa903
leaq (%rax,%rcx,8), %rax
movq 0x20(%rax), %rbx
movq %r13, %rdi
callq 0x2240
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/linear_probing.h
// Function: LinearProbingHash<char [32]>::Utilization()
double Utilization(void){
	size_t size = 0;
	for(int i=0; i<capacity; i++){
	    if constexpr(sizeof(Key_t) > 8){
		if(memcmp(dict[i].key, INVALID<Key_t>, sizeof(Key_t)) != 0)
		    size++;
	    }
	    else{
		if(memcmp(&dict[i].key, &INVALID<Key_t>, sizeof(Key_t)) != 0)
		    size++;
	    }
	}
	return ((double)size) / ((double)capacity)*100;
    }

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xa985
movq 0x18(%rdi), %rdx
xorl %ecx, %ecx
movq %rax, %rsi
movdqu (%rdx), %xmm0
movdqu 0x10(%rdx), %xmm1
pcmpeqb 0xa9a7(%rip), %xmm1     # 0x152e0
pcmpeqb 0xa98f(%rip), %xmm0     # 0x152d0
pand %xmm1, %xmm0
pmovmskb %xmm0, %edi
xorl %r8d, %r8d
cmpl $0xffff, %edi           # imm = 0xFFFF
setne %r8b
addq %r8, %rcx
addq $0x28, %rdx
decq %rsi
jne 0xa928
movq %rcx, %xmm1
punpckldq 0x36d1(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x36d9(%rip), %xmm1     # 0xe050
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0xa989
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
mulsd 0x371b(%rip), %xmm0     # 0xe0b8
retq
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/linear_probing.h
// Function: LinearProbingHash<char [32]>::FindAnyway(char (&) [32])
void LinearProbingHash<Key_t>::FindAnyway(Key_t& key){
	for(int i=0; i<capacity; i++){
		if constexpr(sizeof(Key_t) > 8){
			if(memcmp(dict[i].key, key, sizeof(Key_t)) == 0){
				//cout << "FOUND: " << dict[i].key << "\t" << key << endl;
				return;
			}
		}
		else{
			if(memcmp(&dict[i].key, &key, sizeof(Key_t)) == 0){
				//cout << "FOUND: " << dict[i].key << "\t" << key << endl;
				return;
			}
		}
	}
	cout << "NOT FOUND for key " << key << endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xa9eb
movq 0x18(%rdi), %rcx
movdqu (%rbx), %xmm0
movdqu 0x10(%rbx), %xmm1
movdqu (%rcx), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%rcx), %xmm3
pcmpeqb %xmm1, %xmm3
pand %xmm2, %xmm3
pmovmskb %xmm3, %edx
cmpl $0xffff, %edx           # imm = 0xFFFF
je 0xaa4a
addq $0x28, %rcx
decq %rax
jne 0xa9c1
movq 0xa5ce(%rip), %r14      # 0x14fc0
leaq 0x3a21(%rip), %rsi      # 0xe41a
movl $0x12, %edx
movq %r14, %rdi
callq 0x2210
movq %rbx, %rdi
callq 0x20a0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2210
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2120
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/cuckoo_hash.h
// Function: CuckooHash<char [32]>::Utilization()
double CuckooHash<Key_t>::Utilization(void) {
  size_t n = 0;
  for (int i = 0; i < capacity; i++) {
	  if constexpr(sizeof(Key_t) > 8){
		  if(memcmp(table[i].key, INVALID<Key_t>, sizeof(Key_t)) != 0)
			  n++;
	  }
	  else{
		  if(memcmp(&table[i].key, &INVALID<Key_t>, sizeof(Key_t)) != 0)
			  n++;
	  }
  }
  return ((double)n)/((double)capacity)*100;
}

// Assembly:
movq 0x30(%rdi), %rax
testq %rax, %rax
je 0xbb41
movq 0x38(%rdi), %rdx
xorl %ecx, %ecx
movq %rax, %rsi
movdqu (%rdx), %xmm0
movdqu 0x10(%rdx), %xmm1
pcmpeqb 0x97eb(%rip), %xmm1     # 0x152e0
pcmpeqb 0x97d3(%rip), %xmm0     # 0x152d0
pand %xmm1, %xmm0
pmovmskb %xmm0, %edi
xorl %r8d, %r8d
cmpl $0xffff, %edi           # imm = 0xFFFF
setne %r8b
addq %r8, %rcx
addq $0x28, %rdx
decq %rsi
jne 0xbae4
movq %rcx, %xmm1
punpckldq 0x2515(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x251d(%rip), %xmm1     # 0xe050
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0xbb45
xorpd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
mulsd 0x255f(%rip), %xmm0     # 0xe0b8
retq
// File: /workspace/github_cpp_makefile_star2_O3/chahk0129[P]hash_bench/./index/cuckoo_hash.h
// Function: CuckooHash<char [32]>::execute_path(std::vector<std::pair<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&, bool)
bool CuckooHash<Key_t>::execute_path(vector<pair<size_t,string>>& path, bool flag) {
  auto i = 0;
  auto j = (i+1)%2;

  for (auto p: path) {
	  memcpy(pushed[j].key, table[p.first].key, sizeof(Key_t));
	  memcpy(&pushed[j].value, &table[p.first].value, sizeof(Value_t));
	  memcpy(table[p.first].key, pushed[i].key, sizeof(Key_t));
	  memcpy(&table[p.first].value, &pushed[i].value, sizeof(Value_t));
	 // memcpy(&pushed[j], &table[p.first], sizeof(Pair<Key_t>));
	  //memcpy(&table[p.first], &pushed[i], sizeof(Pair<Key_t>));
    //pushed[j] = table[p.first];
    //table[p.first] = pushed[i];
    i = (i+1)%2;
    j = (i+1)%2;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq (%rsi), %r12
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rsp)
cmpq %rax, %r12
je 0xd2d3
movq 0x10(%rsp), %rax
leaq 0x40(%rax), %r14
movl $0x1, %ebp
xorl %r13d, %r13d
movq (%r12), %rax
movq %rax, 0x20(%rsp)
leaq 0x8(%r12), %r15
leaq 0xf(%rsp), %rdi
movq %r15, %rsi
callq 0x7e9c
leaq 0x38(%rsp), %rbx
movq %rbx, 0x28(%rsp)
leaq 0xf(%rsp), %rdi
callq 0xc5f8
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xc814
movl %ebp, %eax
leaq (%rax,%rax,4), %rax
movq 0x10(%rsp), %rdi
movq 0x38(%rdi), %rcx
movq 0x20(%rsp), %rdx
leaq (%rdx,%rdx,4), %rdx
movups (%rcx,%rdx,8), %xmm0
movups 0x10(%rcx,%rdx,8), %xmm1
movups %xmm1, 0x10(%r14,%rax,8)
movups %xmm0, (%r14,%rax,8)
movq 0x20(%rcx,%rdx,8), %rsi
movq %rsi, 0x20(%r14,%rax,8)
movl %r13d, %eax
leaq (%rax,%rax,4), %rax
movups (%r14,%rax,8), %xmm0
movups 0x10(%r14,%rax,8), %xmm1
movups %xmm1, 0x10(%rcx,%rdx,8)
movups %xmm0, (%rcx,%rdx,8)
movq 0x38(%rdi), %rcx
movq 0x20(%rsp), %rdx
leaq (%rdx,%rdx,4), %rdx
movq 0x20(%r14,%rax,8), %rax
movq %rax, 0x20(%rcx,%rdx,8)
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0xd2b4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movl %r13d, %ebp
andl $0x1, %ebp
movl %ebp, %r13d
xorl $0x1, %r13d
addq $0x20, %r15
movq %r15, %r12
cmpq 0x18(%rsp), %r15
jne 0xd1ef
movb $0x1, %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq