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


#define ISLAND 10
#define POPULATION 50
#define FACILITY 20
#define GENERATION 10
#define CROSSOVER 0.6
#define MUTATION 0.03
#define MIGRATION 15
#define INDIVIDUAL 5

#define H 15 // BAY height
#define W 10 // BAY width

void shuffle(int* facility);

__global__ void calPosition(int *data, short int *bay, float *position){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;
  int bayposit = x * (FACILITY-1);
  // int posit=b*POPULATION*FACILITY+t*FACILITY;            //執行緒在陣列中對應的位置
  // int posofposit = b*POPULATION*FACILITY*2+t*FACILITY*2;

  for(int i=0;i<ISLAND*POPULATION*FACILITY*2;i++){
    position[i] = 0;
  }


			int len = 1;
			int next = 0;
			for(int f=0;f<FACILITY;f++){
				if(bay[bayposit+f] == 0){
					len = len + 1;
				}
				if(bay[bayposit+f] == 1 || f == FACILITY - 1 ){
					if(f == FACILITY - 1 && bay[bayposit+f] == 0){
						len = len - 1;
					}
					float x = W / 2.0 + next;

					for(int j=0;j<len;j++){

						position[posit*2+(f+j-len+1)*2] = x;

						float y = H / (len * 2.0) * ( (j * 2) + 1) ;

						position[posit*2+(f+j-len+1)*2+1] = y;
					}
					len = 1;

					next = next + W;
				}
			}
}

__global__ void calDistance(int *data, float *position, float *distance){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  // int posit=b*POPULATION*FACILITY+t*FACILITY;            //執行緒在陣列中對應的位置
  // int posofposit = b*POPULATION*FACILITY*2+t*FACILITY*2;

  for(int i=0;i<ISLAND*POPULATION*FACILITY*FACILITY;i++){
    distance[i] = 0;
  }


  for(int f=0;f<FACILITY;f++){
    // printf("\ndistance calculate facility%d\n", f);
    for(int j=f+1;j<FACILITY;j++){

      float x1 = position[ (posit + f)*2 ];
      float y1 = position[ (posit + f)*2 + 1];

      int x = data[ posit + f ];
      // printf("x = %d\n", x);
      float x2 = position[ (posit + j)*2 ];
      float y2 = position[ (posit + j)*2 + 1];
      int y = data[ posit + j ];
      // printf("y= %d\n", y);
      if(y2 > y1){
        distance[ (posit + x)*FACILITY + y] = sqrt( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) ) ;
        distance[ (posit + y)*FACILITY + x] = sqrt( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) ) ;
      }
      else{
        distance[ (posit + x)*FACILITY + y] = sqrt( (x2 - x1) * (x2 - x1) + (y1 - y2) * (y1 - y2) ) ;
        distance[ (posit + y)*FACILITY + x] = sqrt( (x2 - x1) * (x2 - x1) + (y1 - y2) * (y1 - y2) ) ;
      }
    }
  }

}

__global__ void calTotalcost(float *distance, int *cost, float *totalCost){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  // int posit=b*POPULATION*FACILITY+t*FACILITY;            //執行緒在陣列中對應的位置
  // int posofposit = b*POPULATION*FACILITY*2+t*FACILITY*2;

  // for(int i=0;i<ISLAND*POPULATION*FACILITY*FACILITY;i++){
  //   totalCost[i] = 0;
  // }


	for(int f=0;f<FACILITY;f++){
		for(int j=0;j<FACILITY;j++){
			totalCost[ (posit + f)*FACILITY + j] = cost[f*FACILITY + j] * distance[ (posit + f)*FACILITY + j];
		}
	}

}

__global__ void calOF(float *sumCost, float *minCost, float *totalCost){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  // calculate OF

	sumCost[x] = 0.0;
	minCost[x/POPULATION * 2] = 0.0;


			for(int f=0;f<FACILITY;f++){
				for(int j=0;j<FACILITY;j++){
					sumCost[x] += totalCost[ (posit + f)*FACILITY + j];
				}
			}
			if(x % POPULATION==0){
				minCost[(x/POPULATION)*2] = sumCost[x*FACILITY + 0];
				minCost[(x/POPULATION)*2 + 1] = 0;
			}else if(minCost[x/POPULATION] > sumCost[x]){
				minCost[(x/POPULATION)*2] = sumCost[x];
				minCost[(x/POPULATION)*2 + 1] = x % POPULATION;
			}


}


__global__ void calProbability(float *probability, float *totalPro, float *sumCost){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;


  probability[x] = (1.0 / sumCost[x]) / (totalPro[ x / POPULATION ]) ;

}


__global__ void crossOver(float *probability2, int *data, short int *bay, int *data2, short int *bay2, int *tem, int *tem2, int *Gyes, int *Gsss, int *Gcount, int *GGgetP, int *GGgetP2, float *test){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * 2 * FACILITY;
  int posit2 = (2*x+1) * FACILITY;
  int bayposit = x * 2 * (FACILITY-1);
  int bayposit2 = (2*x+1) * (FACILITY-1);

			float get = (tem[x] % 100) * 0.01;
      test[x] = 0.0;
      tem[x] = tem[x] % 100;
			int getP = 0;
			float get2 = tem2[x] % 100 * 0.01;
      tem2[x] = tem2[x] % 100;
			int getP2 = 0;
      GGgetP2[x] = -1;
			for(int p=0;p<POPULATION-1;p++){
				if(get >= probability2[ (x/POPULATION)*POPULATION + p ] && get < probability2[ (x/POPULATION)*POPULATION + p+1 ]){
					getP = p+1;
          GGgetP2[x] = (x/POPULATION)*POPULATION + p;
					break;
				}
				else if(p==POPULATION-2){
					getP = p+1;
					break;
				}
			}
      test[x] = probability2[ (x/POPULATION)*POPULATION + 1];

			for(int p=0;p<POPULATION-1;p++){
				if(get2 >= probability2[x/POPULATION*POPULATION + p] && get2 < probability2[x/POPULATION*POPULATION + p+1]){
					getP2 = p+1;

					break;
				}
				else if(p==POPULATION-2){
					getP2 = p+1;

					break;
				}
			}

			for(int f=0;f<FACILITY;f++){
				data2[ posit + f] = data[ x/POPULATION*POPULATION*FACILITY + getP*FACILITY + f];
				bay2[ (2 * x)*(FACILITY-1) + f] = bay[ x/POPULATION*POPULATION*(FACILITY-1) + getP*(FACILITY-1) + f];
			}




			for(int f=0;f<FACILITY;f++){
				data2[ posit2 + f ] = data[x/POPULATION*POPULATION*FACILITY + getP2*FACILITY + f];
				bay2[ (2 * x + 1)*(FACILITY-1) + f] = bay[x/POPULATION*POPULATION*(FACILITY-1) + getP2*(FACILITY-1) + f];
			}


      int tt = Gyes[x] % 100;
			float yes = tt * 0.01;
      Gyes[x] = tt;

			if(yes <= CROSSOVER){

				int sss = FACILITY - 1;
        int seq = Gsss[x] % sss;
        Gsss[x] = seq;


				int cross[4][2];

				cross[0][0] = data2[ posit + seq];
				cross[0][1] = data2[ posit2 + seq];
				cross[1][0] = data2[ posit + seq];
				cross[1][1] = data2[ posit2 + seq+1];
				cross[2][0] = data2[ posit + seq+1];
				cross[2][1] = data2[ posit2 + seq];
				cross[3][0] = data2[ posit+ seq+1];
				cross[3][1] = data2[ posit2 + seq+1];



				int temp = data2[ posit2 + seq];

				int temp2 = data2[posit2 + seq+1];

				data2[ posit2 + seq] = data2[ posit + seq];

				data2[ posit2 + seq+1] = data2[posit + seq+1];

				data2[posit + seq] = temp;
				data2[posit + seq+1] = temp2;



				int count = 0;
				for(int c=0;c<4;c++){
					if(cross[c][0] == cross[c][1]){
						count++;
					}
				}
        Gcount[x] = count;

				switch (count) {
					case 0:
						for(int c=0;c<FACILITY;c++){
							if(c != seq){
								if(data2[posit + c] == cross[0][1]){
									data2[ posit + c] = cross[0][0];
								}
								if(data2[posit + c] == cross[3][1]){
									data2[ posit + c] = cross[3][0];
								}
							}
							else{
								c++;
							}
						}

						for(int c=0;c<FACILITY;c++){
							if(c != seq){
								if(data2[posit2 + c] == cross[0][0]){
									data2[ posit2 + c] = cross[0][1];
								}
								if(data2[posit2 + c] == cross[3][0]){
									data2[ posit2 + c] = cross[3][1];
								}
							}
							else{
								c++;
							}
						}
						break;
					case 1:
						temp = 99;
						for(int c=0;c<4;c++){
							if(cross[c][0] == cross[c][1]){
								temp = cross[c][0];
							}
						}

						for(int c=0;c<4;c++){
							if(cross[c][0] != temp && cross[c][1] != temp){
								for(int f=0;f<FACILITY;f++){
									if(f != seq){
										if(data2[posit + f] == cross[c][1]){
											data2[ posit + f] = cross[c][0];
										}
									}
									else{
										f++;
									}
								}
							}
						}

						for(int c=0;c<4;c++){
							if(cross[c][0] != temp && cross[c][1] != temp){
								for(int f=0;f<FACILITY;f++){
									if(f != seq){
										if(data2[posit2 + f] == cross[c][0]){
											data2[ posit2 + f] = cross[c][1];
										}
									}
									else{
										f++;
									}
								}
							}
						}
						break;
					case 2:
						break;
				}




				temp = bay2[bayposit2 + seq];
				temp2 = bay2[bayposit2 + seq+1];
				bay2[bayposit2 + seq]   = bay2[bayposit + seq];
				bay2[bayposit2 + seq+1] = bay2[bayposit + seq+1];
				bay2[bayposit + seq]   = bay2[bayposit2 + seq];
				bay2[bayposit + seq+1] = bay2[bayposit2 + seq+1];
			}else {

			}



}

__global__ void mutation(int *data2, int *mutaYes, int *mutaTem, int *mutaTem2){
  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  float yes = (mutaYes[x] % 100) * 0.01;
	// fprintf(FIN, "取得%f \n", yes);
	if(yes < MUTATION){
		// fprintf(FIN, "第%d突變\n", p);
		int get = mutaTem[x] % FACILITY;
		int get2 = mutaTem2[x] % FACILITY;
		int temp = data2[posit + get];
		data2[posit + get] = data2[posit + get2];
		data2[posit + get2] = temp;
	}else {
	}
}

__global__ void mutationBay(short int *bay2, int *mutaBayYes, int *mutaBayTem){
  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * (FACILITY - 1);

	float yes = mutaBayYes[x] % 100 * 0.01 ;
	if(yes < MUTATION){
		int get = mutaBayTem[x] % (FACILITY - 1);
		if(bay2[posit + get] == 0){
			bay2[posit + get] = 1;
		}else {
			bay2[posit + get] = 0;
		}
	}
}

