LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: rotate(MOLECULE, double (*) [3])
MOLECULE rotate(MOLECULE orig, double mat[3][3]) {
  MOLECULE rot = orig;
  int num_atom = orig.atoms_xyz.size();
  for(int i=0; i<num_atom+1; i++) {
    XYZ o;
    if(i<num_atom) o = orig.atoms_xyz.at(i); else o = orig.com; //handle the centre of mass too!
    XYZ n(
mat[0][0]*o.x + mat[0][1]*o.y + mat[0][2]*o.z,
mat[1][0]*o.x + mat[1][1]*o.y + mat[1][2]*o.z,
mat[2][0]*o.x + mat[2][1]*o.y + mat[2][2]*o.z);
    if(i<num_atom) rot.atoms_xyz.at(i) = n; else rot.com = n; //handle the centre of mass too!
  }
  return rot;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
callq 0x67f48
movq 0x8(%r15), %rbx
subq (%r15), %rbx
sarq $0x3, %rbx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbx
testl %ebx, %ebx
js 0x9f475
movl $0x90, %eax
leaq (%r15,%rax), %rcx
movq %rcx, 0x38(%rsp)
addq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl %ebx, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
incl %ebx
xorl %ebp, %ebp
xorl %r12d, %r12d
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
leaq 0x10(%rsp), %rdi
callq 0x85982
movq 0x38(%rsp), %rax
cmpq %r13, %r12
jae 0x9f38f
movq (%r15), %rax
movq 0x8(%r15), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x9f49a
addq %rbp, %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x20(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm3
movsd 0x18(%rsp), %xmm4
movsd 0x8(%r14), %xmm0
mulsd %xmm4, %xmm0
movsd (%r14), %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm2
movsd 0x10(%r14), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x20(%r14), %xmm1
mulsd %xmm4, %xmm1
movsd 0x18(%r14), %xmm5
mulsd %xmm3, %xmm5
addsd %xmm1, %xmm5
movsd 0x28(%r14), %xmm1
mulsd %xmm2, %xmm1
addsd %xmm5, %xmm1
mulsd 0x38(%r14), %xmm4
mulsd 0x30(%r14), %xmm3
addsd %xmm4, %xmm3
mulsd 0x40(%r14), %xmm2
addsd %xmm3, %xmm2
leaq 0x40(%rsp), %rdi
callq 0x85982
movq 0x30(%rsp), %rax
cmpq %r13, %r12
jae 0x9f454
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x9f489
addq %rbp, %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x10(%rax)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rax)
incq %r12
addq $0x18, %rbp
cmpq %r12, %rbx
jne 0x9f347
movq 0x8(%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb0215(%rip), %rdi     # 0x14f6a5
movq %r12, %rsi
xorl %eax, %eax
callq 0x4630
leaq 0xb0204(%rip), %rdi     # 0x14f6a5
movq %r12, %rsi
xorl %eax, %eax
callq 0x4630
jmp 0x9f4b1
jmp 0x9f4b1
jmp 0x9f4b1
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x6804c
movq %r14, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: get_mol_site_CoM(MOLECULE*)
XYZ get_mol_site_CoM(MOLECULE *mol) {
  int num_mol_sites_no_dummy = mol->sites.size();
  XYZ mol_CoM(0,0,0);
  for(int i=0; i<num_mol_sites_no_dummy; i++) {
    mol_CoM = mol_CoM+mol->atoms_xyz.at(mol->sites.at(i));
  }
  mol_CoM = mol_CoM.scale(1.0/num_mol_sites_no_dummy);
  return mol_CoM;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %r15
subq 0x48(%rsi), %r15
shrq $0x2, %r15
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x85982
movq %r15, 0x8(%rsp)
testl %r15d, %r15d
jle 0x9f57a
movq 0x8(%rsp), %rbp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x10(%rsp), %r12
movq 0x48(%r14), %rax
movq 0x50(%r14), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r15, %rdx
jbe 0x9f5c9
movslq (%rax,%r15,4), %rsi
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
cmpq %rsi, %rdx
jbe 0x9f5c0
leaq (%rsi,%rsi,2), %rcx
leaq (%rax,%rcx,8), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x85dd4
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
incq %r15
cmpq %r15, %rbp
jne 0x9f51b
xorps %xmm1, %xmm1
cvtsi2sdl 0x8(%rsp), %xmm1
movsd 0xafacd(%rip), %xmm0    # 0x14f058
divsd %xmm1, %xmm0
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x85a34
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb00de(%rip), %rdi     # 0x14f6a5
jmp 0x9f5d3
leaq 0xb00d5(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: matches(CONNECTION, CONNECTION)
bool matches(CONNECTION ci, CONNECTION cj) {
  bool match = false;
  if(ci.v1==cj.v2 && ci.v2==cj.v1) {
    if(ci.a+cj.a==0 && ci.b+cj.b==0 && ci.c+cj.c==0) match=true;
  }
  return match;
}

// Assembly:
movl 0x8(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jne 0x9f60f
leaq 0x28(%rsp), %rax
leaq 0x8(%rsp), %rcx
movl 0x4(%rcx), %edx
cmpl (%rax), %edx
jne 0x9f60f
movl 0x10(%rcx), %edx
addl 0x10(%rax), %edx
jne 0x9f60f
movl 0x14(%rcx), %edx
addl 0x14(%rax), %edx
jne 0x9f60f
movl 0x18(%rcx), %ecx
addl 0x18(%rax), %ecx
sete %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: translate(MOLECULE, XYZ)
MOLECULE translate(MOLECULE m, XYZ t) {
  MOLECULE new_m = m;
  int num_atoms = m.atoms_xyz.size();
  for(int i=0; i<num_atoms; i++) {
    XYZ new_pos = m.atoms_xyz.at(i)+t;
    new_m.atoms_xyz.at(i) = new_pos;
  }
  XYZ new_com = m.com+t;
  new_m.com = new_com;
  return new_m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x67f48
movq 0x8(%r14), %rbp
subq (%r14), %rbp
sarq $0x3, %rbp
movabsq $-0x5555555555555555, %r15 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r15, %rbp
testl %ebp, %ebp
jle 0x9f787
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %r12d, %r12d
movq (%r14), %rsi
movq 0x8(%r14), %rdx
subq %rsi, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
cmpq %r12, %rdx
jbe 0x9f7c7
addq %r13, %rsi
movq %rsp, %rdi
leaq 0x50(%rsp), %rdx
callq 0x85dd4
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r15, %rdx
cmpq %r12, %rdx
jbe 0x9f7c7
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax,%r13)
movups (%rsp), %xmm0
movups %xmm0, (%rax,%r13)
incq %r12
addq $0x18, %r13
cmpq %r12, %rbp
jne 0x9f726
addq $0x90, %r14
movq %rsp, %rdi
movq %r14, %rsi
leaq 0x50(%rsp), %rdx
callq 0x85dd4
movq 0x10(%rsp), %rax
movq %rax, 0xa0(%rbx)
movups (%rsp), %xmm0
movups %xmm0, 0x90(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xafed7(%rip), %rdi     # 0x14f6a5
movq %r12, %rsi
xorl %eax, %eax
callq 0x4630
jmp 0x9f7dc
jmp 0x9f7dc
movq %rax, %r14
movq %rbx, %rdi
callq 0x6804c
movq %r14, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: permute(std::vector<int, std::allocator<int>>, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>*)
void permute(vector<int> vec, int pos, vector< vector<int> > *out_vec) {
  if (pos == vec.size()) out_vec->push_back(vec);
  else {
    for (int j = pos; j < vec.size(); j++) {
      swap(&vec, pos, j);
      permute(vec, pos+1, out_vec);
      swap(&vec, pos, j); //backtrack
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %r12
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x2, %rax
cmpq %r12, %rax
jne 0x9f82f
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xefae
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
cmpq %r12, %rax
jbe 0x9f8a6
movl %esi, %r15d
leal 0x1(%r15), %ebp
movq %rsp, %r13
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x9f8d6
movq %r13, %rdi
movq %r14, %rsi
callq 0xe886
movq %r13, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x9f7ef
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x9f885
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x9f8d6
incq %r12
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x9f849
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x9f8ce
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: get_com(MOLECULE*)
void get_com(MOLECULE *m) {
  bool verbose = false;
  int num_sites = m->sites.size();
  XYZ com(0,0,0);
  for(int i=0; i<num_sites; i++) {
    int site_index = m->sites.at(i);
    //update centre of mass accordingly
    com = com + m->atoms_xyz.at(site_index);
  }
  //finalise centre of mass by normalising it
  com = com.scale(1.0/((double)num_sites));
  m->com = com;
  if(verbose) printf("DEBUG: centre of mass of this molecule is at %.3f %.3f %.3f\n", com.x, com.y, com.z);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x50(%rdi), %r14
subq 0x48(%rdi), %r14
shrq $0x2, %r14
leaq 0x10(%rsp), %rdi
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x85982
movq %r14, 0x8(%rsp)
testl %r14d, %r14d
jle 0xa032e
movq 0x8(%rsp), %rbp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x48(%rbx), %rax
movq 0x50(%rbx), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r14, %rdx
jbe 0xa038e
movslq (%rax,%r14,4), %rsi
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %r13, %rdx
cmpq %rsi, %rdx
jbe 0xa0385
leaq (%rsi,%rsi,2), %rcx
leaq (%rax,%rcx,8), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x85dd4
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x30(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
incq %r14
cmpq %r14, %rbp
jne 0xa02c8
xorps %xmm1, %xmm1
cvtsi2sdl 0x8(%rsp), %xmm1
movsd 0xaed19(%rip), %xmm0    # 0x14f058
divsd %xmm1, %xmm0
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x85a34
movq 0x10(%r14), %rax
movq %rax, 0x10(%r15)
movups (%r14), %xmm0
movaps %xmm0, (%r15)
movq %rax, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaf319(%rip), %rdi     # 0x14f6a5
jmp 0xa0398
leaq 0xaf310(%rip), %rdi     # 0x14f6a5
movq %r14, %rsi
xorl %eax, %eax
callq 0x4630
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: recursive_visit_vertices(int, std::vector<CONNECTION, std::allocator<CONNECTION>>*, std::vector<bool, std::allocator<bool>>*)
void recursive_visit_vertices(int this_v, vector<CONNECTION> *two_way_connections, vector<bool> *visited_vertex) {
  visited_vertex->at(this_v) = true;
  int num_c = two_way_connections->size();
  for(int i=0; i<num_c; i++) {
    CONNECTION c = two_way_connections->at(i);
    if(c.v1==this_v && !visited_vertex->at(c.v2)) recursive_visit_vertices(c.v2, two_way_connections, visited_vertex);
    if(c.v2==this_v && !visited_vertex->at(c.v1)) recursive_visit_vertices(c.v1, two_way_connections, visited_vertex);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebp
movslq %edi, %rsi
movq %rdx, 0x8(%rsp)
movq %rdx, %rdi
callq 0xedb6
orq %rdx, (%rax)
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
testl %eax, %eax
jle 0xa048c
movq 0x10(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x10(%rsp)
movl $0x4, %ebx
xorl %r15d, %r15d
movq (%r14), %rax
movq 0x8(%r14), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rdx
cmpq %r15, %rdx
jbe 0xa049b
movslq -0x4(%rax,%rbx), %r12
movslq (%rax,%rbx), %r13
cmpl %ebp, %r12d
jne 0xa0453
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xedb6
testq %rdx, (%rax)
jne 0xa0453
movl %r13d, %edi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
callq 0xa039f
cmpl %ebp, %r13d
jne 0xa047a
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0xedb6
testq %rdx, (%rax)
jne 0xa047a
movl %r12d, %edi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
callq 0xa039f
incq %r15
addq $0x1c, %rbx
cmpq %r15, 0x10(%rsp)
jne 0xa0402
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaf203(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
xorl %eax, %eax
callq 0x4630
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: get_periodic_images_of_uc_abc_position(XYZ)
vector<XYZ> get_periodic_images_of_uc_abc_position(XYZ e_abc) {
  vector<XYZ> periodic_images;
  for(int i=-2; i<=2; i++) {
    for(int j=-2; j<=2; j++) {
      for(int k=-2; k<=2; k++) {
        XYZ image(e_abc.x+i, e_abc.y+j, e_abc.z+k);
        periodic_images.push_back(image);
      }
    }
  }
  return periodic_images;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movsd 0x70(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x28(%rsp), %r14
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
addsd (%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
xorps %xmm2, %xmm2
cvtsi2sd %r12d, %xmm2
addsd 0x10(%rsp), %xmm2
movq %r14, %rdi
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm1
callq 0x85982
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xa2f9a
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsi)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x18, 0x8(%rbx)
jmp 0xa2fa5
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6a5be
incl %r12d
cmpl $0x3, %r12d
jne 0xa2f56
incl %r15d
cmpl $0x3, %r15d
jne 0xa2f3c
incl %ebp
cmpl $0x3, %ebp
jne 0xa2f24
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xa2fe9
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x4470
movq %r14, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/net.cc
// Function: search_for_char(_IO_FILE*, char)
void search_for_char(FILE *f, char target) {
	char c = getc(f);
//printf("DEBUG: found %c with int value %d\n", c, (int)c);
	while(c!=target && c!=EOF) {
		c = getc(f);
//printf("DEBUG: found %c with int value %d\n", c, (int)c);
	}
	if(c==EOF) {
		printf("ERROR: The required character (%c, with int value %d) was not found in this file.\n", target, (int)target);
		exit(EXIT_FAILURE);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x4180
movsbl %al, %edx
movl %eax, %ecx
shll $0x18, %ecx
cmpl %ebx, %edx
sete %al
cmpl $0xff000000, %ecx       # imm = 0xFF000000
sete %dl
orb %al, %dl
jne 0xa326e
movq %r14, %rdi
callq 0x4180
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0xff000000, %ecx       # imm = 0xFF000000
je 0xa326e
movsbl %al, %eax
cmpl %ebx, %eax
jne 0xa3252
cmpl $0xff000000, %ecx       # imm = 0xFF000000
je 0xa327e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xb529a(%rip), %rdi     # 0x15851f
movl %ebx, %esi
movl %ebx, %edx
xorl %eax, %eax
callq 0x4060
movl $0x1, %edi
callq 0x710c
nop
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/rmsd.cc
// Function: normalize(double*)
void normalize(double a[3])
{
  double  b;

  b = sqrt((double)(a[0]*a[0] + a[1]*a[1] + a[2]*a[2]));
  a[0] /= b;
  a[1] /= b;
  a[2] /= b;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movsd (%rdi), %xmm1
movsd 0x8(%rdi), %xmm0
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%rdi), %xmm0
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xa32d2
sqrtsd %xmm0, %xmm0
jmp 0xa32d7
callq 0x4350
movsd (%rbx), %xmm1
movsd 0x8(%rbx), %xmm2
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
divsd %xmm0, %xmm2
movsd %xmm2, 0x8(%rbx)
movsd 0x10(%rbx), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/rmsd.cc
// Function: diagonalize_symmetric(double (*) [3], double (*) [3], double*)
int diagonalize_symmetric(double matrix[3][3], 
                          double eigen_vec[3][3], 
                          double eigenval[3])
{
  int n_rot, i, j, k;
  double vec[3][3];
  double val; 
  
  if (!jacobi3(matrix, eigenval, vec, &n_rot)) 
  {
    printf("convergence failed\n");
    return (0);
  }

  /* sort solutions by eigenval */
  for (i=0; i<3; i++) 
  {
    k = i;
    val = eigenval[i];
    
    for (j=i+1; j<3; j++)
      if (eigenval[j] >= val)
      { 
        k = j;
        val = eigenval[k];
      }
       
    if (k != i) 
    {
      eigenval[k] = eigenval[i];
      eigenval[i] = val;
      for (j=0; j<3; j++) 
      {
        val = vec[j][i];
        vec[j][i] = vec[j][k];
        vec[j][k] = val;
      }
    }
  }

  /* transpose such that first index refers to solution index */
  for (i=0; i<3; i++)
    for (j=0; j<3; j++)
      eigen_vec[i][j] = vec[j][i];

  return (1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %rcx
movq %rdx, %rsi
movq %r15, %rdx
callq 0xa34f7
testl %eax, %eax
je 0xa3b4d
movl $0x1, %eax
xorl %ecx, %ecx
movsd (%r14,%rcx,8), %xmm0
movl %ecx, %edx
movapd %xmm0, %xmm1
cmpq $0x1, %rcx
ja 0xa3abf
movq %rax, %rsi
movapd %xmm0, %xmm2
movl %ecx, %edx
movapd %xmm0, %xmm1
movsd (%r14,%rsi,8), %xmm3
ucomisd %xmm2, %xmm3
cmovael %esi, %edx
cmpnlesd %xmm3, %xmm1
movapd %xmm1, %xmm4
andnpd %xmm3, %xmm4
andpd %xmm2, %xmm1
orpd %xmm4, %xmm1
incq %rsi
movapd %xmm1, %xmm2
cmpq $0x3, %rsi
jne 0xa3a90
movl %edx, %esi
cmpq %rsi, %rcx
je 0xa3aff
movslq %edx, %rdx
movsd %xmm0, (%r14,%rdx,8)
movsd %xmm1, (%r14,%rcx,8)
leaq (%rsp,%rdx,8), %rdx
addq $0x10, %rdx
xorl %esi, %esi
movsd (%r15,%rsi), %xmm0
movsd (%rdx,%rsi), %xmm1
movsd %xmm1, (%r15,%rsi)
movsd %xmm0, (%rdx,%rsi)
addq $0x18, %rsi
cmpq $0x48, %rsi
jne 0xa3adf
incq %rcx
incq %rax
addq $0x8, %r15
cmpq $0x3, %rcx
jne 0xa3a71
leaq 0x10(%rsp), %rax
xorl %ecx, %ecx
movq %rax, %rdx
xorl %esi, %esi
movsd (%rdx), %xmm0
movsd %xmm0, (%rbx,%rsi,8)
incq %rsi
addq $0x18, %rdx
cmpq $0x3, %rsi
jne 0xa3b1f
incq %rcx
addq $0x18, %rbx
addq $0x8, %rax
cmpq $0x3, %rcx
jne 0xa3b1a
movl $0x1, %eax
jmp 0xa3b5b
leaq 0xb4bdb(%rip), %rdi     # 0x15872f
callq 0x4660
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/rmsd.cc
// Function: calculate_rotation_rmsd(double (*) [3], double (*) [3], int, double*, double*, double (*) [3], double*)
void calculate_rotation_rmsd(double ref_xlist[][3],
                             double mov_xlist[][3], 
                             int n_list,
                             double mov_com[3],
                             double mov_to_ref[3],
                             double U[3][3],
                             double* rmsd)
{
  double Eo, residual;
  double R[3][3];
  
  setup_rotation(ref_xlist, mov_xlist, n_list, 
                 mov_com, mov_to_ref, R, &Eo);
  calculate_rotation_matrix(R, U, Eo, &residual);
  
  residual = fabs(residual); /* avoids the awkward case of -0.0 */
  *rmsd = sqrt( fabs((double) (residual)*2.0/((double)n_list)) ); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %r9, %r14
movl %edx, %ebx
movq 0xa0(%rsp), %r13
leaq 0x18(%rsp), %r12
movq %r12, (%rsp)
leaq 0x20(%rsp), %r15
movq %r15, %r9
callq 0xa3326
movsd (%r12), %xmm0
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0xa3b65
movsd (%r12), %xmm0
movapd 0xab0b9(%rip), %xmm1    # 0x14f090
andpd %xmm1, %xmm0
movlpd %xmm0, (%r12)
addsd %xmm0, %xmm0
cvtsi2sd %ebx, %xmm2
divsd %xmm2, %xmm0
andpd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xa4001
sqrtsd %xmm0, %xmm0
jmp 0xa4006
callq 0x4350
movsd %xmm0, (%r13)
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/cycle.cc
// Function: edge_finder(VORONOI_NETWORK const*, int, std::vector<int, std::allocator<int>>*)
void edge_finder(const VORONOI_NETWORK* vornet, int node_index, vector<int>* edge_indices)
{
    typedef vector<VOR_EDGE>::const_iterator VeCit;
    int i = 0;
    VeCit it = vornet->edges.begin();
    for (; it != vornet->edges.end(); ++i, ++it){
        if (it->from == node_index || it->to == node_index) 
            edge_indices->push_back(i);
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x0, 0xc(%rsp)
movq 0x60(%rdi), %r12
cmpq 0x68(%rdi), %r12
je 0x109a85
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
leaq 0xc(%rsp), %r15
cmpl %ebp, (%r12)
je 0x109a52
cmpl %ebp, 0x4(%r12)
jne 0x109a77
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x109a6c
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x109a77
movq %rbx, %rdi
movq %r15, %rdx
callq 0xf7b4
incl 0xc(%rsp)
addq $0x28, %r12
cmpq 0x68(%r14), %r12
jne 0x109a45
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/cycle.cc
// Function: compute_4cycle(VORONOI_NETWORK*, std::vector<CYCLE, std::allocator<CYCLE>>*, bool, int)
bool compute_4cycle(VORONOI_NETWORK* vornet, vector<CYCLE> *cycles,
                    bool weight_flag, int weight_range)
{
    //Build graph data structure
    DIJKSTRA_NETWORK dnet;
    DIJKSTRA_NETWORK::buildDijkstraNetwork(vornet, &dnet);
    return compute_4cycle(&dnet, cycles, weight_flag, weight_range);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x50e9e
movq %r14, %rdi
movq %r15, %rsi
callq 0x50fc8
movq %rsp, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x109a92
movl %eax, %ebx
movq %rsp, %rdi
callq 0xf07c
movl %ebx, %eax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xf07c
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/cycle.cc
// Function: centroid(CYCLE const*, XYZ*, std::vector<int, std::allocator<int>>*)
void centroid(const CYCLE* const cycle, XYZ* center, vector<int>* node_ids)
{
    DnCit it = cycle->nodes.begin();
    //cout << "Length of nodes in the cycle: " << cycle->nodes.size() << endl;

    *center = XYZ(0,0,0);
    node_ids->clear();
    //cout << "Length of node_ids vector: " << node_ids->size() << endl;
    for (; it != cycle->nodes.end(); ++it) {
        XYZ new_pt (it->x, it->y, it->z);
        *center = *center + new_pt;
	node_ids->push_back(it->id);
    }
    //cout << "Length of node_ids vector: " << node_ids->size() << endl;

    *center = center->scale(1.0/cycle->length);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r12
leaq 0x20(%rsp), %r13
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
movq %r13, %rdi
callq 0x85982
movq 0x10(%r13), %rax
movq %rax, 0x10(%rbx)
movups (%r13), %xmm0
movups %xmm0, (%rbx)
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x10a39e
movq %rax, 0x8(%r15)
cmpq 0x10(%r14), %r12
je 0x10a419
leaq 0x20(%rsp), %r13
leaq 0x8(%rsp), %rbp
movsd 0x8(%r12), %xmm0
movsd 0x10(%r12), %xmm1
movsd 0x18(%r12), %xmm2
movq %r13, %rdi
callq 0x85982
movq %rbp, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x85dd4
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x10a404
movl (%r12), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%r15)
jmp 0x10a40f
movq %r15, %rdi
movq %r12, %rdx
callq 0xf7b4
addq $0x48, %r12
cmpq 0x10(%r14), %r12
jne 0x10a3ae
movsd 0x44c37(%rip), %xmm0    # 0x14f058
divsd (%r14), %xmm0
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x85a34
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
movups (%r14), %xmm0
movups %xmm0, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/cycle.cc
// Function: face_center(ATOM_NETWORK*, std::vector<XYZ, std::allocator<XYZ>>*)
void face_center(ATOM_NETWORK* atmnet, vector<XYZ>* face_centers)
{
    VORONOI_NETWORK vornet;
    vector<VOR_CELL> vcell;
    vector<BASIC_VCELL> bvcell;
    performVoronoiDecomp(true, atmnet, &vornet, &vcell, true, &bvcell);

    vector<VOR_CELL>::iterator vc_it;
    vector<VOR_FACE>::iterator vf_it;

    int vor_face_count = 0;
    int vor_cell_count = 0;

    for (vc_it = vcell.begin(); vc_it != vcell.end(); ++vc_it){
        for (vf_it = vc_it->faces.begin(); vf_it != vc_it->faces.end(); ++vf_it){
            ++vor_face_count;
            vector<int>::iterator iit;
            if (vf_it->nodeIDs.size() > 4) {
                continue;
            }
            vector<Point>::iterator ip_it;
            cout << "Orderd vertices in the face: " << endl;
            for (ip_it = vf_it->orderedVertices.begin(); ip_it != vf_it->orderedVertices.end(); ++ip_it){;
                //cout << "(";
                //ip_it->print(cout);
                //cout << ")  " ;
            }
            //cout <<  endl;
        }
    }
    cout << "VOR_FACE_COUNT " << vor_face_count << endl;
    vcell.clear();
    bvcell.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %r14
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x555c0
xorl %ebx, %ebx
movq %rsp, %rcx
movq %rbx, 0x10(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %r9
movq %rbx, 0x10(%r9)
movaps %xmm0, (%r9)
movl $0x1, %edi
movq %r14, %rsi
movq %r15, %rdx
movl $0x1, %r8d
callq 0x77c4
movq (%rsp), %r12
cmpq 0x8(%rsp), %r12
je 0x10a527
xorl %ebx, %ebx
movq 0x8cb06(%rip), %r14     # 0x196fc0
leaq 0x4ec8f(%rip), %r15     # 0x159150
movq (%r12), %r13
cmpq 0x8(%r12), %r13
je 0x10a519
movq 0x20(%r13), %rax
subq 0x18(%r13), %rax
cmpq $0x10, %rax
ja 0x10a511
movl $0x1d, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x44e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
addq $0x30, %r13
incl %ebx
jmp 0x10a4c5
addq $0xf8, %r12
cmpq 0x8(%rsp), %r12
jne 0x10a4c1
movq 0x8ca92(%rip), %rdi     # 0x196fc0
leaq 0x4ec39(%rip), %rsi     # 0x15916e
movl $0xf, %edx
callq 0x44e0
movq 0x8ca7a(%rip), %rdi     # 0x196fc0
movl %ebx, %esi
callq 0x4750
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
movq %rsp, %rbx
movq (%rbx), %rsi
movq %rbx, %rdi
callq 0xfa26
leaq 0x20(%rsp), %r14
movq (%r14), %rsi
movq %r14, %rdi
callq 0xf9f6
movq %r14, %rdi
callq 0xebe4
movq %rbx, %rdi
callq 0xebb4
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x10a5c2
movq 0xa8(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x80(%rsp), %rdi
callq 0xf1b8
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x10a5e4
jmp 0x10a5e4
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xebe4
movq %rsp, %rdi
callq 0xebb4
leaq 0x38(%rsp), %rdi
callq 0xeab8
movq %rbx, %rdi
callq 0x4780
nop
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/arguments.cc
// Function: processRadialParameters(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void processRadialParameters(vector<string> args){
    cout << "Loading radii. "<< "\n";
    if(args.size() == 1){
        //do nothing - radTable will have already been initialised by default
    }
    else if(args.size() == 2){
        if(args[1].find(".rad") == string::npos){
            cerr << "Error: If an argument is provided to -r, it must be a file of type .rad containing the types and radii of each atom" << "\n"
            << "Exiting..." << "\n";
            exit(1);
        }
        else{
            readRadTable((char *)args[1].c_str());
        }
    }
    else{
        cerr << "Error: -r option accepts at most 1 argument but " << args.size() - 1 << " were provided." << "\n"
        << "Exiting..." << "\n";
        exit(1);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8c579(%rip), %r14     # 0x196fc0
leaq 0x4e779(%rip), %rsi     # 0x1591c7
movl $0xf, %edx
movq %r14, %rdi
callq 0x44e0
leaq 0x4aacc(%rip), %rsi     # 0x15552e
movl $0x1, %edx
movq %r14, %rdi
callq 0x44e0
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq $0x1, %rax
je 0x10aab9
cmpq $0x2, %rax
jne 0x10aac1
addq $0x20, %rdi
leaq 0x4e743(%rip), %rsi     # 0x1591d7
movl $0x4, %ecx
xorl %edx, %edx
callq 0x4760
cmpq $-0x1, %rax
je 0x10aaf6
movq (%rbx), %rax
movq 0x20(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x219ea
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8c528(%rip), %rdi     # 0x196ff0
leaq 0x4e781(%rip), %rsi     # 0x159250
callq 0x4440
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x5, %rsi
decq %rsi
movq %rax, %rdi
callq 0x4130
leaq 0x4e790(%rip), %rsi     # 0x159281
movq %rax, %rdi
jmp 0x10ab04
movq 0x8c4f3(%rip), %rdi     # 0x196ff0
leaq 0x4e6d8(%rip), %rsi     # 0x1591dc
callq 0x4440
leaq 0x4aa1e(%rip), %rbx     # 0x15552e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4440
leaq 0x4ba90(%rip), %rsi     # 0x1565b2
movq %rax, %rdi
callq 0x4440
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4440
movl $0x1, %edi
callq 0x710c
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/arguments.cc
// Function: processMassParameters(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void processMassParameters(std::vector<std::string> args){
    if(args.size() == 1){
        //do nothing - massTable will have already been initialised by default
    }
    else if(args.size() == 2){
        if(args[1].find(".mass") == string::npos){
            cerr << "Error: If an argument is provided to -mass, it must be a file of type .mass containing the types and masses of each atom" << "\n"
            << "Exiting..." << "\n";
            exit(1);
        }
        else{
            readMassTable((char *)args[1].c_str());
        }
    }
    else{
        cerr << "Error: -mass option requires 1 argument but " << (args.size()-1) << " were supplied" << "\n"
        << "Exiting..." << "\n";
        exit(1);
    };
    
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x8(%rbx), %rax
subq %rdi, %rax
sarq $0x5, %rax
cmpq $0x1, %rax
je 0x10ab87
cmpq $0x2, %rax
jne 0x10ab89
addq $0x20, %rdi
leaq 0x4e729(%rip), %rsi     # 0x159291
movl $0x5, %ecx
xorl %edx, %edx
callq 0x4760
cmpq $-0x1, %rax
je 0x10abbe
movq (%rbx), %rax
movq 0x20(%rax), %rdi
popq %rbx
jmp 0x21c16
popq %rbx
retq
movq 0x8c460(%rip), %rdi     # 0x196ff0
leaq 0x4e779(%rip), %rsi     # 0x159310
callq 0x4440
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x5, %rsi
decq %rsi
movq %rax, %rdi
callq 0x4130
leaq 0x4e784(%rip), %rsi     # 0x15933d
movq %rax, %rdi
jmp 0x10abcc
movq 0x8c42b(%rip), %rdi     # 0x196ff0
leaq 0x4e6cb(%rip), %rsi     # 0x159297
callq 0x4440
leaq 0x4a956(%rip), %rbx     # 0x15552e
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4440
leaq 0x4b9c8(%rip), %rsi     # 0x1565b2
movq %rax, %rdi
callq 0x4440
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4440
movl $0x1, %edi
callq 0x710c
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::runVoroFlat()
void MATERIAL::runVoroFlat()
 {
 if(doneFlatVoroFlag == false) {
   // Perform the relevant Voronoi decomposition
   cout << "Starting Voronoi decomposition" << "\n";
   if(radial)
     rad_con = (container_periodic_poly *)performVoronoiDecomp(true, &atmnet, &vornet, cells, outputZvis, bvcells);
   else
     no_rad_con = (container_periodic *)performVoronoiDecomp (false, &atmnet, &vornet, cells, outputZvis, bvcells);

   doneFlatVoroFlag = true;
   cout << "Finished Voronoi decomposition" << "\n";
   };

 }

// Assembly:
cmpb $0x0, 0xc20(%rdi)
je 0x10b41e
retq
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8bb90(%rip), %rbx     # 0x196fc0
leaq 0x4e153(%rip), %rsi     # 0x15958a
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x44e0
leaq 0x4a0e3(%rip), %r15     # 0x15552e
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x44e0
movzbl 0x968(%r14), %edi
leaq 0x8c0(%r14), %rdx
leaq 0x938(%r14), %rcx
movzbl 0x969(%r14), %r8d
leaq 0x950(%r14), %r9
movl %edi, %eax
xorb $0x1, %al
movzbl %al, %r12d
movq %r14, %rsi
callq 0x717c
movq %rax, 0xc10(%r14,%r12,8)
movb $0x1, 0xc20(%r14)
leaq 0x4e102(%rip), %rsi     # 0x1595a9
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x44e0
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::AVcalc(double, int, std::ostream&, char*)
void MATERIAL::AVcalc(double r, int sampleDensity,ostream &output, char *filename){
  runVoroFlat();
  accessAnalysis.AccessibilityClassSetup(&atmnet, &orgAtomnet, highAccuracy, rad_con, &vornet, &bvcells, &cells);
  accessAnalysis.FindChannels(r);
  MATERIAL *pMaterial = this;
  if(!AVdoneFlag) NEWcalcAV(pMaterial, r, sampleDensity);
  AVdoneFlag = true;

  NEWcalcAVprint(pMaterial, output,filename); 
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r15
callq 0x10b414
leaq 0x990(%r15), %r12
leaq 0x460(%r15), %rdx
movzbl 0x96d(%r15), %ecx
movq 0xc10(%r15), %r8
leaq 0x8c0(%r15), %r9
leaq 0x950(%r15), %rax
leaq 0x938(%r15), %r10
movq %r12, %rdi
movq %r15, %rsi
pushq %r10
pushq %rax
callq 0x96caa
addq $0x10, %rsp
movq %r12, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x96d32
cmpb $0x0, 0xd3a(%r15)
jne 0x10b55e
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
movl %ebp, %esi
callq 0x413b4
movb $0x1, 0xd3a(%r15)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x41b06
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::AVblockPockets(std::ostream&)
void MATERIAL::AVblockPockets(ostream &output){
  if(AVdoneFlag == false)
    {
    cerr << "Cannot execute blocking before AV run.\n";
    } else
    {
    if(AVblockDoneFlag == false) blockPockets(&atmnet, output, AVaxsPoints, AVaxsPointsChannelIDs, AVinaxsPoints, AVinaxsPointsPocketIDs, AVprobeRadius);
    AVblockDoneFlag = true;
    };
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
cmpb $0x0, 0xd3a(%rdi)
je 0x10b67d
movq %rdi, %rbx
cmpb $0x0, 0xd3c(%rdi)
jne 0x10b66e
movq %rsi, %r14
leaq 0xc90(%rbx), %rsi
leaq 0x50(%rsp), %rdi
callq 0xe7f6
leaq 0xca8(%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0xe886
leaq 0xcc0(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0xe7f6
leaq 0xcd8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0xe886
movsd 0xc70(%rbx), %xmm0
leaq 0x50(%rsp), %rdx
leaq 0x38(%rsp), %rcx
leaq 0x20(%rsp), %r8
leaq 0x8(%rsp), %r9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40618
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10b629
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x10b640
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x10b657
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x10b66e
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movb $0x1, 0xd3c(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq 0x8b96c(%rip), %rdi     # 0x196ff0
leaq 0x4df3d(%rip), %rsi     # 0x1595c8
movl $0x27, %edx
addq $0x68, %rsp
popq %rbx
popq %r14
jmp 0x44e0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x10b6bb
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x10b6bb
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x10b6d7
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x10b6d7
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x10b6f3
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x10b6f3
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x10b70a
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::AVcalcPoreSizeDistr(std::ostream&)
void MATERIAL::AVcalcPoreSizeDistr(ostream &output){
  if(AVdoneFlag == false)
    {
    cerr << "Cannot execute PSD before AV run.\n";
    } else
    {
    MATERIAL *pMaterial = this;
    if(AVPSDdoneFlag == false) NEWcalcPoreSizeDistr(pMaterial, output);
    AVPSDdoneFlag = true;
    };
  }

// Assembly:
cmpb $0x0, 0xd3a(%rdi)
je 0x10b739
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0xd3b(%rdi)
jne 0x10b730
movq %rbx, %rdi
callq 0x8cf0b
movb $0x1, 0xd3b(%rbx)
popq %rbx
retq
movq 0x8b8b0(%rip), %rdi     # 0x196ff0
leaq 0x4dea9(%rip), %rsi     # 0x1595f0
movl $0x22, %edx
jmp 0x44e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::ASAcalc(double, int, std::ostream&, char*)
void MATERIAL::ASAcalc(double r, int sampleDensity, ostream &output, char *filename){
  runVoroFlat();
  accessAnalysis.AccessibilityClassSetup(&atmnet, &orgAtomnet, highAccuracy, rad_con, &vornet, &bvcells, &cells);
  accessAnalysis.FindChannels(r);
  MATERIAL *pMaterial = this;
  if(!ASAdoneFlag) NEWcalcASA(pMaterial, r, sampleDensity);
  ASAdoneFlag = true;

  NEWcalcASAprint(pMaterial, output,filename);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r15
callq 0x10b414
leaq 0x990(%r15), %r12
leaq 0x460(%r15), %rdx
movzbl 0x96d(%r15), %ecx
movq 0xc10(%r15), %r8
leaq 0x8c0(%r15), %r9
leaq 0x950(%r15), %rax
leaq 0x938(%r15), %r10
movq %r12, %rdi
movq %r15, %rsi
pushq %r10
pushq %rax
callq 0x96caa
addq $0x10, %rsp
movq %r12, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x96d32
cmpb $0x0, 0xe08(%r15)
jne 0x10b962
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
movl %ebp, %esi
callq 0x477f7
movb $0x1, 0xe08(%r15)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x48306
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::PLDcalc(double, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::ostream&, char*)
void MATERIAL::PLDcalc(double r, double seg_r, string seg_file, ostream &output, char *filename){
  runVoroFlat();
  accessAnalysis.AccessibilityClassSetup(&atmnet, &orgAtomnet, highAccuracy, rad_con, &vornet, &bvcells, &cells);
  accessAnalysis.FindChannels(r);

  if(seg_r > 0)
    { // segment the network based on provide radii of void
    accessAnalysis.calculatePLDbasedOnRadius(seg_r);
    accessAnalysis.reportPLD(output);
    } else
    { // segment the network based on provided segment definitions from a file
    accessAnalysis.calculatePLDbasedOnFile(seg_file);
    accessAnalysis.reportPLD(output);    
    };
/*
  MATERIAL *pMaterial = this;
  if(!ASAdoneFlag) NEWcalcASA(pMaterial, r, sampleDensity);
  ASAdoneFlag = true;
  NEWcalcASAprint(pMaterial, output,filename);
*/
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rdi, %r12
callq 0x10b414
leaq 0x990(%r12), %r14
leaq 0x460(%r12), %rdx
movzbl 0x96d(%r12), %ecx
movq 0xc10(%r12), %r8
leaq 0x8c0(%r12), %r9
leaq 0x950(%r12), %rax
leaq 0x938(%r12), %r10
movq %r14, %rdi
movq %r12, %rsi
pushq %r10
pushq %rax
callq 0x96caa
addq $0x10, %rsp
movq %r14, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x96d32
movsd 0x10(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x10bb00
movq %r14, %rdi
callq 0x9839e
jmp 0x10bb43
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0xf32a
movq %r14, %rdi
movq %r15, %rsi
callq 0x98768
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x10bb43
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9883e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x10bb74
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/material.cc
// Function: MATERIAL::PLDcalcFromMolecules(double, std::ostream&, char*)
void MATERIAL::PLDcalcFromMolecules(double r, ostream &output, char *filename){
  runVoroFlat();
  accessAnalysis.AccessibilityClassSetup(&atmnet, &orgAtomnet, highAccuracy, rad_con, &vornet, &bvcells, &cells);
  accessAnalysis.FindChannels(r);

  accessAnalysis.calculatePLDbasedOnMoleculesPresent(filename);
  accessAnalysis.reportPLD(output);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movsd %xmm0, 0x10(%rsp)
movq %rdi, %r12
callq 0x10b414
leaq 0x990(%r12), %r14
leaq 0x460(%r12), %rdx
movzbl 0x96d(%r12), %ecx
movq 0xc10(%r12), %r8
leaq 0x8c0(%r12), %r9
leaq 0x950(%r12), %rax
leaq 0x938(%r12), %r10
movq %r14, %rdi
movq %r12, %rsi
pushq %r10
pushq %rax
callq 0x96caa
addq $0x10, %rsp
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x96d32
leaq 0x18(%rsp), %r12
leaq 0xf(%rsp), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2f6b2
movq %r14, %rdi
movq %r12, %rsi
callq 0x987ea
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10bc2f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4470
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9883e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x10bc64
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/OMS.cc
// Function: TransformToSpherical(double*)
void TransformToSpherical(double *TargetMolecule)
{

	double x_coord, y_coord, z_coord;
	double Aux;
	
	// Save the coordinates in order to avoid overwritting
	x_coord = TargetMolecule[X_COORD];
	y_coord = TargetMolecule[Y_COORD];
	z_coord = TargetMolecule[Z_COORD];

	

	// Calculate the phi coordinate (interval [0, 2*PI] )
	TargetMolecule[PHI_COORD] = atan2(y_coord, x_coord);
	if (TargetMolecule[PHI_COORD] < 0)
		TargetMolecule[PHI_COORD] = 2*PI + TargetMolecule[PHI_COORD]; 

	// Calcuate the theta coordinate (interval [0, PI] )
	Aux = sqrt( x_coord*x_coord + y_coord*y_coord );
	TargetMolecule[THETA_COORD] = atan2(Aux, z_coord);
	if (TargetMolecule[THETA_COORD] < 0)
		TargetMolecule[THETA_COORD] = PI + TargetMolecule[THETA_COORD]; 
	
	

	// Calculate the radius (not really necessary)
	//SphericalCoordinates[R_COORD] = sqrt

}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movsd (%rdi), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rdi), %xmm2
movsd %xmm2, 0x10(%rsp)
movsd 0x10(%rdi), %xmm0
movsd %xmm0, 0x18(%rsp)
movapd %xmm2, %xmm0
callq 0x40a0
movsd 0x432c3(%rip), %xmm1    # 0x14fab8
addsd %xmm0, %xmm1
xorpd %xmm3, %xmm3
movapd %xmm0, %xmm2
cmpltsd %xmm3, %xmm2
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movsd 0x8(%rsp), %xmm0
movlpd %xmm2, (%rbx)
movsd 0x10(%rsp), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jb 0x10c83a
sqrtsd %xmm0, %xmm0
jmp 0x10c83f
callq 0x4350
movsd 0x18(%rsp), %xmm1
callq 0x40a0
movsd 0x46d2e(%rip), %xmm1    # 0x153580
addsd %xmm0, %xmm1
movapd %xmm0, %xmm2
cmpltsd 0x46a5d(%rip), %xmm2    # 0x1532c0
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movlpd %xmm2, 0x8(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/OMS.cc
// Function: Sort(double**, int, int)
void Sort(	double **MoleculeCoordinates, 
		int Criterion,
		int Size)
{

	int i,j;
	double *Swap;

	for (i = 0 ; i < Size-1; i++)
		for (j = 0 ; j < Size - i - 1; j++)
			if (MoleculeCoordinates[j][Criterion] > MoleculeCoordinates[j+1][Criterion]) 
			{
				Swap = MoleculeCoordinates[j];
				MoleculeCoordinates[j] = MoleculeCoordinates[j+1];
				MoleculeCoordinates[j+1] = Swap;
			}
}

// Assembly:
cmpl $0x2, %edx
jl 0x10c8cd
leal -0x1(%rdx), %eax
movslq %esi, %rcx
xorl %esi, %esi
movl %eax, %r8d
movl %r8d, %r8d
movl %esi, %r9d
subl %edx, %r9d
cmpl $-0x2, %r9d
jg 0x10c8c4
xorl %r9d, %r9d
movq (%rdi,%r9,8), %r10
movq 0x8(%rdi,%r9,8), %r11
movsd (%r10,%rcx,8), %xmm0
ucomisd (%r11,%rcx,8), %xmm0
jbe 0x10c8bc
movq %r11, (%rdi,%r9,8)
movq %r10, 0x8(%rdi,%r9,8)
incq %r9
cmpq %r9, %r8
jne 0x10c89c
incl %esi
decl %r8d
cmpl %eax, %esi
jne 0x10c88a
retq
// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/./Eigen/src/Core/Matrix.h
// Function: LinearlyDependent(double*, double*)
EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z)
    {
      Base::_check_template_params();
      EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 3)
      m_storage.data()[0] = x;
      m_storage.data()[1] = y;
      m_storage.data()[2] = z;
    }

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm2
movsd 0x10(%rdi), %xmm1
movsd (%rsi), %xmm3
movsd 0x8(%rsi), %xmm4
movsd 0x10(%rsi), %xmm5
movapd %xmm2, %xmm6
mulsd %xmm5, %xmm6
mulsd %xmm0, %xmm5
mulsd %xmm4, %xmm0
mulsd %xmm1, %xmm4
subsd %xmm4, %xmm6
mulsd %xmm3, %xmm1
subsd %xmm5, %xmm1
mulsd %xmm2, %xmm3
subsd %xmm3, %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm6, %xmm6
addsd %xmm1, %xmm6
mulsd %xmm0, %xmm0
addsd %xmm6, %xmm0
xorpd %xmm1, %xmm1
cmpeqsd %xmm0, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
retq