#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <sys/time.h>

using namespace std;

//**************************************************************************
double cpuSecond()
{
	struct timeval tp;
	gettimeofday(&tp, NULL);
	return((double)tp.tv_sec + (double)tp.tv_usec*1e-6);
}

//**************************************************************************
__global__ void transformacion_kernel_global(float * A, float * B, float * C, 
      float * D, float * mx)
{

  int tid = threadIdx.x;
  int Bsize = blockDim.x;
  int i= tid + Bsize * blockIdx.x;
  float c = 0.0; // valor a calcular
  
  extern __shared__ float sdata[]; // memoria compartida
  float *sdata_A = sdata; 	   // Puntero al primer valor de A
  float *sdata_B = sdata+Bsize;    // Puntero al primer valor de B
  float *sdata_C = sdata+Bsize*2;  // Puntero al primer valor de C
  float *sdata_C2 = sdata+Bsize*3; // Puntero al primer valor de una copia de C
  

  // Paso a memoria compartida de A y B
  *(sdata_A+tid) = A[i];
  *(sdata_B+tid) = B[i];

  __syncthreads();
  
  /***** Fase del calculo de C (memoria global)  *****/

  int jinicio = blockIdx.x * Bsize;
  int jfin = jinicio + Bsize;
  for (int j = jinicio; j < jfin; j++){ 
     float a = A[j] * i;
     int signo = int(ceil(a))%2 == 0 ? 1 : -1;
     c += a + B[j] * signo;
  }

  C[i] = c;
  *(sdata_C+tid) = c;
  *(sdata_C2+tid) = c;

  __syncthreads();


  /***** Fase del calculo de D (reduccion suma) y mx (reduccion >) *****/
  float n, m;
  for (int s=blockDim.x/2; s>0; s>>=1){
     if (tid < s){
        *(sdata_C+tid) += *(sdata_C+tid+s);
        n = *(sdata_C2+tid);
        m = *(sdata_C2+tid+s);
        *(sdata_C2+tid) = (n > m) ? n : m;
     }
     __syncthreads();
  }

  if (tid == 0){
     D[blockIdx.x] = *(sdata_C);
     mx[blockIdx.x] = *(sdata_C2);
  }
  
}


//**************************************************************************
__global__ void transformacion_kernel_shared(float * A, float * B, float * C,
      float * D, float * mx)
{

  int tid = threadIdx.x;
  int Bsize = blockDim.x;
  int i= tid + Bsize * blockIdx.x;
  float c = 0.0; // valor a calcular

  extern __shared__ float sdata[]; // memoria compartida
  float *sdata_A = sdata;          // Puntero al primer valor de A
  float *sdata_B = sdata+Bsize;    // Puntero al primer valor de B
  float *sdata_C = sdata+Bsize*2;  // Puntero al primer valor de C
  float *sdata_C2 = sdata+Bsize*3; // Puntero al primer valor de una copia de C


  // Paso a memoria compartida de A y B
  *(sdata_A+tid) = A[i];
  *(sdata_B+tid) = B[i];

  __syncthreads();

  /***** Fase del calculo de C (memoria compartida)  *****/

  for (int j = 0; j < Bsize; j++){
     float a =  *(sdata_A+j) * i;
     int signo = int(ceil(a))%2 == 0 ? 1 : -1;
     c += a + *(sdata_B+j) * signo;
  }

  C[i] = c;
  *(sdata_C+tid) = c;
  *(sdata_C2+tid) = c;

  __syncthreads();


  /***** Fase del calculo de D (reduccion suma) y mx (reduccion >) *****/
  float n, m;
  for (int s=blockDim.x/2; s>0; s>>=1){
     if (tid < s){
        *(sdata_C+tid) += *(sdata_C+tid+s);
        n = *(sdata_C2+tid);
        m = *(sdata_C2+tid+s);
        *(sdata_C2+tid) = (n > m) ? n : m;
     }
     __syncthreads();
  }

  if (tid == 0){
     D[blockIdx.x] = *(sdata_C);
     mx[blockIdx.x] = *(sdata_C2);
  }

}

//**************************************************************************
int main(int argc, char *argv[])
//**************************************************************************
{
  //Get GPU information
  int devID;
  cudaDeviceProp props;
  cudaError_t err;
  err = cudaGetDevice(&devID);
  if(err != cudaSuccess)
	cout << "CUDA GET DEVICE ERROR" << endl;

  cudaGetDeviceProperties(&props, devID);
  printf("Device %d: \"%s\" with Compute %d.%d capability\n\n", devID, props.name, props.major, props.minor);

  int Bsize, NBlocks;
  if (argc != 3){ 
	cout << "Uso: transformacion Num_bloques Tam_bloque  "<<endl;
	return(0);
  }else{
	NBlocks = atoi(argv[1]);
   	Bsize= atoi(argv[2]);
  }

  const int N=Bsize*NBlocks;

  // Pointers to memory
  float *h_A, *h_B, *h_C, *h_D, *h_D_global, *h_mx_global, h_mx, *h_D_shared, *h_mx_shared; //host
  float *d_A, *d_B, *d_C, *d_D_global, *d_mx_global, *d_D_shared, *d_mx_shared; // device

  // Allocate arrays a, b, c and d on host
  h_A = new float[N];
  h_B = new float[N];
  h_C = new float[N];
  h_D = new float[NBlocks];
  
  // resultados del kernel de memoria global
  h_D_global = new float[NBlocks];
  h_mx_global= new float[NBlocks];

  // resultados del kernel de memoria compartida
  h_D_shared = new float[NBlocks];
  h_mx_shared = new float[NBlocks];

  // Allocate device memory
  int sizeABC = N*sizeof(float);
  int sizeD = NBlocks*sizeof(float);

  d_A = NULL;
  err = cudaMalloc((void **) &d_A, sizeABC);
  if (err != cudaSuccess) cout << "ERROR RESERVA A" << endl;
  
  d_B = NULL;
  err = cudaMalloc((void **) &d_B, sizeABC);
  if (err != cudaSuccess) cout << "ERROR RESERVA B" << endl;

  d_C = NULL;
  err = cudaMalloc((void **) &d_C, sizeABC);
  if (err != cudaSuccess) cout << "ERROR RESERVA C" << endl;

  d_D_global = NULL;
  err = cudaMalloc((void **) &d_D_global, sizeD);
  if (err != cudaSuccess) cout << "ERROR RESERVA D (GLOBAL)" << endl;

  d_mx_global = NULL; // array with the maximum of each block of C (device)
  err = cudaMalloc((void **) &d_mx_global, sizeD);
  if (err != cudaSuccess) cout << "ERROR RESERVA MX (GLOBAL)" << endl;

  d_D_shared = NULL; 
  err = cudaMalloc((void **) &d_D_shared, sizeD);
  if (err != cudaSuccess) cout << "ERROR RESERVA D (SHARED)" << endl;

  d_mx_shared = NULL;
  err = cudaMalloc((void **) &d_mx_shared, sizeD);
  if (err != cudaSuccess) cout << "ERROR RESERVA MX (SHARED)" << endl;

  //* Initialize arrays */
  for (int i=0; i<N; i++){ 
	h_A[i]= (float) (1  -(i%100)*0.001);
	h_B[i]= (float) (0.5+(i%10) *0.1  );    
  }

  cudaDeviceSetCacheConfig(cudaFuncCachePreferShared);






  /*********************** GPU Phase (global memory) ************************/
  double t1 = cpuSecond();

  // copy A and B to device
  err = cudaMemcpy(d_A, h_A, sizeABC, cudaMemcpyHostToDevice);
  if (err != cudaSuccess) cout << "ERROR COPIA A" << endl;

  err = cudaMemcpy(d_B, h_B, sizeABC, cudaMemcpyHostToDevice);
  if (err != cudaSuccess) cout << "ERROR COPIA B" << endl;
  

  dim3 threadsPerBlock(Bsize, 1);
  dim3 numBlocks(NBlocks, 1);
   
  int smemSize = Bsize*4*sizeof(float);
  transformacion_kernel_global<<<numBlocks, threadsPerBlock, smemSize>>>(
       d_A, d_B, d_C, d_D_global, d_mx_global);

  cudaMemcpy(h_D_global, d_D_global, NBlocks*sizeof(float), cudaMemcpyDeviceToHost);
  cudaMemcpy(h_mx_global, d_mx_global, NBlocks*sizeof(float), cudaMemcpyDeviceToHost);

  float mx_global_final = h_mx_global[0];
  cudaDeviceSynchronize();

  // final reduction on CPU
  for (int k = 1; k<NBlocks; k++)
     mx_global_final = (mx_global_final > h_mx_global[k]) ? mx_global_final : h_mx_global[k];

  double tgpu_global=cpuSecond()-t1;
  






  /********************** GPU Phase (shared memory) **********************/

  t1 = cpuSecond();

  // copy A and B to device
  //err = cudaMemcpy(d_A, h_A, sizeABC, cudaMemcpyHostToDevice);
  //if (err != cudaSuccess) cout << "ERROR COPIA A" << endl;

  //err = cudaMemcpy(d_B, h_B, sizeABC, cudaMemcpyHostToDevice);
  //if (err != cudaSuccess) cout << "ERROR COPIA B" << endl;

  smemSize = Bsize*4*sizeof(float);
  transformacion_kernel_shared<<<numBlocks, threadsPerBlock, smemSize>>>(
       d_A, d_B, d_C, d_D_shared, d_mx_shared);

  cudaMemcpy(h_D_shared, d_D_shared, NBlocks*sizeof(float), cudaMemcpyDeviceToHost);
  cudaMemcpy(h_mx_shared, d_mx_shared, NBlocks*sizeof(float), cudaMemcpyDeviceToHost);

  float mx_shared_final = h_mx_shared[0];
  cudaDeviceSynchronize();

  // final reduction on CPU
  for (int k = 1; k<NBlocks; k++)
     mx_shared_final = (mx_shared_final > h_mx_shared[k]) ? mx_shared_final : h_mx_shared[k];

  double tgpu_shared=cpuSecond()-t1;









  /******************************* CPU Phase *****************************/
  // Time measurement  
  t1=cpuSecond();
  
  // Compute C[i], d[K] and mx
  for (int k=0; k<NBlocks;k++)
  { 
	int istart=k*Bsize;
  	int iend  =istart+Bsize;
  	h_D[k]=0.0;
  	for (int i=istart; i<iend;i++){ 
	   h_C[i]=0.0;
    	   for (int j=istart; j<iend;j++){
	   	float a=h_A[j]*i;
       		if ((int)ceil(a) % 2 ==0)
		   h_C[i]+= a + h_B[j];
       		else
 	   	   h_C[i]+= a - h_B[j];
     	   }

   	   h_D[k]+=h_C[i];
   	   h_mx= (i==1) ? h_C[0] : max(h_C[i],h_mx);
  	}
  }

  double tsec=cpuSecond()-t1;
  



  /********************** RESULTADOS ***************************/

  //for (int i=0; i<N;i++)   cout<<"C["<<i<<"]="<<h_C[i]<<endl;
  /*cout<<"................................."<<endl;
  for (int k=0; k<NBlocks;k++){
	cout<<"D["<<k<<"]="<<h_D[k]<<endl;
	cout<<"D_global["<<k<<"]="<<h_D_global[k]<<endl;
	cout<<"D_shared["<<k<<"]="<<h_D_shared[k]<<endl;
  }*/
  cout<<"................................."<<endl<<"El valor máximo en C (sec) es: "<<h_mx<<endl;
  cout<<"................................."<<endl<<"El valor máximo en C (gpu global) es: "<<mx_global_final<<endl;
  cout<<"................................."<<endl<<"El valor máximo en C (gpu shared) es: "<<mx_shared_final << endl;
  cout << endl << "N=" << N << "= " << Bsize << "*" << NBlocks << endl;
  cout << "Tiempo gastado CPU= " << tsec << endl;
  cout << "Tiempo gastado GPU (mem global)= " << tgpu_global << endl;
  cout << "Tiempo gastado GPU (mem compartida)= " << tgpu_shared << endl;

  cout << endl << "Ganancia mem global = " << tsec/tgpu_global << endl;
  cout << "Ganancia mem compartida = " << tsec/tgpu_shared << endl;

  // Free host memory
  delete [] h_A; 
  delete [] h_B; 
  delete [] h_C;
  delete [] h_D;
  delete [] h_D_global;
  delete [] h_mx_global;
  delete [] h_D_shared;
  delete [] h_mx_shared;

  // Free device memory
  cudaFree(d_A);
  cudaFree(d_B);
  cudaFree(d_C);
  cudaFree(d_mx_global);
  cudaFree(d_mx_shared);
  cudaFree(d_D_global);
  cudaFree(d_D_shared);
}

	.file	"tmpxft_002a5896_00000000-6_transformacion.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3639:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3639:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z9cpuSecondv
	.type	_Z9cpuSecondv, @function
