   #include <stdio.h>
 #include <cuda.h>
 #include <time.h>
 #define EXPO 7


__global__ void RecursiveDoublingKernel(int variableSize, int step,int blockRow, int blockColumn,float* deviceY,float* deviceM,int evenOrOddFlag)
{
	//we weill do something like y(i+1)=my(i)+b
	int bx=blockIdx.x;
	int by=blockIdx.y;
	int tx=threadIdx.x;
	int ty=threadIdx.y;

	int processIndex=tx;
/*	printf("%d ",tx);

    printf("%f,%f,%f \n",deviceY[0],deviceY[1],deviceY[2]);
    printf("%f,%f,%f \n",deviceM[0],deviceM[1],deviceM[2]);*/
    

	//so M and Y will be divided into two part, the first part store the old value
	//the second half part store the updated value

	int halfSize=variableSize;
	

	//teh start index of the second part will be halfsize;
    //so if evenOrOddFlag is Odd, the new value will be stored in the second half,
    //otherwise it will be stored in the first half. 
    int secondhalfHelper=halfSize+step+processIndex;
    //printf("second half helper is: %d \n",secondhalfHelper);

    //be careful that 1-step the old value still need to be copied to the current value,since the new value will start calculated at step+1

    if(evenOrOddFlag%2==1)
    {
    	//printf("does this ever got run?");
      deviceY[secondhalfHelper]=deviceY[secondhalfHelper-halfSize]+deviceM[secondhalfHelper-halfSize]*deviceY[processIndex];
      deviceM[secondhalfHelper]=deviceM[secondhalfHelper-halfSize]*deviceM[processIndex];
      //copy it once here
      if(tx==0&&ty==0)
      {
      	for(int i=0;i<step;i++)
      	{
          deviceY[i+halfSize]=deviceY[i];
          deviceM[i+halfSize]=deviceM[i];
      	}
      }
    }
    else
    {
       
      deviceY[secondhalfHelper-halfSize]=deviceY[secondhalfHelper]+deviceM[secondhalfHelper]*deviceY[halfSize+processIndex];
      deviceM[secondhalfHelper-halfSize]=deviceM[secondhalfHelper]*deviceM[halfSize+processIndex];

       if(tx==0&&ty==0) //just need to copy once, so the other processors allow to idle at thsi time
      {
      	for(int i=0;i<step;i++)
      	{
          deviceY[i]=deviceY[i+halfSize];
         deviceM[i]=deviceM[i+halfSize];
      	}
      }
    }
    __syncthreads();
}

__global__ void LoopingbackRecursiveDoublingKernel(int variableSize, int step,int blockRow, int blockColumn,float* deviceY,float* deviceM,int evenOrOddFlag)
{
	//we weill do something like y(i+1)=my(i)+b
	int bx=blockIdx.x;
	int by=blockIdx.y;
	int tx=threadIdx.x;
	int ty=threadIdx.y;

	int processIndex=tx;
/*	printf("%d ",tx);

    printf("%f,%f,%f \n",deviceY[0],deviceY[1],deviceY[2]);
    printf("%f,%f,%f \n",deviceM[0],deviceM[1],deviceM[2]);*/
    

	//so M and Y will be divided into two part, the first part store the old value
	//the second half part store the updated value

	int halfSize=variableSize;
	

	//teh start index of the second part will be halfsize;
    //so if evenOrOddFlag is Odd, the new value will be stored in the second half,
    //otherwise it will be stored in the first half. 
    //int secondhalfHelper=halfSize+step+processIndex;
    int secondhalfHelper=halfSize+processIndex;

    //printf("second half helper is: %d \n",secondhalfHelper);

    //be careful that 1-step the old value still need to be copied to the current value,since the new value will start calculated at step+1

    if(evenOrOddFlag%2==1)
    {
      deviceY[secondhalfHelper]=deviceY[processIndex]+deviceY[processIndex+step]*deviceM[processIndex];
      deviceM[secondhalfHelper]=deviceM[processIndex]*deviceM[processIndex+step];

      //now the reverse part need to copy the second part
      //should be from index N-i to index variableSize-1
      if(tx==0&&ty==0)
      {
      	for(int i=variableSize-step;i<variableSize;i++)
      	{
          deviceY[i+halfSize]=deviceY[i];
          deviceM[i+halfSize]=deviceM[i];
      	}
      }
    }
    else
    {
       
      deviceY[processIndex]=deviceY[halfSize+processIndex]+deviceY[halfSize+step+processIndex]*deviceM[halfSize+processIndex]; 
      //deviceY[secondhalfHelper-halfSize]=deviceY[secondhalfHelper]+deviceM[secondhalfHelper]*deviceY[halfSize+processIndex];
      //deviceM[secondhalfHelper-halfSize]=deviceM[secondhalfHelper]*deviceM[halfSize+processIndex];
      deviceM[processIndex]=deviceM[processIndex+halfSize]*deviceM[processIndex+halfSize+step];
      if(tx==0&&ty==0)
      {
      	for(int i=variableSize-step;i<variableSize;i++)
      	{
          deviceY[i]=deviceY[i+halfSize];
          deviceM[i]=deviceM[i+halfSize];
      	}
      }
    }
    __syncthreads();
}


__global__ void MatrixVersionRecursiveDoubling(int variableSize, int step,int blockRow, int blockColumn,float* deviceYForW,float* deviceMForW,int evenOrOddFlag,float* deviceA, float* deviceB, float* deviceC, float* deviceD)
{
  //so right now just use grid (1,1) if time allow will implment other grid size
  	int bx=blockIdx.x;
	int by=blockIdx.y;
	int tx=threadIdx.x;
	int ty=threadIdx.y;

	int processId=tx; //this is only for the this particluar grid and block setup
    
    int halfSizeY=variableSize;
    int halfSizeM=2*variableSize;
/*
    int secondhalfHelper=halfSize+step+2*processIndex; //this need to multiply 2, different from non-matrix version
    int secondhalfHelper1=halfSize+step+4*processIndex;*/

    int indexHelperY=halfSizeY+2*step+2*processId;
    int indexHelperM=halfSizeM+4*step+4*processId;

    if(evenOrOddFlag%2==1)
    {
    	//update M and Y here
    	deviceYForW[indexHelperY]=deviceYForW[indexHelperY-halfSizeY]+deviceMForW[indexHelperM-halfSizeM]*deviceYForW[2*processId]+deviceMForW[indexHelperM-halfSizeM+1]*deviceYForW[2*processId+1];
    	deviceYForW[indexHelperY+1]=deviceYForW[indexHelperY-halfSizeY+1]+deviceMForW[indexHelperM-halfSizeM+2]*deviceYForW[2*processId]+deviceMForW[indexHelperM-halfSizeM+3]*deviceYForW[2*processId+1];

        deviceMForW[indexHelperM]=deviceMForW[4*step+4*processId]*deviceMForW[4*processId]+deviceMForW[4*step+4*processId+1]*deviceMForW[4*processId+2];
        deviceMForW[indexHelperM+1]=deviceMForW[4*step+4*processId]*deviceMForW[4*processId+1]+deviceMForW[4*step+4*processId+1]*deviceMForW[4*processId+3];
        deviceMForW[indexHelperM+2]=deviceMForW[4*step+4*processId+2]*deviceMForW[4*processId]+deviceMForW[4*step+4*processId+3]*deviceMForW[4*processId+2];
        deviceMForW[indexHelperM+3]=deviceMForW[4*step+4*processId+2]*deviceMForW[4*processId+1]+deviceMForW[4*step+4*processId+3]*deviceMForW[4*processId+3];

        //now need to copy 1-- step old value to new value just need to copy once for each step
        for(int i=0;i<step;i++)
        {
        	deviceYForW[halfSizeY+2*i]=deviceYForW[2*i];
        	deviceYForW[halfSizeY+2*i+1]=deviceYForW[2*i+1];

        	deviceMForW[halfSizeM+4*i]=deviceMForW[4*i];
        	deviceMForW[halfSizeM+4*i+1]=deviceMForW[4*i+1];
        	deviceMForW[halfSizeM+4*i+2]=deviceMForW[4*i+2];
        	deviceMForW[halfSizeM+4*i+3]=deviceMForW[4*i+3];
        }
    }
    else
    {
        deviceYForW[indexHelperY-halfSizeY]=deviceYForW[indexHelperY]+deviceMForW[indexHelperM]*deviceYForW[2*processId+halfSizeY]+deviceMForW[indexHelperM+1]*deviceYForW[2*processId+1+halfSizeY];
    	deviceYForW[indexHelperY-halfSizeY+1]=deviceYForW[indexHelperY+1]+deviceMForW[indexHelperM+2]*deviceYForW[2*processId+halfSizeY]+deviceMForW[indexHelperM+3]*deviceYForW[2*processId+1+halfSizeY];

        deviceMForW[indexHelperM-halfSizeM]=deviceMForW[4*step+4*processId+halfSizeM]*deviceMForW[4*processId+halfSizeM]+deviceMForW[4*step+4*processId+1+halfSizeM]*deviceMForW[4*processId+2+halfSizeM];
        deviceMForW[indexHelperM+1-halfSizeM]=deviceMForW[4*step+4*processId+halfSizeM]*deviceMForW[4*processId+1+halfSizeM]+deviceMForW[4*step+4*processId+1+halfSizeM]*deviceMForW[4*processId+3+halfSizeM];
        deviceMForW[indexHelperM+2-halfSizeM]=deviceMForW[4*step+4*processId+2+halfSizeM]*deviceMForW[4*processId+halfSizeM]+deviceMForW[4*step+4*processId+3+halfSizeM]*deviceMForW[4*processId+2+halfSizeM];
        deviceMForW[indexHelperM+3-halfSizeM]=deviceMForW[4*step+4*processId+2+halfSizeM]*deviceMForW[4*processId+1+halfSizeM]+deviceMForW[4*step+4*processId+3+halfSizeM]*deviceMForW[4*processId+3+halfSizeM];

        //now need to copy 1-- step old value to new value just need to copy once for each step
        for(int i=0;i<step;i++)
        {
        	deviceYForW[2*i]=deviceYForW[2*i+halfSizeY];
        	deviceYForW[2*i+1]=deviceYForW[2*i+1+halfSizeY];

        	deviceMForW[4*i]=deviceMForW[4*i+halfSizeM];
        	deviceMForW[4*i+1]=deviceMForW[4*i+1+halfSizeM];
        	deviceMForW[4*i+2]=deviceMForW[4*i+2+halfSizeM];
        	deviceMForW[4*i+3]=deviceMForW[4*i+3+halfSizeM];
        }

    }
    __syncthreads();


}

