LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/subgraph_t.cc
// Function: subgraph_t::fill_graph(graph_hash_t&)
void subgraph_t::fill_graph(graph_hash_t& g)
{       
    nodes_vec.clear();
    edge_set.clear();
    
    inout_label_map.clear(); // maps internal labels to original
    outin_label_map.clear(); // original labels to internal    

    nodes_vec.resize(g.size());
    inout_label_map.resize(g.size());
    int cnt = 0;
    for(graph_hash_t::nodes_map_t::iterator it = g.nodes_map.begin();
            it != g.nodes_map.end();
            ++it) {
        inout_label_map[cnt] = it->first;
        outin_label_map.insert(make_pair(it->first, cnt));
        cnt++;
    }
    for(set<edge_t>::iterator it = g.edge_set.begin();
            it != g.edge_set.end();
            ++it) {
        node_id_t src, dst;
        src = outin_label_map[it->first];
        dst = outin_label_map[it->second];
        insert_edge(src, dst);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x26a54
leaq 0x18(%r14), %rdi
callq 0x18802
leaq 0x48(%r14), %r12
movq 0x48(%r14), %rax
cmpq %rax, 0x50(%r14)
je 0x2676a
movq %rax, 0x50(%r14)
leaq 0x60(%r14), %r15
movq %r15, %rdi
callq 0x5040
movq %rbx, %rdi
callq 0x176f6
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movq %rax, %rsi
callq 0x4874
movq %rbx, %rdi
callq 0x176f6
movq %r12, %rdi
movq %rax, %rsi
callq 0x1141a
movq %rbx, %rdi
callq 0xb11c
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbp
movq %rsp, %r14
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x26802
movl (%rax), %eax
movq (%r12), %rcx
movl %eax, (%rcx,%r13,4)
movl %eax, (%rsp)
movl %r13d, 0x4(%rsp)
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x26a5c
incq %r13
leaq 0x10(%rsp), %rdi
callq 0xbdd6
movq 0x10(%rsp), %rax
jmp 0x267c0
movq 0x48(%rbx), %r12
addq $0x38, %rbx
movq 0x8(%rsp), %r14
cmpq %rbx, %r12
je 0x26849
leaq 0x20(%r12), %rsi
movq %r15, %rdi
callq 0x46f8
movl (%rax), %ebp
leaq 0x24(%r12), %rsi
movq %r15, %rdi
callq 0x46f8
movl (%rax), %edx
movq %r14, %rdi
movl %ebp, %esi
callq 0x260cc
movq %r12, %rdi
callq 0x2290
movq %rax, %r12
jmp 0x2680f
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/subgraph_t.cc
// Function: subgraph_t::fill_graph(graph_t&)
void subgraph_t::fill_graph(graph_t& g)
{       
    nodes_vec.clear();
    edge_set.clear();
    
    inout_label_map.clear(); // maps internal labels to original
    outin_label_map.clear(); // original labels to internal    

    nodes_vec.resize(g.size());
    for(node_id_t i = 0; i < g.size(); ++i) {
        nodes_vec[i] = g.nodes_vec[i].nbrs_vec;
    } 
    edge_set = g.edge_set;
    
    inout_label_map.resize(size());
    for(node_id_t i = 0; i < size(); ++i) {
        outin_label_map.insert(make_pair(i, i));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x26a54
leaq 0x18(%rbx), %r13
movq %r13, %rdi
callq 0x18802
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x2688b
movq %rax, 0x50(%rbx)
leaq 0x48(%rbx), %r12
leaq 0x60(%rbx), %r14
movq %r14, %rdi
callq 0x5040
movq %r15, %rdi
callq 0x18d3c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4874
xorl %eax, %eax
movl %eax, %ebp
movq %r15, %rdi
callq 0x18d3c
cmpq %rbp, %rax
jbe 0x268d6
imulq $0x18, %rbp, %rdi
movq (%r15), %rsi
addq %rdi, %rsi
addq (%rbx), %rdi
callq 0x47aa
leal 0x1(%rbp), %eax
jmp 0x268b0
addq $0x30, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x23078
movq 0x8(%rbx), %rax
subq (%rbx), %rax
pushq $0x18
popq %r13
cqto
idivq %r13
movq %r12, %rdi
movq %rax, %rsi
callq 0x1141a
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movl %ebp, %ecx
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
idivq %r13
cmpq %rcx, %rax
jbe 0x26939
movl %ebp, 0x8(%rsp)
movl %ebp, 0xc(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x26a5c
incl %ebp
jmp 0x2690c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/utility.cc
// Function: simple_stats(std::vector<double, std::allocator<double>>, double&, double&, double&, double&, double&)
void simple_stats(vector<double> vec,
        double& mean,
        double& stddev,
        double& median,
        double& min,
        double& max)
{
    sort(vec.begin(), vec.end());
    min = *(min_element(vec.begin(), vec.end()));
    max = *(max_element(vec.begin(), vec.end()));
    double sum = accumulate(vec.begin(), vec.end(), 0.0);
    mean = sum/vec.size();
    median = vec[vec.size()/2];
    
    double sum_2 = 0;
    for(int i = 0; i < vec.size(); ++i)
        sum_2 += ((vec[i]-mean)*(vec[i]-mean));
    stddev = sqrt(sum_2/vec.size());
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r12
movq %r8, %r13
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movq (%rdi), %rdi
movq 0x8(%rbp), %rsi
callq 0x26cba
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
callq 0x26c64
movsd (%rax), %xmm0
movsd %xmm0, (%r13)
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
callq 0x26c8f
movsd (%rax), %xmm0
movsd %xmm0, (%r12)
movq (%rbp), %rax
movq 0x8(%rbp), %rdx
xorpd %xmm0, %xmm0
movq %rax, %rcx
cmpq %rdx, %rcx
je 0x26b49
addsd (%rcx), %xmm0
addq $0x8, %rcx
jmp 0x26b3a
subq %rax, %rdx
movq %rdx, %rcx
sarq $0x3, %rcx
movq %rcx, %xmm2
punpckldq 0x1690(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x1698(%rip), %xmm2     # 0x28200
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, (%r15)
sarq %rdx
andq $-0x8, %rdx
movsd (%rax,%rdx), %xmm0
movsd %xmm0, (%r14)
movsd (%r15), %xmm2
xorpd %xmm0, %xmm0
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x26bb4
movsd (%rax,%rdx,8), %xmm3
subsd %xmm2, %xmm3
mulsd %xmm3, %xmm3
addsd %xmm3, %xmm0
incq %rdx
jmp 0x26b99
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x26bc8
sqrtsd %xmm0, %xmm0
jmp 0x26bcd
callq 0x21d0
movsd %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/fjamour[P]icentral/src/utility.cc
// Function: extract_graph_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string extract_graph_name(string path)
{
    string out;
    int pos = path.rfind("/") + 1;
    int length = path.length() - pos + 1;
    out = path.substr(pos, length);
    return out;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x2180(%rip), %rsi      # 0x28d84
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x23a0
movl 0x8(%r14), %ecx
incl %eax
movslq %eax, %rdx
subl %edx, %ecx
incl %ecx
movslq %ecx, %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2260
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22d0
movq %r14, %rdi
callq 0x20d0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x26c51
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O2/sidscrazy[P]Paxos/paxos_tester.cpp
// Function: run_paxos(int, int)
std::chrono::duration<double> run_paxos (int n, int p){
	std::chrono::duration<double> total;
	for (int i = 0; i < ATTEMPTS; i++) {
		auto start = std::chrono::system_clock::now();
		PaxosController *pc  = new PaxosController(n, p);
		pc->end_simulation ();
		auto end = std::chrono::system_clock::now();
		std::chrono::duration<double> diff = end-start;
		pc->clear_memory ();
		delete pc;
		total += diff;
		std::cout << "cur avg "  << (total / (i + 1)).count () << " seconds." << std::endl;
	}

	return (total / ATTEMPTS );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %r14d
pushq $0x1
popq %r13
cmpl $0x10, %r13d
je 0x276a
callq 0x2030
movq %rax, %r12
movl $0xc8, %edi
callq 0x2210
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0x2bc0
movq %r15, %rdi
callq 0x2ec6
callq 0x2030
subq %r12, %rax
cvtsi2sd %rax, %xmm0
divsd 0x2912(%rip), %xmm0     # 0x5008
movsd %xmm0, -0x38(%rbp)
movq %r15, %rdi
callq 0x2f2e
movq %r15, %rdi
callq 0x2f96
movq %r15, %rdi
callq 0x21e0
movsd -0x30(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq 0x58af(%rip), %rdi      # 0x7fd8
leaq 0x2938(%rip), %rsi      # 0x5068
callq 0x2200
cvtsi2sd %r13d, %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x2300
movq %rax, %rdi
leaq 0x291c(%rip), %rsi      # 0x5071
callq 0x2200
movq %rax, %rdi
callq 0x2100
incl %r13d
jmp 0x26ad
movsd -0x30(%rbp), %xmm0
divsd 0x2899(%rip), %xmm0     # 0x5010
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x21e0
movq %rbx, %rdi
callq 0x2350
// File: /workspace/github_cpp_makefile_star2_O2/sidscrazy[P]Paxos/./paxos_controller.cpp
// Function: PaxosController::end_simulation()
void end_simulation (){
		int status;
		char buf[1024];
		for (int i = 0; i < nodes ; i++){
			threads[i].join ();
			waitpid (children[i], &status, 0);
		}
		log->CloseLogFile ();
		//std::cout << "Simulation Complete" << std::endl;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %r15d, %r15d
leaq -0x24(%rbp), %r14
xorl %r12d, %r12d
movslq 0xb0(%rbx), %rax
cmpq %rax, %r12
jge 0x2f14
movq 0x30(%rbx), %rdi
addq %r15, %rdi
callq 0x2330
movq (%rbx), %rax
movl (%rax,%r12,4), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2180
incq %r12
addq $0x8, %r15
jmp 0x2ee2
movq 0xc0(%rbx), %rdi
callq 0x3e4c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sidscrazy[P]Paxos/./paxos_controller.cpp
// Function: PaxosController::clear_memory()
void clear_memory (){
		children.erase (children.begin (), children.end ());
		sockets.erase (sockets.begin (), sockets.end ());
		threads.erase (threads.begin (), threads.end ());
		mutexes.clear ();
		delete log;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
callq 0x393c
leaq 0x18(%rbx), %rdi
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
callq 0x393c
leaq 0x30(%rbx), %rdi
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
callq 0x3946
movq 0x48(%rbx), %rax
cmpq %rax, 0x50(%rbx)
je 0x2f73
movq %rax, 0x50(%rbx)
movq 0xc0(%rbx), %rbx
testq %rbx, %rbx
je 0x2f87
movq %rbx, %rdi
callq 0x3dca
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x21e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/demo_kdtree.cpp
// Function: print_nodes(std::vector<Kdtree::KdNode, std::allocator<Kdtree::KdNode>> const&)
void print_nodes(const Kdtree::KdNodeVector &nodes) {
  size_t i,j;
  for (i = 0; i < nodes.size(); ++i) {
    if (i > 0)
      cout << " ";
    cout << "(";
    for (j = 0; j < nodes[i].point.size(); j++) {
      if (j > 0)
        cout << ",";
      cout << nodes[i].point[j];
    }
    cout << ")";
  }
  cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
movq 0x7ce5(%rip), %r14      # 0x9fc8
leaq 0x3d6e(%rip), %r12      # 0x6058
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
pushq $0x28
popq %rcx
idivq %rcx
cmpq %rax, %rbp
jae 0x2385
testq %rbp, %rbp
je 0x2316
movq %r14, %rdi
leaq 0x3d95(%rip), %rsi      # 0x60a6
callq 0x20f0
movq %r14, %rdi
leaq 0x3d80(%rip), %rsi      # 0x60a0
callq 0x20f0
imulq $0x28, %rbp, %r15
xorl %r13d, %r13d
movq (%rbx), %rcx
movq (%rcx,%r15), %rax
movq 0x8(%rcx,%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %r13
jae 0x236e
testq %r13, %r13
je 0x235b
movq %r14, %rdi
movq %r12, %rsi
callq 0x20f0
movq (%rbx), %rax
movq (%rax,%r15), %rax
movsd (%rax,%r13,8), %xmm0
movq %r14, %rdi
callq 0x2140
incq %r13
jmp 0x232c
movq %r14, %rdi
leaq 0x3eb5(%rip), %rsi      # 0x622d
callq 0x20f0
incq %rbp
jmp 0x22ea
movq 0x7c3c(%rip), %rdi      # 0x9fc8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2070
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::KdTree::KdTree(std::vector<Kdtree::KdNode, std::allocator<Kdtree::KdNode>> const*, int)
KdTree::KdTree(const KdNodeVector* nodes, int distance_type /*=2*/) {
  size_t i, j;
  double val;
  // copy over input data
  if (!nodes || nodes->empty())
    throw std::invalid_argument(
        "kdtree::KdTree(): argument nodes must not be empty");
  dimension = nodes->begin()->point.size();
  allnodes = *nodes;
  // initialize distance values
  distance = NULL;
  this->distance_type = -1;
  set_distance(distance_type);
  // compute global bounding box
  lobound = nodes->begin()->point;
  upbound = nodes->begin()->point;
  for (i = 1; i < nodes->size(); i++) {
    for (j = 0; j < dimension; j++) {
      val = allnodes[i].point[j];
      if (lobound[j] > val) lobound[j] = val;
      if (upbound[j] < val) upbound[j] = val;
    }
  }
  // build tree recursively
  root = build_tree(0, 0, allnodes.size());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
leaq 0x48(%rdi), %r15
xorpd %xmm0, %xmm0
movupd %xmm0, 0x48(%rdi)
andq $0x0, 0x58(%rdi)
movupd %xmm0, (%rdi)
movupd %xmm0, 0x10(%rdi)
movupd %xmm0, 0x20(%rdi)
testq %rsi, %rsi
je 0x371e
movq %rsi, %r12
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x371e
movl %edx, %ebp
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x3, %rcx
movq %rcx, 0x60(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x4156
andq $0x0, 0x38(%rbx)
orl $-0x1, 0x30(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x3782
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x2e52
movq (%r12), %rsi
movq %r14, %rdi
callq 0x2e52
movq 0x8(%r12), %rax
subq (%r12), %rax
pushq $0x28
popq %rcx
cqto
idivq %rcx
movq 0x60(%rbx), %rdx
pushq $0x1
popq %rsi
cmpq %rax, %rsi
jae 0x36ef
imulq $0x28, %rsi, %rdi
addq 0x48(%rbx), %rdi
movq (%rbx), %r8
movq 0x18(%rbx), %r9
xorl %r10d, %r10d
cmpq %r10, %rdx
je 0x36ea
movq (%rdi), %r11
movsd (%r11,%r10,8), %xmm0
movsd (%r8,%r10,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x36d7
movsd %xmm0, (%r8,%r10,8)
ucomisd (%r9,%r10,8), %xmm0
jbe 0x36e5
movsd %xmm0, (%r9,%r10,8)
incq %r10
jmp 0x36b7
incq %rsi
jmp 0x36a0
movq 0x50(%rbx), %rax
subq 0x48(%rbx), %rax
cqto
idivq %rcx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %rax, %rcx
callq 0x380e
movq %rax, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x2080
movq %rax, %r13
leaq 0x2c20(%rip), %rsi      # 0x6350
movq %rax, %rdi
callq 0x2190
movq 0x68a1(%rip), %rsi      # 0x9fe0
movq 0x688a(%rip), %rdx      # 0x9fd0
movq %r13, %rdi
callq 0x2170
jmp 0x375f
jmp 0x375f
movq %rax, %r12
movq %r13, %rdi
callq 0x20c0
jmp 0x3762
movq %rax, %r12
movq %r15, %rdi
callq 0x2e30
movq %r14, %rdi
callq 0x2fac
movq %rbx, %rdi
callq 0x2fac
movq %r12, %rdi
callq 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::KdTree::set_distance(int, std::vector<double, std::allocator<double>> const*)
void KdTree::set_distance(int distance_type,
                          const DoubleVector* weights /*=NULL*/) {
  if (distance) delete distance;
  this->distance_type = distance_type;
  if (distance_type == 0) {
    distance = (DistanceMeasure*)new DistanceL0(weights);
  } else if (distance_type == 1) {
    distance = (DistanceMeasure*)new DistanceL1(weights);
  } else {
    distance = (DistanceMeasure*)new DistanceL2(weights);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x37a0
movq (%rdi), %rax
callq *0x8(%rax)
movl %ebp, 0x30(%r14)
pushq $0x10
popq %rdi
callq 0x2100
movq %rax, %rbx
cmpl $0x1, %ebp
je 0x37c5
testl %ebp, %ebp
jne 0x37d2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4234
jmp 0x37dd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x428a
jmp 0x37dd
movq %rbx, %rdi
movq %r15, %rsi
callq 0x42e0
movq (%rbx), %rax
addq -0x30(%rax), %rbx
movq %rbx, 0x38(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37f7
jmp 0x37f7
movq %rax, %r14
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x2110
movq %r14, %rdi
callq 0x2180
nop
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::KdTree::range_nearest_neighbors(std::vector<double, std::allocator<double>> const&, double, std::vector<Kdtree::KdNode, std::allocator<Kdtree::KdNode>>*)
void KdTree::range_nearest_neighbors(const CoordPoint& point, double r,
                                     KdNodeVector* result) {
  KdNode temp;

  result->clear();
  if (point.size() != dimension)
    throw std::invalid_argument(
        "kdtree::k_nearest_neighbors(): point must be of same dimension as "
        "kdtree");
  if (this->distance_type == 2) {
    // if euclidien distance is used the range must be squared because we
    // get squared distances from this implementation
    r *= r;
  }

  // collect result in range_result
  std::vector<size_t> range_result;
  range_search(point, root, r, &range_result);

  // copy over result
  for (std::vector<size_t>::iterator i = range_result.begin();
       i != range_result.end(); ++i) {
    result->push_back(allnodes[*i]);
  }

  // clear vector
  range_result.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %rbx
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, %r14
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movapd %xmm0, 0x30(%rsp)
movq %rdx, %rdi
callq 0x2dda
movq 0x8(%r15), %rax
subq (%r15), %rax
sarq $0x3, %rax
cmpq 0x60(%r14), %rax
jne 0x3e48
cmpl $0x2, 0x30(%r14)
je 0x3dd0
movsd 0x8(%rsp), %xmm0
jmp 0x3dda
movsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
xorps %xmm1, %xmm1
leaq 0x10(%rsp), %rcx
movaps %xmm1, (%rcx)
andq $0x0, 0x10(%rcx)
movq 0x68(%r14), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3eac
movq 0x10(%rsp), %r15
cmpq 0x18(%rsp), %r15
je 0x3e1b
imulq $0x28, (%r15), %rsi
addq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x439e
addq $0x8, %r15
jmp 0x3dfe
movq 0x10(%rsp), %rax
cmpq %rax, %r15
je 0x3e2a
movq %rax, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x550a
leaq 0x30(%rsp), %rdi
callq 0x2fac
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
pushq $0x10
popq %rdi
callq 0x2080
movq %rax, %r14
leaq 0x2529(%rip), %rsi      # 0x6383
movq %rax, %rdi
callq 0x2190
movq 0x6177(%rip), %rsi      # 0x9fe0
movq 0x6160(%rip), %rdx      # 0x9fd0
movq %r14, %rdi
callq 0x2170
movq %rax, %rbx
jmp 0x3e99
movq %rax, %rbx
movq %r14, %rdi
callq 0x20c0
jmp 0x3e99
jmp 0x3e8c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x550a
leaq 0x30(%rsp), %rdi
callq 0x2fac
movq %rbx, %rdi
callq 0x2180
nop
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::KdTree::range_search(std::vector<double, std::allocator<double>> const&, Kdtree::kdtree_node*, double, std::vector<unsigned long, std::allocator<unsigned long>>*)
void KdTree::range_search(const CoordPoint& point, kdtree_node* node,
                          double r, std::vector<size_t>* range_result) {
  double curdist = distance->distance(point, node->point);
  if (curdist <= r) {
    range_result->push_back(node->dataindex);
  }
  if (node->loson != NULL && this->bounds_overlap_ball(point, r, node->loson)) {
    range_search(point, node->loson, r, range_result);
  }
  if (node->hison != NULL && this->bounds_overlap_ball(point, r, node->hison)) {
    range_search(point, node->hison, r, range_result);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movsd %xmm0, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x38(%r12), %rdi
leaq 0x10(%r14), %rdx
movq (%rdi), %rax
movq %r15, %rsi
callq *0x10(%rax)
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x3eed
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43f4
movq 0x28(%r14), %rdx
testq %rdx, %rdx
je 0x3f21
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3f50
testb %al, %al
je 0x3f21
movq 0x28(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
movq %rbx, %rcx
callq 0x3eac
movq 0x30(%r14), %rdx
testq %rdx, %rdx
je 0x3f44
movq %r12, %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
callq 0x3f50
testb %al, %al
je 0x3f44
movq 0x30(%r14), %r14
jmp 0x3ec5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::KdTree::bounds_overlap_ball(std::vector<double, std::allocator<double>> const&, double, Kdtree::kdtree_node*)
bool KdTree::bounds_overlap_ball(const CoordPoint& point, double dist,
                                 kdtree_node* node) {
  if (distance_type != 0) {
    double distsum = 0.0;
    size_t i;
    for (i = 0; i < dimension; i++) {
      if (point[i] < node->lobound[i]) {  // lower than low boundary
        distsum += distance->coordinate_distance(point[i], node->lobound[i], i);
        if (distsum > dist) return false;
      } else if (point[i] > node->upbound[i]) {  // higher than high boundary
        distsum += distance->coordinate_distance(point[i], node->upbound[i], i);
        if (distsum > dist) return false;
      }
    }
    return true;
  } else { // maximum distance needs different treatment
    double max_dist = 0.0;
    double curr_dist = 0.0;
    size_t i;
    for (i = 0; i < dimension; i++) {
      if (point[i] < node->lobound[i]) {  // lower than low boundary
        curr_dist = distance->coordinate_distance(point[i], node->lobound[i], i);
      } else if (point[i] > node->upbound[i]) {  // higher than high boundary
        curr_dist = distance->coordinate_distance(point[i], node->upbound[i], i);
      }
      if(curr_dist > max_dist) {
        max_dist = curr_dist;
      }
      if (max_dist > dist) return false;
    }
    return true;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x0, 0x30(%rdi)
je 0x3fd7
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
cmpq 0x60(%r15), %r12
setae %bpl
jae 0x4047
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq 0x38(%rbx), %rax
movsd (%rax,%r12,8), %xmm1
ucomisd %xmm0, %xmm1
ja 0x3faf
movq 0x50(%rbx), %rax
movsd (%rax,%r12,8), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3fd2
movq 0x38(%r15), %rdi
movq (%rdi), %rax
movq %r12, %rsi
movsd %xmm2, (%rsp)
callq *0x18(%rax)
movsd (%rsp), %xmm2
addsd %xmm0, %xmm2
ucomisd 0x8(%rsp), %xmm2
ja 0x4047
incq %r12
jmp 0x3f78
xorpd %xmm3, %xmm3
xorl %r12d, %r12d
xorpd %xmm0, %xmm0
cmpq 0x60(%r15), %r12
setae %bpl
jae 0x4047
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm2
movq 0x38(%rbx), %rax
movsd (%rax,%r12,8), %xmm1
ucomisd %xmm2, %xmm1
ja 0x4015
movq 0x50(%rbx), %rax
movsd (%rax,%r12,8), %xmm1
ucomisd %xmm1, %xmm2
jbe 0x4030
movq 0x38(%r15), %rdi
movq (%rdi), %rax
movapd %xmm2, %xmm0
movq %r12, %rsi
movsd %xmm3, (%rsp)
callq *0x18(%rax)
movsd (%rsp), %xmm3
movapd %xmm0, %xmm1
maxsd %xmm3, %xmm1
incq %r12
ucomisd 0x8(%rsp), %xmm1
movapd %xmm1, %xmm3
jbe 0x3fe2
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::KdTree::ball_within_bounds(std::vector<double, std::allocator<double>> const&, double, Kdtree::kdtree_node*)
bool KdTree::ball_within_bounds(const CoordPoint& point, double dist,
                                kdtree_node* node) {
  size_t i;
  for (i = 0; i < dimension; i++)
    if (distance->coordinate_distance(point[i], node->lobound[i], i) <= dist ||
        distance->coordinate_distance(point[i], node->upbound[i], i) <= dist)
      return false;
  return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
movq %rax, %r12
movq 0x60(%r15), %r13
cmpq %r13, %rax
jae 0x40dd
movq 0x38(%r15), %rdi
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq 0x38(%rbx), %rax
movsd (%rax,%r12,8), %xmm1
movq (%rdi), %rax
movq %r12, %rsi
callq *0x18(%rax)
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jae 0x40dd
movq 0x38(%r15), %rdi
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm0
movq 0x50(%rbx), %rax
movsd (%rax,%r12,8), %xmm1
movq (%rdi), %rax
movq %r12, %rsi
callq *0x18(%rax)
leaq 0x1(%r12), %rax
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x4074
cmpq %r13, %r12
setae %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::DistanceL0::DistanceL0(std::vector<double, std::allocator<double>> const*)
DistanceL0(const DoubleVector* weights = NULL) {
    if (weights)
      w = new DoubleVector(*weights);
    else
      w = (DoubleVector*)NULL;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x59ed(%rip), %rax      # 0x9c30
movq %rax, (%rdi)
testq %rsi, %rsi
je 0x4266
movq %rsi, %r15
pushq $0x18
popq %rdi
callq 0x2100
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x2d8c
jmp 0x4269
xorl %r14d, %r14d
movq %r14, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2180
nop
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::DistanceL0::distance(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
double distance(const CoordPoint& p, const CoordPoint& q) {
    size_t i;
    double dist, test;
    if (w) {
      dist = (*w)[0] * fabs(p[0] - q[0]);
      for (i = 1; i < p.size(); i++) {
        test = (*w)[i] * fabs(p[i] - q[i]);
        if (test > dist) dist = test;
      }
    } else {
      dist = fabs(p[0] - q[0]);
      for (i = 1; i < p.size(); i++) {
        test = fabs(p[i] - q[i]);
        if (test > dist) dist = test;
      }
    }
    return dist;
  }

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x4497
movq (%rax), %rax
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movsd (%rcx), %xmm0
movq (%rdx), %rdx
subsd (%rdx), %xmm0
andpd 0x1ed4(%rip), %xmm0     # 0x6330
mulsd (%rax), %xmm0
subq %rcx, %rsi
sarq $0x3, %rsi
pushq $0x1
popq %rdi
movapd 0x1ebe(%rip), %xmm1     # 0x6330
cmpq %rsi, %rdi
jae 0x44e3
movsd (%rcx,%rdi,8), %xmm2
subsd (%rdx,%rdi,8), %xmm2
andpd %xmm1, %xmm2
mulsd (%rax,%rdi,8), %xmm2
maxsd %xmm0, %xmm2
incq %rdi
movapd %xmm2, %xmm0
jmp 0x4472
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movsd (%rax), %xmm0
movq (%rdx), %rdx
subsd (%rdx), %xmm0
andpd 0x1e7f(%rip), %xmm0     # 0x6330
subq %rax, %rcx
sarq $0x3, %rcx
pushq $0x1
popq %rsi
movapd 0x1e6d(%rip), %xmm1     # 0x6330
cmpq %rcx, %rsi
jae 0x44e3
movsd (%rax,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
andpd %xmm1, %xmm2
maxsd %xmm0, %xmm2
incq %rsi
movapd %xmm2, %xmm0
jmp 0x44c3
retq
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::DistanceL0::coordinate_distance(double, double, unsigned long)
double coordinate_distance(double x, double y, size_t dim) {
    if (w)
      return (*w)[dim] * fabs(x - y);
    else
      return fabs(x - y);
  }

// Assembly:
movq 0x8(%rdi), %rax
subsd %xmm1, %xmm0
andpd 0x1e3c(%rip), %xmm0     # 0x6330
testq %rax, %rax
je 0x4501
movq (%rax), %rax
mulsd (%rax,%rsi,8), %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::DistanceL1::distance(std::vector<double, std::allocator<double>> const&, std::vector<double, std::allocator<double>> const&)
double distance(const CoordPoint& p, const CoordPoint& q) {
    size_t i;
    double dist = 0.0;
    if (w) {
      for (i = 0; i < p.size(); i++) dist += (*w)[i] * fabs(p[i] - q[i]);
    } else {
      for (i = 0; i < p.size(); i++) dist += fabs(p[i] - q[i]);
    }
    return dist;
  }

// Assembly:
movq 0x8(%rdi), %rdi
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movq (%rdx), %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movapd 0x1db7(%rip), %xmm1     # 0x6330
testq %rdi, %rdi
je 0x45b8
cmpq %rsi, %rcx
je 0x45bd
movq (%rdi), %r8
movsd (%rax,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
andpd %xmm1, %xmm2
mulsd (%r8,%rsi,8), %xmm2
addsd %xmm2, %xmm0
incq %rsi
jmp 0x457e
movsd (%rax,%rsi,8), %xmm2
subsd (%rdx,%rsi,8), %xmm2
andpd %xmm1, %xmm2
addsd %xmm2, %xmm0
incq %rsi
cmpq %rsi, %rcx
jne 0x45a3
retq
// File: /workspace/github_cpp_makefile_star2_O2/cdalitz[P]kdtree-cpp/kdtree.cpp
// Function: Kdtree::DistanceL2::coordinate_distance(double, double, unsigned long)
double coordinate_distance(double x, double y, size_t dim) {
    if (w)
      return (*w)[dim] * (x - y) * (x - y);
    else
      return (x - y) * (x - y);
  }

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x46b3
movq (%rax), %rax
subsd %xmm1, %xmm0
movsd (%rax,%rsi,8), %xmm1
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
jmp 0x46bf
subsd %xmm1, %xmm0
mulsd %xmm0, %xmm0
movapd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::nextInt(int)
int Benchmarks::nextInt(int n) {
  int bits, val;

  if ((n & (-n)) == n) {
    return((int) ((n * L(next(31))) >> L(31)));
  }

  do {
    bits = next(31);
    val  = bits % n;
  } while (bits - val + (n - 1) < 0);

  return(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leal -0x1(%r14), %r12d
testl %r12d, %esi
jne 0x3885
movslq %r14d, %r14
pushq $0x1f
popq %rsi
movq %rbx, %rdi
callq 0x382c
movslq %eax, %rdx
imulq %r14, %rdx
shrq $0x1f, %rdx
jmp 0x38a1
pushq $0x1f
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x382c
movl %eax, %ecx
cltd
idivl %r14d
addl %r12d, %ecx
cmpl %edx, %ecx
js 0x3889
movl %edx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::nextGaussian()
double Benchmarks::nextGaussian(){
  double multiplier, v1, v2, s;

  if (m_havenextGaussian) {
    m_havenextGaussian = false;
    return(m_nextGaussian) ;
  }

  do {
    v1 = ((D(2.0) * nextDouble()) - D(1.0));
    v2 = ((D(2.0) * nextDouble()) - D(1.0));
    s  = ((v1 * v1) + (v2 * v2));
  } while ((s >= D(1.0)) || (s <= D(0.0)));

  multiplier = sqrt(D(-2.0) * log(s) / s);
  m_nextGaussian    = (v2 * multiplier);
  m_havenextGaussian = true;
  return (v1 * multiplier);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x38(%rdi)
je 0x3908
movb $0x0, 0x38(%rbx)
movsd 0x30(%rbx), %xmm0
jmp 0x39ba
movq %rbx, %rdi
callq 0x38ac
movapd %xmm0, %xmm1
addsd %xmm0, %xmm1
movsd 0x66f0(%rip), %xmm0     # 0xa010
addsd %xmm0, %xmm1
movsd %xmm1, -0x10(%rbp)
movq %rbx, %rdi
callq 0x38ac
addsd %xmm0, %xmm0
addsd 0x66d3(%rip), %xmm0     # 0xa010
movapd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
ucomisd 0x66be(%rip), %xmm2     # 0xa018
jae 0x3908
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm1
jae 0x3908
movsd %xmm0, -0x20(%rbp)
movapd %xmm2, %xmm0
movsd %xmm2, -0x18(%rbp)
callq 0x3190
mulsd 0x669f(%rip), %xmm0     # 0xa020
divsd -0x18(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3996
sqrtsd %xmm0, %xmm0
jmp 0x399b
callq 0x3180
movsd -0x20(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rbx)
movb $0x1, 0x38(%rbx)
movsd -0x10(%rbp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::createShiftVector(int, double, double)
double* Benchmarks::createShiftVector(int dim, double min,double max) {

  double* d;
  double  hw, middle;
  double  s;
  int     i;
  hw     = (D(0.5) * (max - min));
  middle = (min + hw);
  //d      = (double*)malloc(sizeof(double) * dim);
  d      = new double[dim];

  //	printf("middle = %1.20E\n",middle);
  //	printf("hw = %1.20E\n",hw);

  for (i = (dim - 1); i >= 0; i--) {
    if (setOvectorToZero == true){
      d[i] = 0;
    }else{
      do {
        double tempGauss = nextGaussian();
        s = (middle + (tempGauss * hw));
      } while ((s < min) || (s > max));
      d[i] = s;
      //			printf("shift vector = %1.20E\n", d[i]);
    }
  }
  return(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd %xmm1, -0x20(%rbp)
subsd %xmm0, %xmm1
mulsd 0x664d(%rip), %xmm1     # 0xa030
movsd %xmm1, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
addsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
movl %esi, %r15d
leaq (,%r15,8), %rax
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r14
testl %r15d, %r15d
jle 0x3a50
xorpd %xmm0, %xmm0
cmpb $0x0, 0x39(%rbx)
jne 0x3a45
movq %rbx, %rdi
callq 0x38e8
mulsd -0x30(%rbp), %xmm0
addsd -0x28(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x3a21
ucomisd -0x20(%rbp), %xmm0
ja 0x3a21
decq %r15
movsd %xmm0, (%r14,%r15,8)
jmp 0x3a12
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::createPermVector(int)
int* Benchmarks::createPermVector(int dim){
  int* d;
  int  i, j, k, t;
  //d = (int*)malloc(sizeof(int) * dim);
  d = new int[dim];

  for (i = (dim - 1); i >= 0; i--) {
    d[i] = i;
  }

  for (i = (dim << 3); i >= 0; i--) {
    j = nextInt(dim);

    do {
      k = nextInt(dim);
    } while (k == j);

    t    = d[j];
    d[j] = d[k];
    d[k] = t;
  }

  return(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r12d
leaq (,%r12,4), %rax
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r15
testl %r12d, %r12d
jle 0x4252
decq %r12
movl %r12d, %eax
movl %r12d, (%r15,%rax,4)
jmp 0x4241
leal (,%rbx,8), %r13d
testl %r13d, %r13d
js 0x4295
movq %r14, %rdi
movl %ebx, %esi
callq 0x3850
movl %eax, %r12d
movq %r14, %rdi
movl %ebx, %esi
callq 0x3850
cmpl %r12d, %eax
je 0x426c
movslq %r12d, %rcx
movl (%r15,%rcx,4), %edx
cltq
movl (%r15,%rax,4), %esi
movl %esi, (%r15,%rcx,4)
movl %edx, (%r15,%rax,4)
decl %r13d
jmp 0x425a
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::readPermVector()
int* Benchmarks::readPermVector(){
  int* d;

  d = new int[dimension];

  stringstream ss;
  ss<< "cdatafiles/" << "F" << ID << "-p.txt";
  ifstream file (ss.str());
  int c=0;
  string value;

  if (file.is_open())
    {
      while (getline(file,value,','))
        {
          d[c++] = stod(value) - 1;
        }
    }

  // for (int i = 0; i < dimension; ++i)
  //   {
  //     printf("%d\n", d[i]);
  //   }

  return(d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3b8, %rsp            # imm = 0x3B8
movq %rdi, %r14
movslq 0xb8(%rdi), %rax
leaq (,%rax,4), %rcx
testq %rax, %rax
pushq $-0x1
popq %rdi
cmovnsq %rcx, %rdi
callq 0x3030
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x3140
leaq -0x1c0(%rbp), %rdi
leaq 0x5dd6(%rip), %rsi      # 0xa0d0
callq 0x31d0
leaq 0x5dd6(%rip), %rsi      # 0xa0dc
movq %rax, %rdi
callq 0x31d0
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x3130
leaq 0x5ddd(%rip), %rsi      # 0xa0fe
movq %rax, %rdi
callq 0x31d0
leaq -0x1b8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x3260
leaq -0x3d8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3270
leaq -0x48(%rbp), %rdi
callq 0x30e0
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x360(%rbp), %rdi
callq 0x3090
testb %al, %al
je 0x43c3
leaq -0x3d8(%rbp), %r14
leaq -0x48(%rbp), %r15
pushq $0x2c
popq %r12
movq %rbx, %r13
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x32f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x43c3
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a35
addsd 0x5c5b(%rip), %xmm0     # 0xa010
cvttsd2si %xmm0, %eax
movl %eax, (%r13)
addq $0x4, %r13
jmp 0x4387
leaq -0x48(%rbp), %rdi
callq 0x30e0
leaq -0x3d8(%rbp), %rdi
callq 0x30a0
leaq -0x1d0(%rbp), %rdi
callq 0x3160
movq %rbx, %rax
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x30e0
jmp 0x4426
jmp 0x4409
movq %rax, %rbx
jmp 0x4426
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x30e0
leaq -0x3d8(%rbp), %rdi
callq 0x30a0
leaq -0x1d0(%rbp), %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::createRotMatrix1D(int)
double* Benchmarks::createRotMatrix1D(int dim){
  double** a;
  double*  b;
  int      i, j, k;
  a = createRotMatrix(dim);
  //b = (double*)malloc(sizeof(double) * (dim * dim));
  b = new double[dim*dim];
  k = 0;

  for (i = 0; i < dim; i++) {
    for (j = 0; j < dim; j++) {
      b[k++] = a[i][j];
    }
  }

  // release the memory that previously allocated for storing a 2D array
  for(i=0;i<dim;i++){
    delete []a[i];
  }
  delete[] a;

  return(b);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r15d
callq 0x443a
movq %rax, %rbx
movl %r15d, %edi
imull %edi, %edi
shlq $0x3, %rdi
callq 0x3030
movq %rax, %r14
xorl %eax, %eax
testl %r15d, %r15d
movl $0x0, %r12d
cmovgl %r15d, %r12d
movl %r15d, %ecx
xorl %edx, %edx
cmpq %r12, %rax
je 0x4643
movslq %edx, %rdx
leaq (%r14,%rdx,8), %rdi
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x463b
movq (%rbx,%rax,8), %r8
movsd (%r8,%rsi,8), %xmm0
movsd %xmm0, (%rdi,%rsi,8)
incq %rsi
jmp 0x4622
incq %rax
addq %rsi, %rdx
jmp 0x4614
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x465e
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x4659
callq 0x3210
incq %r15
jmp 0x4646
movq %rbx, %rdi
callq 0x3210
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::createMultiRotateMatrix1D(int, int)
double** Benchmarks::createMultiRotateMatrix1D(int dim, int num){
  double** a;
  int i;

  /*  allocate storage for an array of pointers */
  //a =(double **) malloc(num * sizeof(double *));
  a = new double*[num];

  /* for each pointer, allocate storage for an array of ints */
  for (i = 0; i < num; i++) {
    a[i] = createRotMatrix1D(dim);
  }

  return (a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl %edx, %eax
shlq $0x3, %rax
xorl %r13d, %r13d
testl %edx, %edx
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
cmovlel %r13d, %ebx
callq 0x3030
movq %rax, %r12
cmpq %r13, %rbx
je 0x46bf
movq %r15, %rdi
movl %r14d, %esi
callq 0x45d8
movq %rax, (%r12,%r13,8)
incq %r13
jmp 0x46a6
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::readS(int)
int* Benchmarks::readS(int num)
{
  s = new int[num];

  stringstream ss;
  ss<< "cdatafiles/" << "F" << ID << "-s.txt";
  ifstream file (ss.str());
  int c=0;
  string value;
  if (file.is_open())
    {
      while (getline(file,value))
        {
          // cout<<stod(value)<<endl;
          s[c++] = stod(value);
        }
    }
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, %rbx
movl %esi, %eax
shlq $0x2, %rax
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, 0xf0(%rbx)
leaq -0x1c8(%rbp), %rdi
callq 0x3140
leaq -0x1b8(%rbp), %rdi
leaq 0x570e(%rip), %rsi      # 0xa0d0
callq 0x31d0
leaq 0x570e(%rip), %rsi      # 0xa0dc
movq %rax, %rdi
callq 0x31d0
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x3130
leaq 0x5720(%rip), %rsi      # 0xa108
movq %rax, %rdi
callq 0x31d0
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3260
leaq -0x3d0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3270
leaq -0x40(%rbp), %rdi
callq 0x30e0
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x358(%rbp), %rdi
callq 0x3090
testb %al, %al
je 0x4a82
xorl %r12d, %r12d
leaq -0x3d0(%rbp), %r14
leaq -0x40(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4a82
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a35
cvttsd2si %xmm0, %eax
movq 0xf0(%rbx), %rcx
movl %eax, (%rcx,%r12)
addq $0x4, %r12
jmp 0x4a4a
movq 0xf0(%rbx), %rbx
leaq -0x40(%rbp), %rdi
callq 0x30e0
leaq -0x3d0(%rbp), %rdi
callq 0x30a0
leaq -0x1c8(%rbp), %rdi
callq 0x3160
movq %rbx, %rax
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x30e0
jmp 0x4aea
jmp 0x4acd
movq %rax, %rbx
jmp 0x4aea
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x30e0
leaq -0x3d0(%rbp), %rdi
callq 0x30a0
leaq -0x1c8(%rbp), %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::readW(int)
double* Benchmarks::readW(int num)
{
  w = new double[num];

  stringstream ss;
  ss<< "cdatafiles/" << "F" << ID << "-w.txt";
  ifstream file (ss.str());
  int c=0;
  string value;
  if (file.is_open())
    {
      while (getline(file,value))
        {
          // cout<<stod(value)<<endl;
          w[c++] = stod(value);
        }
    }

  return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, %rbx
movl %esi, %eax
shlq $0x3, %rax
testl %esi, %esi
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, 0xf8(%rbx)
leaq -0x1c8(%rbp), %rdi
callq 0x3140
leaq -0x1b8(%rbp), %rdi
leaq 0x5588(%rip), %rsi      # 0xa0d0
callq 0x31d0
leaq 0x5588(%rip), %rsi      # 0xa0dc
movq %rax, %rdi
callq 0x31d0
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x3130
leaq 0x55a1(%rip), %rsi      # 0xa10f
movq %rax, %rdi
callq 0x31d0
leaq -0x1b0(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x3260
leaq -0x3d0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3270
leaq -0x40(%rbp), %rdi
callq 0x30e0
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x358(%rbp), %rdi
callq 0x3090
testb %al, %al
je 0x4c06
xorl %r12d, %r12d
leaq -0x3d0(%rbp), %r14
leaq -0x40(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3060
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4c06
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a35
movq 0xf8(%rbx), %rax
movsd %xmm0, (%rax,%r12)
addq $0x8, %r12
jmp 0x4bd0
movq 0xf8(%rbx), %rbx
leaq -0x40(%rbp), %rdi
callq 0x30e0
leaq -0x3d0(%rbp), %rdi
callq 0x30a0
leaq -0x1c8(%rbp), %rdi
callq 0x3160
movq %rbx, %rax
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x30e0
jmp 0x4c6e
jmp 0x4c51
movq %rax, %rbx
jmp 0x4c6e
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x30e0
leaq -0x3d0(%rbp), %rdi
callq 0x30a0
leaq -0x1c8(%rbp), %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x32d0
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::rotateVector(int, int&)
double* Benchmarks::rotateVector(int i, int &c)
{
  double* z = new double[s[i]];
  // cout<<"s "<<s[i]<<endl;

  // copy values into the new vector
  for (int j = c; j < c+s[i]; ++j)
    {
      // cout<<"j-c "<<j-c<<" p "<<Pvector[j]<<endl;
      z[j-c] = anotherz[Pvector[j]];
    }
  // cout<<"copy done"<<endl;

  if (s[i]==25)
    {
      anotherz1 = multiply( z, r25, s[i]);
    }
  else if (s[i] == 50)
    {    
      anotherz1 = multiply( z, r50, s[i]);
    }
  else if (s[i] == 100) 
    {
      anotherz1 = multiply( z, r100, s[i]);
    }
  else
    {
      cout<< "size of rotation matrix out of range" <<endl;
    }
  delete []z;
  c = c + s[i];
  return anotherz1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0xf0(%rdi), %rax
movslq %esi, %r12
movslq (%rax,%r12,4), %r13
leaq (,%r13,8), %rax
testq %r13, %r13
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
movq %rax, %r15
movslq (%rbx), %rax
movq %r13, %rcx
addq %rax, %rcx
movq 0x70(%r14), %rdx
leaq (,%rax,4), %rsi
addq 0x58(%r14), %rsi
xorl %edi, %edi
leaq (%rax,%rdi), %r8
cmpq %rcx, %r8
jge 0x4cf7
movslq (%rsi,%rdi,4), %r8
movsd (%rdx,%r8,8), %xmm0
movsd %xmm0, (%r15,%rdi,8)
incq %rdi
jmp 0x4cd9
cmpl $0x19, %r13d
je 0x4d1f
cmpl $0x32, %r13d
je 0x4d14
cmpl $0x64, %r13d
jne 0x4d37
movq 0xe8(%r14), %rdx
pushq $0x64
jmp 0x4d28
movq 0xe0(%r14), %rdx
pushq $0x32
jmp 0x4d28
movq 0xd8(%r14), %rdx
pushq $0x19
popq %rcx
movq %r15, %rsi
callq 0x4d7a
movq %rax, 0x78(%r14)
jmp 0x4d52
movq 0xa292(%rip), %rdi      # 0xefd0
leaq 0x53d1(%rip), %rsi      # 0xa116
callq 0x31d0
movq %rax, %rdi
callq 0x30f0
movq %r15, %rdi
callq 0x3210
movq 0xf0(%r14), %rax
movl (%rax,%r12,4), %eax
addl %eax, (%rbx)
movq 0x78(%r14), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mateuz[P]MTS-LS1/source/Benchmarks.cpp
// Function: Benchmarks::multiply(double*, double**, int)
double* Benchmarks::multiply(double*vector, double**matrix,int dim){
  int    i,j;
  //double*result = (double*)malloc(sizeof(double) * dim);
  double*result = new double[dim];

  for(i = dim - 1; i >= 0; i--) {
    result[i] = 0;

    for(j = dim - 1; j >= 0; j--) {
      result[i] += vector[j] * matrix[i][j];
    }
  }

  return(result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movl %ecx, %eax
shlq $0x3, %rax
testl %ecx, %ecx
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x3030
decl %ebx
movl %ebx, %ecx
testl %ecx, %ecx
js 0x4ddc
movl %ecx, %edx
andq $0x0, (%rax,%rdx,8)
xorpd %xmm0, %xmm0
movl %ebx, %esi
testl %esi, %esi
js 0x4dd8
movl %esi, %edi
movsd (%r15,%rdi,8), %xmm1
movq (%r14,%rdx,8), %r8
mulsd (%r8,%rdi,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rdx,8)
decl %esi
jmp 0x4db5
decl %ecx
jmp 0x4da4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop