#include<stdlib.h>
#include<stdio.h>
#include<math.h>
#include<cuda.h>
#include<time.h>

__global__
void updateKernel(float kappa, float G, float rc, float pi, int Ncell, int* bin_count, float* bin_atom_ln, int bin_atom_len, float* nl_list_ln, int cell_len)
{

  int ic = blockIdx.x + blockIdx.y * gridDim.x;
  int thId = threadIdx.x + blockDim.x * blockIdx.x + blockIdx.y * gridDim.x * blockDim.x;
  int ip = thId - ic*27;
  //num_threads - num_of_atoms_in_cutoff_sphere = 10;

  int jn;
  float Zc_ip, x_ip, y_ip, z_ip; 
  float Zc_jp, x_jp, y_jp, z_jp;
  int c_ipart, c_jpart; 
  float n_x_sh, n_y_sh, n_z_sh;
  float dx, dy, dz, r, f1, f2, f3, fr;
  float G_r_k_p, G_r_k_m;
 
  float sqt_pi = 1.7724538509055159;

  if(ic < Ncell){
    if(ip < (ic*37+bin_count[ic])){

  //for(int ic = 0; ic < Ncell; ic++){
    // for(int ip = 0; ip < bin_count[ic]; ip++){
       
        //c_ipart = bin_atom_ln[ic*bin_atom_len+ip*8];
        //Zc_ip = bin_atom_ln[ic*bin_atom_len+ip*8+1];
        //x_ip = bin_atom_ln[ic*bin_atom_len+ip*8+2];
        //y_ip = bin_atom_ln[ic*bin_atom_len+ip*8+3];
        //z_ip = bin_atom_ln[ic*bin_atom_len+ip*8+4];

        c_ipart = bin_atom_ln[ip*8];
        Zc_ip = bin_atom_ln[ip*8+1];
        x_ip = bin_atom_ln[ip*8+2];
        y_ip = bin_atom_ln[ip*8+3];
        z_ip = bin_atom_ln[ip*8+4];

        for(int jc = 0; jc < 27; jc++){
           jn = (int) nl_list_ln[ic*cell_len+jc*4];
           for(int jp = 0; jp < bin_count[jn]; jp++){

              c_jpart = bin_atom_ln[jn*bin_atom_len+jp*8];
              Zc_jp = bin_atom_ln[jn*bin_atom_len+jp*8+1];
              x_jp = bin_atom_ln[jn*bin_atom_len+jp*8+2];
              y_jp = bin_atom_ln[jn*bin_atom_len+jp*8+3];
              z_jp = bin_atom_ln[jn*bin_atom_len+jp*8+4];
              
              n_x_sh = nl_list_ln[ic*cell_len+jc*4+1];         
              n_y_sh = nl_list_ln[ic*cell_len+jc*4+2];         
              n_z_sh = nl_list_ln[ic*cell_len+jc*4+3];         
              //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
              if(c_ipart != c_jpart){
              
                //if((ic == 0) && (ip == 0)) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
                dx = x_ip - (x_jp + n_x_sh);
                dy = y_ip - (y_jp + n_y_sh);
                dz = z_ip - (z_jp + n_z_sh);
                r = sqrt(dx*dx + dy*dy + dz*dz);

                if(r < rc){

                  G_r_k_p = G*r + 0.5*kappa/G;
                  G_r_k_m = G*r - 0.5*kappa/G; 
                  f1 = (0.5/(r*r)) * exp(kappa*r) * erfc(G*r + 0.5*kappa/G) * (1.0 - kappa*r);
                  f2 = (0.5/(r*r)) * exp(-kappa*r) * erfc(G*r - 0.5*kappa/G) * (1.0 + kappa*r);
                  f3 = (G/(sqt_pi*r)) * (exp(-G_r_k_p*G_r_k_p) * exp(kappa*r) + exp(-G_r_k_m*G_r_k_m) * exp(-kappa*r) );
                  fr = Zc_ip*Zc_jp*(f1 + f2 + f3);           
               
                  //bin_atom_ln[ic*bin_atom_len+ip*8+5] = bin_atom_ln[ic*bin_atom_len+ip*8+5] + (fr*dx/r);   
                  //bin_atom_ln[ic*bin_atom_len+ip*8+6] = bin_atom_ln[ic*bin_atom_len+ip*8+6] + (fr*dy/r);   
                  //bin_atom_ln[ic*bin_atom_len+ip*8+7] = bin_atom_ln[ic*bin_atom_len+ip*8+7] + (fr*dz/r);   
                  
                  bin_atom_ln[ip*8+5] = bin_atom_ln[ip*8+5] + (fr*dx/r);   
                  bin_atom_ln[ip*8+6] = bin_atom_ln[ip*8+6] + (fr*dy/r);   
                  bin_atom_ln[ip*8+7] = bin_atom_ln[ip*8+7] + (fr*dz/r);   
                  
                  //bin_atom_ln[jn*bin_atom_len+jp*8+5] = bin_atom_ln[jn*bin_atom_len+jp*8+5] - (fr*dx/r);   
                  //bin_atom_ln[jn*bin_atom_len+jp*8+6] = bin_atom_ln[jn*bin_atom_len+jp*8+6] - (fr*dy/r);   
                  //bin_atom_ln[jn*bin_atom_len+jp*8+7] = bin_atom_ln[jn*bin_atom_len+jp*8+7] - (fr*dz/r);   

                }

              }    


           }


        }

    }

  }



}


void update(float kappa, float G, float rc, float pi, int Ncell, int* bin_count, float* bin_atom_ln, int bin_atom_len, float* nl_list_ln, int cell_len)
{

 // int cN, cp, cxN, cyN, czN, cxsh, cysh, czsh;
  //float rsh_x, rsh_y, rsh_z;

  int jn;
  float Zc_ip, x_ip, y_ip, z_ip; 
  float Zc_jp, x_jp, y_jp, z_jp;
  int c_ipart, c_jpart; 
  float n_x_sh, n_y_sh, n_z_sh;
  float dx, dy, dz, r, f1, f2, f3, fr;


  for(int ic = 0; ic < Ncell; ic++){
     for(int ip = 0; ip < bin_count[ic]; ip++){
       
        c_ipart = bin_atom_ln[ic*bin_atom_len+ip*8];
        Zc_ip = bin_atom_ln[ic*bin_atom_len+ip*8+1];
        x_ip = bin_atom_ln[ic*bin_atom_len+ip*8+2];
        y_ip = bin_atom_ln[ic*bin_atom_len+ip*8+3];
        z_ip = bin_atom_ln[ic*bin_atom_len+ip*8+4];

        for(int jc = 0; jc < 27; jc++){
           jn = (int) nl_list_ln[ic*cell_len+jc*4];
           for(int jp = 0; jp < bin_count[jn]; jp++){

              c_jpart = bin_atom_ln[jn*bin_atom_len+jp*8];
              Zc_jp = bin_atom_ln[jn*bin_atom_len+jp*8+1];
              x_jp = bin_atom_ln[jn*bin_atom_len+jp*8+2];
              y_jp = bin_atom_ln[jn*bin_atom_len+jp*8+3];
              z_jp = bin_atom_ln[jn*bin_atom_len+jp*8+4];
              
              n_x_sh = nl_list_ln[ic*cell_len+jc*4+1];         
              n_y_sh = nl_list_ln[ic*cell_len+jc*4+2];         
              n_z_sh = nl_list_ln[ic*cell_len+jc*4+3];         
              //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
              if(c_ipart < c_jpart){
              
                //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
                dx = x_ip - (x_jp + n_x_sh);
                dy = y_ip - (y_jp + n_y_sh);
                dz = z_ip - (z_jp + n_z_sh);
                r = sqrt(dx*dx + dy*dy + dz*dz);

                if(r < rc){
                  f1 = (0.5/(r*r)) * exp(kappa*r) * erfc(G*r + 0.5*kappa/G) * (1.0 - kappa*r);
                  f2 = (0.5/(r*r)) * exp(-kappa*r) * erfc(G*r - 0.5*kappa/G) * (1.0 + kappa*r);
                  f3 = (G/(sqrt(pi)*r)) * (exp(-pow((G*r + 0.5*kappa/G),2)) * exp(kappa*r) + exp(-pow((G*r - 0.5*kappa/G),2)) * exp(-kappa*r) );
                  fr = Zc_ip*Zc_jp*(f1 + f2 + f3);           
               
                  bin_atom_ln[ic*bin_atom_len+ip*8+5] = bin_atom_ln[ic*bin_atom_len+ip*8+5] + (fr*dx/r);   
                  bin_atom_ln[ic*bin_atom_len+ip*8+6] = bin_atom_ln[ic*bin_atom_len+ip*8+6] + (fr*dy/r);   
                  bin_atom_ln[ic*bin_atom_len+ip*8+7] = bin_atom_ln[ic*bin_atom_len+ip*8+7] + (fr*dz/r);   
                  
                  //bin_atom_ln[ip*8+5] = bin_atom_ln[ip*8+5] + (fr*dx/r);   
                  //bin_atom_ln[ip*8+6] = bin_atom_ln[ip*8+6] + (fr*dy/r);   
                  //bin_atom_ln[ip*8+7] = bin_atom_ln[ip*8+7] + (fr*dz/r);   
                  bin_atom_ln[jn*bin_atom_len+jp*8+5] = bin_atom_ln[jn*bin_atom_len+jp*8+5] - (fr*dx/r);   
                  bin_atom_ln[jn*bin_atom_len+jp*8+6] = bin_atom_ln[jn*bin_atom_len+jp*8+6] - (fr*dy/r);   
                  bin_atom_ln[jn*bin_atom_len+jp*8+7] = bin_atom_ln[jn*bin_atom_len+jp*8+7] - (fr*dz/r);   

                }

              }    


           }


        }

     }

  }

}

int main()
{

  float kappa, G;
  float L, rc;
  float rcx, rcy, rcz;
 
  float diff;
  struct timespec start, end; 
  float diff_c;
  struct timespec start_c, end_c; 

  int ipart;
  int i, j;
  int c, cx, cy, cz;


  int N = 10000000;

  float const pi = 3.141592653589793;
  float const emp = -50;

  float **pos = (float **)malloc(N*sizeof(float *));
  for(i = 0; i < N; i++){
     pos[i] = (float *)malloc(3*sizeof(float));
  }

  float *Z = (float *)malloc(N*sizeof(float));
  for(i = 0; i < N; i++){
     Z[i] = 1.0;
  }
  
  FILE *file;
  file = fopen("pos_1e7.txt", "r");

  for(i = 0; i < N; i++){
     for(j = 0; j < 3; j++){

        if(!fscanf(file, "%f", &pos[i][j]))
          break;
     }
  }

  fclose(file);

  kappa = 0.1;
  G = 0.5;
  rc = 3.0;

  L = pow(4.0 * pi * N/3.0, 1.0/3.0);
  printf("L = %f\n", L);

  float Lx = L;
  float Ly = L;
  float Lz = L;

  int Lxd = (int) floor(Lx/rc);
  int Lyd = (int) floor(Ly/rc);
  int Lzd = (int) floor(Lz/rc);

  int Ncell = Lxd*Lyd*Lzd;

  printf("%d %d %d %d\n", Lxd, Lyd, Lzd, Ncell);

  rcx = Lx/Lxd;
  rcy = Ly/Lyd;
  rcz = Lz/Lzd;

  printf("%f %f %f\n",rcx, rcy, rcz);

  int bin_atom_c = (int) (1* pow(rc,3) + 10.0);
  printf("%d\n",bin_atom_c);
  const int atm_len = 8;
  int bin_atom_len = atm_len * bin_atom_c;
  float bin_atom[Ncell][atm_len*bin_atom_c];
  //float bin_atom_ln[Ncell*bin_atom_len];
  float *bin_atom_ln = (float *)malloc(Ncell*bin_atom_len*sizeof(float));

  for(i = 0; i < Ncell; i++){
     for(j = 0; j < bin_atom_c; j++){
        bin_atom[i][j] = emp;
        bin_atom_ln[i*bin_atom_len + j] = emp;
     }
  }

  int *bin_count = (int *)malloc(Ncell*sizeof(int));
  int bcount, bin_idx;
  for(i = 0; i < Ncell; i++){
     bin_count[i] = 0;
  }

  printf("bin_count[1] = %d\n", bin_count[1]);

  for(ipart = 0; ipart < N; ipart++){
     
     cx = (int) floor(pos[ipart][0]/rcx);
     cy = (int) floor(pos[ipart][1]/rcy);
     cz = (int) floor(pos[ipart][2]/rcz);

     c = cx + cy*Lxd + cz*Lxd*Lyd;

     //if(c == 1){printf("c = %d, ipart = %d, bin_count[%d] = %d\n", c, ipart, c, bin_count[c]);}

     bcount = bin_count[c];
     bin_idx = atm_len*bcount;
     bin_atom[c][bin_idx] = ipart; 
     //if(c == 1){printf("c = %d, ipart = %d, bin_count[%d] = %d, bin_idx = %d, bin_atom[%d][bin_idx] = %f\n", c, ipart, c, bin_count[c], bin_idx, c, bin_atom[c][bin_idx]);}
     bin_atom[c][bin_idx+1] = Z[ipart]; 
     bin_atom[c][bin_idx+2] = pos[ipart][0]; 
     bin_atom[c][bin_idx+3] = pos[ipart][1]; 
     bin_atom[c][bin_idx+4] = pos[ipart][2]; 
     bin_atom[c][bin_idx+5] = 0.0; 
     bin_atom[c][bin_idx+6] = 0.0; 
     bin_atom[c][bin_idx+7] = 0.0;
    
     bin_atom_ln[c*bin_atom_len+bin_idx] = ipart; 
     //if(c == 1){printf("c = %d, ipart = %d, bin_count[%d] = %d, bin_idx = %d, bin_atom[%d][bin_idx] = %f\n", c, ipart, c, bin_count[c], bin_idx, c, bin_atom[c][bin_idx]);}
     bin_atom_ln[c*bin_atom_len+bin_idx+1] = Z[ipart]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+2] = pos[ipart][0]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+3] = pos[ipart][1]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+4] = pos[ipart][2]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+5] = 0.0; 
     bin_atom_ln[c*bin_atom_len+bin_idx+6] = 0.0; 
     bin_atom_ln[c*bin_atom_len+bin_idx+7] = 0.0;
     
     bin_count[c] += 1; 

  }

  int chk = 0;
  printf("bin_count[%d] = %d\n", chk, bin_count[chk]);
  
  for(i = 0; i < bin_count[chk]; i++){
     //printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f\n",chk, bin_atom[chk][i*8], bin_atom[chk][i*8+1], bin_atom[chk][i*8+2], bin_atom[chk][i*8+3], bin_atom[chk][i*8+4], bin_atom[chk][i*8+5], bin_atom[chk][i*8+6], bin_atom[chk][i*8+7]);
  }
  printf("-------\n");
  for(i = 0; i < bin_count[chk]; i++){
     //printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f\n",chk, bin_atom_ln[chk*bin_atom_len + i*8], bin_atom_ln[chk*bin_atom_len + i*8+1], bin_atom_ln[chk*bin_atom_len + i*8+2], bin_atom_ln[chk*bin_atom_len+i*8+3], bin_atom_ln[chk*bin_atom_len+i*8+4], bin_atom_ln[chk*bin_atom_len+i*8+5], bin_atom_ln[chk*bin_atom_len+i*8+6], bin_atom_ln[chk*bin_atom_len+i*8+7]);
  }


  int cN, cp, cxN, cyN, czN, cxsh, cysh, czsh;
  float rsh_x, rsh_y, rsh_z;
  float nl_list[Ncell][27*4];
  //float nl_list_ln[Ncell*27*4];
  float *nl_list_ln = (float *)malloc(Ncell*27*4*sizeof(float));
  const int cell_len = 27*4;
  int n_ct;

  for(c = 0; c < Ncell; c++){
     cz = c/(Lxd*Lyd);
     cp = c % (Lxd*Lyd);
     cy = cp/Lxd;
     cx = cp % Lxd;

     n_ct = 0;
     for(czN = cz-1; czN < cz+2; czN++){
       
        if(czN < 0){
          czsh = Lzd;
          rsh_z = -Lz;
        }
        else if(czN >= Lzd){
          czsh = -Lzd;
          rsh_z = Lz;
        }
        else{
          czsh = 0;
          rsh_z = 0;
        }

        for(cyN = cy-1; cyN < cy+2; cyN++){
       
           if(cyN < 0){
             cysh = Lyd;
             rsh_y = -Ly;
           }
           else if(cyN >= Lyd){
             cysh = -Lyd;
             rsh_y = Ly;
           }
           else{
             cysh = 0;
             rsh_y = 0;
           }


           for(cxN = cx-1; cxN < cx+2; cxN++){
       
              if(cxN < 0){
                cxsh = Lxd;
                rsh_x = -Lx;
              }
              else if(cxN >= Lxd){
                cxsh = -Lxd;
                rsh_x = Lx;
              }
              else{
                cxsh = 0;
                rsh_x = 0;
              }

              cN = cxN + cxsh + (cyN + cysh)*Lxd + (czN + czsh)*Lxd*Lyd;
              nl_list[c][n_ct] = cN;
              nl_list[c][n_ct+1] = rsh_x;
              nl_list[c][n_ct+2] = rsh_y;
              nl_list[c][n_ct+3] = rsh_z;
             
              nl_list_ln[c*cell_len+n_ct] = cN;
              nl_list_ln[c*cell_len+n_ct+1] = rsh_x;
              nl_list_ln[c*cell_len+n_ct+2] = rsh_y;
              nl_list_ln[c*cell_len+n_ct+3] = rsh_z;
 
              n_ct += 4;


            }

          }

       } 

  }





  int nchk = 56;
  for(int inl = 0; inl < 27; inl++){
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list[nchk][inl*4], nl_list[nchk][inl*4+1], nl_list[nchk][inl*4+2], nl_list[nchk][inl*4+3]);
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list_ln[nchk*cell_len+inl*4], nl_list_ln[nchk*cell_len+inl*4+1], nl_list_ln[nchk*cell_len+inl*4+2], nl_list_ln[nchk*cell_len+inl*4+3]);
  }
  printf("-----------\n");
  for(int inl = 0; inl < 27; inl++){
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list[nchk][inl*4], nl_list[nchk][inl*4+1], nl_list[nchk][inl*4+2], nl_list[nchk][inl*4+3]);
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list_ln[nchk*cell_len+inl*4], nl_list_ln[nchk*cell_len+inl*4+1], nl_list_ln[nchk*cell_len+inl*4+2], nl_list_ln[nchk*cell_len+inl*4+3]);
  }

  clock_gettime(CLOCK_MONOTONIC, &start_c);

  int jn;
  float Zc_ip, x_ip, y_ip, z_ip; 
  float Zc_jp, x_jp, y_jp, z_jp;
  int c_ipart, c_jpart; 
  float n_x_sh, n_y_sh, n_z_sh;
  float dx, dy, dz, r, f1, f2, f3, fr;
  int ip_cn = 0;

  for(int ic = 0; ic < Ncell; ic++){
     for(int ip = 0; ip < bin_count[ic]; ip++){
       
        c_ipart = bin_atom[ic][ip*8];
        Zc_ip = bin_atom[ic][ip*8+1];
        x_ip = bin_atom[ic][ip*8+2];
        y_ip = bin_atom[ic][ip*8+3];
        z_ip = bin_atom[ic][ip*8+4];

        for(int jc = 0; jc < 27; jc++){
           jn = (int) nl_list[ic][jc*4];
           for(int jp = 0; jp < bin_count[jn]; jp++){

              c_jpart = bin_atom[jn][jp*8];
              Zc_jp = bin_atom[jn][jp*8+1];
              x_jp = bin_atom[jn][jp*8+2];
              y_jp = bin_atom[jn][jp*8+3];
              z_jp = bin_atom[jn][jp*8+4];
              
              n_x_sh = nl_list[ic][jc*4+1];         
              n_y_sh = nl_list[ic][jc*4+2];         
              n_z_sh = nl_list[ic][jc*4+3];         
              //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
              if(c_ipart != c_jpart){
              
                //if((ic == 0) && (ip == 0)) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart); ip_cn += 1;}
                dx = x_ip - (x_jp + n_x_sh);
                dy = y_ip - (y_jp + n_y_sh);
                dz = z_ip - (z_jp + n_z_sh);
                r = sqrt(dx*dx + dy*dy + dz*dz);

                if(r < rc){
                  f1 = (0.5/(r*r)) * exp(kappa*r) * erfc(G*r + 0.5*kappa/G) * (1.0 - kappa*r);
                  f2 = (0.5/(r*r)) * exp(-kappa*r) * erfc(G*r - 0.5*kappa/G) * (1.0 + kappa*r);
                  f3 = (G/(sqrt(pi)*r)) * (exp(-pow((G*r + 0.5*kappa/G),2)) * exp(kappa*r) + exp(-pow((G*r - 0.5*kappa/G),2)) * exp(-kappa*r) );
                  fr = Zc_ip*Zc_jp*(f1 + f2 + f3);           
               
                  bin_atom[ic][ip*8+5] = bin_atom[ic][ip*8+5] + (fr*dx/r);   
                  bin_atom[ic][ip*8+6] = bin_atom[ic][ip*8+6] + (fr*dy/r);   
                  bin_atom[ic][ip*8+7] = bin_atom[ic][ip*8+7] + (fr*dz/r);   
                  //bin_atom[jn][jp*8+5] = bin_atom[jn][jp*8+5] - (fr*dx/r);   
                  //bin_atom[jn][jp*8+6] = bin_atom[jn][jp*8+6] - (fr*dy/r);   
                  //bin_atom[jn][jp*8+7] = bin_atom[jn][jp*8+7] - (fr*dz/r);   

                }

              }    


           }


        }

     }

  }
  clock_gettime(CLOCK_MONOTONIC, &end_c);
  diff_c = (end_c.tv_sec - start_c.tv_sec)*1000000.0 + (end_c.tv_nsec - start_c.tv_nsec)/1000.0;
  printf("elapsed time = %lf micro-seconds\n", diff_c);

  printf("no. of particles for c = 0, ip = 0: %d\n", ip_cn);

  //update(kappa, G, rc, pi, Ncell, bin_count, bin_atom_ln, bin_atom_len, nl_list_ln, cell_len);

  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom[cchk][i*8] < 10) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom[cchk][i*8], bin_atom[cchk][i*8+1], bin_atom[cchk][i*8+2], bin_atom[cchk][i*8+3], bin_atom[cchk][i*8+4], bin_atom[cchk][i*8+5], bin_atom[cchk][i*8+6], bin_atom[cchk][i*8+7]);}
     }
  }
  printf("-------------------\n");
  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom[cchk][i*8] > (N-10)) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom[cchk][i*8], bin_atom[cchk][i*8+1], bin_atom[cchk][i*8+2], bin_atom[cchk][i*8+3], bin_atom[cchk][i*8+4], bin_atom[cchk][i*8+5], bin_atom[cchk][i*8+6], bin_atom[cchk][i*8+7]);}
     }
  }

  printf("-------------\n");

  float *d_bin_atom_ln, *d_nl_list_ln;
  int *d_bin_count;
  clock_gettime(CLOCK_MONOTONIC, &start);
  
  cudaMalloc((void **) &d_bin_count, Ncell*sizeof(int));
  cudaMalloc((void **) &d_bin_atom_ln, Ncell*bin_atom_len*sizeof(float));
  cudaMalloc((void **) &d_nl_list_ln, Ncell*27*4*sizeof(float));

  dim3 dimGrid(512, ceil(Ncell/512.0), 1);
  dim3 dimBlock(64, 1, 1);
  //clock_gettime(CLOCK_MONOTONIC, &start);
  
  cudaMemcpy(d_bin_count, bin_count, Ncell*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(d_bin_atom_ln, bin_atom_ln, Ncell*bin_atom_len*sizeof(float), cudaMemcpyHostToDevice);
  cudaMemcpy(d_nl_list_ln, nl_list_ln, Ncell*27*4*sizeof(float), cudaMemcpyHostToDevice);

  //clock_gettime(CLOCK_MONOTONIC, &start);
  updateKernel<<<dimGrid, dimBlock>>>(kappa, G, rc, pi, Ncell, d_bin_count, d_bin_atom_ln, bin_atom_len, d_nl_list_ln, cell_len);
  //updateKernel<<<ceil(Ncell/64), 64>>>(kappa, G, rc, pi, Ncell, d_bin_count, d_bin_atom_ln, bin_atom_len, d_nl_list_ln, cell_len);
  //updateKernel<<<ceil(Ncell/128.0), 128>>>();
  cudaDeviceSynchronize(); 
  //clock_gettime(CLOCK_MONOTONIC, &end);
  //diff = (end.tv_sec - start.tv_sec)*1000000.0 + (end.tv_nsec - start.tv_nsec)/1000.0;
  //printf("elapsed time = %lf micro-seconds\n", diff);

  cudaMemcpy(bin_atom_ln, d_bin_atom_ln, Ncell*bin_atom_len*sizeof(float), cudaMemcpyDeviceToHost);

  clock_gettime(CLOCK_MONOTONIC, &end);
  diff = (end.tv_sec - start.tv_sec)*1000000.0 + (end.tv_nsec - start.tv_nsec)/1000.0;
  printf("elapsed time = %lf micro-seconds\n", diff);

  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom_ln[cchk*bin_atom_len+i*8] < 10) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom_ln[cchk*bin_atom_len+i*8], bin_atom_ln[cchk*bin_atom_len+i*8+1], bin_atom_ln[cchk*bin_atom_len+i*8+2], bin_atom_ln[cchk*bin_atom_len+i*8+3], bin_atom_ln[cchk*bin_atom_len+i*8+4], bin_atom_ln[cchk*bin_atom_len+i*8+5], bin_atom_ln[cchk*bin_atom_len+i*8+6], bin_atom_ln[cchk*bin_atom_len+i*8+7]);}
     }
  }
  
  printf("----------------\n");
 
  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom_ln[cchk*bin_atom_len+i*8] > (N-10)) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom_ln[cchk*bin_atom_len+i*8], bin_atom_ln[cchk*bin_atom_len+i*8+1], bin_atom_ln[cchk*bin_atom_len+i*8+2], bin_atom_ln[cchk*bin_atom_len+i*8+3], bin_atom_ln[cchk*bin_atom_len+i*8+4], bin_atom_ln[cchk*bin_atom_len+i*8+5], bin_atom_ln[cchk*bin_atom_len+i*8+6], bin_atom_ln[cchk*bin_atom_len+i*8+7]);}
     }
  }

  cudaFree(d_bin_atom_ln); cudaFree(d_nl_list_ln); cudaFree(d_bin_count);

  free(pos); free(Z);
  free(bin_count); free(bin_atom_ln); free(nl_list_ln);
  
  return 0;
} 

	.file	"tmpxft_00291dd1_00000000-6_lcl_g_2.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z6updateffffiPiPfiS0_i
	.type	_Z6updateffffiPiPfiS0_i, @function