int main()
{
/* float* M;
 float* Y;
 int variableSize=10;
 int variableSpace=2*variableSize*sizeof(float);*/
   //make it double size since it run in parallel so you want to keep all the previous version
/* M=(float*)malloc(variableSpace);
 Y=(float*)malloc(variableSpace); */

/* M[0]=1;
 Y[0]=1;*/

 int m=pow(2,EXPO)-1; 
 int b=1;
 int a=0;
 float delta=(b-a)*1.0/(m+1.0);

//store teh metrix that is to be LU decomposited
 float *A;
 float *B;
 float *C;
 float *D;
 float *W;
 float *G;

	int chunkLength=m;
	int chunkSize=chunkLength*sizeof(float);
	A=(float*)malloc(chunkSize);
	B=(float*)malloc(chunkSize);
	C=(float*)malloc(chunkSize);
	D=(float*)malloc(chunkSize);
	W=(float*)malloc((m-1)*sizeof(float));
	G=(float*)malloc((m*sizeof(float)));

	 A[0]=0;
        //int vectorLength=EXPO*m;
     
        for(int i=1;i<m;i++)
        {
            A[i]=1-delta*delta*0.5*(i+1);
        }
        //else will be 0
      /*  for(int i=m;i<chunkLength;i++)
        {
          A[i]=0;
        }*/

        for(int i=0;i<m;i++)
        {
            B[i]=-2+delta*delta*1.0;
        }
      /*    for(int i=m;i<chunkLength;i++)
        {
          B[i]=0;
        }*/

        C[m-1]=0;
        for(int i=0;i<m-1;i++)
        {
            C[i]=1+0.5*delta*delta*(i+1);
        }
     /*   for(int i=m;i<chunkLength;i++)
        {
          C[i]=0;
        }*/


        
        for(int i=0;i<m-1;i++)
        {
            D[i]=2*(i+1)*pow(delta,3);
        }
        D[m-1]=2*m*delta*delta*delta-1+3.5*delta*delta;
      /*  for(int i=m;i<chunkLength;i++)
        {
          D[i]=0;
        }*/

       float *deviceA, *deviceB, *deviceC, *deviceD;
        cudaMalloc((void**)&deviceA,chunkSize);
        cudaMalloc((void**)&deviceB,chunkSize);
        cudaMalloc((void**)&deviceC,chunkSize);
        cudaMalloc((void**)&deviceD,chunkSize);     
       //copy the host vector to device.
        cudaMemcpy(deviceA,A,chunkSize,cudaMemcpyHostToDevice);
        cudaMemcpy(deviceB,B,chunkSize,cudaMemcpyHostToDevice);
        cudaMemcpy(deviceC,C,chunkSize,cudaMemcpyHostToDevice);
        cudaMemcpy(deviceD,D,chunkSize,cudaMemcpyHostToDevice);

        clock_t begin,end;
        begin=clock();

     //start the code to calculate the w with recursive doubling applied to matrix
      //so we need 2*2*(N-1) for both YforW and 2*4*(N-1) for MforW , the size N should be equal to m here
     float *MforW, *YforW;
     

     int MforWLength=4*(m-1);
     int YforWLength=2*(m-1);
     int MforWSize=2*MforWLength*sizeof(float);
     int YforWSize=2*YforWLength*sizeof(float);
     MforW=(float*)malloc(MforWSize);
     YforW=(float*)malloc(YforWSize);

     //the first step of recursive doubling, initialize Y and M;
     YforW[0]=1;
     YforW[1]=B[0]/(C[0]*1.0);
     //the other should be 0 since V(I)=A[I]V[I-1]+0
     for(int i=2;i<YforWLength;i++)
     {
     	YforW[i]=0;
     }
     //the first one for M should be[1,0,0,1]
     MforW[0]=1;
     MforW[1]=0;
     MforW[2]=0;
     MforW[3]=1;
     for(int i=4;i<MforWLength;i=i+4)
     {
     	MforW[i]=0;
     	MforW[i+1]=1;
     	MforW[i+2]=-1.0*A[i/4]/C[i/4];
     	MforW[i+3]=1.0*B[i/4]/C[i/4];
     }

     float *deviceMforW, *deviceYforW;
     cudaMalloc((void**)&deviceMforW,MforWSize);
     cudaMalloc((void**)&deviceYforW,YforWSize);

     cudaMemcpy(deviceMforW,MforW,MforWSize,cudaMemcpyHostToDevice);
     cudaMemcpy(deviceYforW,YforW,YforWSize,cudaMemcpyHostToDevice);

   
   int step=1;
   int evenOrOddFlag=0;

  do {
  	 //each time needs N-Step processors
  	
  	  evenOrOddFlag=evenOrOddFlag+1;
  	  dim3 dimGrid(1,1);
  	  int blockRow=1;
  	  int blockColumn=(m-1)-step;
  	  dim3 dimBlock(blockColumn,blockRow);
  	  //variableSIZE should be half size y
  	  MatrixVersionRecursiveDoubling<<<dimGrid,dimBlock>>>(YforWLength,step,blockRow,blockColumn,deviceYforW,deviceMforW,evenOrOddFlag,deviceA,deviceB,deviceC,deviceD);
        step=step+step;
    
   }while( step <= YforWLength/2);

   //so if evenOrOddFlag is odd, it means that the latest value will be second half,
   //otherwise it will be in the first half
   cudaMemcpy(MforW,deviceMforW,MforWSize,cudaMemcpyDeviceToHost);
   cudaMemcpy(YforW,deviceYforW,YforWSize,cudaMemcpyDeviceToHost);

      printf("The following are w value from recursvie doubling: \n");
   if(evenOrOddFlag%2==0)
   {
   	//length of w is m-1 and length of y is s(m-1)
     for(int i=0;i<m-1;i++)
     {
     	if(i%16==0)
     	{
     		printf("\n");
     	}
     	W[i]=YforW[2*i]*1.0/YforW[2*i+1];
     	printf("%f ",W[i]);
     }
   }
   else
   {
   	   for(int i=0;i<m-1;i++)
     {
     	if(i%16==0)
     	{
     		printf("\n");
     	}
     	W[i]=YforW[2*i+YforWLength]*1.0/YforW[2*i+1+YforWLength];
     	printf("%f ",W[i]);
     }
   }  

   //now we get the w value, next step is to get the g value
   //g will have n-1 in values.
   //according to the formula 5.3.3.7
   float* MforG,*YforG;
   MforG=(float*)malloc(m*sizeof(float));
   YforG=(float*)malloc(m*sizeof(float));
   int forGSize=2*m*sizeof(float);
   YforG[0]=D[0]*1.0/B[0];
   MforG[0]=1.0;
/*  printf("\n test start here");*/
	 for(int i=1;i<m;i++)
	 {
	 	YforG[i]=D[i]/(B[i]-A[i]*W[i-1]);
	 	MforG[i]=-1*A[i]/(B[i]-A[i]*W[i-1]);
	 }

	 

	 float *deviceMforG, *deviceYforG;
	 cudaMalloc((void**)&deviceMforG,forGSize);
	 cudaMalloc((void**)&deviceYforG,forGSize);


 cudaMemcpy(deviceMforG,MforG,forGSize,cudaMemcpyHostToDevice);
 cudaMemcpy(deviceYforG,YforG,forGSize,cudaMemcpyHostToDevice);

  int stepG=1;
  int evenOrOddFlagG=0;

  do {
  	 //each time needs N-Step processors
  	
  	  evenOrOddFlagG=evenOrOddFlagG+1;
  	  dim3 dimGrid1(1,1);
  	  int blockRow1=1;
  	  int blockColumn1=m-stepG;
  	  dim3 dimBlock1(blockColumn1,blockRow1);
  	  RecursiveDoublingKernel<<<dimGrid1,dimBlock1>>>(m,stepG,blockRow1,blockColumn1,deviceYforG,deviceMforG,evenOrOddFlagG);
      stepG=stepG+stepG;
   }while( stepG <= m);

   //so if evenOrOddFlag is odd, it means that the latest value will be second half,
   //otherwise it will be in the first half
   cudaMemcpy(MforG,deviceMforG,forGSize,cudaMemcpyDeviceToHost);
   cudaMemcpy(YforG,deviceYforG,forGSize,cudaMemcpyDeviceToHost);

   if(evenOrOddFlagG%2==0)
   {
   	
     for(int i=0;i<m;i++)
     {
		     	if(i%16==0)
		   	{
		   		printf("\n");
		   	}
		 G[i]=YforG[i];
     	printf("[%d] %f ",i,YforG[i]);
     }
   }
   else
   {

   	  for(int i=0;i<m;i++)
     {
	     	if(i%16==0)
	   	{
	   		printf("\n");
	   	}
	   	 G[i]=YforG[i];
     	printf("[%d] %f ",i,YforG[i+m]);
     }
   }


   //now we get G, it is time for us to reverse it back to get our final x
  float* MforX,*YforX;
   MforX=(float*)malloc(m*sizeof(float));
   YforX=(float*)malloc(m*sizeof(float));
   int forXSize=2*m*sizeof(float);
   YforX[m-1]=G[m-1];
   MforG[m-1]=1.0;
/*  printf("\n test start here");*/
	 for(int i=0;i<m-1;i++)
	 {
	 	YforX[i]=G[i];
	 	MforX[i]=-1*W[i];
	 }

	 

	 float *deviceMforX, *deviceYforX;
	 cudaMalloc((void**)&deviceMforX,forXSize);
	 cudaMalloc((void**)&deviceYforX,forXSize);


 cudaMemcpy(deviceMforX,MforX,forXSize,cudaMemcpyHostToDevice);
 cudaMemcpy(deviceYforX,YforX,forXSize,cudaMemcpyHostToDevice);

  int stepX=1;
  int evenOrOddFlagX=0;

  do {
  	 //each time needs N-Step processors
  	
  	  evenOrOddFlagX=evenOrOddFlagX+1;
  	  dim3 dimGrid2(1,1);
  	  int blockRow2=1;
  	  int blockColumn2=m-stepX;
  	  dim3 dimBlock2(blockColumn2,blockRow2);
  	  LoopingbackRecursiveDoublingKernel<<<dimGrid2,dimBlock2>>>(m,stepX,blockRow2,blockColumn2,deviceYforX,deviceMforX,evenOrOddFlagX);
      stepX=stepX+stepX;
   }while( stepX<= m);

   //so if evenOrOddFlag is odd, it means that the latest value will be second half,
   //otherwise it will be in the first half
   cudaMemcpy(MforX,deviceMforX,forXSize,cudaMemcpyDeviceToHost);
   cudaMemcpy(YforX,deviceYforX,forXSize,cudaMemcpyDeviceToHost);

   printf("The following is the result for x finally! \n");
   if(evenOrOddFlagX%2==0)
   {
   	
     for(int i=0;i<m;i++)
     {
		     	if(i%16==0)
		   	{
		   		printf("\n");
		   	}
     	printf(" %f ",YforX[i]);
     }
   }
   else
   {

   	  for(int i=0;i<m;i++)
     {
	     	if(i%16==0)
	   	{
	   		printf("\n");
	   	}
     	printf("%f ",YforX[i+m]);
     }
   }



     //printf("y for G is %f \n",YforG[444]);
      double time_spent;
      end=clock();
      time_spent=(double)(end-begin)/CLOCKS_PER_SEC;
      printf("\n time used to calculate pde with %d varaible recursive doubling is :%f seconds \n",m,time_spent);

      cudaFree(deviceA);
      cudaFree(deviceB);
      cudaFree(deviceC);
      cudaFree(deviceD);
      cudaFree(deviceMforW);
      cudaFree(deviceYforW);
       
        free(A);
        free(B);
        free(C);
        free(D);
        free(MforW);
        free(YforW);

  return 0;
}


	.file	"tmpxft_00239018_00000000-6_total.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	_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	.type	_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i, @function