int main(){
  double START,END;
  START = clock();
  srand(time(NULL));

  int data[ISLAND][POPULATION][FACILITY];
  short int bay[ISLAND][POPULATION][FACILITY-1]; //bay

  int facility[FACILITY];

  for(int i=0;i<ISLAND;i++){ // shuffle the sorted facility
		printf("new island%d\n", i);
		for(int p=0;p<POPULATION;p++){
			for(int t=0;t<FACILITY;t++){
		    facility[t] = t;
			}
			shuffle(facility);
			// for(int t=0;t<FACILITY;t++){
			// 	printf("%d ", facility[t]);
			// }
			for(int f=0;f<FACILITY;f++){
				data[i][p][f] = facility[f];
				printf("%d ", data[i][p][f]);
			}
			printf("\n");
			for(int b=0;b<FACILITY-1;b++){
				int j = rand() % 2;
		    bay[i][p][b] = j;
			}
		}
	}

  printf("data\n");
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY;f++){
				printf("%d ", data[i][p][f]);
			}
			printf("\n");
		}
		printf("\n");
	}

  printf("bay\n");
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY-1;f++){
				printf("%d ", bay[i][p][f]);
			}
			printf("\n");
		}
		printf("\n");
	}

  // int *GA;
  // short int *GB;
  // cudaMalloc((void**)&GA, ISLAND*POPULATION*FACILITY*sizeof(int));
	// cudaMemcpy(GA, data, ISLAND*POPULATION*FACILITY*sizeof(int), cudaMemcpyHostToDevice);
  //
	// cudaMalloc((void**)&GB, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int));
	// cudaMemcpy(GB, bay, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int), cudaMemcpyHostToDevice);

  // read ther cost
	FILE *fPtr;

  int ttt = FACILITY * (FACILITY-1);

	fPtr=fopen("cost.txt","r");
	int cost[FACILITY][FACILITY] = {0};
	int temp[ttt][3]; // cost
	for(int i=0;i<ttt;i++){
		fscanf(fPtr , "%d %d %d" , &temp[i][0], &temp[i][1], &temp[i][2]);
	}
	fclose(fPtr);
	for(int i=0;i<ttt;i++){ // 2 dimention cost
		cost[ temp[i][0]-1 ][ temp[i][1]-1] = temp[i][2];
	}
  printf("cost: \n");
  for(int i=0;i<FACILITY;i++){ // 2 dimention cost
    for(int j=0;j<FACILITY;j++){
      printf("%d ", cost[i][j]);
    }
    printf("\n");
	}
  int *Gcost;
  cudaMalloc((void**)&Gcost, FACILITY*FACILITY*sizeof(int));
  cudaMemcpy(Gcost, cost, FACILITY*FACILITY*sizeof(int), cudaMemcpyHostToDevice);


  for(int gggggg=0;gggggg<GENERATION;gggggg++){ // generation

  printf("\n*****%d的generation*****\n", gggggg);
  int *GA;
  short int *GB;
  cudaMalloc((void**)&GA, ISLAND*POPULATION*FACILITY*sizeof(int));
	cudaMemcpy(GA, data, ISLAND*POPULATION*FACILITY*sizeof(int), cudaMemcpyHostToDevice);

	cudaMalloc((void**)&GB, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int));
	cudaMemcpy(GB, bay, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int), cudaMemcpyHostToDevice);


  float *Gposition;
  cudaMalloc((void**)&Gposition, ISLAND*POPULATION*FACILITY*2*sizeof(float));

  // int *Gposition2;
  // cudaMalloc((void**)&Gposition2, ISLAND*POPULATION*FACILITY*2*sizeof(int));

  int g=ISLAND, b=POPULATION;
  // int m=g*b;
  calPosition<<<g, b>>>(GA, GB, Gposition);

  float position[ISLAND*POPULATION*FACILITY*2];
  // int position2[ISLAND*POPULATION*FACILITY*2];

  // int data2[ISLAND*POPULATION*FACILITY];
  // short int bay2[ISLAND*POPULATION*(FACILITY-1)]; //bay
  //
  // cudaMemcpy(data2, GA, ISLAND*POPULATION*FACILITY*sizeof(int), cudaMemcpyDeviceToHost);
  //
  // printf("data2\n");
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		for(int f=0;f<FACILITY;f++){
	// 			printf("%d ", data[i*POPULATION*FACILITY+p*FACILITY+f]);
	// 		}
	// 		printf("\n");
	// 	}
	// 	printf("\n");
	// }
  // cudaMemcpy(bay2, GB, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int), cudaMemcpyDeviceToHost);
  // printf("bay2\n");
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		for(int f=0;f<FACILITY-1;f++){
	// 			printf("%d ", bay2[i*POPULATION*FACILITY+p*(FACILITY-1)+f]);
	// 		}
	// 		printf("\n");
	// 	}
	// 	printf("\n");
	// }

  cudaMemcpy(position, Gposition, ISLAND*POPULATION*FACILITY*2*sizeof(float), cudaMemcpyDeviceToHost);

  // print position
	// for(int i=0;i<ISLAND;i++){
	// 	printf("island%d \n", i);
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("po%d = \n",p);
	// 		for(int f=0;f<FACILITY;f++){
	// 			for(int k=0;k<2;k++){
	// 				printf("%f ", position[i*POPULATION*FACILITY*2+p*FACILITY*2+f*2+k]);
	// 			}
	// 			printf("\n");
	// 		}
	// 	}
	// }

  // for(int i=0;i<ISLAND*POPULATION*FACILITY*2;i++){
  //   printf("%f ", position[i]);
  // }
  printf("\n");

  float distance[ISLAND*POPULATION*FACILITY*FACILITY] = {0};

  float *Gdistance;
  cudaMalloc((void**)&Gdistance, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float));


  calDistance<<<g, b>>>(GA, Gposition, Gdistance);

	cudaMemcpy(distance, Gdistance, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float), cudaMemcpyDeviceToHost);

  printf("\ncalculate distance end\n");

  // print distance
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
  //     printf("po%d: \n", p);
	// 		for(int f=0;f<FACILITY;f++){
	// 			for(int j=0;j<FACILITY;j++){
	// 				printf("%f ", distance[ i*POPULATION*FACILITY*FACILITY + p*FACILITY*FACILITY + f*FACILITY + j ]);
	// 			}
	// 			printf("\n");
	// 		}
	// 	}
	// }


  float totalCost[ISLAND][POPULATION][FACILITY][FACILITY] = {0.0};

  float *GtotalCost;
  cudaMalloc((void**)&GtotalCost, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float));

  calTotalcost<<<g, b>>>(Gdistance, Gcost, GtotalCost);

  cudaMemcpy(totalCost, GtotalCost, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float), cudaMemcpyDeviceToHost);

  // print totalCost
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
  //     printf("po%d: \n", p);
	// 		for(int f=0;f<FACILITY;f++){
	// 			for(int j=0;j<FACILITY;j++){
	// 				printf("%f ", totalCost[i][p][f][j]);
	// 			}
	// 			printf("\n");
	// 		}
	// 	}
	// }

  float *GsumCost;
  float sumCost[ISLAND][POPULATION]={0.0};

  cudaMalloc((void**)&GsumCost, ISLAND*POPULATION*sizeof(float));

  float *GminCost;
  float minCost[ISLAND][2];
  cudaMalloc((void**)&GminCost, ISLAND*2*sizeof(float));

  calOF<<<g, b>>>(GsumCost, GminCost, GtotalCost);

  cudaMemcpy(sumCost, GsumCost, ISLAND*POPULATION*sizeof(float), cudaMemcpyDeviceToHost);
  cudaMemcpy(minCost, GminCost, ISLAND*2*sizeof(float), cudaMemcpyDeviceToHost);

  // printf("\n");
	// for(int i=0;i<ISLAND;i++){
	// 	printf("第%d島嶼: \n", i);
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%d: ", p);
	// 	  printf("sum = %f", sumCost[i][p]);
	// 		printf("\n");
	// 	}
	// }


  int data2[ISLAND][POPULATION][FACILITY]; // facility
  int *Gdata2;
  cudaMalloc((void**)&Gdata2, ISLAND*POPULATION*FACILITY*sizeof(int));
	short int bay2[ISLAND][POPULATION][FACILITY]; //bay
  short int *Gbay2;
  cudaMalloc((void**)&Gbay2, ISLAND*POPULATION*FACILITY*sizeof(short int));

	float probability[ISLAND][POPULATION] = {0.0}; // �U�Ӿ��v

  // for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("pro%f \n", probability[i][p]);
	// 	}
	// }
  float *Gprobability;
  cudaMalloc((void**)&Gprobability, ISLAND*POPULATION*sizeof(float));

	float totalPro[ISLAND] = {0.0};                // �`(�����˼�)
  float *GtotalPro;
  cudaMalloc((void**)&GtotalPro, ISLAND*sizeof(float));

  for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			totalPro[i] = totalPro[i] + (1.0 / sumCost[i][p]);
			// printf("%f %f\n", totalPro[i], (1.0 / sumCost[i][p]));
		}
	}

  cudaMemcpy(GtotalPro, totalPro, ISLAND*sizeof(float), cudaMemcpyHostToDevice);


	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%f %f\n", totalPro[i], (1.0 / sumCost[i][p]));
	// 	}
	// }

  calProbability<<<ISLAND, POPULATION>>>(Gprobability, GtotalPro, GsumCost);

  cudaMemcpy(probability, Gprobability, ISLAND*POPULATION*sizeof(float), cudaMemcpyDeviceToHost);

	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%f %f %f \n", probability[i][p], (1.0 / sumCost[i][p]), totalPro[i]);
	// 	}
	// }


  float probability2[ISLAND][POPULATION] = {0.0};
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int j=0;j<=p;j++){
				probability2[i][p] += probability[i][j];
			}
		}
	}

  float *Gprobability2;
  cudaMalloc((void**)&Gprobability2, ISLAND*POPULATION*sizeof(float));
  cudaMemcpy(Gprobability2, probability2, ISLAND*POPULATION*sizeof(float), cudaMemcpyHostToDevice);

	// print probability2 (Roulette)
	// printf("probability2\n");
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%f ", probability2[i][p]);
	// 	}
	// }



  int *Gtem, *Gtem2, *Gyes, *Gsss;// choose two to crossover and if yes or not and choose area
  int tem[ISLAND*POPULATION], tem2[ISLAND*POPULATION], yes[ISLAND*POPULATION], sss[ISLAND*POPULATION];
  cudaMalloc((void**)&Gtem, ISLAND*POPULATION*sizeof(int));
  cudaMalloc((void**)&Gtem2, ISLAND*POPULATION*sizeof(int));
  cudaMalloc((void**)&Gyes, ISLAND*POPULATION*sizeof(int));
  cudaMalloc((void**)&Gsss, ISLAND*POPULATION*sizeof(int));

  int *GmutaYes, *GmutaTem, *GmutaTem2;
  int mutaYes[ISLAND*POPULATION], mutaTem[ISLAND*POPULATION], mutaTem2[ISLAND*POPULATION];
  cudaMalloc((void**)&GmutaYes, ISLAND*POPULATION*sizeof(int));
  cudaMalloc((void**)&GmutaTem, ISLAND*POPULATION*sizeof(int));
  cudaMalloc((void**)&GmutaTem2, ISLAND*POPULATION*sizeof(int));
  for(int i=0;i<ISLAND*POPULATION;i++){
    tem[i] = rand(); // first change
    tem2[i] = rand(); // second change
    yes[i] = rand(); // crossover or not
    sss[i] = rand(); // bay to crossover
    mutaYes[i] = rand(); // mutation or not
    mutaTem[i] = rand(); // first to change
    mutaTem2[i] = rand(); // second to change
    // printf("%d %d %d %d %d %d %d\n", tem[i], tem2[i], yes[i], sss[i], mutaYes[i], mutaTem[i], mutaTem2[i]);
  }

  cudaMemcpy(Gtem, tem, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(Gtem2, tem2, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(Gyes, yes, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(Gsss, sss, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);


  cudaMemcpy(GmutaYes, mutaYes, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(GmutaTem, mutaTem, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(GmutaTem2, mutaTem2, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);

  int *Gcount;
  cudaMalloc((void**)&Gcount, 10*sizeof(int));
  int *GetP, *GetP2;
  cudaMalloc((void**)&GetP, 10*sizeof(int));
  cudaMalloc((void**)&GetP2, 10*sizeof(int));
  int getP[10], getP2[10];
  float *Gtest;
  cudaMalloc((void**)&Gtest, 10*sizeof(float));
  float test[10] = {0.0};
  crossOver<<<ISLAND, POPULATION / 2>>>(Gprobability2, GA, GB, Gdata2, Gbay2, Gtem, Gtem2, Gyes, Gsss, Gcount, GetP, GetP2, Gtest);
  cudaMemcpy(data2, Gdata2, ISLAND*POPULATION*FACILITY*sizeof(int), cudaMemcpyDeviceToHost);

  int count[10] = {0};
  cudaMemcpy(tem, Gtem, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(tem2, Gtem2, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(yes, Gyes, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(sss, Gsss, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(count, Gcount, 10*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(getP, GetP, 10*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(getP2, GetP2, 10*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(test, Gtest, 10*sizeof(int), cudaMemcpyDeviceToHost);

  // mutation facility
	printf("\nready to mutation\n");

  mutation<<<ISLAND, POPULATION>>>(Gdata2, GmutaYes, GmutaTem, GmutaTem2);

  cudaMemcpy(mutaYes, GmutaYes, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(mutaTem, GmutaTem, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(mutaTem2, GmutaTem2, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);

  int *GmutaBayYes, *GmutaBayTem;
  int mutaBayYes[ISLAND*POPULATION], mutaBayTem[ISLAND*POPULATION];
  cudaMalloc((void**)&GmutaBayYes, ISLAND*POPULATION*sizeof(int));
  cudaMalloc((void**)&GmutaBayTem, ISLAND*POPULATION*sizeof(int));

  cudaMemcpy(GmutaBayYes, mutaBayYes, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);
  cudaMemcpy(GmutaBayTem, mutaBayTem, ISLAND*POPULATION*sizeof(int), cudaMemcpyHostToDevice);

  mutationBay<<<ISLAND, POPULATION>>>(Gbay2, GmutaBayYes, GmutaBayTem);

  cudaMemcpy(mutaBayYes, GmutaBayYes, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);
  cudaMemcpy(mutaBayTem, GmutaBayTem, ISLAND*POPULATION*sizeof(int), cudaMemcpyDeviceToHost);

  // migration
	if( (gggggg+1) % MIGRATION == 0 && (gggggg+1) != 0 && ISLAND > 1){
		printf("***migration***\n");

		int temp3[ISLAND][POPULATION/2][FACILITY];
		short temp4[ISLAND][POPULATION/2][FACILITY-1];
		int indexCost[ISLAND][POPULATION];

		for(int i=0;i<ISLAND;i++){
			for(int p=0;p<POPULATION;p++){
				indexCost[i][p] = p;
			}
		}

		// bubble sort
		float temp;
		for(int k=0;k<ISLAND;k++){
			for(int i=POPULATION-1; i>=1; i--){
	      for(int j=0; j<=i-1; j++){
	        if(sumCost[k][j] > sumCost[k][j+1]){
							int temp2 = indexCost[k][j];
	            indexCost[k][j] = indexCost[k][j+1];
	            indexCost[k][j+1] = temp2;
	        }
	      }
	    }
		}

		// print sorted index
		// for(int i=0;i<ISLAND;i++){
		// 	for(int p=0;p<POPULATION;p++){
		// 		printf("%d ", indexCost[i][p]);
		// 	}
		// 	printf("\n");
		// }

		int countP = 0;
		for(int i=0;i<ISLAND;i++){
			while(countP < INDIVIDUAL){
				for(int p=0;p<POPULATION;p++){
					if(p == indexCost[i][countP]){
						for(int f=0;f<FACILITY;f++){
							temp3[i][countP][f] = data2[i][p][f];
						}
						for(int f=0;f<FACILITY-1;f++){
							temp4[i][countP][f] = bay2[i][p][f];
						}
						countP++;
						break;
					}
				} // population end
			}
			countP = 0;
		} // island end

		for(int i=0;i<ISLAND;i++){
			if(i==0){
				for(int k=0;k<POPULATION/2;k++){
					int backP = indexCost[ISLAND-1][k];
					int frontP = indexCost[i][k];
					for(int f=0;f<FACILITY;f++){
						data2[i][frontP][f] = temp3[ISLAND-1][backP][f];
					}
					for(int f=0;f<FACILITY-1;f++){
						bay2[i][frontP][f] = temp4[ISLAND-1][backP][f];
					}
				}
			}else {
				for(int k=0;k<POPULATION/2;k++){
					int backP = indexCost[i-1][k];
					int frontP = indexCost[i][k];
					int p = indexCost[i][k];
					for(int f=0;f<FACILITY;f++){
						data2[i][frontP][f] = temp3[ISLAND-1][backP][f];
					}
					for(int f=0;f<FACILITY-1;f++){
						bay2[i][frontP][f] = temp4[ISLAND-1][backP][f];
					}
				}
			} // else end

		} // for end




		} // if migration end


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

  // printf("\nget: \n");
  // for(int i=0;i<10;i++){
  //   printf("%d %d\n", getP[i], getP2[i]);
  // }

  // printf("\ntest: \n");
  // for(int i=0;i<10;i++){
  //   printf("%f\n", test[i]);
  // }

  // printf("\nTEM: \n");
  // for(int i=0;i<20;i++){
  //   printf("%d %d %d %d\n", tem[i], tem2[i], yes[i], sss[i]);
  // }
  //
  // printf("\nmutation: \n");
  // for(int i=0;i<20;i++){
  //   printf("%d %d %d\n", mutaYes[i], mutaTem[i], mutaTem2[i]);
  // }
  float answer[3];
  answer[0] = 0;
  answer[1] = 0;
  answer[2] = sumCost[0][0];
  for(int i=0;i<ISLAND;i++){
		// printf("第%d島嶼(OF): \n", i);
		for(int p=0;p<POPULATION;p++){
			// printf("%f ", sumCost[i][p]);
      if(sumCost[i][p] < answer[2]){
        answer[0] = i;
        answer[1] = p;
        answer[2] = sumCost[i][p];
      }
			// printf("\n");
		}
	}


  printf("最小: %.0f %.0f = %f\n", answer[0], answer[1], answer[2]);



  // for(int i=0;i<ISLAND;i++){
  //   for(int p=0;p<POPULATION;p++){
  //     printf("\n交配結果(data2)%d\n", p);
  //     for(int f=0;f<FACILITY;f++){
  //       printf("%d ", data2[i][p][f]);
  //     }
  //     printf("\n");
  //   }
  // }

  // parent to child
	// printf("***chile to parent!!!***\n");
	for(int i=0;i<ISLAND;i++){
		// printf("island%d\n", i);
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY;f++){
				data[i][p][f] = data2[i][p][f];
				// printf("%d ", data[i][p][f]);
			}
			// printf("\n");
		}
	}

  // 子代BAY
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY-1;f++){
				bay[i][p][f] = bay2[i][p][f];
			}
		}
	}

  cudaFree(GA);
  cudaFree(GB);
  cudaFree(Gdata2);
  cudaFree(Gbay2);
  cudaFree(GsumCost);
  cudaFree(GminCost);
  cudaFree(GtotalCost);
  cudaFree(Gtem);
  cudaFree(Gtem2);
  cudaFree(GetP);
  cudaFree(GetP2);
  cudaFree(Gtest);
  cudaFree(Gprobability);
  cudaFree(Gprobability2);
  cudaFree(Gyes);
  cudaFree(Gsss);
  cudaFree(GmutaYes);
  cudaFree(GmutaTem);
  cudaFree(GmutaTem2);
  cudaFree(Gdistance);
  cudaFree(Gposition);
  } // GENERATION 結束

  END = clock();
  printf("程式執行所花費： %lf S\n", (double)clock()/CLOCKS_PER_SEC);
  printf("進行運算所花費的時間： %lf S\n", (END - START) / CLOCKS_PER_SEC);
  // cout << endl << "程式執行所花費：" << (double)clock()/CLOCKS_PER_SEC << " S" ;
  // cout << endl << "進行運算所花費的時間：" << (END - START) / CLOCKS_PER_SEC << " S" << endl;
  return 0;

}

void shuffle(int* facility) { // ���ñƧǦn��facility
    int i;
    for(i = 0; i < FACILITY; i++) {
        int j = rand() % FACILITY;
        int tmp = facility[i];
        facility[i] = facility[j];
        facility[j] = tmp;
    }
}

	.file	"tmpxft_002ad807_00000000-6_final_cuda.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	_Z7shufflePi
	.type	_Z7shufflePi, @function
_Z7shufflePi:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movl	$20, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
.L3:
	call	rand@PLT
	movl	0(%rbp,%rbx,4), %ecx
	cltd
	idivl	%r12d
	movslq	%edx, %rdx
	leaq	0(%rbp,%rdx,4), %rax
	movl	(%rax), %edx
	movl	%edx, 0(%rbp,%rbx,4)
	incq	%rbx
	movl	%ecx, (%rax)
	cmpq	$20, %rbx
	jne	.L3
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z7shufflePi, .-_Z7shufflePi
	.globl	_Z35__device_stub__Z11calPositionPiPsPfPiPsPf
	.type	_Z35__device_stub__Z11calPositionPiPsPfPiPsPf, @function
_Z35__device_stub__Z11calPositionPiPsPfPiPsPf:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L7
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z11calPositionPiPsPf(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L7:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z35__device_stub__Z11calPositionPiPsPfPiPsPf, .-_Z35__device_stub__Z11calPositionPiPsPfPiPsPf
	.globl	_Z11calPositionPiPsPf
	.type	_Z11calPositionPiPsPf, @function
_Z11calPositionPiPsPf:
.LFB2054:
	.cfi_startproc
	endbr64
	jmp	_Z35__device_stub__Z11calPositionPiPsPfPiPsPf
	.cfi_endproc
.LFE2054:
	.size	_Z11calPositionPiPsPf, .-_Z11calPositionPiPsPf
	.globl	_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_
	.type	_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_, @function
_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_:
.LFB2055:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L12
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z11calDistancePiPfS0_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L12:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2055:
	.size	_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_, .-_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_
	.globl	_Z11calDistancePiPfS0_
	.type	_Z11calDistancePiPfS0_, @function
_Z11calDistancePiPfS0_:
.LFB2056:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_
	.cfi_endproc
.LFE2056:
	.size	_Z11calDistancePiPfS0_, .-_Z11calDistancePiPfS0_
	.globl	_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_
	.type	_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_, @function
_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_:
.LFB2057:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L17
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z12calTotalcostPfPiS_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L17:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_, .-_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_
	.globl	_Z12calTotalcostPfPiS_
	.type	_Z12calTotalcostPfPiS_, @function
_Z12calTotalcostPfPiS_:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_
	.cfi_endproc
.LFE2058:
	.size	_Z12calTotalcostPfPiS_, .-_Z12calTotalcostPfPiS_
	.globl	_Z28__device_stub__Z5calOFPfS_S_PfS_S_
	.type	_Z28__device_stub__Z5calOFPfS_S_PfS_S_, @function
_Z28__device_stub__Z5calOFPfS_S_PfS_S_:
.LFB2059:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L22
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z5calOFPfS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L22:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2059:
	.size	_Z28__device_stub__Z5calOFPfS_S_PfS_S_, .-_Z28__device_stub__Z5calOFPfS_S_PfS_S_
	.globl	_Z5calOFPfS_S_
	.type	_Z5calOFPfS_S_, @function
_Z5calOFPfS_S_:
.LFB2060:
	.cfi_startproc
	endbr64
	jmp	_Z28__device_stub__Z5calOFPfS_S_PfS_S_
	.cfi_endproc
.LFE2060:
	.size	_Z5calOFPfS_S_, .-_Z5calOFPfS_S_
	.globl	_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_
	.type	_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_, @function
_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_:
.LFB2061:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L27
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z14calProbabilityPfS_S_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L27:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2061:
	.size	_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_, .-_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_
	.globl	_Z14calProbabilityPfS_S_
	.type	_Z14calProbabilityPfS_S_, @function
_Z14calProbabilityPfS_S_:
.LFB2062:
	.cfi_startproc
	endbr64
	jmp	_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_
	.cfi_endproc
.LFE2062:
	.size	_Z14calProbabilityPfS_S_, .-_Z14calProbabilityPfS_S_
	.globl	_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.type	_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, @function
_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_:
.LFB2063:
	.cfi_startproc
	endbr64
	subq	$296, %rsp
	.cfi_def_cfa_offset 304
	movq	304(%rsp), %rax
	movq	%rdi, 104(%rsp)
	leaq	128(%rsp), %rdi
	movq	%rsi, 96(%rsp)
	leaq	140(%rsp), %rsi
	movq	%rax, 56(%rsp)
	movq	312(%rsp), %rax
	movq	%rdx, 88(%rsp)
	leaq	112(%rsp), %rdx
	movq	%rax, 48(%rsp)
	movq	320(%rsp), %rax
	movq	%rcx, 80(%rsp)
	leaq	120(%rsp), %rcx
	movq	%rax, 40(%rsp)
	movq	328(%rsp), %rax
	movq	%r8, 72(%rsp)
	movq	%rax, 32(%rsp)
	movq	336(%rsp), %rax
	movq	%r9, 64(%rsp)
	movq	%rax, 24(%rsp)
	movq	344(%rsp), %rax
	movq	%rax, 16(%rsp)
	movq	352(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 280(%rsp)
	xorl	%eax, %eax
	leaq	104(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	88(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	80(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	72(%rsp), %rax
	movq	%rax, 208(%rsp)
	leaq	64(%rsp), %rax
	movq	%rax, 216(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 224(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 232(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 240(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 248(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 256(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 264(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 272(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 128(%rsp)
	movl	$1, 136(%rsp)
	movq	%rax, 140(%rsp)
	movl	$1, 148(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L32
	pushq	120(%rsp)
	.cfi_def_cfa_offset 312
	leaq	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_(%rip), %rdi
	pushq	120(%rsp)
	.cfi_def_cfa_offset 320
	movq	156(%rsp), %rcx
	movl	164(%rsp), %r8d
	movq	144(%rsp), %rsi
	movl	152(%rsp), %edx
	leaq	192(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 312
	popq	%rdx
	.cfi_def_cfa_offset 304
.L32:
	movq	280(%rsp), %rax
	subq	%fs:40, %rax
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	addq	$296, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2063:
	.size	_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, .-_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.globl	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.type	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, @function
_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_:
.LFB2064:
	.cfi_startproc
	endbr64
	jmp	_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.cfi_endproc
.LFE2064:
	.size	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, .-_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.globl	_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_
	.type	_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_, @function
_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_:
.LFB2065:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L37
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z8mutationPiS_S_S_(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L37:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L39
	call	__stack_chk_fail@PLT
.L39:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2065:
	.size	_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_, .-_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_
	.globl	_Z8mutationPiS_S_S_
	.type	_Z8mutationPiS_S_S_, @function
_Z8mutationPiS_S_S_:
.LFB2066:
	.cfi_startproc
	endbr64
	jmp	_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_
	.cfi_endproc
.LFE2066:
	.size	_Z8mutationPiS_S_S_, .-_Z8mutationPiS_S_S_
	.globl	_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_
	.type	_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_, @function
_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_:
.LFB2067:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L42
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z11mutationBayPsPiS0_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L42:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2067:
	.size	_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_, .-_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_
	.globl	_Z11mutationBayPsPiS0_
	.type	_Z11mutationBayPsPiS0_, @function
_Z11mutationBayPsPiS0_:
.LFB2068:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_
	.cfi_endproc
.LFE2068:
	.size	_Z11mutationBayPsPiS0_, .-_Z11mutationBayPsPiS0_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"new island%d\n"
.LC2:
	.string	"%d "
.LC3:
	.string	"\n"
.LC4:
	.string	"data\n"
.LC5:
	.string	"bay\n"
.LC6:
	.string	"r"
.LC7:
	.string	"cost.txt"
.LC8:
	.string	"%d %d %d"
.LC9:
	.string	"cost: \n"
.LC10:
	.string	"\n*****%d\347\232\204generation*****\n"
.LC11:
	.string	"\ncalculate distance end\n"
.LC13:
	.string	"\nready to mutation\n"
.LC14:
	.string	"\346\234\200\345\260\217: %.0f %.0f = %f\n"
.LC16:
	.string	"\347\250\213\345\274\217\345\237\267\350\241\214\346\211\200\350\212\261\350\262\273\357\274\232 %lf S\n"
.LC17:
	.string	"\351\200\262\350\241\214\351\201\213\347\256\227\346\211\200\350\212\261\350\262\273\347\232\204\346\231\202\351\226\223\357\274\232 %lf S\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-1822720(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2568, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	clock@PLT
	xorl	%edi, %edi
	cvtsi2sdq	%rax, %xmm4
	movsd	%xmm4, -1825288(%rbp)
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	leaq	-1799056(%rbp), %rax
	movq	%rax, -1825264(%rbp)
	movq	%rax, %r13
.L53:
	movl	%ebx, %edx
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	imulq	$4000, %rbx, %r12
	leaq	-1760056(%rbp), %rax
	movq	%r13, %r15
	movq	%rax, -1825272(%rbp)
	movl	$50, -1825256(%rbp)
	addq	%rax, %r12
.L48:
	xorl	%eax, %eax
	leaq	-1824816(%rbp), %r14
.L49:
	movl	%eax, (%r14,%rax,4)
	incq	%rax
	cmpq	$20, %rax
	jne	.L49
	movq	%r14, %rdi
	call	_Z7shufflePi
	xorl	%ecx, %ecx
.L50:
	movl	(%r14,%rcx), %edx
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movq	%rcx, -1825280(%rbp)
	movl	%edx, (%r12,%rcx)
	call	__printf_chk@PLT
	movq	-1825280(%rbp), %rcx
	addq	$4, %rcx
	cmpq	$80, %rcx
	jne	.L50
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
.L51:
	call	rand@PLT
	movl	$2, %ecx
	cltd
	idivl	%ecx
	movw	%dx, (%r15,%r14,2)
	incq	%r14
	cmpq	$19, %r14
	jne	.L51
	addq	$38, %r15
	addq	$80, %r12
	decl	-1825256(%rbp)
	jne	.L48
	incq	%rbx
	addq	$1900, %r13
	cmpq	$10, %rbx
	jne	.L53
	leaq	.LC4(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__printf_chk@PLT
	movq	-1825272(%rbp), %r13
.L54:
	leaq	4000(%r13), %r12
.L58:
	xorl	%r14d, %r14d
.L55:
	movl	0(%r13,%r14,4), %edx
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%r14
	call	__printf_chk@PLT
	cmpq	$20, %r14
	jne	.L55
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$80, %r13
	call	__printf_chk@PLT
	cmpq	%r12, %r13
	jne	.L58
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$4000, %rbx
	call	__printf_chk@PLT
	cmpq	$40000, %rbx
	jne	.L54
	leaq	.LC5(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__printf_chk@PLT
	movq	-1825264(%rbp), %rbx
.L59:
	leaq	1900(%rbx), %r13
.L63:
	xorl	%r14d, %r14d
.L60:
	movswl	(%rbx,%r14,2), %edx
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%r14
	call	__printf_chk@PLT
	cmpq	$19, %r14
	jne	.L60
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$38, %rbx
	call	__printf_chk@PLT
	cmpq	%r13, %rbx
	jne	.L63
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$1900, %r12
	call	__printf_chk@PLT
	cmpq	$19000, %r12
	jne	.L59
	leaq	.LC7(%rip), %rdi
	leaq	.LC6(%rip), %rsi
	call	fopen@PLT
	leaq	-1824656(%rbp), %rdi
	movl	$400, %ecx
	leaq	-1824656(%rbp), %r12
	movq	%rax, -1825256(%rbp)
	xorl	%eax, %eax
	rep stosl
	leaq	-4096(%rsp), %rax
.L64:
	cmpq	%rax, %rsp
	je	.L65
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L64
.L65:
	subq	$464, %rsp
	orq	$0, 456(%rsp)
	leaq	.LC8(%rip), %r14
	movq	%rsp, %r15
	leaq	4560(%r15), %r13
	movq	%r15, %rbx
.L67:
	movq	-1825256(%rbp), %rdi
	leaq	4(%rbx), %rcx
	movq	%rbx, %rdx
	xorl	%eax, %eax
	leaq	8(%rbx), %r8
	movq	%r14, %rsi
	addq	$12, %rbx
	call	__isoc23_fscanf@PLT
	cmpq	%r13, %rbx
	jne	.L67
	movq	-1825256(%rbp), %rdi
	call	fclose@PLT
.L68:
	movl	4(%r15), %eax
	addq	$12, %r15
	leal	-1(%rax), %edx
	movl	-12(%r15), %eax
	movslq	%edx, %rdx
	decl	%eax
	cltq
	imulq	$20, %rax, %rax
	addq	%rdx, %rax
	movl	-4(%r15), %edx
	movl	%edx, -1824656(%rbp,%rax,4)
	cmpq	%r13, %r15
	jne	.L68
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	movq	%r12, %r14
	call	__printf_chk@PLT
	leaq	-1823056(%rbp), %rbx
.L69:
	xorl	%r13d, %r13d
.L70:
	movl	(%r14,%r13,4), %edx
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%r13
	call	__printf_chk@PLT
	cmpq	$20, %r13
	jne	.L70
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$80, %r14
	call	__printf_chk@PLT
	cmpq	%rbx, %r14
	jne	.L69
	leaq	-1825248(%rbp), %rdi
	movl	$1600, %esi
	movl	$2147483653, %ebx
	call	cudaMalloc@PLT
	movl	$1600, %edx
	movq	%r12, %rsi
	addq	%rbx, %rbx
	movq	-1825248(%rbp), %rdi
	movl	$1, %ecx
	movabsq	$4294967346, %r12
	call	cudaMemcpy@PLT
	xorl	%edx, %edx
	movl	%edx, -1825256(%rbp)
.L98:
	movl	-1825256(%rbp), %edx
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	-1825240(%rbp), %rdi
	movl	$40000, %esi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movq	-1825240(%rbp), %rdi
	movl	$40000, %edx
	leaq	-1760056(%rbp), %rsi
	call	cudaMemcpy@PLT
	leaq	-1825232(%rbp), %rdi
	movl	$19000, %esi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movq	-1825232(%rbp), %rdi
	movl	$19000, %edx
	leaq	-1799056(%rbp), %rsi
	call	cudaMemcpy@PLT
	leaq	-1825224(%rbp), %rdi
	movl	$80000, %esi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L72
	movq	-1825224(%rbp), %rdx
	movq	-1825232(%rbp), %rsi
	movq	-1825240(%rbp), %rdi
	call	_Z35__device_stub__Z11calPositionPiPsPfPiPsPf
.L72:
	movq	-1825224(%rbp), %rsi
	movl	$80000, %edx
	movl	$2, %ecx
	leaq	-1680056(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	movl	$200000, %ecx
	leaq	-1600056(%rbp), %rdi
	rep stosl
	movl	$800000, %esi
	leaq	-1825216(%rbp), %rdi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L73
	movq	-1825216(%rbp), %rdx
	movq	-1825224(%rbp), %rsi
	movq	-1825240(%rbp), %rdi
	call	_Z36__device_stub__Z11calDistancePiPfS0_PiPfS0_
.L73:
	movq	-1825216(%rbp), %rsi
	movl	$800000, %edx
	movl	$2, %ecx
	leaq	-1600056(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%eax, %eax
	movl	$200000, %ecx
	leaq	-800056(%rbp), %rdi
	rep stosl
	movl	$800000, %esi
	leaq	-1825208(%rbp), %rdi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L74
	movq	-1825208(%rbp), %rdx
	movq	-1825248(%rbp), %rsi
	movq	-1825216(%rbp), %rdi
	call	_Z36__device_stub__Z12calTotalcostPfPiS_PfPiS_
.L74:
	movq	-1825208(%rbp), %rsi
	movl	$800000, %edx
	movl	$2, %ecx
	leaq	-800056(%rbp), %rdi
	leaq	-1823056(%rbp), %r15
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
	movl	$500, %ecx
	leaq	-1823056(%rbp), %rdi
	rep stosl
	movl	$2000, %esi
	leaq	-1825200(%rbp), %rdi
	call	cudaMalloc@PLT
	leaq	-1825192(%rbp), %rdi
	movl	$80, %esi
	call	cudaMalloc@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L75
	movq	-1825208(%rbp), %rdx
	movq	-1825192(%rbp), %rsi
	movq	-1825200(%rbp), %rdi
	call	_Z28__device_stub__Z5calOFPfS_S_PfS_S_
.L75:
	movq	-1825200(%rbp), %rsi
	movl	$2, %ecx
	movl	$2000, %edx
	movq	%r15, %rdi
	leaq	-1821056(%rbp), %r13
	call	cudaMemcpy@PLT
	movl	$80, %edx
	movq	-1825192(%rbp), %rsi
	movl	$2, %ecx
	leaq	-1824736(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	-1825184(%rbp), %rdi
	movl	$40000, %esi
	call	cudaMalloc@PLT
	leaq	-1825176(%rbp), %rdi
	movl	$20000, %esi
	call	cudaMalloc@PLT
	xorl	%eax, %eax
	movl	$500, %ecx
	leaq	-1821056(%rbp), %rdi
	rep stosl
	movl	$2000, %esi
	leaq	-1825168(%rbp), %rdi
	call	cudaMalloc@PLT
	xorl	%eax, %eax
	movl	$10, %ecx
	leaq	-1825016(%rbp), %rdi
	rep stosl
	movl	$40, %esi
	leaq	-1825160(%rbp), %rdi
	call	cudaMalloc@PLT
	leaq	-1825016(%rbp), %rax
	movsd	.LC12(%rip), %xmm2
	movq	%r15, %rcx
	movq	%rax, %rsi
.L76:
	movss	(%rax), %xmm0
	xorl	%edx, %edx
.L77:
	movaps	%xmm2, %xmm1
	cvtss2sd	(%rcx,%rdx,4), %xmm3
	cvtss2sd	%xmm0, %xmm0
	incq	%rdx
	divsd	%xmm3, %xmm1
	addsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	cmpq	$50, %rdx
	jne	.L77
	addq	$200, %rcx
	movss	%xmm0, (%rax)
	addq	$4, %rax
	cmpq	%r13, %rcx
	jne	.L76
	movq	-1825160(%rbp), %rdi
	movl	$1, %ecx
	movl	$40, %edx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L79
	movq	-1825200(%rbp), %rdx
	movq	-1825160(%rbp), %rsi
	movq	-1825168(%rbp), %rdi
	call	_Z38__device_stub__Z14calProbabilityPfS_S_PfS_S_
.L79:
	movq	-1825168(%rbp), %rsi
	movl	$2, %ecx
	movq	%r13, %rdi
	movl	$2000, %edx
	leaq	-1819056(%rbp), %r14
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
	movl	$500, %ecx
	leaq	-1819056(%rbp), %rdi
	rep stosl
	xorl	%eax, %eax
.L80:
	leaq	(%r14,%rax), %rcx
	xorl	%edx, %edx
	leaq	0(%r13,%rax), %rdi
.L84:
	movss	(%rcx), %xmm0
	xorl	%esi, %esi
.L81:
	addss	(%rdi,%rsi,4), %xmm0
	incq	%rsi
	cmpl	%esi, %edx
	jge	.L81
	incl	%edx
	movss	%xmm0, (%rcx)
	addq	$4, %rcx
	cmpl	$50, %edx
	jne	.L84
	addq	$200, %rax
	cmpq	$2000, %rax
	jne	.L80
	leaq	-1825152(%rbp), %rdi
	movl	$2000, %esi
	xorl	%r13d, %r13d
	call	cudaMalloc@PLT
	movq	-1825152(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$2000, %edx
	leaq	-1817056(%rbp), %r14
	call	cudaMemcpy@PLT
	leaq	-1825144(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825136(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825128(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825120(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825112(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825104(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825096(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
.L85:
	call	rand@PLT
	movl	%eax, (%r14,%r13)
	call	rand@PLT
	leaq	-1815056(%rbp), %rcx
	movq	%rcx, -1825280(%rbp)
	movl	%eax, -1815056(%rbp,%r13)
	call	rand@PLT
	leaq	-1813056(%rbp), %rcx
	movq	%rcx, -1825296(%rbp)
	movl	%eax, -1813056(%rbp,%r13)
	call	rand@PLT
	leaq	-1811056(%rbp), %rcx
	movq	%rcx, -1825304(%rbp)
	movl	%eax, -1811056(%rbp,%r13)
	call	rand@PLT
	leaq	-1809056(%rbp), %rcx
	movq	%rcx, -1825312(%rbp)
	movl	%eax, -1809056(%rbp,%r13)
	call	rand@PLT
	leaq	-1807056(%rbp), %rcx
	movl	%eax, -1807056(%rbp,%r13)
	movq	%rcx, -1825320(%rbp)
	call	rand@PLT
	leaq	-1805056(%rbp), %rdx
	movl	%eax, -1805056(%rbp,%r13)
	addq	$4, %r13
	movq	%rdx, -1825328(%rbp)
	cmpq	$2000, %r13
	jne	.L85
	movq	-1825144(%rbp), %rdi
	movl	$1, %ecx
	movl	$2000, %edx
	movq	%r14, %rsi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	movq	-1825280(%rbp), %rsi
	movq	-1825136(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	movq	-1825296(%rbp), %rsi
	movq	-1825128(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	movq	-1825304(%rbp), %rsi
	movq	-1825120(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	movq	-1825312(%rbp), %rsi
	movq	-1825112(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	movq	-1825320(%rbp), %rsi
	movq	-1825104(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	movq	-1825328(%rbp), %rsi
	movq	-1825096(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	-1825088(%rbp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	leaq	-1825080(%rbp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	leaq	-1825072(%rbp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	leaq	-1825064(%rbp), %rdi
	movl	$40, %esi
	call	cudaMalloc@PLT
	xorl	%eax, %eax
	movl	$10, %ecx
	xorl	%r9d, %r9d
	leaq	-1824896(%rbp), %rdi
	xorl	%r8d, %r8d
	movabsq	$4294967321, %rdx
	movl	$1, %esi
	rep stosl
	movl	$1, %ecx
	movq	%rbx, %rdi
	movq	%rdx, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L86
	pushq	%rax
	movq	-1825176(%rbp), %r8
	pushq	-1825064(%rbp)
	movq	-1825232(%rbp), %rdx
	movq	-1825152(%rbp), %rdi
	pushq	-1825072(%rbp)
	pushq	-1825080(%rbp)
	pushq	-1825088(%rbp)
	pushq	-1825120(%rbp)
	pushq	-1825128(%rbp)
	pushq	-1825136(%rbp)
	movq	-1825144(%rbp), %r9
	movq	-1825184(%rbp), %rcx
	movq	-1825240(%rbp), %rsi
	call	_Z61__device_stub__Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_PfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	addq	$64, %rsp
.L86:
	movq	-1825184(%rbp), %rsi
	movl	$2, %ecx
	movl	$40000, %edx
	leaq	-1720056(%rbp), %r13
	movq	%r13, %rdi
	call	cudaMemcpy@PLT
	xorl	%eax, %eax
	movl	$10, %ecx
	movq	-1825144(%rbp), %rsi
	leaq	-1824856(%rbp), %rdi
	movl	$2000, %edx
	rep stosl
	movl	$2, %ecx
	movq	%r14, %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$2000, %edx
	movq	-1825136(%rbp), %rsi
	leaq	-1815056(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$2000, %edx
	movq	-1825128(%rbp), %rsi
	leaq	-1813056(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$2000, %edx
	movq	-1825120(%rbp), %rsi
	leaq	-1811056(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$40, %edx
	movq	-1825088(%rbp), %rsi
	leaq	-1824856(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$40, %edx
	movq	-1825080(%rbp), %rsi
	leaq	-1824976(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$40, %edx
	movq	-1825072(%rbp), %rsi
	leaq	-1824936(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movq	-1825064(%rbp), %rsi
	movl	$40, %edx
	leaq	-1824896(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L87
	movq	-1825096(%rbp), %rcx
	movq	-1825104(%rbp), %rdx
	movq	-1825112(%rbp), %rsi
	movq	-1825184(%rbp), %rdi
	call	_Z33__device_stub__Z8mutationPiS_S_S_PiS_S_S_
.L87:
	movq	-1825112(%rbp), %rsi
	movl	$2, %ecx
	leaq	-1809056(%rbp), %rdi
	movl	$2000, %edx
	leaq	-1801056(%rbp), %r14
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movl	$2000, %edx
	movq	-1825104(%rbp), %rsi
	leaq	-1807056(%rbp), %rdi
	call	cudaMemcpy@PLT
	movl	$2, %ecx
	movq	-1825096(%rbp), %rsi
	movl	$2000, %edx
	leaq	-1805056(%rbp), %rdi
	call	cudaMemcpy@PLT
	leaq	-1825056(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	leaq	-1825048(%rbp), %rdi
	movl	$2000, %esi
	call	cudaMalloc@PLT
	movl	$1, %ecx
	movl	$2000, %edx
	leaq	-1803056(%rbp), %rax
	movq	-1825056(%rbp), %rdi
	movq	%rax, %rsi
	movq	%rax, -1825280(%rbp)
	call	cudaMemcpy@PLT
	movq	-1825048(%rbp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$2000, %edx
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, -1825028(%rbp)
	movl	$1, -1825020(%rbp)
	movq	%rbx, -1825040(%rbp)
	movl	$1, -1825032(%rbp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L88
	movq	-1825048(%rbp), %rdx
	movq	-1825056(%rbp), %rsi
	movq	-1825176(%rbp), %rdi
	call	_Z36__device_stub__Z11mutationBayPsPiS0_PsPiS0_
.L88:
	movq	-1825056(%rbp), %rsi
	movl	$2, %ecx
	movl	$2000, %edx
	movq	-1825280(%rbp), %rdi
	call	cudaMemcpy@PLT
	movq	-1825048(%rbp), %rsi
	movl	$2000, %edx
	movq	%r14, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	incl	-1825256(%rbp)
	xorps	%xmm1, %xmm1
	xorl	%edx, %edx
	movss	-1823056(%rbp), %xmm2
	movaps	%xmm1, %xmm0
.L89:
	xorl	%eax, %eax
.L92:
	movss	(%r15,%rax,4), %xmm3
	comiss	%xmm3, %xmm2
	jbe	.L90
	cvtsi2ssl	%edx, %xmm0
	movaps	%xmm3, %xmm2
	cvtsi2ssl	%eax, %xmm1
.L90:
	incq	%rax
	cmpq	$50, %rax
	jne	.L92
	incl	%edx
	addq	$200, %r15
	cmpl	$10, %edx
	jne	.L89
	movl	$2, %edi
	movb	$3, %al
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm2, %xmm2
	leaq	.LC14(%rip), %rsi
	cvtss2sd	%xmm1, %xmm1
	call	__printf_chk@PLT
	xorl	%eax, %eax
.L94:
	movq	-1825272(%rbp), %rcx
	leaq	0(%r13,%rax), %rsi
	leaq	(%rax,%rcx), %rdx
	addq	$4000, %rax
	movl	$1000, %ecx
	movq	%rdx, %rdi
	rep movsl
	cmpq	$40000, %rax
	jne	.L94
	xorl	%r10d, %r10d
	xorl	%r8d, %r8d
	leaq	-1780056(%rbp), %r11
.L95:
	movq	-1825264(%rbp), %rax
	movl	$50, %r9d
	leaq	(%r8,%rax), %rdx
	leaq	(%r11,%r10), %rax
.L96:
	movq	%rdx, %rdi
	movq	%rax, %rsi
	movl	$38, %ecx
	addq	$40, %rax
	rep movsb
	movq	%rdi, %rdx
	decl	%r9d
	jne	.L96
	addq	$1900, %r8
	addq	$2000, %r10
	cmpq	$19000, %r8
	jne	.L95
	movq	-1825240(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825232(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825184(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825176(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825200(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825192(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825208(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825144(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825136(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825080(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825072(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825064(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825168(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825152(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825128(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825120(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825112(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825104(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825096(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825216(%rbp), %rdi
	call	cudaFree@PLT
	movq	-1825224(%rbp), %rdi
	call	cudaFree@PLT
	cmpl	$10, -1825256(%rbp)
	jne	.L98
	call	clock@PLT
	cvtsi2sdq	%rax, %xmm5
	movq	%xmm5, %rbx
	call	clock@PLT
	leaq	.LC16(%rip), %rsi
	movl	$2, %edi
	cvtsi2sdq	%rax, %xmm0
	movb	$1, %al
	divsd	.LC15(%rip), %xmm0
	call	__printf_chk@PLT
	leaq	.LC17(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	movq	%rbx, %xmm0
	subsd	-1825288(%rbp), %xmm0
	divsd	.LC15(%rip), %xmm0
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L99
	call	__stack_chk_fail@PLT
.L99:
	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
.LFE2027:
	.size	main, .-main
	.section	.rodata.str1.1
.LC18:
	.string	"_Z11mutationBayPsPiS0_"
.LC19:
	.string	"_Z8mutationPiS_S_S_"
.LC20:
	.string	"_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_"
.LC21:
	.string	"_Z14calProbabilityPfS_S_"
.LC22:
	.string	"_Z5calOFPfS_S_"
.LC23:
	.string	"_Z12calTotalcostPfPiS_"
.LC24:
	.string	"_Z11calDistancePiPfS0_"
.LC25:
	.string	"_Z11calPositionPiPsPf"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2070:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -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	.LC18(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z11mutationBayPsPiS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC19(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z8mutationPiS_S_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC20(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC21(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z14calProbabilityPfS_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC22(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z5calOFPfS_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC23(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z12calTotalcostPfPiS_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC24(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z11calDistancePiPfS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC25(%rip), %rdx
	movq	%rbx, %rdi
	leaq	_Z11calPositionPiPsPf(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	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	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2070:
	.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
.LC12:
	.long	0
	.long	1072693248
	.align 8
.LC15:
	.long	0
	.long	1093567616
	.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 <stdio.h>
#include <hip/hip_runtime.h>
#include <time.h>
#include <math.h>


#define ISLAND 10
#define POPULATION 50
#define FACILITY 20
#define GENERATION 10
#define CROSSOVER 0.6
#define MUTATION 0.03
#define MIGRATION 15
#define INDIVIDUAL 5

#define H 15 // BAY height
#define W 10 // BAY width

void shuffle(int* facility);

__global__ void calPosition(int *data, short int *bay, float *position){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;
  int bayposit = x * (FACILITY-1);
  // int posit=b*POPULATION*FACILITY+t*FACILITY;            //執行緒在陣列中對應的位置
  // int posofposit = b*POPULATION*FACILITY*2+t*FACILITY*2;

  for(int i=0;i<ISLAND*POPULATION*FACILITY*2;i++){
    position[i] = 0;
  }


			int len = 1;
			int next = 0;
			for(int f=0;f<FACILITY;f++){
				if(bay[bayposit+f] == 0){
					len = len + 1;
				}
				if(bay[bayposit+f] == 1 || f == FACILITY - 1 ){
					if(f == FACILITY - 1 && bay[bayposit+f] == 0){
						len = len - 1;
					}
					float x = W / 2.0 + next;

					for(int j=0;j<len;j++){

						position[posit*2+(f+j-len+1)*2] = x;

						float y = H / (len * 2.0) * ( (j * 2) + 1) ;

						position[posit*2+(f+j-len+1)*2+1] = y;
					}
					len = 1;

					next = next + W;
				}
			}
}

__global__ void calDistance(int *data, float *position, float *distance){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  // int posit=b*POPULATION*FACILITY+t*FACILITY;            //執行緒在陣列中對應的位置
  // int posofposit = b*POPULATION*FACILITY*2+t*FACILITY*2;

  for(int i=0;i<ISLAND*POPULATION*FACILITY*FACILITY;i++){
    distance[i] = 0;
  }


  for(int f=0;f<FACILITY;f++){
    // printf("\ndistance calculate facility%d\n", f);
    for(int j=f+1;j<FACILITY;j++){

      float x1 = position[ (posit + f)*2 ];
      float y1 = position[ (posit + f)*2 + 1];

      int x = data[ posit + f ];
      // printf("x = %d\n", x);
      float x2 = position[ (posit + j)*2 ];
      float y2 = position[ (posit + j)*2 + 1];
      int y = data[ posit + j ];
      // printf("y= %d\n", y);
      if(y2 > y1){
        distance[ (posit + x)*FACILITY + y] = sqrt( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) ) ;
        distance[ (posit + y)*FACILITY + x] = sqrt( (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1) ) ;
      }
      else{
        distance[ (posit + x)*FACILITY + y] = sqrt( (x2 - x1) * (x2 - x1) + (y1 - y2) * (y1 - y2) ) ;
        distance[ (posit + y)*FACILITY + x] = sqrt( (x2 - x1) * (x2 - x1) + (y1 - y2) * (y1 - y2) ) ;
      }
    }
  }

}

__global__ void calTotalcost(float *distance, int *cost, float *totalCost){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  // int posit=b*POPULATION*FACILITY+t*FACILITY;            //執行緒在陣列中對應的位置
  // int posofposit = b*POPULATION*FACILITY*2+t*FACILITY*2;

  // for(int i=0;i<ISLAND*POPULATION*FACILITY*FACILITY;i++){
  //   totalCost[i] = 0;
  // }


	for(int f=0;f<FACILITY;f++){
		for(int j=0;j<FACILITY;j++){
			totalCost[ (posit + f)*FACILITY + j] = cost[f*FACILITY + j] * distance[ (posit + f)*FACILITY + j];
		}
	}

}

__global__ void calOF(float *sumCost, float *minCost, float *totalCost){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  // calculate OF

	sumCost[x] = 0.0;
	minCost[x/POPULATION * 2] = 0.0;


			for(int f=0;f<FACILITY;f++){
				for(int j=0;j<FACILITY;j++){
					sumCost[x] += totalCost[ (posit + f)*FACILITY + j];
				}
			}
			if(x % POPULATION==0){
				minCost[(x/POPULATION)*2] = sumCost[x*FACILITY + 0];
				minCost[(x/POPULATION)*2 + 1] = 0;
			}else if(minCost[x/POPULATION] > sumCost[x]){
				minCost[(x/POPULATION)*2] = sumCost[x];
				minCost[(x/POPULATION)*2 + 1] = x % POPULATION;
			}


}


__global__ void calProbability(float *probability, float *totalPro, float *sumCost){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;


  probability[x] = (1.0 / sumCost[x]) / (totalPro[ x / POPULATION ]) ;

}


__global__ void crossOver(float *probability2, int *data, short int *bay, int *data2, short int *bay2, int *tem, int *tem2, int *Gyes, int *Gsss, int *Gcount, int *GGgetP, int *GGgetP2, float *test){

  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * 2 * FACILITY;
  int posit2 = (2*x+1) * FACILITY;
  int bayposit = x * 2 * (FACILITY-1);
  int bayposit2 = (2*x+1) * (FACILITY-1);

			float get = (tem[x] % 100) * 0.01;
      test[x] = 0.0;
      tem[x] = tem[x] % 100;
			int getP = 0;
			float get2 = tem2[x] % 100 * 0.01;
      tem2[x] = tem2[x] % 100;
			int getP2 = 0;
      GGgetP2[x] = -1;
			for(int p=0;p<POPULATION-1;p++){
				if(get >= probability2[ (x/POPULATION)*POPULATION + p ] && get < probability2[ (x/POPULATION)*POPULATION + p+1 ]){
					getP = p+1;
          GGgetP2[x] = (x/POPULATION)*POPULATION + p;
					break;
				}
				else if(p==POPULATION-2){
					getP = p+1;
					break;
				}
			}
      test[x] = probability2[ (x/POPULATION)*POPULATION + 1];

			for(int p=0;p<POPULATION-1;p++){
				if(get2 >= probability2[x/POPULATION*POPULATION + p] && get2 < probability2[x/POPULATION*POPULATION + p+1]){
					getP2 = p+1;

					break;
				}
				else if(p==POPULATION-2){
					getP2 = p+1;

					break;
				}
			}

			for(int f=0;f<FACILITY;f++){
				data2[ posit + f] = data[ x/POPULATION*POPULATION*FACILITY + getP*FACILITY + f];
				bay2[ (2 * x)*(FACILITY-1) + f] = bay[ x/POPULATION*POPULATION*(FACILITY-1) + getP*(FACILITY-1) + f];
			}




			for(int f=0;f<FACILITY;f++){
				data2[ posit2 + f ] = data[x/POPULATION*POPULATION*FACILITY + getP2*FACILITY + f];
				bay2[ (2 * x + 1)*(FACILITY-1) + f] = bay[x/POPULATION*POPULATION*(FACILITY-1) + getP2*(FACILITY-1) + f];
			}


      int tt = Gyes[x] % 100;
			float yes = tt * 0.01;
      Gyes[x] = tt;

			if(yes <= CROSSOVER){

				int sss = FACILITY - 1;
        int seq = Gsss[x] % sss;
        Gsss[x] = seq;


				int cross[4][2];

				cross[0][0] = data2[ posit + seq];
				cross[0][1] = data2[ posit2 + seq];
				cross[1][0] = data2[ posit + seq];
				cross[1][1] = data2[ posit2 + seq+1];
				cross[2][0] = data2[ posit + seq+1];
				cross[2][1] = data2[ posit2 + seq];
				cross[3][0] = data2[ posit+ seq+1];
				cross[3][1] = data2[ posit2 + seq+1];



				int temp = data2[ posit2 + seq];

				int temp2 = data2[posit2 + seq+1];

				data2[ posit2 + seq] = data2[ posit + seq];

				data2[ posit2 + seq+1] = data2[posit + seq+1];

				data2[posit + seq] = temp;
				data2[posit + seq+1] = temp2;



				int count = 0;
				for(int c=0;c<4;c++){
					if(cross[c][0] == cross[c][1]){
						count++;
					}
				}
        Gcount[x] = count;

				switch (count) {
					case 0:
						for(int c=0;c<FACILITY;c++){
							if(c != seq){
								if(data2[posit + c] == cross[0][1]){
									data2[ posit + c] = cross[0][0];
								}
								if(data2[posit + c] == cross[3][1]){
									data2[ posit + c] = cross[3][0];
								}
							}
							else{
								c++;
							}
						}

						for(int c=0;c<FACILITY;c++){
							if(c != seq){
								if(data2[posit2 + c] == cross[0][0]){
									data2[ posit2 + c] = cross[0][1];
								}
								if(data2[posit2 + c] == cross[3][0]){
									data2[ posit2 + c] = cross[3][1];
								}
							}
							else{
								c++;
							}
						}
						break;
					case 1:
						temp = 99;
						for(int c=0;c<4;c++){
							if(cross[c][0] == cross[c][1]){
								temp = cross[c][0];
							}
						}

						for(int c=0;c<4;c++){
							if(cross[c][0] != temp && cross[c][1] != temp){
								for(int f=0;f<FACILITY;f++){
									if(f != seq){
										if(data2[posit + f] == cross[c][1]){
											data2[ posit + f] = cross[c][0];
										}
									}
									else{
										f++;
									}
								}
							}
						}

						for(int c=0;c<4;c++){
							if(cross[c][0] != temp && cross[c][1] != temp){
								for(int f=0;f<FACILITY;f++){
									if(f != seq){
										if(data2[posit2 + f] == cross[c][0]){
											data2[ posit2 + f] = cross[c][1];
										}
									}
									else{
										f++;
									}
								}
							}
						}
						break;
					case 2:
						break;
				}




				temp = bay2[bayposit2 + seq];
				temp2 = bay2[bayposit2 + seq+1];
				bay2[bayposit2 + seq]   = bay2[bayposit + seq];
				bay2[bayposit2 + seq+1] = bay2[bayposit + seq+1];
				bay2[bayposit + seq]   = bay2[bayposit2 + seq];
				bay2[bayposit + seq+1] = bay2[bayposit2 + seq+1];
			}else {

			}



}

__global__ void mutation(int *data2, int *mutaYes, int *mutaTem, int *mutaTem2){
  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * FACILITY;

  float yes = (mutaYes[x] % 100) * 0.01;
	// fprintf(FIN, "取得%f \n", yes);
	if(yes < MUTATION){
		// fprintf(FIN, "第%d突變\n", p);
		int get = mutaTem[x] % FACILITY;
		int get2 = mutaTem2[x] % FACILITY;
		int temp = data2[posit + get];
		data2[posit + get] = data2[posit + get2];
		data2[posit + get2] = temp;
	}else {
	}
}

__global__ void mutationBay(short int *bay2, int *mutaBayYes, int *mutaBayTem){
  int b=blockIdx.x;       //區塊索引 == ISLAND
  int t=threadIdx.x;      //執行緒索引 == POPULATION
  int n=blockDim.x;       //區塊中包含的執行緒數目 == num of ISLAND
  int x=b*n+t;

  int posit = x * (FACILITY - 1);

	float yes = mutaBayYes[x] % 100 * 0.01 ;
	if(yes < MUTATION){
		int get = mutaBayTem[x] % (FACILITY - 1);
		if(bay2[posit + get] == 0){
			bay2[posit + get] = 1;
		}else {
			bay2[posit + get] = 0;
		}
	}
}

int main(){
  double START,END;
  START = clock();
  srand(time(NULL));

  int data[ISLAND][POPULATION][FACILITY];
  short int bay[ISLAND][POPULATION][FACILITY-1]; //bay

  int facility[FACILITY];

  for(int i=0;i<ISLAND;i++){ // shuffle the sorted facility
		printf("new island%d\n", i);
		for(int p=0;p<POPULATION;p++){
			for(int t=0;t<FACILITY;t++){
		    facility[t] = t;
			}
			shuffle(facility);
			// for(int t=0;t<FACILITY;t++){
			// 	printf("%d ", facility[t]);
			// }
			for(int f=0;f<FACILITY;f++){
				data[i][p][f] = facility[f];
				printf("%d ", data[i][p][f]);
			}
			printf("\n");
			for(int b=0;b<FACILITY-1;b++){
				int j = rand() % 2;
		    bay[i][p][b] = j;
			}
		}
	}

  printf("data\n");
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY;f++){
				printf("%d ", data[i][p][f]);
			}
			printf("\n");
		}
		printf("\n");
	}

  printf("bay\n");
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY-1;f++){
				printf("%d ", bay[i][p][f]);
			}
			printf("\n");
		}
		printf("\n");
	}

  // int *GA;
  // short int *GB;
  // cudaMalloc((void**)&GA, ISLAND*POPULATION*FACILITY*sizeof(int));
	// cudaMemcpy(GA, data, ISLAND*POPULATION*FACILITY*sizeof(int), cudaMemcpyHostToDevice);
  //
	// cudaMalloc((void**)&GB, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int));
	// cudaMemcpy(GB, bay, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int), cudaMemcpyHostToDevice);

  // read ther cost
	FILE *fPtr;

  int ttt = FACILITY * (FACILITY-1);

	fPtr=fopen("cost.txt","r");
	int cost[FACILITY][FACILITY] = {0};
	int temp[ttt][3]; // cost
	for(int i=0;i<ttt;i++){
		fscanf(fPtr , "%d %d %d" , &temp[i][0], &temp[i][1], &temp[i][2]);
	}
	fclose(fPtr);
	for(int i=0;i<ttt;i++){ // 2 dimention cost
		cost[ temp[i][0]-1 ][ temp[i][1]-1] = temp[i][2];
	}
  printf("cost: \n");
  for(int i=0;i<FACILITY;i++){ // 2 dimention cost
    for(int j=0;j<FACILITY;j++){
      printf("%d ", cost[i][j]);
    }
    printf("\n");
	}
  int *Gcost;
  hipMalloc((void**)&Gcost, FACILITY*FACILITY*sizeof(int));
  hipMemcpy(Gcost, cost, FACILITY*FACILITY*sizeof(int), hipMemcpyHostToDevice);


  for(int gggggg=0;gggggg<GENERATION;gggggg++){ // generation

  printf("\n*****%d的generation*****\n", gggggg);
  int *GA;
  short int *GB;
  hipMalloc((void**)&GA, ISLAND*POPULATION*FACILITY*sizeof(int));
	hipMemcpy(GA, data, ISLAND*POPULATION*FACILITY*sizeof(int), hipMemcpyHostToDevice);

	hipMalloc((void**)&GB, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int));
	hipMemcpy(GB, bay, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int), hipMemcpyHostToDevice);


  float *Gposition;
  hipMalloc((void**)&Gposition, ISLAND*POPULATION*FACILITY*2*sizeof(float));

  // int *Gposition2;
  // cudaMalloc((void**)&Gposition2, ISLAND*POPULATION*FACILITY*2*sizeof(int));

  int g=ISLAND, b=POPULATION;
  // int m=g*b;
  calPosition<<<g, b>>>(GA, GB, Gposition);

  float position[ISLAND*POPULATION*FACILITY*2];
  // int position2[ISLAND*POPULATION*FACILITY*2];

  // int data2[ISLAND*POPULATION*FACILITY];
  // short int bay2[ISLAND*POPULATION*(FACILITY-1)]; //bay
  //
  // cudaMemcpy(data2, GA, ISLAND*POPULATION*FACILITY*sizeof(int), cudaMemcpyDeviceToHost);
  //
  // printf("data2\n");
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		for(int f=0;f<FACILITY;f++){
	// 			printf("%d ", data[i*POPULATION*FACILITY+p*FACILITY+f]);
	// 		}
	// 		printf("\n");
	// 	}
	// 	printf("\n");
	// }
  // cudaMemcpy(bay2, GB, ISLAND*POPULATION*(FACILITY-1)*sizeof(short int), cudaMemcpyDeviceToHost);
  // printf("bay2\n");
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		for(int f=0;f<FACILITY-1;f++){
	// 			printf("%d ", bay2[i*POPULATION*FACILITY+p*(FACILITY-1)+f]);
	// 		}
	// 		printf("\n");
	// 	}
	// 	printf("\n");
	// }

  hipMemcpy(position, Gposition, ISLAND*POPULATION*FACILITY*2*sizeof(float), hipMemcpyDeviceToHost);

  // print position
	// for(int i=0;i<ISLAND;i++){
	// 	printf("island%d \n", i);
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("po%d = \n",p);
	// 		for(int f=0;f<FACILITY;f++){
	// 			for(int k=0;k<2;k++){
	// 				printf("%f ", position[i*POPULATION*FACILITY*2+p*FACILITY*2+f*2+k]);
	// 			}
	// 			printf("\n");
	// 		}
	// 	}
	// }

  // for(int i=0;i<ISLAND*POPULATION*FACILITY*2;i++){
  //   printf("%f ", position[i]);
  // }
  printf("\n");

  float distance[ISLAND*POPULATION*FACILITY*FACILITY] = {0};

  float *Gdistance;
  hipMalloc((void**)&Gdistance, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float));


  calDistance<<<g, b>>>(GA, Gposition, Gdistance);

	hipMemcpy(distance, Gdistance, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float), hipMemcpyDeviceToHost);

  printf("\ncalculate distance end\n");

  // print distance
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
  //     printf("po%d: \n", p);
	// 		for(int f=0;f<FACILITY;f++){
	// 			for(int j=0;j<FACILITY;j++){
	// 				printf("%f ", distance[ i*POPULATION*FACILITY*FACILITY + p*FACILITY*FACILITY + f*FACILITY + j ]);
	// 			}
	// 			printf("\n");
	// 		}
	// 	}
	// }


  float totalCost[ISLAND][POPULATION][FACILITY][FACILITY] = {0.0};

  float *GtotalCost;
  hipMalloc((void**)&GtotalCost, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float));

  calTotalcost<<<g, b>>>(Gdistance, Gcost, GtotalCost);

  hipMemcpy(totalCost, GtotalCost, ISLAND*POPULATION*FACILITY*FACILITY*sizeof(float), hipMemcpyDeviceToHost);

  // print totalCost
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
  //     printf("po%d: \n", p);
	// 		for(int f=0;f<FACILITY;f++){
	// 			for(int j=0;j<FACILITY;j++){
	// 				printf("%f ", totalCost[i][p][f][j]);
	// 			}
	// 			printf("\n");
	// 		}
	// 	}
	// }

  float *GsumCost;
  float sumCost[ISLAND][POPULATION]={0.0};

  hipMalloc((void**)&GsumCost, ISLAND*POPULATION*sizeof(float));

  float *GminCost;
  float minCost[ISLAND][2];
  hipMalloc((void**)&GminCost, ISLAND*2*sizeof(float));

  calOF<<<g, b>>>(GsumCost, GminCost, GtotalCost);

  hipMemcpy(sumCost, GsumCost, ISLAND*POPULATION*sizeof(float), hipMemcpyDeviceToHost);
  hipMemcpy(minCost, GminCost, ISLAND*2*sizeof(float), hipMemcpyDeviceToHost);

  // printf("\n");
	// for(int i=0;i<ISLAND;i++){
	// 	printf("第%d島嶼: \n", i);
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%d: ", p);
	// 	  printf("sum = %f", sumCost[i][p]);
	// 		printf("\n");
	// 	}
	// }


  int data2[ISLAND][POPULATION][FACILITY]; // facility
  int *Gdata2;
  hipMalloc((void**)&Gdata2, ISLAND*POPULATION*FACILITY*sizeof(int));
	short int bay2[ISLAND][POPULATION][FACILITY]; //bay
  short int *Gbay2;
  hipMalloc((void**)&Gbay2, ISLAND*POPULATION*FACILITY*sizeof(short int));

	float probability[ISLAND][POPULATION] = {0.0}; // �U�Ӿ��v

  // for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("pro%f \n", probability[i][p]);
	// 	}
	// }
  float *Gprobability;
  hipMalloc((void**)&Gprobability, ISLAND*POPULATION*sizeof(float));

	float totalPro[ISLAND] = {0.0};                // �`(�����˼�)
  float *GtotalPro;
  hipMalloc((void**)&GtotalPro, ISLAND*sizeof(float));

  for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			totalPro[i] = totalPro[i] + (1.0 / sumCost[i][p]);
			// printf("%f %f\n", totalPro[i], (1.0 / sumCost[i][p]));
		}
	}

  hipMemcpy(GtotalPro, totalPro, ISLAND*sizeof(float), hipMemcpyHostToDevice);


	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%f %f\n", totalPro[i], (1.0 / sumCost[i][p]));
	// 	}
	// }

  calProbability<<<ISLAND, POPULATION>>>(Gprobability, GtotalPro, GsumCost);

  hipMemcpy(probability, Gprobability, ISLAND*POPULATION*sizeof(float), hipMemcpyDeviceToHost);

	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%f %f %f \n", probability[i][p], (1.0 / sumCost[i][p]), totalPro[i]);
	// 	}
	// }


  float probability2[ISLAND][POPULATION] = {0.0};
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int j=0;j<=p;j++){
				probability2[i][p] += probability[i][j];
			}
		}
	}

  float *Gprobability2;
  hipMalloc((void**)&Gprobability2, ISLAND*POPULATION*sizeof(float));
  hipMemcpy(Gprobability2, probability2, ISLAND*POPULATION*sizeof(float), hipMemcpyHostToDevice);

	// print probability2 (Roulette)
	// printf("probability2\n");
	// for(int i=0;i<ISLAND;i++){
	// 	for(int p=0;p<POPULATION;p++){
	// 		printf("%f ", probability2[i][p]);
	// 	}
	// }



  int *Gtem, *Gtem2, *Gyes, *Gsss;// choose two to crossover and if yes or not and choose area
  int tem[ISLAND*POPULATION], tem2[ISLAND*POPULATION], yes[ISLAND*POPULATION], sss[ISLAND*POPULATION];
  hipMalloc((void**)&Gtem, ISLAND*POPULATION*sizeof(int));
  hipMalloc((void**)&Gtem2, ISLAND*POPULATION*sizeof(int));
  hipMalloc((void**)&Gyes, ISLAND*POPULATION*sizeof(int));
  hipMalloc((void**)&Gsss, ISLAND*POPULATION*sizeof(int));

  int *GmutaYes, *GmutaTem, *GmutaTem2;
  int mutaYes[ISLAND*POPULATION], mutaTem[ISLAND*POPULATION], mutaTem2[ISLAND*POPULATION];
  hipMalloc((void**)&GmutaYes, ISLAND*POPULATION*sizeof(int));
  hipMalloc((void**)&GmutaTem, ISLAND*POPULATION*sizeof(int));
  hipMalloc((void**)&GmutaTem2, ISLAND*POPULATION*sizeof(int));
  for(int i=0;i<ISLAND*POPULATION;i++){
    tem[i] = rand(); // first change
    tem2[i] = rand(); // second change
    yes[i] = rand(); // crossover or not
    sss[i] = rand(); // bay to crossover
    mutaYes[i] = rand(); // mutation or not
    mutaTem[i] = rand(); // first to change
    mutaTem2[i] = rand(); // second to change
    // printf("%d %d %d %d %d %d %d\n", tem[i], tem2[i], yes[i], sss[i], mutaYes[i], mutaTem[i], mutaTem2[i]);
  }

  hipMemcpy(Gtem, tem, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(Gtem2, tem2, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(Gyes, yes, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(Gsss, sss, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);


  hipMemcpy(GmutaYes, mutaYes, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(GmutaTem, mutaTem, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(GmutaTem2, mutaTem2, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);

  int *Gcount;
  hipMalloc((void**)&Gcount, 10*sizeof(int));
  int *GetP, *GetP2;
  hipMalloc((void**)&GetP, 10*sizeof(int));
  hipMalloc((void**)&GetP2, 10*sizeof(int));
  int getP[10], getP2[10];
  float *Gtest;
  hipMalloc((void**)&Gtest, 10*sizeof(float));
  float test[10] = {0.0};
  crossOver<<<ISLAND, POPULATION / 2>>>(Gprobability2, GA, GB, Gdata2, Gbay2, Gtem, Gtem2, Gyes, Gsss, Gcount, GetP, GetP2, Gtest);
  hipMemcpy(data2, Gdata2, ISLAND*POPULATION*FACILITY*sizeof(int), hipMemcpyDeviceToHost);

  int count[10] = {0};
  hipMemcpy(tem, Gtem, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(tem2, Gtem2, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(yes, Gyes, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(sss, Gsss, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(count, Gcount, 10*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(getP, GetP, 10*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(getP2, GetP2, 10*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(test, Gtest, 10*sizeof(int), hipMemcpyDeviceToHost);

  // mutation facility
	printf("\nready to mutation\n");

  mutation<<<ISLAND, POPULATION>>>(Gdata2, GmutaYes, GmutaTem, GmutaTem2);

  hipMemcpy(mutaYes, GmutaYes, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(mutaTem, GmutaTem, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(mutaTem2, GmutaTem2, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);

  int *GmutaBayYes, *GmutaBayTem;
  int mutaBayYes[ISLAND*POPULATION], mutaBayTem[ISLAND*POPULATION];
  hipMalloc((void**)&GmutaBayYes, ISLAND*POPULATION*sizeof(int));
  hipMalloc((void**)&GmutaBayTem, ISLAND*POPULATION*sizeof(int));

  hipMemcpy(GmutaBayYes, mutaBayYes, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);
  hipMemcpy(GmutaBayTem, mutaBayTem, ISLAND*POPULATION*sizeof(int), hipMemcpyHostToDevice);

  mutationBay<<<ISLAND, POPULATION>>>(Gbay2, GmutaBayYes, GmutaBayTem);

  hipMemcpy(mutaBayYes, GmutaBayYes, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);
  hipMemcpy(mutaBayTem, GmutaBayTem, ISLAND*POPULATION*sizeof(int), hipMemcpyDeviceToHost);

  // migration
	if( (gggggg+1) % MIGRATION == 0 && (gggggg+1) != 0 && ISLAND > 1){
		printf("***migration***\n");

		int temp3[ISLAND][POPULATION/2][FACILITY];
		short temp4[ISLAND][POPULATION/2][FACILITY-1];
		int indexCost[ISLAND][POPULATION];

		for(int i=0;i<ISLAND;i++){
			for(int p=0;p<POPULATION;p++){
				indexCost[i][p] = p;
			}
		}

		// bubble sort
		float temp;
		for(int k=0;k<ISLAND;k++){
			for(int i=POPULATION-1; i>=1; i--){
	      for(int j=0; j<=i-1; j++){
	        if(sumCost[k][j] > sumCost[k][j+1]){
							int temp2 = indexCost[k][j];
	            indexCost[k][j] = indexCost[k][j+1];
	            indexCost[k][j+1] = temp2;
	        }
	      }
	    }
		}

		// print sorted index
		// for(int i=0;i<ISLAND;i++){
		// 	for(int p=0;p<POPULATION;p++){
		// 		printf("%d ", indexCost[i][p]);
		// 	}
		// 	printf("\n");
		// }

		int countP = 0;
		for(int i=0;i<ISLAND;i++){
			while(countP < INDIVIDUAL){
				for(int p=0;p<POPULATION;p++){
					if(p == indexCost[i][countP]){
						for(int f=0;f<FACILITY;f++){
							temp3[i][countP][f] = data2[i][p][f];
						}
						for(int f=0;f<FACILITY-1;f++){
							temp4[i][countP][f] = bay2[i][p][f];
						}
						countP++;
						break;
					}
				} // population end
			}
			countP = 0;
		} // island end

		for(int i=0;i<ISLAND;i++){
			if(i==0){
				for(int k=0;k<POPULATION/2;k++){
					int backP = indexCost[ISLAND-1][k];
					int frontP = indexCost[i][k];
					for(int f=0;f<FACILITY;f++){
						data2[i][frontP][f] = temp3[ISLAND-1][backP][f];
					}
					for(int f=0;f<FACILITY-1;f++){
						bay2[i][frontP][f] = temp4[ISLAND-1][backP][f];
					}
				}
			}else {
				for(int k=0;k<POPULATION/2;k++){
					int backP = indexCost[i-1][k];
					int frontP = indexCost[i][k];
					int p = indexCost[i][k];
					for(int f=0;f<FACILITY;f++){
						data2[i][frontP][f] = temp3[ISLAND-1][backP][f];
					}
					for(int f=0;f<FACILITY-1;f++){
						bay2[i][frontP][f] = temp4[ISLAND-1][backP][f];
					}
				}
			} // else end

		} // for end




		} // if migration end


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

  // printf("\nget: \n");
  // for(int i=0;i<10;i++){
  //   printf("%d %d\n", getP[i], getP2[i]);
  // }

  // printf("\ntest: \n");
  // for(int i=0;i<10;i++){
  //   printf("%f\n", test[i]);
  // }

  // printf("\nTEM: \n");
  // for(int i=0;i<20;i++){
  //   printf("%d %d %d %d\n", tem[i], tem2[i], yes[i], sss[i]);
  // }
  //
  // printf("\nmutation: \n");
  // for(int i=0;i<20;i++){
  //   printf("%d %d %d\n", mutaYes[i], mutaTem[i], mutaTem2[i]);
  // }
  float answer[3];
  answer[0] = 0;
  answer[1] = 0;
  answer[2] = sumCost[0][0];
  for(int i=0;i<ISLAND;i++){
		// printf("第%d島嶼(OF): \n", i);
		for(int p=0;p<POPULATION;p++){
			// printf("%f ", sumCost[i][p]);
      if(sumCost[i][p] < answer[2]){
        answer[0] = i;
        answer[1] = p;
        answer[2] = sumCost[i][p];
      }
			// printf("\n");
		}
	}


  printf("最小: %.0f %.0f = %f\n", answer[0], answer[1], answer[2]);



  // for(int i=0;i<ISLAND;i++){
  //   for(int p=0;p<POPULATION;p++){
  //     printf("\n交配結果(data2)%d\n", p);
  //     for(int f=0;f<FACILITY;f++){
  //       printf("%d ", data2[i][p][f]);
  //     }
  //     printf("\n");
  //   }
  // }

  // parent to child
	// printf("***chile to parent!!!***\n");
	for(int i=0;i<ISLAND;i++){
		// printf("island%d\n", i);
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY;f++){
				data[i][p][f] = data2[i][p][f];
				// printf("%d ", data[i][p][f]);
			}
			// printf("\n");
		}
	}

  // 子代BAY
	for(int i=0;i<ISLAND;i++){
		for(int p=0;p<POPULATION;p++){
			for(int f=0;f<FACILITY-1;f++){
				bay[i][p][f] = bay2[i][p][f];
			}
		}
	}

  hipFree(GA);
  hipFree(GB);
  hipFree(Gdata2);
  hipFree(Gbay2);
  hipFree(GsumCost);
  hipFree(GminCost);
  hipFree(GtotalCost);
  hipFree(Gtem);
  hipFree(Gtem2);
  hipFree(GetP);
  hipFree(GetP2);
  hipFree(Gtest);
  hipFree(Gprobability);
  hipFree(Gprobability2);
  hipFree(Gyes);
  hipFree(Gsss);
  hipFree(GmutaYes);
  hipFree(GmutaTem);
  hipFree(GmutaTem2);
  hipFree(Gdistance);
  hipFree(Gposition);
  } // GENERATION 結束

  END = clock();
  printf("程式執行所花費： %lf S\n", (double)clock()/CLOCKS_PER_SEC);
  printf("進行運算所花費的時間： %lf S\n", (END - START) / CLOCKS_PER_SEC);
  // cout << endl << "程式執行所花費：" << (double)clock()/CLOCKS_PER_SEC << " S" ;
  // cout << endl << "進行運算所花費的時間：" << (END - START) / CLOCKS_PER_SEC << " S" << endl;
  return 0;

}

void shuffle(int* facility) { // ���ñƧǦn��facility
    int i;
    for(i = 0; i < FACILITY; i++) {
        int j = rand() % FACILITY;
        int tmp = facility[i];
        facility[i] = facility[j];
        facility[j] = tmp;
    }
}

	.text
	.file	"final_cuda.hip"
	.globl	_Z26__device_stub__calPositionPiPsPf # -- Begin function _Z26__device_stub__calPositionPiPsPf
	.type	_Z26__device_stub__calPositionPiPsPf,@function
_Z26__device_stub__calPositionPiPsPf:   # @_Z26__device_stub__calPositionPiPsPf
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z11calPositionPiPsPf, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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	_Z26__device_stub__calPositionPiPsPf, .Lfunc_end0-_Z26__device_stub__calPositionPiPsPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__calDistancePiPfS0_ # -- Begin function _Z26__device_stub__calDistancePiPfS0_
	.type	_Z26__device_stub__calDistancePiPfS0_,@function
_Z26__device_stub__calDistancePiPfS0_:  # @_Z26__device_stub__calDistancePiPfS0_
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z11calDistancePiPfS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end1:
	.size	_Z26__device_stub__calDistancePiPfS0_, .Lfunc_end1-_Z26__device_stub__calDistancePiPfS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z27__device_stub__calTotalcostPfPiS_ # -- Begin function _Z27__device_stub__calTotalcostPfPiS_
	.type	_Z27__device_stub__calTotalcostPfPiS_,@function
_Z27__device_stub__calTotalcostPfPiS_:  # @_Z27__device_stub__calTotalcostPfPiS_
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z12calTotalcostPfPiS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end2:
	.size	_Z27__device_stub__calTotalcostPfPiS_, .Lfunc_end2-_Z27__device_stub__calTotalcostPfPiS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z20__device_stub__calOFPfS_S_  # -- Begin function _Z20__device_stub__calOFPfS_S_
	.type	_Z20__device_stub__calOFPfS_S_,@function
_Z20__device_stub__calOFPfS_S_:         # @_Z20__device_stub__calOFPfS_S_
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z5calOFPfS_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end3:
	.size	_Z20__device_stub__calOFPfS_S_, .Lfunc_end3-_Z20__device_stub__calOFPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z29__device_stub__calProbabilityPfS_S_ # -- Begin function _Z29__device_stub__calProbabilityPfS_S_
	.type	_Z29__device_stub__calProbabilityPfS_S_,@function
_Z29__device_stub__calProbabilityPfS_S_: # @_Z29__device_stub__calProbabilityPfS_S_
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z14calProbabilityPfS_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end4:
	.size	_Z29__device_stub__calProbabilityPfS_S_, .Lfunc_end4-_Z29__device_stub__calProbabilityPfS_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_ # -- Begin function _Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.type	_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_,@function
_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_: # @_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.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	$208, %rsp
	.cfi_def_cfa_offset 256
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	16(%rsp), %r8
	movq	%r9, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	256(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	264(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	272(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	280(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	288(%rsp), %rax
	movq	%rax, 80(%rbx)
	leaq	296(%rsp), %rax
	movq	%rax, 88(%rbx)
	leaq	304(%rsp), %rax
	movq	%rax, 96(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%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	$_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$224, %rsp
	.cfi_adjust_cfa_offset -224
	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_end5:
	.size	_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, .Lfunc_end5-_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__mutationPiS_S_S_ # -- Begin function _Z23__device_stub__mutationPiS_S_S_
	.type	_Z23__device_stub__mutationPiS_S_S_,@function
_Z23__device_stub__mutationPiS_S_S_:    # @_Z23__device_stub__mutationPiS_S_S_
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	16(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%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	$_Z8mutationPiS_S_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end6:
	.size	_Z23__device_stub__mutationPiS_S_S_, .Lfunc_end6-_Z23__device_stub__mutationPiS_S_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__mutationBayPsPiS0_ # -- Begin function _Z26__device_stub__mutationBayPsPiS0_
	.type	_Z26__device_stub__mutationBayPsPiS0_,@function
_Z26__device_stub__mutationBayPsPiS0_:  # @_Z26__device_stub__mutationBayPsPiS0_
	.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	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%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	$_Z11mutationBayPsPiS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	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_end7:
	.size	_Z26__device_stub__mutationBayPsPiS0_, .Lfunc_end7-_Z26__device_stub__mutationBayPsPiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI8_0:
	.quad	0x3ff0000000000000              # double 1
.LCPI8_1:
	.quad	0x412e848000000000              # double 1.0E+6
	.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	$1825240, %rsp                  # imm = 0x1BD9D8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	clock
	movq	%rax, -272(%rbp)                # 8-byte Spill
	xorl	%edi, %edi
	callq	time
	movl	%eax, %edi
	callq	srand
	leaq	-85280(%rbp), %r13
	leaq	-45280(%rbp), %r12
	xorl	%ebx, %ebx
.LBB8_1:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_2 Depth 2
                                        #       Child Loop BB8_3 Depth 3
                                        #       Child Loop BB8_5 Depth 3
                                        #       Child Loop BB8_7 Depth 3
                                        #       Child Loop BB8_9 Depth 3
	movl	$.L.str, %edi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	printf
	movq	%r12, -168(%rbp)                # 8-byte Spill
	movq	%r13, -48(%rbp)                 # 8-byte Spill
	xorl	%r14d, %r14d
.LBB8_2:                                # %.preheader411
                                        #   Parent Loop BB8_1 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_3 Depth 3
                                        #       Child Loop BB8_5 Depth 3
                                        #       Child Loop BB8_7 Depth 3
                                        #       Child Loop BB8_9 Depth 3
	xorl	%eax, %eax
.LBB8_3:                                #   Parent Loop BB8_1 Depth=1
                                        #     Parent Loop BB8_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movl	%eax, -496(%rbp,%rax,4)
	incq	%rax
	cmpq	$20, %rax
	jne	.LBB8_3
# %bb.4:                                # %.preheader410.preheader
                                        #   in Loop: Header=BB8_2 Depth=2
	xorl	%r15d, %r15d
.LBB8_5:                                # %.preheader410
                                        #   Parent Loop BB8_1 Depth=1
                                        #     Parent Loop BB8_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$35, %rcx
	addl	%edx, %ecx
	shll	$2, %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %eax
	movl	-496(%rbp,%r15,4), %ecx
	cltq
	movl	-496(%rbp,%rax,4), %edx
	movl	%edx, -496(%rbp,%r15,4)
	movl	%ecx, -496(%rbp,%rax,4)
	incq	%r15
	cmpq	$20, %r15
	jne	.LBB8_5
# %bb.6:                                # %_Z7shufflePi.exit.preheader
                                        #   in Loop: Header=BB8_2 Depth=2
	xorl	%r15d, %r15d
.LBB8_7:                                # %_Z7shufflePi.exit
                                        #   Parent Loop BB8_1 Depth=1
                                        #     Parent Loop BB8_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movl	-496(%rbp,%r15,4), %esi
	movl	%esi, (%r13,%r15,4)
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%r15
	cmpq	$20, %r15
	jne	.LBB8_7
# %bb.8:                                #   in Loop: Header=BB8_2 Depth=2
	movl	$10, %edi
	callq	putchar@PLT
	xorl	%r15d, %r15d
.LBB8_9:                                #   Parent Loop BB8_1 Depth=1
                                        #     Parent Loop BB8_2 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	callq	rand
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$65534, %ecx                    # imm = 0xFFFE
	subl	%ecx, %eax
	movw	%ax, (%r12,%r15,2)
	incq	%r15
	cmpq	$19, %r15
	jne	.LBB8_9
# %bb.10:                               #   in Loop: Header=BB8_2 Depth=2
	incq	%r14
	addq	$80, %r13
	addq	$38, %r12
	cmpq	$50, %r14
	jne	.LBB8_2
# %bb.11:                               #   in Loop: Header=BB8_1 Depth=1
	incq	%rbx
	movq	-48(%rbp), %r13                 # 8-byte Reload
	addq	$4000, %r13                     # imm = 0xFA0
	movq	-168(%rbp), %r12                # 8-byte Reload
	addq	$1900, %r12                     # imm = 0x76C
	cmpq	$10, %rbx
	jne	.LBB8_1
# %bb.12:
	movl	$.Lstr, %edi
	callq	puts@PLT
	leaq	-85280(%rbp), %rbx
	xorl	%r14d, %r14d
.LBB8_13:                               # %.preheader409
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_14 Depth 2
                                        #       Child Loop BB8_15 Depth 3
	movq	%rbx, %r15
	xorl	%r12d, %r12d
.LBB8_14:                               # %.preheader408
                                        #   Parent Loop BB8_13 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_15 Depth 3
	xorl	%r13d, %r13d
.LBB8_15:                               #   Parent Loop BB8_13 Depth=1
                                        #     Parent Loop BB8_14 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movl	(%r15,%r13,4), %esi
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%r13
	cmpq	$20, %r13
	jne	.LBB8_15
# %bb.16:                               #   in Loop: Header=BB8_14 Depth=2
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r12
	addq	$80, %r15
	cmpq	$50, %r12
	jne	.LBB8_14
# %bb.17:                               #   in Loop: Header=BB8_13 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r14
	addq	$4000, %rbx                     # imm = 0xFA0
	cmpq	$10, %r14
	jne	.LBB8_13
# %bb.18:
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	leaq	-45280(%rbp), %rbx
	xorl	%r14d, %r14d
.LBB8_19:                               # %.preheader407
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_20 Depth 2
                                        #       Child Loop BB8_21 Depth 3
	movq	%rbx, %r15
	xorl	%r12d, %r12d
.LBB8_20:                               # %.preheader406
                                        #   Parent Loop BB8_19 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_21 Depth 3
	xorl	%r13d, %r13d
.LBB8_21:                               #   Parent Loop BB8_19 Depth=1
                                        #     Parent Loop BB8_20 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movswl	(%r15,%r13,2), %esi
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%r13
	cmpq	$19, %r13
	jne	.LBB8_21
# %bb.22:                               #   in Loop: Header=BB8_20 Depth=2
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r12
	addq	$38, %r15
	cmpq	$50, %r12
	jne	.LBB8_20
# %bb.23:                               #   in Loop: Header=BB8_19 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r14
	addq	$1900, %rbx                     # imm = 0x76C
	cmpq	$10, %r14
	jne	.LBB8_19
# %bb.24:
	movl	$.L.str.5, %edi
	movl	$.L.str.6, %esi
	callq	fopen
	movq	%rax, %r14
	leaq	-14272(%rbp), %rbx
	movl	$1600, %edx                     # imm = 0x640
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movq	%rsp, -264(%rbp)                # 8-byte Spill
	movq	%rsp, %r12
	addq	$-4560, %r12                    # imm = 0xEE30
	movq	%r12, %rsp
	movl	$380, %r13d                     # imm = 0x17C
	movq	%r12, %r15
.LBB8_25:                               # =>This Inner Loop Header: Depth=1
	leaq	4(%r15), %rcx
	leaq	8(%r15), %r8
	movl	$.L.str.7, %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	addq	$12, %r15
	decq	%r13
	jne	.LBB8_25
# %bb.26:
	movq	%r14, %rdi
	callq	fclose
	movl	$8, %eax
.LBB8_27:                               # =>This Inner Loop Header: Depth=1
	movl	(%r12,%rax), %ecx
	movslq	-8(%r12,%rax), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	shlq	$4, %rdx
	movslq	-4(%r12,%rax), %rsi
	addq	%rbx, %rdx
	movl	%ecx, -84(%rdx,%rsi,4)
	addq	$12, %rax
	cmpq	$4568, %rax                     # imm = 0x11D8
	jne	.LBB8_27
# %bb.28:
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	xorl	%r14d, %r14d
.LBB8_29:                               # %.preheader405
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_30 Depth 2
	xorl	%r15d, %r15d
.LBB8_30:                               #   Parent Loop BB8_29 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	(%rbx,%r15,4), %esi
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%r15
	cmpq	$20, %r15
	jne	.LBB8_30
# %bb.31:                               #   in Loop: Header=BB8_29 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r14
	addq	$80, %rbx
	cmpq	$20, %r14
	jne	.LBB8_29
# %bb.32:
	movabsq	$4294967306, %r14               # imm = 0x10000000A
	leaq	-280(%rbp), %rbx
	movl	$1600, %esi                     # imm = 0x640
	movq	%rbx, %rdi
	callq	hipMalloc
	movq	(%rbx), %rdi
	leaq	-14272(%rbp), %rsi
	movl	$1600, %edx                     # imm = 0x640
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	-45280(%rbp), %rbx
	leaq	40(%r14), %r13
	leaq	-1025280(%rbp), %r12
	xorl	%r15d, %r15d
	movq	%r13, -168(%rbp)                # 8-byte Spill
.LBB8_33:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_42 Depth 2
                                        #       Child Loop BB8_43 Depth 3
                                        #     Child Loop BB8_48 Depth 2
                                        #       Child Loop BB8_49 Depth 3
                                        #         Child Loop BB8_50 Depth 4
                                        #     Child Loop BB8_54 Depth 2
                                        #     Child Loop BB8_62 Depth 2
                                        #       Child Loop BB8_63 Depth 3
                                        #     Child Loop BB8_68 Depth 2
                                        #       Child Loop BB8_69 Depth 3
	movl	$.L.str.9, %edi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$40000, %esi                    # imm = 0x9C40
	leaq	-56(%rbp), %rdi
	callq	hipMalloc
	movq	-56(%rbp), %rdi
	movl	$40000, %edx                    # imm = 0x9C40
	leaq	-85280(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$19000, %esi                    # imm = 0x4A38
	leaq	-160(%rbp), %rdi
	callq	hipMalloc
	movq	-160(%rbp), %rdi
	movl	$19000, %edx                    # imm = 0x4A38
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$80000, %esi                    # imm = 0x13880
	leaq	-152(%rbp), %rdi
	callq	hipMalloc
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_35
# %bb.34:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-56(%rbp), %rdi
	movq	-160(%rbp), %rsi
	movq	-152(%rbp), %rdx
	callq	_Z26__device_stub__calPositionPiPsPf
.LBB8_35:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-152(%rbp), %rsi
	movl	$80000, %edx                    # imm = 0x13880
	leaq	-225280(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$10, %edi
	callq	putchar@PLT
	movl	$800000, %edx                   # imm = 0xC3500
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$800000, %esi                   # imm = 0xC3500
	leaq	-144(%rbp), %rdi
	callq	hipMalloc
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_37
# %bb.36:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-56(%rbp), %rdi
	movq	-152(%rbp), %rsi
	movq	-144(%rbp), %rdx
	callq	_Z26__device_stub__calDistancePiPfS0_
.LBB8_37:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-144(%rbp), %rsi
	movl	$800000, %edx                   # imm = 0xC3500
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$.Lstr.3, %edi
	callq	puts@PLT
	movl	$800000, %edx                   # imm = 0xC3500
	leaq	-1825280(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$800000, %esi                   # imm = 0xC3500
	leaq	-136(%rbp), %rdi
	callq	hipMalloc
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_39
# %bb.38:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-144(%rbp), %rdi
	movq	-280(%rbp), %rsi
	movq	-136(%rbp), %rdx
	callq	_Z27__device_stub__calTotalcostPfPiS_
.LBB8_39:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-136(%rbp), %rsi
	movl	$800000, %edx                   # imm = 0xC3500
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-12672(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-128(%rbp), %rdi
	callq	hipMalloc
	movl	$80, %esi
	leaq	-240(%rbp), %rdi
	callq	hipMalloc
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_41
# %bb.40:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-128(%rbp), %rdi
	movq	-240(%rbp), %rsi
	movq	-136(%rbp), %rdx
	callq	_Z20__device_stub__calOFPfS_S_
.LBB8_41:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-128(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-240(%rbp), %rsi
	movl	$80, %edx
	leaq	-672(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$40000, %esi                    # imm = 0x9C40
	leaq	-120(%rbp), %rdi
	callq	hipMalloc
	movl	$20000, %esi                    # imm = 0x4E20
	leaq	-232(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-22272(%rbp), %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-224(%rbp), %rdi
	callq	hipMalloc
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -304(%rbp)
	movaps	%xmm0, -320(%rbp)
	movq	$0, -288(%rbp)
	movl	$40, %esi
	leaq	-256(%rbp), %rdi
	callq	hipMalloc
	xorl	%ecx, %ecx
	movsd	.LCPI8_0(%rip), %xmm3           # xmm3 = mem[0],zero
.LBB8_42:                               # %.preheader400
                                        #   Parent Loop BB8_33 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_43 Depth 3
	movss	-320(%rbp,%rcx,4), %xmm0        # xmm0 = mem[0],zero,zero,zero
	xorl	%edx, %edx
.LBB8_43:                               #   Parent Loop BB8_33 Depth=1
                                        #     Parent Loop BB8_42 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	xorps	%xmm1, %xmm1
	cvtss2sd	(%r12,%rdx,4), %xmm1
	cvtss2sd	%xmm0, %xmm0
	movapd	%xmm3, %xmm2
	divsd	%xmm1, %xmm2
	addsd	%xmm0, %xmm2
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm2, %xmm0
	incq	%rdx
	cmpq	$50, %rdx
	jne	.LBB8_43
# %bb.44:                               #   in Loop: Header=BB8_42 Depth=2
	movss	%xmm0, -320(%rbp,%rcx,4)
	incq	%rcx
	addq	$200, %r12
	cmpq	$10, %rcx
	jne	.LBB8_42
# %bb.45:                               #   in Loop: Header=BB8_33 Depth=1
	movl	%r15d, -48(%rbp)                # 4-byte Spill
	movq	-256(%rbp), %rdi
	movl	$40, %edx
	leaq	-320(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_47
# %bb.46:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-224(%rbp), %rdi
	movq	-256(%rbp), %rsi
	movq	-128(%rbp), %rdx
	callq	_Z29__device_stub__calProbabilityPfS_S_
.LBB8_47:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-224(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-22272(%rbp), %r15
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-10672(%rbp), %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	xorl	%ecx, %ecx
.LBB8_48:                               # %.preheader399
                                        #   Parent Loop BB8_33 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_49 Depth 3
                                        #         Child Loop BB8_50 Depth 4
	movl	$1, %edx
	xorl	%esi, %esi
.LBB8_49:                               # %.preheader388
                                        #   Parent Loop BB8_33 Depth=1
                                        #     Parent Loop BB8_48 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB8_50 Depth 4
	imulq	$200, %rcx, %rdi
	addq	%rbp, %rdi
	addq	$-10672, %rdi                   # imm = 0xD650
	leaq	(%rdi,%rsi,4), %rdi
	movss	(%rdi), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	xorl	%r8d, %r8d
.LBB8_50:                               #   Parent Loop BB8_33 Depth=1
                                        #     Parent Loop BB8_48 Depth=2
                                        #       Parent Loop BB8_49 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	addss	(%r15,%r8,4), %xmm0
	incq	%r8
	cmpq	%r8, %rdx
	jne	.LBB8_50
# %bb.51:                               #   in Loop: Header=BB8_49 Depth=3
	movss	%xmm0, (%rdi)
	incq	%rsi
	incq	%rdx
	cmpq	$50, %rsi
	jne	.LBB8_49
# %bb.52:                               #   in Loop: Header=BB8_48 Depth=2
	incq	%rcx
	addq	$200, %r15
	cmpq	$10, %rcx
	jne	.LBB8_48
# %bb.53:                               #   in Loop: Header=BB8_33 Depth=1
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-216(%rbp), %rdi
	callq	hipMalloc
	movq	-216(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-10672(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-112(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-104(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-96(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-88(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-80(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-72(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-64(%rbp), %rdi
	callq	hipMalloc
	xorl	%r15d, %r15d
.LBB8_54:                               #   Parent Loop BB8_33 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	callq	rand
	movl	%eax, -20272(%rbp,%r15)
	callq	rand
	movl	%eax, -18272(%rbp,%r15)
	callq	rand
	movl	%eax, -16272(%rbp,%r15)
	callq	rand
	movl	%eax, -8672(%rbp,%r15)
	callq	rand
	movl	%eax, -6672(%rbp,%r15)
	callq	rand
	movl	%eax, -4672(%rbp,%r15)
	callq	rand
	movl	%eax, -2672(%rbp,%r15)
	addq	$4, %r15
	cmpq	$2000, %r15                     # imm = 0x7D0
	jne	.LBB8_54
# %bb.55:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-112(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-20272(%rbp), %r15
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-104(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-18272(%rbp), %r12
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-96(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-16272(%rbp), %rbx
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-88(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-8672(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-80(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-6672(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-72(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-4672(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-64(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-2672(%rbp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$40, %esi
	leaq	-248(%rbp), %rdi
	callq	hipMalloc
	movl	$40, %esi
	leaq	-208(%rbp), %rdi
	callq	hipMalloc
	movl	$40, %esi
	leaq	-200(%rbp), %rdi
	callq	hipMalloc
	movl	$40, %esi
	leaq	-192(%rbp), %rdi
	callq	hipMalloc
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -400(%rbp)
	movaps	%xmm0, -416(%rbp)
	movq	$0, -384(%rbp)
	leaq	15(%r14), %rdx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_57
# %bb.56:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-216(%rbp), %rdi
	movq	-56(%rbp), %rsi
	movq	-160(%rbp), %rdx
	movq	-120(%rbp), %rcx
	movq	-232(%rbp), %r8
	movq	-112(%rbp), %r9
	subq	$8, %rsp
	pushq	-192(%rbp)
	pushq	-200(%rbp)
	pushq	-208(%rbp)
	pushq	-248(%rbp)
	pushq	-88(%rbp)
	pushq	-96(%rbp)
	pushq	-104(%rbp)
	callq	_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	addq	$64, %rsp
.LBB8_57:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-120(%rbp), %rsi
	movl	$40000, %edx                    # imm = 0x9C40
	leaq	-145280(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -352(%rbp)
	movaps	%xmm0, -368(%rbp)
	movq	$0, -336(%rbp)
	movq	-112(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-104(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-96(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-88(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-8672(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-248(%rbp), %rsi
	movl	$40, %edx
	leaq	-368(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-208(%rbp), %rsi
	movl	$40, %edx
	leaq	-592(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-200(%rbp), %rsi
	movl	$40, %edx
	leaq	-544(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-192(%rbp), %rsi
	movl	$40, %edx
	leaq	-416(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$.Lstr.4, %edi
	callq	puts@PLT
	movq	%r14, %rdi
	movl	$1, %esi
	movq	-168(%rbp), %r13                # 8-byte Reload
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB8_59
# %bb.58:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-120(%rbp), %rdi
	movq	-80(%rbp), %rsi
	movq	-72(%rbp), %rdx
	movq	-64(%rbp), %rcx
	callq	_Z23__device_stub__mutationPiS_S_S_
.LBB8_59:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-80(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-6672(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-72(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-4672(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-64(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-2672(%rbp), %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-184(%rbp), %rdi
	callq	hipMalloc
	movl	$2000, %esi                     # imm = 0x7D0
	leaq	-176(%rbp), %rdi
	callq	hipMalloc
	movq	-184(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-26272(%rbp), %r12
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	-176(%rbp), %rdi
	movl	$2000, %edx                     # imm = 0x7D0
	leaq	-24272(%rbp), %r15
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	leaq	-45280(%rbp), %rbx
	jne	.LBB8_61
# %bb.60:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-232(%rbp), %rdi
	movq	-184(%rbp), %rsi
	movq	-176(%rbp), %rdx
	callq	_Z26__device_stub__mutationBayPsPiS0_
.LBB8_61:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-184(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	-176(%rbp), %rsi
	movl	$2000, %edx                     # imm = 0x7D0
	movq	%r15, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	-48(%rbp), %r15d                # 4-byte Reload
	incl	%r15d
	xorps	%xmm0, %xmm0
	movss	-12672(%rbp), %xmm2             # xmm2 = mem[0],zero,zero,zero
	leaq	-12672(%rbp), %rax
	xorl	%ecx, %ecx
	xorps	%xmm1, %xmm1
	leaq	-1025280(%rbp), %r12
.LBB8_62:                               # %.preheader391
                                        #   Parent Loop BB8_33 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_63 Depth 3
	xorps	%xmm3, %xmm3
	cvtsi2ss	%ecx, %xmm3
	xorl	%edx, %edx
	movaps	%xmm0, %xmm6
	movaps	%xmm2, %xmm4
.LBB8_63:                               #   Parent Loop BB8_33 Depth=1
                                        #     Parent Loop BB8_62 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	(%rax,%rdx,4), %xmm5            # xmm5 = mem[0],zero,zero,zero
	ucomiss	%xmm5, %xmm4
	movaps	%xmm3, %xmm0
	ja	.LBB8_65
# %bb.64:                               #   in Loop: Header=BB8_63 Depth=3
	movaps	%xmm6, %xmm0
.LBB8_65:                               #   in Loop: Header=BB8_63 Depth=3
	xorps	%xmm6, %xmm6
	cvtsi2ss	%edx, %xmm6
	movaps	%xmm5, %xmm2
	minss	%xmm4, %xmm2
	cmpltss	%xmm4, %xmm5
	andps	%xmm5, %xmm6
	andnps	%xmm1, %xmm5
	orps	%xmm6, %xmm5
	movaps	%xmm5, %xmm1
	incq	%rdx
	movaps	%xmm0, %xmm6
	movaps	%xmm2, %xmm4
	cmpq	$50, %rdx
	jne	.LBB8_63
# %bb.66:                               #   in Loop: Header=BB8_62 Depth=2
	incq	%rcx
	addq	$200, %rax
	cmpq	$10, %rcx
	jne	.LBB8_62
# %bb.67:                               # %.preheader389.preheader
                                        #   in Loop: Header=BB8_33 Depth=1
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm1
	cvtss2sd	%xmm2, %xmm2
	movl	$.L.str.13, %edi
	movb	$3, %al
	callq	printf
	movl	$40000, %edx                    # imm = 0x9C40
	leaq	-85280(%rbp), %rdi
	leaq	-145280(%rbp), %rsi
	callq	memcpy@PLT
	movq	%rbx, %rax
	leaq	-105280(%rbp), %rcx
	xorl	%edx, %edx
.LBB8_68:                               # %.preheader389
                                        #   Parent Loop BB8_33 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_69 Depth 3
	movq	$-1900, %rsi                    # imm = 0xF894
	movq	%rcx, %rdi
.LBB8_69:                               # %.preheader
                                        #   Parent Loop BB8_33 Depth=1
                                        #     Parent Loop BB8_68 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	30(%rdi), %r8
	movq	%r8, 1930(%rax,%rsi)
	movups	(%rdi), %xmm0
	movups	16(%rdi), %xmm1
	movups	%xmm1, 1916(%rax,%rsi)
	movups	%xmm0, 1900(%rax,%rsi)
	addq	$40, %rdi
	addq	$38, %rsi
	jne	.LBB8_69
# %bb.70:                               #   in Loop: Header=BB8_68 Depth=2
	incq	%rdx
	addq	$2000, %rcx                     # imm = 0x7D0
	addq	$1900, %rax                     # imm = 0x76C
	cmpq	$10, %rdx
	jne	.LBB8_68
# %bb.71:                               #   in Loop: Header=BB8_33 Depth=1
	movq	-56(%rbp), %rdi
	callq	hipFree
	movq	-160(%rbp), %rdi
	callq	hipFree
	movq	-120(%rbp), %rdi
	callq	hipFree
	movq	-232(%rbp), %rdi
	callq	hipFree
	movq	-128(%rbp), %rdi
	callq	hipFree
	movq	-240(%rbp), %rdi
	callq	hipFree
	movq	-136(%rbp), %rdi
	callq	hipFree
	movq	-112(%rbp), %rdi
	callq	hipFree
	movq	-104(%rbp), %rdi
	callq	hipFree
	movq	-208(%rbp), %rdi
	callq	hipFree
	movq	-200(%rbp), %rdi
	callq	hipFree
	movq	-192(%rbp), %rdi
	callq	hipFree
	movq	-224(%rbp), %rdi
	callq	hipFree
	movq	-216(%rbp), %rdi
	callq	hipFree
	movq	-96(%rbp), %rdi
	callq	hipFree
	movq	-88(%rbp), %rdi
	callq	hipFree
	movq	-80(%rbp), %rdi
	callq	hipFree
	movq	-72(%rbp), %rdi
	callq	hipFree
	movq	-64(%rbp), %rdi
	callq	hipFree
	movq	-144(%rbp), %rdi
	callq	hipFree
	movq	-152(%rbp), %rdi
	callq	hipFree
	cmpl	$10, %r15d
	jne	.LBB8_33
# %bb.72:
	xorps	%xmm0, %xmm0
	cvtsi2sdq	-272(%rbp), %xmm0       # 8-byte Folded Reload
	movsd	%xmm0, -48(%rbp)                # 8-byte Spill
	callq	clock
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	subsd	-48(%rbp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, -48(%rbp)                # 8-byte Spill
	callq	clock
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI8_1(%rip), %xmm0
	movl	$.L.str.14, %edi
	movb	$1, %al
	callq	printf
	movsd	-48(%rbp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	divsd	.LCPI8_1(%rip), %xmm0
	movl	$.L.str.15, %edi
	movb	$1, %al
	callq	printf
	movq	-264(%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_end8:
	.size	main, .Lfunc_end8-main
	.cfi_endproc
                                        # -- End function
	.globl	_Z7shufflePi                    # -- Begin function _Z7shufflePi
	.type	_Z7shufflePi,@function
_Z7shufflePi:                           # @_Z7shufflePi
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
.LBB9_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$35, %rcx
	addl	%edx, %ecx
	shll	$2, %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %eax
	movl	(%rbx,%r14,4), %ecx
	cltq
	movl	(%rbx,%rax,4), %edx
	movl	%edx, (%rbx,%r14,4)
	movl	%ecx, (%rbx,%rax,4)
	incq	%r14
	cmpq	$20, %r14
	jne	.LBB9_1
# %bb.2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z7shufflePi, .Lfunc_end9-_Z7shufflePi
	.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:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB10_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB10_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11calPositionPiPsPf, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11calDistancePiPfS0_, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12calTotalcostPfPiS_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z5calOFPfS_S_, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z14calProbabilityPfS_S_, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, %esi
	movl	$.L__unnamed_6, %edx
	movl	$.L__unnamed_6, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8mutationPiS_S_S_, %esi
	movl	$.L__unnamed_7, %edx
	movl	$.L__unnamed_7, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11mutationBayPsPiS0_, %esi
	movl	$.L__unnamed_8, %edx
	movl	$.L__unnamed_8, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end10:
	.size	__hip_module_ctor, .Lfunc_end10-__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	.LBB11_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
.LBB11_2:
	retq
.Lfunc_end11:
	.size	__hip_module_dtor, .Lfunc_end11-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z11calPositionPiPsPf,@object   # @_Z11calPositionPiPsPf
	.section	.rodata,"a",@progbits
	.globl	_Z11calPositionPiPsPf
	.p2align	3, 0x0
_Z11calPositionPiPsPf:
	.quad	_Z26__device_stub__calPositionPiPsPf
	.size	_Z11calPositionPiPsPf, 8

	.type	_Z11calDistancePiPfS0_,@object  # @_Z11calDistancePiPfS0_
	.globl	_Z11calDistancePiPfS0_
	.p2align	3, 0x0
_Z11calDistancePiPfS0_:
	.quad	_Z26__device_stub__calDistancePiPfS0_
	.size	_Z11calDistancePiPfS0_, 8

	.type	_Z12calTotalcostPfPiS_,@object  # @_Z12calTotalcostPfPiS_
	.globl	_Z12calTotalcostPfPiS_
	.p2align	3, 0x0
_Z12calTotalcostPfPiS_:
	.quad	_Z27__device_stub__calTotalcostPfPiS_
	.size	_Z12calTotalcostPfPiS_, 8

	.type	_Z5calOFPfS_S_,@object          # @_Z5calOFPfS_S_
	.globl	_Z5calOFPfS_S_
	.p2align	3, 0x0
_Z5calOFPfS_S_:
	.quad	_Z20__device_stub__calOFPfS_S_
	.size	_Z5calOFPfS_S_, 8

	.type	_Z14calProbabilityPfS_S_,@object # @_Z14calProbabilityPfS_S_
	.globl	_Z14calProbabilityPfS_S_
	.p2align	3, 0x0
_Z14calProbabilityPfS_S_:
	.quad	_Z29__device_stub__calProbabilityPfS_S_
	.size	_Z14calProbabilityPfS_S_, 8

	.type	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_,@object # @_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.globl	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.p2align	3, 0x0
_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_:
	.quad	_Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.size	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, 8

	.type	_Z8mutationPiS_S_S_,@object     # @_Z8mutationPiS_S_S_
	.globl	_Z8mutationPiS_S_S_
	.p2align	3, 0x0
_Z8mutationPiS_S_S_:
	.quad	_Z23__device_stub__mutationPiS_S_S_
	.size	_Z8mutationPiS_S_S_, 8

	.type	_Z11mutationBayPsPiS0_,@object  # @_Z11mutationBayPsPiS0_
	.globl	_Z11mutationBayPsPiS0_
	.p2align	3, 0x0
_Z11mutationBayPsPiS0_:
	.quad	_Z26__device_stub__mutationBayPsPiS0_
	.size	_Z11mutationBayPsPiS0_, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"new island%d\n"
	.size	.L.str, 14

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"%d "
	.size	.L.str.1, 4

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"cost.txt"
	.size	.L.str.5, 9

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

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"%d %d %d"
	.size	.L.str.7, 9

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"\n*****%d\347\232\204generation*****\n"
	.size	.L.str.9, 28

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"\346\234\200\345\260\217: %.0f %.0f = %f\n"
	.size	.L.str.13, 24

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"\347\250\213\345\274\217\345\237\267\350\241\214\346\211\200\350\212\261\350\262\273\357\274\232 %lf S\n"
	.size	.L.str.14, 32

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"\351\200\262\350\241\214\351\201\213\347\256\227\346\211\200\350\212\261\350\262\273\347\232\204\346\231\202\351\226\223\357\274\232 %lf S\n"
	.size	.L.str.15, 41

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z11calPositionPiPsPf"
	.size	.L__unnamed_1, 22

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z11calDistancePiPfS0_"
	.size	.L__unnamed_2, 23

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z12calTotalcostPfPiS_"
	.size	.L__unnamed_3, 23

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z5calOFPfS_S_"
	.size	.L__unnamed_4, 15

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z14calProbabilityPfS_S_"
	.size	.L__unnamed_5, 25

	.type	.L__unnamed_6,@object           # @5
.L__unnamed_6:
	.asciz	"_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_"
	.size	.L__unnamed_6, 48

	.type	.L__unnamed_7,@object           # @6
.L__unnamed_7:
	.asciz	"_Z8mutationPiS_S_S_"
	.size	.L__unnamed_7, 20

	.type	.L__unnamed_8,@object           # @7
.L__unnamed_8:
	.asciz	"_Z11mutationBayPsPiS0_"
	.size	.L__unnamed_8, 23

	.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	"data"
	.size	.Lstr, 5

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"bay"
	.size	.Lstr.1, 4

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"cost: "
	.size	.Lstr.2, 7

	.type	.Lstr.3,@object                 # @str.3
.Lstr.3:
	.asciz	"\ncalculate distance end"
	.size	.Lstr.3, 24

	.type	.Lstr.4,@object                 # @str.4
.Lstr.4:
	.asciz	"\nready to mutation"
	.size	.Lstr.4, 19

	.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 _Z26__device_stub__calPositionPiPsPf
	.addrsig_sym _Z26__device_stub__calDistancePiPfS0_
	.addrsig_sym _Z27__device_stub__calTotalcostPfPiS_
	.addrsig_sym _Z20__device_stub__calOFPfS_S_
	.addrsig_sym _Z29__device_stub__calProbabilityPfS_S_
	.addrsig_sym _Z24__device_stub__crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.addrsig_sym _Z23__device_stub__mutationPiS_S_S_
	.addrsig_sym _Z26__device_stub__mutationBayPsPiS0_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z11calPositionPiPsPf
	.addrsig_sym _Z11calDistancePiPfS0_
	.addrsig_sym _Z12calTotalcostPfPiS_
	.addrsig_sym _Z5calOFPfS_S_
	.addrsig_sym _Z14calProbabilityPfS_S_
	.addrsig_sym _Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.addrsig_sym _Z8mutationPiS_S_S_
	.addrsig_sym _Z11mutationBayPsPiS0_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z11calPositionPiPsPf   ; -- Begin function _Z11calPositionPiPsPf
	.globl	_Z11calPositionPiPsPf
	.p2align	8
	.type	_Z11calPositionPiPsPf,@function
_Z11calPositionPiPsPf:                  ; @_Z11calPositionPiPsPf
; %bb.0:
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x8
	s_load_b32 s2, s[0:1], 0x24
	v_mov_b32_e32 v1, 0
	s_mov_b64 s[0:1], 0
.LBB0_1:                                ; =>This Inner Loop Header: Depth=1
	s_waitcnt lgkmcnt(0)
	s_add_u32 s8, s6, s0
	s_addc_u32 s9, s7, s1
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_cmp_eq_u32 s0, 0x13880
	global_store_b32 v1, v1, s[8:9]
	s_cbranch_scc0 .LBB0_1
; %bb.2:                                ; %.preheader
	s_and_b32 s0, 0xffff, s2
	v_mov_b32_e32 v6, 0
	v_mad_u64_u32 v[1:2], null, s15, s0, v[0:1]
	v_mov_b32_e32 v0, 1
	s_mov_b32 s2, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_mul_lo_u32 v4, v1, 19
	v_mul_lo_u32 v5, v1, 40
.LBB0_3:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v1, s2, v4
	s_cmp_eq_u32 s2, 19
	s_cselect_b32 s3, -1, 0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 1, v[1:2]
	v_add_co_u32 v1, vcc_lo, s4, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v2, vcc_lo, s5, v2, vcc_lo
	global_load_u16 v1, v[1:2], off
	s_waitcnt vmcnt(0)
	v_cmp_eq_u16_e32 vcc_lo, 0, v1
	v_cmp_eq_u16_e64 s0, 1, v1
	v_add_co_ci_u32_e64 v0, s1, 0, v0, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_or_b32 s0, s3, s0
	s_and_saveexec_b32 s1, s0
	s_cbranch_execz .LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	s_and_b32 s0, s3, vcc_lo
	s_mov_b32 s3, exec_lo
	v_cndmask_b32_e64 v1, 0, 1, s0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v7, v0, v1
	v_cmpx_lt_i32_e32 0, v7
	s_cbranch_execz .LBB0_7
; %bb.5:                                ; %.lr.ph
                                        ;   in Loop: Header=BB0_3 Depth=1
	v_cvt_f64_i32_e32 v[0:1], v7
	v_cvt_f64_i32_e32 v[16:17], v6
	s_mov_b32 s8, 1
	s_mov_b32 s9, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[1:2], v[0:1], v[0:1]
	v_div_scale_f64 v[8:9], null, v[1:2], v[1:2], 0x402e0000
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[10:11], v[8:9]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[12:13], -v[8:9], v[10:11], 1.0
	v_fma_f64 v[10:11], v[10:11], v[12:13], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[12:13], -v[8:9], v[10:11], 1.0
	v_fma_f64 v[10:11], v[10:11], v[12:13], v[10:11]
	v_div_scale_f64 v[12:13], vcc_lo, 0x402e0000, v[1:2], 0x402e0000
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[14:15], v[12:13], v[10:11]
	v_fma_f64 v[8:9], -v[8:9], v[14:15], v[12:13]
	v_add_f64 v[12:13], 0x40140000, v[16:17]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[8:9], v[8:9], v[10:11], v[14:15]
	v_cvt_f32_f64_e32 v0, v[12:13]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[2:3], v[8:9], v[1:2], 0x402e0000
	v_lshlrev_b32_e32 v1, 1, v7
	v_sub_nc_u32_e32 v8, v5, v1
.LBB0_6:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_cvt_f64_i32_e32 v[9:10], s8
	v_add_nc_u32_e32 v7, -1, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_eq_u32_e32 vcc_lo, 0, v7
	v_mul_f64 v[9:10], v[2:3], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_cvt_f32_f64_e32 v1, v[9:10]
	v_add3_u32 v9, v8, s8, 1
	s_add_i32 s8, s8, 2
	s_or_b32 s9, vcc_lo, s9
	v_ashrrev_i32_e32 v10, 31, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[9:10], 2, v[9:10]
	v_add_co_u32 v9, s0, s6, v9
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v10, s0, s7, v10, s0
	global_store_b64 v[9:10], v[0:1], off
	s_and_not1_b32 exec_lo, exec_lo, s9
	s_cbranch_execnz .LBB0_6
.LBB0_7:                                ; %Flow70
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	v_add_nc_u32_e32 v6, 10, v6
	v_mov_b32_e32 v0, 1
.LBB0_8:                                ; %Flow71
                                        ;   in Loop: Header=BB0_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	v_add_nc_u32_e32 v5, 2, v5
	s_add_i32 s2, s2, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s2, 20
	s_cbranch_scc0 .LBB0_3
; %bb.9:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11calPositionPiPsPf
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 18
		.amdhsa_next_free_sgpr 16
		.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	_Z11calPositionPiPsPf, .Lfunc_end0-_Z11calPositionPiPsPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 564
; NumSgprs: 18
; NumVgprs: 18
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 18
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z11calDistancePiPfS0_  ; -- Begin function _Z11calDistancePiPfS0_
	.globl	_Z11calDistancePiPfS0_
	.p2align	8
	.type	_Z11calDistancePiPfS0_,@function
_Z11calDistancePiPfS0_:                 ; @_Z11calDistancePiPfS0_
; %bb.0:
	s_clause 0x2
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[2:3], s[0:1], 0x10
	s_load_b32 s8, s[0:1], 0x24
	v_mov_b32_e32 v1, 0
	s_mov_b64 s[0:1], 0
.LBB1_1:                                ; =>This Inner Loop Header: Depth=1
	s_waitcnt lgkmcnt(0)
	s_add_u32 s10, s2, s0
	s_addc_u32 s11, s3, s1
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_cmp_lg_u32 s0, 0xc3500
	global_store_b32 v1, v1, s[10:11]
	s_cbranch_scc1 .LBB1_1
; %bb.2:                                ; %.preheader.preheader
	s_and_b32 s0, 0xffff, s8
	s_mov_b32 s1, 0
	v_mad_u64_u32 v[1:2], null, s15, s0, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v9, v1, 20
	v_mul_lo_u32 v1, v1, 40
	v_or_b32_e32 v0, 1, v9
	s_delay_alu instid0(VALU_DEP_2)
	v_or_b32_e32 v10, 2, v1
.LBB1_3:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_5 Depth 2
	s_cmp_gt_u32 s1, 18
	s_cbranch_scc1 .LBB1_6
; %bb.4:                                ; %.lr.ph
                                        ;   in Loop: Header=BB1_3 Depth=1
	v_add_nc_u32_e32 v1, s1, v9
	s_mov_b32 s8, s1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s4, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v3, vcc_lo
	global_load_b32 v2, v[2:3], off
	v_lshlrev_b32_e32 v3, 1, v1
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[5:6], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[7:8], 2, v[3:4]
	v_add_co_u32 v3, vcc_lo, s4, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v6, vcc_lo
	v_add_co_u32 v5, vcc_lo, s6, v7
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v6, vcc_lo, s7, v8, vcc_lo
	v_mov_b32_e32 v7, v10
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v1, v2, v9
	v_mul_lo_u32 v1, v1, 20
.LBB1_5:                                ;   Parent Loop BB1_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_ashrrev_i32_e32 v8, 31, v7
	global_load_b64 v[11:12], v[5:6], off
	s_add_i32 s8, s8, 1
	s_cmp_gt_u32 s8, 18
	v_lshlrev_b64 v[13:14], 2, v[7:8]
	v_add_nc_u32_e32 v7, 2, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v13, vcc_lo, s6, v13
	v_add_co_ci_u32_e32 v14, vcc_lo, s7, v14, vcc_lo
	global_load_b64 v[13:14], v[13:14], off
	global_load_b32 v8, v[3:4], off
	v_add_co_u32 v3, vcc_lo, v3, 4
	v_add_co_ci_u32_e32 v4, vcc_lo, 0, v4, vcc_lo
	s_waitcnt vmcnt(0)
	v_dual_sub_f32 v19, v14, v12 :: v_dual_add_nc_u32 v16, v8, v9
	v_sub_f32_e32 v11, v13, v11
	v_add_nc_u32_e32 v15, v8, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_dual_sub_f32 v8, v12, v14 :: v_dual_mul_f32 v13, v19, v19
	v_cmp_gt_f32_e32 vcc_lo, v14, v12
	v_mad_u64_u32 v[17:18], null, v16, 20, v[2:3]
	v_mul_f32_e32 v8, v8, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v8, v8, v13, vcc_lo
	v_ashrrev_i32_e32 v18, 31, v17
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v8, v11, v11
	v_ashrrev_i32_e32 v16, 31, v15
	v_mul_f32_e32 v11, 0x4f800000, v8
	v_cmp_gt_f32_e32 vcc_lo, 0xf800000, v8
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[15:16], 2, v[15:16]
	v_cndmask_b32_e32 v8, v8, v11, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_co_u32 v11, s0, s2, v15
	v_add_co_ci_u32_e64 v12, s0, s3, v16, s0
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_sqrt_f32_e32 v13, v8
	s_waitcnt_depctr 0xfff
	v_add_nc_u32_e32 v15, 1, v13
	v_add_nc_u32_e32 v14, -1, v13
	v_fma_f32 v19, -v15, v13, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v16, -v14, v13, v8
	v_cmp_ge_f32_e64 s0, 0, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_cndmask_b32_e64 v13, v13, v14, s0
	v_cmp_lt_f32_e64 s0, 0, v19
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_cndmask_b32_e64 v15, v13, v15, s0
	v_lshlrev_b64 v[13:14], 2, v[17:18]
	v_mul_f32_e32 v16, 0x37800000, v15
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v13, s0, s2, v13
	v_cndmask_b32_e32 v15, v15, v16, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e64 v14, vcc_lo, s3, v14, s0
	v_cmp_class_f32_e64 vcc_lo, v8, 0x260
	v_cndmask_b32_e32 v8, v15, v8, vcc_lo
	s_clause 0x1
	global_store_b32 v[11:12], v8, off
	global_store_b32 v[13:14], v8, off
	s_cbranch_scc0 .LBB1_5
.LBB1_6:                                ; %.loopexit
                                        ;   in Loop: Header=BB1_3 Depth=1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v0, 1, v0
	v_add_nc_u32_e32 v10, 2, v10
	s_add_i32 s1, s1, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s1, 20
	s_cbranch_scc1 .LBB1_3
; %bb.7:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11calDistancePiPfS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 20
		.amdhsa_next_free_sgpr 16
		.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_end1:
	.size	_Z11calDistancePiPfS0_, .Lfunc_end1-_Z11calDistancePiPfS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 680
; NumSgprs: 18
; NumVgprs: 20
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 20
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z12calTotalcostPfPiS_  ; -- Begin function _Z12calTotalcostPfPiS_
	.globl	_Z12calTotalcostPfPiS_
	.p2align	8
	.type	_Z12calTotalcostPfPiS_,@function
_Z12calTotalcostPfPiS_:                 ; @_Z12calTotalcostPfPiS_
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_mov_b32 s8, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	v_mul_lo_u32 v0, 0x190, v1
.LBB2_1:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB2_2 Depth 2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	s_mov_b64 s[2:3], 0
	v_lshlrev_b64 v[3:4], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v1, vcc_lo, s4, v3
	v_add_co_ci_u32_e32 v2, vcc_lo, s5, v4, vcc_lo
	v_add_co_u32 v3, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v4, vcc_lo
.LBB2_2:                                ;   Parent Loop BB2_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v5, vcc_lo, v1, s2
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v2, vcc_lo
	s_add_u32 s10, s6, s2
	s_addc_u32 s11, s7, s3
	s_load_b32 s9, s[10:11], 0x0
	global_load_b32 v7, v[5:6], off
	v_add_co_u32 v5, vcc_lo, v3, s2
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v4, vcc_lo
	s_add_u32 s2, s2, 4
	s_addc_u32 s3, s3, 0
	s_cmpk_eq_i32 s2, 0x50
	s_waitcnt lgkmcnt(0)
	v_cvt_f32_i32_e32 v8, s9
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_mul_f32_e32 v7, v7, v8
	global_store_b32 v[5:6], v7, off
	s_cbranch_scc0 .LBB2_2
; %bb.3:                                ;   in Loop: Header=BB2_1 Depth=1
	s_add_i32 s8, s8, 1
	v_add_nc_u32_e32 v0, 20, v0
	s_add_u32 s6, s6, 0x50
	s_addc_u32 s7, s7, 0
	s_cmp_eq_u32 s8, 20
	s_cbranch_scc0 .LBB2_1
; %bb.4:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12calTotalcostPfPiS_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 16
		.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_end2:
	.size	_Z12calTotalcostPfPiS_, .Lfunc_end2-_Z12calTotalcostPfPiS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 252
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z5calOFPfS_S_          ; -- Begin function _Z5calOFPfS_S_
	.globl	_Z5calOFPfS_S_
	.p2align	8
	.type	_Z5calOFPfS_S_,@function
_Z5calOFPfS_S_:                         ; @_Z5calOFPfS_S_
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	v_mov_b32_e32 v7, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	v_mul_hi_i32 v0, 0x51eb851f, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v2, 31, v0
	v_ashrrev_i32_e32 v0, 4, v0
	v_add_nc_u32_e32 v0, v0, v2
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b32_e32 v3, 1, v0
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[2:3], 2, v[3:4]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, s4, v5
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v6, vcc_lo
	s_mov_b32 s4, 0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v2, vcc_lo, s6, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s7, v3, vcc_lo
	global_store_b32 v[4:5], v7, off
	global_store_b32 v[2:3], v7, off
	global_load_b32 v6, v[4:5], off
	v_mul_lo_u32 v7, 0x190, v1
.LBB3_1:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB3_2 Depth 2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v8, 31, v7
	s_mov_b64 s[2:3], 0
	v_lshlrev_b64 v[8:9], 2, v[7:8]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v8, vcc_lo, s0, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, s1, v9, vcc_lo
.LBB3_2:                                ;   Parent Loop BB3_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, v8, s2
	v_add_co_ci_u32_e32 v11, vcc_lo, s3, v9, vcc_lo
	s_add_u32 s2, s2, 4
	s_addc_u32 s3, s3, 0
	s_cmpk_eq_i32 s2, 0x50
	global_load_b32 v10, v[10:11], off
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v6, v10, v6
	global_store_b32 v[4:5], v6, off
	s_cbranch_scc0 .LBB3_2
; %bb.3:                                ;   in Loop: Header=BB3_1 Depth=1
	v_add_nc_u32_e32 v7, 20, v7
	s_add_i32 s4, s4, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s4, 20
	s_cbranch_scc0 .LBB3_1
; %bb.4:
	v_mul_lo_u32 v7, v0, 50
	s_mov_b32 s0, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v7, v1, v7
	v_cmpx_ne_u32_e32 0, v7
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB3_8
; %bb.5:
	v_ashrrev_i32_e32 v1, 31, v0
	s_mov_b32 s1, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_sub_co_u32 v0, vcc_lo, v2, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_sub_co_ci_u32_e32 v1, vcc_lo, v3, v1, vcc_lo
	global_load_b32 v0, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmpx_gt_f32_e32 v0, v6
	s_cbranch_execz .LBB3_7
; %bb.6:
	v_cvt_f32_i32_e32 v7, v7
	global_store_b64 v[2:3], v[6:7], off
.LBB3_7:                                ; %Flow
	s_or_b32 exec_lo, exec_lo, s1
                                        ; implicit-def: $vgpr1_vgpr2
                                        ; implicit-def: $vgpr4_vgpr5
                                        ; implicit-def: $vgpr2_vgpr3
.LBB3_8:                                ; %Flow58
	s_and_not1_saveexec_b32 s0, s0
	s_cbranch_execz .LBB3_10
; %bb.9:
	v_mad_i64_i32 v[6:7], null, 0x4c, v1, v[4:5]
	v_mov_b32_e32 v1, 0
	global_load_b32 v0, v[6:7], off
	s_waitcnt vmcnt(0)
	global_store_b64 v[2:3], v[0:1], off
.LBB3_10:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z5calOFPfS_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 12
		.amdhsa_next_free_sgpr 16
		.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_end3:
	.size	_Z5calOFPfS_S_, .Lfunc_end3-_Z5calOFPfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 464
; NumSgprs: 18
; NumVgprs: 12
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 12
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z14calProbabilityPfS_S_ ; -- Begin function _Z14calProbabilityPfS_S_
	.globl	_Z14calProbabilityPfS_S_
	.p2align	8
	.type	_Z14calProbabilityPfS_S_,@function
_Z14calProbabilityPfS_S_:               ; @_Z14calProbabilityPfS_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x24
	s_load_b64 s[2:3], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_add_co_u32 v4, vcc_lo, s2, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v3, vcc_lo
	s_load_b128 s[0:3], s[0:1], 0x0
	global_load_b32 v0, v[4:5], off
	s_waitcnt vmcnt(0)
	v_cvt_f64_f32_e32 v[4:5], v0
	v_mul_hi_i32 v0, 0x51eb851f, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v6, 31, v0
	v_ashrrev_i32_e32 v7, 4, v0
	v_add_nc_u32_e32 v6, v7, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v7, 31, v6
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v6, vcc_lo, s2, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	global_load_b32 v12, v[6:7], off
	v_div_scale_f64 v[0:1], null, v[4:5], v[4:5], 1.0
	v_div_scale_f64 v[10:11], vcc_lo, 1.0, v[4:5], 1.0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[6:7], v[0:1]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[8:9], -v[0:1], v[6:7], 1.0
	v_fma_f64 v[6:7], v[6:7], v[8:9], v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[8:9], -v[0:1], v[6:7], 1.0
	v_fma_f64 v[6:7], v[6:7], v[8:9], v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[8:9], v[10:11], v[6:7]
	v_fma_f64 v[0:1], -v[0:1], v[8:9], v[10:11]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_div_fmas_f64 v[0:1], v[0:1], v[6:7], v[8:9]
	s_waitcnt vmcnt(0)
	v_cvt_f64_f32_e32 v[6:7], v12
	v_div_fixup_f64 v[0:1], v[0:1], v[4:5], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f64 v[4:5], null, v[6:7], v[6:7], v[0:1]
	v_rcp_f64_e32 v[8:9], v[4:5]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[10:11], -v[4:5], v[8:9], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[8:9], v[8:9], v[10:11], v[8:9]
	v_fma_f64 v[10:11], -v[4:5], v[8:9], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[8:9], v[8:9], v[10:11], v[8:9]
	v_div_scale_f64 v[10:11], vcc_lo, v[0:1], v[6:7], v[0:1]
	v_mul_f64 v[12:13], v[10:11], v[8:9]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[4:5], -v[4:5], v[12:13], v[10:11]
	v_div_fmas_f64 v[4:5], v[4:5], v[8:9], v[12:13]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fixup_f64 v[0:1], v[4:5], v[6:7], v[0:1]
	v_cvt_f32_f64_e32 v4, v[0:1]
	v_add_co_u32 v0, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v3, vcc_lo
	global_store_b32 v[0:1], v4, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14calProbabilityPfS_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 14
		.amdhsa_next_free_sgpr 16
		.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_end4:
	.size	_Z14calProbabilityPfS_S_, .Lfunc_end4-_Z14calProbabilityPfS_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 428
; NumSgprs: 18
; NumVgprs: 14
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 14
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_ ; -- Begin function _Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.globl	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
	.p2align	8
	.type	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_,@function
_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_: ; @_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[2:3], 0x74
	s_load_b512 s[16:31], s[2:3], 0x0
	v_dual_mov_b32 v11, 0 :: v_dual_and_b32 v12, 0x3ff, v0
	s_mov_b32 s6, 0x47ae147b
	s_mov_b32 s7, 0x3f847ae1
	s_load_b128 s[8:11], s[2:3], 0x58
	s_mov_b32 s5, 0
	v_mov_b32_e32 v16, -1
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_i32 s4, s15, s4
	v_add_nc_u32_e32 v5, s4, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v6, 31, v5
	v_lshlrev_b64 v[1:2], 2, v[5:6]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s26, v1
	v_add_co_ci_u32_e32 v4, vcc_lo, s27, v2, vcc_lo
	v_add_co_u32 v9, vcc_lo, s28, v1
	v_add_co_ci_u32_e32 v10, vcc_lo, s29, v2, vcc_lo
	global_load_b32 v6, v[3:4], off
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v7, 0x51eb851f, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v8, 31, v7
	v_ashrrev_i32_e32 v7, 5, v7
	v_add_nc_u32_e32 v7, v7, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v7, 0x64, v7
	v_sub_nc_u32_e32 v6, v6, v7
	global_store_b32 v[3:4], v6, off
	global_load_b32 v7, v[9:10], off
	v_cvt_f64_i32_e32 v[3:4], v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mul_f64 v[3:4], v[3:4], s[6:7]
	s_mov_b32 s6, 0
                                        ; implicit-def: $sgpr7
	v_cvt_f32_f64_e32 v15, v[3:4]
	v_mul_hi_i32 v4, 0x51eb851f, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v8, 31, v4
	v_ashrrev_i32_e32 v4, 4, v4
	v_add_nc_u32_e32 v4, v4, v8
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v3, 0x51eb851f, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v6, 31, v3
	v_ashrrev_i32_e32 v3, 5, v3
	v_add_nc_u32_e32 v3, v3, v6
	v_mul_lo_u32 v6, v4, 50
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_4)
	v_mul_lo_u32 v8, 0x64, v3
	v_add_co_u32 v3, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v4, vcc_lo, s11, v2, vcc_lo
	v_sub_nc_u32_e32 v13, v5, v6
	s_delay_alu instid0(VALU_DEP_4)
	v_sub_nc_u32_e32 v14, v7, v8
	v_add_co_u32 v7, vcc_lo, s8, v1
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v2, vcc_lo
	global_store_b32 v[3:4], v11, off
	global_store_b32 v[9:10], v14, off
	global_store_b32 v[7:8], v16, off
                                        ; implicit-def: $sgpr8
.LBB5_1:                                ; =>This Inner Loop Header: Depth=1
	v_add_nc_u32_e32 v9, s6, v6
	s_mov_b32 s11, exec_lo
                                        ; implicit-def: $sgpr9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v10, 31, v9
	v_lshlrev_b64 v[10:11], 2, v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v10, vcc_lo, s16, v10
	v_add_co_ci_u32_e32 v11, vcc_lo, s17, v11, vcc_lo
	global_load_b32 v16, v[10:11], off
	s_waitcnt vmcnt(0)
	v_cmp_nle_f32_e64 s10, v16, v15
	v_cmpx_le_f32_e32 v16, v15
	s_cbranch_execz .LBB5_3
; %bb.2:                                ;   in Loop: Header=BB5_1 Depth=1
	global_load_b32 v10, v[10:11], off offset:4
	s_and_not1_b32 s10, s10, exec_lo
	s_mov_b32 s9, -1
	s_waitcnt vmcnt(0)
	v_cmp_ngt_f32_e32 vcc_lo, v10, v15
	s_and_b32 s12, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s10, s10, s12
.LBB5_3:                                ; %Flow446
                                        ;   in Loop: Header=BB5_1 Depth=1
	s_or_b32 exec_lo, exec_lo, s11
	v_mov_b32_e32 v11, s6
	s_and_not1_b32 s8, s8, exec_lo
	s_and_b32 s9, s9, exec_lo
	s_mov_b32 s12, -1
	s_or_b32 s8, s8, s9
                                        ; implicit-def: $sgpr11
	s_and_saveexec_b32 s9, s10
	s_cbranch_execz .LBB5_7
; %bb.4:                                ;   in Loop: Header=BB5_1 Depth=1
	s_cmp_lg_u32 s6, 48
	s_mov_b32 s10, -1
	s_cbranch_scc0 .LBB5_6
; %bb.5:                                ;   in Loop: Header=BB5_1 Depth=1
	s_add_i32 s6, s6, 1
	s_mov_b32 s10, 0
                                        ; implicit-def: $vgpr9
.LBB5_6:                                ; %Flow448
                                        ;   in Loop: Header=BB5_1 Depth=1
	v_mov_b32_e32 v11, s6
	s_mov_b32 s11, 49
	s_and_not1_b32 s8, s8, exec_lo
	s_or_not1_b32 s12, s10, exec_lo
.LBB5_7:                                ; %Flow447
                                        ;   in Loop: Header=BB5_1 Depth=1
	s_or_b32 exec_lo, exec_lo, s9
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	s_and_b32 s9, exec_lo, s12
	v_mov_b32_e32 v10, s11
	s_or_b32 s5, s9, s5
	s_and_not1_b32 s7, s7, exec_lo
	s_and_b32 s9, s8, exec_lo
	s_or_b32 s7, s7, s9
	s_and_not1_b32 exec_lo, exec_lo, s5
	s_cbranch_execnz .LBB5_1
; %bb.8:                                ; %loop.exit.guard
	s_or_b32 exec_lo, exec_lo, s5
	s_and_saveexec_b32 s5, s7
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s5, exec_lo, s5
	s_cbranch_execz .LBB5_10
; %bb.9:
	v_add_nc_u32_e32 v10, 1, v11
	global_store_b32 v[7:8], v9, off
.LBB5_10:                               ; %.loopexit323
	s_or_b32 exec_lo, exec_lo, s5
	v_ashrrev_i32_e32 v7, 31, v6
	s_mov_b32 s6, 0x47ae147b
	s_mov_b32 s7, 0x3f847ae1
	s_mov_b32 s5, 0
                                        ; implicit-def: $sgpr8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[7:8], 2, v[6:7]
	v_add_co_u32 v7, vcc_lo, s16, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v8, vcc_lo, s17, v8, vcc_lo
	global_load_b32 v9, v[7:8], off offset:4
	v_cvt_f64_i32_e32 v[7:8], v14
	v_mul_f64 v[7:8], v[7:8], s[6:7]
	s_mov_b32 s7, 0
                                        ; implicit-def: $sgpr6
	s_delay_alu instid0(VALU_DEP_1)
	v_cvt_f32_f64_e32 v7, v[7:8]
	s_waitcnt vmcnt(0)
	global_store_b32 v[3:4], v9, off
.LBB5_11:                               ; =>This Inner Loop Header: Depth=1
	v_add_nc_u32_e32 v3, s7, v6
	s_mov_b32 s11, exec_lo
                                        ; implicit-def: $sgpr9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s16, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s17, v4, vcc_lo
	global_load_b32 v8, v[3:4], off
	s_waitcnt vmcnt(0)
	v_cmp_nle_f32_e64 s10, v8, v7
	v_cmpx_le_f32_e32 v8, v7
	s_cbranch_execz .LBB5_13
; %bb.12:                               ;   in Loop: Header=BB5_11 Depth=1
	global_load_b32 v3, v[3:4], off offset:4
	s_and_not1_b32 s10, s10, exec_lo
	s_mov_b32 s9, -1
	s_waitcnt vmcnt(0)
	v_cmp_ngt_f32_e32 vcc_lo, v3, v7
	s_and_b32 s12, vcc_lo, exec_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_or_b32 s10, s10, s12
.LBB5_13:                               ; %Flow440
                                        ;   in Loop: Header=BB5_11 Depth=1
	s_or_b32 exec_lo, exec_lo, s11
	v_mov_b32_e32 v3, s7
	s_and_not1_b32 s8, s8, exec_lo
	s_and_b32 s9, s9, exec_lo
	s_mov_b32 s12, -1
	s_or_b32 s8, s8, s9
                                        ; implicit-def: $sgpr11
	s_and_saveexec_b32 s9, s10
	s_cbranch_execz .LBB5_17
; %bb.14:                               ;   in Loop: Header=BB5_11 Depth=1
	s_cmp_lg_u32 s7, 48
	s_mov_b32 s10, -1
	s_cbranch_scc0 .LBB5_16
; %bb.15:                               ;   in Loop: Header=BB5_11 Depth=1
	s_add_i32 s7, s7, 1
	s_mov_b32 s10, 0
.LBB5_16:                               ; %Flow442
                                        ;   in Loop: Header=BB5_11 Depth=1
	v_mov_b32_e32 v3, s7
	s_mov_b32 s11, 49
	s_and_not1_b32 s8, s8, exec_lo
	s_or_not1_b32 s12, s10, exec_lo
.LBB5_17:                               ; %Flow441
                                        ;   in Loop: Header=BB5_11 Depth=1
	s_or_b32 exec_lo, exec_lo, s9
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(SALU_CYCLE_1)
	s_and_b32 s9, exec_lo, s12
	v_mov_b32_e32 v11, s11
	s_or_b32 s5, s9, s5
	s_and_not1_b32 s6, s6, exec_lo
	s_and_b32 s9, s8, exec_lo
	s_or_b32 s6, s6, s9
	s_and_not1_b32 exec_lo, exec_lo, s5
	s_cbranch_execnz .LBB5_11
; %bb.18:                               ; %loop.exit.guard423
	s_or_b32 exec_lo, exec_lo, s5
	s_and_saveexec_b32 s5, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_xor_b32 s5, exec_lo, s5
; %bb.19:
	v_add_nc_u32_e32 v11, 1, v3
; %bb.20:                               ; %.loopexit322
	s_or_b32 exec_lo, exec_lo, s5
	v_add_nc_u32_e32 v4, v10, v6
	v_mul_lo_u32 v3, v5, 40
	v_add3_u32 v8, v12, v10, s4
	v_mul_lo_u32 v15, v13, 19
	s_mul_i32 s5, s4, 38
	v_mul_lo_u32 v7, v4, 20
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_lo_u32 v13, v8, 19
	v_ashrrev_i32_e32 v4, 31, v3
	v_ashrrev_i32_e32 v8, 31, v7
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_4) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[9:10], 2, v[3:4]
	v_mad_u32_u24 v4, v12, 38, s5
	v_sub_nc_u32_e32 v13, v13, v15
	s_mov_b32 s5, 0
	v_lshlrev_b64 v[16:17], 2, v[7:8]
	v_add_co_u32 v7, vcc_lo, s22, v9
	v_add_co_ci_u32_e32 v8, vcc_lo, s23, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v9, vcc_lo, s18, v16
	v_add_co_ci_u32_e32 v10, vcc_lo, s19, v17, vcc_lo
.LBB5_21:                               ; =>This Inner Loop Header: Depth=1
	v_add_nc_u32_e32 v16, s5, v13
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v17, 31, v16
	v_lshlrev_b64 v[16:17], 1, v[16:17]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v16, vcc_lo, s20, v16
	v_add_co_ci_u32_e32 v17, vcc_lo, s21, v17, vcc_lo
	global_load_b32 v14, v[9:10], off
	global_load_u16 v18, v[16:17], off
	v_add_nc_u32_e32 v16, s5, v4
	v_add_co_u32 v9, vcc_lo, v9, 4
	v_add_co_ci_u32_e32 v10, vcc_lo, 0, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_ashrrev_i32_e32 v17, 31, v16
	s_add_i32 s5, s5, 1
	s_cmp_eq_u32 s5, 20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[16:17], 1, v[16:17]
	v_add_co_u32 v16, vcc_lo, s24, v16
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v17, vcc_lo, s25, v17, vcc_lo
	s_waitcnt vmcnt(1)
	global_store_b32 v[7:8], v14, off
	v_add_co_u32 v7, vcc_lo, v7, 4
	v_add_co_ci_u32_e32 v8, vcc_lo, 0, v8, vcc_lo
	s_waitcnt vmcnt(0)
	global_store_b16 v[16:17], v18, off
	s_cbranch_scc0 .LBB5_21
; %bb.22:                               ; %.preheader321
	v_add_nc_u32_e32 v4, v11, v6
	v_lshlrev_b32_e32 v13, 1, v5
	s_mov_b32 s5, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_lo_u32 v6, v4, 20
	v_add3_u32 v4, v12, v11, s4
	v_or_b32_e32 v11, 1, v13
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v4, v4, 19
	v_mul_lo_u32 v14, v11, 20
	v_ashrrev_i32_e32 v7, 31, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[8:9], 2, v[6:7]
	v_mad_u64_u32 v[6:7], null, v5, 38, 19
	v_sub_nc_u32_e32 v7, v4, v15
	v_add_co_u32 v4, vcc_lo, s18, v8
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v5, vcc_lo, s19, v9, vcc_lo
.LBB5_23:                               ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v8, s5, v7
	v_add_nc_u32_e32 v15, s5, v6
	v_ashrrev_i32_e32 v9, 31, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v16, 31, v15
	v_lshlrev_b64 v[8:9], 1, v[8:9]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[15:16], 1, v[15:16]
	v_add_co_u32 v8, vcc_lo, s20, v8
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v9, vcc_lo, s21, v9, vcc_lo
	global_load_b32 v10, v[4:5], off
	global_load_u16 v17, v[8:9], off
	v_add_nc_u32_e32 v8, s5, v14
	v_add_co_u32 v4, vcc_lo, v4, 4
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_ashrrev_i32_e32 v9, 31, v8
	s_add_i32 s5, s5, 1
	s_cmp_eq_u32 s5, 20
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[8:9], 2, v[8:9]
	v_add_co_u32 v8, s4, s22, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e64 v9, s4, s23, v9, s4
	v_add_co_u32 v15, s4, s24, v15
	v_add_co_ci_u32_e64 v16, s4, s25, v16, s4
	s_waitcnt vmcnt(1)
	global_store_b32 v[8:9], v10, off
	s_waitcnt vmcnt(0)
	global_store_b16 v[15:16], v17, off
	s_cbranch_scc0 .LBB5_23
; %bb.24:
	v_add_co_u32 v4, vcc_lo, s30, v1
	v_add_co_ci_u32_e32 v5, vcc_lo, s31, v2, vcc_lo
	s_mov_b32 s4, 0x47ae147b
	s_mov_b32 s5, 0x3f847ae1
	global_load_b32 v6, v[4:5], off
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v7, 0x51eb851f, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v8, 31, v7
	v_ashrrev_i32_e32 v7, 5, v7
	v_add_nc_u32_e32 v7, v7, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v7, 0x64, v7
	v_sub_nc_u32_e32 v8, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	v_cvt_f64_i32_e32 v[6:7], v8
	global_store_b32 v[4:5], v8, off
	v_mul_f64 v[6:7], v[6:7], s[4:5]
	s_mov_b32 s4, 0x33333333
	s_mov_b32 s5, 0x3fe33333
	v_cvt_f32_f64_e32 v6, v[6:7]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[6:7], v6
	v_cmp_ge_f64_e32 vcc_lo, s[4:5], v[6:7]
	s_and_saveexec_b32 s4, vcc_lo
	s_cbranch_execz .LBB5_67
; %bb.25:
	s_load_b128 s[4:7], s[2:3], 0x40
	s_load_b64 s[0:1], s[0:1], 0x4
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v6, vcc_lo, s4, v1
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v2, vcc_lo
	s_lshr_b32 s0, s0, 16
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	s_mul_i32 s0, s0, s1
	global_load_b32 v4, v[6:7], off
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v5, 0x6bca1af3, v4
	v_lshrrev_b32_e32 v8, 31, v5
	v_ashrrev_i32_e32 v5, 3, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v5, v5, v8
	v_mul_lo_u32 v5, v5, 19
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v15, v4, v5
	v_add_nc_u32_e32 v4, v15, v3
	global_store_b32 v[6:7], v15, off
	v_ashrrev_i32_e32 v5, 31, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[8:9], 2, v[4:5]
	v_add_co_u32 v24, vcc_lo, s22, v8
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v25, vcc_lo, s23, v9, vcc_lo
	global_load_b64 v[7:8], v[24:25], off
	v_add_nc_u32_e32 v5, v15, v14
	v_ashrrev_i32_e32 v6, 31, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[9:10], 2, v[5:6]
	v_mul_lo_u32 v6, s0, v12
	v_bfe_u32 v12, v0, 10, 10
	v_bfe_u32 v0, v0, 20, 10
	s_mov_b32 s0, 0
	v_add_co_u32 v26, vcc_lo, s22, v9
	v_add_co_ci_u32_e32 v27, vcc_lo, s23, v10, vcc_lo
	v_mad_u32_u24 v6, v12, s1, v6
	global_load_b64 v[9:10], v[26:27], off
	v_add_lshl_u32 v6, v6, v0, 5
	v_mov_b32_e32 v0, 0
	s_waitcnt vmcnt(1)
	v_mov_b32_e32 v20, v8
	global_store_b32 v[26:27], v7, off
	global_load_b32 v28, v[24:25], off offset:4
	v_mov_b32_e32 v16, v7
	v_mov_b32_e32 v18, v7
	s_waitcnt vmcnt(1)
	v_dual_mov_b32 v22, v8 :: v_dual_mov_b32 v19, v10
	v_mov_b32_e32 v17, v9
	v_mov_b32_e32 v23, v10
	v_mov_b32_e32 v21, v9
	ds_store_b128 v6, v[16:19]
	ds_store_b128 v6, v[20:23] offset:16
	s_waitcnt vmcnt(0)
	s_clause 0x1
	global_store_b32 v[26:27], v28, off offset:4
	global_store_b64 v[24:25], v[9:10], off
.LBB5_26:                               ; =>This Inner Loop Header: Depth=1
	v_add_nc_u32_e32 v12, s0, v6
	s_add_i32 s0, s0, 8
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s0, 32
	ds_load_b64 v[16:17], v12
	s_waitcnt lgkmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v16, v17
	v_add_co_ci_u32_e32 v0, vcc_lo, 0, v0, vcc_lo
	s_cbranch_scc0 .LBB5_26
; %bb.27:
	v_add_co_u32 v1, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s7, v2, vcc_lo
	s_mov_b32 s0, exec_lo
	global_store_b32 v[1:2], v0, off
	v_cmpx_lt_i32_e32 0, v0
	s_xor_b32 s0, exec_lo, s0
	s_cbranch_execz .LBB5_52
; %bb.28:                               ; %LeafBlock
	s_mov_b32 s1, exec_lo
	v_cmpx_eq_u32_e32 1, v0
	s_cbranch_execz .LBB5_51
; %bb.29:                               ; %.preheader320.preheader
	v_mov_b32_e32 v2, 0x63
	s_mov_b32 s2, 0
.LBB5_30:                               ; %.preheader320
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_add_nc_u32_e32 v0, s2, v6
	s_add_i32 s2, s2, 8
	s_cmp_eq_u32 s2, 32
	ds_load_b64 v[0:1], v0
	s_waitcnt lgkmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v0, v1
	v_cndmask_b32_e32 v2, v2, v0, vcc_lo
	s_cbranch_scc0 .LBB5_30
; %bb.31:                               ; %.preheader319
	v_add_nc_u32_e32 v7, 1, v15
	s_mov_b32 s2, 0
.LBB5_32:                               ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB5_35 Depth 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_lshl_add_u32 v0, s2, 3, v6
	s_mov_b32 s3, exec_lo
	ds_load_b32 v8, v0
	s_waitcnt lgkmcnt(0)
	v_cmpx_ne_u32_e64 v8, v2
	s_cbranch_execz .LBB5_40
; %bb.33:                               ;   in Loop: Header=BB5_32 Depth=1
	ds_load_b32 v9, v0 offset:4
	s_waitcnt lgkmcnt(0)
	v_cmp_ne_u32_e32 vcc_lo, v9, v2
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB5_40
; %bb.34:                               ; %.preheader317.preheader
                                        ;   in Loop: Header=BB5_32 Depth=1
	v_mov_b32_e32 v10, 0
	s_mov_b32 s4, 0
.LBB5_35:                               ; %.preheader317
                                        ;   Parent Loop BB5_32 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_mov_b32_e32 v0, v7
	s_mov_b32 s5, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_ne_u32_e64 v10, v15
	s_cbranch_execz .LBB5_39
; %bb.36:                               ;   in Loop: Header=BB5_35 Depth=2
	v_add_nc_u32_e32 v0, v10, v3
	s_mov_b32 s6, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s22, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s23, v1, vcc_lo
	global_load_b32 v12, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u32_e64 v12, v9
	s_cbranch_execz .LBB5_38
; %bb.37:                               ;   in Loop: Header=BB5_35 Depth=2
	global_store_b32 v[0:1], v8, off
.LBB5_38:                               ; %Flow428
                                        ;   in Loop: Header=BB5_35 Depth=2
	s_or_b32 exec_lo, exec_lo, s6
	v_mov_b32_e32 v0, v10
.LBB5_39:                               ;   in Loop: Header=BB5_35 Depth=2
	s_or_b32 exec_lo, exec_lo, s5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_lt_i32_e32 vcc_lo, 18, v0
	v_add_nc_u32_e32 v10, 1, v0
	s_or_b32 s4, vcc_lo, s4
	s_and_not1_b32 exec_lo, exec_lo, s4
	s_cbranch_execnz .LBB5_35
.LBB5_40:                               ; %.loopexit318
                                        ;   in Loop: Header=BB5_32 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_add_i32 s2, s2, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s2, 4
	s_cbranch_scc1 .LBB5_32
; %bb.41:                               ; %.preheader315.preheader
	s_mov_b32 s2, 0
.LBB5_42:                               ; %.preheader315
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB5_45 Depth 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_lshl_add_u32 v0, s2, 3, v6
	s_mov_b32 s3, exec_lo
	ds_load_b32 v3, v0
	s_waitcnt lgkmcnt(0)
	v_cmpx_ne_u32_e64 v3, v2
	s_cbranch_execz .LBB5_50
; %bb.43:                               ;   in Loop: Header=BB5_42 Depth=1
	ds_load_b32 v8, v0 offset:4
	s_waitcnt lgkmcnt(0)
	v_cmp_ne_u32_e32 vcc_lo, v8, v2
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB5_50
; %bb.44:                               ; %.preheader313.preheader
                                        ;   in Loop: Header=BB5_42 Depth=1
	v_mov_b32_e32 v9, 0
	s_mov_b32 s4, 0
.LBB5_45:                               ; %.preheader313
                                        ;   Parent Loop BB5_42 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_mov_b32_e32 v0, v7
	s_mov_b32 s5, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_ne_u32_e64 v9, v15
	s_cbranch_execz .LBB5_49
; %bb.46:                               ;   in Loop: Header=BB5_45 Depth=2
	v_add_nc_u32_e32 v0, v9, v14
	s_mov_b32 s6, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s22, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s23, v1, vcc_lo
	global_load_b32 v10, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmpx_eq_u32_e64 v10, v3
	s_cbranch_execz .LBB5_48
; %bb.47:                               ;   in Loop: Header=BB5_45 Depth=2
	global_store_b32 v[0:1], v8, off
.LBB5_48:                               ; %Flow
                                        ;   in Loop: Header=BB5_45 Depth=2
	s_or_b32 exec_lo, exec_lo, s6
	v_mov_b32_e32 v0, v9
.LBB5_49:                               ;   in Loop: Header=BB5_45 Depth=2
	s_or_b32 exec_lo, exec_lo, s5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_lt_i32_e32 vcc_lo, 18, v0
	v_add_nc_u32_e32 v9, 1, v0
	s_or_b32 s4, vcc_lo, s4
	s_and_not1_b32 exec_lo, exec_lo, s4
	s_cbranch_execnz .LBB5_45
.LBB5_50:                               ; %.loopexit314
                                        ;   in Loop: Header=BB5_42 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_add_i32 s2, s2, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s2, 4
	s_cbranch_scc1 .LBB5_42
.LBB5_51:                               ; %Flow431
	s_or_b32 exec_lo, exec_lo, s1
                                        ; implicit-def: $vgpr15
                                        ; implicit-def: $vgpr14
                                        ; implicit-def: $vgpr7_vgpr8
                                        ; implicit-def: $vgpr9_vgpr10
                                        ; implicit-def: $vgpr3
.LBB5_52:                               ; %Flow435
	s_and_not1_saveexec_b32 s1, s0
	s_cbranch_execz .LBB5_66
; %bb.53:                               ; %.preheader312.preheader
	v_add_nc_u32_e32 v2, 1, v15
	v_mov_b32_e32 v6, 0
	s_mov_b32 s2, 0
.LBB5_54:                               ; %.preheader312
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mov_b32_e32 v0, v2
	s_mov_b32 s3, exec_lo
	v_cmpx_ne_u32_e64 v6, v15
	s_cbranch_execz .LBB5_58
; %bb.55:                               ; %condstore.split
                                        ;   in Loop: Header=BB5_54 Depth=1
	v_add_nc_u32_e32 v0, v6, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s22, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s23, v1, vcc_lo
	global_load_b32 v12, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e64 s0, v12, v9
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v12, v12, v7, s0
	v_cmp_eq_u32_e32 vcc_lo, v12, v10
	s_or_b32 s4, s0, vcc_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_saveexec_b32 s0, s4
	s_cbranch_execz .LBB5_57
; %bb.56:                               ;   in Loop: Header=BB5_54 Depth=1
	v_cndmask_b32_e32 v12, v12, v8, vcc_lo
	global_store_b32 v[0:1], v12, off
.LBB5_57:                               ; %Flow434
                                        ;   in Loop: Header=BB5_54 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_mov_b32_e32 v0, v6
.LBB5_58:                               ;   in Loop: Header=BB5_54 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_lt_i32_e32 vcc_lo, 18, v0
	v_add_nc_u32_e32 v6, 1, v0
	s_or_b32 s2, vcc_lo, s2
	s_and_not1_b32 exec_lo, exec_lo, s2
	s_cbranch_execnz .LBB5_54
; %bb.59:                               ; %.preheader.preheader
	s_or_b32 exec_lo, exec_lo, s2
	v_mov_b32_e32 v3, 0
	s_mov_b32 s2, 0
.LBB5_60:                               ; %.preheader
                                        ; =>This Inner Loop Header: Depth=1
	v_mov_b32_e32 v0, v2
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_2)
	v_cmpx_ne_u32_e64 v3, v15
	s_cbranch_execz .LBB5_64
; %bb.61:                               ; %condstore.split351
                                        ;   in Loop: Header=BB5_60 Depth=1
	v_add_nc_u32_e32 v0, v3, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s22, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s23, v1, vcc_lo
	global_load_b32 v6, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e64 s0, v6, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e64 v6, v6, v9, s0
	v_cmp_eq_u32_e32 vcc_lo, v6, v8
	s_or_b32 s4, s0, vcc_lo
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_saveexec_b32 s0, s4
	s_cbranch_execz .LBB5_63
; %bb.62:                               ;   in Loop: Header=BB5_60 Depth=1
	v_cndmask_b32_e32 v6, v6, v10, vcc_lo
	global_store_b32 v[0:1], v6, off
.LBB5_63:                               ; %Flow432
                                        ;   in Loop: Header=BB5_60 Depth=1
	s_or_b32 exec_lo, exec_lo, s0
	v_mov_b32_e32 v0, v3
.LBB5_64:                               ;   in Loop: Header=BB5_60 Depth=1
	s_or_b32 exec_lo, exec_lo, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_lt_i32_e32 vcc_lo, 18, v0
	v_add_nc_u32_e32 v3, 1, v0
	s_or_b32 s2, vcc_lo, s2
	s_and_not1_b32 exec_lo, exec_lo, s2
	s_cbranch_execnz .LBB5_60
; %bb.65:                               ; %Flow433
	s_or_b32 exec_lo, exec_lo, s2
.LBB5_66:                               ; %Flow436
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	s_or_b32 exec_lo, exec_lo, s1
	v_sub_nc_u32_e32 v0, v4, v13
	v_sub_nc_u32_e32 v2, v5, v11
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[0:1], 1, v[0:1]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[2:3], 1, v[2:3]
	v_add_co_u32 v0, vcc_lo, s24, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v1, vcc_lo, s25, v1, vcc_lo
	v_add_co_u32 v2, vcc_lo, s24, v2
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v3, vcc_lo, s25, v3, vcc_lo
	global_load_u16 v4, v[0:1], off
	s_waitcnt vmcnt(0)
	global_store_b16 v[2:3], v4, off
	global_load_u16 v5, v[0:1], off offset:2
	s_waitcnt vmcnt(0)
	s_clause 0x1
	global_store_b16 v[2:3], v5, off offset:2
	global_store_b16 v[0:1], v4, off
	global_load_u16 v2, v[2:3], off offset:2
	s_waitcnt vmcnt(0)
	global_store_b16 v[0:1], v2, off offset:2
.LBB5_67:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
		.amdhsa_group_segment_fixed_size 32768
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 360
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 1
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 2
		.amdhsa_next_free_vgpr 29
		.amdhsa_next_free_sgpr 32
		.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_end5:
	.size	_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_, .Lfunc_end5-_Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 3128
; NumSgprs: 34
; NumVgprs: 29
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 32768 bytes/workgroup (compile time only)
; SGPRBlocks: 4
; VGPRBlocks: 3
; NumSGPRsForWavesPerEU: 34
; NumVGPRsForWavesPerEU: 29
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 2
	.text
	.protected	_Z8mutationPiS_S_S_     ; -- Begin function _Z8mutationPiS_S_S_
	.globl	_Z8mutationPiS_S_S_
	.p2align	8
	.type	_Z8mutationPiS_S_S_,@function
_Z8mutationPiS_S_S_:                    ; @_Z8mutationPiS_S_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s8, s[0:1], 0x2c
	s_load_b256 s[0:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s8, s8, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s8, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_add_co_u32 v4, vcc_lo, s2, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v3, vcc_lo
	s_mov_b32 s2, 0x47ae147b
	s_mov_b32 s3, 0x3f847ae1
	global_load_b32 v0, v[4:5], off
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v4, 0x51eb851f, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v5, 31, v4
	v_ashrrev_i32_e32 v4, 5, v4
	v_add_nc_u32_e32 v4, v4, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v4, 0x64, v4
	v_sub_nc_u32_e32 v0, v0, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_i32_e32 v[4:5], v0
	v_mul_f64 v[4:5], v[4:5], s[2:3]
	s_mov_b32 s2, 0xeb851eb8
	s_mov_b32 s3, 0x3f9eb851
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f32_f64_e32 v0, v[4:5]
	v_cvt_f64_f32_e32 v[4:5], v0
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_gt_f64_e32 vcc_lo, s[2:3], v[4:5]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB6_2
; %bb.1:
	v_add_co_u32 v4, vcc_lo, s6, v2
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v3, vcc_lo
	v_add_co_u32 v2, vcc_lo, s4, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v3, vcc_lo
	v_mul_lo_u32 v1, v1, 20
	global_load_b32 v0, v[4:5], off
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(1)
	v_mul_hi_i32 v3, 0x66666667, v0
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v4, 0x66666667, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_lshrrev_b32_e32 v5, 31, v3
	v_ashrrev_i32_e32 v3, 3, v3
	v_lshrrev_b32_e32 v6, 31, v4
	v_ashrrev_i32_e32 v4, 3, v4
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v3, v3, v5
	v_add_nc_u32_e32 v4, v4, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_mul_lo_u32 v3, v3, 20
	v_mul_lo_u32 v4, v4, 20
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v0, v0, v3
	v_sub_nc_u32_e32 v2, v2, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v0, v0, v1
	v_add_nc_u32_e32 v2, v2, v1
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v1, 31, v0
	v_ashrrev_i32_e32 v3, 31, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v2, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	s_clause 0x1
	global_load_b32 v4, v[0:1], off
	global_load_b32 v5, v[2:3], off
	s_waitcnt vmcnt(1)
	global_store_b32 v[2:3], v4, off
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v5, off
.LBB6_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8mutationPiS_S_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 7
		.amdhsa_next_free_sgpr 16
		.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_end6:
	.size	_Z8mutationPiS_S_S_, .Lfunc_end6-_Z8mutationPiS_S_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 488
; NumSgprs: 18
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 7
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z11mutationBayPsPiS0_  ; -- Begin function _Z11mutationBayPsPiS0_
	.globl	_Z11mutationBayPsPiS0_
	.p2align	8
	.type	_Z11mutationBayPsPiS0_,@function
_Z11mutationBayPsPiS0_:                 ; @_Z11mutationBayPsPiS0_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, 0x47ae147b
	s_mov_b32 s3, 0x3f847ae1
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[1:2]
	v_add_co_u32 v4, vcc_lo, s6, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v3, vcc_lo
	global_load_b32 v0, v[4:5], off
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v4, 0x51eb851f, v0
	v_lshrrev_b32_e32 v5, 31, v4
	v_ashrrev_i32_e32 v4, 5, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v4, v4, v5
	v_mul_lo_u32 v4, 0x64, v4
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v0, v0, v4
	v_cvt_f64_i32_e32 v[4:5], v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_mul_f64 v[4:5], v[4:5], s[2:3]
	s_mov_b32 s2, 0xeb851eb8
	s_mov_b32 s3, 0x3f9eb851
	v_cvt_f32_f64_e32 v0, v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[4:5], v0
	v_cmp_gt_f64_e32 vcc_lo, s[2:3], v[4:5]
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB7_2
; %bb.1:
	s_load_b64 s[0:1], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s0, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v3, vcc_lo
	global_load_b32 v0, v[2:3], off
	s_waitcnt vmcnt(0)
	v_mul_hi_i32 v2, 0x6bca1af3, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshrrev_b32_e32 v3, 31, v2
	v_ashrrev_i32_e32 v2, 3, v2
	v_add_nc_u32_e32 v2, v2, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v2, v2, 19
	v_sub_nc_u32_e32 v0, v0, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[2:3], null, v1, 19, v[0:1]
	v_ashrrev_i32_e32 v3, 31, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 1, v[2:3]
	v_add_co_u32 v0, vcc_lo, s4, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v1, vcc_lo
	global_load_u16 v2, v[0:1], off
	s_waitcnt vmcnt(0)
	v_cmp_eq_u16_e32 vcc_lo, 0, v2
	v_cndmask_b32_e64 v2, 0, 1, vcc_lo
	global_store_b16 v[0:1], v2, off
.LBB7_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11mutationBayPsPiS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.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 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 6
		.amdhsa_next_free_sgpr 16
		.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_end7:
	.size	_Z11mutationBayPsPiS0_, .Lfunc_end7-_Z11mutationBayPsPiS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 376
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; 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:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11calPositionPiPsPf
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11calPositionPiPsPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     18
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11calDistancePiPfS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11calDistancePiPfS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     20
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z12calTotalcostPfPiS_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z12calTotalcostPfPiS_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z5calOFPfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z5calOFPfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     12
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z14calProbabilityPfS_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z14calProbabilityPfS_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     14
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         40
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         48
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         56
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         64
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         72
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         80
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         88
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         96
        .size:           8
        .value_kind:     global_buffer
      - .offset:         104
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         108
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         112
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         116
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         118
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         120
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         122
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         124
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         126
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         144
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         152
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         160
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         168
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 32768
    .kernarg_segment_align: 8
    .kernarg_segment_size: 360
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     34
    .sgpr_spill_count: 0
    .symbol:         _Z9crossOverPfPiPsS0_S1_S0_S0_S0_S0_S0_S0_S0_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     29
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         36
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         44
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         46
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         48
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         50
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         52
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         54
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         96
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8mutationPiS_S_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8mutationPiS_S_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11mutationBayPsPiS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z11mutationBayPsPiS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