_Z6updateffffiPiPfiS0_i:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$216, %rsp
	.cfi_def_cfa_offset 272
	movq	%rdx, 56(%rsp)
	xorl	%edx, %edx
	movl	%edi, 152(%rsp)
	movq	%rsi, 48(%rsp)
	movl	%ecx, 68(%rsp)
	movq	%r8, 144(%rsp)
	movl	%r9d, 156(%rsp)
	movl	%edx, 44(%rsp)
	movl	%edx, 40(%rsp)
	movss	%xmm0, 64(%rsp)
	movss	%xmm1, 28(%rsp)
	movss	%xmm2, 136(%rsp)
	movss	%xmm3, 140(%rsp)
.L3:
	cmpl	%ebx, 152(%rsp)
	jle	.L2
	movslq	40(%rsp), %rax
	movq	56(%rsp), %rcx
	xorl	%r13d, %r13d
	movslq	44(%rsp), %rdx
	leaq	(%rcx,%rax,4), %r14
	movq	144(%rsp), %rax
	leaq	(%rax,%rdx,4), %rax
	movq	%rax, 128(%rsp)
.L13:
	movq	48(%rsp), %rax
	cmpl	%r13d, (%rax,%rbx,4)
	jle	.L18
	cvttss2sil	(%r14), %eax
	movss	4(%r14), %xmm6
	movss	8(%r14), %xmm7
	movq	128(%rsp), %rbp
	movss	%xmm6, 108(%rsp)
	movss	12(%r14), %xmm6
	movss	%xmm7, 112(%rsp)
	movss	16(%r14), %xmm7
	movl	%eax, 104(%rsp)
	xorl	%eax, %eax
	movl	%eax, 36(%rsp)
	movss	%xmm6, 116(%rsp)
	movss	%xmm7, 120(%rsp)
.L10:
	cvttss2sil	0(%rbp), %edx
	movq	48(%rsp), %rax
	xorl	%r15d, %r15d
	movslq	%edx, %rdi
	leaq	(%rax,%rdi,4), %rax
	movq	%rax, 96(%rsp)
	movl	68(%rsp), %eax
	imull	%eax, %edx
	movq	56(%rsp), %rax
	movslq	%edx, %rdx
	leaq	(%rax,%rdx,4), %r12
.L4:
	movq	96(%rsp), %rax
	cmpl	%r15d, (%rax)
	jle	.L19
	movss	4(%r12), %xmm5
	cvttss2sil	(%r12), %edi
	movss	8(%r12), %xmm2
	movss	12(%r12), %xmm1
	movss	%xmm5, 124(%rsp)
	movss	8(%rbp), %xmm4
	movss	4(%rbp), %xmm5
	movss	16(%r12), %xmm0
	movss	12(%rbp), %xmm3
	cmpl	%edi, 104(%rsp)
	jge	.L6
	addss	%xmm5, %xmm2
	movss	112(%rsp), %xmm6
	addss	%xmm4, %xmm1
	movss	120(%rsp), %xmm7
	addss	%xmm3, %xmm0
	subss	%xmm2, %xmm6
	subss	%xmm0, %xmm7
	movss	%xmm6, 16(%rsp)
	movss	116(%rsp), %xmm6
	movss	16(%rsp), %xmm0
	movss	%xmm7, 24(%rsp)
	subss	%xmm1, %xmm6
	mulss	%xmm0, %xmm0
	movaps	%xmm6, %xmm1
	movss	%xmm6, 20(%rsp)
	mulss	%xmm6, %xmm1
	addss	%xmm1, %xmm0
	movaps	%xmm7, %xmm1
	mulss	%xmm7, %xmm1
	addss	%xmm1, %xmm0
	call	sqrtf@PLT
	movss	136(%rsp), %xmm6
	movaps	%xmm0, %xmm3
	comiss	%xmm0, %xmm6
	jbe	.L6
	mulss	%xmm0, %xmm0
	movss	64(%rsp), %xmm6
	movsd	.LC0(%rip), %xmm8
	movss	%xmm3, 32(%rsp)
	mulss	%xmm3, %xmm6
	cvtss2sd	%xmm0, %xmm0
	divsd	%xmm0, %xmm8
	movaps	%xmm6, %xmm0
	movss	%xmm6, 8(%rsp)
	movsd	%xmm8, 200(%rsp)
	call	expf@PLT
	cvtss2sd	64(%rsp), %xmm5
	mulsd	.LC0(%rip), %xmm5
	movss	32(%rsp), %xmm3
	movss	%xmm0, 196(%rsp)
	cvtss2sd	28(%rsp), %xmm0
	movss	28(%rsp), %xmm2
	movss	%xmm3, 192(%rsp)
	mulss	%xmm3, %xmm2
	divsd	%xmm0, %xmm5
	cvtss2sd	%xmm2, %xmm2
	movaps	%xmm2, %xmm4
	movsd	%xmm2, 160(%rsp)
	addsd	%xmm5, %xmm4
	movsd	%xmm5, 80(%rsp)
	movaps	%xmm4, %xmm0
	movsd	%xmm4, 88(%rsp)
	call	erfc@PLT
	cvtss2sd	8(%rsp), %xmm7
	movsd	%xmm7, 184(%rsp)
	movss	8(%rsp), %xmm7
	xorps	.LC1(%rip), %xmm7
	movsd	%xmm0, 72(%rsp)
	movaps	%xmm7, %xmm0
	movss	%xmm7, 32(%rsp)
	call	expf@PLT
	movsd	80(%rsp), %xmm5
	movsd	160(%rsp), %xmm2
	movss	%xmm0, 180(%rsp)
	subsd	%xmm5, %xmm2
	movsd	%xmm2, 168(%rsp)
	movaps	%xmm2, %xmm0
	call	erfc@PLT
	movsd	%xmm0, 80(%rsp)
	movss	140(%rsp), %xmm0
	call	sqrtf@PLT
	movsd	88(%rsp), %xmm4
	movss	%xmm0, 176(%rsp)
	mulsd	%xmm4, %xmm4
	xorps	.LC2(%rip), %xmm4
	movaps	%xmm4, %xmm0
	call	exp@PLT
	movsd	%xmm0, 88(%rsp)
	movss	8(%rsp), %xmm0
	call	expf@PLT
	movsd	168(%rsp), %xmm2
	movss	%xmm0, 160(%rsp)
	mulsd	%xmm2, %xmm2
	xorps	.LC2(%rip), %xmm2
	movaps	%xmm2, %xmm0
	call	exp@PLT
	movsd	%xmm0, 8(%rsp)
	movss	32(%rsp), %xmm0
	call	expf@PLT
	movss	196(%rsp), %xmm1
	movsd	200(%rsp), %xmm8
	movsd	184(%rsp), %xmm7
	movaps	%xmm0, %xmm2
	movss	180(%rsp), %xmm6
	cvtss2sd	%xmm1, %xmm0
	mulsd	%xmm8, %xmm0
	movsd	.LC3(%rip), %xmm1
	movss	160(%rsp), %xmm4
	mulsd	72(%rsp), %xmm0
	cvtss2sd	%xmm2, %xmm2
	movss	192(%rsp), %xmm3
	subsd	%xmm7, %xmm1
	mulsd	8(%rsp), %xmm2
	addsd	.LC3(%rip), %xmm7
	movss	176(%rsp), %xmm5
	mulss	%xmm3, %xmm5
	mulsd	%xmm1, %xmm0
	cvtss2sd	%xmm6, %xmm1
	mulsd	%xmm8, %xmm1
	mulsd	80(%rsp), %xmm1
	cvtsd2ss	%xmm0, %xmm0
	mulsd	%xmm7, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	cvtss2sd	%xmm4, %xmm1
	mulsd	88(%rsp), %xmm1
	movss	24(%r14), %xmm4
	addsd	%xmm2, %xmm1
	movss	28(%rsp), %xmm2
	divss	%xmm5, %xmm2
	cvtss2sd	%xmm2, %xmm2
	mulsd	%xmm2, %xmm1
	movss	16(%rsp), %xmm2
	cvtsd2ss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	movss	124(%rsp), %xmm1
	mulss	108(%rsp), %xmm1
	mulss	%xmm1, %xmm0
	movss	20(%r14), %xmm1
	mulss	%xmm0, %xmm2
	divss	%xmm3, %xmm2
	addss	%xmm2, %xmm1
	movss	%xmm1, 20(%r14)
	movss	20(%rsp), %xmm1
	mulss	%xmm0, %xmm1
	mulss	24(%rsp), %xmm0
	divss	%xmm3, %xmm1
	divss	%xmm3, %xmm0
	movss	28(%r14), %xmm3
	addss	%xmm1, %xmm4
	movss	%xmm4, 24(%r14)
	addss	%xmm0, %xmm3
	movss	%xmm3, 28(%r14)
	movss	20(%r12), %xmm3
	subss	%xmm2, %xmm3
	movss	24(%r12), %xmm2
	subss	%xmm1, %xmm2
	movss	28(%r12), %xmm1
	movss	%xmm3, 20(%r12)
	subss	%xmm0, %xmm1
	movss	%xmm2, 24(%r12)
	movss	%xmm1, 28(%r12)
.L6:
	incl	%r15d
	addq	$32, %r12
	jmp	.L4
.L19:
	incl	36(%rsp)
	addq	$16, %rbp
	cmpl	$27, 36(%rsp)
	jne	.L10
	incl	%r13d
	addq	$32, %r14
	jmp	.L13
.L18:
	movl	68(%rsp), %ecx
	movl	156(%rsp), %esi
	incq	%rbx
	addl	%ecx, 40(%rsp)
	addl	%esi, 44(%rsp)
	jmp	.L3
.L2:
	addq	$216, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z6updateffffiPiPfiS0_i, .-_Z6updateffffiPiPfiS0_i
	.globl	_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i
	.type	_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i, @function