_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 28(%rsp)
	leaq	48(%rsp), %rdi
	movl	%esi, 24(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 20(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 16(%rsp)
	leaq	40(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movq	%rsp, %rax
	movq	%rax, 136(%rsp)
	leaq	176(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L2
	pushq	40(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z23RecursiveDoublingKerneliiiiPfS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 192
	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 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L2:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i, .-_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	.globl	_Z23RecursiveDoublingKerneliiiiPfS_i
	.type	_Z23RecursiveDoublingKerneliiiiPfS_i, @function
_Z23RecursiveDoublingKerneliiiiPfS_i:
.LFB2054:
	.cfi_startproc
	endbr64
	jmp	_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	.cfi_endproc
.LFE2054:
	.size	_Z23RecursiveDoublingKerneliiiiPfS_i, .-_Z23RecursiveDoublingKerneliiiiPfS_i
	.globl	_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	.type	_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i, @function
_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i:
.LFB2055:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movl	%edi, 28(%rsp)
	leaq	48(%rsp), %rdi
	movl	%esi, 24(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 20(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 16(%rsp)
	leaq	40(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%r9, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	20(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movq	%rsp, %rax
	movq	%rax, 136(%rsp)
	leaq	176(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L8
	pushq	40(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 192
	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 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L8:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2055:
	.size	_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i, .-_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	.globl	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.type	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i, @function
_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i:
.LFB2056:
	.cfi_startproc
	endbr64
	jmp	_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	.cfi_endproc
.LFE2056:
	.size	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i, .-_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.globl	_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_
	.type	_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_, @function
_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_:
.LFB2057:
	.cfi_startproc
	endbr64
	subq	$232, %rsp
	.cfi_def_cfa_offset 240
	movq	248(%rsp), %rax
	movl	%edi, 60(%rsp)
	leaq	80(%rsp), %rdi
	movl	%esi, 56(%rsp)
	leaq	92(%rsp), %rsi
	movq	%rax, 24(%rsp)
	movq	256(%rsp), %rax
	movl	%edx, 52(%rsp)
	leaq	64(%rsp), %rdx
	movq	%rax, 16(%rsp)
	movq	264(%rsp), %rax
	movl	%ecx, 48(%rsp)
	leaq	72(%rsp), %rcx
	movq	%rax, 8(%rsp)
	movq	272(%rsp), %rax
	movq	%r8, 40(%rsp)
	movq	%r9, 32(%rsp)
	movq	%rax, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rax
	movl	$1, 88(%rsp)
	movq	%rax, 128(%rsp)
	leaq	56(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	52(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	240(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 200(%rsp)
	movq	%rsp, %rax
	movq	%rax, 208(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	%rax, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L13
	pushq	72(%rsp)
	.cfi_def_cfa_offset 248
	leaq	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 256
	movq	108(%rsp), %rcx
	movl	116(%rsp), %r8d
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	leaq	144(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 248
	popq	%rdx
	.cfi_def_cfa_offset 240
.L13:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	addq	$232, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_, .-_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_
	.globl	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.type	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, @function
_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_
	.cfi_endproc
.LFE2058:
	.size	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, .-_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC8:
	.string	"The following are w value from recursvie doubling: \n"
.LC9:
	.string	"\n"
.LC10:
	.string	"%f "
.LC12:
	.string	"[%d] %f "
.LC13:
	.string	"The following is the result for x finally! \n"
.LC15:
	.string	"\n time used to calculate pde with %d varaible recursive doubling is :%f seconds \n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$508, %edi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$200, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 184(%rsp)
	xorl	%eax, %eax
	call	malloc@PLT
	movl	$508, %edi
	movq	%rax, 32(%rsp)
	call	malloc@PLT
	movl	$508, %edi
	movq	%rax, 24(%rsp)
	call	malloc@PLT
	movl	$508, %edi
	movq	%rax, 40(%rsp)
	call	malloc@PLT
	movl	$504, %edi
	movq	%rax, 48(%rsp)
	call	malloc@PLT
	movl	$508, %edi
	movq	%rax, %r15
	call	malloc@PLT
	movsd	.LC1(%rip), %xmm3
	movsd	.LC2(%rip), %xmm2
	movq	%rax, 56(%rsp)
	movq	32(%rsp), %rax
	movl	$0x00000000, (%rax)
	movl	$2, %eax
.L19:
	cvtsi2sdl	%eax, %xmm1
	movaps	%xmm2, %xmm0
	movq	32(%rsp), %rbx
	mulsd	%xmm3, %xmm1
	subsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -4(%rbx,%rax,4)
	incq	%rax
	cmpq	$128, %rax
	jne	.L19
	movss	.LC3(%rip), %xmm0
	xorl	%eax, %eax
.L20:
	movq	24(%rsp), %rbx
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	cmpq	$127, %rax
	jne	.L20
	movq	40(%rsp), %rax
	movl	$0x00000000, 504(%rax)
	movl	$1, %eax
.L21:
	cvtsi2sdl	%eax, %xmm0
	movq	40(%rsp), %rbx
	mulsd	%xmm3, %xmm0
	addsd	%xmm2, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -4(%rbx,%rax,4)
	incq	%rax
	cmpq	$127, %rax
	jne	.L21
	movsd	.LC4(%rip), %xmm1
	movl	$1, %eax
.L22:
	leal	(%rax,%rax), %edx
	movq	48(%rsp), %rbx
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, -4(%rbx,%rax,4)
	incq	%rax
	cmpq	$127, %rax
	jne	.L22
	movl	$0xbf7fea10, 504(%rbx)
	leaq	80(%rsp), %rdi
	movl	$508, %esi
	movl	$127, %ebx
	salq	$55, %rbx
	call	cudaMalloc@PLT
	leaq	88(%rsp), %rdi
	movl	$508, %esi
	call	cudaMalloc@PLT
	leaq	96(%rsp), %rdi
	movl	$508, %esi
	call	cudaMalloc@PLT
	leaq	104(%rsp), %rdi
	movl	$508, %esi
	call	cudaMalloc@PLT
	movq	32(%rsp), %rsi
	movq	80(%rsp), %rdi
	movl	$1, %ecx
	movl	$508, %edx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rsi
	movq	88(%rsp), %rdi
	movl	$1, %ecx
	movl	$508, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rsi
	movq	96(%rsp), %rdi
	movl	$1, %ecx
	movl	$508, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rsi
	movq	104(%rsp), %rdi
	movl	$1, %ecx
	movl	$508, %edx
	call	cudaMemcpy@PLT
	call	clock@PLT
	movl	$4032, %edi
	movq	%rax, 72(%rsp)
	call	malloc@PLT
	movl	$2016, %edi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movss	.LC6(%rip), %xmm2
	movl	$250, %ecx
	movq	.LC7(%rip), %xmm4
	movq	%rax, 16(%rsp)
	movss	%xmm2, (%rax)
	movq	24(%rsp), %rax
	movss	(%rax), %xmm0
	movq	40(%rsp), %rax
	divss	(%rax), %xmm0
	movq	16(%rsp), %rax
	leaq	8(%rax), %rdx
	movss	%xmm0, 4(%rax)
	xorl	%eax, %eax
	movq	%rdx, %rdi
	rep stosl
	movq	8(%rsp), %rax
	movq	$1065353216, (%rax)
	movq	%rbx, 8(%rax)
	movl	$4, %eax
.L23:
	movq	8(%rsp), %rbx
	movl	%eax, %edx
	movq	40(%rsp), %rcx
	sarl	$2, %edx
	movl	$0x00000000, (%rbx,%rax,4)
	movslq	%edx, %rdx
	movss	%xmm2, 4(%rbx,%rax,4)
	movq	32(%rsp), %rbx
	movss	(%rcx,%rdx,4), %xmm1
	movq	8(%rsp), %rcx
	cvtss2sd	(%rbx,%rdx,4), %xmm0
	xorps	%xmm4, %xmm0
	cvtss2sd	%xmm1, %xmm3
	movq	24(%rsp), %rbx
	divsd	%xmm3, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, 8(%rcx,%rax,4)
	movss	(%rbx,%rdx,4), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, 12(%rcx,%rax,4)
	addq	$4, %rax
	cmpq	$504, %rax
	jne	.L23
	leaq	112(%rsp), %rdi
	movl	$4032, %esi
	xorl	%ebx, %ebx
	movl	$1, %ebp
	call	cudaMalloc@PLT
	leaq	120(%rsp), %rdi
	movl	$2016, %esi
	movabsq	$4294967297, %r13
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	movq	112(%rsp), %rdi
	movl	$1, %ecx
	movl	$4032, %edx
	call	cudaMemcpy@PLT
	movq	16(%rsp), %rsi
	movq	120(%rsp), %rdi
	movl	$1, %ecx
	movl	$2016, %edx
	call	cudaMemcpy@PLT
.L25:
	movl	$126, %r12d
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r13, %rdi
	subl	%ebp, %r12d
	movq	%r13, 176(%rsp)
	movl	$1, %esi
	incl	%ebx
	movl	%r12d, 172(%rsp)
	movl	180(%rsp), %ecx
	movq	172(%rsp), %rdx
	movq	%r13, 160(%rsp)
	movl	$1, 168(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L24
	pushq	%r9
	.cfi_def_cfa_offset 264
	movl	%r12d, %ecx
	movl	$1, %edx
	movl	%ebp, %esi
	pushq	112(%rsp)
	.cfi_def_cfa_offset 272
	movl	$252, %edi
	pushq	112(%rsp)
	.cfi_def_cfa_offset 280
	pushq	112(%rsp)
	.cfi_def_cfa_offset 288
	pushq	112(%rsp)
	.cfi_def_cfa_offset 296
	pushq	%rbx
	.cfi_def_cfa_offset 304
	movq	160(%rsp), %r9
	movq	168(%rsp), %r8
	call	_Z65__device_stub__Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_iiiiPfS_iS_S_S_S_
	addq	$48, %rsp
	.cfi_def_cfa_offset 256
.L24:
	addl	%ebp, %ebp
	cmpl	$7, %ebx
	jne	.L25
	movq	112(%rsp), %rsi
	movq	8(%rsp), %rdi
	movl	$2, %ecx
	xorl	%ebp, %ebp
	movl	$4032, %edx
	leaq	.LC9(%rip), %rbx
	call	cudaMemcpy@PLT
	movq	120(%rsp), %rsi
	movq	16(%rsp), %rdi
	movl	$2, %ecx
	movl	$2016, %edx
	call	cudaMemcpy@PLT
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L27:
	testl	$15, %ebp
	jne	.L26
	movq	%rbx, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L26:
	movq	16(%rsp), %rax
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	movss	1008(%rax,%rbp,8), %xmm0
	divss	1012(%rax,%rbp,8), %xmm0
	movb	$1, %al
	movss	%xmm0, (%r15,%rbp,4)
	incq	%rbp
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	cmpq	$126, %rbp
	jne	.L27
	movl	$508, %edi
	call	malloc@PLT
	movl	$508, %edi
	movq	%rax, %r12
	call	malloc@PLT
	movl	$0x3f800000, (%r12)
	movq	%rax, %rbx
	movq	48(%rsp), %rax
	movss	(%rax), %xmm0
	movq	24(%rsp), %rax
	divss	(%rax), %xmm0
	movl	$4, %eax
	movss	%xmm0, (%rbx)
.L28:
	movq	32(%rsp), %rdx
	movss	-4(%r15,%rax), %xmm2
	movq	24(%rsp), %rcx
	movss	(%rdx,%rax), %xmm0
	movq	48(%rsp), %rdx
	movss	(%rcx,%rax), %xmm1
	mulss	%xmm0, %xmm2
	xorps	.LC11(%rip), %xmm0
	subss	%xmm2, %xmm1
	movss	(%rdx,%rax), %xmm2
	divss	%xmm1, %xmm0
	divss	%xmm1, %xmm2
	movss	%xmm0, (%r12,%rax)
	movss	%xmm2, (%rbx,%rax)
	addq	$4, %rax
	cmpq	$508, %rax
	jne	.L28
	leaq	128(%rsp), %rdi
	movl	$1016, %esi
	xorl	%ebp, %ebp
	movl	$1, %r14d
	call	cudaMalloc@PLT
	movl	$1016, %esi
	leaq	136(%rsp), %rdi
	movabsq	$4294967297, %r13
	call	cudaMalloc@PLT
	movq	128(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$1016, %edx
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$1016, %edx
	call	cudaMemcpy@PLT
.L30:
	movl	$127, %eax
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r13, %rdi
	subl	%r14d, %eax
	movq	%r13, 176(%rsp)
	movl	$1, %esi
	incl	%ebp
	movl	%eax, 172(%rsp)
	movl	180(%rsp), %ecx
	movq	172(%rsp), %rdx
	movq	%r13, 160(%rsp)
	movl	$1, 168(%rsp)
	movl	%eax, 68(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L29
	pushq	%rsi
	.cfi_def_cfa_offset 264
	movl	$127, %edi
	movl	$1, %edx
	movl	%r14d, %esi
	pushq	%rbp
	.cfi_def_cfa_offset 272
	movq	144(%rsp), %r9
	movq	152(%rsp), %r8
	movl	84(%rsp), %ecx
	call	_Z50__device_stub__Z23RecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	popq	%rdi
	.cfi_def_cfa_offset 264
	popq	%r8
	.cfi_def_cfa_offset 256
.L29:
	addl	%r14d, %r14d
	cmpl	$7, %ebp
	jne	.L30
	movl	$2, %ecx
	movl	$1016, %edx
	movq	%r12, %rdi
	xorl	%r13d, %r13d
	movq	128(%rsp), %rsi
	leaq	.LC9(%rip), %rbp
	call	cudaMemcpy@PLT
	movq	136(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbx, %rdi
	movl	$1016, %edx
	call	cudaMemcpy@PLT
.L32:
	movl	%r13d, %r14d
	testl	$15, %r13d
	jne	.L31
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L31:
	movss	(%rbx,%r13,4), %xmm0
	movq	56(%rsp), %rax
	movl	%r14d, %edx
	leaq	.LC12(%rip), %rsi
	movl	$2, %edi
	movss	%xmm0, (%rax,%r13,4)
	movb	$1, %al
	cvtss2sd	508(%rbx,%r13,4), %xmm0
	incq	%r13
	call	__printf_chk@PLT
	cmpq	$127, %r13
	jne	.L32
	movl	$508, %edi
	call	malloc@PLT
	movl	$508, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	movl	$126, %ecx
	movl	$0x3f800000, 504(%r12)
	movq	%rax, %rbx
	movq	56(%rsp), %rax
	movq	%rbx, %rdi
	movss	504(%rax), %xmm0
	movq	%rax, %rsi
	xorl	%eax, %eax
	movss	%xmm0, 504(%rbx)
	rep movsl
.L33:
	movss	(%r15,%rax), %xmm0
	xorps	.LC11(%rip), %xmm0
	movss	%xmm0, 0(%rbp,%rax)
	addq	$4, %rax
	cmpq	$504, %rax
	jne	.L33
	leaq	144(%rsp), %rdi
	movl	$1016, %esi
	xorl	%r12d, %r12d
	movl	$1, %r13d
	call	cudaMalloc@PLT
	movl	$1016, %esi
	leaq	152(%rsp), %rdi
	movabsq	$4294967297, %r15
	call	cudaMalloc@PLT
	movq	144(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbp, %rsi
	movl	$1016, %edx
	call	cudaMemcpy@PLT
	movq	152(%rsp), %rdi
	movl	$1, %ecx
	movq	%rbx, %rsi
	movl	$1016, %edx
	call	cudaMemcpy@PLT
.L35:
	movl	$127, %r14d
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r15, %rdi
	subl	%r13d, %r14d
	movq	%r15, 176(%rsp)
	movl	$1, %esi
	movl	180(%rsp), %ecx
	movl	%r14d, 172(%rsp)
	incl	%r12d
	movq	172(%rsp), %rdx
	movq	%r15, 160(%rsp)
	movl	$1, 168(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L34
	pushq	%rax
	.cfi_def_cfa_offset 264
	movl	%r14d, %ecx
	movl	$1, %edx
	movl	%r13d, %esi
	pushq	%r12
	.cfi_def_cfa_offset 272
	movq	160(%rsp), %r9
	movl	$127, %edi
	movq	168(%rsp), %r8
	call	_Z61__device_stub__Z34LoopingbackRecursiveDoublingKerneliiiiPfS_iiiiiPfS_i
	popq	%rdx
	.cfi_def_cfa_offset 264
	popq	%rcx
	.cfi_def_cfa_offset 256
.L34:
	addl	%r13d, %r13d
	cmpl	$7, %r12d
	jne	.L35
	movq	%rbp, %rdi
	movl	$2, %ecx
	movl	$1016, %edx
	xorl	%r12d, %r12d
	movq	144(%rsp), %rsi
	leaq	.LC9(%rip), %rbp
	call	cudaMemcpy@PLT
	movq	152(%rsp), %rsi
	movl	$2, %ecx
	movq	%rbx, %rdi
	movl	$1016, %edx
	call	cudaMemcpy@PLT
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L37:
	testl	$15, %r12d
	jne	.L36
	movq	%rbp, %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L36:
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	508(%rbx,%r12,4), %xmm0
	call	__printf_chk@PLT
	incq	%r12
	cmpq	$127, %r12
	jne	.L37
	call	clock@PLT
	movq	72(%rsp), %rbx
	movl	$127, %edx
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	subq	%rbx, %rax
	cvtsi2sdq	%rax, %xmm0
	movb	$1, %al
	divsd	.LC14(%rip), %xmm0
	call	__printf_chk@PLT
	movq	80(%rsp), %rdi
	call	cudaFree@PLT
	movq	88(%rsp), %rdi
	call	cudaFree@PLT
	movq	96(%rsp), %rdi
	call	cudaFree@PLT
	movq	104(%rsp), %rdi
	call	cudaFree@PLT
	movq	112(%rsp), %rdi
	call	cudaFree@PLT
	movq	120(%rsp), %rdi
	call	cudaFree@PLT
	movq	32(%rsp), %rdi
	call	free@PLT
	movq	24(%rsp), %rdi
	call	free@PLT
	movq	40(%rsp), %rdi
	call	free@PLT
	movq	48(%rsp), %rdi
	call	free@PLT
	movq	8(%rsp), %rdi
	call	free@PLT
	movq	16(%rsp), %rdi
	call	free@PLT
	movq	184(%rsp), %rax
	subq	%fs:40, %rax
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	addq	$200, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	main, .-main
	.section	.rodata.str1.1
.LC16:
	.string	"_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_"
.LC17:
	.string	"_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i"
.LC18:
	.string	"_Z23RecursiveDoublingKerneliiiiPfS_i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2060:
	.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	.LC16(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_(%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
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC17(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i(%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
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC18(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z23RecursiveDoublingKerneliiiiPfS_i(%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
.LFE2060:
	.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
.LC1:
	.long	0
	.long	1056964608
	.align 8
.LC2:
	.long	0
	.long	1072693248
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC3:
	.long	-1073742336
	.section	.rodata.cst8
	.align 8
.LC4:
	.long	0
	.long	1050673152
	.section	.rodata.cst4
	.align 4
.LC6:
	.long	1065353216
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC7:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.align 16
.LC11:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC14:
	.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>
 #define EXPO 7


__global__ void RecursiveDoublingKernel(int variableSize, int step,int blockRow, int blockColumn,float* deviceY,float* deviceM,int evenOrOddFlag)
{
	//we weill do something like y(i+1)=my(i)+b
	int bx=blockIdx.x;
	int by=blockIdx.y;
	int tx=threadIdx.x;
	int ty=threadIdx.y;

	int processIndex=tx;
/*	printf("%d ",tx);

    printf("%f,%f,%f \n",deviceY[0],deviceY[1],deviceY[2]);
    printf("%f,%f,%f \n",deviceM[0],deviceM[1],deviceM[2]);*/
    

	//so M and Y will be divided into two part, the first part store the old value
	//the second half part store the updated value

	int halfSize=variableSize;
	

	//teh start index of the second part will be halfsize;
    //so if evenOrOddFlag is Odd, the new value will be stored in the second half,
    //otherwise it will be stored in the first half. 
    int secondhalfHelper=halfSize+step+processIndex;
    //printf("second half helper is: %d \n",secondhalfHelper);

    //be careful that 1-step the old value still need to be copied to the current value,since the new value will start calculated at step+1

    if(evenOrOddFlag%2==1)
    {
    	//printf("does this ever got run?");
      deviceY[secondhalfHelper]=deviceY[secondhalfHelper-halfSize]+deviceM[secondhalfHelper-halfSize]*deviceY[processIndex];
      deviceM[secondhalfHelper]=deviceM[secondhalfHelper-halfSize]*deviceM[processIndex];
      //copy it once here
      if(tx==0&&ty==0)
      {
      	for(int i=0;i<step;i++)
      	{
          deviceY[i+halfSize]=deviceY[i];
          deviceM[i+halfSize]=deviceM[i];
      	}
      }
    }
    else
    {
       
      deviceY[secondhalfHelper-halfSize]=deviceY[secondhalfHelper]+deviceM[secondhalfHelper]*deviceY[halfSize+processIndex];
      deviceM[secondhalfHelper-halfSize]=deviceM[secondhalfHelper]*deviceM[halfSize+processIndex];

       if(tx==0&&ty==0) //just need to copy once, so the other processors allow to idle at thsi time
      {
      	for(int i=0;i<step;i++)
      	{
          deviceY[i]=deviceY[i+halfSize];
         deviceM[i]=deviceM[i+halfSize];
      	}
      }
    }
    __syncthreads();
}

__global__ void LoopingbackRecursiveDoublingKernel(int variableSize, int step,int blockRow, int blockColumn,float* deviceY,float* deviceM,int evenOrOddFlag)
{
	//we weill do something like y(i+1)=my(i)+b
	int bx=blockIdx.x;
	int by=blockIdx.y;
	int tx=threadIdx.x;
	int ty=threadIdx.y;

	int processIndex=tx;
/*	printf("%d ",tx);

    printf("%f,%f,%f \n",deviceY[0],deviceY[1],deviceY[2]);
    printf("%f,%f,%f \n",deviceM[0],deviceM[1],deviceM[2]);*/
    

	//so M and Y will be divided into two part, the first part store the old value
	//the second half part store the updated value

	int halfSize=variableSize;
	

	//teh start index of the second part will be halfsize;
    //so if evenOrOddFlag is Odd, the new value will be stored in the second half,
    //otherwise it will be stored in the first half. 
    //int secondhalfHelper=halfSize+step+processIndex;
    int secondhalfHelper=halfSize+processIndex;

    //printf("second half helper is: %d \n",secondhalfHelper);

    //be careful that 1-step the old value still need to be copied to the current value,since the new value will start calculated at step+1

    if(evenOrOddFlag%2==1)
    {
      deviceY[secondhalfHelper]=deviceY[processIndex]+deviceY[processIndex+step]*deviceM[processIndex];
      deviceM[secondhalfHelper]=deviceM[processIndex]*deviceM[processIndex+step];

      //now the reverse part need to copy the second part
      //should be from index N-i to index variableSize-1
      if(tx==0&&ty==0)
      {
      	for(int i=variableSize-step;i<variableSize;i++)
      	{
          deviceY[i+halfSize]=deviceY[i];
          deviceM[i+halfSize]=deviceM[i];
      	}
      }
    }
    else
    {
       
      deviceY[processIndex]=deviceY[halfSize+processIndex]+deviceY[halfSize+step+processIndex]*deviceM[halfSize+processIndex]; 
      //deviceY[secondhalfHelper-halfSize]=deviceY[secondhalfHelper]+deviceM[secondhalfHelper]*deviceY[halfSize+processIndex];
      //deviceM[secondhalfHelper-halfSize]=deviceM[secondhalfHelper]*deviceM[halfSize+processIndex];
      deviceM[processIndex]=deviceM[processIndex+halfSize]*deviceM[processIndex+halfSize+step];
      if(tx==0&&ty==0)
      {
      	for(int i=variableSize-step;i<variableSize;i++)
      	{
          deviceY[i]=deviceY[i+halfSize];
          deviceM[i]=deviceM[i+halfSize];
      	}
      }
    }
    __syncthreads();
}


__global__ void MatrixVersionRecursiveDoubling(int variableSize, int step,int blockRow, int blockColumn,float* deviceYForW,float* deviceMForW,int evenOrOddFlag,float* deviceA, float* deviceB, float* deviceC, float* deviceD)
{
  //so right now just use grid (1,1) if time allow will implment other grid size
  	int bx=blockIdx.x;
	int by=blockIdx.y;
	int tx=threadIdx.x;
	int ty=threadIdx.y;

	int processId=tx; //this is only for the this particluar grid and block setup
    
    int halfSizeY=variableSize;
    int halfSizeM=2*variableSize;
/*
    int secondhalfHelper=halfSize+step+2*processIndex; //this need to multiply 2, different from non-matrix version
    int secondhalfHelper1=halfSize+step+4*processIndex;*/

    int indexHelperY=halfSizeY+2*step+2*processId;
    int indexHelperM=halfSizeM+4*step+4*processId;

    if(evenOrOddFlag%2==1)
    {
    	//update M and Y here
    	deviceYForW[indexHelperY]=deviceYForW[indexHelperY-halfSizeY]+deviceMForW[indexHelperM-halfSizeM]*deviceYForW[2*processId]+deviceMForW[indexHelperM-halfSizeM+1]*deviceYForW[2*processId+1];
    	deviceYForW[indexHelperY+1]=deviceYForW[indexHelperY-halfSizeY+1]+deviceMForW[indexHelperM-halfSizeM+2]*deviceYForW[2*processId]+deviceMForW[indexHelperM-halfSizeM+3]*deviceYForW[2*processId+1];

        deviceMForW[indexHelperM]=deviceMForW[4*step+4*processId]*deviceMForW[4*processId]+deviceMForW[4*step+4*processId+1]*deviceMForW[4*processId+2];
        deviceMForW[indexHelperM+1]=deviceMForW[4*step+4*processId]*deviceMForW[4*processId+1]+deviceMForW[4*step+4*processId+1]*deviceMForW[4*processId+3];
        deviceMForW[indexHelperM+2]=deviceMForW[4*step+4*processId+2]*deviceMForW[4*processId]+deviceMForW[4*step+4*processId+3]*deviceMForW[4*processId+2];
        deviceMForW[indexHelperM+3]=deviceMForW[4*step+4*processId+2]*deviceMForW[4*processId+1]+deviceMForW[4*step+4*processId+3]*deviceMForW[4*processId+3];

        //now need to copy 1-- step old value to new value just need to copy once for each step
        for(int i=0;i<step;i++)
        {
        	deviceYForW[halfSizeY+2*i]=deviceYForW[2*i];
        	deviceYForW[halfSizeY+2*i+1]=deviceYForW[2*i+1];

        	deviceMForW[halfSizeM+4*i]=deviceMForW[4*i];
        	deviceMForW[halfSizeM+4*i+1]=deviceMForW[4*i+1];
        	deviceMForW[halfSizeM+4*i+2]=deviceMForW[4*i+2];
        	deviceMForW[halfSizeM+4*i+3]=deviceMForW[4*i+3];
        }
    }
    else
    {
        deviceYForW[indexHelperY-halfSizeY]=deviceYForW[indexHelperY]+deviceMForW[indexHelperM]*deviceYForW[2*processId+halfSizeY]+deviceMForW[indexHelperM+1]*deviceYForW[2*processId+1+halfSizeY];
    	deviceYForW[indexHelperY-halfSizeY+1]=deviceYForW[indexHelperY+1]+deviceMForW[indexHelperM+2]*deviceYForW[2*processId+halfSizeY]+deviceMForW[indexHelperM+3]*deviceYForW[2*processId+1+halfSizeY];

        deviceMForW[indexHelperM-halfSizeM]=deviceMForW[4*step+4*processId+halfSizeM]*deviceMForW[4*processId+halfSizeM]+deviceMForW[4*step+4*processId+1+halfSizeM]*deviceMForW[4*processId+2+halfSizeM];
        deviceMForW[indexHelperM+1-halfSizeM]=deviceMForW[4*step+4*processId+halfSizeM]*deviceMForW[4*processId+1+halfSizeM]+deviceMForW[4*step+4*processId+1+halfSizeM]*deviceMForW[4*processId+3+halfSizeM];
        deviceMForW[indexHelperM+2-halfSizeM]=deviceMForW[4*step+4*processId+2+halfSizeM]*deviceMForW[4*processId+halfSizeM]+deviceMForW[4*step+4*processId+3+halfSizeM]*deviceMForW[4*processId+2+halfSizeM];
        deviceMForW[indexHelperM+3-halfSizeM]=deviceMForW[4*step+4*processId+2+halfSizeM]*deviceMForW[4*processId+1+halfSizeM]+deviceMForW[4*step+4*processId+3+halfSizeM]*deviceMForW[4*processId+3+halfSizeM];

        //now need to copy 1-- step old value to new value just need to copy once for each step
        for(int i=0;i<step;i++)
        {
        	deviceYForW[2*i]=deviceYForW[2*i+halfSizeY];
        	deviceYForW[2*i+1]=deviceYForW[2*i+1+halfSizeY];

        	deviceMForW[4*i]=deviceMForW[4*i+halfSizeM];
        	deviceMForW[4*i+1]=deviceMForW[4*i+1+halfSizeM];
        	deviceMForW[4*i+2]=deviceMForW[4*i+2+halfSizeM];
        	deviceMForW[4*i+3]=deviceMForW[4*i+3+halfSizeM];
        }

    }
    __syncthreads();


}

int main()
{
/* float* M;
 float* Y;
 int variableSize=10;
 int variableSpace=2*variableSize*sizeof(float);*/
   //make it double size since it run in parallel so you want to keep all the previous version
/* M=(float*)malloc(variableSpace);
 Y=(float*)malloc(variableSpace); */

/* M[0]=1;
 Y[0]=1;*/

 int m=pow(2,EXPO)-1; 
 int b=1;
 int a=0;
 float delta=(b-a)*1.0/(m+1.0);

//store teh metrix that is to be LU decomposited
 float *A;
 float *B;
 float *C;
 float *D;
 float *W;
 float *G;

	int chunkLength=m;
	int chunkSize=chunkLength*sizeof(float);
	A=(float*)malloc(chunkSize);
	B=(float*)malloc(chunkSize);
	C=(float*)malloc(chunkSize);
	D=(float*)malloc(chunkSize);
	W=(float*)malloc((m-1)*sizeof(float));
	G=(float*)malloc((m*sizeof(float)));

	 A[0]=0;
        //int vectorLength=EXPO*m;
     
        for(int i=1;i<m;i++)
        {
            A[i]=1-delta*delta*0.5*(i+1);
        }
        //else will be 0
      /*  for(int i=m;i<chunkLength;i++)
        {
          A[i]=0;
        }*/

        for(int i=0;i<m;i++)
        {
            B[i]=-2+delta*delta*1.0;
        }
      /*    for(int i=m;i<chunkLength;i++)
        {
          B[i]=0;
        }*/

        C[m-1]=0;
        for(int i=0;i<m-1;i++)
        {
            C[i]=1+0.5*delta*delta*(i+1);
        }
     /*   for(int i=m;i<chunkLength;i++)
        {
          C[i]=0;
        }*/


        
        for(int i=0;i<m-1;i++)
        {
            D[i]=2*(i+1)*pow(delta,3);
        }
        D[m-1]=2*m*delta*delta*delta-1+3.5*delta*delta;
      /*  for(int i=m;i<chunkLength;i++)
        {
          D[i]=0;
        }*/

       float *deviceA, *deviceB, *deviceC, *deviceD;
        hipMalloc((void**)&deviceA,chunkSize);
        hipMalloc((void**)&deviceB,chunkSize);
        hipMalloc((void**)&deviceC,chunkSize);
        hipMalloc((void**)&deviceD,chunkSize);     
       //copy the host vector to device.
        hipMemcpy(deviceA,A,chunkSize,hipMemcpyHostToDevice);
        hipMemcpy(deviceB,B,chunkSize,hipMemcpyHostToDevice);
        hipMemcpy(deviceC,C,chunkSize,hipMemcpyHostToDevice);
        hipMemcpy(deviceD,D,chunkSize,hipMemcpyHostToDevice);

        clock_t begin,end;
        begin=clock();

     //start the code to calculate the w with recursive doubling applied to matrix
      //so we need 2*2*(N-1) for both YforW and 2*4*(N-1) for MforW , the size N should be equal to m here
     float *MforW, *YforW;
     

     int MforWLength=4*(m-1);
     int YforWLength=2*(m-1);
     int MforWSize=2*MforWLength*sizeof(float);
     int YforWSize=2*YforWLength*sizeof(float);
     MforW=(float*)malloc(MforWSize);
     YforW=(float*)malloc(YforWSize);

     //the first step of recursive doubling, initialize Y and M;
     YforW[0]=1;
     YforW[1]=B[0]/(C[0]*1.0);
     //the other should be 0 since V(I)=A[I]V[I-1]+0
     for(int i=2;i<YforWLength;i++)
     {
     	YforW[i]=0;
     }
     //the first one for M should be[1,0,0,1]
     MforW[0]=1;
     MforW[1]=0;
     MforW[2]=0;
     MforW[3]=1;
     for(int i=4;i<MforWLength;i=i+4)
     {
     	MforW[i]=0;
     	MforW[i+1]=1;
     	MforW[i+2]=-1.0*A[i/4]/C[i/4];
     	MforW[i+3]=1.0*B[i/4]/C[i/4];
     }

     float *deviceMforW, *deviceYforW;
     hipMalloc((void**)&deviceMforW,MforWSize);
     hipMalloc((void**)&deviceYforW,YforWSize);

     hipMemcpy(deviceMforW,MforW,MforWSize,hipMemcpyHostToDevice);
     hipMemcpy(deviceYforW,YforW,YforWSize,hipMemcpyHostToDevice);

   
   int step=1;
   int evenOrOddFlag=0;

  do {
  	 //each time needs N-Step processors
  	
  	  evenOrOddFlag=evenOrOddFlag+1;
  	  dim3 dimGrid(1,1);
  	  int blockRow=1;
  	  int blockColumn=(m-1)-step;
  	  dim3 dimBlock(blockColumn,blockRow);
  	  //variableSIZE should be half size y
  	  MatrixVersionRecursiveDoubling<<<dimGrid,dimBlock>>>(YforWLength,step,blockRow,blockColumn,deviceYforW,deviceMforW,evenOrOddFlag,deviceA,deviceB,deviceC,deviceD);
        step=step+step;
    
   }while( step <= YforWLength/2);

   //so if evenOrOddFlag is odd, it means that the latest value will be second half,
   //otherwise it will be in the first half
   hipMemcpy(MforW,deviceMforW,MforWSize,hipMemcpyDeviceToHost);
   hipMemcpy(YforW,deviceYforW,YforWSize,hipMemcpyDeviceToHost);

      printf("The following are w value from recursvie doubling: \n");
   if(evenOrOddFlag%2==0)
   {
   	//length of w is m-1 and length of y is s(m-1)
     for(int i=0;i<m-1;i++)
     {
     	if(i%16==0)
     	{
     		printf("\n");
     	}
     	W[i]=YforW[2*i]*1.0/YforW[2*i+1];
     	printf("%f ",W[i]);
     }
   }
   else
   {
   	   for(int i=0;i<m-1;i++)
     {
     	if(i%16==0)
     	{
     		printf("\n");
     	}
     	W[i]=YforW[2*i+YforWLength]*1.0/YforW[2*i+1+YforWLength];
     	printf("%f ",W[i]);
     }
   }  

   //now we get the w value, next step is to get the g value
   //g will have n-1 in values.
   //according to the formula 5.3.3.7
   float* MforG,*YforG;
   MforG=(float*)malloc(m*sizeof(float));
   YforG=(float*)malloc(m*sizeof(float));
   int forGSize=2*m*sizeof(float);
   YforG[0]=D[0]*1.0/B[0];
   MforG[0]=1.0;
/*  printf("\n test start here");*/
	 for(int i=1;i<m;i++)
	 {
	 	YforG[i]=D[i]/(B[i]-A[i]*W[i-1]);
	 	MforG[i]=-1*A[i]/(B[i]-A[i]*W[i-1]);
	 }

	 

	 float *deviceMforG, *deviceYforG;
	 hipMalloc((void**)&deviceMforG,forGSize);
	 hipMalloc((void**)&deviceYforG,forGSize);


 hipMemcpy(deviceMforG,MforG,forGSize,hipMemcpyHostToDevice);
 hipMemcpy(deviceYforG,YforG,forGSize,hipMemcpyHostToDevice);

  int stepG=1;
  int evenOrOddFlagG=0;

  do {
  	 //each time needs N-Step processors
  	
  	  evenOrOddFlagG=evenOrOddFlagG+1;
  	  dim3 dimGrid1(1,1);
  	  int blockRow1=1;
  	  int blockColumn1=m-stepG;
  	  dim3 dimBlock1(blockColumn1,blockRow1);
  	  RecursiveDoublingKernel<<<dimGrid1,dimBlock1>>>(m,stepG,blockRow1,blockColumn1,deviceYforG,deviceMforG,evenOrOddFlagG);
      stepG=stepG+stepG;
   }while( stepG <= m);

   //so if evenOrOddFlag is odd, it means that the latest value will be second half,
   //otherwise it will be in the first half
   hipMemcpy(MforG,deviceMforG,forGSize,hipMemcpyDeviceToHost);
   hipMemcpy(YforG,deviceYforG,forGSize,hipMemcpyDeviceToHost);

   if(evenOrOddFlagG%2==0)
   {
   	
     for(int i=0;i<m;i++)
     {
		     	if(i%16==0)
		   	{
		   		printf("\n");
		   	}
		 G[i]=YforG[i];
     	printf("[%d] %f ",i,YforG[i]);
     }
   }
   else
   {

   	  for(int i=0;i<m;i++)
     {
	     	if(i%16==0)
	   	{
	   		printf("\n");
	   	}
	   	 G[i]=YforG[i];
     	printf("[%d] %f ",i,YforG[i+m]);
     }
   }


   //now we get G, it is time for us to reverse it back to get our final x
  float* MforX,*YforX;
   MforX=(float*)malloc(m*sizeof(float));
   YforX=(float*)malloc(m*sizeof(float));
   int forXSize=2*m*sizeof(float);
   YforX[m-1]=G[m-1];
   MforG[m-1]=1.0;
/*  printf("\n test start here");*/
	 for(int i=0;i<m-1;i++)
	 {
	 	YforX[i]=G[i];
	 	MforX[i]=-1*W[i];
	 }

	 

	 float *deviceMforX, *deviceYforX;
	 hipMalloc((void**)&deviceMforX,forXSize);
	 hipMalloc((void**)&deviceYforX,forXSize);


 hipMemcpy(deviceMforX,MforX,forXSize,hipMemcpyHostToDevice);
 hipMemcpy(deviceYforX,YforX,forXSize,hipMemcpyHostToDevice);

  int stepX=1;
  int evenOrOddFlagX=0;

  do {
  	 //each time needs N-Step processors
  	
  	  evenOrOddFlagX=evenOrOddFlagX+1;
  	  dim3 dimGrid2(1,1);
  	  int blockRow2=1;
  	  int blockColumn2=m-stepX;
  	  dim3 dimBlock2(blockColumn2,blockRow2);
  	  LoopingbackRecursiveDoublingKernel<<<dimGrid2,dimBlock2>>>(m,stepX,blockRow2,blockColumn2,deviceYforX,deviceMforX,evenOrOddFlagX);
      stepX=stepX+stepX;
   }while( stepX<= m);

   //so if evenOrOddFlag is odd, it means that the latest value will be second half,
   //otherwise it will be in the first half
   hipMemcpy(MforX,deviceMforX,forXSize,hipMemcpyDeviceToHost);
   hipMemcpy(YforX,deviceYforX,forXSize,hipMemcpyDeviceToHost);

   printf("The following is the result for x finally! \n");
   if(evenOrOddFlagX%2==0)
   {
   	
     for(int i=0;i<m;i++)
     {
		     	if(i%16==0)
		   	{
		   		printf("\n");
		   	}
     	printf(" %f ",YforX[i]);
     }
   }
   else
   {

   	  for(int i=0;i<m;i++)
     {
	     	if(i%16==0)
	   	{
	   		printf("\n");
	   	}
     	printf("%f ",YforX[i+m]);
     }
   }



     //printf("y for G is %f \n",YforG[444]);
      double time_spent;
      end=clock();
      time_spent=(double)(end-begin)/CLOCKS_PER_SEC;
      printf("\n time used to calculate pde with %d varaible recursive doubling is :%f seconds \n",m,time_spent);

      hipFree(deviceA);
      hipFree(deviceB);
      hipFree(deviceC);
      hipFree(deviceD);
      hipFree(deviceMforW);
      hipFree(deviceYforW);
       
        free(A);
        free(B);
        free(C);
        free(D);
        free(MforW);
        free(YforW);

  return 0;
}


	.text
	.file	"total.hip"
	.globl	_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i # -- Begin function _Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i
	.type	_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i,@function
_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i: # @_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%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	192(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z23RecursiveDoublingKerneliiiiPfS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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	_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i, .Lfunc_end0-_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i # -- Begin function _Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.type	_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i,@function
_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i: # @_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%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	192(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	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	_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i, .Lfunc_end1-_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_ # -- Begin function _Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.type	_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_,@function
_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_: # @_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_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	$176, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	12(%rsp), %rax
	movl	%edi, (%rax)
	leaq	8(%rsp), %rdi
	movl	%esi, (%rdi)
	leaq	4(%rsp), %rsi
	movl	%edx, (%rsi)
	movq	%rsp, %rdx
	movl	%ecx, (%rdx)
	leaq	40(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	32(%rsp), %r8
	movq	%r9, (%r8)
	leaq	80(%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	224(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	232(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	248(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	256(%rsp), %rax
	movq	%rax, 80(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%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	$_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$192, %rsp
	.cfi_adjust_cfa_offset -192
	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	_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, .Lfunc_end2-_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI3_0:
	.quad	0xbf00000000000000              # double -3.0517578125E-5
.LCPI3_1:
	.quad	0x3ff0000000000000              # double 1
.LCPI3_2:
	.quad	0x3f00000000000000              # double 3.0517578125E-5
.LCPI3_3:
	.quad	0x3ea0000000000000              # double 4.76837158203125E-7
.LCPI3_7:
	.quad	0x412e848000000000              # double 1.0E+6
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI3_4:
	.long	0x3f800000                      # float 1
	.long	0x00000000                      # float 0
	.long	0x00000000                      # float 0
	.long	0x3f800000                      # float 1
.LCPI3_5:
	.quad	0x8000000000000000              # double -0
	.quad	0x8000000000000000              # double -0
.LCPI3_6:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$168, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %r15
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %rbx
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %rbp
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %r14
	movl	$504, %edi                      # imm = 0x1F8
	callq	malloc
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, 144(%rsp)                 # 8-byte Spill
	movl	$0, (%r15)
	movl	$1, %eax
	movsd	.LCPI3_0(%rip), %xmm1           # xmm1 = mem[0],zero
	movsd	.LCPI3_1(%rip), %xmm0           # xmm0 = mem[0],zero
.LBB3_1:                                # =>This Inner Loop Header: Depth=1
	leaq	1(%rax), %rcx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%ecx, %xmm2
	mulsd	%xmm1, %xmm2
	addsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm2, (%r15,%rax,4)
	movq	%rcx, %rax
	cmpq	$127, %rcx
	jne	.LBB3_1
# %bb.2:                                # %.preheader374.preheader
	xorl	%eax, %eax
.LBB3_3:                                # %.preheader374
                                        # =>This Inner Loop Header: Depth=1
	movl	$-1073742336, (%rbx,%rax,4)     # imm = 0xBFFFFE00
	incq	%rax
	cmpq	$127, %rax
	jne	.LBB3_3
# %bb.4:
	movl	$0, 504(%rbp)
	xorl	%eax, %eax
	movsd	.LCPI3_2(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB3_5:                                # =>This Inner Loop Header: Depth=1
	leaq	1(%rax), %rcx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%ecx, %xmm2
	mulsd	%xmm1, %xmm2
	addsd	%xmm0, %xmm2
	cvtsd2ss	%xmm2, %xmm2
	movss	%xmm2, (%rbp,%rax,4)
	movq	%rcx, %rax
	cmpq	$126, %rcx
	jne	.LBB3_5
# %bb.6:                                # %.preheader373.preheader
	movq	%rbx, 24(%rsp)                  # 8-byte Spill
	xorl	%eax, %eax
	movsd	.LCPI3_3(%rip), %xmm0           # xmm0 = mem[0],zero
.LBB3_7:                                # %.preheader373
                                        # =>This Inner Loop Header: Depth=1
	leaq	2(%rax), %rcx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%ecx, %xmm1
	mulsd	%xmm0, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movss	%xmm1, (%r14,%rax,2)
	movq	%rcx, %rax
	cmpq	$252, %rcx
	jne	.LBB3_7
# %bb.8:
	movl	$-1082136048, 504(%r14)         # imm = 0xBF7FEA10
	leaq	136(%rsp), %r13
	movl	$508, %esi                      # imm = 0x1FC
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	128(%rsp), %r12
	movl	$508, %esi                      # imm = 0x1FC
	movq	%r12, %rdi
	callq	hipMalloc
	leaq	120(%rsp), %rbx
	movl	$508, %esi                      # imm = 0x1FC
	movq	%rbx, %rdi
	callq	hipMalloc
	leaq	56(%rsp), %rdi
	movl	$508, %esi                      # imm = 0x1FC
	callq	hipMalloc
	movq	(%r13), %rdi
	movl	$508, %edx                      # imm = 0x1FC
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r12), %rdi
	movl	$508, %edx                      # imm = 0x1FC
	movq	24(%rsp), %r12                  # 8-byte Reload
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbx), %rdi
	movl	$508, %edx                      # imm = 0x1FC
	movq	%rbp, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	56(%rsp), %rax
	movq	(%rax), %rdi
	movl	$508, %edx                      # imm = 0x1FC
	movq	%r14, 80(%rsp)                  # 8-byte Spill
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	callq	clock
	movq	%rax, 152(%rsp)                 # 8-byte Spill
	movl	$4032, %edi                     # imm = 0xFC0
	callq	malloc
	movq	%rax, %rbx
	movl	$2016, %edi                     # imm = 0x7E0
	callq	malloc
	movl	$1065353216, (%rax)             # imm = 0x3F800000
	movss	(%r12), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	divss	(%rbp), %xmm0
	movss	%xmm0, 4(%rax)
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	leaq	8(%rax), %rdi
	movl	$1000, %edx                     # imm = 0x3E8
	xorl	%esi, %esi
	callq	memset@PLT
	movaps	.LCPI3_4(%rip), %xmm0           # xmm0 = [1.0E+0,0.0E+0,0.0E+0,1.0E+0]
	movups	%xmm0, (%rbx)
	movl	$4, %ecx
	movabsq	$4575657221408423936, %rax      # imm = 0x3F80000000000000
	movaps	.LCPI3_5(%rip), %xmm0           # xmm0 = [-0.0E+0,-0.0E+0]
.LBB3_9:                                # =>This Inner Loop Header: Depth=1
	xorps	%xmm1, %xmm1
	cvtss2sd	(%r15,%rcx), %xmm1
	xorps	%xmm0, %xmm1
	movss	(%rbp,%rcx), %xmm2              # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm3, %xmm3
	cvtss2sd	%xmm2, %xmm3
	divsd	%xmm3, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movq	%rax, (%rbx,%rcx,4)
	movss	%xmm1, 8(%rbx,%rcx,4)
	movss	(%r12,%rcx), %xmm1              # xmm1 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm1
	movss	%xmm1, 12(%rbx,%rcx,4)
	leaq	4(%rcx), %rdx
	cmpq	$500, %rcx                      # imm = 0x1F4
	movq	%rdx, %rcx
	jb	.LBB3_9
# %bb.10:
	movq	%rbx, %r12
	leaq	48(%rsp), %rbx
	movl	$4032, %esi                     # imm = 0xFC0
	movq	%rbx, %rdi
	callq	hipMalloc
	leaq	40(%rsp), %r14
	movl	$2016, %esi                     # imm = 0x7E0
	movq	%r14, %rdi
	callq	hipMalloc
	movq	(%rbx), %rdi
	movl	$1, %r13d
	movl	$4032, %edx                     # imm = 0xFC0
	movq	%r12, 72(%rsp)                  # 8-byte Spill
	movq	%r12, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r14), %rdi
	movl	$2016, %edx                     # imm = 0x7E0
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movabsq	$4294967296, %rax               # imm = 0x100000000
	leaq	1(%rax), %r12
	movl	$1, %ebx
.LBB3_11:                               # =>This Inner Loop Header: Depth=1
	movl	$126, %r14d
	subl	%ebx, %r14d
	movq	%r14, %rdx
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_13
# %bb.12:                               #   in Loop: Header=BB3_11 Depth=1
	movq	40(%rsp), %r8
	movq	48(%rsp), %r9
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$252, %edi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%r14d, %ecx
	pushq	64(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	136(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	152(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	168(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	callq	_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	addq	$48, %rsp
	.cfi_adjust_cfa_offset -48
.LBB3_13:                               #   in Loop: Header=BB3_11 Depth=1
	addl	%ebx, %ebx
	incl	%r13d
	cmpl	$8, %r13d
	jne	.LBB3_11
# %bb.14:                               # %.preheader369.preheader
	movq	48(%rsp), %rsi
	movl	$4032, %edx                     # imm = 0xFC0
	movq	72(%rsp), %rdi                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movq	40(%rsp), %rsi
	movl	$2016, %edx                     # imm = 0x7E0
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$.Lstr, %edi
	callq	puts@PLT
	xorl	%ebx, %ebx
	movq	24(%rsp), %r14                  # 8-byte Reload
	movq	80(%rsp), %r13                  # 8-byte Reload
.LBB3_15:                               # %.preheader369
                                        # =>This Inner Loop Header: Depth=1
	testb	$15, %bl
	jne	.LBB3_17
# %bb.16:                               #   in Loop: Header=BB3_15 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
.LBB3_17:                               #   in Loop: Header=BB3_15 Depth=1
	movq	8(%rsp), %rax                   # 8-byte Reload
	movss	1008(%rax,%rbx,8), %xmm0        # xmm0 = mem[0],zero,zero,zero
	divss	1012(%rax,%rbx,8), %xmm0
	movq	32(%rsp), %rax                  # 8-byte Reload
	movss	%xmm0, (%rax,%rbx,4)
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	incq	%rbx
	cmpq	$126, %rbx
	jne	.LBB3_15
# %bb.18:                               # %.loopexit370
	movq	%rbp, 160(%rsp)                 # 8-byte Spill
	movss	(%r13), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	divss	(%r14), %xmm0
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %rbp
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %rbx
	movss	16(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rax)
	movl	$1065353216, (%rbp)             # imm = 0x3F800000
	xorl	%eax, %eax
	movq	32(%rsp), %rcx                  # 8-byte Reload
.LBB3_19:                               # =>This Inner Loop Header: Depth=1
	movss	4(%r13,%rax), %xmm0             # xmm0 = mem[0],zero,zero,zero
	movss	4(%r14,%rax), %xmm1             # xmm1 = mem[0],zero,zero,zero
	movss	4(%r15,%rax), %xmm2             # xmm2 = mem[0],zero,zero,zero
	movss	(%rcx,%rax), %xmm3              # xmm3 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm3
	subss	%xmm3, %xmm1
	divss	%xmm1, %xmm0
	movss	%xmm0, 4(%rbx,%rax)
	xorps	.LCPI3_6(%rip), %xmm2
	divss	%xmm1, %xmm2
	movss	%xmm2, 4(%rbp,%rax)
	addq	$4, %rax
	cmpq	$504, %rax                      # imm = 0x1F8
	jne	.LBB3_19
# %bb.20:
	movq	%r15, 16(%rsp)                  # 8-byte Spill
	leaq	112(%rsp), %r14
	movl	$1016, %esi                     # imm = 0x3F8
	movq	%r14, %rdi
	callq	hipMalloc
	leaq	104(%rsp), %r13
	movl	$1016, %esi                     # imm = 0x3F8
	movq	%r13, %rdi
	callq	hipMalloc
	movq	(%r14), %rdi
	movl	$1, %r15d
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%rbp, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$1, %r14d
.LBB3_21:                               # =>This Inner Loop Header: Depth=1
	movl	$127, %r13d
	subl	%r14d, %r13d
	movq	%r13, %rdx
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_23
# %bb.22:                               #   in Loop: Header=BB3_21 Depth=1
	movq	104(%rsp), %r8
	movq	112(%rsp), %r9
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$127, %edi
	movl	%r14d, %esi
	movl	$1, %edx
	movl	%r13d, %ecx
	pushq	%r15
	.cfi_adjust_cfa_offset 8
	callq	_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
.LBB3_23:                               #   in Loop: Header=BB3_21 Depth=1
	addl	%r14d, %r14d
	incl	%r15d
	cmpl	$8, %r15d
	jne	.LBB3_21
# %bb.24:                               # %.preheader365.preheader
	movq	112(%rsp), %rsi
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%rbp, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	104(%rsp), %rsi
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	xorl	%r14d, %r14d
	movq	144(%rsp), %r15                 # 8-byte Reload
.LBB3_25:                               # %.preheader365
                                        # =>This Inner Loop Header: Depth=1
	testb	$15, %r14b
	jne	.LBB3_27
# %bb.26:                               #   in Loop: Header=BB3_25 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
.LBB3_27:                               #   in Loop: Header=BB3_25 Depth=1
	movss	(%rbx,%r14,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r15,%r14,4)
	xorps	%xmm0, %xmm0
	cvtss2sd	508(%rbx,%r14,4), %xmm0
	movl	$.L.str.3, %edi
	movl	%r14d, %esi
	movb	$1, %al
	callq	printf
	incq	%r14
	cmpq	$127, %r14
	jne	.LBB3_25
# %bb.28:                               # %.loopexit366
	movss	504(%r15), %xmm0                # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 68(%rsp)                 # 4-byte Spill
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %r14
	movl	$508, %edi                      # imm = 0x1FC
	callq	malloc
	movq	%rax, %rbx
	movss	68(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 504(%rax)
	movl	$1065353216, 504(%rbp)          # imm = 0x3F800000
	movl	$504, %edx                      # imm = 0x1F8
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	memcpy@PLT
	xorl	%eax, %eax
	movq	32(%rsp), %rcx                  # 8-byte Reload
	movaps	.LCPI3_6(%rip), %xmm1           # xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
.LBB3_29:                               # =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rax,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm0
	movss	%xmm0, (%r14,%rax,4)
	incq	%rax
	cmpq	$126, %rax
	jne	.LBB3_29
# %bb.30:
	leaq	96(%rsp), %r15
	movl	$1016, %esi                     # imm = 0x3F8
	movq	%r15, %rdi
	callq	hipMalloc
	leaq	88(%rsp), %rbp
	movl	$1016, %esi                     # imm = 0x3F8
	movq	%rbp, %rdi
	callq	hipMalloc
	movq	(%r15), %rdi
	movl	$1, %r13d
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbp), %rdi
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%rbx, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$1, %ebp
.LBB3_31:                               # =>This Inner Loop Header: Depth=1
	movl	$127, %r15d
	subl	%ebp, %r15d
	movq	%r15, %rdx
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %rdx
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_33
# %bb.32:                               #   in Loop: Header=BB3_31 Depth=1
	movq	88(%rsp), %r8
	movq	96(%rsp), %r9
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$127, %edi
	movl	%ebp, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	callq	_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
.LBB3_33:                               #   in Loop: Header=BB3_31 Depth=1
	addl	%ebp, %ebp
	incl	%r13d
	cmpl	$8, %r13d
	jne	.LBB3_31
# %bb.34:                               # %.preheader
	movq	96(%rsp), %rsi
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	88(%rsp), %rsi
	movl	$1016, %edx                     # imm = 0x3F8
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	xorl	%r14d, %r14d
	movq	16(%rsp), %r15                  # 8-byte Reload
	movq	24(%rsp), %r12                  # 8-byte Reload
	movq	160(%rsp), %r13                 # 8-byte Reload
.LBB3_35:                               # =>This Inner Loop Header: Depth=1
	testb	$15, %r14b
	jne	.LBB3_37
# %bb.36:                               #   in Loop: Header=BB3_35 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
.LBB3_37:                               #   in Loop: Header=BB3_35 Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	508(%rbx,%r14,4), %xmm0
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	incq	%r14
	cmpq	$127, %r14
	jne	.LBB3_35
# %bb.38:                               # %.loopexit
	callq	clock
	subq	152(%rsp), %rax                 # 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	divsd	.LCPI3_7(%rip), %xmm0
	movl	$.L.str.6, %edi
	movl	$127, %esi
	movb	$1, %al
	callq	printf
	movq	136(%rsp), %rdi
	callq	hipFree
	movq	128(%rsp), %rdi
	callq	hipFree
	movq	120(%rsp), %rdi
	callq	hipFree
	movq	56(%rsp), %rdi
	callq	hipFree
	movq	48(%rsp), %rdi
	callq	hipFree
	movq	40(%rsp), %rdi
	callq	hipFree
	movq	%r15, %rdi
	callq	free
	movq	%r12, %rdi
	callq	free
	movq	%r13, %rdi
	callq	free
	movq	80(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	72(%rsp), %rdi                  # 8-byte Reload
	callq	free
	movq	8(%rsp), %rdi                   # 8-byte Reload
	callq	free
	xorl	%eax, %eax
	addq	$168, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	main, .Lfunc_end3-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	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	.LBB4_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB4_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z23RecursiveDoublingKerneliiiiPfS_i, %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	$_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i, %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	$_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %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_end4:
	.size	__hip_module_ctor, .Lfunc_end4-__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	.LBB5_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
.LBB5_2:
	retq
.Lfunc_end5:
	.size	__hip_module_dtor, .Lfunc_end5-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z23RecursiveDoublingKerneliiiiPfS_i,@object # @_Z23RecursiveDoublingKerneliiiiPfS_i
	.section	.rodata,"a",@progbits
	.globl	_Z23RecursiveDoublingKerneliiiiPfS_i
	.p2align	3, 0x0
_Z23RecursiveDoublingKerneliiiiPfS_i:
	.quad	_Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i
	.size	_Z23RecursiveDoublingKerneliiiiPfS_i, 8

	.type	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i,@object # @_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.globl	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.p2align	3, 0x0
_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i:
	.quad	_Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.size	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i, 8

	.type	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_,@object # @_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.globl	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.p2align	3, 0x0
_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_:
	.quad	_Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.size	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, 8

	.type	.L.str.2,@object                # @.str.2
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.2:
	.asciz	"%f "
	.size	.L.str.2, 4

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"[%d] %f "
	.size	.L.str.3, 9

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"\n time used to calculate pde with %d varaible recursive doubling is :%f seconds \n"
	.size	.L.str.6, 82

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z23RecursiveDoublingKerneliiiiPfS_i"
	.size	.L__unnamed_1, 37

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i"
	.size	.L__unnamed_2, 48

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_"
	.size	.L__unnamed_3, 52

	.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	"The following are w value from recursvie doubling: "
	.size	.Lstr, 52

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"The following is the result for x finally! "
	.size	.Lstr.1, 44

	.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 _Z38__device_stub__RecursiveDoublingKerneliiiiPfS_i
	.addrsig_sym _Z49__device_stub__LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.addrsig_sym _Z45__device_stub__MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z23RecursiveDoublingKerneliiiiPfS_i
	.addrsig_sym _Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.addrsig_sym _Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z23RecursiveDoublingKerneliiiiPfS_i ; -- Begin function _Z23RecursiveDoublingKerneliiiiPfS_i
	.globl	_Z23RecursiveDoublingKerneliiiiPfS_i
	.p2align	8
	.type	_Z23RecursiveDoublingKerneliiiiPfS_i,@function
_Z23RecursiveDoublingKerneliiiiPfS_i:   ; @_Z23RecursiveDoublingKerneliiiiPfS_i
; %bb.0:
	s_clause 0x1
	s_load_b64 s[4:5], s[0:1], 0x0
	s_load_b32 s6, s[0:1], 0x20
	v_lshrrev_b32_e32 v1, 10, v0
	v_and_b32_e32 v6, 0x3ff, v0
	s_load_b128 s[0:3], s[0:1], 0x10
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v0, v0, v1
	v_and_b32_e32 v1, 0x3ff, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_eq_u32_e32 vcc_lo, 0, v1
	s_waitcnt lgkmcnt(0)
	v_add_nc_u32_e32 v4, s4, v6
	s_and_b32 s6, s6, 0x80000001
	s_cmp_gt_i32 s5, 0
	s_cselect_b32 s7, -1, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v0, s5, v4
	s_and_b32 s12, vcc_lo, s7
	s_cmp_lg_u32 s6, 1
	s_mov_b32 s6, -1
	v_subrev_nc_u32_e32 v2, s4, v0
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_ashrrev_i32_e32 v3, 31, v2
	s_cbranch_scc0 .LBB0_5
; %bb.1:
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[7:8], 2, v[0:1]
	v_ashrrev_i32_e32 v5, 31, v4
	v_lshlrev_b64 v[4:5], 2, v[4:5]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v9, vcc_lo, s0, v7
	v_add_co_ci_u32_e32 v10, vcc_lo, s1, v8, vcc_lo
	v_add_co_u32 v7, vcc_lo, s2, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s3, v8, vcc_lo
	v_add_co_u32 v11, vcc_lo, s0, v4
	v_add_co_ci_u32_e32 v12, vcc_lo, s1, v5, vcc_lo
	global_load_b32 v13, v[9:10], off
	global_load_b32 v14, v[7:8], off
	global_load_b32 v15, v[11:12], off
	v_lshlrev_b64 v[9:10], 2, v[2:3]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v11, vcc_lo, s0, v9
	v_add_co_ci_u32_e32 v12, vcc_lo, s1, v10, vcc_lo
	v_add_co_u32 v4, vcc_lo, s2, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v5, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v13, v14, v15
	global_store_b32 v[11:12], v13, off
	s_clause 0x1
	global_load_b32 v7, v[7:8], off
	global_load_b32 v4, v[4:5], off
	s_waitcnt vmcnt(0)
	v_mul_f32_e32 v7, v7, v4
	v_add_co_u32 v4, vcc_lo, s2, v9
	v_add_co_ci_u32_e32 v5, vcc_lo, s3, v10, vcc_lo
	global_store_b32 v[4:5], v7, off
	s_and_saveexec_b32 s13, s12
	s_cbranch_execz .LBB0_4
; %bb.2:                                ; %.lr.ph.preheader
	v_mov_b32_e32 v4, 0
	s_ashr_i32 s7, s4, 31
	s_mov_b32 s6, s4
	s_mov_b64 s[8:9], s[2:3]
	s_lshl_b64 s[6:7], s[6:7], 2
	s_mov_b64 s[10:11], s[0:1]
	s_mov_b32 s14, s5
.LBB0_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_add_u32 s16, s10, s6
	s_addc_u32 s17, s11, s7
	global_load_b32 v5, v4, s[16:17]
	s_add_u32 s16, s8, s6
	s_addc_u32 s17, s9, s7
	s_add_i32 s14, s14, -1
	s_waitcnt vmcnt(0)
	global_store_b32 v4, v5, s[10:11]
	global_load_b32 v5, v4, s[16:17]
	s_add_u32 s10, s10, 4
	s_addc_u32 s11, s11, 0
	s_waitcnt vmcnt(0)
	global_store_b32 v4, v5, s[8:9]
	s_add_u32 s8, s8, 4
	s_addc_u32 s9, s9, 0
	s_cmp_lg_u32 s14, 0
	s_cbranch_scc1 .LBB0_3
.LBB0_4:                                ; %Flow114
	s_or_b32 exec_lo, exec_lo, s13
	s_mov_b32 s6, 0
.LBB0_5:                                ; %Flow117
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s6
	s_cbranch_vccnz .LBB0_10
; %bb.6:
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_lshlrev_b32_e32 v6, 2, v6
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_add_co_u32 v4, vcc_lo, s0, v2
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v5, vcc_lo, s1, v3, vcc_lo
	v_add_co_u32 v2, vcc_lo, s2, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v3, vcc_lo
	s_clause 0x1
	global_load_b32 v7, v6, s[0:1]
	global_load_b32 v8, v[4:5], off
	global_load_b32 v9, v[2:3], off
	v_add_co_u32 v4, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v5, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v8, v9, v7
	global_store_b32 v[4:5], v8, off
	s_clause 0x1
	global_load_b32 v2, v[2:3], off
	global_load_b32 v3, v6, s[2:3]
	s_waitcnt vmcnt(0)
	v_mul_f32_e32 v2, v2, v3
	global_store_b32 v[0:1], v2, off
	s_and_saveexec_b32 s8, s12
	s_cbranch_execz .LBB0_9
; %bb.7:                                ; %.lr.ph80.preheader
	v_mov_b32_e32 v0, 0
	s_ashr_i32 s7, s4, 31
	s_mov_b32 s6, s4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_lshl_b64 s[6:7], s[6:7], 2
.LBB0_8:                                ; %.lr.ph80
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v1, v0, s[0:1]
	s_add_u32 s10, s0, s6
	s_addc_u32 s11, s1, s7
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11]
	global_load_b32 v1, v0, s[2:3]
	s_add_u32 s10, s2, s6
	s_addc_u32 s11, s3, s7
	s_add_i32 s5, s5, -1
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_add_u32 s2, s2, 4
	s_addc_u32 s3, s3, 0
	s_cmp_eq_u32 s5, 0
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11]
	s_cbranch_scc0 .LBB0_8
.LBB0_9:                                ; %Flow116
	s_or_b32 exec_lo, exec_lo, s8
.LBB0_10:                               ; %.loopexit
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z23RecursiveDoublingKerneliiiiPfS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 36
		.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 1
		.amdhsa_next_free_vgpr 16
		.amdhsa_next_free_sgpr 18
		.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	_Z23RecursiveDoublingKerneliiiiPfS_i, .Lfunc_end0-_Z23RecursiveDoublingKerneliiiiPfS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 748
; NumSgprs: 20
; NumVgprs: 16
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 20
; NumVGPRsForWavesPerEU: 16
; 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: 1
	.text
	.protected	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i ; -- Begin function _Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.globl	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
	.p2align	8
	.type	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i,@function
_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i: ; @_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
; %bb.0:
	s_clause 0x1
	s_load_b64 s[4:5], s[0:1], 0x0
	s_load_b32 s6, s[0:1], 0x20
	v_lshrrev_b32_e32 v1, 10, v0
	s_load_b128 s[0:3], s[0:1], 0x10
	v_and_b32_e32 v2, 0x3ff, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_or_b32_e32 v1, v0, v1
	v_and_b32_e32 v1, 0x3ff, v1
	s_delay_alu instid0(VALU_DEP_1)
	v_cmp_eq_u32_e32 vcc_lo, 0, v1
	s_waitcnt lgkmcnt(0)
	v_add_nc_u32_e32 v0, s4, v2
	s_and_b32 s6, s6, 0x80000001
	s_cmp_gt_i32 s5, 0
	v_lshlrev_b32_e32 v2, 2, v2
	s_cselect_b32 s7, -1, 0
	v_ashrrev_i32_e32 v1, 31, v0
	s_and_b32 s16, vcc_lo, s7
	s_cmp_lg_u32 s6, 1
	s_mov_b32 s6, -1
	s_cbranch_scc0 .LBB1_5
; %bb.1:
	v_add_nc_u32_e32 v3, s5, v0
	v_lshlrev_b64 v[5:6], 2, v[0:1]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v4, 31, v3
	v_add_co_u32 v7, vcc_lo, s0, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v8, vcc_lo, s1, v6, vcc_lo
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v9, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v10, vcc_lo, s1, v4, vcc_lo
	global_load_b32 v11, v[5:6], off
	s_clause 0x1
	global_load_b32 v7, v[7:8], off
	global_load_b32 v8, v[9:10], off
	v_add_co_u32 v3, vcc_lo, s2, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s3, v4, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v7, v8, v11
	global_store_b32 v2, v7, s[0:1]
	s_clause 0x1
	global_load_b32 v5, v[5:6], off
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	v_mul_f32_e32 v3, v5, v3
	global_store_b32 v2, v3, s[2:3]
	s_and_saveexec_b32 s17, s16
	s_cbranch_execz .LBB1_4
; %bb.2:                                ; %.lr.ph.preheader
	s_lshl_b32 s8, s4, 1
	s_sub_i32 s6, s4, s5
	s_sub_i32 s10, s8, s5
	v_mov_b32_e32 v3, 0
	s_ashr_i32 s7, s6, 31
	s_ashr_i32 s11, s10, 31
	s_lshl_b64 s[8:9], s[6:7], 2
	s_lshl_b64 s[10:11], s[10:11], 2
	s_mov_b64 s[12:13], s[2:3]
	s_mov_b64 s[14:15], s[0:1]
.LBB1_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s18, s14, s10
	s_addc_u32 s19, s15, s11
	global_load_b32 v4, v3, s[18:19]
	s_add_u32 s18, s14, s8
	s_addc_u32 s19, s15, s9
	s_add_u32 s20, s12, s10
	s_addc_u32 s21, s13, s11
	s_waitcnt vmcnt(0)
	global_store_b32 v3, v4, s[18:19]
	global_load_b32 v4, v3, s[20:21]
	s_add_u32 s18, s12, s8
	s_addc_u32 s19, s13, s9
	s_add_i32 s6, s6, 1
	s_add_u32 s14, s14, 4
	s_addc_u32 s15, s15, 0
	s_add_u32 s12, s12, 4
	s_addc_u32 s13, s13, 0
	s_cmp_lt_i32 s6, s4
	s_waitcnt vmcnt(0)
	global_store_b32 v3, v4, s[18:19]
	s_cbranch_scc1 .LBB1_3
.LBB1_4:                                ; %Flow121
	s_or_b32 exec_lo, exec_lo, s17
	s_mov_b32 s6, 0
.LBB1_5:                                ; %Flow124
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s6
	s_cbranch_vccnz .LBB1_10
; %bb.6:
	v_add_co_u32 v3, s8, s0, v2
	s_ashr_i32 s7, s5, 31
	s_mov_b32 s6, s5
	v_add_co_ci_u32_e64 v4, null, s1, 0, s8
	s_lshl_b64 s[6:7], s[6:7], 2
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_add_co_u32 v3, vcc_lo, v3, s6
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v4, vcc_lo, s7, v4, vcc_lo
	s_clause 0x2
	global_load_b32 v5, v2, s[2:3]
	global_load_b32 v7, v2, s[0:1]
	global_load_b32 v6, v[3:4], off
	v_add_co_u32 v8, s8, s2, v2
	s_delay_alu instid0(VALU_DEP_1)
	v_add_co_ci_u32_e64 v9, null, s3, 0, s8
	v_add_co_u32 v3, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v1, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v7, v6, v5
	v_add_co_u32 v5, vcc_lo, v8, s6
	v_add_co_ci_u32_e32 v6, vcc_lo, s7, v9, vcc_lo
	global_store_b32 v[3:4], v7, off
	s_clause 0x1
	global_load_b32 v2, v2, s[2:3]
	global_load_b32 v3, v[5:6], off
	s_waitcnt vmcnt(0)
	v_mul_f32_e32 v4, v2, v3
	v_add_co_u32 v2, vcc_lo, s2, v0
	v_mov_b32_e32 v0, 0
	v_add_co_ci_u32_e32 v3, vcc_lo, s3, v1, vcc_lo
	global_store_b32 v[2:3], v4, off
	s_and_saveexec_b32 s10, s16
	s_cbranch_execz .LBB1_9
; %bb.7:                                ; %.lr.ph85.preheader
	s_sub_i32 s6, s4, s5
	s_ashr_i32 s5, s4, 31
	s_ashr_i32 s7, s6, 31
	s_lshl_b64 s[8:9], s[4:5], 2
	s_lshl_b64 s[12:13], s[6:7], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s0, s12
	s_addc_u32 s1, s1, s13
	s_add_u32 s2, s2, s12
	s_addc_u32 s3, s3, s13
.LBB1_8:                                ; %.lr.ph85
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v1, v0, s[0:1]
	s_add_u32 s12, s0, s8
	s_addc_u32 s13, s1, s9
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[12:13]
	global_load_b32 v1, v0, s[2:3]
	s_add_u32 s12, s2, s8
	s_addc_u32 s13, s3, s9
	s_add_i32 s6, s6, 1
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_add_u32 s2, s2, 4
	s_addc_u32 s3, s3, 0
	s_cmp_ge_i32 s6, s4
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[12:13]
	s_cbranch_scc0 .LBB1_8
.LBB1_9:                                ; %Flow123
	s_or_b32 exec_lo, exec_lo, s10
.LBB1_10:                               ; %.loopexit
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 36
		.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 1
		.amdhsa_next_free_vgpr 12
		.amdhsa_next_free_sgpr 22
		.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	_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i, .Lfunc_end1-_Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 796
; NumSgprs: 24
; NumVgprs: 12
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 24
; 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: 1
	.text
	.protected	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_ ; -- Begin function _Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.globl	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
	.p2align	8
	.type	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_,@function
_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_: ; @_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
; %bb.0:
	s_clause 0x1
	s_load_b64 s[4:5], s[0:1], 0x0
	s_load_b32 s7, s[0:1], 0x20
	v_lshlrev_b32_e32 v11, 1, v0
	s_load_b128 s[0:3], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v9, s4, v11
	v_add_lshl_u32 v5, v0, s5, 2
	s_lshl_b32 s6, s4, 1
	v_lshlrev_b32_e32 v0, 2, v0
	s_and_b32 s7, s7, 0x80000001
	v_lshl_add_u32 v3, s5, 1, v9
	v_add_nc_u32_e32 v1, s6, v5
	v_ashrrev_i32_e32 v6, 31, v5
	s_cmp_lg_u32 s7, 1
	s_mov_b32 s7, -1
	v_subrev_nc_u32_e32 v7, s4, v3
	v_ashrrev_i32_e32 v4, 31, v3
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_3)
	v_ashrrev_i32_e32 v8, 31, v7
	s_cbranch_scc0 .LBB2_5
; %bb.1:
	s_delay_alu instid0(VALU_DEP_3)
	v_lshlrev_b64 v[12:13], 2, v[3:4]
	v_ashrrev_i32_e32 v10, 31, v9
	v_lshlrev_b64 v[14:15], 2, v[1:2]
	v_lshlrev_b64 v[20:21], 2, v[7:8]
	s_ashr_i32 s7, s6, 31
	s_cmp_lt_i32 s5, 1
	v_add_co_u32 v12, vcc_lo, s0, v12
	v_lshlrev_b64 v[9:10], 2, v[9:10]
	v_add_co_ci_u32_e32 v13, vcc_lo, s1, v13, vcc_lo
	v_add_co_u32 v14, vcc_lo, s2, v14
	v_add_co_ci_u32_e32 v15, vcc_lo, s3, v15, vcc_lo
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_u32 v9, vcc_lo, s0, v9
	v_add_co_ci_u32_e32 v10, vcc_lo, s1, v10, vcc_lo
	global_load_b32 v22, v[12:13], off
	global_load_b64 v[16:17], v[14:15], off
	global_load_b64 v[18:19], v[9:10], off
	v_add_co_u32 v20, vcc_lo, s0, v20
	v_add_co_ci_u32_e32 v21, vcc_lo, s1, v21, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v22, v16, v18
	v_add_nc_u32_e32 v16, s6, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v22, v17, v19
	v_ashrrev_i32_e32 v17, 31, v16
	global_store_b32 v[20:21], v22, off
	global_load_b32 v18, v[12:13], off offset:4
	global_load_b64 v[12:13], v[14:15], off offset:8
	global_load_b64 v[9:10], v[9:10], off
	v_lshlrev_b64 v[16:17], 2, v[16:17]
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v18, v12, v9
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v9, vcc_lo, s2, v16
	v_fmac_f32_e32 v18, v13, v10
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v10, vcc_lo, s3, v17, vcc_lo
	v_lshlrev_b64 v[16:17], 2, v[5:6]
	global_store_b32 v[20:21], v18, off offset:4
	s_clause 0x2
	global_load_b32 v18, v[9:10], off offset:8
	global_load_b64 v[12:13], v[14:15], off
	global_load_b32 v19, v[9:10], off
	v_add_co_u32 v16, vcc_lo, s2, v16
	v_add_co_ci_u32_e32 v17, vcc_lo, s3, v17, vcc_lo
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v18, v13, v18
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v18, v12, v19
	global_store_b32 v[16:17], v18, off
	s_clause 0x2
	global_load_b32 v12, v[9:10], off offset:12
	global_load_b32 v18, v[14:15], off
	global_load_b32 v19, v[9:10], off offset:4
	v_add_nc_u32_e32 v14, 2, v1
	v_sub_co_u32 v16, vcc_lo, v1, s6
	v_subrev_co_ci_u32_e32 v17, vcc_lo, s7, v2, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v15, 31, v14
	v_lshlrev_b64 v[16:17], 2, v[16:17]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[14:15], 2, v[14:15]
	s_waitcnt vmcnt(2)
	v_mul_f32_e32 v20, v13, v12
	v_add_co_u32 v12, vcc_lo, s2, v16
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_ci_u32_e32 v13, vcc_lo, s3, v17, vcc_lo
	v_add_co_u32 v14, vcc_lo, s2, v14
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v20, v18, v19
	v_add_co_ci_u32_e32 v15, vcc_lo, s3, v15, vcc_lo
	global_store_b32 v[12:13], v20, off offset:4
	s_clause 0x2
	global_load_b64 v[16:17], v[14:15], off
	global_load_b32 v18, v[9:10], off offset:8
	global_load_b32 v19, v[9:10], off
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v18, v17, v18
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v18, v16, v19
	global_store_b32 v[12:13], v18, off offset:8
	s_clause 0x2
	global_load_b32 v16, v[9:10], off offset:12
	global_load_b32 v14, v[14:15], off
	global_load_b32 v9, v[9:10], off offset:4
	s_waitcnt vmcnt(2)
	v_mul_f32_e32 v10, v17, v16
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v10, v14, v9
	global_store_b32 v[12:13], v10, off offset:12
	s_cbranch_scc1 .LBB2_4
; %bb.2:                                ; %.lr.ph.preheader
	s_add_u32 s8, s0, 4
	s_addc_u32 s9, s1, 0
	s_lshl_b64 s[10:11], s[6:7], 2
	s_add_u32 s12, s2, 12
	v_mov_b32_e32 v9, 0
	s_addc_u32 s13, s3, 0
	s_ashr_i32 s15, s4, 31
	s_mov_b32 s14, s4
	s_mov_b32 s7, s5
	s_lshl_b64 s[14:15], s[14:15], 2
.LBB2_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s16, s8, s14
	s_addc_u32 s17, s9, s15
	global_load_b32 v10, v9, s[16:17] offset:-4
	s_waitcnt vmcnt(0)
	global_store_b32 v9, v10, s[8:9] offset:-4
	global_load_b32 v10, v9, s[16:17]
	s_add_u32 s16, s12, s10
	s_addc_u32 s17, s13, s11
	s_add_i32 s7, s7, -1
	s_waitcnt vmcnt(0)
	global_store_b32 v9, v10, s[8:9]
	global_load_b32 v10, v9, s[16:17] offset:-12
	s_add_u32 s8, s8, 8
	s_addc_u32 s9, s9, 0
	s_waitcnt vmcnt(0)
	global_store_b32 v9, v10, s[12:13] offset:-12
	global_load_b32 v10, v9, s[16:17] offset:-8
	s_waitcnt vmcnt(0)
	global_store_b32 v9, v10, s[12:13] offset:-8
	global_load_b32 v10, v9, s[16:17] offset:-4
	s_waitcnt vmcnt(0)
	global_store_b32 v9, v10, s[12:13] offset:-4
	global_load_b32 v10, v9, s[16:17]
	s_waitcnt vmcnt(0)
	global_store_b32 v9, v10, s[12:13]
	s_add_u32 s12, s12, 16
	s_addc_u32 s13, s13, 0
	s_cmp_lg_u32 s7, 0
	s_cbranch_scc1 .LBB2_3
.LBB2_4:                                ; %Flow318
	s_mov_b32 s7, 0
.LBB2_5:                                ; %Flow321
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 vcc_lo, exec_lo, s7
	s_cbranch_vccnz .LBB2_9
; %bb.6:
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_4) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[7:8], 2, v[7:8]
	v_lshlrev_b64 v[5:6], 2, v[5:6]
	v_lshlrev_b32_e32 v13, 2, v11
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	s_cmp_lt_i32 s5, 1
	v_add_co_u32 v7, vcc_lo, s0, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s1, v8, vcc_lo
	v_add_co_u32 v5, vcc_lo, s2, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s3, v6, vcc_lo
	s_clause 0x1
	global_load_b32 v14, v[7:8], off
	global_load_b64 v[9:10], v13, s[0:1]
	global_load_b64 v[11:12], v[5:6], off
	v_add_co_u32 v3, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v4, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v14, v11, v9
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v14, v12, v10
	global_store_b32 v[3:4], v14, off
	global_load_b32 v11, v[7:8], off offset:4
	global_load_b64 v[7:8], v[5:6], off offset:8
	global_load_b64 v[9:10], v13, s[0:1]
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v11, v7, v9
	v_lshlrev_b32_e32 v7, 2, v0
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v11, v8, v10
	v_add_co_u32 v0, vcc_lo, s2, v0
	global_store_b32 v[3:4], v11, off offset:4
	s_clause 0x2
	global_load_b32 v8, v7, s[2:3] offset:8
	global_load_b64 v[3:4], v[5:6], off
	global_load_b32 v9, v7, s[2:3]
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v2, v4, v8
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v2, v3, v9
	global_store_b32 v[0:1], v2, off
	s_clause 0x2
	global_load_b32 v4, v7, s[2:3] offset:12
	global_load_b64 v[2:3], v[5:6], off
	global_load_b32 v8, v7, s[2:3] offset:4
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v3, v3, v4
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v3, v2, v8
	global_store_b32 v[0:1], v3, off offset:4
	s_clause 0x2
	global_load_b32 v4, v7, s[2:3] offset:8
	global_load_b64 v[2:3], v[5:6], off offset:8
	global_load_b32 v8, v7, s[2:3]
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v3, v3, v4
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v3, v2, v8
	global_store_b32 v[0:1], v3, off offset:8
	s_clause 0x2
	global_load_b32 v4, v7, s[2:3] offset:12
	global_load_b64 v[2:3], v[5:6], off offset:8
	global_load_b32 v5, v7, s[2:3] offset:4
	s_waitcnt vmcnt(1)
	v_mul_f32_e32 v3, v3, v4
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fmac_f32_e32 v3, v2, v5
	global_store_b32 v[0:1], v3, off offset:12
	s_cbranch_scc1 .LBB2_9
; %bb.7:                                ; %.lr.ph261.preheader
	s_ashr_i32 s9, s4, 31
	s_mov_b32 s8, s4
	v_mov_b32_e32 v0, 0
	s_ashr_i32 s7, s6, 31
	s_lshl_b64 s[8:9], s[8:9], 2
	s_add_u32 s0, s0, 4
	s_addc_u32 s1, s1, 0
	s_lshl_b64 s[6:7], s[6:7], 2
.LBB2_8:                                ; %.lr.ph261
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b32 v1, v0, s[0:1] offset:-4
	s_add_u32 s10, s0, s8
	s_addc_u32 s11, s1, s9
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11] offset:-4
	global_load_b32 v1, v0, s[0:1]
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11]
	global_load_b32 v1, v0, s[2:3]
	s_add_u32 s10, s2, s6
	s_addc_u32 s11, s3, s7
	s_add_i32 s5, s5, -1
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11]
	global_load_b32 v1, v0, s[2:3] offset:4
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11] offset:4
	global_load_b32 v1, v0, s[2:3] offset:8
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11] offset:8
	global_load_b32 v1, v0, s[2:3] offset:12
	s_add_u32 s2, s2, 16
	s_addc_u32 s3, s3, 0
	s_add_u32 s0, s0, 8
	s_addc_u32 s1, s1, 0
	s_cmp_eq_u32 s5, 0
	s_waitcnt vmcnt(0)
	global_store_b32 v0, v1, s[10:11] offset:12
	s_cbranch_scc0 .LBB2_8
.LBB2_9:                                ; %.loopexit
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 72
		.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 23
		.amdhsa_next_free_sgpr 18
		.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	_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_, .Lfunc_end2-_Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1524
; NumSgprs: 20
; NumVgprs: 23
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 20
; NumVGPRsForWavesPerEU: 23
; 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
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .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:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 36
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z23RecursiveDoublingKerneliiiiPfS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     20
    .sgpr_spill_count: 0
    .symbol:         _Z23RecursiveDoublingKerneliiiiPfS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     16
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .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:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 36
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     24
    .sgpr_spill_count: 0
    .symbol:         _Z34LoopingbackRecursiveDoublingKerneliiiiPfS_i.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:
      - .offset:         0
        .size:           4
        .value_kind:     by_value
      - .offset:         4
        .size:           4
        .value_kind:     by_value
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
      - .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:     by_value
      - .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
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 72
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     20
    .sgpr_spill_count: 0
    .symbol:         _Z30MatrixVersionRecursiveDoublingiiiiPfS_iS_S_S_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     23
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
