LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/ray.cc
// Function: reportHistogram(std::ostream&, double, int, std::vector<ray, std::allocator<ray>>&)
void reportHistogram(ostream& output,const double binSize,const int maxBins, vector<ray>& rays)
{
  assert(binSize > threshold);
  int bins[maxBins];
  for (int i=0; i<maxBins; i++)
    {
      bins[i] = 0;
    }
  
  //Assemble Hitsogram
  int bin;
  for (unsigned int i=0; i<rays.size(); i++)
    {
      bin = rays[i].vector.magnitude()/binSize;
      if (bin >= maxBins) 
	{
	  bin = maxBins - 1;
	}
      bins[bin]++;
    }
  
  //Output Histogram
  output << "Ray Histogram - Bin Size = " << binSize << " Number of Bins: " << maxBins << "From: 0 To: " << binSize * 1.0 * maxBins<< endl;
  for (int i=0; i<maxBins; i++)
    {
      output << bins[i] << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x40(%rbp)
movsd %xmm0, -0x30(%rbp)
ucomisd 0xc4a2d(%rip), %xmm0    # 0x1011e8
jbe 0x3c8db
movq %rdx, %r15
movl %esi, %r14d
movl %esi, %eax
movq %rsp, %r12
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %r13d
cmovgl %esi, %r13d
cmpq %rax, %r13
je 0x3c7fb
andl $0x0, (%r12,%rax,4)
incq %rax
jmp 0x3c7ec
leal -0x1(%r14), %eax
movl %eax, -0x34(%rbp)
xorl %ebx, %ebx
movl %ebx, %ebx
movq (%r15), %rcx
movq 0x8(%r15), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %rbx, %rax
jbe 0x3c849
imulq $0x30, %rbx, %rax
leaq (%rcx,%rax), %rdi
addq $0x18, %rdi
callq 0x63d48
divsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %eax
cmpl %r14d, %eax
jl 0x3c83f
movl -0x34(%rbp), %eax
cltq
incl (%r12,%rax,4)
incl %ebx
jmp 0x3c804
leaq 0xc4dc1(%rip), %rsi     # 0x101611
movq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x4480
movq %rax, %rdi
movsd -0x30(%rbp), %xmm0
callq 0x46c0
leaq 0xc4dbd(%rip), %rsi     # 0x10162d
movq %rax, %rdi
callq 0x4480
movq %rax, %rdi
movl %r14d, %esi
callq 0x4760
leaq 0xc4db5(%rip), %rsi     # 0x10163f
movq %rax, %rdi
callq 0x4480
cvtsi2sd %r14d, %xmm0
mulsd -0x30(%rbp), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
callq 0x4230
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x3c8cc
movl (%r12,%rbx,4), %esi
movq %r15, %rdi
callq 0x4760
movq %rax, %rdi
callq 0x4230
incq %rbx
jmp 0x3c8ae
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc4cd3(%rip), %rdi     # 0x1015b5
leaq 0xc49a5(%rip), %rsi     # 0x10128e
leaq 0xc4cd9(%rip), %rcx     # 0x1015c9
movl $0x57b, %edx            # imm = 0x57B
callq 0x42c0
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/./ray.h
// Function: hitdata::hitdata()
hitdata()
    {
      hit=false;
      hitpoint = Point(0,0,0);
      dist = 0.0;
      id = -1;
      object = NULL;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
addq $0x8, %rdi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x63c46
movb $0x0, (%rbx)
movq %rsp, %r14
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r14, %rdi
callq 0x63c46
movq 0x10(%r14), %rax
movq %rax, 0x18(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x8(%rbx)
andq $0x0, 0x20(%rbx)
orl $-0x1, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/graphstorage.cc
// Function: DIJKSTRA_NODE::DIJKSTRA_NODE(int, double, double, double, double, bool)
DIJKSTRA_NODE::DIJKSTRA_NODE(int myID, double myX, double myY, double myZ, double maxR, bool active_flag){
    id = myID; x = myX; y = myY; z = myZ;
    connections = vector<CONN> ();
    max_radius = maxR;
    active = active_flag;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edx, %ebx
movsd %xmm3, 0x8(%rsp)
movq %rdi, %r14
addq $0x20, %rdi
xorps %xmm3, %xmm3
movups %xmm3, 0x20(%r14)
andq $0x0, 0x30(%r14)
movl %esi, (%r14)
movsd %xmm0, 0x8(%r14)
movsd %xmm1, 0x10(%r14)
movsd %xmm2, 0x18(%r14)
leaq 0x10(%rsp), %r15
movaps %xmm3, (%r15)
andq $0x0, 0x10(%r15)
movq %r15, %rsi
callq 0x2b9e2
movq %r15, %rdi
callq 0xaf14
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x38(%r14)
movb %bl, 0x40(%r14)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/graphstorage.cc
// Function: DIJKSTRA_NODE::print(std::ostream&) const
void DIJKSTRA_NODE::print(ostream &out) const {
    out << " Node info:" << "\n"
    << "    #: " << id << "    X: " << x << "    Y: " << y << "    Z:" << z << "\n"
    << "   Connections:" << "\n";
    for(unsigned int i = 0; i<connections.size(); i++){
        out << "     ";
        connections.at(i).print();
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %r14
leaq 0xc4088(%rip), %rsi     # 0x101680
movq %rax, (%rsp)
movq %rax, %rdi
callq 0x4480
leaq 0xc4f73(%rip), %r15     # 0x10257e
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0xc406f(%rip), %rsi     # 0x10168c
movq %rax, %rdi
callq 0x4480
movl (%r14), %esi
movq %rax, %rdi
callq 0x4760
leaq 0xc405d(%rip), %rsi     # 0x101694
movq %rax, %rdi
callq 0x4480
movsd 0x8(%r14), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xc4048(%rip), %rsi     # 0x10169c
movq %rax, %rdi
callq 0x4480
movsd 0x10(%r14), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xc4033(%rip), %rsi     # 0x1016a4
movq %rax, %rdi
callq 0x4480
movsd 0x18(%r14), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0xc4012(%rip), %rsi     # 0x1016ab
movq %rax, %rdi
callq 0x4480
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0x20(%r14), %r15
xorl %eax, %eax
pushq $0x28
popq %rbx
leaq 0xbee10(%rip), %r12     # 0xfc4cc
movq 0x1128fd(%rip), %r13    # 0x14ffc0
movl %eax, %ebp
movq 0x28(%r14), %rax
subq 0x20(%r14), %rax
cqto
idivq %rbx
cmpq %rbp, %rax
jbe 0x3d6fe
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x4480
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3d994
movq %rax, %rdi
movq %r13, %rsi
callq 0x3d496
leal 0x1(%rbp), %eax
jmp 0x3d6c3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/graphstorage.cc
// Function: DIJKSTRA_NETWORK::buildDijkstraNetwork(VORONOI_NETWORK const*, DIJKSTRA_NETWORK*)
void DIJKSTRA_NETWORK::buildDijkstraNetwork(const VORONOI_NETWORK *vornet, DIJKSTRA_NETWORK *dnet){
    vector<VOR_NODE> ::const_iterator niter = vornet->nodes.begin();
    int i = 0;
    dnet->nodes.clear();
    
    // Add copies of all nodes to the network
    while(niter != vornet->nodes.end()){
        DIJKSTRA_NODE node = DIJKSTRA_NODE(i, niter->x, niter->y, niter->z, niter->rad_stat_sphere, niter->active);
        i++;
        niter++;
        dnet->nodes.push_back(node);
    }
    
    // For each edge, store it in the DIJKSTRA node's list of connections that the connection
    // stems from
    vector<VOR_EDGE> ::const_iterator eiter = vornet->edges.begin();
    while(eiter != vornet->edges.end()){
        DELTA_POS pos = DELTA_POS(eiter->delta_uc_x, eiter->delta_uc_y, eiter->delta_uc_z);
        CONN conn = CONN(eiter->from, eiter->to, eiter->length, eiter->rad_moving_sphere,pos);
        dnet->nodes.at(conn.from).connections.push_back(conn);
        eiter++;
    }
    
    // Copy the unit cell vectors into the DIJKSTRA_NETWORK
    dnet->v_a = vornet->v_a;
    dnet->v_b = vornet->v_b;
    dnet->v_c = vornet->v_c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x48(%rdi), %r13
movq %rsi, %rdi
callq 0x3d9b2
xorl %ebp, %ebp
leaq 0x20(%rsp), %r15
movq %rsp, %r12
cmpq 0x50(%r14), %r13
je 0x3d858
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm1
movsd 0x10(%r13), %xmm2
movsd 0x18(%r13), %xmm3
movzbl 0x38(%r13), %edx
movq %r12, %rdi
movl %ebp, %esi
callq 0x3d56e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3d9ba
addq $0x40, %r13
incl %ebp
movq %r15, %rdi
callq 0xaf14
jmp 0x3d810
movq 0x60(%r14), %r12
movq %rsp, %r15
cmpq 0x68(%r14), %r12
je 0x3d8b7
movq 0x10(%r12), %rax
movl 0x18(%r12), %ecx
movsd 0x20(%r12), %xmm0
movsd 0x8(%r12), %xmm1
movq (%r12), %rdx
movq %rdx, (%rsp)
movsd %xmm0, 0x8(%rsp)
movsd %xmm1, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl %ecx, 0x20(%rsp)
movslq %edx, %rsi
movq %rbx, %rdi
callq 0xabe2
leaq 0x20(%rax), %rdi
movq %r15, %rsi
callq 0x29ff6
addq $0x28, %r12
jmp 0x3d85f
movq 0x10(%r14), %rax
movq %rax, 0x28(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x18(%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x40(%rbx)
movups 0x30(%r14), %xmm0
movups %xmm0, 0x48(%rbx)
movq 0x40(%r14), %rax
movq %rax, 0x58(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0xaf14
movq %rbx, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/graphstorage.cc
// Function: DIJKSTRA_NETWORK::filterDnetEdges(std::vector<int, std::allocator<int>>, VORONOI_NETWORK*, DIJKSTRA_NETWORK*)
void DIJKSTRA_NETWORK::filterDnetEdges(vector<int> nodeIDs,
                                       VORONOI_NETWORK *origVornet,
                                       DIJKSTRA_NETWORK *newDnet){
    //VORONOI_NETWORK newVorNet;
    //VORONOI_NETWORK::filterVornetEdges(nodeIDs, origVornet, &newVorNet);
    VORONOI_NETWORK newVorNet = origVornet->filterEdges(nodeIDs);
    DIJKSTRA_NETWORK::buildDijkstraNetwork(&newVorNet, newDnet);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0xa6ce
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x40ab0
movq %rsp, %rdi
callq 0xb290
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x3d7e6
leaq 0x18(%rsp), %rdi
callq 0xa95c
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xa95c
jmp 0x3d982
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb290
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM::ATOM()
ATOM::ATOM() {
  type = "";
  label = "";
  radius = 0;
  charge = 0; //because this is not always provided, a default value of zero is set
  keep = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x40(%rdi), %rbx
leaq 0x50(%rdi), %rax
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
xorl %eax, %eax
movb %al, 0x50(%rdi)
leaq 0x60(%rdi), %r15
leaq 0x70(%rdi), %rcx
movq %rcx, 0x60(%rdi)
andq $0x0, 0x68(%rdi)
movb %al, 0x70(%rdi)
leaq 0xbf760(%rip), %rsi     # 0xfd3f3
movq %rbx, %rdi
callq 0x4810
leaq 0xbf751(%rip), %rsi     # 0xfd3f3
movq %r15, %rdi
callq 0x4810
andq $0x0, 0x30(%r14)
andq $0x0, 0x88(%r14)
movb $0x1, 0x90(%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x4210
movq %rbx, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM::ATOM(XYZ, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double)
ATOM::ATOM(XYZ xyz, string s, double r) {
  x = xyz.x;
  y = xyz.y;
  z = xyz.z;
  type = s;
  label = s;
  radius = r;
  charge = 0;
  keep = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rsi, %r12
movq %rdi, %r14
leaq 0x40(%rdi), %rbx
leaq 0x50(%rdi), %rax
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
xorl %eax, %eax
movb %al, 0x50(%rdi)
leaq 0x60(%rdi), %r15
leaq 0x70(%rdi), %rcx
movq %rcx, 0x60(%rdi)
andq $0x0, 0x68(%rdi)
movb %al, 0x70(%rdi)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rdi)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%rdi)
movq %rbx, %rdi
callq 0x4270
movq %r15, %rdi
movq %r12, %rsi
callq 0x4270
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%r14)
andq $0x0, 0x88(%r14)
movb $0x1, 0x90(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x4210
movq %rbx, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM::ATOM(XYZ, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double)
ATOM::ATOM(XYZ xyz, string s, string l, double r) {
  x = xyz.x;
  y = xyz.y;
  z = xyz.z;
  type = s;
  label = l;
  radius = r;
  charge = 0;
  keep = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rdx, %r15
movq %rdi, %r14
leaq 0x40(%rdi), %rbx
leaq 0x50(%rdi), %rax
movq %rax, 0x40(%rdi)
andq $0x0, 0x48(%rdi)
xorl %eax, %eax
movb %al, 0x50(%rdi)
leaq 0x60(%rdi), %r12
leaq 0x70(%rdi), %rcx
movq %rcx, 0x60(%rdi)
andq $0x0, 0x68(%rdi)
movb %al, 0x70(%rdi)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rdi)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x10(%rdi)
movq %rbx, %rdi
callq 0x4270
movq %r12, %rdi
movq %r15, %rsi
callq 0x4270
movsd (%rsp), %xmm0
movsd %xmm0, 0x30(%r14)
andq $0x0, 0x88(%r14)
movb $0x1, 0x90(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r12, %rdi
callq 0x4210
movq %rbx, %rdi
callq 0x4210
movq %r14, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::update_atom_fractional_coords()
void ATOM_NETWORK::update_atom_fractional_coords() {
  for(int i=0; i<numAtoms; i++) {
    XYZ xyz(atoms.at(i).x, atoms.at(i).y, atoms.at(i).z);
    XYZ abc = trans_to_origuc(xyz_to_abc_returning_XYZ(xyz));
    atoms.at(i).a_coord = abc.x;
    atoms.at(i).b_coord = abc.y;
    atoms.at(i).c_coord = abc.z;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x2f0(%rdi), %r14
xorl %r15d, %r15d
leaq 0x60(%rsp), %r12
leaq 0x48(%rsp), %r13
leaq 0x30(%rsp), %rbp
movslq 0x110(%rbx), %rax
cmpq %rax, %r15
jge 0x3e072
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movsd 0x10(%rax), %xmm2
movq %r12, %rdi
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x6402e
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x3e082
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbp, %rdi
callq 0x637df
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x28(%rax)
incq %r15
jmp 0x3df7c
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::make(double, double, double, double, double, double)
void ATOM_NETWORK::make(double a0, double b0, double c0, double alpha0, double beta0, double gamma0){
  a = a0;
  b = b0;
  c = c0;
  alpha = alpha0;
  beta = beta0;
  gamma = gamma0;
  initialize();
}

// Assembly:
movsd %xmm0, 0x8(%rdi)
movsd %xmm1, 0x10(%rdi)
movsd %xmm2, 0x18(%rdi)
movsd %xmm3, 0x20(%rdi)
movsd %xmm4, 0x28(%rdi)
movsd %xmm5, 0x30(%rdi)
jmp 0x3e5a4
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::initialize()
void ATOM_NETWORK::initialize(){
  double tempd, talpha, tbeta, tgamma;
  talpha = 2*PI/360.0*alpha;
  tbeta  = 2*PI/360.0*beta;
  tgamma = 2*PI/360.0*gamma;
  double cosb = cos(tbeta);
  double cosg = cos(tgamma);
  double sing = sin(tgamma);
  tempd=(cos(talpha)-cosg*cosb)/sing;
  v_a.x=a;
  v_a.y=0.0;
  v_a.z=0.0;  
  v_b.x=b*cosg; 
  if(fabs(v_b.x) < TOLERANCE)
    v_b.x=0;  
  v_b.y=b*sing;
  v_b.z=0.0;  
  v_c.x=c*cosb;
  if(fabs(v_c.x) < TOLERANCE)
    v_c.x = 0;
  v_c.y=c*tempd;
  if(fabs(v_c.y) < TOLERANCE)
    v_c.y = 0;
  v_c.z=c*sqrt(1.0-(cosb*cosb)-(tempd*tempd));
  initMatrices();
  distanceCalculator = MIN_PER_DISTANCE(v_a.x, v_b.x, v_b.y, v_c.x, v_c.y, v_c.z);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movsd 0xbe547(%rip), %xmm1    # 0xfcb00
movsd 0x20(%rdi), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x28(%rdi), %xmm0
mulsd %xmm1, %xmm0
mulsd 0x30(%rdi), %xmm1
movsd %xmm1, (%rsp)
callq 0x47e0
movapd %xmm0, 0x30(%rsp)
movsd (%rsp), %xmm0
callq 0x47e0
movaps %xmm0, 0x20(%rsp)
movsd (%rsp), %xmm0
callq 0x4110
movsd %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x47e0
movapd 0x20(%rsp), %xmm5
movapd %xmm5, %xmm1
movapd 0x30(%rsp), %xmm4
mulsd %xmm4, %xmm1
subsd %xmm1, %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
movsd %xmm1, 0x38(%rbx)
xorps %xmm1, %xmm1
movups %xmm1, 0x40(%rbx)
mulsd %xmm2, %xmm5
movapd 0xbda57(%rip), %xmm1    # 0xfc0a0
movapd %xmm5, %xmm3
andpd %xmm1, %xmm3
cmpltsd 0xc3066(%rip), %xmm3    # 0x1016c0
movsd (%rsp), %xmm6
divsd %xmm6, %xmm0
andnpd %xmm5, %xmm3
movlpd %xmm3, 0x50(%rbx)
mulsd %xmm2, %xmm6
movsd %xmm6, 0x58(%rbx)
andq $0x0, 0x60(%rbx)
movsd 0x18(%rbx), %xmm5
movapd %xmm4, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movapd %xmm5, %xmm3
unpcklpd %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0]
mulpd %xmm2, %xmm3
andpd %xmm3, %xmm1
cmpnltpd 0xc30a0(%rip), %xmm1    # 0x101740
andpd %xmm3, %xmm1
movupd %xmm1, 0x68(%rbx)
movapd %xmm4, %xmm2
mulsd %xmm4, %xmm2
movsd 0xbd99f(%rip), %xmm1    # 0xfc058
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x3e6d5
sqrtsd %xmm1, %xmm0
jmp 0x3e6e8
movapd %xmm1, %xmm0
movapd %xmm5, (%rsp)
callq 0x4390
movapd (%rsp), %xmm5
mulsd %xmm0, %xmm5
movsd %xmm5, 0x78(%rbx)
movq %rbx, %rdi
callq 0x3e88c
movsd 0x38(%rbx), %xmm0
movsd 0x50(%rbx), %xmm1
movsd 0x58(%rbx), %xmm2
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movsd 0x78(%rbx), %xmm5
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x59878
addq $0x340, %rbx            # imm = 0x340
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b28a
movq %r14, %rdi
callq 0xb0f0
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::make(XYZ, XYZ, XYZ)
void ATOM_NETWORK::make(XYZ va, XYZ vb, XYZ vc) {
  v_a = va;
  v_b = vb;
  v_c = vc;
  a = v_a.magnitude();
  b = v_b.magnitude();
  c = v_c.magnitude();
  alpha = 360.0*v_b.angle_between(v_c)/(2.0*PI);
  beta = 360.0*v_a.angle_between(v_c)/(2.0*PI);
  gamma = 360.0*v_a.angle_between(v_b)/(2.0*PI);
  initMatrices();
  distanceCalculator = MIN_PER_DISTANCE(v_a.x, v_b.x, v_b.y, v_c.x, v_c.y, v_c.z);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%rdi)
movaps 0xa0(%rsp), %xmm0
movups %xmm0, 0x38(%rdi)
leaq 0x50(%rdi), %r15
movups 0xb8(%rsp), %xmm0
movups %xmm0, 0x50(%rdi)
movq 0xc8(%rsp), %rax
movq %rax, 0x60(%rdi)
leaq 0x68(%rdi), %r12
movapd 0xd0(%rsp), %xmm0
movupd %xmm0, 0x68(%rdi)
movq 0xe0(%rsp), %rax
movq %rax, 0x78(%rdi)
movq %r14, %rdi
callq 0x63758
movsd %xmm0, 0x8(%rbx)
movq %r15, %rdi
callq 0x63758
movsd %xmm0, 0x10(%rbx)
movq %r12, %rdi
callq 0x63758
movsd %xmm0, 0x18(%rbx)
movq %r15, %rdi
movq %r12, %rsi
callq 0x641b2
mulsd 0xbe308(%rip), %xmm0    # 0xfcaf0
divsd 0xbe308(%rip), %xmm0    # 0xfcaf8
movsd %xmm0, 0x20(%rbx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x641b2
mulsd 0xbe2e8(%rip), %xmm0    # 0xfcaf0
divsd 0xbe2e8(%rip), %xmm0    # 0xfcaf8
movsd %xmm0, 0x28(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x641b2
mulsd 0xbe2c8(%rip), %xmm0    # 0xfcaf0
divsd 0xbe2c8(%rip), %xmm0    # 0xfcaf8
movsd %xmm0, 0x30(%rbx)
movq %rbx, %rdi
callq 0x3e88c
movsd 0x38(%rbx), %xmm0
movsd 0x50(%rbx), %xmm1
movsd 0x58(%rbx), %xmm2
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movsd 0x78(%rbx), %xmm5
movq %rsp, %r14
movq %r14, %rdi
callq 0x59878
addq $0x340, %rbx            # imm = 0x340
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4b28a
movq %r14, %rdi
callq 0xb0f0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::print(std::ostream&)
void ATOM_NETWORK::print(ostream &out){
    out << "Name: " << name << "\n"
    << "A: " << a <<"     B: " << b << "     C: " << c << "\n"
    << "Alpha: " << alpha <<"     Beta: " << beta << "     Gamma: " << gamma
    << "\n";
    out << "v_a: "; v_a.print();
    out << "v_b: "; v_b.print();
    out << "v_c: "; v_c.print();
    out << "Number of atoms: " << numAtoms << "\n";
    for(int i = 0; i<numAtoms; i++)
        atoms.at(i).print();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc2feb(%rip), %rsi     # 0x101920
movq %r14, %rdi
callq 0x4480
leaq 0x320(%rbx), %rsi
movq %rax, %rdi
callq 0x43f0
leaq 0xc3c2b(%rip), %r15     # 0x10257e
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0xc2641(%rip), %rsi     # 0x100fa6
movq %rax, %rdi
callq 0x4480
movsd 0x8(%rbx), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xc2fa6(%rip), %rsi     # 0x101927
movq %rax, %rdi
callq 0x4480
movsd 0x10(%rbx), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xc2f93(%rip), %rsi     # 0x101930
movq %rax, %rdi
callq 0x4480
movsd 0x18(%rbx), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0xc2f75(%rip), %rsi     # 0x101939
movq %rax, %rdi
callq 0x4480
movsd 0x20(%rbx), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xc2f61(%rip), %rsi     # 0x101941
movq %rax, %rdi
callq 0x4480
movsd 0x28(%rbx), %xmm0
movq %rax, %rdi
callq 0x46c0
leaq 0xc2f51(%rip), %rsi     # 0x10194d
movq %rax, %rdi
callq 0x4480
movsd 0x30(%rbx), %xmm0
movq %rax, %rdi
callq 0x46c0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0xc2f37(%rip), %rsi     # 0x10195a
movq %r14, %rdi
callq 0x4480
leaq 0x38(%rbx), %rdi
movq 0x11158a(%rip), %r12    # 0x14ffc0
movq %r12, %rsi
callq 0x6403e
leaq 0xc2f1b(%rip), %rsi     # 0x101960
movq %r14, %rdi
callq 0x4480
leaq 0x50(%rbx), %rdi
movq %r12, %rsi
callq 0x6403e
leaq 0xc2f06(%rip), %rsi     # 0x101966
movq %r14, %rdi
callq 0x4480
leaq 0x68(%rbx), %rdi
movq %r12, %rsi
callq 0x6403e
leaq 0xc2ef1(%rip), %rsi     # 0x10196c
movq %r14, %rdi
callq 0x4480
movl 0x110(%rbx), %esi
movq %rax, %rdi
callq 0x4760
movq %rax, %rdi
movq %r15, %rsi
callq 0x4480
leaq 0x2f0(%rbx), %r14
xorl %r15d, %r15d
movslq 0x110(%rbx), %rax
cmpq %rax, %r15
jge 0x3eacd
movq %r14, %rdi
movq %r15, %rsi
callq 0xa73a
movq %rax, %rdi
movq %r12, %rsi
callq 0x3de2c
incq %r15
jmp 0x3eaa6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::copy(ATOM_NETWORK*)
void ATOM_NETWORK::copy(ATOM_NETWORK *newNet){
    newNet->a = a; newNet->b = b; newNet->c = c;
    newNet->alpha = alpha; newNet->beta = beta; newNet->gamma = gamma;
    newNet->v_a = v_a; newNet->v_b = v_b; newNet->v_c = v_c;
    newNet->numAtoms = numAtoms; newNet->name = name;
    newNet->atoms.clear(); newNet->atoms = atoms;
    newNet->IDmapping.clear(); newNet->IDmapping = IDmapping;

    newNet->vertices.clear(); newNet->vertices = vertices;
    newNet->orphan_edge_starts.clear(); newNet->orphan_edge_starts = orphan_edge_starts;
    newNet->orphan_edge_ends.clear(); newNet->orphan_edge_ends = orphan_edge_ends;
    newNet->vertex_basic_indices.clear(); newNet->vertex_basic_indices = vertex_basic_indices;
    newNet->vertex_symmetry_operators.clear(); newNet->vertex_symmetry_operators = vertex_symmetry_operators;
    newNet->sym_ID = sym_ID;
    newNet->sym_name = sym_name;
    newNet->valid = valid;

    newNet->initialize();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movups 0x8(%rdi), %xmm0
movups %xmm0, 0x8(%rsi)
movups 0x18(%rdi), %xmm0
movups %xmm0, 0x18(%rsi)
movups 0x28(%rdi), %xmm0
movups %xmm0, 0x28(%rsi)
movq 0x48(%rdi), %rax
movq %rax, 0x48(%rsi)
movups 0x38(%rdi), %xmm0
movups %xmm0, 0x38(%rsi)
movq 0x60(%rdi), %rax
movq %rax, 0x60(%rsi)
movups 0x50(%rdi), %xmm0
movups %xmm0, 0x50(%rsi)
movups 0x68(%rdi), %xmm0
movups %xmm0, 0x68(%rsi)
movq 0x78(%rdi), %rax
movq %rax, 0x78(%rsi)
movl 0x110(%rdi), %eax
movl %eax, 0x110(%rsi)
movl $0x320, %edi            # imm = 0x320
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x4270
movl $0x2f0, %r15d           # imm = 0x2F0
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0xa732
addq %r14, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x4b2da
leaq 0x308(%rbx), %rdi
movq 0x308(%rbx), %rax
cmpq %rax, 0x310(%rbx)
je 0x3eb8b
movq %rax, 0x310(%rbx)
leaq 0x308(%r14), %rsi
callq 0xc178
movl $0x3c0, %r15d           # imm = 0x3C0
leaq (%rbx,%r15), %r12
movq %r12, %rdi
callq 0x4b3ba
addq %r14, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x4b3c2
leaq 0x3d8(%rbx), %rdi
movq 0x3d8(%rbx), %rax
cmpq %rax, 0x3e0(%rbx)
je 0x3ebd5
movq %rax, 0x3e0(%rbx)
leaq 0x3d8(%r14), %rsi
callq 0x4b4a0
leaq 0x3f0(%rbx), %rdi
movq 0x3f0(%rbx), %rax
cmpq %rax, 0x3f8(%rbx)
je 0x3ebff
movq %rax, 0x3f8(%rbx)
leaq 0x3f0(%r14), %rsi
callq 0x4b4a0
leaq 0x408(%rbx), %rdi
movq 0x408(%rbx), %rax
cmpq %rax, 0x410(%rbx)
je 0x3ec29
movq %rax, 0x410(%rbx)
leaq 0x408(%r14), %rsi
callq 0xc178
leaq 0x420(%rbx), %rdi
movq 0x420(%rbx), %rax
cmpq %rax, 0x428(%rbx)
je 0x3ec53
movq %rax, 0x428(%rbx)
leaq 0x420(%r14), %rsi
callq 0xc178
movl 0x438(%r14), %eax
movl %eax, 0x438(%rbx)
movl $0x440, %edi            # imm = 0x440
leaq (%r14,%rdi), %rsi
addq %rbx, %rdi
callq 0x4270
movb 0x3b8(%r14), %al
movb %al, 0x3b8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3e5a4
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: get_unit_edge_length(ATOM_NETWORK*)
double get_unit_edge_length(ATOM_NETWORK *c) {
  int num_v = c->vertices.size();
  double unit_edge_length = -1;
  for(int i=0; i<num_v; i++) {
    VERTEX v = c->vertices.at(i);
    int num_e = v.edges.size();
    XYZ v_xyz = c->abc_to_xyz_returning_XYZ(v.abc);
    for(int j=0; j<num_e; j++) {
      XYZ e_xyz = c->abc_to_xyz_returning_XYZ(v.edges.at(j));
      double edge_length = (e_xyz-v_xyz).magnitude();
      if(unit_edge_length<0) unit_edge_length = edge_length;
      else if(fabs(unit_edge_length-edge_length)>DISTANCE_TOLERANCE) {
        printf("ERROR: found a basic edge length of %.3f which is sufficiently different to the previous length of %.3f; at the moment, nets with more than one edge length are not handled\n", edge_length, unit_edge_length);
        exit(EXIT_FAILURE);
      }
    }
  }
  return unit_edge_length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x3c0(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x3c8(%rdi), %rax
subq 0x3c0(%rdi), %rax
pushq $0x70
popq %rcx
cqto
idivq %rcx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
movq %rax, 0x10(%rsp)
movsd 0xc100e(%rip), %xmm0    # 0x1002e8
movsd %xmm0, (%rsp)
leaq 0xc0(%rsp), %rbp
leaq 0xa8(%rsp), %r14
leaq 0x90(%rsp), %r15
xorl %esi, %esi
cmpq 0x10(%rsp), %rsi
je 0x3f3d8
movq 0x8(%rsp), %rdi
movq %rsi, 0x18(%rsp)
callq 0x4b63c
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x4b65a
movq 0x40(%rsp), %r13
movq 0x48(%rsp), %r12
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x20(%rsp), %rdx
callq 0x3f1b2
subq %r13, %r12
movq %r12, %rax
cqto
pushq $0x18
popq %rcx
idivq %rcx
movq %rax, %r13
testl %r13d, %r13d
movl $0x0, %eax
cmovlel %eax, %r13d
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x3f3c1
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x4b6d6
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x3f1b2
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x642ae
movq %r15, %rdi
callq 0x63758
movsd (%rsp), %xmm1
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
jbe 0x3f3a6
movsd %xmm0, (%rsp)
jmp 0x3f3bc
subsd %xmm0, %xmm1
andpd 0xbccee(%rip), %xmm1    # 0xfc0a0
ucomisd 0xc230e(%rip), %xmm1    # 0x1016c8
ja 0x3f3ef
incq %r12
jmp 0x3f35a
leaq 0x20(%rsp), %rdi
callq 0xb1ba
movq 0x18(%rsp), %rsi
incq %rsi
jmp 0x3f2f9
movsd (%rsp), %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc2588(%rip), %rdi     # 0x10197e
movsd (%rsp), %xmm1
movb $0x2, %al
callq 0x4050
pushq $0x1
popq %rdi
callq 0x524c
jmp 0x3f40e
jmp 0x3f40e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb1ba
movq %rbx, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::calcDistanceXYZ(double, double, double, double, double, double) const
double ATOM_NETWORK::calcDistanceXYZ(double x1, double y1, double z1, double x2, double y2, double z2) const {
    Point abcCoord = xyz_to_abc(x1, y1, z1);
    //cout << abcCoord.vals[0] <<  abcCoord.vals[1] << abcCoord.vals[2] << endl;
    //cout << x2 <<  y2 << z2 << endl;
    //cout << calcDistanceXYZABC(x2, y2, z2, abcCoord[0], abcCoord[1], abcCoord[2]);
    return calcDistanceXYZABC(x2, y2, z2, abcCoord[0], abcCoord[1], abcCoord[2]);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movsd %xmm5, 0x28(%rsp)
movsd %xmm4, 0x20(%rsp)
movsd %xmm3, 0x18(%rsp)
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3f1ce
movq %r14, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x63c78
movsd (%rax), %xmm5
movq %rbx, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
movsd 0x10(%rsp), %xmm3
movsd 0x8(%rsp), %xmm4
callq 0x3f56c
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::getClosestPointInABC(double, double, double, double, double, double)
const XYZ ATOM_NETWORK::getClosestPointInABC(double x1, double y1, double z1, double x2, double y2, double z2){
    Point abcCoordStatic = xyz_to_abc(x1, y1, z1);
    Point abcCoordMobile = xyz_to_abc(x2, y2, z2);
    XYZ answer;
    getDistCalc().closest_periodic_image(abcCoordStatic[0], abcCoordStatic[1], abcCoordStatic[2],
                                         abcCoordMobile[0], abcCoordMobile[1], abcCoordMobile[2],
                                         answer.x, answer.y, answer.z);
    return answer;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movsd %xmm5, 0x10(%rsp)
movsd %xmm4, 0x8(%rsp)
movsd %xmm3, (%rsp)
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x3f1ce
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
callq 0x3f1ce
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %rbx, %rdi
callq 0x6402e
addq $0x340, %r15            # imm = 0x340
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x4b58a
movq %r14, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x40(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x40(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x28(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x63c78
movsd (%rax), %xmm5
leaq 0x8(%rbx), %rdx
leaq 0x10(%rbx), %rcx
leaq 0x58(%rsp), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movsd (%rsp), %xmm2
movsd 0x20(%rsp), %xmm3
movsd 0x18(%rsp), %xmm4
movq %rbx, %rsi
callq 0x59d06
leaq 0x58(%rsp), %rdi
callq 0xb0f0
movq %rbx, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xb0f0
movq %rbx, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::minimizePointDistance(Point, double, double, double)
const Point ATOM_NETWORK::minimizePointDistance(Point origPoint, double dx, double dy, double dz){
    Point abc_one  = xyz_to_abc(origPoint);
    Point abc_two  = xyz_to_abc(dx, dy, dz);
    
    double minDa = DBL_MAX, minDb = DBL_MAX, minDc = DBL_MAX, best_a = DBL_MAX, best_b = DBL_MAX, best_c = DBL_MAX;
    getDistCalc().closest_periodic_image(abc_two[0], abc_two[1], abc_two[2], abc_one[0], abc_one[1], abc_one[2],
                                         minDa, minDb, minDc, best_a, best_b, best_c);
    return abc_to_xyz(best_a, best_b, best_c);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movsd %xmm2, 0x30(%rsp)
movsd %xmm1, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
movq %rsi, %r14
movq %rdi, %rbx
movq 0x150(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x140(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
callq 0x3e4c8
leaq 0x90(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x30(%rsp), %xmm2
callq 0x3f1ce
movabsq $0x7fefffffffffffff, %rax # imm = 0x7FEFFFFFFFFFFFFF
movq %rax, 0x70(%rsp)
movq %rax, 0x68(%rsp)
movq %rax, 0x60(%rsp)
movq %rax, 0x48(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, 0x38(%rsp)
leaq 0x340(%r14), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x4b58a
movq %r15, %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
leaq 0x90(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x90(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
leaq 0x78(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x63c78
movsd (%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x78(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x63c78
movsd (%rax), %xmm5
leaq 0x38(%rsp), %rax
movq %rax, (%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0x48(%rsp), %r8
leaq 0x40(%rsp), %r9
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movsd 0x20(%rsp), %xmm2
movsd 0x58(%rsp), %xmm3
movsd 0x50(%rsp), %xmm4
callq 0x59b0a
leaq 0xa8(%rsp), %rdi
callq 0xb0f0
movsd 0x48(%rsp), %xmm0
movsd 0x40(%rsp), %xmm1
movsd 0x38(%rsp), %xmm2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3f0e6
movq %rbx, %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xb0f0
movq %rbx, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::CalculateTetrahedrality4Atoms(ATOM const&, ATOM const&, ATOM const&, ATOM const&) const
double ATOM_NETWORK::CalculateTetrahedrality4Atoms(const ATOM& atm1, const ATOM& atm2, const ATOM& atm3, const ATOM& atm4) const {
    
    vector <double> edges; // tetrahedra edges' lengths
    double d_mean=0.0; // mean value
    double Tindex=0.0;
    
    edges.push_back(calcDistance(atm1,atm2));
    edges.push_back(calcDistance(atm1,atm3));
    edges.push_back(calcDistance(atm1,atm4));
    edges.push_back(calcDistance(atm2,atm3));
    edges.push_back(calcDistance(atm2,atm4));
    edges.push_back(calcDistance(atm3,atm4));
    
    for(int i=0;i<6;i++) d_mean+=edges[i];
    
    d_mean=d_mean/6.0;
    
    for(int i=0;i<5;i++) {
        for(int j=i+1;j<6;j++) {
            Tindex+=((edges[i]-edges[j])*(edges[i]-edges[j]))/(15.0*d_mean*d_mean);
        }
    }
    
    return Tindex;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
callq 0x3f612
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xf9fe
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x3f612
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xf9fe
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x3f612
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xf9fe
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3f612
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xf9fe
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3f612
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xf9fe
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3f612
leaq 0x8(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0xf9fe
xorpd %xmm1, %xmm1
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
cmpq $0x6, %rcx
je 0x40548
addsd (%rax,%rcx,8), %xmm1
incq %rcx
jmp 0x40538
divsd 0xc0cc0(%rip), %xmm1    # 0x101210
movsd 0xc1180(%rip), %xmm0    # 0x1016d8
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
pushq $0x1
popq %rcx
xorl %edx, %edx
cmpq $0x5, %rdx
je 0x4059b
movq %rcx, %rsi
cmpq $0x6, %rsi
je 0x40593
movsd (%rax,%rdx,8), %xmm1
subsd (%rax,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
divsd %xmm0, %xmm1
addsd %xmm1, %xmm2
incq %rsi
jmp 0x40572
incq %rdx
incq %rcx
jmp 0x40569
leaq 0x10(%rsp), %rdi
movsd %xmm2, 0x28(%rsp)
callq 0xb25c
movsd 0x28(%rsp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x405c9
jmp 0x405c9
jmp 0x405c9
jmp 0x405c9
jmp 0x405c9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb25c
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: VORONOI_NETWORK::filterEdges(std::vector<int, std::allocator<int>>)
const VORONOI_NETWORK VORONOI_NETWORK::filterEdges(vector<int> nodeIDs)
{
    vector<bool> includeNodes = vector<bool>(nodes.size(), false);
    for(unsigned int i = 0; i < nodeIDs.size(); i++){
        includeNodes[nodeIDs[i]] = true;
    }
    
    vector<VOR_NODE> newNodes = vector<VOR_NODE>();
    for(unsigned int i = 0; i < nodes.size(); i++){
        newNodes.push_back(nodes[i]);
    }
    
    vector<VOR_EDGE> newEdges = vector<VOR_EDGE>();
    for(unsigned int i = 0; i < edges.size(); i++){
        VOR_EDGE edge = edges[i];
        if(includeNodes[edge.from] && includeNodes[edge.to]){
            newEdges.push_back(edge);
        }
    }
    
    return VORONOI_NETWORK(v_a, v_b, v_c, newNodes, newEdges);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq 0x50(%rsi), %rsi
subq 0x48(%r14), %rsi
movq %rdi, %r13
sarq $0x6, %rsi
leaq 0x28(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x70(%rsp), %r12
leaq 0x10(%rsp), %rcx
movq %r12, %rdi
callq 0x2a0d6
xorl %ebx, %ebx
movl %ebx, %ebx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rbx, %rcx
jbe 0x40b1a
movslq (%rax,%rbx,4), %rsi
movq %r12, %rdi
callq 0x1043e
orq %rdx, (%rax)
incl %ebx
jmp 0x40af2
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %ebx, %ebx
movl %ebx, %ebx
movq 0x48(%r14), %rsi
movq 0x50(%r14), %rax
subq %rsi, %rax
sarq $0x6, %rax
cmpq %rbx, %rax
jbe 0x40b59
movq %rbx, %rax
shlq $0x6, %rax
addq %rax, %rsi
movq %r15, %rdi
callq 0xa89e
incl %ebx
jmp 0x40b2d
movq %r13, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %r15
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
xorl %ebp, %ebp
pushq $0x28
popq %rbx
leaq 0x70(%rsp), %r12
leaq 0x28(%rsp), %r13
movl %ebp, %ebp
movq 0x60(%r14), %rcx
movq 0x68(%r14), %rax
subq %rcx, %rax
cqto
idivq %rbx
cmpq %rbp, %rax
jbe 0x40bf1
imulq $0x28, %rbp, %rax
movq (%rcx,%rax), %rdx
movq %rdx, 0x28(%rsp)
movsd 0x8(%rcx,%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x10(%rcx,%rax), %rsi
movq %rsi, 0x38(%rsp)
movl 0x18(%rcx,%rax), %eax
movl %eax, 0x40(%rsp)
movslq %edx, %rsi
movq %r12, %rdi
callq 0x1043e
testq %rdx, (%rax)
je 0x40bed
movslq 0x2c(%rsp), %rsi
movq %r12, %rdi
callq 0x1043e
testq %rdx, (%rax)
je 0x40bed
movq %r15, %rdi
movq %r13, %rsi
callq 0xa8ca
incl %ebp
jmp 0x40b7e
leaq 0x18(%r14), %rdx
leaq 0x30(%r14), %rcx
leaq 0x10(%rsp), %r8
leaq 0x50(%rsp), %r9
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40956
leaq 0x50(%rsp), %rdi
callq 0xb038
leaq 0x10(%rsp), %rdi
callq 0xb016
leaq 0x70(%rsp), %rdi
callq 0xa976
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40c4c
jmp 0x40c4c
jmp 0x40c4c
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xb038
jmp 0x40c5e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb016
jmp 0x40c6d
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xa976
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: VORONOI_NETWORK::prune(double const&)
const VORONOI_NETWORK VORONOI_NETWORK::prune(const double& minRadius)
{
    vector<VOR_EDGE> newEdges;
    // Add edges whose radius is greater than the input minimum to a list
    for(vector<VOR_EDGE>::iterator edgeIter = edges.begin();
        edgeIter != edges.end(); edgeIter++) {
        if(edgeIter->rad_moving_sphere > minRadius){
            //VOR_EDGE newEdge = *edgeIter;
            
            // further check: keep edges only if they connect accessible nodes
            if( nodes[edgeIter->from].rad_stat_sphere > minRadius && nodes[edgeIter->to].rad_stat_sphere > minRadius )
                newEdges.push_back(*edgeIter);
            
        }
    };
    
    vector<VOR_NODE> newNodes = nodes;
    for(unsigned int i = 0; i < nodes.size(); i++)
    {
        if(nodes[i].rad_stat_sphere > minRadius) newNodes[i].active = true; else newNodes[i].active = false;
    };
    
    return VORONOI_NETWORK(v_a, v_b, v_c, newNodes, newEdges);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
andq $0x0, 0x10(%r12)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r12)
movq 0x60(%rsi), %rbp
leaq 0x48(%rsi), %r13
cmpq 0x68(%r14), %rbp
je 0x41137
movsd 0x8(%rbp), %xmm1
movsd (%r15), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x41131
movslq (%rbp), %rcx
movq (%r13), %rax
shlq $0x6, %rcx
movsd 0x18(%rax,%rcx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x41131
movslq 0x4(%rbp), %rcx
shlq $0x6, %rcx
movsd 0x18(%rax,%rcx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x41131
movq %r12, %rdi
movq %rbp, %rsi
callq 0xa8ca
addq $0x28, %rbp
jmp 0x410e4
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x4b718
movq 0x48(%r14), %rax
movq 0x50(%r14), %rcx
subq %rax, %rcx
sarq $0x6, %rcx
movsd (%r15), %xmm0
xorl %esi, %esi
movq 0x8(%rsp), %rdx
movl %esi, %esi
cmpq %rsi, %rcx
jbe 0x41180
movq %rsi, %rdi
shlq $0x6, %rdi
movsd 0x18(%rax,%rdi), %xmm1
ucomisd %xmm0, %xmm1
seta 0x38(%rdx,%rdi)
incl %esi
jmp 0x4115f
leaq 0x18(%r14), %rdx
leaq 0x30(%r14), %rcx
leaq 0x8(%rsp), %r8
leaq 0x20(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40956
leaq 0x8(%rsp), %rdi
callq 0xb016
leaq 0x20(%rsp), %rdi
callq 0xb038
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xb016
jmp 0x411d7
jmp 0x411d4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xb038
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkstorage.cc
// Function: pruneVoronoiNetworkfromEdgeList(VORONOI_NETWORK*, VORONOI_NETWORK*, std::vector<int, std::allocator<int>>)
void pruneVoronoiNetworkfromEdgeList(VORONOI_NETWORK *vornet,
                                     VORONOI_NETWORK *newVornet,
                                     vector <int> ids){
    
    newVornet->nodes = vornet->nodes;
    
    vector<VOR_EDGE>::iterator edgeIter = vornet->edges.begin();
    vector<VOR_EDGE> newEdges;
    
    // Add all edges whose are not connected to specified nodes
    while(edgeIter != vornet->edges.end()){
        int flag=0;
        for(unsigned int i=0; i<ids.size(); i++){
            // if edge connects to node of specified id, flag it
            if(edgeIter->from==ids[i]||edgeIter->to==ids[i]) flag++;
        };
        
        if(flag==0){ // only keep unflagged edges
            VOR_EDGE newEdge;
            newEdge.from = edgeIter->from;
            newEdge.to   = edgeIter->to;
            newEdge.rad_moving_sphere = edgeIter->rad_moving_sphere;
            newEdge.delta_uc_x = edgeIter->delta_uc_x;
            newEdge.delta_uc_y = edgeIter->delta_uc_y;
            newEdge.delta_uc_z = edgeIter->delta_uc_z;
            newEdge.length = edgeIter->length;
            newEdges.push_back(newEdge);
        }
        edgeIter++;
    }
    
    
    newVornet->edges = newEdges;
    newVornet->v_a = vornet->v_a;
    newVornet->v_b = vornet->v_b;
    newVornet->v_c = vornet->v_c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x48(%rdi), %rsi
leaq 0x48(%rbx), %rdi
callq 0x4b88c
movq 0x60(%r14), %rbp
xorps %xmm0, %xmm0
movq %rsp, %r12
movaps %xmm0, (%r12)
andq $0x0, 0x10(%r12)
leaq 0x20(%rsp), %r13
cmpq 0x68(%r14), %rbp
je 0x4129d
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
xorl %edx, %edx
xorl %esi, %esi
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x41259
movl (%rax,%rdx,4), %edi
cmpl %edi, (%rbp)
je 0x41253
cmpl %edi, 0x4(%rbp)
jne 0x41255
incl %esi
incl %edx
jmp 0x4123f
testl %esi, %esi
jne 0x41297
movq (%rbp), %rax
movq %rax, 0x20(%rsp)
movsd 0x8(%rbp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x10(%rbp), %rax
movq %rax, 0x30(%rsp)
movl 0x18(%rbp), %eax
movl %eax, 0x38(%rsp)
movsd 0x20(%rbp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0xa8ca
addq $0x28, %rbp
jmp 0x41227
leaq 0x60(%rbx), %rdi
movq %rsp, %rsi
callq 0x4b7c6
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x28(%r14), %rax
movq %rax, 0x28(%rbx)
movups 0x30(%r14), %xmm0
movups %xmm0, 0x30(%rbx)
movq 0x40(%r14), %rax
movq %rax, 0x40(%rbx)
movq %rsp, %rdi
callq 0xb038
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x412f3
movq %rax, %rbx
movq %rsp, %rdi
callq 0xb038
movq %rbx, %rdi
callq 0x4780