_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$232, %rsp
	.cfi_def_cfa_offset 240
	movl	%edi, 44(%rsp)
	leaq	88(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	100(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	72(%rsp), %rdx
	movl	%ecx, 40(%rsp)
	leaq	80(%rsp), %rcx
	movq	%r8, 16(%rsp)
	movl	%r9d, 12(%rsp)
	movss	%xmm0, 60(%rsp)
	movss	%xmm1, 56(%rsp)
	movss	%xmm2, 52(%rsp)
	movss	%xmm3, 48(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movl	$1, 96(%rsp)
	movq	%rax, 136(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	44(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 208(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 88(%rsp)
	movq	%rax, 100(%rsp)
	movl	$1, 108(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L20
	pushq	80(%rsp)
	.cfi_def_cfa_offset 248
	leaq	_Z12updateKernelffffiPiPfiS0_i(%rip), %rdi
	pushq	80(%rsp)
	.cfi_def_cfa_offset 256
	movq	116(%rsp), %rcx
	movl	124(%rsp), %r8d
	movq	104(%rsp), %rsi
	movl	112(%rsp), %edx
	leaq	152(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 248
	popq	%rdx
	.cfi_def_cfa_offset 240
.L20:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$232, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i, .-_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i
	.globl	_Z12updateKernelffffiPiPfiS0_i
	.type	_Z12updateKernelffffiPiPfiS0_i, @function
_Z12updateKernelffffiPiPfiS0_i:
.LFB2054:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i
	.cfi_endproc
.LFE2054:
	.size	_Z12updateKernelffffiPiPfiS0_i, .-_Z12updateKernelffffiPiPfiS0_i
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC8:
	.string	"r"
.LC9:
	.string	"pos_1e7.txt"
.LC10:
	.string	"%f"
.LC12:
	.string	"L = %f\n"
.LC13:
	.string	"%d %d %d %d\n"
.LC15:
	.string	"%f %f %f\n"
.LC16:
	.string	"%d\n"
.LC18:
	.string	"bin_count[1] = %d\n"
.LC20:
	.string	"bin_count[%d] = %d\n"
.LC21:
	.string	"-------\n"
.LC22:
	.string	"-----------\n"
.LC30:
	.string	"elapsed time = %lf micro-seconds\n"
.LC31:
	.string	"no. of particles for c = 0, ip = 0: %d\n"
.LC33:
	.string	"c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n"
.LC34:
	.string	"-------------------\n"
.LC36:
	.string	"-------------\n"
.LC38:
	.string	"----------------\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	$80000000, %edi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$360, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	malloc@PLT
	movq	%rax, -208(%rbp)
.L26:
	movl	$12, %edi
	call	malloc@PLT
	movq	-208(%rbp), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpq	$10000000, %rbx
	jne	.L26
	movl	$40000000, %edi
	call	malloc@PLT
	movss	.LC7(%rip), %xmm0
	movq	%rax, -216(%rbp)
	xorl	%eax, %eax
.L27:
	movq	-216(%rbp), %rbx
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	cmpq	$10000000, %rax
	jne	.L27
	leaq	.LC8(%rip), %rsi
	leaq	.LC9(%rip), %rdi
	xorl	%r14d, %r14d
	call	fopen@PLT
	leaq	.LC10(%rip), %r13
	movq	%rax, %rbx
.L28:
	xorl	%r12d, %r12d
.L30:
	movq	-208(%rbp), %rax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	(%rax,%r14,8), %rdx
	xorl	%eax, %eax
	addq	%r12, %rdx
	call	__isoc23_fscanf@PLT
	testl	%eax, %eax
	je	.L29
	addq	$4, %r12
	cmpq	$12, %r12
	jne	.L30
.L29:
	incq	%r14
	cmpq	$10000000, %r14
	jne	.L28
	movq	%rbx, %rdi
	call	fclose@PLT
	movsd	.LC11(%rip), %xmm0
	leaq	.LC12(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$1520875, %r9d
	movl	$115, %r8d
	movl	$115, %ecx
	movl	$115, %edx
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movsd	.LC14(%rip), %xmm0
	leaq	.LC15(%rip), %rsi
	movb	$3, %al
	movl	$2, %edi
	movaps	%xmm0, %xmm2
	movaps	%xmm0, %xmm1
	call	__printf_chk@PLT
	movl	$37, %edx
	leaq	.LC16(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	-1800712192(%rsp), %rax
.L32:
	cmpq	%rax, %rsp
	je	.L33
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L32
.L33:
	subq	$3808, %rsp
	orq	$0, 3800(%rsp)
	movl	$1800716000, %edi
	call	malloc@PLT
	movss	.LC17(%rip), %xmm0
	movq	%rsp, %r13
	movq	%rax, -184(%rbp)
	xorl	%eax, %eax
.L35:
	movq	-184(%rbp), %rbx
	xorl	%edx, %edx
	leaq	0(%r13,%rax), %rsi
	leaq	(%rax,%rbx), %rcx
.L36:
	movss	%xmm0, (%rsi,%rdx)
	movss	%xmm0, (%rcx,%rdx)
	addq	$4, %rdx
	cmpq	$148, %rdx
	jne	.L36
	addq	$1184, %rax
	cmpq	$1800716000, %rax
	jne	.L35
	movl	$6083500, %edi
	xorl	%ebx, %ebx
	call	malloc@PLT
	movl	$1520875, %ecx
	xorl	%edx, %edx
	leaq	.LC18(%rip), %rsi
	movq	%rax, -192(%rbp)
	movq	-192(%rbp), %rdi
	xorl	%eax, %eax
	rep stosl
	movl	$2, %edi
	call	__printf_chk@PLT
.L38:
	movq	-208(%rbp), %rax
	movq	(%rax,%rbx,8), %r14
	movss	(%r14), %xmm3
	movaps	%xmm3, %xmm0
	movss	%xmm3, -232(%rbp)
	divss	.LC19(%rip), %xmm0
	call	floorf@PLT
	movss	4(%r14), %xmm2
	movd	%xmm0, %r12d
	movss	%xmm2, -224(%rbp)
	movaps	%xmm2, %xmm0
	divss	.LC19(%rip), %xmm0
	call	floorf@PLT
	movss	8(%r14), %xmm1
	movd	%xmm0, %r15d
	movss	%xmm1, -200(%rbp)
	movaps	%xmm1, %xmm0
	divss	.LC19(%rip), %xmm0
	call	floorf@PLT
	movd	%r15d, %xmm6
	movd	%r12d, %xmm5
	movq	-192(%rbp), %rcx
	cvttss2sil	%xmm6, %eax
	movq	-216(%rbp), %r11
	movss	-232(%rbp), %xmm3
	cvttss2sil	%xmm5, %edx
	movss	-224(%rbp), %xmm2
	movss	-200(%rbp), %xmm1
	cvtsi2ssl	%ebx, %xmm4
	imull	$115, %eax, %eax
	addl	%edx, %eax
	cvttss2sil	%xmm0, %edx
	movss	(%r11,%rbx,4), %xmm0
	incq	%rbx
	imull	$13225, %edx, %edx
	addl	%edx, %eax
	movslq	%eax, %rdx
	imull	$296, %eax, %eax
	leaq	(%rcx,%rdx,4), %rsi
	movl	(%rsi), %ecx
	imulq	$296, %rdx, %rdx
	leal	0(,%rcx,8), %edi
	incl	%ecx
	movslq	%edi, %r8
	addl	%edi, %eax
	addq	%rdx, %r8
	cltq
	movss	%xmm4, 0(%r13,%r8,4)
	leal	1(%rdi), %r8d
	movslq	%r8d, %r8
	addq	%rdx, %r8
	movss	%xmm0, 0(%r13,%r8,4)
	leal	2(%rdi), %r8d
	movslq	%r8d, %r8
	addq	%rdx, %r8
	movss	%xmm3, 0(%r13,%r8,4)
	leal	3(%rdi), %r8d
	movslq	%r8d, %r8
	addq	%rdx, %r8
	movss	%xmm2, 0(%r13,%r8,4)
	leal	4(%rdi), %r8d
	movslq	%r8d, %r8
	addq	%rdx, %r8
	movss	%xmm1, 0(%r13,%r8,4)
	leal	5(%rdi), %r8d
	movslq	%r8d, %r8
	addq	%rdx, %r8
	movl	$0x00000000, 0(%r13,%r8,4)
	leal	6(%rdi), %r8d
	movslq	%r8d, %r8
	addq	%rdx, %r8
	movl	$0x00000000, 0(%r13,%r8,4)
	leal	7(%rdi), %r8d
	movq	-184(%rbp), %rdi
	movslq	%r8d, %r8
	addq	%rdx, %r8
	leaq	0(,%rax,4), %rdx
	movss	%xmm4, (%rdi,%rax,4)
	movl	$0x00000000, 0(%r13,%r8,4)
	movss	%xmm0, 4(%rdi,%rdx)
	movss	%xmm3, 8(%rdi,%rdx)
	movss	%xmm2, 12(%rdi,%rdx)
	movss	%xmm1, 16(%rdi,%rdx)
	movl	$0x00000000, 20(%rdi,%rdx)
	movl	$0x00000000, 24(%rdi,%rdx)
	movl	$0x00000000, 28(%rdi,%rdx)
	movl	%ecx, (%rsi)
	cmpq	$10000000, %rbx
	jne	.L38
	movq	-192(%rbp), %rax
	xorl	%edx, %edx
	movl	$2, %edi
	leaq	.LC20(%rip), %rsi
	movl	(%rax), %ecx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC21(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	-657014784(%rsp), %rax
.L39:
	cmpq	%rax, %rsp
	je	.L40
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L39
.L40:
	subq	$3216, %rsp
	orq	$0, 3208(%rsp)
	movl	$657018000, %edi
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	movq	%rsp, -248(%rbp)
	call	malloc@PLT
	movq	%rax, -224(%rbp)
.L51:
	movl	%ebx, %eax
	movl	$13225, %ecx
	xorl	%r15d, %r15d
	cltd
	idivl	%ecx
	movl	$115, %ecx
	movl	%eax, %esi
	movl	%edx, %eax
	cltd
	decl	%esi
	idivl	%ecx
	movq	-248(%rbp), %rcx
	movq	%rcx, -280(%rbp)
	addq	%r12, %rcx
	movq	%rcx, -232(%rbp)
	movq	-224(%rbp), %rcx
	addq	%r12, %rcx
	movq	%rcx, -240(%rbp)
.L42:
	cmpl	$108, %r15d
	je	.L111
	cmpl	$-1, %esi
	je	.L89
	cmpl	$115, %esi
	jne	.L90
	movss	.LC5(%rip), %xmm0
	movl	$-115, %ecx
	jmp	.L43
.L89:
	movss	.LC4(%rip), %xmm0
	movl	$115, %ecx
	jmp	.L43
.L90:
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
.L43:
	addl	%esi, %ecx
	movq	-240(%rbp), %r14
	leal	-1(%rax), %r8d
	imull	$13225, %ecx, %ecx
	movl	%ecx, -256(%rbp)
	leal	2(%rax), %ecx
	movl	%ecx, -260(%rbp)
	movq	-232(%rbp), %rcx
	movq	%rcx, -200(%rbp)
	leal	2(%rdx), %ecx
	movl	%ecx, -272(%rbp)
.L44:
	movl	-260(%rbp), %ecx
	cmpl	%ecx, %r8d
	je	.L112
	cmpl	$-1, %r8d
	je	.L91
	cmpl	$115, %r8d
	jne	.L92
	movss	.LC5(%rip), %xmm1
	movl	$-115, %edi
	jmp	.L45
.L91:
	movss	.LC4(%rip), %xmm1
	movl	$115, %edi
	jmp	.L45
.L92:
	xorps	%xmm1, %xmm1
	xorl	%edi, %edi
.L45:
	addl	%r8d, %edi
	movq	-200(%rbp), %r10
	leal	-1(%rdx), %r9d
	movq	%r14, %r11
	imull	$115, %edi, %ecx
	movl	%ecx, -252(%rbp)
.L46:
	movl	-272(%rbp), %ecx
	cmpl	%ecx, %r9d
	je	.L113
	cmpl	$-1, %r9d
	je	.L93
	cmpl	$115, %r9d
	jne	.L94
	movss	.LC5(%rip), %xmm2
	movl	$-115, %ecx
	jmp	.L47
.L93:
	movss	.LC4(%rip), %xmm2
	movl	$115, %ecx
	jmp	.L47
.L94:
	xorps	%xmm2, %xmm2
	xorl	%ecx, %ecx
.L47:
	movl	-252(%rbp), %edi
	addl	%r9d, %ecx
	addq	$16, %r10
	movss	%xmm2, 4(%r11)
	movss	%xmm1, 8(%r11)
	incl	%r9d
	addq	$16, %r11
	addl	%edi, %ecx
	movl	-256(%rbp), %edi
	movss	%xmm2, -12(%r10)
	movss	%xmm1, -8(%r10)
	addl	%edi, %ecx
	movss	%xmm0, -4(%r10)
	cvtsi2ssl	%ecx, %xmm3
	movss	%xmm0, -4(%r11)
	movss	%xmm3, -16(%r10)
	movss	%xmm3, -16(%r11)
	jmp	.L46
.L113:
	addq	$48, -200(%rbp)
	incl	%r8d
	addq	$48, %r14
	jmp	.L44
.L112:
	addq	$144, -232(%rbp)
	addl	$36, %r15d
	incl	%esi
	addq	$144, -240(%rbp)
	jmp	.L42
.L111:
	incl	%ebx
	addq	$432, %r12
	cmpl	$1520875, %ebx
	jne	.L51
	leaq	.LC22(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	leaq	-88(%rbp), %rsi
	movl	$1, %edi
	call	clock_gettime@PLT
.L52:
	imulq	$1184, %r14, %rdx
	xorl	%eax, %eax
	movslq	%r14d, %rdi
	movl	$5, %ebx
	movl	%eax, -252(%rbp)
	imulq	$296, %rdi, %r15
	leaq	0(%r13,%rdx), %r12
.L62:
	movq	-192(%rbp), %rax
	movl	-252(%rbp), %edx
	cmpl	%edx, (%rax,%r14,4)
	jle	.L114
	cvttss2sil	(%r12), %eax
	movss	4(%r12), %xmm6
	xorl	%ecx, %ecx
	movss	8(%r12), %xmm7
	movss	12(%r12), %xmm5
	movl	%ecx, -260(%rbp)
	movss	%xmm6, -316(%rbp)
	movss	16(%r12), %xmm6
	movq	-280(%rbp), %rsi
	movss	%xmm7, -320(%rbp)
	movl	%eax, -264(%rbp)
	movss	%xmm5, -324(%rbp)
	movss	%xmm6, -328(%rbp)
.L59:
	cvttss2sil	(%rsi), %eax
	movq	-192(%rbp), %rdx
	cltq
	leaq	(%rdx,%rax,4), %rdx
	movq	%rdx, -312(%rbp)
	imulq	$1184, %rax, %rax
	xorl	%edx, %edx
	movl	%edx, -256(%rbp)
	addq	%r13, %rax
.L53:
	movq	-312(%rbp), %rdx
	movl	-256(%rbp), %ecx
	cmpl	%ecx, (%rdx)
	jle	.L115
	movss	4(%rax), %xmm7
	cvttss2sil	(%rax), %r9d
	movss	8(%rax), %xmm2
	movss	12(%rax), %xmm1
	movss	16(%rax), %xmm0
	movss	4(%rsi), %xmm5
	movss	%xmm7, -332(%rbp)
	movss	8(%rsi), %xmm4
	movss	12(%rsi), %xmm3
	cmpl	%r9d, -264(%rbp)
	je	.L55
	addss	%xmm5, %xmm2
	movss	-320(%rbp), %xmm7
	addss	%xmm4, %xmm1
	movss	-324(%rbp), %xmm6
	addss	%xmm3, %xmm0
	movq	%rax, -272(%rbp)
	movq	%rsi, -200(%rbp)
	subss	%xmm2, %xmm7
	subss	%xmm1, %xmm6
	movss	%xmm7, -232(%rbp)
	movss	-328(%rbp), %xmm7
	movaps	%xmm6, %xmm1
	mulss	%xmm6, %xmm1
	movss	%xmm6, -240(%rbp)
	subss	%xmm0, %xmm7
	movss	-232(%rbp), %xmm0
	mulss	%xmm0, %xmm0
	movss	%xmm7, -248(%rbp)
	addss	%xmm1, %xmm0
	movaps	%xmm7, %xmm1
	mulss	%xmm7, %xmm1
	addss	%xmm1, %xmm0
	call	sqrtf@PLT
	movss	.LC23(%rip), %xmm5
	movq	-200(%rbp), %rsi
	movq	-272(%rbp), %rax
	movaps	%xmm0, %xmm3
	comiss	%xmm0, %xmm5
	jbe	.L55
	mulss	%xmm0, %xmm0
	movsd	.LC0(%rip), %xmm6
	movaps	%xmm3, %xmm5
	movq	%rax, -392(%rbp)
	mulss	.LC24(%rip), %xmm5
	movq	%rsi, -384(%rbp)
	movss	%xmm3, -272(%rbp)
	cvtss2sd	%xmm0, %xmm0
	divsd	%xmm0, %xmm6
	movaps	%xmm5, %xmm0
	movss	%xmm5, -200(%rbp)
	movsd	%xmm6, -376(%rbp)
	call	expf@PLT
	movss	-272(%rbp), %xmm3
	movss	.LC25(%rip), %xmm2
	movsd	.LC26(%rip), %xmm4
	movss	%xmm0, -364(%rbp)
	mulss	%xmm3, %xmm2
	movss	%xmm3, -352(%rbp)
	cvtss2sd	%xmm2, %xmm2
	addsd	%xmm2, %xmm4
	movsd	%xmm2, -296(%rbp)
	movaps	%xmm4, %xmm0
	movsd	%xmm4, -304(%rbp)
	call	erfc@PLT
	movss	-200(%rbp), %xmm7
	xorps	.LC1(%rip), %xmm7
	cvtss2sd	-200(%rbp), %xmm5
	movsd	%xmm0, -288(%rbp)
	movaps	%xmm7, %xmm0
	movsd	%xmm5, -360(%rbp)
	movss	%xmm7, -272(%rbp)
	call	expf@PLT
	movsd	-296(%rbp), %xmm2
	subsd	.LC26(%rip), %xmm2
	movss	%xmm0, -348(%rbp)
	movaps	%xmm2, %xmm0
	movsd	%xmm2, -344(%rbp)
	call	erfc@PLT
	movsd	-304(%rbp), %xmm4
	movsd	%xmm0, -296(%rbp)
	mulsd	%xmm4, %xmm4
	xorps	.LC2(%rip), %xmm4
	movaps	%xmm4, %xmm0
	call	exp@PLT
	movsd	%xmm0, -304(%rbp)
	movss	-200(%rbp), %xmm0
	call	expf@PLT
	movsd	-344(%rbp), %xmm2
	movss	%xmm0, -336(%rbp)
	mulsd	%xmm2, %xmm2
	xorps	.LC2(%rip), %xmm2
	movaps	%xmm2, %xmm0
	call	exp@PLT
	movsd	%xmm0, -200(%rbp)
	movss	-272(%rbp), %xmm0
	call	expf@PLT
	movss	-364(%rbp), %xmm1
	movslq	%ebx, %r9
	movsd	-376(%rbp), %xmm6
	movsd	.LC3(%rip), %xmm8
	movaps	%xmm0, %xmm2
	movsd	-360(%rbp), %xmm5
	addq	%r15, %r9
	cvtss2sd	%xmm1, %xmm0
	mulsd	%xmm6, %xmm0
	movss	-348(%rbp), %xmm7
	movss	-336(%rbp), %xmm4
	mulsd	-288(%rbp), %xmm0
	movaps	%xmm8, %xmm1
	cvtss2sd	%xmm2, %xmm2
	movss	-352(%rbp), %xmm3
	subsd	%xmm5, %xmm1
	addsd	%xmm8, %xmm5
	mulsd	-200(%rbp), %xmm2
	movq	-392(%rbp), %rax
	movq	-384(%rbp), %rsi
	mulsd	%xmm1, %xmm0
	cvtss2sd	%xmm7, %xmm1
	mulsd	%xmm6, %xmm1
	mulsd	-296(%rbp), %xmm1
	cvtsd2ss	%xmm0, %xmm0
	mulsd	%xmm5, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	cvtss2sd	%xmm4, %xmm1
	movss	.LC27(%rip), %xmm4
	mulsd	-304(%rbp), %xmm1
	mulss	%xmm3, %xmm4
	addsd	%xmm2, %xmm1
	movss	.LC25(%rip), %xmm2
	divss	%xmm4, %xmm2
	cvtss2sd	%xmm2, %xmm2
	mulsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	movss	-332(%rbp), %xmm1
	mulss	-316(%rbp), %xmm1
	mulss	%xmm1, %xmm0
	movss	-232(%rbp), %xmm1
	mulss	%xmm0, %xmm1
	divss	%xmm3, %xmm1
	addss	0(%r13,%r9,4), %xmm1
	movss	%xmm1, 0(%r13,%r9,4)
	movss	-240(%rbp), %xmm1
	leal	1(%rbx), %r9d
	movslq	%r9d, %r9
	mulss	%xmm0, %xmm1
	addq	%r15, %r9
	mulss	-248(%rbp), %xmm0
	divss	%xmm3, %xmm1
	divss	%xmm3, %xmm0
	addss	0(%r13,%r9,4), %xmm1
	movss	%xmm1, 0(%r13,%r9,4)
	leal	2(%rbx), %r9d
	movslq	%r9d, %r9
	addq	%r15, %r9
	addss	0(%r13,%r9,4), %xmm0
	movss	%xmm0, 0(%r13,%r9,4)
.L55:
	incl	-256(%rbp)
	addq	$32, %rax
	jmp	.L53
.L115:
	incl	-260(%rbp)
	addq	$16, %rsi
	cmpl	$27, -260(%rbp)
	jne	.L59
	incl	-252(%rbp)
	addl	$8, %ebx
	addq	$32, %r12
	jmp	.L62
.L114:
	addq	$432, -280(%rbp)
	incq	%r14
	cmpq	$1520875, %r14
	jne	.L52
	leaq	-72(%rbp), %rsi
	movl	$1, %edi
	xorl	%r12d, %r12d
	call	clock_gettime@PLT
	movq	-72(%rbp), %rax
	subq	-88(%rbp), %rax
	leaq	.LC30(%rip), %rsi
	cvtsi2sdq	%rax, %xmm0
	movq	-64(%rbp), %rax
	subq	-80(%rbp), %rax
	movl	$2, %edi
	mulsd	.LC28(%rip), %xmm0
	cvtsi2sdq	%rax, %xmm1
	movb	$1, %al
	divsd	.LC29(%rip), %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	xorl	%edx, %edx
	leaq	.LC31(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L63:
	imulq	$1184, %r12, %r15
	movslq	%r12d, %rax
	movl	$7, %ebx
	xorl	%r14d, %r14d
	movl	%r12d, -200(%rbp)
	movq	%rax, -232(%rbp)
	addq	%r13, %r15
.L68:
	movq	-192(%rbp), %rax
	cmpl	%r14d, (%rax,%r12,4)
	jle	.L116
	movss	(%r15), %xmm0
	movss	.LC32(%rip), %xmm6
	comiss	%xmm0, %xmm6
	jbe	.L64
	leal	-5(%rbx), %edx
	leal	-1(%rbx), %r9d
	movslq	%ebx, %r10
	cvtss2sd	%xmm0, %xmm0
	leal	-2(%rbx), %edi
	leal	-3(%rbx), %esi
	movslq	%edx, %rdx
	movslq	%r9d, %r9
	leal	-4(%rbx), %ecx
	leal	-6(%rbx), %r11d
	movslq	%edi, %rdi
	movslq	%esi, %rsi
	imulq	$296, -232(%rbp), %rax
	movslq	%ecx, %rcx
	movslq	%r11d, %r11
	addq	%rax, %rdx
	addq	%rax, %rdi
	addq	%rax, %rsi
	addq	%rax, %r10
	addq	%rax, %r9
	addq	%rax, %rcx
	cvtss2sd	0(%r13,%rdx,4), %xmm2
	addq	%r11, %rax
	movl	-200(%rbp), %edx
	cvtss2sd	0(%r13,%rdi,4), %xmm5
	cvtss2sd	0(%r13,%rsi,4), %xmm4
	cvtss2sd	0(%r13,%rax,4), %xmm1
	leaq	.LC33(%rip), %rsi
	movl	$2, %edi
	movb	$8, %al
	cvtss2sd	0(%r13,%r10,4), %xmm7
	cvtss2sd	0(%r13,%r9,4), %xmm6
	cvtss2sd	0(%r13,%rcx,4), %xmm3
	call	__printf_chk@PLT
.L64:
	incl	%r14d
	addq	$32, %r15
	addl	$8, %ebx
	jmp	.L68
.L116:
	incq	%r12
	cmpq	$1520875, %r12
	jne	.L63
	leaq	.LC34(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__printf_chk@PLT
.L69:
	imulq	$1184, %r12, %r15
	movl	%r12d, -200(%rbp)
	xorl	%r8d, %r8d
	movslq	%r12d, %r14
	movl	$7, %ebx
	addq	%r13, %r15
.L74:
	movq	-192(%rbp), %rax
	cmpl	%r8d, (%rax,%r12,4)
	jle	.L117
	movss	(%r15), %xmm0
	comiss	.LC35(%rip), %xmm0
	jbe	.L70
	leal	-5(%rbx), %edx
	leal	-1(%rbx), %r9d
	movslq	%ebx, %r10
	movl	%r8d, -232(%rbp)
	imulq	$296, %r14, %rax
	leal	-2(%rbx), %edi
	movslq	%edx, %rdx
	movslq	%r9d, %r9
	leal	-3(%rbx), %esi
	leal	-4(%rbx), %ecx
	movslq	%edi, %rdi
	cvtss2sd	%xmm0, %xmm0
	leal	-6(%rbx), %r11d
	movslq	%esi, %rsi
	movslq	%ecx, %rcx
	addq	%rax, %rdx
	movslq	%r11d, %r11
	addq	%rax, %r10
	addq	%rax, %r9
	addq	%rax, %rdi
	addq	%rax, %rsi
	addq	%rax, %rcx
	cvtss2sd	0(%r13,%rdx,4), %xmm2
	addq	%r11, %rax
	movl	-200(%rbp), %edx
	cvtss2sd	0(%r13,%rdi,4), %xmm5
	cvtss2sd	0(%r13,%rsi,4), %xmm4
	cvtss2sd	0(%r13,%rax,4), %xmm1
	leaq	.LC33(%rip), %rsi
	movb	$8, %al
	movl	$2, %edi
	cvtss2sd	0(%r13,%r10,4), %xmm7
	cvtss2sd	0(%r13,%r9,4), %xmm6
	cvtss2sd	0(%r13,%rcx,4), %xmm3
	call	__printf_chk@PLT
	movl	-232(%rbp), %r8d
.L70:
	incl	%r8d
	addq	$32, %r15
	addl	$8, %ebx
	jmp	.L74
.L117:
	incq	%r12
	cmpq	$1520875, %r12
	jne	.L69
	leaq	.LC36(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	-120(%rbp), %rsi
	movl	$1, %edi
	call	clock_gettime@PLT
	leaq	-152(%rbp), %rdi
	movl	$6083500, %esi
	call	cudaMalloc@PLT
	leaq	-168(%rbp), %rdi
	movl	$1800716000, %esi
	call	cudaMalloc@PLT
	leaq	-160(%rbp), %rdi
	movl	$657018000, %esi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$6083500, %edx
	movabsq	$12760347836928, %rax
	movq	%rax, -144(%rbp)
	movl	$67108865, %eax
	movq	-192(%rbp), %rsi
	movq	-152(%rbp), %rdi
	salq	$6, %rax
	movl	$1, -136(%rbp)
	movq	%rax, -132(%rbp)
	movl	$1, -124(%rbp)
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$1800716000, %edx
	movq	-184(%rbp), %rsi
	movq	-168(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$657018000, %edx
	movq	-224(%rbp), %rsi
	movq	-160(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	-124(%rbp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	-132(%rbp), %rdx
	movq	-144(%rbp), %rdi
	movl	-136(%rbp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L75
	movq	-160(%rbp), %r8
	movq	-168(%rbp), %rdx
	movl	$108, %r9d
	movl	$296, %ecx
	movq	-152(%rbp), %rsi
	movss	.LC37(%rip), %xmm3
	movl	$1520875, %edi
	movss	.LC23(%rip), %xmm2
	movss	.LC25(%rip), %xmm1
	movss	.LC24(%rip), %xmm0
	call	_Z44__device_stub__Z12updateKernelffffiPiPfiS0_iffffiPiPfiS0_i
.L75:
	call	cudaDeviceSynchronize@PLT
	movq	-168(%rbp), %rsi
	movl	$2, %ecx
	xorl	%r13d, %r13d
	movq	-184(%rbp), %rdi
	movl	$1800716000, %edx
	call	cudaMemcpy@PLT
	leaq	-104(%rbp), %rsi
	movl	$1, %edi
	call	clock_gettime@PLT
	movq	-104(%rbp), %rax
	subq	-120(%rbp), %rax
	leaq	.LC30(%rip), %rsi
	cvtsi2sdq	%rax, %xmm0
	movq	-96(%rbp), %rax
	subq	-112(%rbp), %rax
	movl	$2, %edi
	mulsd	.LC28(%rip), %xmm0
	cvtsi2sdq	%rax, %xmm1
	movb	$1, %al
	divsd	.LC29(%rip), %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
.L76:
	imulq	$1184, %r13, %r12
	movq	-184(%rbp), %rax
	movl	%r13d, %ebx
	xorl	%r14d, %r14d
	addq	%rax, %r12
.L81:
	movq	-192(%rbp), %rax
	cmpl	%r14d, (%rax,%r13,4)
	jle	.L118
	movss	(%r12), %xmm0
	movss	.LC32(%rip), %xmm7
	comiss	%xmm0, %xmm7
	jbe	.L77
	movl	%ebx, %edx
	leaq	.LC33(%rip), %rsi
	movl	$2, %edi
	movb	$8, %al
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	28(%r12), %xmm7
	cvtss2sd	24(%r12), %xmm6
	cvtss2sd	20(%r12), %xmm5
	cvtss2sd	16(%r12), %xmm4
	cvtss2sd	12(%r12), %xmm3
	cvtss2sd	8(%r12), %xmm2
	cvtss2sd	4(%r12), %xmm1
	call	__printf_chk@PLT
.L77:
	incl	%r14d
	addq	$32, %r12
	jmp	.L81
.L118:
	incq	%r13
	cmpq	$1520875, %r13
	jne	.L76
	leaq	.LC38(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	leaq	.LC33(%rip), %r12
.L82:
	imulq	$1184, %r14, %r13
	movq	-184(%rbp), %rax
	movl	%r14d, %ebx
	xorl	%r15d, %r15d
	addq	%rax, %r13
.L87:
	movq	-192(%rbp), %rax
	cmpl	%r15d, (%rax,%r14,4)
	jle	.L119
	movss	0(%r13), %xmm0
	comiss	.LC35(%rip), %xmm0
	jbe	.L83
	movl	%ebx, %edx
	movq	%r12, %rsi
	movl	$2, %edi
	movb	$8, %al
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	28(%r13), %xmm7
	cvtss2sd	24(%r13), %xmm6
	cvtss2sd	20(%r13), %xmm5
	cvtss2sd	16(%r13), %xmm4
	cvtss2sd	12(%r13), %xmm3
	cvtss2sd	8(%r13), %xmm2
	cvtss2sd	4(%r13), %xmm1
	call	__printf_chk@PLT
.L83:
	incl	%r15d
	addq	$32, %r13
	jmp	.L87
.L119:
	incq	%r14
	cmpq	$1520875, %r14
	jne	.L82
	movq	-168(%rbp), %rdi
	call	cudaFree@PLT
	movq	-160(%rbp), %rdi
	call	cudaFree@PLT
	movq	-152(%rbp), %rdi
	call	cudaFree@PLT
	movq	-208(%rbp), %rdi
	call	free@PLT
	movq	-216(%rbp), %rdi
	call	free@PLT
	movq	-192(%rbp), %rdi
	call	free@PLT
	movq	-184(%rbp), %rdi
	call	free@PLT
	movq	-224(%rbp), %rdi
	call	free@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L88
	call	__stack_chk_fail@PLT
.L88:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2028:
	.size	main, .-main
	.section	.rodata.str1.1
.LC39:
	.string	"_Z12updateKernelffffiPiPfiS0_i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2056:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC39(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z12updateKernelffffiPiPfiS0_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2056:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1071644672
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.align 16
.LC2:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC3:
	.long	0
	.long	1072693248
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC4:
	.long	-1012030074
	.align 4
.LC5:
	.long	1135453574
	.align 4
.LC7:
	.long	1065353216
	.section	.rodata.cst8
	.align 8
.LC11:
	.long	-1073741824
	.long	1081455792
	.align 8
.LC14:
	.long	-2147483648
	.long	1074276566
	.section	.rodata.cst4
	.align 4
.LC17:
	.long	-1035468800
	.align 4
.LC19:
	.long	1078019764
	.align 4
.LC23:
	.long	1077936128
	.align 4
.LC24:
	.long	1036831949
	.align 4
.LC25:
	.long	1056964608
	.section	.rodata.cst8
	.align 8
.LC26:
	.long	-1610612736
	.long	1069128089
	.section	.rodata.cst4
	.align 4
.LC27:
	.long	1071833029
	.section	.rodata.cst8
	.align 8
.LC28:
	.long	0
	.long	1093567616
	.align 8
.LC29:
	.long	0
	.long	1083129856
	.section	.rodata.cst4
	.align 4
.LC32:
	.long	1092616192
	.align 4
.LC35:
	.long	1259902582
	.align 4
.LC37:
	.long	1078530011
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdlib.h>
#include<stdio.h>
#include<math.h>
#include<hip/hip_runtime.h>
#include<time.h>

__global__
void updateKernel(float kappa, float G, float rc, float pi, int Ncell, int* bin_count, float* bin_atom_ln, int bin_atom_len, float* nl_list_ln, int cell_len)
{

  int ic = blockIdx.x + blockIdx.y * gridDim.x;
  int thId = threadIdx.x + blockDim.x * blockIdx.x + blockIdx.y * gridDim.x * blockDim.x;
  int ip = thId - ic*27;
  //num_threads - num_of_atoms_in_cutoff_sphere = 10;

  int jn;
  float Zc_ip, x_ip, y_ip, z_ip; 
  float Zc_jp, x_jp, y_jp, z_jp;
  int c_ipart, c_jpart; 
  float n_x_sh, n_y_sh, n_z_sh;
  float dx, dy, dz, r, f1, f2, f3, fr;
  float G_r_k_p, G_r_k_m;
 
  float sqt_pi = 1.7724538509055159;

  if(ic < Ncell){
    if(ip < (ic*37+bin_count[ic])){

  //for(int ic = 0; ic < Ncell; ic++){
    // for(int ip = 0; ip < bin_count[ic]; ip++){
       
        //c_ipart = bin_atom_ln[ic*bin_atom_len+ip*8];
        //Zc_ip = bin_atom_ln[ic*bin_atom_len+ip*8+1];
        //x_ip = bin_atom_ln[ic*bin_atom_len+ip*8+2];
        //y_ip = bin_atom_ln[ic*bin_atom_len+ip*8+3];
        //z_ip = bin_atom_ln[ic*bin_atom_len+ip*8+4];

        c_ipart = bin_atom_ln[ip*8];
        Zc_ip = bin_atom_ln[ip*8+1];
        x_ip = bin_atom_ln[ip*8+2];
        y_ip = bin_atom_ln[ip*8+3];
        z_ip = bin_atom_ln[ip*8+4];

        for(int jc = 0; jc < 27; jc++){
           jn = (int) nl_list_ln[ic*cell_len+jc*4];
           for(int jp = 0; jp < bin_count[jn]; jp++){

              c_jpart = bin_atom_ln[jn*bin_atom_len+jp*8];
              Zc_jp = bin_atom_ln[jn*bin_atom_len+jp*8+1];
              x_jp = bin_atom_ln[jn*bin_atom_len+jp*8+2];
              y_jp = bin_atom_ln[jn*bin_atom_len+jp*8+3];
              z_jp = bin_atom_ln[jn*bin_atom_len+jp*8+4];
              
              n_x_sh = nl_list_ln[ic*cell_len+jc*4+1];         
              n_y_sh = nl_list_ln[ic*cell_len+jc*4+2];         
              n_z_sh = nl_list_ln[ic*cell_len+jc*4+3];         
              //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
              if(c_ipart != c_jpart){
              
                //if((ic == 0) && (ip == 0)) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
                dx = x_ip - (x_jp + n_x_sh);
                dy = y_ip - (y_jp + n_y_sh);
                dz = z_ip - (z_jp + n_z_sh);
                r = sqrt(dx*dx + dy*dy + dz*dz);

                if(r < rc){

                  G_r_k_p = G*r + 0.5*kappa/G;
                  G_r_k_m = G*r - 0.5*kappa/G; 
                  f1 = (0.5/(r*r)) * exp(kappa*r) * erfc(G*r + 0.5*kappa/G) * (1.0 - kappa*r);
                  f2 = (0.5/(r*r)) * exp(-kappa*r) * erfc(G*r - 0.5*kappa/G) * (1.0 + kappa*r);
                  f3 = (G/(sqt_pi*r)) * (exp(-G_r_k_p*G_r_k_p) * exp(kappa*r) + exp(-G_r_k_m*G_r_k_m) * exp(-kappa*r) );
                  fr = Zc_ip*Zc_jp*(f1 + f2 + f3);           
               
                  //bin_atom_ln[ic*bin_atom_len+ip*8+5] = bin_atom_ln[ic*bin_atom_len+ip*8+5] + (fr*dx/r);   
                  //bin_atom_ln[ic*bin_atom_len+ip*8+6] = bin_atom_ln[ic*bin_atom_len+ip*8+6] + (fr*dy/r);   
                  //bin_atom_ln[ic*bin_atom_len+ip*8+7] = bin_atom_ln[ic*bin_atom_len+ip*8+7] + (fr*dz/r);   
                  
                  bin_atom_ln[ip*8+5] = bin_atom_ln[ip*8+5] + (fr*dx/r);   
                  bin_atom_ln[ip*8+6] = bin_atom_ln[ip*8+6] + (fr*dy/r);   
                  bin_atom_ln[ip*8+7] = bin_atom_ln[ip*8+7] + (fr*dz/r);   
                  
                  //bin_atom_ln[jn*bin_atom_len+jp*8+5] = bin_atom_ln[jn*bin_atom_len+jp*8+5] - (fr*dx/r);   
                  //bin_atom_ln[jn*bin_atom_len+jp*8+6] = bin_atom_ln[jn*bin_atom_len+jp*8+6] - (fr*dy/r);   
                  //bin_atom_ln[jn*bin_atom_len+jp*8+7] = bin_atom_ln[jn*bin_atom_len+jp*8+7] - (fr*dz/r);   

                }

              }    


           }


        }

    }

  }



}


void update(float kappa, float G, float rc, float pi, int Ncell, int* bin_count, float* bin_atom_ln, int bin_atom_len, float* nl_list_ln, int cell_len)
{

 // int cN, cp, cxN, cyN, czN, cxsh, cysh, czsh;
  //float rsh_x, rsh_y, rsh_z;

  int jn;
  float Zc_ip, x_ip, y_ip, z_ip; 
  float Zc_jp, x_jp, y_jp, z_jp;
  int c_ipart, c_jpart; 
  float n_x_sh, n_y_sh, n_z_sh;
  float dx, dy, dz, r, f1, f2, f3, fr;


  for(int ic = 0; ic < Ncell; ic++){
     for(int ip = 0; ip < bin_count[ic]; ip++){
       
        c_ipart = bin_atom_ln[ic*bin_atom_len+ip*8];
        Zc_ip = bin_atom_ln[ic*bin_atom_len+ip*8+1];
        x_ip = bin_atom_ln[ic*bin_atom_len+ip*8+2];
        y_ip = bin_atom_ln[ic*bin_atom_len+ip*8+3];
        z_ip = bin_atom_ln[ic*bin_atom_len+ip*8+4];

        for(int jc = 0; jc < 27; jc++){
           jn = (int) nl_list_ln[ic*cell_len+jc*4];
           for(int jp = 0; jp < bin_count[jn]; jp++){

              c_jpart = bin_atom_ln[jn*bin_atom_len+jp*8];
              Zc_jp = bin_atom_ln[jn*bin_atom_len+jp*8+1];
              x_jp = bin_atom_ln[jn*bin_atom_len+jp*8+2];
              y_jp = bin_atom_ln[jn*bin_atom_len+jp*8+3];
              z_jp = bin_atom_ln[jn*bin_atom_len+jp*8+4];
              
              n_x_sh = nl_list_ln[ic*cell_len+jc*4+1];         
              n_y_sh = nl_list_ln[ic*cell_len+jc*4+2];         
              n_z_sh = nl_list_ln[ic*cell_len+jc*4+3];         
              //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
              if(c_ipart < c_jpart){
              
                //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
                dx = x_ip - (x_jp + n_x_sh);
                dy = y_ip - (y_jp + n_y_sh);
                dz = z_ip - (z_jp + n_z_sh);
                r = sqrt(dx*dx + dy*dy + dz*dz);

                if(r < rc){
                  f1 = (0.5/(r*r)) * exp(kappa*r) * erfc(G*r + 0.5*kappa/G) * (1.0 - kappa*r);
                  f2 = (0.5/(r*r)) * exp(-kappa*r) * erfc(G*r - 0.5*kappa/G) * (1.0 + kappa*r);
                  f3 = (G/(sqrt(pi)*r)) * (exp(-pow((G*r + 0.5*kappa/G),2)) * exp(kappa*r) + exp(-pow((G*r - 0.5*kappa/G),2)) * exp(-kappa*r) );
                  fr = Zc_ip*Zc_jp*(f1 + f2 + f3);           
               
                  bin_atom_ln[ic*bin_atom_len+ip*8+5] = bin_atom_ln[ic*bin_atom_len+ip*8+5] + (fr*dx/r);   
                  bin_atom_ln[ic*bin_atom_len+ip*8+6] = bin_atom_ln[ic*bin_atom_len+ip*8+6] + (fr*dy/r);   
                  bin_atom_ln[ic*bin_atom_len+ip*8+7] = bin_atom_ln[ic*bin_atom_len+ip*8+7] + (fr*dz/r);   
                  
                  //bin_atom_ln[ip*8+5] = bin_atom_ln[ip*8+5] + (fr*dx/r);   
                  //bin_atom_ln[ip*8+6] = bin_atom_ln[ip*8+6] + (fr*dy/r);   
                  //bin_atom_ln[ip*8+7] = bin_atom_ln[ip*8+7] + (fr*dz/r);   
                  bin_atom_ln[jn*bin_atom_len+jp*8+5] = bin_atom_ln[jn*bin_atom_len+jp*8+5] - (fr*dx/r);   
                  bin_atom_ln[jn*bin_atom_len+jp*8+6] = bin_atom_ln[jn*bin_atom_len+jp*8+6] - (fr*dy/r);   
                  bin_atom_ln[jn*bin_atom_len+jp*8+7] = bin_atom_ln[jn*bin_atom_len+jp*8+7] - (fr*dz/r);   

                }

              }    


           }


        }

     }

  }

}

int main()
{

  float kappa, G;
  float L, rc;
  float rcx, rcy, rcz;
 
  float diff;
  struct timespec start, end; 
  float diff_c;
  struct timespec start_c, end_c; 

  int ipart;
  int i, j;
  int c, cx, cy, cz;


  int N = 10000000;

  float const pi = 3.141592653589793;
  float const emp = -50;

  float **pos = (float **)malloc(N*sizeof(float *));
  for(i = 0; i < N; i++){
     pos[i] = (float *)malloc(3*sizeof(float));
  }

  float *Z = (float *)malloc(N*sizeof(float));
  for(i = 0; i < N; i++){
     Z[i] = 1.0;
  }
  
  FILE *file;
  file = fopen("pos_1e7.txt", "r");

  for(i = 0; i < N; i++){
     for(j = 0; j < 3; j++){

        if(!fscanf(file, "%f", &pos[i][j]))
          break;
     }
  }

  fclose(file);

  kappa = 0.1;
  G = 0.5;
  rc = 3.0;

  L = pow(4.0 * pi * N/3.0, 1.0/3.0);
  printf("L = %f\n", L);

  float Lx = L;
  float Ly = L;
  float Lz = L;

  int Lxd = (int) floor(Lx/rc);
  int Lyd = (int) floor(Ly/rc);
  int Lzd = (int) floor(Lz/rc);

  int Ncell = Lxd*Lyd*Lzd;

  printf("%d %d %d %d\n", Lxd, Lyd, Lzd, Ncell);

  rcx = Lx/Lxd;
  rcy = Ly/Lyd;
  rcz = Lz/Lzd;

  printf("%f %f %f\n",rcx, rcy, rcz);

  int bin_atom_c = (int) (1* pow(rc,3) + 10.0);
  printf("%d\n",bin_atom_c);
  const int atm_len = 8;
  int bin_atom_len = atm_len * bin_atom_c;
  float bin_atom[Ncell][atm_len*bin_atom_c];
  //float bin_atom_ln[Ncell*bin_atom_len];
  float *bin_atom_ln = (float *)malloc(Ncell*bin_atom_len*sizeof(float));

  for(i = 0; i < Ncell; i++){
     for(j = 0; j < bin_atom_c; j++){
        bin_atom[i][j] = emp;
        bin_atom_ln[i*bin_atom_len + j] = emp;
     }
  }

  int *bin_count = (int *)malloc(Ncell*sizeof(int));
  int bcount, bin_idx;
  for(i = 0; i < Ncell; i++){
     bin_count[i] = 0;
  }

  printf("bin_count[1] = %d\n", bin_count[1]);

  for(ipart = 0; ipart < N; ipart++){
     
     cx = (int) floor(pos[ipart][0]/rcx);
     cy = (int) floor(pos[ipart][1]/rcy);
     cz = (int) floor(pos[ipart][2]/rcz);

     c = cx + cy*Lxd + cz*Lxd*Lyd;

     //if(c == 1){printf("c = %d, ipart = %d, bin_count[%d] = %d\n", c, ipart, c, bin_count[c]);}

     bcount = bin_count[c];
     bin_idx = atm_len*bcount;
     bin_atom[c][bin_idx] = ipart; 
     //if(c == 1){printf("c = %d, ipart = %d, bin_count[%d] = %d, bin_idx = %d, bin_atom[%d][bin_idx] = %f\n", c, ipart, c, bin_count[c], bin_idx, c, bin_atom[c][bin_idx]);}
     bin_atom[c][bin_idx+1] = Z[ipart]; 
     bin_atom[c][bin_idx+2] = pos[ipart][0]; 
     bin_atom[c][bin_idx+3] = pos[ipart][1]; 
     bin_atom[c][bin_idx+4] = pos[ipart][2]; 
     bin_atom[c][bin_idx+5] = 0.0; 
     bin_atom[c][bin_idx+6] = 0.0; 
     bin_atom[c][bin_idx+7] = 0.0;
    
     bin_atom_ln[c*bin_atom_len+bin_idx] = ipart; 
     //if(c == 1){printf("c = %d, ipart = %d, bin_count[%d] = %d, bin_idx = %d, bin_atom[%d][bin_idx] = %f\n", c, ipart, c, bin_count[c], bin_idx, c, bin_atom[c][bin_idx]);}
     bin_atom_ln[c*bin_atom_len+bin_idx+1] = Z[ipart]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+2] = pos[ipart][0]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+3] = pos[ipart][1]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+4] = pos[ipart][2]; 
     bin_atom_ln[c*bin_atom_len+bin_idx+5] = 0.0; 
     bin_atom_ln[c*bin_atom_len+bin_idx+6] = 0.0; 
     bin_atom_ln[c*bin_atom_len+bin_idx+7] = 0.0;
     
     bin_count[c] += 1; 

  }

  int chk = 0;
  printf("bin_count[%d] = %d\n", chk, bin_count[chk]);
  
  for(i = 0; i < bin_count[chk]; i++){
     //printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f\n",chk, bin_atom[chk][i*8], bin_atom[chk][i*8+1], bin_atom[chk][i*8+2], bin_atom[chk][i*8+3], bin_atom[chk][i*8+4], bin_atom[chk][i*8+5], bin_atom[chk][i*8+6], bin_atom[chk][i*8+7]);
  }
  printf("-------\n");
  for(i = 0; i < bin_count[chk]; i++){
     //printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f\n",chk, bin_atom_ln[chk*bin_atom_len + i*8], bin_atom_ln[chk*bin_atom_len + i*8+1], bin_atom_ln[chk*bin_atom_len + i*8+2], bin_atom_ln[chk*bin_atom_len+i*8+3], bin_atom_ln[chk*bin_atom_len+i*8+4], bin_atom_ln[chk*bin_atom_len+i*8+5], bin_atom_ln[chk*bin_atom_len+i*8+6], bin_atom_ln[chk*bin_atom_len+i*8+7]);
  }


  int cN, cp, cxN, cyN, czN, cxsh, cysh, czsh;
  float rsh_x, rsh_y, rsh_z;
  float nl_list[Ncell][27*4];
  //float nl_list_ln[Ncell*27*4];
  float *nl_list_ln = (float *)malloc(Ncell*27*4*sizeof(float));
  const int cell_len = 27*4;
  int n_ct;

  for(c = 0; c < Ncell; c++){
     cz = c/(Lxd*Lyd);
     cp = c % (Lxd*Lyd);
     cy = cp/Lxd;
     cx = cp % Lxd;

     n_ct = 0;
     for(czN = cz-1; czN < cz+2; czN++){
       
        if(czN < 0){
          czsh = Lzd;
          rsh_z = -Lz;
        }
        else if(czN >= Lzd){
          czsh = -Lzd;
          rsh_z = Lz;
        }
        else{
          czsh = 0;
          rsh_z = 0;
        }

        for(cyN = cy-1; cyN < cy+2; cyN++){
       
           if(cyN < 0){
             cysh = Lyd;
             rsh_y = -Ly;
           }
           else if(cyN >= Lyd){
             cysh = -Lyd;
             rsh_y = Ly;
           }
           else{
             cysh = 0;
             rsh_y = 0;
           }


           for(cxN = cx-1; cxN < cx+2; cxN++){
       
              if(cxN < 0){
                cxsh = Lxd;
                rsh_x = -Lx;
              }
              else if(cxN >= Lxd){
                cxsh = -Lxd;
                rsh_x = Lx;
              }
              else{
                cxsh = 0;
                rsh_x = 0;
              }

              cN = cxN + cxsh + (cyN + cysh)*Lxd + (czN + czsh)*Lxd*Lyd;
              nl_list[c][n_ct] = cN;
              nl_list[c][n_ct+1] = rsh_x;
              nl_list[c][n_ct+2] = rsh_y;
              nl_list[c][n_ct+3] = rsh_z;
             
              nl_list_ln[c*cell_len+n_ct] = cN;
              nl_list_ln[c*cell_len+n_ct+1] = rsh_x;
              nl_list_ln[c*cell_len+n_ct+2] = rsh_y;
              nl_list_ln[c*cell_len+n_ct+3] = rsh_z;
 
              n_ct += 4;


            }

          }

       } 

  }





  int nchk = 56;
  for(int inl = 0; inl < 27; inl++){
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list[nchk][inl*4], nl_list[nchk][inl*4+1], nl_list[nchk][inl*4+2], nl_list[nchk][inl*4+3]);
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list_ln[nchk*cell_len+inl*4], nl_list_ln[nchk*cell_len+inl*4+1], nl_list_ln[nchk*cell_len+inl*4+2], nl_list_ln[nchk*cell_len+inl*4+3]);
  }
  printf("-----------\n");
  for(int inl = 0; inl < 27; inl++){
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list[nchk][inl*4], nl_list[nchk][inl*4+1], nl_list[nchk][inl*4+2], nl_list[nchk][inl*4+3]);
     //printf("c = %d, cN = %f, rxsh = %f, rysh = %f, rzsh = %f\n", nchk, nl_list_ln[nchk*cell_len+inl*4], nl_list_ln[nchk*cell_len+inl*4+1], nl_list_ln[nchk*cell_len+inl*4+2], nl_list_ln[nchk*cell_len+inl*4+3]);
  }

  clock_gettime(CLOCK_MONOTONIC, &start_c);

  int jn;
  float Zc_ip, x_ip, y_ip, z_ip; 
  float Zc_jp, x_jp, y_jp, z_jp;
  int c_ipart, c_jpart; 
  float n_x_sh, n_y_sh, n_z_sh;
  float dx, dy, dz, r, f1, f2, f3, fr;
  int ip_cn = 0;

  for(int ic = 0; ic < Ncell; ic++){
     for(int ip = 0; ip < bin_count[ic]; ip++){
       
        c_ipart = bin_atom[ic][ip*8];
        Zc_ip = bin_atom[ic][ip*8+1];
        x_ip = bin_atom[ic][ip*8+2];
        y_ip = bin_atom[ic][ip*8+3];
        z_ip = bin_atom[ic][ip*8+4];

        for(int jc = 0; jc < 27; jc++){
           jn = (int) nl_list[ic][jc*4];
           for(int jp = 0; jp < bin_count[jn]; jp++){

              c_jpart = bin_atom[jn][jp*8];
              Zc_jp = bin_atom[jn][jp*8+1];
              x_jp = bin_atom[jn][jp*8+2];
              y_jp = bin_atom[jn][jp*8+3];
              z_jp = bin_atom[jn][jp*8+4];
              
              n_x_sh = nl_list[ic][jc*4+1];         
              n_y_sh = nl_list[ic][jc*4+2];         
              n_z_sh = nl_list[ic][jc*4+3];         
              //if(ic == 0) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart);}
              if(c_ipart != c_jpart){
              
                //if((ic == 0) && (ip == 0)) {printf("c = %d, c_i = %d, c_j = %d\n", ic, c_ipart, c_jpart); ip_cn += 1;}
                dx = x_ip - (x_jp + n_x_sh);
                dy = y_ip - (y_jp + n_y_sh);
                dz = z_ip - (z_jp + n_z_sh);
                r = sqrt(dx*dx + dy*dy + dz*dz);

                if(r < rc){
                  f1 = (0.5/(r*r)) * exp(kappa*r) * erfc(G*r + 0.5*kappa/G) * (1.0 - kappa*r);
                  f2 = (0.5/(r*r)) * exp(-kappa*r) * erfc(G*r - 0.5*kappa/G) * (1.0 + kappa*r);
                  f3 = (G/(sqrt(pi)*r)) * (exp(-pow((G*r + 0.5*kappa/G),2)) * exp(kappa*r) + exp(-pow((G*r - 0.5*kappa/G),2)) * exp(-kappa*r) );
                  fr = Zc_ip*Zc_jp*(f1 + f2 + f3);           
               
                  bin_atom[ic][ip*8+5] = bin_atom[ic][ip*8+5] + (fr*dx/r);   
                  bin_atom[ic][ip*8+6] = bin_atom[ic][ip*8+6] + (fr*dy/r);   
                  bin_atom[ic][ip*8+7] = bin_atom[ic][ip*8+7] + (fr*dz/r);   
                  //bin_atom[jn][jp*8+5] = bin_atom[jn][jp*8+5] - (fr*dx/r);   
                  //bin_atom[jn][jp*8+6] = bin_atom[jn][jp*8+6] - (fr*dy/r);   
                  //bin_atom[jn][jp*8+7] = bin_atom[jn][jp*8+7] - (fr*dz/r);   

                }

              }    


           }


        }

     }

  }
  clock_gettime(CLOCK_MONOTONIC, &end_c);
  diff_c = (end_c.tv_sec - start_c.tv_sec)*1000000.0 + (end_c.tv_nsec - start_c.tv_nsec)/1000.0;
  printf("elapsed time = %lf micro-seconds\n", diff_c);

  printf("no. of particles for c = 0, ip = 0: %d\n", ip_cn);

  //update(kappa, G, rc, pi, Ncell, bin_count, bin_atom_ln, bin_atom_len, nl_list_ln, cell_len);

  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom[cchk][i*8] < 10) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom[cchk][i*8], bin_atom[cchk][i*8+1], bin_atom[cchk][i*8+2], bin_atom[cchk][i*8+3], bin_atom[cchk][i*8+4], bin_atom[cchk][i*8+5], bin_atom[cchk][i*8+6], bin_atom[cchk][i*8+7]);}
     }
  }
  printf("-------------------\n");
  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom[cchk][i*8] > (N-10)) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom[cchk][i*8], bin_atom[cchk][i*8+1], bin_atom[cchk][i*8+2], bin_atom[cchk][i*8+3], bin_atom[cchk][i*8+4], bin_atom[cchk][i*8+5], bin_atom[cchk][i*8+6], bin_atom[cchk][i*8+7]);}
     }
  }

  printf("-------------\n");

  float *d_bin_atom_ln, *d_nl_list_ln;
  int *d_bin_count;
  clock_gettime(CLOCK_MONOTONIC, &start);
  
  hipMalloc((void **) &d_bin_count, Ncell*sizeof(int));
  hipMalloc((void **) &d_bin_atom_ln, Ncell*bin_atom_len*sizeof(float));
  hipMalloc((void **) &d_nl_list_ln, Ncell*27*4*sizeof(float));

  dim3 dimGrid(512, ceil(Ncell/512.0), 1);
  dim3 dimBlock(64, 1, 1);
  //clock_gettime(CLOCK_MONOTONIC, &start);
  
  hipMemcpy(d_bin_count, bin_count, Ncell*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(d_bin_atom_ln, bin_atom_ln, Ncell*bin_atom_len*sizeof(float), hipMemcpyHostToDevice);
  hipMemcpy(d_nl_list_ln, nl_list_ln, Ncell*27*4*sizeof(float), hipMemcpyHostToDevice);

  //clock_gettime(CLOCK_MONOTONIC, &start);
  updateKernel<<<dimGrid, dimBlock>>>(kappa, G, rc, pi, Ncell, d_bin_count, d_bin_atom_ln, bin_atom_len, d_nl_list_ln, cell_len);
  //updateKernel<<<ceil(Ncell/64), 64>>>(kappa, G, rc, pi, Ncell, d_bin_count, d_bin_atom_ln, bin_atom_len, d_nl_list_ln, cell_len);
  //updateKernel<<<ceil(Ncell/128.0), 128>>>();
  hipDeviceSynchronize(); 
  //clock_gettime(CLOCK_MONOTONIC, &end);
  //diff = (end.tv_sec - start.tv_sec)*1000000.0 + (end.tv_nsec - start.tv_nsec)/1000.0;
  //printf("elapsed time = %lf micro-seconds\n", diff);

  hipMemcpy(bin_atom_ln, d_bin_atom_ln, Ncell*bin_atom_len*sizeof(float), hipMemcpyDeviceToHost);

  clock_gettime(CLOCK_MONOTONIC, &end);
  diff = (end.tv_sec - start.tv_sec)*1000000.0 + (end.tv_nsec - start.tv_nsec)/1000.0;
  printf("elapsed time = %lf micro-seconds\n", diff);

  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom_ln[cchk*bin_atom_len+i*8] < 10) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom_ln[cchk*bin_atom_len+i*8], bin_atom_ln[cchk*bin_atom_len+i*8+1], bin_atom_ln[cchk*bin_atom_len+i*8+2], bin_atom_ln[cchk*bin_atom_len+i*8+3], bin_atom_ln[cchk*bin_atom_len+i*8+4], bin_atom_ln[cchk*bin_atom_len+i*8+5], bin_atom_ln[cchk*bin_atom_len+i*8+6], bin_atom_ln[cchk*bin_atom_len+i*8+7]);}
     }
  }
  
  printf("----------------\n");
 
  for(int cchk = 0; cchk < Ncell; cchk++){ 
     for(i = 0; i < bin_count[cchk]; i++){
     if(bin_atom_ln[cchk*bin_atom_len+i*8] > (N-10)) 
       {printf("c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n",cchk, bin_atom_ln[cchk*bin_atom_len+i*8], bin_atom_ln[cchk*bin_atom_len+i*8+1], bin_atom_ln[cchk*bin_atom_len+i*8+2], bin_atom_ln[cchk*bin_atom_len+i*8+3], bin_atom_ln[cchk*bin_atom_len+i*8+4], bin_atom_ln[cchk*bin_atom_len+i*8+5], bin_atom_ln[cchk*bin_atom_len+i*8+6], bin_atom_ln[cchk*bin_atom_len+i*8+7]);}
     }
  }

  hipFree(d_bin_atom_ln); hipFree(d_nl_list_ln); hipFree(d_bin_count);

  free(pos); free(Z);
  free(bin_count); free(bin_atom_ln); free(nl_list_ln);
  
  return 0;
} 

	.text
	.file	"lcl_g_2.hip"
	.globl	_Z27__device_stub__updateKernelffffiPiPfiS0_i # -- Begin function _Z27__device_stub__updateKernelffffiPiPfiS0_i
	.type	_Z27__device_stub__updateKernelffffiPiPfiS0_i,@function
