LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Luthaf[P]zeopp/channel.cc
// Function: PORE::buildDijkstraNetwork(DIJKSTRA_NETWORK*)
void PORE::buildDijkstraNetwork(DIJKSTRA_NETWORK *dnet){
    //  vector<VOR_NODE> ::iterator niter = vornet->nodes.begin();
    //    int i = 0;
    dnet->nodes.clear();
    
    dnet->nodes=nodes;
    
    // 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);
	//       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> ::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 = v_a;
    dnet->v_b = v_b;
    dnet->v_c = v_c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x94dd0
movq -0x18(%rbp), %rsi
addq $0x60, %rsi
movq -0x10(%rbp), %rdi
callq 0x67730
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0xc0(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0xc8(%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0xd0(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq 0xd8(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0xe0(%rcx), %rdx
movq %rdx, 0x38(%rax)
movq 0xe8(%rcx), %rdx
movq %rdx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq 0xf0(%rcx), %rdx
movq %rdx, 0x48(%rax)
movq 0xf8(%rcx), %rdx
movq %rdx, 0x50(%rax)
movq 0x100(%rcx), %rcx
movq %rcx, 0x58(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Luthaf[P]zeopp/channel.cc
// Function: CHANNEL::findFreeIncludedSphereDiameter()
pair<double, pair<double,double> > CHANNEL::findFreeIncludedSphereDiameter(){
    
    pair<double, pair<double,double> > maxdidfdif;
    maxdidfdif.first=0;
    maxdidfdif.second.first=0;
    maxdidfdif.second.second=0;
    
    
    for(int i=0;i<nodes.size();i++)
    {
        // loop over all the nodes in the current channel
        if(i==0) {
            maxdidfdif = findFreeIncludedSphereDiameterforNode(i, maxdidfdif);
        }
        else
        {
            pair<double, pair<double,double> > didfdif = findFreeIncludedSphereDiameterforNode(i, maxdidfdif);
            if(didfdif.second.first > maxdidfdif.second.first) maxdidfdif.second = didfdif.second;
            if(didfdif.first > maxdidfdif.first) maxdidfdif.first = didfdif.first;
        };
    };
    
    return maxdidfdif;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
callq 0xce2f0
movq -0x78(%rbp), %rdi
xorps %xmm0, %xmm0
movsd %xmm0, (%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rdi)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rdi)
movl $0x0, -0xc(%rbp)
movq -0x80(%rbp), %rdi
movslq -0xc(%rbp), %rax
movq %rax, -0x90(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0xca1b2
cmpl $0x0, -0xc(%rbp)
jne 0xca117
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rsi
movl -0xc(%rbp), %edx
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xca1d0
movq -0x78(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xce320
jmp 0xca1a2
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rsi
movl -0xc(%rbp), %edx
movq (%rax), %rcx
movq %rcx, -0x70(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xca1d0
movq -0x78(%rbp), %rax
movsd -0x50(%rbp), %xmm0
ucomisd 0x8(%rax), %xmm0
jbe 0xca184
movq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
addq $0x8, %rsi
addq $0x8, %rdi
callq 0xce360
movq -0x78(%rbp), %rax
movsd -0x58(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0xca1a0
movq -0x78(%rbp), %rax
movsd -0x58(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0xca1a2
jmp 0xca1a4
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xca08c
movq -0x88(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/channel.cc
// Function: PORE::getIncludedSphereDiameter()
double PORE::getIncludedSphereDiameter(){
    
    double maxdi;
    
    for(unsigned int i=0; i<nodes.size(); i++)
    {
        if(i==0)
        {
            maxdi = nodes.at(i).max_radius;
        }
        else{
            if(nodes.at(i).max_radius > maxdi) maxdi = nodes.at(i).max_radius;
        };
    };
    
    maxdi=maxdi*2.0;
    
    return maxdi;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0x28(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0xcafdb
cmpl $0x0, -0x14(%rbp)
jne 0xcaf8f
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0xcafcb
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd 0x38(%rax), %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0xcafc9
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0xcafcb
jmp 0xcafcd
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xcaf4b
movsd 0x127065(%rip), %xmm0   # 0x1f2048
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Luthaf[P]zeopp/mindist.cc
// Function: compute_images(double, double, double, double, double, double, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
void compute_images(double in_bx, double in_bxy, double in_by, double in_bxz, double in_byz, double in_bz,  
		    vector<int> &i_vals, vector<int> &j_vals, vector<int> &k_vals){

  unitcell uc(in_bx, in_bxy, in_by, in_bxz, in_byz, in_bz);
  vector<int> ijk_vals; vector<double> vd;
  uc.images(ijk_vals, vd);
  unsigned int i, j;
  i_vals.clear(); j_vals.clear(); k_vals.clear();
  for(i = j = 0; i < vd.size(); i++, j+=3){
    i_vals.push_back(ijk_vals[j]);
    j_vals.push_back(ijk_vals[j+1]);
    k_vals.push_back(ijk_vals[j+2]);
  }
  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x18(%rbp)
movsd %xmm3, -0x20(%rbp)
movsd %xmm4, -0x28(%rbp)
movsd %xmm5, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movsd -0x8(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
movsd -0x20(%rbp), %xmm3
movsd -0x28(%rbp), %xmm4
movsd -0x30(%rbp), %xmm5
leaq -0x170(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x1bda20
leaq -0x188(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0xd0d0
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0xf650
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
callq 0x1be540
jmp 0xd70b8
movq -0x38(%rbp), %rdi
callq 0x163b0
movq -0x40(%rbp), %rdi
callq 0x163b0
movq -0x48(%rbp), %rdi
callq 0x163b0
movl $0x0, -0x1b4(%rbp)
movl $0x0, -0x1b0(%rbp)
movl -0x1b0(%rbp), %eax
movq %rax, -0x1d8(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0xf990
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
cmpq %rcx, %rax
jae 0xd7205
movq -0x38(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movl -0x1b4(%rbp), %eax
movl %eax, %esi
leaq -0x188(%rbp), %rdi
callq 0xed60
movq -0x1e0(%rbp), %rdi
movq %rax, %rsi
callq 0xd1b0
jmp 0xd7143
movq -0x40(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movl -0x1b4(%rbp), %eax
incl %eax
movl %eax, %esi
leaq -0x188(%rbp), %rdi
callq 0xed60
movq -0x1e8(%rbp), %rdi
movq %rax, %rsi
callq 0xd1b0
jmp 0xd7175
movq -0x48(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movl -0x1b4(%rbp), %eax
addl $0x2, %eax
movl %eax, %esi
leaq -0x188(%rbp), %rdi
callq 0xed60
movq -0x1f0(%rbp), %rdi
movq %rax, %rsi
callq 0xd1b0
jmp 0xd71a8
jmp 0xd71aa
movl -0x1b0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b0(%rbp)
movl -0x1b4(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x1b4(%rbp)
jmp 0xd70e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a8(%rbp)
movl %eax, -0x1ac(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0xf9d0
leaq -0x188(%rbp), %rdi
callq 0xec80
leaq -0x170(%rbp), %rdi
callq 0xd7fa0
jmp 0xd7232
leaq -0x1a0(%rbp), %rdi
callq 0xf9d0
leaq -0x188(%rbp), %rdi
callq 0xec80
leaq -0x170(%rbp), %rdi
callq 0xd7fa0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x1a8(%rbp), %rdi
callq 0x58f0
nop
// File: Luthaf[P]zeopp/mindist.cc
// Function: abc_to_xyz(double, double, double, double&, double&, double&)
void abc_to_xyz(double a, double b, double c, double &x, double &y, double &z){
    //cout << "bx: " << bx << "     bxy: " << bxy << "    bxz: " << bxz << endl;
    //cout << "by: " << by << "     byz: " << byz << endl;
    //cout << "bz: " << bz << endl;
  x = a*bx+b*bxy+c*bxz;
  y = b*by+c*byz;
  z = c*bz;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movsd -0x8(%rbp), %xmm1
movsd 0x19c5fc(%rip), %xmm2   # 0x273868
movsd -0x10(%rbp), %xmm0
mulsd 0x19c5f7(%rip), %xmm0   # 0x273870
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
movsd 0x19c5ea(%rip), %xmm2   # 0x273878
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x10(%rbp), %xmm0
movsd 0x19c5d5(%rip), %xmm2   # 0x273880
movsd -0x18(%rbp), %xmm1
mulsd 0x19c5d0(%rip), %xmm1   # 0x273888
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x18(%rbp), %xmm0
mulsd 0x19c5bb(%rip), %xmm0   # 0x273890
movq -0x30(%rbp), %rax
movsd %xmm0, (%rax)
popq %rbp
retq
nop
// File: Luthaf[P]zeopp/mindist.cc
// Function: MIN_PER_DISTANCE::print_images()
void MIN_PER_DISTANCE::print_images(){
  cout << "Printing images: " << "\n";
  for(unsigned int i = 0; i < ivals.size(); i++){
    cout << ivals[i] << " " << jvals[i] << " " << kvals[i] << "\n";
  }
  cout << "Images printed" << "\n" << "\n";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x19b135(%rip), %rdi    # 0x272fc0
leaq 0x123a0f(%rip), %rsi    # 0x1fb8a1
callq 0x5540
movq %rax, %rdi
leaq 0x121784(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
callq 0x10090
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0xd7f66
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0xed60
movl (%rax), %esi
movq 0x19b0dc(%rip), %rdi    # 0x272fc0
callq 0x58d0
movq %rax, %rdi
leaq 0x1243bb(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq -0x18(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x18, %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0xed60
movq -0x30(%rbp), %rdi
movl (%rax), %esi
callq 0x58d0
movq %rax, %rdi
leaq 0x12438b(%rip), %rsi    # 0x1fc2ae
callq 0x5540
movq -0x18(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x30, %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0xed60
movq -0x28(%rbp), %rdi
movl (%rax), %esi
callq 0x58d0
movq %rax, %rdi
leaq 0x1216d2(%rip), %rsi    # 0x1f9625
callq 0x5540
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xd7ead
movq 0x19b053(%rip), %rdi    # 0x272fc0
leaq 0x12393f(%rip), %rsi    # 0x1fb8b3
callq 0x5540
movq %rax, %rdi
leaq 0x1216a2(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x121693(%rip), %rsi    # 0x1f9625
callq 0x5540
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::segment_findMaxNode()
int FEATURE::segment_findMaxNode(){
int i;
int nd=-1;
double min=0;
for(i=0;i<(int)nodes.size();i++)
   {
   if(segments[i]==-1&&nodes.at(i).max_radius>min) 
       {
       nd=i;
       min=nodes.at(i).max_radius;
       };
   };
return nd;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0xdb38e
movq -0x20(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq -0xc(%rbp), %rsi
callq 0xed60
cmpl $-0x1, (%rax)
jne 0xdb37e
movq -0x20(%rbp), %rdi
addq $0x60, %rdi
movslq -0xc(%rbp), %rsi
callq 0x10130
movsd 0x38(%rax), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0xdb37e
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
addq $0x60, %rdi
movslq -0xc(%rbp), %rsi
callq 0x10130
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0xdb380
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xdb30a
movl -0x10(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::validateSegmentation()
int FEATURE::validateSegmentation(){
int i;
int valid=1;
for(i=0;i<nsegments;i++)
   {
   if(validateSegment(i)==0)
     {
     valid=0;
     break;
     };

   }

return valid;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x138(%rcx), %eax
jge 0xdc008
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xdc020
cmpl $0x0, %eax
jne 0xdbffb
movl $0x0, -0x10(%rbp)
jmp 0xdc008
jmp 0xdbffd
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xdbfd2
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::segment_growSegment_start(ATOM_NETWORK*, int)
void FEATURE::segment_growSegment_start(ATOM_NETWORK *uc, int nodeid){

segments[nodeid]=nsegments; // assign new segment number to a nw segment
segment_max_r.push_back(nodes.at(nodeid).max_radius); //store maximum r in a segment
segment_growSegment_cont(uc,nodeid,nodeid);

nsegments++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl 0x138(%rdi), %eax
movl %eax, -0x2c(%rbp)
addq $0x140, %rdi            # imm = 0x140
movslq -0x14(%rbp), %rsi
callq 0xed60
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rdi
movl %ecx, (%rax)
movq %rdi, %rax
addq $0x238, %rax            # imm = 0x238
movq %rax, -0x28(%rbp)
addq $0x60, %rdi
movslq -0x14(%rbp), %rsi
callq 0x10130
movq -0x28(%rbp), %rdi
movq %rax, %rsi
addq $0x38, %rsi
callq 0x105c0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xdc380
movq -0x20(%rbp), %rax
movl 0x138(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x138(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::update_node_segmentinfo(std::vector<int, std::allocator<int>>*, int*, int)
void FEATURE::update_node_segmentinfo(vector <int> *segid,int *curr_id,int flag)
{
	int i;
	//loop over all nodes in channel system and update voronoi network nodes

	for(i=0;i<(int)nodes.size();i++)
	{
		if(flag==0)
		{
			segid->at(reverseIDMappings[i])=segments[i]+(*curr_id);
		}else{
			segid->at(reverseIDMappings[i])=feature_node_mapping[i]+(*curr_id);
		};
	};

	if(flag==0) {
		*curr_id+=nsegments;
	}else{
		*curr_id+=nfeatures;
	};

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %eax
movl %eax, -0x2c(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jge 0xdd291
cmpl $0x0, -0x1c(%rbp)
jne 0xdd238
movq -0x28(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq -0x20(%rbp), %rsi
callq 0xed60
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movq -0x18(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x30, %rdi
leaq -0x20(%rbp), %rsi
callq 0xe0a50
movq -0x38(%rbp), %rdi
movslq (%rax), %rsi
callq 0x101d0
movl -0x30(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xdd281
movq -0x28(%rbp), %rdi
addq $0x1d8, %rdi            # imm = 0x1D8
movslq -0x20(%rbp), %rsi
callq 0xed60
movq -0x28(%rbp), %rdi
movl (%rax), %eax
movq -0x18(%rbp), %rcx
addl (%rcx), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
addq $0x30, %rdi
leaq -0x20(%rbp), %rsi
callq 0xe0a50
movq -0x48(%rbp), %rdi
movslq (%rax), %rsi
callq 0x101d0
movl -0x3c(%rbp), %ecx
movl %ecx, (%rax)
jmp 0xdd283
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xdd1c6
cmpl $0x0, -0x1c(%rbp)
jne 0xdd2ab
movq -0x28(%rbp), %rax
movl 0x138(%rax), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0xdd2bd
movq -0x28(%rbp), %rax
movl 0x1b8(%rax), %ecx
movq -0x18(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::merge_nothing()
void FEATURE::merge_nothing()
{
	int i;

	nfeatures=nsegments;
	for(i=0;i<nsegments;i++)
	{
		features.push_back(i);
		feature_max_r.push_back(segment_max_r[i]);
	};

	for(i=0;i<(int)nodes.size();i++)
	{
		feature_node_mapping.push_back(segments[i]);
	};

	cout << "After merging nothing, nfeatures = " << nfeatures << "\n";

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0x138(%rax), %ecx
movl %ecx, 0x1b8(%rax)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x138(%rcx), %eax
jge 0xdd352
movq -0x18(%rbp), %rdi
addq $0x1c0, %rdi            # imm = 0x1C0
leaq -0xc(%rbp), %rsi
callq 0xd1b0
movq -0x18(%rbp), %rdi
movq %rdi, %rax
addq $0x250, %rax            # imm = 0x250
movq %rax, -0x20(%rbp)
addq $0x238, %rdi            # imm = 0x238
movslq -0xc(%rbp), %rsi
callq 0xedb0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x105c0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xdd2f7
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0xdd3ae
movq -0x18(%rbp), %rdi
movq %rdi, %rax
addq $0x1d8, %rax            # imm = 0x1D8
movq %rax, -0x30(%rbp)
addq $0x140, %rdi            # imm = 0x140
movslq -0xc(%rbp), %rsi
callq 0xed60
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0xd1b0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xdd359
movq 0x195c0b(%rip), %rdi    # 0x272fc0
leaq 0x11e6ec(%rip), %rsi    # 0x1fbaa8
callq 0x5540
movq %rax, %rdi
movq -0x18(%rbp), %rax
movl 0x1b8(%rax), %esi
callq 0x58d0
movq %rax, %rdi
leaq 0x11c248(%rip), %rsi    # 0x1f9625
callq 0x5540
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::number_nodes_in_segment(int)
int FEATURE::number_nodes_in_segment(int segid)
{
	int i;
	int count=0;

	for(i=0;i<(int)nodes.size();i++)
	{
		if(segments[i]==segid) count++;
	};

	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0xdd463
movq -0x20(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movslq -0x10(%rbp), %rsi
callq 0xed60
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xdd456
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xdd458
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdd415
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::merge_findNotAssignedFragment()
int FEATURE::merge_findNotAssignedFragment()
{
	int i;
	int r=-1;
	for(i=segment_merge_list.size()-1;i>-1;i--)
	{
		if(segment_merge_list.at(i)==-1) r=i;
	};
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
addq $0x208, %rdi            # imm = 0x208
callq 0x10090
subq $0x1, %rax
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
jle 0xdd930
movq -0x18(%rbp), %rdi
addq $0x208, %rdi            # imm = 0x208
movslq -0xc(%rbp), %rsi
callq 0x101d0
cmpl $-0x1, (%rax)
jne 0xdd923
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0xdd925
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xdd8fe
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: Luthaf[P]zeopp/feature.cc
// Function: FEATURE::merge_newSegmentGrow(int)
void FEATURE::merge_newSegmentGrow(int segid)
{
	int k;
	int conn_to;

	segment_merge_list[segid]=nfeatures;


	for(k=0;k<(int)segment_conn.size();k++)
	{
		if((segment_conn.at(k).from_seg==segid||segment_conn.at(k).to_seg==segid)&&segment_conn.at(k).merged==1)
		{
			if(segment_conn.at(k).from_seg==segid) 
				{conn_to=segment_conn.at(k).to_seg;}
			else {conn_to=segment_conn.at(k).from_seg;};

			if(segment_merge_list.at(conn_to)==-1) merge_newSegmentGrow(conn_to);


		}; // end if
	}; //end for loop


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl 0x1b8(%rdi), %eax
movl %eax, -0x18(%rbp)
addq $0x208, %rdi            # imm = 0x208
movslq -0xc(%rbp), %rsi
callq 0xed60
movl -0x18(%rbp), %ecx
movl %ecx, (%rax)
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
addq $0x158, %rdi            # imm = 0x158
callq 0xe0920
movq %rax, %rcx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0xdda7f
movq -0x20(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq -0x10(%rbp), %rsi
callq 0xe0950
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
je 0xdd9dc
movq -0x20(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq -0x10(%rbp), %rsi
callq 0xe0950
movl 0xc(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xdda6f
movq -0x20(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq -0x10(%rbp), %rsi
callq 0xe0950
cmpl $0x1, 0x20(%rax)
jne 0xdda6f
movq -0x20(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq -0x10(%rbp), %rsi
callq 0xe0950
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0xdda2e
movq -0x20(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq -0x10(%rbp), %rsi
callq 0xe0950
movl 0xc(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0xdda48
movq -0x20(%rbp), %rdi
addq $0x158, %rdi            # imm = 0x158
movslq -0x10(%rbp), %rsi
callq 0xe0950
movl 0x8(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rdi
addq $0x208, %rdi            # imm = 0x208
movslq -0x14(%rbp), %rsi
callq 0x101d0
cmpl $-0x1, (%rax)
jne 0xdda6d
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xdd940
jmp 0xdda6f
jmp 0xdda71
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xdd97c
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/v_network.cc
// Function: voronoi_network::clear_network()
void voronoi_network::clear_network() {
	int l;
	edc=0;
	for(l=0;l<nxyz;l++) ptsc[l]=0;
	for(l=0;l<edmem;l++) nu[l]=0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, 0xa0(%rax)
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x3c(%rcx), %eax
jge 0xe3adb
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0xc(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe3ab1
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0xa4(%rcx), %eax
jge 0xe3b12
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rax
movslq -0xc(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xe3ae2
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/v_network.cc
// Function: voronoi_network::pack_periodicity(int, int, int)
inline unsigned int voronoi_network::pack_periodicity(int i,int j,int k) {
	unsigned int pa=((unsigned int) (127+i));
	pa<<=8;pa+=((unsigned int) (127+j));
	pa<<=8;pa+=((unsigned int) (127+k));
	return pa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %eax
addl $0x7f, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
addl $0x7f, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x7f, %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: trans_to_origuc(double)
double trans_to_origuc(double x){
  double newX =  x - (x < 0.0 ?(-(int)(0.5-x)):((int)(0.5+x)));
  if(newX < 0)
    return newX+1;
  else
    return newX;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x10(%rbp), %xmm0
jbe 0xe92c7
movsd 0x108dc3(%rip), %xmm0   # 0x1f2078
subsd -0x10(%rbp), %xmm0
cvttsd2si %xmm0, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
jmp 0xe92db
movsd 0x108da9(%rip), %xmm0   # 0x1f2078
addsd -0x10(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x24(%rbp)
movsd -0x20(%rbp), %xmm0
movl -0x24(%rbp), %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0xe930e
movsd 0x108d4e(%rip), %xmm0   # 0x1f2050
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xe9318
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
popq %rbp
retq
nop
// File: Luthaf[P]zeopp/geometry.cc
// Function: calcDeterminant(double (*) [3])
double calcDeterminant(double matrix[3][3]){
    return
    matrix[0][0]*(matrix[2][2]*matrix[1][1] - matrix[2][1]*matrix[1][2])
    - matrix[1][0]*(matrix[2][2]*matrix[0][1] - matrix[2][1]*matrix[0][2])
    + matrix[2][0]*(matrix[1][2]*matrix[0][1] - matrix[1][1]*matrix[0][2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm1
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm2
movq -0x8(%rbp), %rax
movsd 0x20(%rax), %xmm3
movq -0x8(%rbp), %rax
movsd 0x38(%rax), %xmm0
movq -0x8(%rbp), %rax
mulsd 0x28(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm3, %xmm2
addsd %xmm0, %xmm2
movq -0x8(%rbp), %rax
movsd 0x18(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd 0x40(%rax), %xmm3
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm5
movq -0x8(%rbp), %rax
movsd 0x38(%rax), %xmm4
movq -0x8(%rbp), %rax
mulsd 0x10(%rax), %xmm4
movq %xmm4, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm4
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq -0x8(%rbp), %rax
movsd 0x30(%rax), %xmm0
movq -0x8(%rbp), %rax
movsd 0x28(%rax), %xmm2
movq -0x8(%rbp), %rax
movsd 0x8(%rax), %xmm4
movq -0x8(%rbp), %rax
movsd 0x20(%rax), %xmm3
movq -0x8(%rbp), %rax
mulsd 0x10(%rax), %xmm3
movq %xmm3, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm3
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
popq %rbp
retq
nopl (%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: Point::operator[](int)
double& Point::operator[](const int index) {
     if(index < 0 || index > 2){
      cerr << "Error: Invalid index to [] operator for Point instance" << "\n"
	   << "Exiting..." << "\n";
      exit(1);
    }
    return vals[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xe9d93
cmpl $0x2, -0xc(%rbp)
jle 0xe9ddd
movq 0x189256(%rip), %rdi    # 0x272ff0
leaq 0x111f8e(%rip), %rsi    # 0x1fbd2f
callq 0x5540
movq %rax, %rdi
leaq 0x10f875(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x11155b(%rip), %rsi    # 0x1fb31a
callq 0x5540
movq %rax, %rdi
leaq 0x10f857(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x1, %edi
callq 0x67c0
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: pointIsLess(Point, Point)
bool pointIsLess(Point p1, Point p2){
  double tol = 0.0000001;
  if (abs(p1[0] - p2[0]) > tol)
    return p1[0] < p2[0];
  else if (abs(p1[1] - p2[1]) > tol)
    return p1[1] < p2[1];
  else if (abs(p1[2] - p2[2]) > tol)
    return p1[2] < p2[2];
  else
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movsd 0x10cd48(%rip), %xmm0   # 0x1f7398
movsd %xmm0, -0x10(%rbp)
xorl %esi, %esi
callq 0xe9d70
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
xorl %esi, %esi
callq 0xe9d70
movsd -0x18(%rbp), %xmm0
subsd (%rax), %xmm0
callq 0x162b0
ucomisd -0x10(%rbp), %xmm0
jbe 0xea6be
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0xe9d70
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
xorl %esi, %esi
callq 0xe9d70
movsd -0x30(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xea7ae
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0xe9d70
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x1, %esi
callq 0xe9d70
movsd -0x38(%rbp), %xmm0
subsd (%rax), %xmm0
callq 0x162b0
ucomisd -0x10(%rbp), %xmm0
jbe 0xea734
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0xe9d70
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movl $0x1, %esi
callq 0xe9d70
movsd -0x40(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xea7ae
movq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0xe9d70
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movl $0x2, %esi
callq 0xe9d70
movsd -0x48(%rbp), %xmm0
subsd (%rax), %xmm0
callq 0x162b0
ucomisd -0x10(%rbp), %xmm0
jbe 0xea7aa
movq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0xe9d70
movq -0x20(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movl $0x2, %esi
callq 0xe9d70
movsd -0x50(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0xea7ae
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: TRIPLET::operator[](int)
int& TRIPLET::operator[](int index){
  if(index < 0 || index > 2){
    cerr << "Error: Invalid index to [] operator for TRIPLET instance" << "\n"
	 << "Exiting..." << "\n";
    exit(1);
  }
  return vals[index];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xea823
cmpl $0x2, -0xc(%rbp)
jle 0xea86d
movq 0x1887c6(%rip), %rdi    # 0x272ff0
leaq 0x111535(%rip), %rsi    # 0x1fbd66
callq 0x5540
movq %rax, %rdi
leaq 0x10ede5(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x110acb(%rip), %rsi    # 0x1fb31a
callq 0x5540
movq %rax, %rdi
leaq 0x10edc7(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x1, %edi
callq 0x67c0
movq -0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: XYZ::angle_between(XYZ const&) const
double XYZ::angle_between(const XYZ& other)  const {
  double cos_angle = dot_product(other)/(magnitude()*other.magnitude());
  // These steps are necessary for rounding issues when cos_angle should be 
  // exactly 1 or -1, but falls very slightly on the wrong side
  if(cos_angle>1) {
    cos_angle = 1;
  } else if(cos_angle<-1) {
    cos_angle = -1; 
  }
  double output = acos(cos_angle);
  if(isnan(output)) {
    return 0;
  } else return output; //this step is necessary in the case of identity, which produces NAN
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq -0x18(%rbp), %rsi
callq 0xeac10
movq -0x40(%rbp), %rdi
movsd %xmm0, -0x30(%rbp)
callq 0xe9240
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe9240
movsd -0x38(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x30(%rbp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movsd 0x10738c(%rip), %xmm1   # 0x1f2050
ucomisd %xmm1, %xmm0
jbe 0xeacd9
movsd 0x10737e(%rip), %xmm0   # 0x1f2050
movsd %xmm0, -0x20(%rbp)
jmp 0xeacf7
movsd 0x107a97(%rip), %xmm0   # 0x1f2778
ucomisd -0x20(%rbp), %xmm0
jbe 0xeacf5
movsd 0x107a88(%rip), %xmm0   # 0x1f2778
movsd %xmm0, -0x20(%rbp)
jmp 0xeacf7
movsd -0x20(%rbp), %xmm0
callq 0x54f0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0xaf630
testb $0x1, %al
jne 0xead16
jmp 0xead20
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xead2a
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: XYZ::operator[](int)
double& XYZ::operator[](const int index){
     if (index==0)
       return x;
     if (index==1)
       return y;
     if (index==2)
       return z;
     cerr << "Error: Invalid index to [] operator for XYZ instance" << "\n"
	  << "Exiting..." << "\n";
     exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xead67
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xeadd9
cmpl $0x1, -0x14(%rbp)
jne 0xead7b
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0xeadd9
cmpl $0x2, -0x14(%rbp)
jne 0xead8f
movq -0x20(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
jmp 0xeadd9
movq 0x18825a(%rip), %rdi    # 0x272ff0
leaq 0x111002(%rip), %rsi    # 0x1fbd9f
callq 0x5540
movq %rax, %rdi
leaq 0x10e879(%rip), %rsi    # 0x1f9625
callq 0x5540
movq %rax, %rdi
leaq 0x11055f(%rip), %rsi    # 0x1fb31a
callq 0x5540
movq %rax, %rdi
leaq 0x10e85b(%rip), %rsi    # 0x1f9625
callq 0x5540
movl $0x1, %edi
callq 0x67c0
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: XYZ::euclid_dist(XYZ const&) const
double XYZ::euclid_dist(const XYZ& other) const {  //Distance between two XYZ's
    double dx = x-other.x;  
    double dy = y-other.y; 
    double dz = z-other.z;
    return sqrt(dx*dx + dy*dy + dz*dz);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rcx
subsd (%rcx), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x8(%rax), %xmm0
movq -0x10(%rbp), %rcx
subsd 0x8(%rcx), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x10(%rax), %xmm0
movq -0x10(%rbp), %rax
subsd 0x10(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x18(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
movsd -0x20(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movsd -0x28(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x53f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: project_onto_line(XYZ, XYZ, XYZ)
XYZ project_onto_line(XYZ initial, XYZ line_start, XYZ line_end) {
  XYZ projection;
  XYZ initial_to_line_start_vector = get_vector_from_to(initial, line_start);
  XYZ line_vector = get_vector_from_to(line_start, line_end);
  double line_length = line_vector.magnitude();
  double movement_along_line = (-1*initial_to_line_start_vector.dot_product(line_vector))/(line_length*line_length);
  projection.x = line_start.x + (movement_along_line*line_vector.x);
  projection.y = line_start.y + (movement_along_line*line_vector.y);
  projection.z = line_start.z + (movement_along_line*line_vector.z);
  return projection;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
leaq 0x40(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0xea8e0
movq -0xc8(%rbp), %rcx
movq -0xb8(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, -0x30(%rbp)
movq 0x8(%rcx), %rdx
movq %rdx, -0x28(%rbp)
movq 0x10(%rcx), %rcx
movq %rcx, -0x20(%rbp)
movq (%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xeaf90
movq -0xc0(%rbp), %rax
movq -0xb8(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, -0x78(%rbp)
movq 0x8(%rcx), %rdx
movq %rdx, -0x70(%rbp)
movq 0x10(%rcx), %rcx
movq %rcx, -0x68(%rbp)
movq (%rax), %rcx
movq %rcx, -0x90(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x78(%rbp), %rcx
leaq -0x90(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0xeaf90
leaq -0x60(%rbp), %rdi
callq 0xe9240
movsd %xmm0, -0x98(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xeac10
movq -0xb8(%rbp), %rcx
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rax
movaps %xmm0, %xmm1
movsd 0x1075e6(%rip), %xmm0   # 0x1f2778
mulsd %xmm1, %xmm0
movsd -0x98(%rbp), %xmm1
mulsd -0x98(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd (%rcx), %xmm1
movsd -0xa0(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rdi)
movsd 0x8(%rcx), %xmm1
movsd -0xa0(%rbp), %xmm0
movsd -0x58(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rdi)
movsd 0x10(%rcx), %xmm1
movsd -0xa0(%rbp), %xmm0
movsd -0x50(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rdi)
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: abc_to_xyz(double, double, double, XYZ const&, XYZ const&, XYZ const&)
Point abc_to_xyz(double a, double b, double c, const XYZ& v_a, const XYZ& v_b, const XYZ& v_c){

  double x = v_a.x+b*v_b.x+c*v_c.x;
  double y = b*v_b.y+c*v_c.y;
  double z = c*v_c.z;
  return Point (x, y, z);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, %rax
movq %rax, -0x50(%rbp)
movsd %xmm0, -0x8(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm2, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x20(%rbp), %rax
movsd (%rax), %xmm0
movsd -0x10(%rbp), %xmm1
movq -0x28(%rbp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x18(%rbp), %xmm0
movq -0x30(%rbp), %rax
movsd (%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x10(%rbp), %xmm0
movq -0x28(%rbp), %rax
movsd 0x8(%rax), %xmm2
movsd -0x18(%rbp), %xmm1
movq -0x30(%rbp), %rax
mulsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x18(%rbp), %xmm0
movq -0x30(%rbp), %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movsd -0x48(%rbp), %xmm2
callq 0xe9c70
movq -0x50(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: findLongAndLat(Point)
pair<double,double> findLongAndLat(Point pt){
  double r = sqrt(pt[0]*pt[0] + pt[1]*pt[1]);
  double phi = atan(pt[2]/r);
  double lambda = atan2(pt[1],pt[0]);
  return pair<double,double> (lambda, phi);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rdi
movq %rdi, -0x40(%rbp)
xorl %esi, %esi
movl %esi, -0x34(%rbp)
callq 0xe9d70
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movsd (%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0xe9d70
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movl $0x1, %esi
movl %esi, -0x44(%rbp)
callq 0xe9d70
movl -0x44(%rbp), %esi
movq -0x40(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0xe9d70
movsd -0x60(%rbp), %xmm1
movsd -0x58(%rbp), %xmm0
movsd -0x50(%rbp), %xmm2
movsd (%rax), %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x53f0
movq -0x40(%rbp), %rdi
movsd %xmm0, -0x18(%rbp)
movl $0x2, %esi
callq 0xe9d70
movsd (%rax), %xmm0
movsd -0x18(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x5440
movl -0x44(%rbp), %esi
movq -0x40(%rbp), %rdi
movsd %xmm0, -0x20(%rbp)
callq 0xe9d70
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xe9d70
movsd -0x30(%rbp), %xmm0
movsd (%rax), %xmm1
callq 0x50b0
movsd %xmm0, -0x28(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x85120
movsd -0x10(%rbp), %xmm0
movsd -0x8(%rbp), %xmm1
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Luthaf[P]zeopp/geometry.cc
// Function: projectPointOnSphere(Point, double, Point)
Point projectPointOnSphere(Point p, double circRad, Point circCenter){
  double deltaX = p[0] - circCenter[0];
  double deltaY = p[1] - circCenter[1];
  double deltaZ = p[2] - circCenter[2];
  double factor = sqrt((circRad*circRad)/(deltaX*deltaX + deltaY*deltaY + deltaZ*deltaZ));
  return Point(factor*deltaX+circCenter[0], factor*deltaY+circCenter[1], factor*deltaZ+circCenter[2]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, -0x30(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x10(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movsd %xmm0, -0x8(%rbp)
xorl %esi, %esi
callq 0xe9d70
movq -0x60(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0xa0(%rbp)
xorl %esi, %esi
callq 0xe9d70
movsd -0xa0(%rbp), %xmm0
movq -0x90(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
movl $0x1, %esi
callq 0xe9d70
movq -0x60(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
movl $0x1, %esi
callq 0xe9d70
movsd -0x98(%rbp), %xmm0
movq -0x90(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x2, %esi
callq 0xe9d70
movq -0x60(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x88(%rbp)
movl $0x2, %esi
callq 0xe9d70
movsd -0x88(%rbp), %xmm0
subsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x8(%rbp), %xmm0
mulsd -0x8(%rbp), %xmm0
movsd -0x10(%rbp), %xmm2
movsd -0x10(%rbp), %xmm3
movsd -0x18(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
movsd -0x20(%rbp), %xmm1
movsd -0x20(%rbp), %xmm3
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x53f0
movq -0x60(%rbp), %rdi
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
xorl %esi, %esi
callq 0xe9d70
movsd -0x80(%rbp), %xmm0
movsd -0x78(%rbp), %xmm2
movq -0x60(%rbp), %rdi
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movl $0x1, %esi
callq 0xe9d70
movsd -0x70(%rbp), %xmm0
movsd -0x68(%rbp), %xmm2
movq -0x60(%rbp), %rdi
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movl $0x2, %esi
callq 0xe9d70
movsd -0x58(%rbp), %xmm2
movsd -0x50(%rbp), %xmm4
movq -0x48(%rbp), %rdi
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd (%rax), %xmm3
mulsd %xmm4, %xmm2
addsd %xmm3, %xmm2
callq 0xe9c70
movq -0x30(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: Luthaf[P]zeopp/holograms.cc
// Function: get_bin(float, float*)
int get_bin(float measure, float *upper_bounds) {
	int i;
	for(i=0; i<NUM_BINS-1; i++) {
		if(measure<upper_bounds[i]) {
			return i;
		}
	}
	return NUM_BINS-1; //i.e. the final bin will contain everything too large for the others
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss %xmm0, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0xf, -0x14(%rbp)
jge 0xeef76
movss -0x8(%rbp), %xmm1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xeef69
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xeef7d
jmp 0xeef6b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xeef44
movl $0xf, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Luthaf[P]zeopp/grid.cc
// Function: write_distances(_IO_FILE*, double***, int, int, int)
void write_distances(FILE *f, double ***grid, int x_grid_steps, int y_grid_steps, int z_grid_steps) {
	vector <double> visit_friendly_array;
	for(int k=0; k<z_grid_steps; k++) {
		for(int j=0; j<y_grid_steps; j++) {
			for(int i=0; i<x_grid_steps; i++) { //for some reason, the convention is to write out the data in the z,y,x order, i.e., when you read the data, x iterates the fastest, and z the slowest
				visit_friendly_array.push_back(grid[i][j][k]);
			}
		}
	}
	fwrite(&visit_friendly_array[0], sizeof(double), x_grid_steps*y_grid_steps*z_grid_steps, f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xf650
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xf0cbc
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0xf0cac
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xf0c9f
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x3c(%rbp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq -0x38(%rbp), %rdi
callq 0x105c0
jmp 0xf0c7b
jmp 0xf0c7d
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xf0c4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xf9d0
jmp 0xf0cfd
jmp 0xf0ca1
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xf0c3d
jmp 0xf0cae
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xf0c2a
xorl %eax, %eax
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0xedb0
movq %rax, %rdi
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
imull %ecx, %eax
movl -0x1c(%rbp), %ecx
imull %ecx, %eax
movslq %eax, %rdx
movq -0x8(%rbp), %rcx
movl $0x8, %esi
callq 0x59c0
jmp 0xf0cee
leaq -0x38(%rbp), %rdi
callq 0xf9d0
addq $0x60, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x58f0
nopw %cs:(%rax,%rax)