_Z9cpuSecondv:
.LFB3635:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdi
	call	gettimeofday@PLT
	cvtsi2sdq	16(%rsp), %xmm0
	mulsd	.LC0(%rip), %xmm0
	cvtsi2sdq	8(%rsp), %xmm1
	addsd	%xmm1, %xmm0
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3635:
	.size	_Z9cpuSecondv, .-_Z9cpuSecondv
	.globl	_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_
	.type	_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_, @function
_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_:
.LFB3661:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L6
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z28transformacion_kernel_globalPfS_S_S_S_(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L6:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3661:
	.size	_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_, .-_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_
	.globl	_Z28transformacion_kernel_globalPfS_S_S_S_
	.type	_Z28transformacion_kernel_globalPfS_S_S_S_, @function
_Z28transformacion_kernel_globalPfS_S_S_S_:
.LFB3662:
	.cfi_startproc
	endbr64
	jmp	_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_
	.cfi_endproc
.LFE3662:
	.size	_Z28transformacion_kernel_globalPfS_S_S_S_, .-_Z28transformacion_kernel_globalPfS_S_S_S_
	.globl	_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_
	.type	_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_, @function
_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_:
.LFB3663:
	.cfi_startproc
	endbr64
	subq	$168, %rsp
	.cfi_def_cfa_offset 176
	movq	%rdi, 40(%rsp)
	leaq	64(%rsp), %rdi
	movq	%rsi, 32(%rsp)
	leaq	76(%rsp), %rsi
	movq	%rdx, 24(%rsp)
	leaq	48(%rsp), %rdx
	movq	%rcx, 16(%rsp)
	leaq	56(%rsp), %rcx
	movq	%r8, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 152(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	movl	$1, 72(%rsp)
	movq	%rax, 112(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 64(%rsp)
	movq	%rax, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	56(%rsp)
	.cfi_def_cfa_offset 184
	leaq	_Z28transformacion_kernel_sharedPfS_S_S_S_(%rip), %rdi
	pushq	56(%rsp)
	.cfi_def_cfa_offset 192
	movq	92(%rsp), %rcx
	movl	100(%rsp), %r8d
	movq	80(%rsp), %rsi
	movl	88(%rsp), %edx
	leaq	128(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 184
	popq	%rdx
	.cfi_def_cfa_offset 176
.L11:
	movq	152(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$168, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3663:
	.size	_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_, .-_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_
	.globl	_Z28transformacion_kernel_sharedPfS_S_S_S_
	.type	_Z28transformacion_kernel_sharedPfS_S_S_S_, @function
_Z28transformacion_kernel_sharedPfS_S_S_S_:
.LFB3664:
	.cfi_startproc
	endbr64
	jmp	_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_
	.cfi_endproc
.LFE3664:
	.size	_Z28transformacion_kernel_sharedPfS_S_S_S_, .-_Z28transformacion_kernel_sharedPfS_S_S_S_
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"CUDA GET DEVICE ERROR"
.LC3:
	.string	"Device %d: \"%s\" with Compute %d.%d capability\n\n"
.LC4:
	.string	"Uso: transformacion Num_bloques Tam_bloque  "
.LC5:
	.string	"ERROR RESERVA A"
.LC6:
	.string	"ERROR RESERVA B"
.LC7:
	.string	"ERROR RESERVA C"
.LC8:
	.string	"ERROR RESERVA D (GLOBAL)"
.LC9:
	.string	"ERROR RESERVA MX (GLOBAL)"
.LC10:
	.string	"ERROR RESERVA D (SHARED)"
.LC11:
	.string	"ERROR RESERVA MX (SHARED)"
.LC16:
	.string	"ERROR COPIA A"
.LC17:
	.string	"ERROR COPIA B"
.LC18:
	.string	"................................."
.LC19:
	.string	"El valor m\303\241ximo en C (sec) es: "
.LC20:
	.string	"El valor m\303\241ximo en C (gpu global) es: "
.LC21:
	.string	"El valor m\303\241ximo en C (gpu shared) es: "
.LC22:
	.string	"N="
.LC23:
	.string	"= "
.LC24:
	.string	"*"
.LC25:
	.string	"Tiempo gastado CPU= "
.LC26:
	.string	"Tiempo gastado GPU (mem global)= "
.LC27:
	.string	"Tiempo gastado GPU (mem compartida)= "
.LC28:
	.string	"Ganancia mem global = "
.LC29:
	.string	"Ganancia mem compartida = "
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB3636:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	subq	$1288, %rsp
	.cfi_def_cfa_offset 1344
	movq	%fs:40, %rax
	movq	%rax, 1272(%rsp)
	xorl	%eax, %eax
	leaq	156(%rsp), %rdi
	call	cudaGetDevice@PLT
	testl	%eax, %eax
	je	.L17
	leaq	.LC2(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L17:
	movl	156(%rsp), %esi
	leaq	240(%rsp), %r12
	movq	%r12, %rdi
	call	cudaGetDeviceProperties_v2@PLT
	xorl	%eax, %eax
	movq	%r12, %rcx
	movl	$2, %edi
	movl	604(%rsp), %r9d
	movl	600(%rsp), %r8d
	leaq	.LC3(%rip), %rsi
	movl	156(%rsp), %edx
	call	__printf_chk@PLT
	cmpl	$3, %ebx
	je	.L18
	leaq	.LC4(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	jmp	.L19
.L18:
	movabsq	$2305843009213693950, %r13
	movq	8(%rbp), %rdi
	call	atoi@PLT
	movq	16(%rbp), %rdi
	movl	%eax, %ebx
	call	atoi@PLT
	movl	%eax, %ebp
	movl	%ebx, %eax
	imull	%ebp, %eax
	movslq	%eax, %r12
	movl	%eax, 4(%rsp)
	cmpq	%r12, %r13
	jb	.L20
	salq	$2, %r12
	movq	%r12, %rdi
	call	_Znam@PLT
	movq	%r12, %rdi
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movq	%r12, %rdi
	movq	%rax, 16(%rsp)
	call	_Znam@PLT
	movq	%rax, 56(%rsp)
	movslq	%ebx, %rax
	cmpq	%rax, %r13
	jnb	.L21
.L20:
	movq	1272(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L88
	call	__cxa_throw_bad_array_new_length@PLT
.L21:
	leaq	0(,%rax,4), %r15
	leal	0(,%rbx,4), %r12d
	movq	%r15, %rdi
	call	_Znam@PLT
	movq	%r15, %rdi
	movq	%rax, %r14
	call	_Znam@PLT
	movq	%r15, %rdi
	movq	%rax, 72(%rsp)
	call	_Znam@PLT
	movq	%r15, %rdi
	movq	%rax, 24(%rsp)
	call	_Znam@PLT
	movq	%r15, %rdi
	movq	%rax, 80(%rsp)
	call	_Znam@PLT
	xorl	%r10d, %r10d
	leaq	160(%rsp), %rdi
	movq	%rax, 32(%rsp)
	movl	4(%rsp), %eax
	movq	%r10, 160(%rsp)
	sall	$2, %eax
	movslq	%eax, %r13
	movq	%r13, %rsi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L23
	leaq	.LC5(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L23:
	xorl	%r9d, %r9d
	leaq	168(%rsp), %rdi
	movq	%r13, %rsi
	movq	%r9, 168(%rsp)
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L24
	leaq	.LC6(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L24:
	xorl	%r8d, %r8d
	leaq	176(%rsp), %rdi
	movq	%r13, %rsi
	movq	%r8, 176(%rsp)
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L25
	leaq	.LC7(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L25:
	xorl	%edi, %edi
	movslq	%r12d, %r12
	movq	%rdi, 184(%rsp)
	movq	%r12, %rsi
	leaq	184(%rsp), %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L26
	leaq	.LC8(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L26:
	xorl	%esi, %esi
	leaq	192(%rsp), %rdi
	movq	%rsi, 192(%rsp)
	movq	%r12, %rsi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L27
	leaq	.LC9(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L27:
	xorl	%ecx, %ecx
	leaq	200(%rsp), %rdi
	movq	%r12, %rsi
	movq	%rcx, 200(%rsp)
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L28
	leaq	.LC10(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L28:
	xorl	%edx, %edx
	leaq	208(%rsp), %rdi
	movq	%r12, %rsi
	movq	%rdx, 208(%rsp)
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L29
	leaq	.LC11(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L29:
	movsd	.LC12(%rip), %xmm2
	xorl	%ecx, %ecx
	movl	$100, %esi
	movsd	.LC13(%rip), %xmm3
	movsd	.LC14(%rip), %xmm4
	movsd	.LC15(%rip), %xmm5
	movl	$10, %edi
.L30:
	movl	%ecx, %r8d
	cmpl	%ecx, 4(%rsp)
	jle	.L89
	movl	%r8d, %eax
	movaps	%xmm3, %xmm0
	cltd
	idivl	%esi
	movq	8(%rsp), %rax
	cvtsi2sdl	%edx, %xmm1
	mulsd	%xmm2, %xmm1
	subsd	%xmm1, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rax,%rcx,4)
	movl	%r8d, %eax
	cltd
	idivl	%edi
	movq	16(%rsp), %rax
	cvtsi2sdl	%edx, %xmm0
	mulsd	%xmm4, %xmm0
	addsd	%xmm5, %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movss	%xmm0, (%rax,%rcx,4)
	incq	%rcx
	jmp	.L30
.L89:
	movl	$1, %edi
	call	cudaDeviceSetCacheConfig@PLT
	call	_Z9cpuSecondv
	movq	8(%rsp), %rsi
	movl	$1, %ecx
	movq	%r13, %rdx
	movq	160(%rsp), %rdi
	movsd	%xmm0, 48(%rsp)
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L32
	leaq	.LC16(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L32:
	movq	16(%rsp), %rsi
	movq	168(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rdx
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L33
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.L33:
	movl	%ebp, %r12d
	movl	%ebp, 216(%rsp)
	xorl	%r9d, %r9d
	movabsq	$4294967297, %rax
	sall	$4, %r12d
	movq	%rax, 220(%rsp)
	movl	224(%rsp), %ecx
	movq	%rax, 232(%rsp)
	movslq	%r12d, %r12
	movq	216(%rsp), %rdx
	movl	%ebx, 228(%rsp)
	movl	236(%rsp), %esi
	movq	%r12, %r8
	movq	228(%rsp), %rdi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L34
	movq	192(%rsp), %r8
	movq	184(%rsp), %rcx
	movq	176(%rsp), %rdx
	movq	168(%rsp), %rsi
	movq	160(%rsp), %rdi
	call	_Z56__device_stub__Z28transformacion_kernel_globalPfS_S_S_S_PfS_S_S_S_
.L34:
	movq	184(%rsp), %rsi
	movq	72(%rsp), %rdi
	movl	$2, %ecx
	movq	%r15, %rdx
	call	cudaMemcpy@PLT
	movq	192(%rsp), %rsi
	movq	24(%rsp), %rdi
	movq	%r15, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rax
	movss	(%rax), %xmm6
	movss	%xmm6, 44(%rsp)
	call	cudaDeviceSynchronize@PLT
	movl	$1, %eax
.L35:
	cmpl	%eax, %ebx
	jle	.L90
	movq	24(%rsp), %rdx
	movss	44(%rsp), %xmm0
	maxss	(%rdx,%rax,4), %xmm0
	incq	%rax
	movss	%xmm0, 44(%rsp)
	jmp	.L35
.L90:
	call	_Z9cpuSecondv
	subsd	48(%rsp), %xmm0
	movsd	%xmm0, 88(%rsp)
	call	_Z9cpuSecondv
	movl	224(%rsp), %ecx
	xorl	%r9d, %r9d
	movq	216(%rsp), %rdx
	movl	236(%rsp), %esi
	movq	%r12, %r8
	movq	228(%rsp), %rdi
	movsd	%xmm0, 64(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L39
	movq	208(%rsp), %r8
	movq	200(%rsp), %rcx
	movq	176(%rsp), %rdx
	movq	168(%rsp), %rsi
	movq	160(%rsp), %rdi
	call	_Z56__device_stub__Z28transformacion_kernel_sharedPfS_S_S_S_PfS_S_S_S_
.L39:
	movq	200(%rsp), %rsi
	movq	80(%rsp), %rdi
	movl	$2, %ecx
	movq	%r15, %rdx
	call	cudaMemcpy@PLT
	movq	208(%rsp), %rsi
	movq	32(%rsp), %rdi
	movq	%r15, %rdx
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rax
	movss	(%rax), %xmm4
	movss	%xmm4, 48(%rsp)
	call	cudaDeviceSynchronize@PLT
	movl	$1, %eax
.L40:
	cmpl	%eax, %ebx
	jle	.L91
	movq	32(%rsp), %rdx
	movss	48(%rsp), %xmm0
	maxss	(%rdx,%rax,4), %xmm0
	incq	%rax
	movss	%xmm0, 48(%rsp)
	jmp	.L40
.L91:
	call	_Z9cpuSecondv
	subsd	64(%rsp), %xmm0
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	movsd	%xmm0, 96(%rsp)
	call	_Z9cpuSecondv
	movslq	%ebp, %rax
	movq	%rax, 112(%rsp)
	xorl	%eax, %eax
	movq	%rax, 64(%rsp)
	movsd	%xmm0, 104(%rsp)
.L44:
	cmpl	%r13d, %ebx
	jle	.L92
	movl	$0x00000000, (%r14,%r13,4)
	movq	64(%rsp), %r15
	addl	%ebp, %r12d
.L45:
	movl	%r15d, 120(%rsp)
	movl	%r15d, %esi
	cmpl	%r12d, %r15d
	jge	.L93
	movq	64(%rsp), %rcx
	xorps	%xmm2, %xmm2
.L51:
	cmpl	%ecx, %r12d
	jle	.L94
	movq	8(%rsp), %rax
	cvtsi2ssl	%esi, %xmm1
	movl	%esi, 136(%rsp)
	movq	%rcx, 128(%rsp)
	movss	%xmm2, 140(%rsp)
	mulss	(%rax,%rcx,4), %xmm1
	movaps	%xmm1, %xmm0
	movss	%xmm1, 124(%rsp)
	call	ceilf@PLT
	movq	16(%rsp), %rax
	movq	128(%rsp), %rcx
	movaps	%xmm0, %xmm3
	movss	124(%rsp), %xmm1
	movl	136(%rsp), %esi
	cvttss2sil	%xmm3, %edi
	movss	(%rax,%rcx,4), %xmm0
	movss	140(%rsp), %xmm2
	andl	$1, %edi
	jne	.L46
	addss	%xmm1, %xmm0
	addss	%xmm0, %xmm2
	jmp	.L47
.L46:
	subss	%xmm0, %xmm1
	addss	%xmm1, %xmm2
.L47:
	incq	%rcx
	jmp	.L51
.L94:
	movss	(%r14,%r13,4), %xmm0
	movq	56(%rsp), %rax
	cmpl	$1, 120(%rsp)
	addss	%xmm2, %xmm0
	movss	%xmm2, (%rax,%r15,4)
	movss	%xmm0, (%r14,%r13,4)
	jne	.L49
	movss	(%rax), %xmm6
	movss	%xmm6, 40(%rsp)
	jmp	.L50
.L49:
	movss	40(%rsp), %xmm1
	movaps	%xmm2, %xmm0
	call	fmaxf@PLT
	movss	%xmm0, 40(%rsp)
.L50:
	incq	%r15
	jmp	.L45
.L93:
	movq	112(%rsp), %rdx
	incq	%r13
	addq	%rdx, 64(%rsp)
	jmp	.L44
.L92:
	call	_Z9cpuSecondv
	subsd	104(%rsp), %xmm0
	leaq	_ZSt4cout(%rip), %r12
	leaq	.LC18(%rip), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%xmm0, %r15
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC19(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	40(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC20(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	44(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC21(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	48(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC22(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	4(%rsp), %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC23(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebp, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC24(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC25(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r15, %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC26(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	88(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC27(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	96(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC28(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r15, %xmm0
	divsd	88(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC29(%rip), %rsi
	movq	%r12, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r15, %xmm0
	divsd	96(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	8(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	16(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	56(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	%r14, %rdi
	call	_ZdaPv@PLT
	movq	72(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	24(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	80(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	32(%rsp), %rdi
	call	_ZdaPv@PLT
	movq	160(%rsp), %rdi
	call	cudaFree@PLT
	movq	168(%rsp), %rdi
	call	cudaFree@PLT
	movq	176(%rsp), %rdi
	call	cudaFree@PLT
	movq	192(%rsp), %rdi
	call	cudaFree@PLT
	movq	208(%rsp), %rdi
	call	cudaFree@PLT
	movq	184(%rsp), %rdi
	call	cudaFree@PLT
	movq	200(%rsp), %rdi
	call	cudaFree@PLT
.L19:
	movq	1272(%rsp), %rax
	subq	%fs:40, %rax
	je	.L53
.L88:
	call	__stack_chk_fail@PLT
.L53:
	addq	$1288, %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
.LFE3636:
	.size	main, .-main
	.section	.rodata.str1.1
.LC30:
	.string	"_Z28transformacion_kernel_sharedPfS_S_S_S_"
.LC31:
	.string	"_Z28transformacion_kernel_globalPfS_S_S_S_"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3666:
	.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	.LC30(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z28transformacion_kernel_sharedPfS_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	.LC31(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z28transformacion_kernel_globalPfS_S_S_S_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	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
.LFE3666:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-1598689907
	.long	1051772663
	.align 8
.LC12:
	.long	-755914244
	.long	1062232653
	.align 8
.LC13:
	.long	0
	.long	1072693248
	.align 8
.LC14:
	.long	-1717986918
	.long	1069128089
	.align 8
.LC15:
	.long	0
	.long	1071644672
	.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 <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <sys/time.h>

using namespace std;

//**************************************************************************
double cpuSecond()
{
	struct timeval tp;
	gettimeofday(&tp, NULL);
	return((double)tp.tv_sec + (double)tp.tv_usec*1e-6);
}

//**************************************************************************
__global__ void transformacion_kernel_global(float * A, float * B, float * C, 
      float * D, float * mx)
{

  int tid = threadIdx.x;
  int Bsize = blockDim.x;
  int i= tid + Bsize * blockIdx.x;
  float c = 0.0; // valor a calcular
  
  extern __shared__ float sdata[]; // memoria compartida
  float *sdata_A = sdata; 	   // Puntero al primer valor de A
  float *sdata_B = sdata+Bsize;    // Puntero al primer valor de B
  float *sdata_C = sdata+Bsize*2;  // Puntero al primer valor de C
  float *sdata_C2 = sdata+Bsize*3; // Puntero al primer valor de una copia de C
  

  // Paso a memoria compartida de A y B
  *(sdata_A+tid) = A[i];
  *(sdata_B+tid) = B[i];

  __syncthreads();
  
  /***** Fase del calculo de C (memoria global)  *****/

  int jinicio = blockIdx.x * Bsize;
  int jfin = jinicio + Bsize;
  for (int j = jinicio; j < jfin; j++){ 
     float a = A[j] * i;
     int signo = int(ceil(a))%2 == 0 ? 1 : -1;
     c += a + B[j] * signo;
  }

  C[i] = c;
  *(sdata_C+tid) = c;
  *(sdata_C2+tid) = c;

  __syncthreads();


  /***** Fase del calculo de D (reduccion suma) y mx (reduccion >) *****/
  float n, m;
  for (int s=blockDim.x/2; s>0; s>>=1){
     if (tid < s){
        *(sdata_C+tid) += *(sdata_C+tid+s);
        n = *(sdata_C2+tid);
        m = *(sdata_C2+tid+s);
        *(sdata_C2+tid) = (n > m) ? n : m;
     }
     __syncthreads();
  }

  if (tid == 0){
     D[blockIdx.x] = *(sdata_C);
     mx[blockIdx.x] = *(sdata_C2);
  }
  
}


//**************************************************************************
__global__ void transformacion_kernel_shared(float * A, float * B, float * C,
      float * D, float * mx)
{

  int tid = threadIdx.x;
  int Bsize = blockDim.x;
  int i= tid + Bsize * blockIdx.x;
  float c = 0.0; // valor a calcular

  extern __shared__ float sdata[]; // memoria compartida
  float *sdata_A = sdata;          // Puntero al primer valor de A
  float *sdata_B = sdata+Bsize;    // Puntero al primer valor de B
  float *sdata_C = sdata+Bsize*2;  // Puntero al primer valor de C
  float *sdata_C2 = sdata+Bsize*3; // Puntero al primer valor de una copia de C


  // Paso a memoria compartida de A y B
  *(sdata_A+tid) = A[i];
  *(sdata_B+tid) = B[i];

  __syncthreads();

  /***** Fase del calculo de C (memoria compartida)  *****/

  for (int j = 0; j < Bsize; j++){
     float a =  *(sdata_A+j) * i;
     int signo = int(ceil(a))%2 == 0 ? 1 : -1;
     c += a + *(sdata_B+j) * signo;
  }

  C[i] = c;
  *(sdata_C+tid) = c;
  *(sdata_C2+tid) = c;

  __syncthreads();


  /***** Fase del calculo de D (reduccion suma) y mx (reduccion >) *****/
  float n, m;
  for (int s=blockDim.x/2; s>0; s>>=1){
     if (tid < s){
        *(sdata_C+tid) += *(sdata_C+tid+s);
        n = *(sdata_C2+tid);
        m = *(sdata_C2+tid+s);
        *(sdata_C2+tid) = (n > m) ? n : m;
     }
     __syncthreads();
  }

  if (tid == 0){
     D[blockIdx.x] = *(sdata_C);
     mx[blockIdx.x] = *(sdata_C2);
  }

}

//**************************************************************************
int main(int argc, char *argv[])
//**************************************************************************
{
  //Get GPU information
  int devID;
  hipDeviceProp_t props;
  hipError_t err;
  err = hipGetDevice(&devID);
  if(err != hipSuccess)
	cout << "CUDA GET DEVICE ERROR" << endl;

  hipGetDeviceProperties(&props, devID);
  printf("Device %d: \"%s\" with Compute %d.%d capability\n\n", devID, props.name, props.major, props.minor);

  int Bsize, NBlocks;
  if (argc != 3){ 
	cout << "Uso: transformacion Num_bloques Tam_bloque  "<<endl;
	return(0);
  }else{
	NBlocks = atoi(argv[1]);
   	Bsize= atoi(argv[2]);
  }

  const int N=Bsize*NBlocks;

  // Pointers to memory
  float *h_A, *h_B, *h_C, *h_D, *h_D_global, *h_mx_global, h_mx, *h_D_shared, *h_mx_shared; //host
  float *d_A, *d_B, *d_C, *d_D_global, *d_mx_global, *d_D_shared, *d_mx_shared; // device

  // Allocate arrays a, b, c and d on host
  h_A = new float[N];
  h_B = new float[N];
  h_C = new float[N];
  h_D = new float[NBlocks];
  
  // resultados del kernel de memoria global
  h_D_global = new float[NBlocks];
  h_mx_global= new float[NBlocks];

  // resultados del kernel de memoria compartida
  h_D_shared = new float[NBlocks];
  h_mx_shared = new float[NBlocks];

  // Allocate device memory
  int sizeABC = N*sizeof(float);
  int sizeD = NBlocks*sizeof(float);

  d_A = NULL;
  err = hipMalloc((void **) &d_A, sizeABC);
  if (err != hipSuccess) cout << "ERROR RESERVA A" << endl;
  
  d_B = NULL;
  err = hipMalloc((void **) &d_B, sizeABC);
  if (err != hipSuccess) cout << "ERROR RESERVA B" << endl;

  d_C = NULL;
  err = hipMalloc((void **) &d_C, sizeABC);
  if (err != hipSuccess) cout << "ERROR RESERVA C" << endl;

  d_D_global = NULL;
  err = hipMalloc((void **) &d_D_global, sizeD);
  if (err != hipSuccess) cout << "ERROR RESERVA D (GLOBAL)" << endl;

  d_mx_global = NULL; // array with the maximum of each block of C (device)
  err = hipMalloc((void **) &d_mx_global, sizeD);
  if (err != hipSuccess) cout << "ERROR RESERVA MX (GLOBAL)" << endl;

  d_D_shared = NULL; 
  err = hipMalloc((void **) &d_D_shared, sizeD);
  if (err != hipSuccess) cout << "ERROR RESERVA D (SHARED)" << endl;

  d_mx_shared = NULL;
  err = hipMalloc((void **) &d_mx_shared, sizeD);
  if (err != hipSuccess) cout << "ERROR RESERVA MX (SHARED)" << endl;

  //* Initialize arrays */
  for (int i=0; i<N; i++){ 
	h_A[i]= (float) (1  -(i%100)*0.001);
	h_B[i]= (float) (0.5+(i%10) *0.1  );    
  }

  hipDeviceSetCacheConfig(hipFuncCachePreferShared);






  /*********************** GPU Phase (global memory) ************************/
  double t1 = cpuSecond();

  // copy A and B to device
  err = hipMemcpy(d_A, h_A, sizeABC, hipMemcpyHostToDevice);
  if (err != hipSuccess) cout << "ERROR COPIA A" << endl;

  err = hipMemcpy(d_B, h_B, sizeABC, hipMemcpyHostToDevice);
  if (err != hipSuccess) cout << "ERROR COPIA B" << endl;
  

  dim3 threadsPerBlock(Bsize, 1);
  dim3 numBlocks(NBlocks, 1);
   
  int smemSize = Bsize*4*sizeof(float);
  transformacion_kernel_global<<<numBlocks, threadsPerBlock, smemSize>>>(
       d_A, d_B, d_C, d_D_global, d_mx_global);

  hipMemcpy(h_D_global, d_D_global, NBlocks*sizeof(float), hipMemcpyDeviceToHost);
  hipMemcpy(h_mx_global, d_mx_global, NBlocks*sizeof(float), hipMemcpyDeviceToHost);

  float mx_global_final = h_mx_global[0];
  hipDeviceSynchronize();

  // final reduction on CPU
  for (int k = 1; k<NBlocks; k++)
     mx_global_final = (mx_global_final > h_mx_global[k]) ? mx_global_final : h_mx_global[k];

  double tgpu_global=cpuSecond()-t1;
  






  /********************** GPU Phase (shared memory) **********************/

  t1 = cpuSecond();

  // copy A and B to device
  //err = cudaMemcpy(d_A, h_A, sizeABC, cudaMemcpyHostToDevice);
  //if (err != cudaSuccess) cout << "ERROR COPIA A" << endl;

  //err = cudaMemcpy(d_B, h_B, sizeABC, cudaMemcpyHostToDevice);
  //if (err != cudaSuccess) cout << "ERROR COPIA B" << endl;

  smemSize = Bsize*4*sizeof(float);
  transformacion_kernel_shared<<<numBlocks, threadsPerBlock, smemSize>>>(
       d_A, d_B, d_C, d_D_shared, d_mx_shared);

  hipMemcpy(h_D_shared, d_D_shared, NBlocks*sizeof(float), hipMemcpyDeviceToHost);
  hipMemcpy(h_mx_shared, d_mx_shared, NBlocks*sizeof(float), hipMemcpyDeviceToHost);

  float mx_shared_final = h_mx_shared[0];
  hipDeviceSynchronize();

  // final reduction on CPU
  for (int k = 1; k<NBlocks; k++)
     mx_shared_final = (mx_shared_final > h_mx_shared[k]) ? mx_shared_final : h_mx_shared[k];

  double tgpu_shared=cpuSecond()-t1;









  /******************************* CPU Phase *****************************/
  // Time measurement  
  t1=cpuSecond();
  
  // Compute C[i], d[K] and mx
  for (int k=0; k<NBlocks;k++)
  { 
	int istart=k*Bsize;
  	int iend  =istart+Bsize;
  	h_D[k]=0.0;
  	for (int i=istart; i<iend;i++){ 
	   h_C[i]=0.0;
    	   for (int j=istart; j<iend;j++){
	   	float a=h_A[j]*i;
       		if ((int)ceil(a) % 2 ==0)
		   h_C[i]+= a + h_B[j];
       		else
 	   	   h_C[i]+= a - h_B[j];
     	   }

   	   h_D[k]+=h_C[i];
   	   h_mx= (i==1) ? h_C[0] : max(h_C[i],h_mx);
  	}
  }

  double tsec=cpuSecond()-t1;
  



  /********************** RESULTADOS ***************************/

  //for (int i=0; i<N;i++)   cout<<"C["<<i<<"]="<<h_C[i]<<endl;
  /*cout<<"................................."<<endl;
  for (int k=0; k<NBlocks;k++){
	cout<<"D["<<k<<"]="<<h_D[k]<<endl;
	cout<<"D_global["<<k<<"]="<<h_D_global[k]<<endl;
	cout<<"D_shared["<<k<<"]="<<h_D_shared[k]<<endl;
  }*/
  cout<<"................................."<<endl<<"El valor máximo en C (sec) es: "<<h_mx<<endl;
  cout<<"................................."<<endl<<"El valor máximo en C (gpu global) es: "<<mx_global_final<<endl;
  cout<<"................................."<<endl<<"El valor máximo en C (gpu shared) es: "<<mx_shared_final << endl;
  cout << endl << "N=" << N << "= " << Bsize << "*" << NBlocks << endl;
  cout << "Tiempo gastado CPU= " << tsec << endl;
  cout << "Tiempo gastado GPU (mem global)= " << tgpu_global << endl;
  cout << "Tiempo gastado GPU (mem compartida)= " << tgpu_shared << endl;

  cout << endl << "Ganancia mem global = " << tsec/tgpu_global << endl;
  cout << "Ganancia mem compartida = " << tsec/tgpu_shared << endl;

  // Free host memory
  delete [] h_A; 
  delete [] h_B; 
  delete [] h_C;
  delete [] h_D;
  delete [] h_D_global;
  delete [] h_mx_global;
  delete [] h_D_shared;
  delete [] h_mx_shared;

  // Free device memory
  hipFree(d_A);
  hipFree(d_B);
  hipFree(d_C);
  hipFree(d_mx_global);
  hipFree(d_mx_shared);
  hipFree(d_D_global);
  hipFree(d_D_shared);
}

	.text
	.file	"transformacion.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z9cpuSecondv
.LCPI0_0:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z9cpuSecondv
	.type	_Z9cpuSecondv,@function
_Z9cpuSecondv:                          # @_Z9cpuSecondv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	cvtsi2sdq	(%rbx), %xmm1
	cvtsi2sdq	8(%rbx), %xmm0
	mulsd	.LCPI0_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z9cpuSecondv, .Lfunc_end0-_Z9cpuSecondv
	.cfi_endproc
                                        # -- End function
	.globl	_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_ # -- Begin function _Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_
	.type	_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_,@function
_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_: # @_Z43__device_stub__transformacion_kernel_globalPfS_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	$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	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z28transformacion_kernel_globalPfS_S_S_S_, %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	_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_, .Lfunc_end1-_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_
	.cfi_endproc
                                        # -- End function
	.globl	_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_ # -- Begin function _Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_
	.type	_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_,@function
_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_: # @_Z43__device_stub__transformacion_kernel_sharedPfS_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	$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	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movq	%rcx, (%rdx)
	leaq	24(%rsp), %rcx
	movq	%r8, (%rcx)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z28transformacion_kernel_sharedPfS_S_S_S_, %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_end2:
	.size	_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_, .Lfunc_end2-_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI3_0:
	.quad	0xbf50624dd2f1a9fc              # double -0.001
.LCPI3_1:
	.quad	0x3ff0000000000000              # double 1
.LCPI3_2:
	.quad	0x3fb999999999999a              # double 0.10000000000000001
.LCPI3_3:
	.quad	0x3fe0000000000000              # double 0.5
.LCPI3_4:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI3_5:
	.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	$1752, %rsp                     # imm = 0x6D8
	.cfi_def_cfa_offset 1808
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%rsi, %rbx
	movl	%edi, %ebp
	leaq	52(%rsp), %rdi
	callq	hipGetDevice
	testl	%eax, %eax
	je	.LBB3_2
# %bb.1:
	movl	$_ZSt4cout, %r14d
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$21, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_2:
	movl	52(%rsp), %esi
	leaq	280(%rsp), %r14
	movq	%r14, %rdi
	callq	hipGetDevicePropertiesR0600
	movl	52(%rsp), %esi
	movl	360(%r14), %ecx
	movl	364(%r14), %r8d
	movl	$.L.str.1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	printf
	cmpl	$3, %ebp
	jne	.LBB3_3
# %bb.5:
	movq	8(%rbx), %rdi
	callq	atoi
	movl	%eax, %r13d
	movq	16(%rbx), %rdi
	callq	atoi
	movl	%eax, 32(%rsp)                  # 4-byte Spill
	imull	%r13d, %eax
	movl	%eax, 36(%rsp)                  # 4-byte Spill
	movslq	%eax, %rbp
	leaq	(,%rbp,4), %r15
	testl	%ebp, %ebp
	movq	$-1, %r12
	cmovsq	%r12, %r15
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, 192(%rsp)                 # 8-byte Spill
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, 64(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, 104(%rsp)                 # 8-byte Spill
	movl	%r13d, 28(%rsp)                 # 4-byte Spill
	movslq	%r13d, %r13
	leaq	(,%r13,4), %rax
	testl	%r13d, %r13d
	movq	%rax, 72(%rsp)                  # 8-byte Spill
	cmovnsq	%rax, %r12
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, 224(%rsp)                 # 8-byte Spill
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, 216(%rsp)                 # 8-byte Spill
	movq	%r12, %rdi
	callq	_Znam
	movq	%rax, %r12
	shll	$2, %ebp
	leaq	88(%rsp), %rdi
	movq	$0, (%rdi)
	movslq	%ebp, %r15
	movq	%r15, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB3_7
# %bb.6:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.3, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_7:
	leaq	80(%rsp), %rdi
	movq	$0, (%rdi)
	movq	%r15, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB3_9
# %bb.8:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.4, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_9:
	leaq	176(%rsp), %rdi
	movq	$0, (%rdi)
	movq	%r15, 8(%rsp)                   # 8-byte Spill
	movq	%r15, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	movq	64(%rsp), %rbp                  # 8-byte Reload
	je	.LBB3_11
# %bb.10:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_11:
	leaq	168(%rsp), %rdi
	movq	$0, (%rdi)
	shlq	$34, %r13
	sarq	$32, %r13
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	movq	192(%rsp), %r15                 # 8-byte Reload
	je	.LBB3_13
# %bb.12:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.6, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_13:
	leaq	160(%rsp), %rdi
	movq	$0, (%rdi)
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB3_15
# %bb.14:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.7, %esi
	movl	$25, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_15:
	leaq	152(%rsp), %rdi
	movq	$0, (%rdi)
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB3_17
# %bb.16:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_17:
	leaq	144(%rsp), %rdi
	movq	$0, (%rdi)
	movq	%r13, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB3_19
# %bb.18:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.9, %esi
	movl	$25, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_19:
	movq	%r12, 208(%rsp)                 # 8-byte Spill
	cmpl	$0, 36(%rsp)                    # 4-byte Folded Reload
	movl	28(%rsp), %r13d                 # 4-byte Reload
	jle	.LBB3_22
# %bb.20:                               # %.lr.ph.preheader
	movl	36(%rsp), %eax                  # 4-byte Reload
	xorl	%ecx, %ecx
	movl	$3435973837, %edx               # imm = 0xCCCCCCCD
	movsd	.LCPI3_0(%rip), %xmm0           # xmm0 = mem[0],zero
	movsd	.LCPI3_1(%rip), %xmm1           # xmm1 = mem[0],zero
	movsd	.LCPI3_2(%rip), %xmm2           # xmm2 = mem[0],zero
	movsd	.LCPI3_3(%rip), %xmm3           # xmm3 = mem[0],zero
.LBB3_21:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	%ecx, %esi
	imulq	$1374389535, %rsi, %rdi         # imm = 0x51EB851F
	imulq	%rdx, %rsi
	shrq	$35, %rsi
	addl	%esi, %esi
	leal	(%rsi,%rsi,4), %esi
	movl	%ecx, %r8d
	subl	%esi, %r8d
	shrq	$37, %rdi
	imull	$100, %edi, %esi
	movl	%ecx, %edi
	subl	%esi, %edi
	xorps	%xmm4, %xmm4
	cvtsi2sd	%edi, %xmm4
	mulsd	%xmm0, %xmm4
	addsd	%xmm1, %xmm4
	cvtsd2ss	%xmm4, %xmm4
	xorps	%xmm5, %xmm5
	cvtsi2sd	%r8d, %xmm5
	mulsd	%xmm2, %xmm5
	addsd	%xmm3, %xmm5
	cvtsd2ss	%xmm5, %xmm5
	movss	%xmm4, (%r15,%rcx,4)
	movss	%xmm5, (%rbp,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB3_21
.LBB3_22:                               # %._crit_edge
	movl	$1, %edi
	callq	hipDeviceSetCacheConfig
	leaq	232(%rsp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r12), %xmm0
	movsd	%xmm0, 136(%rsp)                # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r12), %xmm0
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	movq	88(%rsp), %rdi
	movq	%r15, %rsi
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB3_24
# %bb.23:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_24:
	movq	80(%rsp), %rdi
	movq	%rbp, %rsi
	movq	8(%rsp), %rdx                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	movq	208(%rsp), %r12                 # 8-byte Reload
	je	.LBB3_26
# %bb.25:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$13, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB3_26:
	movl	32(%rsp), %eax                  # 4-byte Reload
	movl	%eax, %edx
	btsq	$32, %rdx
	movl	%r13d, %ecx
	movq	%rcx, 96(%rsp)                  # 8-byte Spill
	movq	%rcx, %rdi
	btsq	$32, %rdi
	shll	$4, %eax
	movslq	%eax, %r8
	movq	%rdi, %r15
	movl	$1, %esi
	movq	%rdx, %rbp
	movl	$1, %ecx
	movq	%r8, 128(%rsp)                  # 8-byte Spill
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB3_28
# %bb.27:
	movq	88(%rsp), %rdi
	movq	80(%rsp), %rsi
	movq	176(%rsp), %rdx
	movq	168(%rsp), %rcx
	movq	160(%rsp), %r8
	callq	_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_
.LBB3_28:
	movq	168(%rsp), %rsi
	movq	224(%rsp), %rdi                 # 8-byte Reload
	movq	72(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	160(%rsp), %rsi
	movq	56(%rsp), %r14                  # 8-byte Reload
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movss	(%r14), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	callq	hipDeviceSynchronize
	cmpl	$2, %r13d
	jl	.LBB3_29
# %bb.36:                               # %.lr.ph192.preheader
	movl	$1, %eax
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movq	96(%rsp), %rcx                  # 8-byte Reload
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movq	%rbp, %rbx
	movq	56(%rsp), %rbp                  # 8-byte Reload
.LBB3_37:                               # %.lr.ph192
                                        # =>This Inner Loop Header: Depth=1
	maxss	(%rbp,%rax,4), %xmm0
	incq	%rax
	cmpq	%rax, %rcx
	jne	.LBB3_37
	jmp	.LBB3_30
.LBB3_3:
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$44, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	jmp	.LBB3_4
.LBB3_29:
	movss	24(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movsd	(%rsp), %xmm1                   # 8-byte Reload
                                        # xmm1 = mem[0],zero
	movq	%rbp, %rbx
	movq	56(%rsp), %rbp                  # 8-byte Reload
.LBB3_30:                               # %._crit_edge193
	movss	%xmm0, 24(%rsp)                 # 4-byte Spill
	mulsd	.LCPI3_4(%rip), %xmm1
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	leaq	232(%rsp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r13), %xmm0
	movsd	%xmm0, 120(%rsp)                # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r13), %xmm0
	mulsd	.LCPI3_4(%rip), %xmm0
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	leaq	232(%rsp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r13), %xmm0
	movsd	%xmm0, 112(%rsp)                # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r13), %xmm0
	mulsd	.LCPI3_4(%rip), %xmm0
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	$1, %ecx
	movq	128(%rsp), %r8                  # 8-byte Reload
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	movq	192(%rsp), %r14                 # 8-byte Reload
	jne	.LBB3_32
# %bb.31:
	movq	88(%rsp), %rdi
	movq	80(%rsp), %rsi
	movq	176(%rsp), %rdx
	movq	152(%rsp), %rcx
	movq	144(%rsp), %r8
	callq	_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_
.LBB3_32:
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	136(%rsp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	120(%rsp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	addsd	112(%rsp), %xmm0                # 8-byte Folded Reload
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	152(%rsp), %rsi
	movq	216(%rsp), %rdi                 # 8-byte Reload
	movq	72(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	144(%rsp), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movss	(%r12), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 20(%rsp)                 # 4-byte Spill
	callq	hipDeviceSynchronize
	cmpl	$2, 28(%rsp)                    # 4-byte Folded Reload
	jl	.LBB3_33
# %bb.38:                               # %.lr.ph197.preheader
	movl	$1, %eax
	movss	20(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	movq	96(%rsp), %rcx                  # 8-byte Reload
.LBB3_39:                               # %.lr.ph197
                                        # =>This Inner Loop Header: Depth=1
	maxss	(%r12,%rax,4), %xmm0
	incq	%rax
	cmpq	%rax, %rcx
	jne	.LBB3_39
	jmp	.LBB3_34
.LBB3_33:
	movss	20(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
.LBB3_34:                               # %._crit_edge198
	movss	%xmm0, 20(%rsp)                 # 4-byte Spill
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	subsd	(%rsp), %xmm0                   # 8-byte Folded Reload
	movsd	%xmm0, 40(%rsp)                 # 8-byte Spill
	xorl	%r15d, %r15d
	leaq	232(%rsp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r13), %xmm0
	cvtsi2sdq	8(%r13), %xmm1
	movsd	.LCPI3_4(%rip), %xmm2           # xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	subsd	8(%rsp), %xmm1                  # 8-byte Folded Reload
	movsd	%xmm1, 200(%rsp)                # 8-byte Spill
	leaq	232(%rsp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r13), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%r13), %xmm1
	mulsd	.LCPI3_4(%rip), %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 248(%rsp)                # 8-byte Spill
	cmpl	$0, 28(%rsp)                    # 4-byte Folded Reload
	jle	.LBB3_35
# %bb.42:                               # %.lr.ph220.preheader
	movq	%r14, %rbp
	movabsq	$4294967296, %r13               # imm = 0x100000000
	movl	32(%rsp), %eax                  # 4-byte Reload
	movslq	%eax, %rcx
	movq	%rcx, 256(%rsp)                 # 8-byte Spill
	xorl	%r12d, %r12d
                                        # implicit-def: $xmm0
	movq	104(%rsp), %rcx                 # 8-byte Reload
.LBB3_43:                               # %.lr.ph220
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_45 Depth 2
                                        #       Child Loop BB3_46 Depth 3
	movl	%r15d, %r15d
	incq	%r12
	testl	%eax, %eax
	movq	%r15, 272(%rsp)                 # 8-byte Spill
	movq	%r12, 264(%rsp)                 # 8-byte Spill
	jle	.LBB3_50
# %bb.44:                               #   in Loop: Header=BB3_43 Depth=1
	leaq	(,%r15,4), %rax
	movq	%rax, 120(%rsp)                 # 8-byte Spill
	movq	%r15, %rax
	shlq	$32, %rax
	addq	%r13, %rax
	movq	%rax, 112(%rsp)                 # 8-byte Spill
	imulq	256(%rsp), %r12                 # 8-byte Folded Reload
.LBB3_45:                               # %.lr.ph202
                                        #   Parent Loop BB3_43 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB3_46 Depth 3
	movss	%xmm0, 136(%rsp)                # 4-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	movss	%xmm0, 72(%rsp)                 # 4-byte Spill
	leaq	(%rcx,%r15,4), %rax
	movq	%rax, 128(%rsp)                 # 8-byte Spill
	xorpd	%xmm1, %xmm1
	movq	112(%rsp), %rbx                 # 8-byte Reload
	movq	120(%rsp), %r14                 # 8-byte Reload
.LBB3_46:                               #   Parent Loop BB3_43 Depth=1
                                        #     Parent Loop BB3_45 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movss	%xmm1, (%rsp)                   # 4-byte Spill
	movss	(%rbp,%r14), %xmm0              # xmm0 = mem[0],zero,zero,zero
	mulss	72(%rsp), %xmm0                 # 4-byte Folded Reload
	movss	%xmm0, 8(%rsp)                  # 4-byte Spill
	callq	ceilf@PLT
	cvttss2si	%xmm0, %eax
	movq	64(%rsp), %rcx                  # 8-byte Reload
	movss	(%rcx,%r14), %xmm0              # xmm0 = mem[0],zero,zero,zero
	testb	$1, %al
	je	.LBB3_48
# %bb.47:                               #   in Loop: Header=BB3_46 Depth=3
	xorps	.LCPI3_5(%rip), %xmm0
.LBB3_48:                               #   in Loop: Header=BB3_46 Depth=3
	movss	(%rsp), %xmm1                   # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movss	8(%rsp), %xmm2                  # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm2
	addss	%xmm2, %xmm1
	movq	%rbx, %rax
	sarq	$32, %rax
	addq	$4, %r14
	addq	%r13, %rbx
	cmpq	%r12, %rax
	jl	.LBB3_46
# %bb.49:                               # %._crit_edge203
                                        #   in Loop: Header=BB3_45 Depth=2
	movss	136(%rsp), %xmm0                # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	movq	104(%rsp), %rcx                 # 8-byte Reload
	movss	%xmm1, (%rcx,%r15,4)
	leaq	188(%rsp), %rax
	movq	128(%rsp), %rdx                 # 8-byte Reload
	cmovaq	%rax, %rdx
	cmpq	$1, %r15
	cmoveq	%rcx, %rdx
	movss	(%rdx), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 188(%rsp)
	incq	%r15
	movslq	%r15d, %rax
	cmpq	%r12, %rax
	jl	.LBB3_45
.LBB3_50:                               # %._crit_edge211
                                        #   in Loop: Header=BB3_43 Depth=1
	movl	32(%rsp), %eax                  # 4-byte Reload
	movq	272(%rsp), %r15                 # 8-byte Reload
	addl	%eax, %r15d
	movq	264(%rsp), %r12                 # 8-byte Reload
	cmpq	96(%rsp), %r12                  # 8-byte Folded Reload
	jne	.LBB3_43
# %bb.40:                               # %._crit_edge221.loopexit
	cvtss2sd	%xmm0, %xmm0
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	%rbp, %r14
	movq	64(%rsp), %rbx                  # 8-byte Reload
	movq	56(%rsp), %rbp                  # 8-byte Reload
	jmp	.LBB3_41
.LBB3_35:
                                        # implicit-def: $xmm0
                                        # kill: killed $xmm0
	movq	64(%rsp), %rbx                  # 8-byte Reload
.LBB3_41:                               # %._crit_edge221
	leaq	232(%rsp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm0, %xmm0
	cvtsi2sdq	(%r12), %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	8(%r12), %xmm1
	mulsd	.LCPI3_4(%rip), %xmm1
	addsd	%xmm0, %xmm1
	subsd	248(%rsp), %xmm1                # 8-byte Folded Reload
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	movl	$_ZSt4cout, %r13d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$33, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%rax, %r12
	movl	$.L.str.13, %esi
	movl	$32, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%r12, %rdi
	movsd	8(%rsp), %xmm0                  # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$33, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%rax, %r12
	movl	$.L.str.14, %esi
	movl	$39, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorps	%xmm0, %xmm0
	cvtss2sd	24(%rsp), %xmm0                 # 4-byte Folded Reload
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$33, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%rax, %r12
	movl	$.L.str.15, %esi
	movl	$39, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	xorps	%xmm0, %xmm0
	cvtss2sd	20(%rsp), %xmm0                 # 4-byte Folded Reload
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%rax, %r12
	movl	$.L.str.16, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%r12, %rdi
	movl	36(%rsp), %esi                  # 4-byte Reload
	callq	_ZNSolsEi
	movq	%rax, %r12
	movl	$.L.str.17, %esi
	movl	$2, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%r12, %rdi
	movl	32(%rsp), %esi                  # 4-byte Reload
	callq	_ZNSolsEi
	movq	%rax, %r12
	movl	$.L.str.18, %esi
	movl	$1, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%r12, %rdi
	movl	28(%rsp), %esi                  # 4-byte Reload
	callq	_ZNSolsEi
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.19, %esi
	movl	$20, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.20, %esi
	movl	$33, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movsd	40(%rsp), %xmm0                 # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.21, %esi
	movl	$37, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movsd	200(%rsp), %xmm0                # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r13, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%rax, %r12
	movl	$.L.str.22, %esi
	movl	$22, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	divsd	40(%rsp), %xmm0                 # 8-byte Folded Reload
	movq	%r12, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.23, %esi
	movl	$26, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	divsd	200(%rsp), %xmm0                # 8-byte Folded Reload
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%r14, %rdi
	callq	_ZdaPv
	movq	%rbx, %rdi
	callq	_ZdaPv
	movq	104(%rsp), %rdi                 # 8-byte Reload
	callq	_ZdaPv
	movq	224(%rsp), %rdi                 # 8-byte Reload
	callq	_ZdaPv
	movq	%rbp, %rdi
	callq	_ZdaPv
	movq	216(%rsp), %rdi                 # 8-byte Reload
	callq	_ZdaPv
	movq	208(%rsp), %rdi                 # 8-byte Reload
	callq	_ZdaPv
	movq	88(%rsp), %rdi
	callq	hipFree
	movq	80(%rsp), %rdi
	callq	hipFree
	movq	176(%rsp), %rdi
	callq	hipFree
	movq	160(%rsp), %rdi
	callq	hipFree
	movq	144(%rsp), %rdi
	callq	hipFree
	movq	168(%rsp), %rdi
	callq	hipFree
	movq	152(%rsp), %rdi
	callq	hipFree
.LBB3_4:
	xorl	%eax, %eax
	addq	$1752, %rsp                     # imm = 0x6D8
	.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	$_Z28transformacion_kernel_globalPfS_S_S_S_, %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	$_Z28transformacion_kernel_sharedPfS_S_S_S_, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %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	_Z28transformacion_kernel_globalPfS_S_S_S_,@object # @_Z28transformacion_kernel_globalPfS_S_S_S_
	.section	.rodata,"a",@progbits
	.globl	_Z28transformacion_kernel_globalPfS_S_S_S_
	.p2align	3, 0x0
_Z28transformacion_kernel_globalPfS_S_S_S_:
	.quad	_Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_
	.size	_Z28transformacion_kernel_globalPfS_S_S_S_, 8

	.type	_Z28transformacion_kernel_sharedPfS_S_S_S_,@object # @_Z28transformacion_kernel_sharedPfS_S_S_S_
	.globl	_Z28transformacion_kernel_sharedPfS_S_S_S_
	.p2align	3, 0x0
_Z28transformacion_kernel_sharedPfS_S_S_S_:
	.quad	_Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_
	.size	_Z28transformacion_kernel_sharedPfS_S_S_S_, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"CUDA GET DEVICE ERROR"
	.size	.L.str, 22

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Device %d: \"%s\" with Compute %d.%d capability\n\n"
	.size	.L.str.1, 48

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Uso: transformacion Num_bloques Tam_bloque  "
	.size	.L.str.2, 45

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"ERROR RESERVA A"
	.size	.L.str.3, 16

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"ERROR RESERVA B"
	.size	.L.str.4, 16

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"ERROR RESERVA C"
	.size	.L.str.5, 16

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"ERROR RESERVA D (GLOBAL)"
	.size	.L.str.6, 25

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"ERROR RESERVA MX (GLOBAL)"
	.size	.L.str.7, 26

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"ERROR RESERVA D (SHARED)"
	.size	.L.str.8, 25

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"ERROR RESERVA MX (SHARED)"
	.size	.L.str.9, 26

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"ERROR COPIA A"
	.size	.L.str.10, 14

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"ERROR COPIA B"
	.size	.L.str.11, 14

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"................................."
	.size	.L.str.12, 34

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"El valor m\303\241ximo en C (sec) es: "
	.size	.L.str.13, 33

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"El valor m\303\241ximo en C (gpu global) es: "
	.size	.L.str.14, 40

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"El valor m\303\241ximo en C (gpu shared) es: "
	.size	.L.str.15, 40

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"N="
	.size	.L.str.16, 3

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"= "
	.size	.L.str.17, 3

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"*"
	.size	.L.str.18, 2

	.type	.L.str.19,@object               # @.str.19
.L.str.19:
	.asciz	"Tiempo gastado CPU= "
	.size	.L.str.19, 21

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"Tiempo gastado GPU (mem global)= "
	.size	.L.str.20, 34

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"Tiempo gastado GPU (mem compartida)= "
	.size	.L.str.21, 38

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"Ganancia mem global = "
	.size	.L.str.22, 23

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"Ganancia mem compartida = "
	.size	.L.str.23, 27

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z28transformacion_kernel_globalPfS_S_S_S_"
	.size	.L__unnamed_1, 43

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z28transformacion_kernel_sharedPfS_S_S_S_"
	.size	.L__unnamed_2, 43

	.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

	.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 _Z43__device_stub__transformacion_kernel_globalPfS_S_S_S_
	.addrsig_sym _Z43__device_stub__transformacion_kernel_sharedPfS_S_S_S_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z28transformacion_kernel_globalPfS_S_S_S_
	.addrsig_sym _Z28transformacion_kernel_sharedPfS_S_S_S_
	.addrsig_sym _ZSt4cout
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z28transformacion_kernel_globalPfS_S_S_S_ ; -- Begin function _Z28transformacion_kernel_globalPfS_S_S_S_
	.globl	_Z28transformacion_kernel_globalPfS_S_S_S_
	.p2align	8
	.type	_Z28transformacion_kernel_globalPfS_S_S_S_,@function
_Z28transformacion_kernel_globalPfS_S_S_S_: ; @_Z28transformacion_kernel_globalPfS_S_S_S_
; %bb.0:
	s_clause 0x2
	s_load_b32 s3, s[0:1], 0x34
	s_load_b256 s[4:11], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x20
	s_mov_b32 s2, s15
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_4) | instid1(VALU_DEP_1)
	s_mul_i32 s12, s15, s3
	s_lshl_b32 s14, s3, 2
	v_add_nc_u32_e32 v3, s12, v0
	s_add_i32 s15, s14, 0
	s_cmp_eq_u32 s3, 0
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[3:4]
	v_add_co_u32 v4, vcc_lo, s4, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v2, vcc_lo
	v_add_co_u32 v6, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v7, vcc_lo, s7, v2, vcc_lo
	global_load_b32 v5, v[4:5], off
	global_load_b32 v6, v[6:7], off
	v_lshlrev_b32_e32 v4, 2, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v7, 0, v4
	v_add_nc_u32_e32 v8, s15, v4
	s_waitcnt vmcnt(1)
	ds_store_b32 v7, v5
	s_waitcnt vmcnt(0)
	ds_store_b32 v8, v6
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_3
; %bb.1:                                ; %.lr.ph
	s_ashr_i32 s13, s12, 31
	s_add_i32 s16, s12, s3
	s_lshl_b64 s[18:19], s[12:13], 2
	v_cvt_f32_i32_e32 v5, v3
	s_add_u32 s4, s4, s18
	v_mov_b32_e32 v3, 0
	s_addc_u32 s5, s5, s19
	s_add_u32 s6, s6, s18
	s_addc_u32 s7, s7, s19
.LBB0_2:                                ; =>This Inner Loop Header: Depth=1
	s_load_b32 s13, s[4:5], 0x0
	s_add_i32 s12, s12, 1
	s_add_u32 s4, s4, 4
	s_addc_u32 s5, s5, 0
	s_waitcnt lgkmcnt(0)
	v_mul_f32_e32 v6, s13, v5
	s_load_b32 s13, s[6:7], 0x0
	s_add_u32 s6, s6, 4
	s_addc_u32 s7, s7, 0
	s_cmp_ge_i32 s12, s16
	v_ceil_f32_e32 v7, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_i32_f32_e32 v7, v7
	v_and_b32_e32 v7, 1, v7
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cmp_eq_u32_e32 vcc_lo, 0, v7
	v_cndmask_b32_e64 v7, -1, 1, vcc_lo
	v_cvt_f32_i32_e32 v7, v7
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v6, s13, v7
	v_add_f32_e32 v3, v3, v6
	s_cbranch_scc0 .LBB0_2
	s_branch .LBB0_4
.LBB0_3:
	v_mov_b32_e32 v3, 0
.LBB0_4:                                ; %._crit_edge
	s_add_i32 s5, s15, s14
	v_add_co_u32 v5, vcc_lo, s8, v1
	s_add_i32 s4, s5, s14
	v_add_co_ci_u32_e32 v6, vcc_lo, s9, v2, vcc_lo
	v_add_nc_u32_e32 v1, s5, v4
	v_add_nc_u32_e32 v2, s4, v4
	s_cmp_lt_u32 s3, 2
	global_store_b32 v[5:6], v3, off
	ds_store_b32 v1, v3
	ds_store_b32 v2, v3
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
.LBB0_5:                                ; %._crit_edge
                                        ; =>This Inner Loop Header: Depth=1
	buffer_gl0_inv
	s_cbranch_scc1 .LBB0_9
; %bb.6:                                ; %.lr.ph75
                                        ;   in Loop: Header=BB0_5 Depth=1
	s_lshr_b32 s6, s3, 1
	s_mov_b32 s7, exec_lo
	v_cmpx_gt_u32_e64 s6, v0
	s_cbranch_execz .LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	s_lshl_b32 s8, s6, 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_nc_u32_e32 v3, s8, v1
	ds_load_b32 v3, v3
	ds_load_b32 v4, v1
	s_waitcnt lgkmcnt(0)
	v_dual_add_f32 v3, v3, v4 :: v_dual_add_nc_u32 v4, s8, v2
	ds_store_b32 v1, v3
	ds_load_b32 v3, v2
	ds_load_b32 v4, v4
	s_waitcnt lgkmcnt(0)
	v_cmp_gt_f32_e32 vcc_lo, v3, v4
	v_cndmask_b32_e32 v3, v4, v3, vcc_lo
	ds_store_b32 v2, v3
.LBB0_8:                                ;   in Loop: Header=BB0_5 Depth=1
	s_or_b32 exec_lo, exec_lo, s7
	s_waitcnt lgkmcnt(0)
	s_barrier
	s_cmp_lt_u32 s3, 4
	s_mov_b32 s3, s6
	s_branch .LBB0_5
.LBB0_9:                                ; %._crit_edge76
	s_mov_b32 s3, 0
	s_mov_b32 s6, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB0_11
; %bb.10:
	v_dual_mov_b32 v0, s5 :: v_dual_mov_b32 v1, s4
	s_lshl_b64 s[2:3], s[2:3], 2
	v_mov_b32_e32 v2, 0
	s_add_u32 s0, s0, s2
	ds_load_b32 v0, v0
	ds_load_b32 v1, v1
	s_addc_u32 s1, s1, s3
	s_add_u32 s2, s10, s2
	s_addc_u32 s3, s11, s3
	s_waitcnt lgkmcnt(1)
	global_store_b32 v2, v0, s[2:3]
	s_waitcnt lgkmcnt(0)
	global_store_b32 v2, v1, s[0:1]
.LBB0_11:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z28transformacion_kernel_globalPfS_S_S_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 20
		.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	_Z28transformacion_kernel_globalPfS_S_S_S_, .Lfunc_end0-_Z28transformacion_kernel_globalPfS_S_S_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 644
; NumSgprs: 22
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 22
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z28transformacion_kernel_sharedPfS_S_S_S_ ; -- Begin function _Z28transformacion_kernel_sharedPfS_S_S_S_
	.globl	_Z28transformacion_kernel_sharedPfS_S_S_S_
	.p2align	8
	.type	_Z28transformacion_kernel_sharedPfS_S_S_S_,@function
_Z28transformacion_kernel_sharedPfS_S_S_S_: ; @_Z28transformacion_kernel_sharedPfS_S_S_S_
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x34
	s_load_b256 s[4:11], s[0:1], 0x0
	s_mov_b32 s2, s15
	s_load_b64 s[0:1], s[0:1], 0x20
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[3:4], null, s2, s3, v[0:1]
	v_ashrrev_i32_e32 v4, 31, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[3:4]
	v_add_co_u32 v4, vcc_lo, s4, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v5, vcc_lo, s5, v2, vcc_lo
	v_add_co_u32 v6, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v7, vcc_lo, s7, v2, vcc_lo
	s_lshl_b32 s4, s3, 2
	global_load_b32 v5, v[4:5], off
	global_load_b32 v6, v[6:7], off
	v_lshlrev_b32_e32 v4, 2, v0
	s_add_i32 s5, s4, 0
	s_mov_b32 s6, 0
	s_cmp_eq_u32 s3, 0
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v7, 0, v4
	v_add_nc_u32_e32 v8, s5, v4
	s_waitcnt vmcnt(1)
	ds_store_b32 v7, v5
	s_waitcnt vmcnt(0)
	ds_store_b32 v8, v6
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_3
; %bb.1:                                ; %.lr.ph
	v_cvt_f32_i32_e32 v5, v3
	v_mov_b32_e32 v3, 0
.LBB1_2:                                ; =>This Inner Loop Header: Depth=1
	s_add_i32 s7, s6, 0
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mov_b32_e32 v6, s7
	s_add_i32 s7, s5, s6
	s_add_i32 s6, s6, 4
	v_mov_b32_e32 v7, s7
	s_cmp_eq_u32 s4, s6
	ds_load_b32 v6, v6
	ds_load_b32 v7, v7
	s_waitcnt lgkmcnt(1)
	v_mul_f32_e32 v6, v6, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ceil_f32_e32 v8, v6
	v_cvt_i32_f32_e32 v8, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_and_b32_e32 v8, 1, v8
	v_cmp_eq_u32_e32 vcc_lo, 0, v8
	v_cndmask_b32_e64 v8, -1, 1, vcc_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cvt_f32_i32_e32 v8, v8
	s_waitcnt lgkmcnt(0)
	v_fmac_f32_e32 v6, v7, v8
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v3, v3, v6
	s_cbranch_scc0 .LBB1_2
	s_branch .LBB1_4
.LBB1_3:
	v_mov_b32_e32 v3, 0
.LBB1_4:                                ; %._crit_edge
	s_add_i32 s5, s5, s4
	v_add_co_u32 v5, vcc_lo, s8, v1
	s_add_i32 s4, s5, s4
	v_add_co_ci_u32_e32 v6, vcc_lo, s9, v2, vcc_lo
	v_add_nc_u32_e32 v1, s5, v4
	v_add_nc_u32_e32 v2, s4, v4
	s_cmp_lt_u32 s3, 2
	global_store_b32 v[5:6], v3, off
	ds_store_b32 v1, v3
	ds_store_b32 v2, v3
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
.LBB1_5:                                ; %._crit_edge
                                        ; =>This Inner Loop Header: Depth=1
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_9
; %bb.6:                                ; %.lr.ph71
                                        ;   in Loop: Header=BB1_5 Depth=1
	s_lshr_b32 s6, s3, 1
	s_mov_b32 s7, exec_lo
	v_cmpx_gt_u32_e64 s6, v0
	s_cbranch_execz .LBB1_8
; %bb.7:                                ;   in Loop: Header=BB1_5 Depth=1
	s_lshl_b32 s8, s6, 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add_nc_u32_e32 v3, s8, v1
	ds_load_b32 v3, v3
	ds_load_b32 v4, v1
	s_waitcnt lgkmcnt(0)
	v_dual_add_f32 v3, v3, v4 :: v_dual_add_nc_u32 v4, s8, v2
	ds_store_b32 v1, v3
	ds_load_b32 v3, v2
	ds_load_b32 v4, v4
	s_waitcnt lgkmcnt(0)
	v_cmp_gt_f32_e32 vcc_lo, v3, v4
	v_cndmask_b32_e32 v3, v4, v3, vcc_lo
	ds_store_b32 v2, v3
.LBB1_8:                                ;   in Loop: Header=BB1_5 Depth=1
	s_or_b32 exec_lo, exec_lo, s7
	s_waitcnt lgkmcnt(0)
	s_barrier
	s_cmp_lt_u32 s3, 4
	s_mov_b32 s3, s6
	s_branch .LBB1_5
.LBB1_9:                                ; %._crit_edge72
	s_mov_b32 s3, 0
	s_mov_b32 s6, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB1_11
; %bb.10:
	v_dual_mov_b32 v0, s5 :: v_dual_mov_b32 v1, s4
	s_lshl_b64 s[2:3], s[2:3], 2
	v_mov_b32_e32 v2, 0
	s_add_u32 s0, s0, s2
	ds_load_b32 v0, v0
	ds_load_b32 v1, v1
	s_addc_u32 s1, s1, s3
	s_add_u32 s2, s10, s2
	s_addc_u32 s3, s11, s3
	s_waitcnt lgkmcnt(1)
	global_store_b32 v2, v0, s[2:3]
	s_waitcnt lgkmcnt(0)
	global_store_b32 v2, v1, s[0:1]
.LBB1_11:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z28transformacion_kernel_sharedPfS_S_S_S_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 296
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z28transformacion_kernel_sharedPfS_S_S_S_, .Lfunc_end1-_Z28transformacion_kernel_sharedPfS_S_S_S_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 628
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         160
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z28transformacion_kernel_globalPfS_S_S_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     22
    .sgpr_spill_count: 0
    .symbol:         _Z28transformacion_kernel_globalPfS_S_S_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         24
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         32
        .size:           8
        .value_kind:     global_buffer
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         44
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         48
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         52
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         54
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         56
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         58
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         60
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         62
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         96
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         104
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         160
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 296
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z28transformacion_kernel_sharedPfS_S_S_S_
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z28transformacion_kernel_sharedPfS_S_S_S_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     9
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