_Z27__device_stub__updateKernelffffiPiPfiS0_i: # @_Z27__device_stub__updateKernelffffiPiPfiS0_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$192, %rsp
	.cfi_def_cfa_offset 240
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	36(%rsp), %rax
	movss	%xmm0, (%rax)
	leaq	32(%rsp), %r10
	movss	%xmm1, (%r10)
	leaq	28(%rsp), %r11
	movss	%xmm2, (%r11)
	leaq	24(%rsp), %r14
	movss	%xmm3, (%r14)
	leaq	20(%rsp), %r15
	movl	%edi, (%r15)
	leaq	72(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	64(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	16(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	56(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	112(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%r10, 8(%rbx)
	movq	%r11, 16(%rbx)
	movq	%r14, 24(%rbx)
	movq	%r15, 32(%rbx)
	movq	%rdi, 40(%rbx)
	movq	%rsi, 48(%rbx)
	movq	%rdx, 56(%rbx)
	movq	%rcx, 64(%rbx)
	movq	%r8, 72(%rbx)
	leaq	96(%rsp), %r14
	leaq	80(%rsp), %r15
	leaq	48(%rsp), %r12
	leaq	40(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z12updateKernelffffiPiPfiS0_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$208, %rsp
	.cfi_adjust_cfa_offset -208
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z27__device_stub__updateKernelffffiPiPfiS0_i, .Lfunc_end0-_Z27__device_stub__updateKernelffffiPiPfiS0_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z6updateffffiPiPfiS0_i
.LCPI1_0:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI1_2:
	.quad	0x3ff0000000000000              # double 1
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI1_1:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
.LCPI1_3:
	.quad	0x8000000000000000              # double -0
	.quad	0x8000000000000000              # double -0
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI1_4:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z6updateffffiPiPfiS0_i
	.type	_Z6updateffffiPiPfiS0_i,@function
_Z6updateffffiPiPfiS0_i:                # @_Z6updateffffiPiPfiS0_i
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$280, %rsp                      # imm = 0x118
	.cfi_def_cfa_offset 336
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r8, 192(%rsp)                  # 8-byte Spill
	movl	%ecx, 28(%rsp)                  # 4-byte Spill
	movq	%rdx, 136(%rsp)                 # 8-byte Spill
	movq	%rsi, 32(%rsp)                  # 8-byte Spill
	movss	%xmm3, 8(%rsp)                  # 4-byte Spill
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	movaps	%xmm0, 240(%rsp)                # 16-byte Spill
	testl	%edi, %edi
	jle	.LBB1_16
# %bb.1:                                # %.preheader.lr.ph
	movaps	240(%rsp), %xmm1                # 16-byte Reload
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm1, %xmm3
	mulsd	.LCPI1_0(%rip), %xmm3
	xorps	%xmm0, %xmm0
	cvtss2sd	12(%rsp), %xmm0                 # 4-byte Folded Reload
	divsd	%xmm0, %xmm3
	movsd	%xmm3, 152(%rsp)                # 8-byte Spill
	movaps	.LCPI1_1(%rip), %xmm0           # xmm0 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm0
	movaps	%xmm0, 256(%rsp)                # 16-byte Spill
	movslq	28(%rsp), %rax                  # 4-byte Folded Reload
	movq	%rax, 184(%rsp)                 # 8-byte Spill
	movslq	%r9d, %rax
	movq	%rax, 176(%rsp)                 # 8-byte Spill
	movl	%edi, %eax
	movq	%rax, 200(%rsp)                 # 8-byte Spill
	movq	136(%rsp), %rax                 # 8-byte Reload
	addq	$28, %rax
	movq	%rax, 224(%rsp)                 # 8-byte Spill
	xorl	%esi, %esi
	xorps	%xmm0, %xmm0
	sqrtss	8(%rsp), %xmm0                  # 4-byte Folded Reload
	movss	%xmm0, 64(%rsp)                 # 4-byte Spill
	movss	%xmm2, 68(%rsp)                 # 4-byte Spill
.LBB1_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_4 Depth 2
                                        #       Child Loop BB1_5 Depth 3
                                        #         Child Loop BB1_7 Depth 4
	movq	32(%rsp), %rax                  # 8-byte Reload
	cmpl	$0, (%rax,%rsi,4)
	jle	.LBB1_15
# %bb.3:                                # %.lr.ph200
                                        #   in Loop: Header=BB1_2 Depth=1
	movq	%rsi, %rax
	imulq	184(%rsp), %rax                 # 8-byte Folded Reload
	movq	%rsi, %rcx
	imulq	176(%rsp), %rcx                 # 8-byte Folded Reload
	movq	136(%rsp), %rdx                 # 8-byte Reload
	leaq	(%rdx,%rax,4), %r14
	movq	192(%rsp), %rax                 # 8-byte Reload
	leaq	(%rax,%rcx,4), %rbx
	xorl	%ecx, %ecx
	movq	%rsi, 208(%rsp)                 # 8-byte Spill
.LBB1_4:                                #   Parent Loop BB1_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB1_5 Depth 3
                                        #         Child Loop BB1_7 Depth 4
	leaq	(,%rcx,8), %r13
	movq	%rcx, 216(%rsp)                 # 8-byte Spill
	movq	%rcx, %rax
	shlq	$5, %rax
	cvttss2si	(%r14,%rax), %esi
	movss	4(%r14,%rax), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 84(%rsp)                 # 4-byte Spill
	movss	8(%r14,%rax), %xmm4             # xmm4 = mem[0],zero,zero,zero
	movss	12(%r14,%rax), %xmm5            # xmm5 = mem[0],zero,zero,zero
	movss	16(%r14,%rax), %xmm6            # xmm6 = mem[0],zero,zero,zero
	xorl	%eax, %eax
	movl	%esi, 88(%rsp)                  # 4-byte Spill
	movss	%xmm4, 80(%rsp)                 # 4-byte Spill
	movss	%xmm5, 76(%rsp)                 # 4-byte Spill
	movss	%xmm6, 72(%rsp)                 # 4-byte Spill
.LBB1_5:                                #   Parent Loop BB1_2 Depth=1
                                        #     Parent Loop BB1_4 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB1_7 Depth 4
	movq	%rax, %rcx
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	shlq	$4, %rax
	cvttss2si	(%rbx,%rax), %ecx
	movslq	%ecx, %rdx
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	%rdx, 232(%rsp)                 # 8-byte Spill
	movl	(%rax,%rdx,4), %eax
	testl	%eax, %eax
	jle	.LBB1_13
# %bb.6:                                # %.lr.ph
                                        #   in Loop: Header=BB1_5 Depth=3
	movq	144(%rsp), %rdx                 # 8-byte Reload
	leaq	(,%rdx,4), %r15
	imull	28(%rsp), %ecx                  # 4-byte Folded Reload
	movslq	%ecx, %rcx
	movq	224(%rsp), %rdx                 # 8-byte Reload
	leaq	(%rdx,%rcx,4), %r12
	xorl	%ebp, %ebp
.LBB1_7:                                #   Parent Loop BB1_2 Depth=1
                                        #     Parent Loop BB1_4 Depth=2
                                        #       Parent Loop BB1_5 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	cvttss2si	-28(%r12), %ecx
	cmpl	%ecx, %esi
	jge	.LBB1_12
# %bb.8:                                #   in Loop: Header=BB1_7 Depth=4
	movss	12(%rbx,%r15,4), %xmm0          # xmm0 = mem[0],zero,zero,zero
	movss	4(%rbx,%r15,4), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movss	8(%rbx,%r15,4), %xmm3           # xmm3 = mem[0],zero,zero,zero
	addss	-20(%r12), %xmm1
	movaps	%xmm4, %xmm7
	subss	%xmm1, %xmm7
	addss	-16(%r12), %xmm3
	movaps	%xmm5, %xmm8
	subss	%xmm3, %xmm8
	addss	-12(%r12), %xmm0
	movaps	%xmm6, %xmm3
	subss	%xmm0, %xmm3
	movaps	%xmm7, %xmm0
	mulss	%xmm7, %xmm0
	movaps	%xmm8, %xmm1
	mulss	%xmm8, %xmm1
	addss	%xmm0, %xmm1
	movaps	%xmm3, %xmm0
	mulss	%xmm3, %xmm0
	addss	%xmm1, %xmm0
	sqrtss	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm2
	jbe	.LBB1_12
# %bb.9:                                #   in Loop: Header=BB1_7 Depth=4
	movss	%xmm3, 100(%rsp)                # 4-byte Spill
	movss	%xmm8, 104(%rsp)                # 4-byte Spill
	movss	%xmm7, 108(%rsp)                # 4-byte Spill
	movss	-24(%r12), %xmm1                # xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, 96(%rsp)                 # 4-byte Spill
	movaps	%xmm0, %xmm2
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	mulss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	.LCPI1_0(%rip), %xmm1           # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, 16(%rsp)                 # 8-byte Spill
	movaps	%xmm2, %xmm0
	mulss	240(%rsp), %xmm0                # 16-byte Folded Reload
	movss	%xmm0, 40(%rsp)                 # 4-byte Spill
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	16(%rsp), %xmm0                 # 8-byte Folded Reload
	movsd	%xmm0, 56(%rsp)                 # 8-byte Spill
	movss	4(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	mulss	12(%rsp), %xmm0                 # 4-byte Folded Reload
	xorps	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm1
	movaps	%xmm1, 112(%rsp)                # 16-byte Spill
	movsd	152(%rsp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	%xmm1, %xmm0
	movapd	%xmm0, 160(%rsp)                # 16-byte Spill
	callq	erfc
	mulsd	56(%rsp), %xmm0                 # 8-byte Folded Reload
	xorps	%xmm2, %xmm2
	cvtss2sd	40(%rsp), %xmm2                 # 4-byte Folded Reload
	movsd	%xmm2, 48(%rsp)                 # 8-byte Spill
	movsd	.LCPI1_2(%rip), %xmm1           # xmm1 = mem[0],zero
	subsd	%xmm2, %xmm1
	mulsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, 56(%rsp)                 # 4-byte Spill
	movss	4(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	mulss	256(%rsp), %xmm0                # 16-byte Folded Reload
	movss	%xmm0, 92(%rsp)                 # 4-byte Spill
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	16(%rsp), %xmm0                 # 8-byte Folded Reload
	movsd	%xmm0, 16(%rsp)                 # 8-byte Spill
	movapd	112(%rsp), %xmm0                # 16-byte Reload
	subsd	152(%rsp), %xmm0                # 8-byte Folded Reload
	movapd	%xmm0, 112(%rsp)                # 16-byte Spill
	callq	erfc
	mulsd	16(%rsp), %xmm0                 # 8-byte Folded Reload
	movsd	48(%rsp), %xmm1                 # 8-byte Reload
                                        # xmm1 = mem[0],zero
	addsd	.LCPI1_2(%rip), %xmm1
	mulsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	ucomiss	.LCPI1_4(%rip), %xmm0
	movss	64(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	jae	.LBB1_11
# %bb.10:                               # %call.sqrt
                                        #   in Loop: Header=BB1_7 Depth=4
	movss	8(%rsp), %xmm0                  # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	sqrtf
.LBB1_11:                               # %.split
                                        #   in Loop: Header=BB1_7 Depth=4
	mulss	4(%rsp), %xmm0                  # 4-byte Folded Reload
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	movsd	%xmm0, 48(%rsp)                 # 8-byte Spill
	movapd	160(%rsp), %xmm2                # 16-byte Reload
	movapd	%xmm2, %xmm0
	movapd	.LCPI1_3(%rip), %xmm1           # xmm1 = [-0.0E+0,-0.0E+0]
	xorpd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	callq	exp
	movsd	%xmm0, 160(%rsp)                # 8-byte Spill
	movss	40(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	160(%rsp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	movapd	112(%rsp), %xmm1                # 16-byte Reload
	movapd	%xmm1, %xmm0
	xorpd	.LCPI1_3(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	callq	exp
	movsd	%xmm0, 112(%rsp)                # 8-byte Spill
	movss	92(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	112(%rsp), %xmm0                # 8-byte Folded Reload
	addsd	40(%rsp), %xmm0                 # 8-byte Folded Reload
	mulsd	48(%rsp), %xmm0                 # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	movss	96(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	mulss	84(%rsp), %xmm1                 # 4-byte Folded Reload
	movss	56(%rsp), %xmm5                 # 4-byte Reload
                                        # xmm5 = mem[0],zero,zero,zero
	addss	16(%rsp), %xmm5                 # 4-byte Folded Reload
	addss	%xmm0, %xmm5
	mulss	%xmm1, %xmm5
	movss	108(%rsp), %xmm2                # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm5, %xmm2
	movss	4(%rsp), %xmm1                  # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm2
	movss	20(%r14,%r13,4), %xmm0          # xmm0 = mem[0],zero,zero,zero
	addss	%xmm2, %xmm0
	movss	%xmm0, 20(%r14,%r13,4)
	movss	104(%rsp), %xmm3                # 4-byte Reload
                                        # xmm3 = mem[0],zero,zero,zero
	mulss	%xmm5, %xmm3
	divss	%xmm1, %xmm3
	movss	24(%r14,%r13,4), %xmm0          # xmm0 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm0
	movss	%xmm0, 24(%r14,%r13,4)
	movss	100(%rsp), %xmm4                # 4-byte Reload
                                        # xmm4 = mem[0],zero,zero,zero
	mulss	%xmm5, %xmm4
	divss	%xmm1, %xmm4
	movss	28(%r14,%r13,4), %xmm0          # xmm0 = mem[0],zero,zero,zero
	addss	%xmm4, %xmm0
	movss	%xmm0, 28(%r14,%r13,4)
	movss	-8(%r12), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	movss	-4(%r12), %xmm1                 # xmm1 = mem[0],zero,zero,zero
	subss	%xmm2, %xmm0
	movss	%xmm0, -8(%r12)
	subss	%xmm3, %xmm1
	movss	%xmm1, -4(%r12)
	movss	(%r12), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	subss	%xmm4, %xmm0
	movss	%xmm0, (%r12)
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	232(%rsp), %rcx                 # 8-byte Reload
	movl	(%rax,%rcx,4), %eax
	movss	68(%rsp), %xmm2                 # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	movl	88(%rsp), %esi                  # 4-byte Reload
	movss	80(%rsp), %xmm4                 # 4-byte Reload
                                        # xmm4 = mem[0],zero,zero,zero
	movss	76(%rsp), %xmm5                 # 4-byte Reload
                                        # xmm5 = mem[0],zero,zero,zero
	movss	72(%rsp), %xmm6                 # 4-byte Reload
                                        # xmm6 = mem[0],zero,zero,zero
.LBB1_12:                               #   in Loop: Header=BB1_7 Depth=4
	incq	%rbp
	movslq	%eax, %rcx
	addq	$32, %r12
	cmpq	%rcx, %rbp
	jl	.LBB1_7
.LBB1_13:                               # %._crit_edge
                                        #   in Loop: Header=BB1_5 Depth=3
	movq	144(%rsp), %rax                 # 8-byte Reload
	incq	%rax
	cmpq	$27, %rax
	jne	.LBB1_5
# %bb.14:                               #   in Loop: Header=BB1_4 Depth=2
	movq	216(%rsp), %rcx                 # 8-byte Reload
	incq	%rcx
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	208(%rsp), %rsi                 # 8-byte Reload
	movslq	(%rax,%rsi,4), %rax
	cmpq	%rax, %rcx
	jl	.LBB1_4
.LBB1_15:                               # %._crit_edge201
                                        #   in Loop: Header=BB1_2 Depth=1
	incq	%rsi
	cmpq	200(%rsp), %rsi                 # 8-byte Folded Reload
	jne	.LBB1_2
.LBB1_16:                               # %._crit_edge203
	addq	$280, %rsp                      # imm = 0x118
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z6updateffffiPiPfiS0_i, .Lfunc_end1-_Z6updateffffiPiPfiS0_i
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI2_0:
	.quad	0x4075b4b0c0000000              # double 347.29315185546875
.LCPI2_1:
	.quad	0x400828d680000000              # double 3.0199403762817383
.LCPI2_6:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI2_9:
	.quad	0x3fb99999a0000000              # double 0.10000000149011612
.LCPI2_10:
	.quad	0x3ff0000000000000              # double 1
.LCPI2_12:
	.quad	0xbfb99999a0000000              # double -0.10000000149011612
.LCPI2_15:
	.quad	0x412e848000000000              # double 1.0E+6
.LCPI2_16:
	.quad	0x408f400000000000              # double 1000
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI2_2:
	.long	0x404146b4                      # float 3.01994038
.LCPI2_3:
	.long	0xc3ada586                      # float -347.293152
.LCPI2_4:
	.long	0x43ada586                      # float 347.293152
.LCPI2_5:
	.long	0x40400000                      # float 3
.LCPI2_7:
	.long	0x3dcccccd                      # float 0.100000001
.LCPI2_8:
	.long	0x3f000000                      # float 0.5
.LCPI2_11:
	.long	0xbdcccccd                      # float -0.100000001
.LCPI2_13:
	.long	0x3fe2dfc5                      # float 1.7724539
.LCPI2_17:
	.long	0x41200000                      # float 10
.LCPI2_18:
	.long	0x4b189676                      # float 9999990
.LCPI2_19:
	.long	0x40490fdb                      # float 3.14159274
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI2_14:
	.quad	0x8000000000000000              # double -0
	.quad	0x8000000000000000              # double -0
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$344, %rsp                      # imm = 0x158
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$80000000, %edi                 # imm = 0x4C4B400
	callq	malloc
	movq	%rax, %r14
	xorl	%ebx, %ebx
.LBB2_1:                                # =>This Inner Loop Header: Depth=1
	movl	$12, %edi
	callq	malloc
	movq	%rax, (%r14,%rbx,8)
	incq	%rbx
	cmpq	$10000000, %rbx                 # imm = 0x989680
	jne	.LBB2_1
# %bb.2:
	movl	$40000000, %edi                 # imm = 0x2625A00
	callq	malloc
	xorl	%ecx, %ecx
.LBB2_3:                                # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%rax,%rcx,4)      # imm = 0x3F800000
	incq	%rcx
	cmpq	$10000000, %rcx                 # imm = 0x989680
	jne	.LBB2_3
# %bb.4:
	movq	%rax, -184(%rbp)                # 8-byte Spill
	movl	$.L.str, %edi
	movl	$.L.str.1, %esi
	callq	fopen
	movq	%rax, %r15
	xorl	%ebx, %ebx
	movq	%r14, -104(%rbp)                # 8-byte Spill
.LBB2_5:                                # %.preheader616
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_6 Depth 2
	movq	(%r14,%rbx,8), %r12
	xorl	%r14d, %r14d
.LBB2_6:                                #   Parent Loop BB2_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$.L.str.2, %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	testl	%eax, %eax
	je	.LBB2_8
# %bb.7:                                #   in Loop: Header=BB2_6 Depth=2
	leaq	1(%r14), %rax
	addq	$4, %r12
	cmpq	$2, %r14
	movq	%rax, %r14
	jb	.LBB2_6
.LBB2_8:                                #   in Loop: Header=BB2_5 Depth=1
	incq	%rbx
	cmpq	$10000000, %rbx                 # imm = 0x989680
	movq	-104(%rbp), %r14                # 8-byte Reload
	jne	.LBB2_5
# %bb.9:
	movq	%r15, %rdi
	callq	fclose
	movsd	.LCPI2_0(%rip), %xmm0           # xmm0 = mem[0],zero
	movl	$.L.str.3, %edi
	movb	$1, %al
	callq	printf
	xorl	%ebx, %ebx
	movl	$.L.str.4, %edi
	movl	$115, %esi
	movl	$115, %edx
	movl	$115, %ecx
	movl	$1520875, %r8d                  # imm = 0x1734EB
	xorl	%eax, %eax
	callq	printf
	movsd	.LCPI2_1(%rip), %xmm0           # xmm0 = mem[0],zero
	movl	$.L.str.5, %edi
	movaps	%xmm0, %xmm1
	movaps	%xmm0, %xmm2
	movb	$3, %al
	callq	printf
	movl	$.L.str.6, %edi
	movl	$37, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%rsp, -256(%rbp)                # 8-byte Spill
	movq	%rsp, %r12
	addq	$-1800716000, %r12              # imm = 0x94AB4120
	movq	%r12, %rsp
	movl	$1800716000, %edi               # imm = 0x6B54BEE0
	callq	malloc
	movq	%rax, %r15
	movl	$-1035468800, %eax              # imm = 0xC2480000
	movl	$1184, %ecx                     # imm = 0x4A0
	movq	%r12, -80(%rbp)                 # 8-byte Spill
	movq	%r12, %rdx
	movq	%r15, %rsi
.LBB2_10:                               # %.preheader615
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_11 Depth 2
	xorl	%edi, %edi
.LBB2_11:                               #   Parent Loop BB2_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%eax, (%rdx,%rdi,4)
	movl	%eax, (%rsi,%rdi,4)
	incq	%rdi
	cmpq	$37, %rdi
	jne	.LBB2_11
# %bb.12:                               #   in Loop: Header=BB2_10 Depth=1
	incq	%rbx
	addq	%rcx, %rsi
	addq	%rcx, %rdx
	cmpq	$1520875, %rbx                  # imm = 0x1734EB
	jne	.LBB2_10
# %bb.13:
	movl	$1, %edi
	movl	$6083500, %esi                  # imm = 0x5CD3AC
	callq	calloc@PLT
	movq	%rax, -56(%rbp)                 # 8-byte Spill
	movl	$.L.str.7, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	xorl	%r14d, %r14d
	movq	%r15, %rbx
.LBB2_14:                               # =>This Inner Loop Header: Depth=1
	movq	-104(%rbp), %rax                # 8-byte Reload
	movq	(%rax,%r14,8), %r15
	movss	(%r15), %xmm1                   # xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -96(%rbp)                # 4-byte Spill
	movss	4(%r15), %xmm0                  # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -44(%rbp)                # 4-byte Spill
	movaps	%xmm1, %xmm0
	movss	.LCPI2_2(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	callq	floorf@PLT
	cvttss2si	%xmm0, %r12d
	movss	-44(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	divss	.LCPI2_2(%rip), %xmm0
	callq	floorf@PLT
	cvttss2si	%xmm0, %r13d
	movss	8(%r15), %xmm0                  # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -64(%rbp)                # 4-byte Spill
	divss	.LCPI2_2(%rip), %xmm0
	callq	floorf@PLT
	cvttss2si	%xmm0, %eax
	imull	$115, %r13d, %ecx
	addl	%r12d, %ecx
	imull	$13225, %eax, %eax              # imm = 0x33A9
	addl	%ecx, %eax
	cltq
	movq	-56(%rbp), %r8                  # 8-byte Reload
	movslq	(%r8,%rax,4), %rsi
	leaq	(,%rsi,8), %rcx
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	imulq	$1184, %rax, %rdx               # imm = 0x4A0
	addq	-80(%rbp), %rdx                 # 8-byte Folded Reload
	leal	1(%rsi), %edi
	shlq	$5, %rsi
	movss	%xmm0, (%rsi,%rdx)
	movq	-184(%rbp), %rsi                # 8-byte Reload
	movss	(%rsi,%r14,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	leal	1(%rcx), %esi
	movslq	%esi, %rsi
	movss	%xmm1, (%rdx,%rsi,4)
	leal	2(%rcx), %esi
	movslq	%esi, %rsi
	movss	-96(%rbp), %xmm3                # 4-byte Reload
                                        # xmm3 = mem[0],zero,zero,zero
	movss	%xmm3, (%rdx,%rsi,4)
	leal	3(%rcx), %esi
	movslq	%esi, %rsi
	movss	-44(%rbp), %xmm2                # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	movss	%xmm2, (%rdx,%rsi,4)
	leal	4(%rcx), %esi
	movslq	%esi, %rsi
	movss	-64(%rbp), %xmm4                # 4-byte Reload
                                        # xmm4 = mem[0],zero,zero,zero
	movss	%xmm4, (%rdx,%rsi,4)
	leal	5(%rcx), %esi
	movslq	%esi, %rsi
	xorl	%r9d, %r9d
	movl	%r9d, (%rdx,%rsi,4)
	leal	6(%rcx), %esi
	movslq	%esi, %rsi
	movl	%r9d, (%rdx,%rsi,4)
	leal	7(%rcx), %esi
	movslq	%esi, %rsi
	movl	%r9d, (%rdx,%rsi,4)
	imull	$296, %eax, %edx                # imm = 0x128
	leal	(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movss	%xmm0, (%rbx,%rsi,4)
	leal	(%rdx,%rcx), %esi
	incl	%esi
	movslq	%esi, %rsi
	movss	%xmm1, (%rbx,%rsi,4)
	leal	2(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movss	%xmm3, (%rbx,%rsi,4)
	leal	3(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movss	%xmm2, (%rbx,%rsi,4)
	leal	4(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movss	%xmm4, (%rbx,%rsi,4)
	leal	5(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movl	%r9d, (%rbx,%rsi,4)
	leal	6(%rdx,%rcx), %esi
	movslq	%esi, %rsi
	movl	%r9d, (%rbx,%rsi,4)
	leal	7(%rdx,%rcx), %ecx
	movslq	%ecx, %rcx
	movl	%r9d, (%rbx,%rcx,4)
	movl	%edi, (%r8,%rax,4)
	incq	%r14
	cmpq	$10000000, %r14                 # imm = 0x989680
	jne	.LBB2_14
# %bb.15:
	movq	%rbx, -248(%rbp)                # 8-byte Spill
	movq	-56(%rbp), %rax                 # 8-byte Reload
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movl	$.L.str.8, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$.Lstr, %edi
	callq	puts@PLT
	movq	%rsp, %rbx
	leaq	-657018000(%rbx), %rax
	movq	%rax, -264(%rbp)                # 8-byte Spill
	movq	%rax, %rsp
	movl	$657018000, %edi                # imm = 0x27294C90
	callq	malloc
	addq	$-657017988, %rbx               # imm = 0xD8D6B37C
	movss	.LCPI2_3(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI2_4(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movq	%rax, -176(%rbp)                # 8-byte Spill
	movq	%rax, %rdx
	xorl	%r15d, %r15d
.LBB2_16:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_17 Depth 2
                                        #       Child Loop BB2_23 Depth 3
                                        #         Child Loop BB2_29 Depth 4
	movl	%r15d, %eax
	imulq	$1025920733, %rax, %rax         # imm = 0x3D264EDD
	shrq	$32, %rax
	movl	%r15d, %ecx
	subl	%eax, %ecx
	shrl	%ecx
	addl	%eax, %ecx
	shrl	$13, %ecx
	imull	$13225, %ecx, %ecx              # imm = 0x33A9
	movl	%r15d, %eax
	subl	%ecx, %eax
	movl	$65535, %r11d                   # imm = 0xFFFF
	andl	%r11d, %eax
	imulq	$37347542, %rax, %rax           # imm = 0x239E0D6
	shrq	$32, %rax
	imull	$115, %eax, %r12d
	movl	%r14d, %eax
	imulq	$1025920733, %rax, %rax         # imm = 0x3D264EDD
	shrq	$32, %rax
	movl	%r14d, %r8d
	subl	%eax, %r8d
	shrl	%r8d
	addl	%eax, %r8d
	shrl	$13, %r8d
	imull	$13225, %r8d, %eax              # imm = 0x33A9
	movl	%r15d, %esi
	subl	%eax, %esi
	movl	%esi, %edi
	andl	%r11d, %edi
	imull	$7409, %edi, %edi               # imm = 0x1CF1
	shrl	$16, %edi
	subl	%edi, %esi
	andl	%r11d, %esi
	shrl	%esi
	addl	%edi, %esi
	shrl	$6, %esi
	leal	2(%rsi), %r9d
	movq	%r14, -96(%rbp)                 # 8-byte Spill
	movl	%r14d, %r10d
	subl	%eax, %r10d
	imull	$18237, %r10d, %eax             # imm = 0x473D
	shrl	$21, %eax
	imull	$115, %eax, %edi
	subl	%edi, %r10d
	andl	%r11d, %r10d
	leal	-1(%r8), %r14d
	decl	%eax
	decl	%r10d
	incl	%r8d
	addl	$-115, %r12d
	movl	%r12d, -44(%rbp)                # 4-byte Spill
	imull	$115, %esi, %esi
	movl	%r15d, -64(%rbp)                # 4-byte Spill
	movl	%r15d, %edi
	subl	%esi, %edi
	subl	%ecx, %edi
	andl	%r11d, %edi
	movl	$-3, %r15d
	subl	%edi, %r15d
	xorl	%r12d, %r12d
.LBB2_17:                               #   Parent Loop BB2_16 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB2_23 Depth 3
                                        #         Child Loop BB2_29 Depth 4
	testl	%r14d, %r14d
	js	.LBB2_18
# %bb.19:                               #   in Loop: Header=BB2_17 Depth=2
	cmpl	$115, %r14d
	jae	.LBB2_21
# %bb.20:                               #   in Loop: Header=BB2_17 Depth=2
	xorl	%ecx, %ecx
	xorps	%xmm2, %xmm2
	jmp	.LBB2_22
.LBB2_18:                               #   in Loop: Header=BB2_17 Depth=2
	movl	$115, %ecx
	movaps	%xmm0, %xmm2
	jmp	.LBB2_22
.LBB2_21:                               #   in Loop: Header=BB2_17 Depth=2
	movl	$-115, %ecx
	movaps	%xmm1, %xmm2
.LBB2_22:                               #   in Loop: Header=BB2_17 Depth=2
	addl	%r14d, %ecx
	imull	$13225, %ecx, %ecx              # imm = 0x33A9
	addl	-44(%rbp), %ecx                 # 4-byte Folded Reload
	movl	%eax, %r11d
.LBB2_23:                               #   Parent Loop BB2_16 Depth=1
                                        #     Parent Loop BB2_17 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB2_29 Depth 4
	testl	%r11d, %r11d
	js	.LBB2_24
# %bb.25:                               #   in Loop: Header=BB2_23 Depth=3
	cmpl	$115, %r11d
	jae	.LBB2_27
# %bb.26:                               #   in Loop: Header=BB2_23 Depth=3
	xorl	%esi, %esi
	xorps	%xmm3, %xmm3
	jmp	.LBB2_28
.LBB2_24:                               #   in Loop: Header=BB2_23 Depth=3
	movl	$115, %esi
	movaps	%xmm0, %xmm3
	jmp	.LBB2_28
.LBB2_27:                               #   in Loop: Header=BB2_23 Depth=3
	movl	$-115, %esi
	movaps	%xmm1, %xmm3
.LBB2_28:                               #   in Loop: Header=BB2_23 Depth=3
	movslq	%r12d, %r12
	imull	$115, %esi, %r13d
	addl	%ecx, %r13d
	movl	%r10d, %esi
.LBB2_29:                               #   Parent Loop BB2_16 Depth=1
                                        #     Parent Loop BB2_17 Depth=2
                                        #       Parent Loop BB2_23 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	testl	%esi, %esi
	js	.LBB2_30
# %bb.31:                               #   in Loop: Header=BB2_29 Depth=4
	cmpl	$115, %esi
	jae	.LBB2_33
# %bb.32:                               #   in Loop: Header=BB2_29 Depth=4
	xorl	%edi, %edi
	xorps	%xmm4, %xmm4
	jmp	.LBB2_34
.LBB2_30:                               #   in Loop: Header=BB2_29 Depth=4
	movl	$115, %edi
	movaps	%xmm0, %xmm4
	jmp	.LBB2_34
.LBB2_33:                               #   in Loop: Header=BB2_29 Depth=4
	movl	$-115, %edi
	movaps	%xmm1, %xmm4
.LBB2_34:                               #   in Loop: Header=BB2_29 Depth=4
	addl	%esi, %edi
	addl	%r13d, %edi
	xorps	%xmm5, %xmm5
	cvtsi2ss	%edi, %xmm5
	movss	%xmm5, -12(%rbx,%r12,4)
	movss	%xmm4, -8(%rbx,%r12,4)
	movss	%xmm3, -4(%rbx,%r12,4)
	movss	%xmm2, (%rbx,%r12,4)
	movss	%xmm5, (%rdx,%r12,4)
	movss	%xmm4, 4(%rdx,%r12,4)
	movss	%xmm3, 8(%rdx,%r12,4)
	movss	%xmm2, 12(%rdx,%r12,4)
	addq	$4, %r12
	leal	(%r15,%rsi), %edi
	incl	%edi
                                        # kill: def $esi killed $esi killed $rsi
	incl	%esi
                                        # kill: def $esi killed $esi def $rsi
	cmpl	$-1, %edi
	jne	.LBB2_29
# %bb.35:                               #   in Loop: Header=BB2_23 Depth=3
	incl	%r11d
	addl	$115, %ecx
	cmpl	%r9d, %r11d
	jne	.LBB2_23
# %bb.36:                               #   in Loop: Header=BB2_17 Depth=2
	leal	1(%r14), %ecx
	cmpl	%r8d, %r14d
	movl	%ecx, %r14d
	jne	.LBB2_17
# %bb.37:                               #   in Loop: Header=BB2_16 Depth=1
	movq	-96(%rbp), %r14                 # 8-byte Reload
	incq	%r14
	movl	-64(%rbp), %r15d                # 4-byte Reload
	incl	%r15d
	movl	$432, %eax                      # imm = 0x1B0
	addq	%rax, %rdx
	addq	%rax, %rbx
	cmpq	$1520875, %r14                  # imm = 0x1734EB
	jne	.LBB2_16
# %bb.38:                               # %.preheader614.preheader
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	leaq	-336(%rbp), %rsi
	movl	$1, %edi
	callq	clock_gettime
	movq	-80(%rbp), %rax                 # 8-byte Reload
	addq	$16, %rax
	movq	%rax, -288(%rbp)                # 8-byte Spill
	xorl	%eax, %eax
	movss	.LCPI2_5(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	movq	-56(%rbp), %r15                 # 8-byte Reload
.LBB2_39:                               # %.preheader613
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_41 Depth 2
                                        #       Child Loop BB2_42 Depth 3
                                        #         Child Loop BB2_44 Depth 4
	movq	%rax, -192(%rbp)                # 8-byte Spill
	movl	(%r15,%rax,4), %eax
	movq	%rax, -272(%rbp)                # 8-byte Spill
	testl	%eax, %eax
	jle	.LBB2_50
# %bb.40:                               # %.lr.ph635
                                        #   in Loop: Header=BB2_39 Depth=1
	movq	-192(%rbp), %rax                # 8-byte Reload
	imulq	$1184, %rax, %r14               # imm = 0x4A0
	addq	-80(%rbp), %r14                 # 8-byte Folded Reload
	imulq	$432, %rax, %rax                # imm = 0x1B0
	addq	-264(%rbp), %rax                # 8-byte Folded Reload
	movq	%rax, -200(%rbp)                # 8-byte Spill
	xorl	%ecx, %ecx
.LBB2_41:                               #   Parent Loop BB2_39 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB2_42 Depth 3
                                        #         Child Loop BB2_44 Depth 4
	movq	%rcx, %rax
	shlq	$5, %rax
	cvttss2si	(%r14,%rax), %esi
	movss	4(%r14,%rax), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -144(%rbp)               # 4-byte Spill
	movss	8(%r14,%rax), %xmm4             # xmm4 = mem[0],zero,zero,zero
	movss	12(%r14,%rax), %xmm5            # xmm5 = mem[0],zero,zero,zero
	movss	16(%r14,%rax), %xmm6            # xmm6 = mem[0],zero,zero,zero
	leaq	5(,%rcx,8), %rax
	movq	%rax, -312(%rbp)                # 8-byte Spill
	leaq	6(,%rcx,8), %rax
	movq	%rax, -304(%rbp)                # 8-byte Spill
	movq	%rcx, -280(%rbp)                # 8-byte Spill
	leaq	7(,%rcx,8), %rax
	movq	%rax, -296(%rbp)                # 8-byte Spill
	xorl	%eax, %eax
	movl	%esi, -148(%rbp)                # 4-byte Spill
	movss	%xmm4, -140(%rbp)               # 4-byte Spill
	movss	%xmm5, -136(%rbp)               # 4-byte Spill
	movss	%xmm6, -132(%rbp)               # 4-byte Spill
.LBB2_42:                               #   Parent Loop BB2_39 Depth=1
                                        #     Parent Loop BB2_41 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB2_44 Depth 4
	movq	%rax, %rcx
	movq	%rax, -208(%rbp)                # 8-byte Spill
	shlq	$4, %rax
	movq	-200(%rbp), %rcx                # 8-byte Reload
	cvttss2si	(%rax,%rcx), %eax
	cltq
	movl	(%r15,%rax,4), %r15d
	testl	%r15d, %r15d
	jle	.LBB2_48
# %bb.43:                               # %.lr.ph
                                        #   in Loop: Header=BB2_42 Depth=3
	movq	-208(%rbp), %rcx                # 8-byte Reload
	leaq	(,%rcx,4), %rcx
	movq	-200(%rbp), %rdx                # 8-byte Reload
	leaq	(%rdx,%rcx,4), %rbx
	addq	$12, %rbx
	imulq	$1184, %rax, %r13               # imm = 0x4A0
	addq	-288(%rbp), %r13                # 8-byte Folded Reload
	xorl	%r12d, %r12d
.LBB2_44:                               #   Parent Loop BB2_39 Depth=1
                                        #     Parent Loop BB2_41 Depth=2
                                        #       Parent Loop BB2_42 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	cvttss2si	-16(%r13), %eax
	cmpl	%eax, %esi
	je	.LBB2_47
# %bb.45:                               #   in Loop: Header=BB2_44 Depth=4
	movss	(%rbx), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	-4(%rbx), %xmm1                 # xmm1 = mem[0],zero,zero,zero
	movss	-8(%rbx), %xmm2                 # xmm2 = mem[0],zero,zero,zero
	addss	-8(%r13), %xmm2
	movaps	%xmm4, %xmm8
	subss	%xmm2, %xmm8
	addss	-4(%r13), %xmm1
	movaps	%xmm5, %xmm7
	subss	%xmm1, %xmm7
	addss	(%r13), %xmm0
	movaps	%xmm6, %xmm2
	subss	%xmm0, %xmm2
	movaps	%xmm8, %xmm0
	mulss	%xmm8, %xmm0
	movaps	%xmm7, %xmm1
	mulss	%xmm7, %xmm1
	addss	%xmm0, %xmm1
	movaps	%xmm2, %xmm0
	mulss	%xmm2, %xmm0
	addss	%xmm1, %xmm0
	sqrtss	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm3
	jbe	.LBB2_47
# %bb.46:                               #   in Loop: Header=BB2_44 Depth=4
	movss	-12(%r13), %xmm1                # xmm1 = mem[0],zero,zero,zero
	mulss	-144(%rbp), %xmm1               # 4-byte Folded Reload
	movss	%xmm1, -160(%rbp)               # 4-byte Spill
	movaps	%xmm0, %xmm3
	movss	%xmm0, -44(%rbp)                # 4-byte Spill
	mulss	%xmm0, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movsd	.LCPI2_6(%rip), %xmm1           # xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	movsd	%xmm1, -72(%rbp)                # 8-byte Spill
	movaps	%xmm3, %xmm0
	mulss	.LCPI2_7(%rip), %xmm0
	movss	%xmm0, -64(%rbp)                # 4-byte Spill
	movss	%xmm2, -164(%rbp)               # 4-byte Spill
	movss	%xmm7, -156(%rbp)               # 4-byte Spill
	movss	%xmm8, -152(%rbp)               # 4-byte Spill
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	-72(%rbp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, -120(%rbp)               # 8-byte Spill
	movss	-44(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI2_8(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)                # 16-byte Spill
	addsd	.LCPI2_9(%rip), %xmm0
	movapd	%xmm0, -240(%rbp)               # 16-byte Spill
	callq	erfc
	mulsd	-120(%rbp), %xmm0               # 8-byte Folded Reload
	xorps	%xmm2, %xmm2
	cvtss2sd	-64(%rbp), %xmm2                # 4-byte Folded Reload
	movsd	%xmm2, -320(%rbp)               # 8-byte Spill
	movsd	.LCPI2_10(%rip), %xmm1          # xmm1 = mem[0],zero
	subsd	%xmm2, %xmm1
	mulsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movss	%xmm0, -112(%rbp)               # 4-byte Spill
	movss	-44(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	mulss	.LCPI2_11(%rip), %xmm0
	movss	%xmm0, -120(%rbp)               # 4-byte Spill
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	-72(%rbp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, -72(%rbp)                # 8-byte Spill
	movapd	-96(%rbp), %xmm0                # 16-byte Reload
	addsd	.LCPI2_12(%rip), %xmm0
	movapd	%xmm0, -96(%rbp)                # 16-byte Spill
	callq	erfc
	mulsd	-72(%rbp), %xmm0                # 8-byte Folded Reload
	movsd	-320(%rbp), %xmm1               # 8-byte Reload
                                        # xmm1 = mem[0],zero
	addsd	.LCPI2_10(%rip), %xmm1
	mulsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	addss	-112(%rbp), %xmm0               # 4-byte Folded Reload
	movss	%xmm0, -72(%rbp)                # 4-byte Spill
	movss	-44(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	mulss	.LCPI2_13(%rip), %xmm0
	movss	.LCPI2_8(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	movsd	%xmm0, -112(%rbp)               # 8-byte Spill
	movapd	-240(%rbp), %xmm2               # 16-byte Reload
	movapd	%xmm2, %xmm0
	movapd	.LCPI2_14(%rip), %xmm1          # xmm1 = [-0.0E+0,-0.0E+0]
	xorpd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	callq	exp
	movsd	%xmm0, -240(%rbp)               # 8-byte Spill
	movss	-64(%rbp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	expf
	cvtss2sd	%xmm0, %xmm0
	mulsd	-240(%rbp), %xmm0               # 8-byte Folded Reload
	movsd	%xmm0, -64(%rbp)                # 8-byte Spill
	movapd	-96(%rbp), %xmm1                # 16-byte Reload
	movapd	%xmm1, %xmm0
	xorpd	.LCPI2_14(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	callq	exp
	movsd	%xmm0, -96(%rbp)                # 8-byte Spill
	movss	-120(%rbp), %xmm0               # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	callq	expf
	movss	-132(%rbp), %xmm6               # 4-byte Reload
                                        # xmm6 = mem[0],zero,zero,zero
	movss	-136(%rbp), %xmm5               # 4-byte Reload
                                        # xmm5 = mem[0],zero,zero,zero
	movss	-140(%rbp), %xmm4               # 4-byte Reload
                                        # xmm4 = mem[0],zero,zero,zero
	movl	-148(%rbp), %esi                # 4-byte Reload
	movss	.LCPI2_5(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	mulsd	-96(%rbp), %xmm0                # 8-byte Folded Reload
	addsd	-64(%rbp), %xmm0                # 8-byte Folded Reload
	mulsd	-112(%rbp), %xmm0               # 8-byte Folded Reload
	cvtsd2ss	%xmm0, %xmm0
	addss	-72(%rbp), %xmm0                # 4-byte Folded Reload
	mulss	-160(%rbp), %xmm0               # 4-byte Folded Reload
	movss	-152(%rbp), %xmm2               # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	movss	-44(%rbp), %xmm1                # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm2
	movq	-312(%rbp), %rax                # 8-byte Reload
	addss	(%r14,%rax,4), %xmm2
	movss	%xmm2, (%r14,%rax,4)
	movss	-156(%rbp), %xmm2               # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	divss	%xmm1, %xmm2
	movq	-304(%rbp), %rax                # 8-byte Reload
	addss	(%r14,%rax,4), %xmm2
	movss	%xmm2, (%r14,%rax,4)
	movss	-164(%rbp), %xmm2               # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm2
	divss	%xmm1, %xmm2
	movq	-296(%rbp), %rax                # 8-byte Reload
	addss	(%r14,%rax,4), %xmm2
	movss	%xmm2, (%r14,%rax,4)
.LBB2_47:                               #   in Loop: Header=BB2_44 Depth=4
	incq	%r12
	addq	$32, %r13
	cmpq	%r15, %r12
	jb	.LBB2_44
.LBB2_48:                               # %._crit_edge
                                        #   in Loop: Header=BB2_42 Depth=3
	movq	-208(%rbp), %rax                # 8-byte Reload
	incq	%rax
	cmpq	$27, %rax
	movq	-56(%rbp), %r15                 # 8-byte Reload
	jne	.LBB2_42
# %bb.49:                               #   in Loop: Header=BB2_41 Depth=2
	movq	-280(%rbp), %rcx                # 8-byte Reload
	incq	%rcx
	cmpq	-272(%rbp), %rcx                # 8-byte Folded Reload
	jb	.LBB2_41
.LBB2_50:                               # %._crit_edge636
                                        #   in Loop: Header=BB2_39 Depth=1
	movq	-192(%rbp), %rax                # 8-byte Reload
	incq	%rax
	cmpq	$1520875, %rax                  # imm = 0x1734EB
	jne	.LBB2_39
# %bb.51:
	leaq	-368(%rbp), %r13
	movl	$1, %edi
	movq	%r13, %rsi
	callq	clock_gettime
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	subq	-336(%rbp), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	.LCPI2_15(%rip), %xmm0
	subq	-328(%rbp), %rcx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rcx, %xmm1
	divsd	.LCPI2_16(%rip), %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.11, %edi
	movb	$1, %al
	callq	printf
	xorl	%r13d, %r13d
	movl	$.L.str.12, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	printf
	movq	-80(%rbp), %rax                 # 8-byte Reload
	leaq	28(%rax), %rbx
.LBB2_52:                               # %.preheader612
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_54 Depth 2
	movl	(%r15,%r13,4), %r14d
	testl	%r14d, %r14d
	jle	.LBB2_57
# %bb.53:                               # %.lr.ph639
                                        #   in Loop: Header=BB2_52 Depth=1
	movq	%rbx, %r15
	xorl	%r12d, %r12d
.LBB2_54:                               #   Parent Loop BB2_52 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	-28(%r15), %xmm0                # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI2_17(%rip), %xmm1          # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	.LBB2_56
# %bb.55:                               #   in Loop: Header=BB2_54 Depth=2
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	-24(%r15), %xmm1
	xorps	%xmm2, %xmm2
	cvtss2sd	-20(%r15), %xmm2
	xorps	%xmm3, %xmm3
	cvtss2sd	-16(%r15), %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	-12(%r15), %xmm4
	xorps	%xmm5, %xmm5
	cvtss2sd	-8(%r15), %xmm5
	xorps	%xmm6, %xmm6
	cvtss2sd	-4(%r15), %xmm6
	xorps	%xmm7, %xmm7
	cvtss2sd	(%r15), %xmm7
	movl	$.L.str.13, %edi
	movl	%r13d, %esi
	movb	$8, %al
	callq	printf
.LBB2_56:                               #   in Loop: Header=BB2_54 Depth=2
	incq	%r12
	addq	$32, %r15
	cmpq	%r14, %r12
	jb	.LBB2_54
.LBB2_57:                               # %._crit_edge640
                                        #   in Loop: Header=BB2_52 Depth=1
	incq	%r13
	addq	$1184, %rbx                     # imm = 0x4A0
	cmpq	$1520875, %r13                  # imm = 0x1734EB
	movq	-56(%rbp), %r15                 # 8-byte Reload
	jne	.LBB2_52
# %bb.58:
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movq	-80(%rbp), %r12                 # 8-byte Reload
	addq	$28, %r12
	xorl	%r13d, %r13d
.LBB2_59:                               # %.preheader611
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_61 Depth 2
	movl	(%r15,%r13,4), %ebx
	testl	%ebx, %ebx
	jle	.LBB2_64
# %bb.60:                               # %.lr.ph643
                                        #   in Loop: Header=BB2_59 Depth=1
	movq	%r12, %r14
	xorl	%r15d, %r15d
.LBB2_61:                               #   Parent Loop BB2_59 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	-28(%r14), %xmm0                # xmm0 = mem[0],zero,zero,zero
	ucomiss	.LCPI2_18(%rip), %xmm0
	jbe	.LBB2_63
# %bb.62:                               #   in Loop: Header=BB2_61 Depth=2
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	-24(%r14), %xmm1
	xorps	%xmm2, %xmm2
	cvtss2sd	-20(%r14), %xmm2
	xorps	%xmm3, %xmm3
	cvtss2sd	-16(%r14), %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	-12(%r14), %xmm4
	xorps	%xmm5, %xmm5
	cvtss2sd	-8(%r14), %xmm5
	xorps	%xmm6, %xmm6
	cvtss2sd	-4(%r14), %xmm6
	xorps	%xmm7, %xmm7
	cvtss2sd	(%r14), %xmm7
	movl	$.L.str.13, %edi
	movl	%r13d, %esi
	movb	$8, %al
	callq	printf
.LBB2_63:                               #   in Loop: Header=BB2_61 Depth=2
	incq	%r15
	addq	$32, %r14
	cmpq	%rbx, %r15
	jb	.LBB2_61
.LBB2_64:                               # %._crit_edge644
                                        #   in Loop: Header=BB2_59 Depth=1
	incq	%r13
	addq	$1184, %r12                     # imm = 0x4A0
	cmpq	$1520875, %r13                  # imm = 0x1734EB
	movq	-56(%rbp), %r15                 # 8-byte Reload
	jne	.LBB2_59
# %bb.65:
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	leaq	-352(%rbp), %rsi
	movl	$1, %edi
	callq	clock_gettime
	leaq	-216(%rbp), %r13
	movl	$6083500, %esi                  # imm = 0x5CD3AC
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	-128(%rbp), %r14
	movl	$1800716000, %esi               # imm = 0x6B54BEE0
	movq	%r14, %rdi
	callq	hipMalloc
	leaq	-224(%rbp), %rbx
	movl	$657018000, %esi                # imm = 0x27294C90
	movq	%rbx, %rdi
	callq	hipMalloc
	movq	(%r13), %rdi
	movl	$6083500, %edx                  # imm = 0x5CD3AC
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r14), %rdi
	movl	$1800716000, %edx               # imm = 0x6B54BEE0
	movq	-248(%rbp), %r12                # 8-byte Reload
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbx), %rdi
	movl	$657018000, %edx                # imm = 0x27294C90
	movq	-176(%rbp), %rsi                # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$12760347836928, %rdi           # imm = 0xB9B00000200
	movabsq	$4294967360, %rdx               # imm = 0x100000040
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB2_67
# %bb.66:
	movq	-216(%rbp), %rsi
	movq	-128(%rbp), %rdx
	movq	-224(%rbp), %r8
	movss	.LCPI2_7(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI2_8(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movss	.LCPI2_5(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	movss	.LCPI2_19(%rip), %xmm3          # xmm3 = mem[0],zero,zero,zero
	movl	$1520875, %edi                  # imm = 0x1734EB
	movl	$296, %ecx                      # imm = 0x128
	movl	$108, %r9d
	callq	_Z27__device_stub__updateKernelffffiPiPfiS0_i
.LBB2_67:
	callq	hipDeviceSynchronize
	movq	-128(%rbp), %rsi
	movl	$1800716000, %edx               # imm = 0x6B54BEE0
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	leaq	-384(%rbp), %r13
	movl	$1, %edi
	movq	%r13, %rsi
	callq	clock_gettime
	movq	(%r13), %rax
	movq	8(%r13), %rcx
	subq	-352(%rbp), %rax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	.LCPI2_15(%rip), %xmm0
	subq	-344(%rbp), %rcx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rcx, %xmm1
	divsd	.LCPI2_16(%rip), %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.11, %edi
	movb	$1, %al
	callq	printf
	leaq	28(%r12), %rbx
	xorl	%r13d, %r13d
.LBB2_68:                               # %.preheader610
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_70 Depth 2
	movl	(%r15,%r13,4), %eax
	testl	%eax, %eax
	jle	.LBB2_73
# %bb.69:                               # %.lr.ph647
                                        #   in Loop: Header=BB2_68 Depth=1
	movq	%rbx, %r14
	xorl	%r15d, %r15d
.LBB2_70:                               #   Parent Loop BB2_68 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	-28(%r14), %xmm0                # xmm0 = mem[0],zero,zero,zero
	movss	.LCPI2_17(%rip), %xmm1          # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	.LBB2_72
# %bb.71:                               #   in Loop: Header=BB2_70 Depth=2
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	-24(%r14), %xmm1
	xorps	%xmm2, %xmm2
	cvtss2sd	-20(%r14), %xmm2
	xorps	%xmm3, %xmm3
	cvtss2sd	-16(%r14), %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	-12(%r14), %xmm4
	xorps	%xmm5, %xmm5
	cvtss2sd	-8(%r14), %xmm5
	xorps	%xmm6, %xmm6
	cvtss2sd	-4(%r14), %xmm6
	xorps	%xmm7, %xmm7
	cvtss2sd	(%r14), %xmm7
	movl	$.L.str.13, %edi
	movl	%r13d, %esi
	movb	$8, %al
	callq	printf
	movq	-56(%rbp), %rax                 # 8-byte Reload
	movl	(%rax,%r13,4), %eax
.LBB2_72:                               #   in Loop: Header=BB2_70 Depth=2
	incq	%r15
	movslq	%eax, %rcx
	addq	$32, %r14
	cmpq	%rcx, %r15
	jl	.LBB2_70
.LBB2_73:                               # %._crit_edge648
                                        #   in Loop: Header=BB2_68 Depth=1
	incq	%r13
	addq	$1184, %rbx                     # imm = 0x4A0
	cmpq	$1520875, %r13                  # imm = 0x1734EB
	movq	-56(%rbp), %r15                 # 8-byte Reload
	jne	.LBB2_68
# %bb.74:
	movl	$.Lstr.4, %edi
	callq	puts@PLT
	movq	%r12, %rbx
	addq	$28, %rbx
	xorl	%r13d, %r13d
.LBB2_75:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_77 Depth 2
	movl	(%r15,%r13,4), %eax
	testl	%eax, %eax
	jle	.LBB2_80
# %bb.76:                               # %.lr.ph651
                                        #   in Loop: Header=BB2_75 Depth=1
	movq	%rbx, %r14
	xorl	%r15d, %r15d
.LBB2_77:                               #   Parent Loop BB2_75 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	-28(%r14), %xmm0                # xmm0 = mem[0],zero,zero,zero
	ucomiss	.LCPI2_18(%rip), %xmm0
	jbe	.LBB2_79
# %bb.78:                               #   in Loop: Header=BB2_77 Depth=2
	cvtss2sd	%xmm0, %xmm0
	xorps	%xmm1, %xmm1
	cvtss2sd	-24(%r14), %xmm1
	xorps	%xmm2, %xmm2
	cvtss2sd	-20(%r14), %xmm2
	xorps	%xmm3, %xmm3
	cvtss2sd	-16(%r14), %xmm3
	xorps	%xmm4, %xmm4
	cvtss2sd	-12(%r14), %xmm4
	xorps	%xmm5, %xmm5
	cvtss2sd	-8(%r14), %xmm5
	xorps	%xmm6, %xmm6
	cvtss2sd	-4(%r14), %xmm6
	xorps	%xmm7, %xmm7
	cvtss2sd	(%r14), %xmm7
	movl	$.L.str.13, %edi
	movl	%r13d, %esi
	movb	$8, %al
	callq	printf
	movq	-56(%rbp), %rax                 # 8-byte Reload
	movl	(%rax,%r13,4), %eax
.LBB2_79:                               #   in Loop: Header=BB2_77 Depth=2
	incq	%r15
	movslq	%eax, %rcx
	addq	$32, %r14
	cmpq	%rcx, %r15
	jl	.LBB2_77
.LBB2_80:                               # %._crit_edge652
                                        #   in Loop: Header=BB2_75 Depth=1
	incq	%r13
	addq	$1184, %rbx                     # imm = 0x4A0
	cmpq	$1520875, %r13                  # imm = 0x1734EB
	movq	-56(%rbp), %r15                 # 8-byte Reload
	jne	.LBB2_75
# %bb.81:
	movq	-128(%rbp), %rdi
	callq	hipFree
	movq	-224(%rbp), %rdi
	callq	hipFree
	movq	-216(%rbp), %rdi
	callq	hipFree
	movq	-104(%rbp), %rdi                # 8-byte Reload
	callq	free
	movq	-184(%rbp), %rdi                # 8-byte Reload
	callq	free
	movq	%r15, %rdi
	callq	free
	movq	%r12, %rdi
	callq	free
	movq	-176(%rbp), %rdi                # 8-byte Reload
	callq	free
	movq	-256(%rbp), %rsp                # 8-byte Reload
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.Lfunc_end2:
	.size	main, .Lfunc_end2-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB3_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB3_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12updateKernelffffiPiPfiS0_i, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end3:
	.size	__hip_module_ctor, .Lfunc_end3-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB4_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB4_2:
	retq
.Lfunc_end4:
	.size	__hip_module_dtor, .Lfunc_end4-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z12updateKernelffffiPiPfiS0_i,@object # @_Z12updateKernelffffiPiPfiS0_i
	.section	.rodata,"a",@progbits
	.globl	_Z12updateKernelffffiPiPfiS0_i
	.p2align	3, 0x0
_Z12updateKernelffffiPiPfiS0_i:
	.quad	_Z27__device_stub__updateKernelffffiPiPfiS0_i
	.size	_Z12updateKernelffffiPiPfiS0_i, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"pos_1e7.txt"
	.size	.L.str, 12

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"r"
	.size	.L.str.1, 2

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%f"
	.size	.L.str.2, 3

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"L = %f\n"
	.size	.L.str.3, 8

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"%d %d %d %d\n"
	.size	.L.str.4, 13

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"%f %f %f\n"
	.size	.L.str.5, 10

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"%d\n"
	.size	.L.str.6, 4

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"bin_count[1] = %d\n"
	.size	.L.str.7, 19

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"bin_count[%d] = %d\n"
	.size	.L.str.8, 20

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"elapsed time = %lf micro-seconds\n"
	.size	.L.str.11, 34

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"no. of particles for c = 0, ip = 0: %d\n"
	.size	.L.str.12, 40

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"c = %d, ipart = %f, Z = %f, x = %f, y = %f, z = %f, ax = %f, ay = %f, az = %f\n"
	.size	.L.str.13, 79

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z12updateKernelffffiPiPfiS0_i"
	.size	.L__unnamed_1, 31

	.type	__hip_fatbin_wrapper,@object    # @__hip_fatbin_wrapper
	.section	.hipFatBinSegment,"a",@progbits
	.p2align	3, 0x0
__hip_fatbin_wrapper:
	.long	1212764230                      # 0x48495046
	.long	1                               # 0x1
	.quad	__hip_fatbin
	.quad	0
	.size	__hip_fatbin_wrapper, 24

	.type	__hip_gpubin_handle,@object     # @__hip_gpubin_handle
	.local	__hip_gpubin_handle
	.comm	__hip_gpubin_handle,8,8
	.section	.init_array,"aw",@init_array
	.p2align	3, 0x0
	.quad	__hip_module_ctor
	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"-------"
	.size	.Lstr, 8

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"-----------"
	.size	.Lstr.1, 12

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"-------------------"
	.size	.Lstr.2, 20

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"-------------"
	.size	.Lstr.3, 14

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"----------------"
	.size	.Lstr.4, 17

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z27__device_stub__updateKernelffffiPiPfiS0_i
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z12updateKernelffffiPiPfiS0_i
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z12updateKernelffffiPiPfiS0_i ; -- Begin function _Z12updateKernelffffiPiPfiS0_i
	.globl	_Z12updateKernelffffiPiPfiS0_i
	.p2align	8
	.type	_Z12updateKernelffffiPiPfiS0_i,@function
_Z12updateKernelffffiPiPfiS0_i:         ; @_Z12updateKernelffffiPiPfiS0_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x40
	s_load_b32 s3, s[0:1], 0x10
	s_add_u32 s4, s0, 64
	s_addc_u32 s5, s1, 0
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s2, s2, s15
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s2, s2, s14
	s_cmp_ge_i32 s2, s3
	s_cbranch_scc1 .LBB0_10
; %bb.1:
	s_load_b32 s10, s[4:5], 0xc
	s_load_b128 s[4:7], s[0:1], 0x18
	s_ashr_i32 s3, s2, 31
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b64 s[8:9], s[2:3], 2
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s10, 0xffff
	s_add_u32 s8, s4, s8
	s_addc_u32 s9, s5, s9
	s_mul_i32 s3, s2, s3
	s_load_b32 s8, s[8:9], 0x0
	s_mul_i32 s9, s2, 0xffffffe5
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add3_u32 v0, s3, s9, v0
	s_mul_i32 s3, s2, 37
	s_waitcnt lgkmcnt(0)
	s_add_i32 s8, s8, s3
	s_mov_b32 s3, exec_lo
	v_cmpx_gt_i32_e64 s8, v0
	s_cbranch_execz .LBB0_10
; %bb.2:
	s_load_b128 s[8:11], s[0:1], 0x0
	v_lshlrev_b32_e32 v0, 3, v0
	s_waitcnt lgkmcnt(0)
	s_load_b32 s11, s[0:1], 0x28
	s_mov_b32 s14, 0x652b82fe
	s_mov_b32 s16, 0xfefa39ef
	s_mov_b32 s18, 0x3b39803f
	s_mov_b32 s20, 0xfca7ab0c
	s_mov_b32 s22, 0x6a5dcb37
	s_mov_b32 s24, 0x623fde64
	s_mov_b32 s26, 0x7c89e6b0
	s_mov_b32 s28, 0x14761f6e
	s_mov_b32 s30, 0x1852b7b0
	s_mov_b32 s34, 0x11122322
	s_mov_b32 s36, 0x555502a1
	s_mov_b32 s38, 0x55555511
	s_mov_b32 s40, 11
	s_mov_b32 s42, 0x37cfa789
	s_mov_b32 s44, 0x54df3c0e
	s_mov_b32 s46, 0xd9802b82
	s_mov_b32 s48, 0x8a03dcdb
	v_cvt_f64_f32_e32 v[1:2], s8
	v_cvt_f64_f32_e32 v[6:7], s9
	s_mov_b32 s50, 0x2eba62d8
	s_mov_b32 s52, 0xa56e15f1
	s_mov_b32 s54, 0x71c907de
	s_mov_b32 s56, 0x2cd770fb
	s_mov_b32 s58, 0x76d0a51a
	s_mov_b32 s60, 0xc022d0ed
	s_mov_b32 s62, 0x2fdbf62e
	s_mov_b32 s64, 0x3689fc43
	s_mov_b32 s66, 0x192d909b
	s_mov_b32 s68, 0x852ff070
	s_mov_b32 s70, 0xdfadea8f
	s_mov_b32 s72, 0xdff65910
	s_mov_b32 s74, 0x4de8f32
	s_mov_b32 s76, 0x3c3dbeb3
	s_mov_b32 s78, 0xfcfa6930
	s_mov_b32 s80, 0xf66fb8a3
	s_mov_b32 s82, 0xd154a2a8
	s_mov_b32 s84, 0xb74febf8
	s_mov_b32 s86, 0x41e48bfc
	s_add_u32 s90, s6, 8
	s_mov_b32 s15, 0x3ff71547
	s_mov_b32 s17, 0xbfe62e42
	s_mov_b32 s19, 0xbc7abc9e
	s_mov_b32 s21, 0x3e928af3
	s_mov_b32 s23, 0x3e5ade15
	s_mov_b32 s25, 0x3ec71dee
	s_mov_b32 s27, 0x3efa0199
	s_mov_b32 s29, 0x3f2a01a0
	s_mov_b32 s31, 0x3f56c16c
	s_mov_b32 s35, 0x3f811111
	s_mov_b32 s37, 0x3fa55555
	s_mov_b32 s39, 0x3fc55555
	s_mov_b32 s41, 0x3fe00000
	s_mov_b32 s43, 0xbe411663
	s_mov_b32 s45, 0xbe41f39d
	s_mov_b32 s47, 0x3e7b45f1
	v_mul_f64 v[8:9], v[1:2], 0.5
	v_ashrrev_i32_e32 v1, 31, v0
	s_mov_b32 s49, 0x3e6d9048
	s_mov_b32 s51, 0xbeab87b0
	s_mov_b32 s53, 0x3e95104b
	s_mov_b32 s55, 0x3ed7f29f
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_mov_b32 s57, 0xbee78f5c
	s_mov_b32 s59, 0xbef995fb
	s_mov_b32 s61, 0x3f23be2e
	s_mov_b32 s63, 0xbf2a1deb
	s_mov_b32 s65, 0xbf48d4ac
	v_add_co_u32 v4, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v1, vcc_lo
	s_mov_b32 s67, 0x3f749c67
	s_mov_b32 s69, 0xbf909623
	s_mov_b32 s71, 0x3fa3079e
	s_clause 0x1
	global_load_b128 v[0:3], v[4:5], off
	global_load_b32 v14, v[4:5], off offset:16
	s_clause 0x1
	s_load_b64 s[12:13], s[0:1], 0x30
	s_load_b32 s0, s[0:1], 0x38
	s_mov_b32 s73, 0xbfb0fb06
	s_mov_b32 s75, 0x3fb7fee0
	s_mov_b32 s77, 0xbfb9ddb2
	s_mov_b32 s79, 0x3fb16ece
	s_mov_b32 s81, 0x3f8f7f5d
	s_mov_b32 s83, 0xbfc1df1a
	s_mov_b32 s85, 0x3fcdd2c8
	s_mov_b32 s87, 0x403b39dc
	s_addc_u32 s91, s7, 0
	s_mov_b32 s92, 0
	v_div_scale_f64 v[10:11], null, v[6:7], v[6:7], v[8:9]
	v_div_scale_f64 v[17:18], vcc_lo, v[8:9], v[6:7], v[8:9]
	s_waitcnt lgkmcnt(0)
	s_mul_i32 s33, s2, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[12:13], v[10:11]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[15:16], -v[10:11], v[12:13], 1.0
	v_fma_f64 v[12:13], v[12:13], v[15:16], v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[15:16], -v[10:11], v[12:13], 1.0
	v_fma_f64 v[12:13], v[12:13], v[15:16], v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[15:16], v[17:18], v[12:13]
	v_fma_f64 v[10:11], -v[10:11], v[15:16], v[17:18]
	s_waitcnt vmcnt(1)
	v_cvt_i32_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[10:11], v[10:11], v[12:13], v[15:16]
	v_mov_b32_e32 v15, 0
	v_div_fixup_f64 v[6:7], v[10:11], v[6:7], v[8:9]
.LBB0_3:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	s_lshl_b32 s0, s92, 2
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s0, s0, s33
	s_ashr_i32 s1, s0, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b64 s[0:1], s[0:1], 2
	s_add_u32 s6, s12, s0
	s_addc_u32 s7, s13, s1
	global_load_b32 v8, v15, s[6:7]
	s_waitcnt vmcnt(0)
	v_cvt_i32_f32_e32 v8, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s0, v8
	s_ashr_i32 s1, s0, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b64 s[2:3], s[0:1], 2
	s_add_u32 s2, s4, s2
	s_addc_u32 s3, s5, s3
	s_load_b32 s93, s[2:3], 0x0
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s93, 1
	s_cbranch_scc1 .LBB0_9
; %bb.4:                                ; %.lr.ph
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_mul_i32 s0, s0, s11
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_ashr_i32 s1, s0, 31
	s_lshl_b64 s[0:1], s[0:1], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s88, s90, s0
	s_addc_u32 s89, s91, s1
.LBB0_5:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	global_load_b64 v[8:9], v15, s[88:89] offset:-8
	s_mov_b32 s94, exec_lo
	s_waitcnt vmcnt(0)
	v_cvt_i32_f32_e32 v8, v8
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_ne_u32_e64 v0, v8
	s_cbranch_execz .LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	s_clause 0x1
	global_load_b96 v[10:12], v15, s[6:7] offset:4
	global_load_b96 v[17:19], v15, s[88:89]
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v8, v10, v17
	v_add_f32_e32 v10, v11, v18
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_dual_sub_f32 v17, v3, v10 :: v_dual_sub_f32 v18, v2, v8
	v_add_f32_e32 v8, v12, v19
	v_mul_f32_e32 v10, v18, v18
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v16, v14, v8
	v_fmac_f32_e32 v10, v17, v17
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v10, v16, v16
	v_mul_f32_e32 v8, 0x4f800000, v10
	v_cmp_gt_f32_e32 vcc_lo, 0xf800000, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v8, v10, v8, vcc_lo
	v_sqrt_f32_e32 v10, v8
	s_waitcnt_depctr 0xfff
	v_add_nc_u32_e32 v11, -1, v10
	v_add_nc_u32_e32 v12, 1, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v13, -v11, v10, v8
	v_fma_f32 v19, -v12, v10, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_ge_f32_e64 s0, 0, v13
	v_cndmask_b32_e64 v10, v10, v11, s0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_lt_f32_e64 s0, 0, v19
	v_cndmask_b32_e64 v10, v10, v12, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f32_e32 v11, 0x37800000, v10
	v_cndmask_b32_e32 v10, v10, v11, vcc_lo
	v_cmp_class_f32_e64 vcc_lo, v8, 0x260
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v8, v10, v8, vcc_lo
	v_cmp_gt_f32_e32 vcc_lo, s10, v8
	s_delay_alu instid0(VALU_DEP_3)
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	v_dual_mul_f32 v10, s9, v8 :: v_dual_mul_f32 v9, v1, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[12:13], v10
	v_add_f64 v[10:11], v[6:7], v[12:13]
	v_add_f64 v[12:13], v[12:13], -v[6:7]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[19:20], |v[10:11]|, 4.0
	v_add_f64 v[21:22], |v[12:13]|, 4.0
	v_add_f64 v[43:44], |v[10:11]|, |v[10:11]|
	v_add_f64 v[45:46], |v[12:13]|, |v[12:13]|
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_rcp_f64_e32 v[23:24], v[19:20]
	v_rcp_f64_e32 v[25:26], v[21:22]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_f64 v[47:48], v[43:44], 1.0
	v_add_f64 v[49:50], v[45:46], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(TRANS32_DEP_3)
	v_rcp_f64_e32 v[53:54], v[47:48]
	v_fma_f64 v[27:28], -v[19:20], v[23:24], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[29:30], -v[21:22], v[25:26], 1.0
	v_rcp_f64_e32 v[55:56], v[49:50]
	v_fma_f64 v[23:24], v[27:28], v[23:24], v[23:24]
	s_delay_alu instid0(VALU_DEP_2)
	v_fma_f64 v[25:26], v[29:30], v[25:26], v[25:26]
	v_add_f64 v[27:28], |v[10:11]|, -4.0
	v_fma_f64 v[59:60], -v[47:48], v[53:54], 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[61:62], -v[49:50], v[55:56], 1.0
	v_fma_f64 v[19:20], -v[19:20], v[23:24], 1.0
	v_fma_f64 v[21:22], -v[21:22], v[25:26], 1.0
	v_fma_f64 v[53:54], v[59:60], v[53:54], v[53:54]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[55:56], v[61:62], v[55:56], v[55:56]
	v_fma_f64 v[19:20], v[19:20], v[23:24], v[23:24]
	v_add_f64 v[23:24], |v[12:13]|, -4.0
	v_fma_f64 v[21:22], v[21:22], v[25:26], v[25:26]
	v_fma_f64 v[47:48], -v[47:48], v[53:54], 1.0
	v_fma_f64 v[49:50], -v[49:50], v[55:56], 1.0
	v_mul_f64 v[25:26], v[27:28], v[19:20]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_f64 v[23:24], v[23:24], v[21:22]
	v_fma_f64 v[47:48], v[47:48], v[53:54], v[53:54]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_f64 v[27:28], v[25:26], 1.0
	v_add_f64 v[29:30], v[23:24], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[27:28], v[27:28], -4.0, |v[10:11]|
	v_fma_f64 v[29:30], v[29:30], -4.0, |v[12:13]|
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[27:28], -v[25:26], |v[10:11]|, v[27:28]
	v_fma_f64 v[29:30], -v[23:24], |v[12:13]|, v[29:30]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[19:20], v[19:20], v[27:28], v[25:26]
	v_mul_f64 v[27:28], v[10:11], -v[10:11]
	v_fma_f64 v[21:22], v[21:22], v[29:30], v[23:24]
	v_mul_f64 v[29:30], v[12:13], -v[12:13]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], s[44:45], s[42:43]
	v_mul_f64 v[31:32], v[27:28], s[14:15]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], s[44:45], s[42:43]
	v_mul_f64 v[33:34], v[29:30], s[14:15]
	v_cmp_nlt_f64_e64 s0, 0x40900000, v[27:28]
	v_cmp_ngt_f64_e64 s1, 0xc090cc00, v[27:28]
	v_cmp_nlt_f64_e64 s2, 0x40900000, v[29:30]
	v_cmp_ngt_f64_e64 s3, 0xc090cc00, v[29:30]
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[46:47]
	v_rndne_f64_e32 v[31:32], v[31:32]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[46:47]
	v_rndne_f64_e32 v[33:34], v[33:34]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[48:49]
	v_fma_f64 v[35:36], v[31:32], s[16:17], v[27:28]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[48:49]
	v_fma_f64 v[37:38], v[33:34], s[16:17], v[29:30]
	v_fma_f64 v[27:28], -v[10:11], v[10:11], -v[27:28]
	v_fma_f64 v[29:30], -v[12:13], v[12:13], -v[29:30]
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[50:51]
	v_fma_f64 v[35:36], v[31:32], s[18:19], v[35:36]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[50:51]
	v_fma_f64 v[37:38], v[33:34], s[18:19], v[37:38]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[52:53]
	v_fma_f64 v[39:40], v[35:36], s[22:23], s[20:21]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[52:53]
	v_fma_f64 v[41:42], v[37:38], s[22:23], s[20:21]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[54:55]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[24:25]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[54:55]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[24:25]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[56:57]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[26:27]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[56:57]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[26:27]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[58:59]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[28:29]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[58:59]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[28:29]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[60:61]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[30:31]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[60:61]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[30:31]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[62:63]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[34:35]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[62:63]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[34:35]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[64:65]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[36:37]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[64:65]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[36:37]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[66:67]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[38:39]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[66:67]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[38:39]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[68:69]
	v_fma_f64 v[39:40], v[35:36], v[39:40], s[40:41]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[68:69]
	v_fma_f64 v[41:42], v[37:38], v[41:42], s[40:41]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[70:71]
	v_fma_f64 v[39:40], v[35:36], v[39:40], 1.0
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[70:71]
	v_fma_f64 v[41:42], v[37:38], v[41:42], 1.0
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[72:73]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[72:73]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[74:75]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[74:75]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[76:77]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[76:77]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[78:79]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[78:79]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[80:81]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[80:81]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f64 v[23:24], v[19:20], v[23:24], s[82:83]
	v_fma_f64 v[25:26], v[21:22], v[25:26], s[82:83]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_fma_f64 v[19:20], v[19:20], v[23:24], s[84:85]
	v_fma_f64 v[23:24], v[49:50], v[55:56], v[55:56]
	v_fma_f64 v[21:22], v[21:22], v[25:26], s[84:85]
	v_cvt_i32_f64_e32 v49, v[31:32]
	v_fma_f64 v[31:32], v[35:36], v[39:40], 1.0
	v_cvt_i32_f64_e32 v50, v[33:34]
	v_fma_f64 v[33:34], v[37:38], v[41:42], 1.0
	v_fma_f64 v[35:36], v[19:20], v[47:48], v[47:48]
	v_fma_f64 v[37:38], v[21:22], v[23:24], v[23:24]
	v_ldexp_f64 v[31:32], v[31:32], v49
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_ldexp_f64 v[33:34], v[33:34], v50
	v_fma_f64 v[41:42], -v[35:36], v[43:44], 1.0
	v_add_f64 v[19:20], v[19:20], -v[35:36]
	v_fma_f64 v[43:44], -v[37:38], v[45:46], 1.0
	v_add_f64 v[21:22], v[21:22], -v[37:38]
	v_cndmask_b32_e64 v32, 0x7ff00000, v32, s0
	s_and_b32 s0, s1, s0
	v_cndmask_b32_e64 v34, 0x7ff00000, v34, s2
	v_cndmask_b32_e64 v31, 0, v31, s0
	s_and_b32 s0, s3, s2
	v_cndmask_b32_e64 v32, 0, v32, s1
	v_cndmask_b32_e64 v33, 0, v33, s0
	v_cndmask_b32_e64 v34, 0, v34, s3
	v_cmp_ngt_f64_e64 s0, |v[12:13]|, s[86:87]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f64 v[27:28], v[31:32], v[27:28], v[31:32]
	v_fma_f64 v[29:30], v[33:34], v[29:30], v[33:34]
	v_add_f64 v[19:20], v[41:42], v[19:20]
	v_mul_f32_e64 v42, v8, -s8
	v_mul_f32_e32 v51, v8, v8
	v_add_f64 v[21:22], v[43:44], v[21:22]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v44, 0x3fb8aa3b, v42
	v_cvt_f64_f32_e32 v[51:52], v51
	v_cmp_ngt_f32_e64 s1, 0xc2ce8ed0, v42
	v_fma_f64 v[31:32], v[47:48], v[19:20], v[35:36]
	s_delay_alu instid0(VALU_DEP_4)
	v_fma_f32 v35, 0x3fb8aa3b, v42, -v44
	v_rndne_f32_e32 v36, v44
	v_fma_f64 v[22:23], v[23:24], v[21:22], v[37:38]
	global_load_b96 v[19:21], v[4:5], off offset:20
	v_fmac_f32_e32 v35, 0x32a5705f, v42
	v_div_scale_f64 v[57:58], null, v[51:52], v[51:52], 0.5
	v_div_scale_f64 v[39:40], vcc_lo, 0.5, v[51:52], 0.5
	v_mul_f64 v[22:23], v[29:30], v[22:23]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[63:64], v[57:58]
	v_cndmask_b32_e64 v23, 0, v23, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v22, 0, v22, s0
	v_cmp_gt_f64_e64 s0, 0, v[12:13]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[59:60], -v[57:58], v[63:64], 1.0
	v_fma_f64 v[59:60], v[63:64], v[59:60], v[63:64]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[25:26], -v[57:58], v[59:60], 1.0
	v_fma_f64 v[25:26], v[59:60], v[25:26], v[59:60]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[45:46], v[39:40], v[25:26]
	v_fma_f64 v[39:40], -v[57:58], v[45:46], v[39:40]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[24:25], v[39:40], v[25:26], v[45:46]
	v_sub_f32_e32 v26, v44, v36
	v_dual_mul_f32 v41, s8, v8 :: v_dual_add_f32 v26, v26, v35
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_mul_f32_e32 v43, 0x3fb8aa3b, v41
	v_cvt_i32_f32_e32 v35, v36
	v_cmp_ngt_f32_e32 vcc_lo, 0xc2ce8ed0, v41
	v_exp_f32_e32 v26, v26
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fma_f32 v33, 0x3fb8aa3b, v41, -v43
	v_rndne_f32_e32 v34, v43
	v_fmac_f32_e32 v33, 0x32a5705f, v41
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_f32_e32 v37, v43, v34
	v_cvt_i32_f32_e32 v34, v34
	v_add_f32_e32 v33, v37, v33
	v_cvt_f64_f32_e32 v[36:37], v41
	s_delay_alu instid0(VALU_DEP_2)
	v_exp_f32_e32 v33, v33
	s_waitcnt_depctr 0xfff
	v_ldexp_f32 v33, v33, v34
	v_ldexp_f32 v34, v26, v35
	v_mul_f64 v[26:27], v[27:28], v[31:32]
	v_div_fixup_f64 v[24:25], v[24:25], v[51:52], 0.5
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cndmask_b32_e32 v33, 0, v33, vcc_lo
	v_cndmask_b32_e64 v28, 0, v34, s1
	v_cmp_nlt_f32_e64 s1, 0x42b17218, v41
	v_cmp_ngt_f64_e64 vcc_lo, |v[10:11]|, s[86:87]
	v_add_f64 v[34:35], -v[22:23], 2.0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v38, 0x7f800000, v33, s1
	v_cmp_nlt_f32_e64 s1, 0x42b17218, v42
	v_cndmask_b32_e64 v39, 0x7f800000, v28, s1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_cvt_f64_f32_e32 v[28:29], v38
	v_cvt_f64_f32_e32 v[30:31], v39
	v_dual_cndmask_b32 v27, 0, v27 :: v_dual_cndmask_b32 v26, 0, v26
	v_cmp_gt_f64_e32 vcc_lo, 0, v[10:11]
	v_cndmask_b32_e64 v23, v23, v35, s0
	v_cndmask_b32_e64 v22, v22, v34, s0
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_add_f64 v[32:33], -v[26:27], 2.0
	v_mul_f64 v[28:29], v[24:25], v[28:29]
	v_mul_f64 v[24:25], v[24:25], v[30:31]
	v_add_f64 v[30:31], -v[36:37], 1.0
	v_dual_cndmask_b32 v27, v27, v33 :: v_dual_cndmask_b32 v26, v26, v32
	v_add_f64 v[32:33], v[36:37], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_4)
	v_mul_f64 v[26:27], v[28:29], v[26:27]
	v_mul_f64 v[22:23], v[24:25], v[22:23]
	v_cvt_f32_f64_e32 v24, v[12:13]
	v_cvt_f32_f64_e32 v25, v[10:11]
	v_mul_f64 v[10:11], v[30:31], v[26:27]
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_mul_f64 v[12:13], v[32:33], v[22:23]
	v_mul_f32_e64 v23, -v24, v24
	v_mul_f32_e32 v22, 0x3fe2dfc5, v8
	v_mul_f32_e64 v24, -v25, v25
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v26, 0x3fb8aa3b, v23
	v_div_scale_f32 v25, null, v22, v22, s9
	v_cmp_ngt_f32_e64 s0, 0xc2ce8ed0, v23
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_fma_f32 v29, 0x3fb8aa3b, v23, -v26
	v_rndne_f32_e32 v30, v26
	v_rcp_f32_e32 v28, v25
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_dual_fmac_f32 v29, 0x32a5705f, v23 :: v_dual_sub_f32 v26, v26, v30
	v_dual_mul_f32 v27, 0x3fb8aa3b, v24 :: v_dual_add_f32 v26, v26, v29
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_fma_f32 v31, 0x3fb8aa3b, v24, -v27
	v_rndne_f32_e32 v32, v27
	s_waitcnt_depctr 0xfff
	v_fma_f32 v33, -v25, v28, 1.0
	v_exp_f32_e32 v26, v26
	v_fmac_f32_e32 v28, v33, v28
	v_cvt_f32_f64_e32 v10, v[10:11]
	v_cvt_f32_f64_e32 v11, v[12:13]
	v_fmac_f32_e32 v31, 0x32a5705f, v24
	v_div_scale_f32 v13, vcc_lo, s9, v22, s9
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_dual_mul_f32 v29, v13, v28 :: v_dual_add_f32 v10, v10, v11
	v_sub_f32_e32 v27, v27, v32
	v_add_f32_e32 v12, v27, v31
	v_cvt_i32_f32_e32 v27, v30
	v_cvt_i32_f32_e32 v30, v32
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_exp_f32_e32 v12, v12
	v_ldexp_f32 v26, v26, v27
	v_fma_f32 v27, -v25, v29, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v26, 0, v26, s0
	v_cmp_ngt_f32_e64 s0, 0xc2ce8ed0, v24
	v_fmac_f32_e32 v29, v27, v28
	s_waitcnt_depctr 0xfff
	v_ldexp_f32 v12, v12, v30
	v_fma_f32 v13, -v25, v29, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_cndmask_b32_e64 v12, 0, v12, s0
	v_cmp_nlt_f32_e64 s0, 0x42b17218, v23
	v_div_fmas_f32 v13, v13, v28, v29
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v23, 0x7f800000, v26, s0
	v_cmp_nlt_f32_e64 s0, 0x42b17218, v24
	v_mul_f32_e32 v23, v39, v23
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v12, 0x7f800000, v12, s0
	v_fmac_f32_e32 v23, v38, v12
	v_div_fixup_f32 v12, v13, v22, s9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v10, v12, v23
	v_mul_f32_e32 v9, v9, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_mul_f32_e32 v10, v18, v9
	v_mul_f32_e32 v11, v17, v9
	v_mul_f32_e32 v9, v16, v9
	v_div_scale_f32 v12, null, v8, v8, v10
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_div_scale_f32 v13, null, v8, v8, v11
	v_div_scale_f32 v16, null, v8, v8, v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_rcp_f32_e32 v17, v12
	v_rcp_f32_e32 v18, v13
	v_div_scale_f32 v23, vcc_lo, v10, v8, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(TRANS32_DEP_3)
	v_rcp_f32_e32 v22, v16
	v_div_scale_f32 v24, s0, v11, v8, v11
	v_div_scale_f32 v28, s1, v9, v8, v9
	v_fma_f32 v25, -v12, v17, 1.0
	s_waitcnt_depctr 0xfff
	v_fma_f32 v26, -v13, v18, 1.0
	v_fma_f32 v27, -v16, v22, 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_fmac_f32 v17, v25, v17 :: v_dual_fmac_f32 v18, v26, v18
	v_fmac_f32_e32 v22, v27, v22
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_mul_f32 v25, v23, v17 :: v_dual_mul_f32 v26, v24, v18
	v_mul_f32_e32 v27, v28, v22
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f32 v29, -v12, v25, v23
	v_fma_f32 v30, -v13, v26, v24
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fma_f32 v31, -v16, v27, v28
	v_dual_fmac_f32 v25, v29, v17 :: v_dual_fmac_f32 v26, v30, v18
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v27, v31, v22
	v_fma_f32 v12, -v12, v25, v23
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_fma_f32 v13, -v13, v26, v24
	v_fma_f32 v16, -v16, v27, v28
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_div_fmas_f32 v12, v12, v17, v25
	s_mov_b32 vcc_lo, s0
	v_div_fmas_f32 v13, v13, v18, v26
	s_mov_b32 vcc_lo, s1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_div_fixup_f32 v10, v12, v8, v10
	v_div_fmas_f32 v16, v16, v22, v27
	v_div_fixup_f32 v11, v13, v8, v11
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_div_fixup_f32 v12, v16, v8, v9
	s_waitcnt vmcnt(0)
	v_dual_add_f32 v8, v10, v19 :: v_dual_add_f32 v9, v11, v20
	s_delay_alu instid0(VALU_DEP_2)
	v_add_f32_e32 v10, v12, v21
	global_store_b96 v[4:5], v[8:10], off offset:20
.LBB0_8:                                ;   in Loop: Header=BB0_5 Depth=2
	s_or_b32 exec_lo, exec_lo, s94
	s_add_u32 s88, s88, 32
	s_addc_u32 s89, s89, 0
	s_add_i32 s93, s93, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s93, 0
	s_cbranch_scc0 .LBB0_5
.LBB0_9:                                ; %._crit_edge
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_add_i32 s92, s92, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s92, 27
	s_cbranch_scc0 .LBB0_3
.LBB0_10:                               ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12updateKernelffffiPiPfiS0_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 320
		.amdhsa_user_sgpr_count 14
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 65
		.amdhsa_next_free_sgpr 95
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z12updateKernelffffiPiPfiS0_i, .Lfunc_end0-_Z12updateKernelffffiPiPfiS0_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 4016
; NumSgprs: 97
; NumVgprs: 65
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 12
; VGPRBlocks: 8
; NumSGPRsForWavesPerEU: 97
; NumVGPRsForWavesPerEU: 65
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     by_value
      - .address_space:  global
        .offset:         48
        .size:           8
        .value_kind:     global_buffer
      - .offset:         56
        .size:           4
        .value_kind:     by_value
      - .offset:         64
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         68
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         72
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         76
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         78
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         80
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         82
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         84
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         86
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         104
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         112
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         120
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         128
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 320
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12updateKernelffffiPiPfiS0_i
    .private_segment_fixed_size: 0
    .sgpr_count:     97
    .sgpr_spill_count: 0
    .symbol:         _Z12updateKernelffffiPiPfiS0_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     65
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
