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

#define BASETYPE float

double dwalltime(){
	double sec;
	struct timeval tv;

	gettimeofday(&tv,NULL);
	sec = tv.tv_sec + tv.tv_usec/1000000.0;
	return sec;
}

__global__ void matDet(BASETYPE *d_matA, BASETYPE *detM, int desp){ 
	int global_id = blockIdx.x * blockDim.x + threadIdx.x;
    extern __shared__ BASETYPE datos[];
    BASETYPE *s_mat = &datos[0];
    BASETYPE *s_detAux = &datos[desp];
    int offset = (threadIdx.x)*16; 
    unsigned int i;

    for(i = 0; i < 16; i++){    
        s_mat[(threadIdx.x) * 16 + i]=d_matA[global_id * 16 + i];

    }  
    __syncthreads();  

    for(i = 0; i < 4; i++){
        s_detAux[(threadIdx.x) * 4+i]=0;
    }
    __syncthreads();

    //  printf("globalId:%d|%d|%d|%d|%d\n",global_id,(threadIdx.x)*4,(threadIdx.x)*4+1,(threadIdx.x)*4+2,(threadIdx.x)*4+3);
    s_detAux[(threadIdx.x)*4] +=  s_mat[offset] * ( (s_mat[offset+5]*s_mat[offset+10]*s_mat[offset+15])+(s_mat[offset+6]*s_mat[offset+11]*s_mat[offset+13])+(s_mat[offset+7]*s_mat[offset+9]*s_mat[offset+14])   +  (-1*(s_mat[offset+7]*s_mat[offset+10]*s_mat[offset+13]))   + (-1*(s_mat[offset+5]*s_mat[offset+11]*s_mat[offset+14]))  + (-1*(s_mat[offset+6]*s_mat[offset+9]*s_mat[offset+15])) );

    s_detAux[(threadIdx.x)*4+1] +=  (-1*s_mat[offset+1]) * ( (s_mat[offset+4]*s_mat[offset+10]*s_mat[offset+15])+(s_mat[offset+6]*s_mat[offset+11]*s_mat[offset+12])+(s_mat[offset+7]*s_mat[offset+8]*s_mat[offset+14])   +  (-1*(s_mat[offset+7]*s_mat[offset+10]*s_mat[offset+12]))   + (-1*(s_mat[offset+4]*s_mat[offset+11]*s_mat[offset+14]))  + (-1*(s_mat[offset+6]*s_mat[offset+8]*s_mat[offset+15])) );    

    s_detAux[(threadIdx.x)*4+2] +=  s_mat[offset+2] * ( (s_mat[offset+4]*s_mat[offset+9]*s_mat[offset+15])+(s_mat[offset+5]*s_mat[offset+11]*s_mat[offset+12])+(s_mat[offset+7]*s_mat[offset+8]*s_mat[offset+13])   +  (-1*(s_mat[offset+7]*s_mat[offset+9]*s_mat[offset+12]))   + (-1*(s_mat[offset+4]*s_mat[offset+11]*s_mat[offset+13]))  + (-1*(s_mat[offset+5]*s_mat[offset+8]*s_mat[offset+15])) );        

    s_detAux[(threadIdx.x)*4+3] +=  (-1*s_mat[offset+3]) * ( (s_mat[offset+4]*s_mat[offset+9]*s_mat[offset+14])+(s_mat[offset+5]*s_mat[offset+10]*s_mat[offset+12])+(s_mat[offset+6]*s_mat[offset+8]*s_mat[offset+13])   +  (-1*(s_mat[offset+6]*s_mat[offset+9]*s_mat[offset+12]))   + (-1*(s_mat[offset+4]*s_mat[offset+10]*s_mat[offset+13]))  + (-1*(s_mat[offset+5]*s_mat[offset+8]*s_mat[offset+14])) );        
    detM[blockIdx.x * blockDim.x + (threadIdx.x)] = s_detAux[(threadIdx.x)*4] + s_detAux[(threadIdx.x)*4+1] + s_detAux[(threadIdx.x)*4+2] + s_detAux[(threadIdx.x)*4+3]; 
    __syncthreads();
        
}

__global__ void vecMult(BASETYPE *d_matA,unsigned long n){     
//int global_id = blockIdx.x * blockDim.x + threadIdx.x;
    BASETYPE r_matA1,r_matA2;
    extern __shared__ BASETYPE s_mat[];
    unsigned int j;


	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x];
	s_mat[threadIdx.x]=r_matA1;
	s_mat[threadIdx.x + blockDim.x]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 2];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 3];
	s_mat[threadIdx.x + blockDim.x * 2]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 3]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 4];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 5];
	s_mat[threadIdx.x + blockDim.x * 4]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 5]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 6];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 7];
	s_mat[threadIdx.x + blockDim.x * 6]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 7]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 8];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 9];
	s_mat[threadIdx.x + blockDim.x * 8]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 9]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 10];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 11];
	s_mat[threadIdx.x + blockDim.x * 10]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 11]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 12];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 13];
	s_mat[threadIdx.x + blockDim.x * 12]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 13]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 14];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 15];
	s_mat[threadIdx.x + blockDim.x * 14]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 15]=r_matA2;
	__syncthreads();

	for( j = 1; j < blockDim.x; j *= 2 ){
	    if( threadIdx.x < blockDim.x / (j * 2)){
            s_mat[(threadIdx.x) * 16] += s_mat[((threadIdx.x) * 16) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 1] += s_mat[((threadIdx.x) * 16 + 1) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 2] += s_mat[((threadIdx.x) * 16 + 2) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 3] += s_mat[((threadIdx.x) * 16 + 3) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 4] += s_mat[((threadIdx.x) * 16 + 4) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 5] += s_mat[((threadIdx.x) * 16 + 5) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 6] += s_mat[((threadIdx.x) * 16 + 6) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 7] += s_mat[((threadIdx.x) * 16 + 7) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 8] += s_mat[((threadIdx.x) * 16 + 8) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 9] += s_mat[((threadIdx.x) * 16 + 9) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 10] += s_mat[((threadIdx.x) * 16 + 10) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 11] += s_mat[((threadIdx.x) * 16 + 11) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 12] += s_mat[((threadIdx.x) * 16 + 12) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 13] += s_mat[((threadIdx.x) * 16 + 13) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 14] += s_mat[((threadIdx.x) * 16 + 14) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 15] += s_mat[((threadIdx.x) * 16 + 15) + (blockDim.x / (j * 2)) * 16];
	        
	    }
	    __syncthreads();
	}


	if ((threadIdx.x) == 0){
        d_matA[(blockIdx.x * 16)] = s_mat[0];
        d_matA[(blockIdx.x * 16) + 1] = s_mat[1];
        d_matA[(blockIdx.x * 16) + 2] = s_mat[2];
        d_matA[(blockIdx.x * 16) + 3] = s_mat[3];
        d_matA[(blockIdx.x * 16) + 4] = s_mat[4];
        d_matA[(blockIdx.x * 16) + 5] = s_mat[5];
        d_matA[(blockIdx.x * 16) + 6] = s_mat[6];
        d_matA[(blockIdx.x * 16) + 7] = s_mat[7];
        d_matA[(blockIdx.x * 16) + 8] = s_mat[8];
        d_matA[(blockIdx.x * 16) + 9] = s_mat[9];
        d_matA[(blockIdx.x * 16) + 10] = s_mat[10];
        d_matA[(blockIdx.x * 16) + 11] = s_mat[11];
        d_matA[(blockIdx.x * 16) + 12] = s_mat[12];
        d_matA[(blockIdx.x * 16) + 13] = s_mat[13];
        d_matA[(blockIdx.x * 16) + 14] = s_mat[14];
        d_matA[(blockIdx.x * 16) + 15] = s_mat[15];
	}
}

__global__ void vecMult2(BASETYPE *d_matA,unsigned long n,int offset_m,int cant_m ){     
	int global_id = blockIdx.x * blockDim.x + threadIdx.x;
    extern __shared__ BASETYPE s_mat[];
    unsigned int j;

    if( global_id < n){

        s_mat[threadIdx.x * 16]=d_matA[(offset_m * 16) +( global_id * 16) ];
        s_mat[threadIdx.x * 16 + 1]=d_matA[(offset_m * 16) +( global_id * 16 + 1) ];
        s_mat[threadIdx.x * 16 + 2]=d_matA[(offset_m * 16) +( global_id * 16 + 2) ];
        s_mat[threadIdx.x * 16 + 3]=d_matA[(offset_m * 16) +( global_id * 16 + 3) ];
        s_mat[threadIdx.x * 16 + 4]=d_matA[(offset_m * 16) +( global_id * 16 + 4) ];
        s_mat[threadIdx.x * 16 + 5]=d_matA[(offset_m * 16) +( global_id * 16 + 5) ];
        s_mat[threadIdx.x * 16 + 6]=d_matA[(offset_m * 16) +( global_id * 16 + 6) ];
        s_mat[threadIdx.x * 16 + 7]=d_matA[(offset_m * 16) +( global_id * 16 + 7) ];
        s_mat[threadIdx.x * 16 + 8]=d_matA[(offset_m * 16) +( global_id * 16 + 8) ];
        s_mat[threadIdx.x * 16 + 9]=d_matA[(offset_m * 16) +( global_id * 16 + 9) ];
        s_mat[threadIdx.x * 16 + 10]=d_matA[(offset_m * 16) +( global_id * 16 + 10) ];
        s_mat[threadIdx.x * 16 + 11]=d_matA[(offset_m * 16) +( global_id * 16 + 11) ];
        s_mat[threadIdx.x * 16 + 12]=d_matA[(offset_m * 16) +( global_id * 16 + 12) ];
        s_mat[threadIdx.x * 16 + 13]=d_matA[(offset_m * 16) +( global_id * 16 + 13) ];
        s_mat[threadIdx.x * 16 + 14]=d_matA[(offset_m * 16) +( global_id * 16 + 14) ];
        s_mat[threadIdx.x * 16 + 15]=d_matA[(offset_m * 16) +( global_id * 16 + 15) ];
        __syncthreads();

        for( j = 1; j < cant_m; j *= 2 ){
            if( threadIdx.x < cant_m / (j * 2)){
                s_mat[(threadIdx.x) * 16] += s_mat[((threadIdx.x) * 16) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 1] += s_mat[((threadIdx.x) * 16 + 1) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 2] += s_mat[((threadIdx.x) * 16 + 2) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 3] += s_mat[((threadIdx.x) * 16 + 3) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 4] += s_mat[((threadIdx.x) * 16 + 4) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 5] += s_mat[((threadIdx.x) * 16 + 5) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 6] += s_mat[((threadIdx.x) * 16 + 6) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 7] += s_mat[((threadIdx.x) * 16 + 7) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 8] += s_mat[((threadIdx.x) * 16 + 8) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 9] += s_mat[((threadIdx.x) * 16 + 9) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 10] += s_mat[((threadIdx.x) * 16 + 10) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 11] += s_mat[((threadIdx.x) * 16 + 11) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 12] += s_mat[((threadIdx.x) * 16 + 12) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 13] += s_mat[((threadIdx.x) * 16 + 13) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 14] += s_mat[((threadIdx.x) * 16 + 14) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 15] += s_mat[((threadIdx.x) * 16 + 15) + (cant_m / (j * 2)) * 16];
                
            }
            __syncthreads();
        }


        if ((threadIdx.x) == 0){
            d_matA[(offset_m / blockDim.x) * 16 + (blockIdx.x * 16)] = s_mat[0];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 1] = s_mat[1];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 2] = s_mat[2];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 3] = s_mat[3];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 4] = s_mat[4];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 5] = s_mat[5];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 6] = s_mat[6];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 7] = s_mat[7];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 8] = s_mat[8];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 9] = s_mat[9];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 10] = s_mat[10];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 11] = s_mat[11];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 12] = s_mat[12];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 13] = s_mat[13];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 14] = s_mat[14];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 15] = s_mat[15];
        }
    }
}

int main(int argc, char *argv[]){


    if (argc != 3){
        printf("Falta argumento: N\n");
        printf("Falta argumento: CUDA_BLK \n");
        return 0;
    }
	//declaracion de variables
    cudaError_t error;
    unsigned long N = atoi (argv[1]);
    unsigned long CUDA_BLK = atoi(argv[2]),GRID_BLK,cant_blk;
    unsigned long numBytes = sizeof(BASETYPE)*4*4;
    BASETYPE *matrices,*d_matrices,*d_detM,*detM;
	double timetick;
    unsigned long i,j;
    int datos_matDet,datos_vecMult,matDet_desp;


    matrices = (BASETYPE *)malloc(numBytes*N);
    detM = (BASETYPE *)malloc(sizeof(BASETYPE)*N);
    for (i = 0; i < 4*4*N; i++){
        matrices[i] = 1;
    }

    for (i = 0; i < N; i++){
        detM[i] = 0;
    }
    matrices[2] = 220;
    matrices[13] = 220;
    matrices[7] = 6;
    matrices[14] = 6;
    //comment

    cudaMalloc((void **) &d_matrices, numBytes*N);
    cudaMalloc((void **) &d_detM, sizeof(BASETYPE)*N);

    datos_matDet = numBytes * CUDA_BLK + sizeof(BASETYPE) * 4 * CUDA_BLK;

    datos_vecMult = numBytes * CUDA_BLK;
    matDet_desp = CUDA_BLK * 16;

	cant_blk = N / CUDA_BLK;

    dim3 dimBlock(CUDA_BLK);
    dim3 dimGrid(cant_blk);
    
    timetick = dwalltime();


    cudaMemcpy(d_matrices, matrices, numBytes*N, cudaMemcpyHostToDevice); // CPU -> GPU
    cudaMemcpy(d_detM, detM, sizeof(BASETYPE)*N, cudaMemcpyHostToDevice); // CPU -> GPU
    matDet<<<dimGrid, dimBlock,datos_matDet>>>(d_matrices,d_detM,matDet_desp);
    cudaThreadSynchronize();
    for(i = N ; i > 1; i = i / CUDA_BLK){
        GRID_BLK = i / CUDA_BLK; 
        if ((i % CUDA_BLK) == 0){
      //      printf("primero---------------------------------\n");
            dim3 dimGrid(GRID_BLK);
            vecMult<<<dimGrid, dimBlock,datos_vecMult>>>(d_matrices,i);
            cudaThreadSynchronize();
        } else{
            if(GRID_BLK != 0){
                vecMult<<<dimGrid, dimBlock,datos_vecMult>>>(d_matrices,i);  
                cudaThreadSynchronize(); 
            }
       //     printf("segundo---------------------------------\n");
            dim3 dimGrid2(1);
            vecMult2<<<dimGrid2, dimBlock,datos_vecMult>>>(d_matrices,(i % CUDA_BLK),GRID_BLK * CUDA_BLK,(i % CUDA_BLK));  
            cudaThreadSynchronize();
            i = i + (i % CUDA_BLK);
        }
    }
 /*   for(i = N ; i > 1; i = i / CUDA_BLK){
        GRID_BLK = i / CUDA_BLK; 
        dim3 dimGrid(GRID_BLK);
        vecMult<<<dimGrid, dimBlock,datos_vecMult>>>(d_matrices,i);
        cudaThreadSynchronize();
    }*/
    cudaMemcpy(matrices, d_matrices, numBytes, cudaMemcpyDeviceToHost); // GPU -> CPU
    cudaMemcpy(detM, d_detM, sizeof(BASETYPE)*N, cudaMemcpyDeviceToHost); // GPU -> CPU

    for(i = 1; i < N ; i++){
        detM[0] += detM[i]; 
    }
    detM[0] = detM[0] / N;

    for (i = 0; i < 4*4; i++){
        matrices[i] *= detM[0];
    }

	printf("Tiempo para la GPU: %f\n",dwalltime() - timetick);
    error = cudaGetLastError();
    printf("error: %d\n",error);
    
    printf("%.2lf|\n",detM[0]);

    for(i=0; i < 4; i++){
        for(j=0; j < 4; j++){
            printf("%.2lf|",matrices[i*4+j]);
        }
        printf("\n");
    }


    cudaFree(d_matrices);
    cudaFree(d_detM);
    free(matrices);
    free(detM);
    return 0;

}

	.file	"tmpxft_002beb19_00000000-6_test2.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z9dwalltimev
	.type	_Z9dwalltimev, @function
_Z9dwalltimev:
.LFB2027:
	.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	8(%rsp), %xmm1
	cvtsi2sdq	16(%rsp), %xmm0
	divsd	.LC0(%rip), %xmm0
	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
.LFE2027:
	.size	_Z9dwalltimev, .-_Z9dwalltimev
	.globl	_Z28__device_stub__Z6matDetPfS_iPfS_i
	.type	_Z28__device_stub__Z6matDetPfS_iPfS_i, @function
_Z28__device_stub__Z6matDetPfS_iPfS_i:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L6
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z6matDetPfS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L6:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z28__device_stub__Z6matDetPfS_iPfS_i, .-_Z28__device_stub__Z6matDetPfS_iPfS_i
	.globl	_Z6matDetPfS_i
	.type	_Z6matDetPfS_i, @function
_Z6matDetPfS_i:
.LFB2054:
	.cfi_startproc
	endbr64
	jmp	_Z28__device_stub__Z6matDetPfS_iPfS_i
	.cfi_endproc
.LFE2054:
	.size	_Z6matDetPfS_i, .-_Z6matDetPfS_i
	.globl	_Z27__device_stub__Z7vecMultPfmPfm
	.type	_Z27__device_stub__Z7vecMultPfmPfm, @function
_Z27__device_stub__Z7vecMultPfmPfm:
.LFB2055:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L11
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z7vecMultPfm(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L11:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2055:
	.size	_Z27__device_stub__Z7vecMultPfmPfm, .-_Z27__device_stub__Z7vecMultPfmPfm
	.globl	_Z7vecMultPfm
	.type	_Z7vecMultPfm, @function
_Z7vecMultPfm:
.LFB2056:
	.cfi_startproc
	endbr64
	jmp	_Z27__device_stub__Z7vecMultPfmPfm
	.cfi_endproc
.LFE2056:
	.size	_Z7vecMultPfm, .-_Z7vecMultPfm
	.globl	_Z30__device_stub__Z8vecMult2PfmiiPfmii
	.type	_Z30__device_stub__Z8vecMult2PfmiiPfmii, @function
_Z30__device_stub__Z8vecMult2PfmiiPfmii:
.LFB2057:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 8(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L16
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z8vecMult2Pfmii(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L16:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z30__device_stub__Z8vecMult2PfmiiPfmii, .-_Z30__device_stub__Z8vecMult2PfmiiPfmii
	.globl	_Z8vecMult2Pfmii
	.type	_Z8vecMult2Pfmii, @function
_Z8vecMult2Pfmii:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z8vecMult2PfmiiPfmii
	.cfi_endproc
.LFE2058:
	.size	_Z8vecMult2Pfmii, .-_Z8vecMult2Pfmii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Falta argumento: N\n"
.LC2:
	.string	"Falta argumento: CUDA_BLK \n"
.LC7:
	.string	"Tiempo para la GPU: %f\n"
.LC8:
	.string	"error: %d\n"
.LC9:
	.string	"%.2lf|\n"
.LC10:
	.string	"%.2lf|"
.LC11:
	.string	"\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$120, %rsp
	.cfi_def_cfa_offset 176
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	cmpl	$3, %edi
	je	.L22
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L23
.L22:
	movq	8(%rsi), %rdi
	movq	%rsi, %rbx
	call	atoi@PLT
	movq	16(%rbx), %rdi
	movslq	%eax, %r12
	movl	%eax, 28(%rsp)
	call	atoi@PLT
	movq	%r12, %r14
	salq	$6, %r14
	movslq	%eax, %r15
	movq	%r14, %rdi
	movq	%r15, %r13
	call	malloc@PLT
	movq	%rax, %rbx
	leaq	0(,%r12,4), %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	malloc@PLT
	movq	%r12, %rdx
	movss	.LC3(%rip), %xmm0
	movq	%rax, %rbp
	salq	$4, %rdx
	xorl	%eax, %eax
.L24:
	cmpq	%rdx, %rax
	jnb	.L47
	movss	%xmm0, (%rbx,%rax,4)
	incq	%rax
	jmp	.L24
.L47:
	xorl	%eax, %eax
.L26:
	cmpq	%r12, %rax
	jnb	.L48
	movl	$0x00000000, 0(%rbp,%rax,4)
	incq	%rax
	jmp	.L26
.L48:
	movl	$0x435c0000, 8(%rbx)
	leaq	48(%rsp), %rdi
	movq	%r14, %rsi
	movabsq	$4665729215085936640, %rax
	movl	$0x40c00000, 28(%rbx)
	movq	%rax, 52(%rbx)
	call	cudaMalloc@PLT
	movq	8(%rsp), %rsi
	leaq	56(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	%r13d, %eax
	xorl	%edx, %edx
	movl	%r13d, 68(%rsp)
	movabsq	$4294967297, %rcx
	sall	$6, %eax
	movl	%eax, (%rsp)
	movq	%r12, %rax
	divq	%r15
	movq	%rcx, 72(%rsp)
	movq	%rcx, 84(%rsp)
	movl	%eax, 80(%rsp)
	call	_Z9dwalltimev
	movq	48(%rsp), %rdi
	movq	%r14, %rdx
	movq	%rbx, %rsi
	movl	$1, %ecx
	movsd	%xmm0, 40(%rsp)
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	56(%rsp), %rdi
	movq	%rbp, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	imull	$80, %r13d, %r8d
	movl	76(%rsp), %ecx
	xorl	%r9d, %r9d
	movq	68(%rsp), %rdx
	movq	80(%rsp), %rdi
	movl	88(%rsp), %esi
	movslq	%r8d, %r8
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L28
	movl	%r13d, %edx
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdi
	sall	$4, %edx
	call	_Z28__device_stub__Z6matDetPfS_iPfS_i
.L28:
	call	cudaThreadSynchronize@PLT
	movslq	(%rsp), %rax
	movq	%r12, %r14
	movq	%rax, 16(%rsp)
.L29:
	cmpq	$1, %r14
	jbe	.L49
	xorl	%edx, %edx
	movq	%r14, %rax
	movl	76(%rsp), %ecx
	divq	%r15
	testq	%rdx, %rdx
	movq	%rdx, (%rsp)
	movq	68(%rsp), %rdx
	movq	%rax, 32(%rsp)
	jne	.L30
	movl	32(%rsp), %eax
	movq	16(%rsp), %r8
	xorl	%r9d, %r9d
	movl	%eax, 92(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 96(%rsp)
	movq	92(%rsp), %rdi
	movl	100(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L31
	movq	48(%rsp), %rdi
	movq	%r14, %rsi
	call	_Z27__device_stub__Z7vecMultPfmPfm
.L31:
	call	cudaThreadSynchronize@PLT
	jmp	.L32
.L30:
	cmpq	%r15, %r14
	jb	.L33
	movq	16(%rsp), %r8
	movq	80(%rsp), %rdi
	xorl	%r9d, %r9d
	movl	88(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L34
	movq	48(%rsp), %rdi
	movq	%r14, %rsi
	call	_Z27__device_stub__Z7vecMultPfmPfm
.L34:
	call	cudaThreadSynchronize@PLT
.L33:
	movl	76(%rsp), %ecx
	movq	16(%rsp), %r8
	movabsq	$4294967297, %rdi
	xorl	%r9d, %r9d
	movq	68(%rsp), %rdx
	movl	$1, %esi
	movq	%rdi, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L35
	movl	32(%rsp), %edx
	movl	(%rsp), %ecx
	movq	(%rsp), %rsi
	movq	48(%rsp), %rdi
	imull	%r13d, %edx
	call	_Z30__device_stub__Z8vecMult2PfmiiPfmii
.L35:
	call	cudaThreadSynchronize@PLT
	movq	(%rsp), %rax
	addq	%rax, %r14
.L32:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%r15
	movq	%rax, %r14
	jmp	.L29
.L49:
	movq	48(%rsp), %rsi
	movl	$2, %ecx
	movl	$64, %edx
	movq	%rbx, %rdi
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	%rbp, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movl	$1, %eax
.L37:
	movss	0(%rbp), %xmm0
	cmpq	%r12, %rax
	jnb	.L50
	addss	0(%rbp,%rax,4), %xmm0
	incq	%rax
	movss	%xmm0, 0(%rbp)
	jmp	.L37
.L50:
	cvtsi2ssl	28(%rsp), %xmm1
	xorl	%eax, %eax
	divss	%xmm1, %xmm0
	movss	%xmm0, 0(%rbp)
.L39:
	movss	(%rbx,%rax,4), %xmm1
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rbx,%rax,4)
	incq	%rax
	cmpq	$16, %rax
	jne	.L39
	call	_Z9dwalltimev
	subsd	40(%rsp), %xmm0
	movb	$1, %al
	xorl	%r13d, %r13d
	leaq	.LC7(%rip), %rsi
	movl	$2, %edi
	leaq	.LC10(%rip), %r15
	call	__printf_chk@PLT
	call	cudaGetLastError@PLT
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	0(%rbp), %xmm0
	call	__printf_chk@PLT
.L40:
	leaq	(%rbx,%r13,4), %r14
	xorl	%r12d, %r12d
.L41:
	cvtss2sd	(%r14,%r12,4), %xmm0
	movq	%r15, %rsi
	movl	$2, %edi
	movb	$1, %al
	call	__printf_chk@PLT
	incq	%r12
	cmpq	$4, %r12
	jne	.L41
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	addq	$4, %r13
	call	__printf_chk@PLT
	cmpq	$16, %r13
	jne	.L40
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	56(%rsp), %rdi
	call	cudaFree@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	%rbp, %rdi
	call	free@PLT
.L23:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	addq	$120, %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
.LFE2028:
	.size	main, .-main
	.section	.rodata.str1.1
.LC12:
	.string	"_Z8vecMult2Pfmii"
.LC13:
	.string	"_Z7vecMultPfm"
.LC14:
	.string	"_Z6matDetPfS_i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2060:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	pushq	$0
	.cfi_def_cfa_offset 24
	xorl	%r9d, %r9d
	orl	$-1, %r8d
	pushq	$0
	.cfi_def_cfa_offset 32
	leaq	.LC12(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z8vecMult2Pfmii(%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	.LC13(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z7vecMultPfm(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC14(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z6matDetPfS_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2060:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1093567616
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC3:
	.long	1065353216
	.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 <sys/time.h>
#include <sys/resource.h>
#include <math.h>

#define BASETYPE float

double dwalltime(){
	double sec;
	struct timeval tv;

	gettimeofday(&tv,NULL);
	sec = tv.tv_sec + tv.tv_usec/1000000.0;
	return sec;
}

__global__ void matDet(BASETYPE *d_matA, BASETYPE *detM, int desp){ 
	int global_id = blockIdx.x * blockDim.x + threadIdx.x;
    extern __shared__ BASETYPE datos[];
    BASETYPE *s_mat = &datos[0];
    BASETYPE *s_detAux = &datos[desp];
    int offset = (threadIdx.x)*16; 
    unsigned int i;

    for(i = 0; i < 16; i++){    
        s_mat[(threadIdx.x) * 16 + i]=d_matA[global_id * 16 + i];

    }  
    __syncthreads();  

    for(i = 0; i < 4; i++){
        s_detAux[(threadIdx.x) * 4+i]=0;
    }
    __syncthreads();

    //  printf("globalId:%d|%d|%d|%d|%d\n",global_id,(threadIdx.x)*4,(threadIdx.x)*4+1,(threadIdx.x)*4+2,(threadIdx.x)*4+3);
    s_detAux[(threadIdx.x)*4] +=  s_mat[offset] * ( (s_mat[offset+5]*s_mat[offset+10]*s_mat[offset+15])+(s_mat[offset+6]*s_mat[offset+11]*s_mat[offset+13])+(s_mat[offset+7]*s_mat[offset+9]*s_mat[offset+14])   +  (-1*(s_mat[offset+7]*s_mat[offset+10]*s_mat[offset+13]))   + (-1*(s_mat[offset+5]*s_mat[offset+11]*s_mat[offset+14]))  + (-1*(s_mat[offset+6]*s_mat[offset+9]*s_mat[offset+15])) );

    s_detAux[(threadIdx.x)*4+1] +=  (-1*s_mat[offset+1]) * ( (s_mat[offset+4]*s_mat[offset+10]*s_mat[offset+15])+(s_mat[offset+6]*s_mat[offset+11]*s_mat[offset+12])+(s_mat[offset+7]*s_mat[offset+8]*s_mat[offset+14])   +  (-1*(s_mat[offset+7]*s_mat[offset+10]*s_mat[offset+12]))   + (-1*(s_mat[offset+4]*s_mat[offset+11]*s_mat[offset+14]))  + (-1*(s_mat[offset+6]*s_mat[offset+8]*s_mat[offset+15])) );    

    s_detAux[(threadIdx.x)*4+2] +=  s_mat[offset+2] * ( (s_mat[offset+4]*s_mat[offset+9]*s_mat[offset+15])+(s_mat[offset+5]*s_mat[offset+11]*s_mat[offset+12])+(s_mat[offset+7]*s_mat[offset+8]*s_mat[offset+13])   +  (-1*(s_mat[offset+7]*s_mat[offset+9]*s_mat[offset+12]))   + (-1*(s_mat[offset+4]*s_mat[offset+11]*s_mat[offset+13]))  + (-1*(s_mat[offset+5]*s_mat[offset+8]*s_mat[offset+15])) );        

    s_detAux[(threadIdx.x)*4+3] +=  (-1*s_mat[offset+3]) * ( (s_mat[offset+4]*s_mat[offset+9]*s_mat[offset+14])+(s_mat[offset+5]*s_mat[offset+10]*s_mat[offset+12])+(s_mat[offset+6]*s_mat[offset+8]*s_mat[offset+13])   +  (-1*(s_mat[offset+6]*s_mat[offset+9]*s_mat[offset+12]))   + (-1*(s_mat[offset+4]*s_mat[offset+10]*s_mat[offset+13]))  + (-1*(s_mat[offset+5]*s_mat[offset+8]*s_mat[offset+14])) );        
    detM[blockIdx.x * blockDim.x + (threadIdx.x)] = s_detAux[(threadIdx.x)*4] + s_detAux[(threadIdx.x)*4+1] + s_detAux[(threadIdx.x)*4+2] + s_detAux[(threadIdx.x)*4+3]; 
    __syncthreads();
        
}

__global__ void vecMult(BASETYPE *d_matA,unsigned long n){     
//int global_id = blockIdx.x * blockDim.x + threadIdx.x;
    BASETYPE r_matA1,r_matA2;
    extern __shared__ BASETYPE s_mat[];
    unsigned int j;


	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x];
	s_mat[threadIdx.x]=r_matA1;
	s_mat[threadIdx.x + blockDim.x]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 2];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 3];
	s_mat[threadIdx.x + blockDim.x * 2]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 3]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 4];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 5];
	s_mat[threadIdx.x + blockDim.x * 4]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 5]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 6];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 7];
	s_mat[threadIdx.x + blockDim.x * 6]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 7]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 8];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 9];
	s_mat[threadIdx.x + blockDim.x * 8]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 9]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 10];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 11];
	s_mat[threadIdx.x + blockDim.x * 10]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 11]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 12];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 13];
	s_mat[threadIdx.x + blockDim.x * 12]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 13]=r_matA2;
	r_matA1=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 14];
    r_matA2=d_matA[blockIdx.x * blockDim.x * 16 + threadIdx.x + blockDim.x * 15];
	s_mat[threadIdx.x + blockDim.x * 14]=r_matA1;
	s_mat[threadIdx.x + blockDim.x * 15]=r_matA2;
	__syncthreads();

	for( j = 1; j < blockDim.x; j *= 2 ){
	    if( threadIdx.x < blockDim.x / (j * 2)){
            s_mat[(threadIdx.x) * 16] += s_mat[((threadIdx.x) * 16) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 1] += s_mat[((threadIdx.x) * 16 + 1) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 2] += s_mat[((threadIdx.x) * 16 + 2) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 3] += s_mat[((threadIdx.x) * 16 + 3) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 4] += s_mat[((threadIdx.x) * 16 + 4) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 5] += s_mat[((threadIdx.x) * 16 + 5) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 6] += s_mat[((threadIdx.x) * 16 + 6) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 7] += s_mat[((threadIdx.x) * 16 + 7) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 8] += s_mat[((threadIdx.x) * 16 + 8) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 9] += s_mat[((threadIdx.x) * 16 + 9) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 10] += s_mat[((threadIdx.x) * 16 + 10) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 11] += s_mat[((threadIdx.x) * 16 + 11) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 12] += s_mat[((threadIdx.x) * 16 + 12) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 13] += s_mat[((threadIdx.x) * 16 + 13) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 14] += s_mat[((threadIdx.x) * 16 + 14) + (blockDim.x / (j * 2)) * 16];
            s_mat[(threadIdx.x) * 16 + 15] += s_mat[((threadIdx.x) * 16 + 15) + (blockDim.x / (j * 2)) * 16];
	        
	    }
	    __syncthreads();
	}


	if ((threadIdx.x) == 0){
        d_matA[(blockIdx.x * 16)] = s_mat[0];
        d_matA[(blockIdx.x * 16) + 1] = s_mat[1];
        d_matA[(blockIdx.x * 16) + 2] = s_mat[2];
        d_matA[(blockIdx.x * 16) + 3] = s_mat[3];
        d_matA[(blockIdx.x * 16) + 4] = s_mat[4];
        d_matA[(blockIdx.x * 16) + 5] = s_mat[5];
        d_matA[(blockIdx.x * 16) + 6] = s_mat[6];
        d_matA[(blockIdx.x * 16) + 7] = s_mat[7];
        d_matA[(blockIdx.x * 16) + 8] = s_mat[8];
        d_matA[(blockIdx.x * 16) + 9] = s_mat[9];
        d_matA[(blockIdx.x * 16) + 10] = s_mat[10];
        d_matA[(blockIdx.x * 16) + 11] = s_mat[11];
        d_matA[(blockIdx.x * 16) + 12] = s_mat[12];
        d_matA[(blockIdx.x * 16) + 13] = s_mat[13];
        d_matA[(blockIdx.x * 16) + 14] = s_mat[14];
        d_matA[(blockIdx.x * 16) + 15] = s_mat[15];
	}
}

__global__ void vecMult2(BASETYPE *d_matA,unsigned long n,int offset_m,int cant_m ){     
	int global_id = blockIdx.x * blockDim.x + threadIdx.x;
    extern __shared__ BASETYPE s_mat[];
    unsigned int j;

    if( global_id < n){

        s_mat[threadIdx.x * 16]=d_matA[(offset_m * 16) +( global_id * 16) ];
        s_mat[threadIdx.x * 16 + 1]=d_matA[(offset_m * 16) +( global_id * 16 + 1) ];
        s_mat[threadIdx.x * 16 + 2]=d_matA[(offset_m * 16) +( global_id * 16 + 2) ];
        s_mat[threadIdx.x * 16 + 3]=d_matA[(offset_m * 16) +( global_id * 16 + 3) ];
        s_mat[threadIdx.x * 16 + 4]=d_matA[(offset_m * 16) +( global_id * 16 + 4) ];
        s_mat[threadIdx.x * 16 + 5]=d_matA[(offset_m * 16) +( global_id * 16 + 5) ];
        s_mat[threadIdx.x * 16 + 6]=d_matA[(offset_m * 16) +( global_id * 16 + 6) ];
        s_mat[threadIdx.x * 16 + 7]=d_matA[(offset_m * 16) +( global_id * 16 + 7) ];
        s_mat[threadIdx.x * 16 + 8]=d_matA[(offset_m * 16) +( global_id * 16 + 8) ];
        s_mat[threadIdx.x * 16 + 9]=d_matA[(offset_m * 16) +( global_id * 16 + 9) ];
        s_mat[threadIdx.x * 16 + 10]=d_matA[(offset_m * 16) +( global_id * 16 + 10) ];
        s_mat[threadIdx.x * 16 + 11]=d_matA[(offset_m * 16) +( global_id * 16 + 11) ];
        s_mat[threadIdx.x * 16 + 12]=d_matA[(offset_m * 16) +( global_id * 16 + 12) ];
        s_mat[threadIdx.x * 16 + 13]=d_matA[(offset_m * 16) +( global_id * 16 + 13) ];
        s_mat[threadIdx.x * 16 + 14]=d_matA[(offset_m * 16) +( global_id * 16 + 14) ];
        s_mat[threadIdx.x * 16 + 15]=d_matA[(offset_m * 16) +( global_id * 16 + 15) ];
        __syncthreads();

        for( j = 1; j < cant_m; j *= 2 ){
            if( threadIdx.x < cant_m / (j * 2)){
                s_mat[(threadIdx.x) * 16] += s_mat[((threadIdx.x) * 16) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 1] += s_mat[((threadIdx.x) * 16 + 1) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 2] += s_mat[((threadIdx.x) * 16 + 2) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 3] += s_mat[((threadIdx.x) * 16 + 3) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 4] += s_mat[((threadIdx.x) * 16 + 4) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 5] += s_mat[((threadIdx.x) * 16 + 5) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 6] += s_mat[((threadIdx.x) * 16 + 6) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 7] += s_mat[((threadIdx.x) * 16 + 7) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 8] += s_mat[((threadIdx.x) * 16 + 8) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 9] += s_mat[((threadIdx.x) * 16 + 9) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 10] += s_mat[((threadIdx.x) * 16 + 10) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 11] += s_mat[((threadIdx.x) * 16 + 11) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 12] += s_mat[((threadIdx.x) * 16 + 12) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 13] += s_mat[((threadIdx.x) * 16 + 13) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 14] += s_mat[((threadIdx.x) * 16 + 14) + (cant_m / (j * 2)) * 16];
                s_mat[(threadIdx.x) * 16 + 15] += s_mat[((threadIdx.x) * 16 + 15) + (cant_m / (j * 2)) * 16];
                
            }
            __syncthreads();
        }


        if ((threadIdx.x) == 0){
            d_matA[(offset_m / blockDim.x) * 16 + (blockIdx.x * 16)] = s_mat[0];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 1] = s_mat[1];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 2] = s_mat[2];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 3] = s_mat[3];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 4] = s_mat[4];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 5] = s_mat[5];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 6] = s_mat[6];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 7] = s_mat[7];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 8] = s_mat[8];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 9] = s_mat[9];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 10] = s_mat[10];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 11] = s_mat[11];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 12] = s_mat[12];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 13] = s_mat[13];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 14] = s_mat[14];
            d_matA[((offset_m / blockDim.x) * 16 + (blockIdx.x * 16)) + 15] = s_mat[15];
        }
    }
}

int main(int argc, char *argv[]){


    if (argc != 3){
        printf("Falta argumento: N\n");
        printf("Falta argumento: CUDA_BLK \n");
        return 0;
    }
	//declaracion de variables
    hipError_t error;
    unsigned long N = atoi (argv[1]);
    unsigned long CUDA_BLK = atoi(argv[2]),GRID_BLK,cant_blk;
    unsigned long numBytes = sizeof(BASETYPE)*4*4;
    BASETYPE *matrices,*d_matrices,*d_detM,*detM;
	double timetick;
    unsigned long i,j;
    int datos_matDet,datos_vecMult,matDet_desp;


    matrices = (BASETYPE *)malloc(numBytes*N);
    detM = (BASETYPE *)malloc(sizeof(BASETYPE)*N);
    for (i = 0; i < 4*4*N; i++){
        matrices[i] = 1;
    }

    for (i = 0; i < N; i++){
        detM[i] = 0;
    }
    matrices[2] = 220;
    matrices[13] = 220;
    matrices[7] = 6;
    matrices[14] = 6;
    //comment

    hipMalloc((void **) &d_matrices, numBytes*N);
    hipMalloc((void **) &d_detM, sizeof(BASETYPE)*N);

    datos_matDet = numBytes * CUDA_BLK + sizeof(BASETYPE) * 4 * CUDA_BLK;

    datos_vecMult = numBytes * CUDA_BLK;
    matDet_desp = CUDA_BLK * 16;

	cant_blk = N / CUDA_BLK;

    dim3 dimBlock(CUDA_BLK);
    dim3 dimGrid(cant_blk);
    
    timetick = dwalltime();


    hipMemcpy(d_matrices, matrices, numBytes*N, hipMemcpyHostToDevice); // CPU -> GPU
    hipMemcpy(d_detM, detM, sizeof(BASETYPE)*N, hipMemcpyHostToDevice); // CPU -> GPU
    matDet<<<dimGrid, dimBlock,datos_matDet>>>(d_matrices,d_detM,matDet_desp);
    hipDeviceSynchronize();
    for(i = N ; i > 1; i = i / CUDA_BLK){
        GRID_BLK = i / CUDA_BLK; 
        if ((i % CUDA_BLK) == 0){
      //      printf("primero---------------------------------\n");
            dim3 dimGrid(GRID_BLK);
            vecMult<<<dimGrid, dimBlock,datos_vecMult>>>(d_matrices,i);
            hipDeviceSynchronize();
        } else{
            if(GRID_BLK != 0){
                vecMult<<<dimGrid, dimBlock,datos_vecMult>>>(d_matrices,i);  
                hipDeviceSynchronize(); 
            }
       //     printf("segundo---------------------------------\n");
            dim3 dimGrid2(1);
            vecMult2<<<dimGrid2, dimBlock,datos_vecMult>>>(d_matrices,(i % CUDA_BLK),GRID_BLK * CUDA_BLK,(i % CUDA_BLK));  
            hipDeviceSynchronize();
            i = i + (i % CUDA_BLK);
        }
    }
 /*   for(i = N ; i > 1; i = i / CUDA_BLK){
        GRID_BLK = i / CUDA_BLK; 
        dim3 dimGrid(GRID_BLK);
        vecMult<<<dimGrid, dimBlock,datos_vecMult>>>(d_matrices,i);
        cudaThreadSynchronize();
    }*/
    hipMemcpy(matrices, d_matrices, numBytes, hipMemcpyDeviceToHost); // GPU -> CPU
    hipMemcpy(detM, d_detM, sizeof(BASETYPE)*N, hipMemcpyDeviceToHost); // GPU -> CPU

    for(i = 1; i < N ; i++){
        detM[0] += detM[i]; 
    }
    detM[0] = detM[0] / N;

    for (i = 0; i < 4*4; i++){
        matrices[i] *= detM[0];
    }

	printf("Tiempo para la GPU: %f\n",dwalltime() - timetick);
    error = hipGetLastError();
    printf("error: %d\n",error);
    
    printf("%.2lf|\n",detM[0]);

    for(i=0; i < 4; i++){
        for(j=0; j < 4; j++){
            printf("%.2lf|",matrices[i*4+j]);
        }
        printf("\n");
    }


    hipFree(d_matrices);
    hipFree(d_detM);
    free(matrices);
    free(detM);
    return 0;

}

	.text
	.file	"test2.hip"
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z9dwalltimev
.LCPI0_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	_Z9dwalltimev
	.type	_Z9dwalltimev,@function
_Z9dwalltimev:                          # @_Z9dwalltimev
	.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
	divsd	.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	_Z9dwalltimev, .Lfunc_end0-_Z9dwalltimev
	.cfi_endproc
                                        # -- End function
	.globl	_Z21__device_stub__matDetPfS_i  # -- Begin function _Z21__device_stub__matDetPfS_i
	.type	_Z21__device_stub__matDetPfS_i,@function
_Z21__device_stub__matDetPfS_i:         # @_Z21__device_stub__matDetPfS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z6matDetPfS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z21__device_stub__matDetPfS_i, .Lfunc_end1-_Z21__device_stub__matDetPfS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z22__device_stub__vecMultPfm   # -- Begin function _Z22__device_stub__vecMultPfm
	.type	_Z22__device_stub__vecMultPfm,@function
_Z22__device_stub__vecMultPfm:          # @_Z22__device_stub__vecMultPfm
	.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	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z7vecMultPfm, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	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	_Z22__device_stub__vecMultPfm, .Lfunc_end2-_Z22__device_stub__vecMultPfm
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__vecMult2Pfmii # -- Begin function _Z23__device_stub__vecMult2Pfmii
	.type	_Z23__device_stub__vecMult2Pfmii,@function
_Z23__device_stub__vecMult2Pfmii:       # @_Z23__device_stub__vecMult2Pfmii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	8(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8vecMult2Pfmii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z23__device_stub__vecMult2Pfmii, .Lfunc_end3-_Z23__device_stub__vecMult2Pfmii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI4_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	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	$120, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	cmpl	$3, %edi
	jne	.LBB4_1
# %bb.2:
	movq	%rsi, %rbx
	movq	8(%rsi), %rdi
	callq	atoi
	movl	%eax, %r15d
	movslq	%eax, %rbp
	movq	16(%rbx), %rdi
	callq	atoi
	movl	%eax, 12(%rsp)                  # 4-byte Spill
	movslq	%eax, %r13
	movq	%rbp, %rdi
	shlq	$6, %rdi
	movq	%rdi, 16(%rsp)                  # 8-byte Spill
	callq	malloc
	movq	%rax, %rbx
	leaq	(,%rbp,4), %r14
	movq	%r14, %rdi
	callq	malloc
	movq	%rax, %r12
	testl	%ebp, %ebp
	je	.LBB4_7
# %bb.3:                                # %.lr.ph.preheader
	movq	%rbp, %rax
	shlq	$4, %rax
	cmpq	$1, %rax
	adcq	$0, %rax
	xorl	%ecx, %ecx
.LBB4_4:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	$1065353216, (%rbx,%rcx,4)      # imm = 0x3F800000
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB4_4
# %bb.5:                                # %.preheader145
	testl	%r15d, %r15d
	je	.LBB4_7
# %bb.6:                                # %.lr.ph148.preheader
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
.LBB4_7:                                # %._crit_edge
	movq	%r15, 56(%rsp)                  # 8-byte Spill
	movl	$1130102784, 8(%rbx)            # imm = 0x435C0000
	movabsq	$4665729215085936640, %rax      # imm = 0x40C00000435C0000
	movq	%rax, 52(%rbx)
	movl	$1086324736, 28(%rbx)           # imm = 0x40C00000
	movq	%rsp, %rdi
	movq	16(%rsp), %rsi                  # 8-byte Reload
	callq	hipMalloc
	leaq	32(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	12(%rsp), %ecx                  # 4-byte Reload
	movl	%ecx, %edx
	shll	$4, %edx
	movq	%rbp, %rax
	movq	%r12, 64(%rsp)                  # 8-byte Spill
	movq	%rdx, 72(%rsp)                  # 8-byte Spill
	leal	(%rdx,%rdx,4), %edx
	movl	%edx, 48(%rsp)                  # 4-byte Spill
	movq	%rbp, 40(%rsp)                  # 8-byte Spill
	xorl	%edx, %edx
	divq	%r13
	movl	%ecx, %ebp
	btsq	$32, %rbp
	movl	%eax, %r15d
	btsq	$32, %r15
	leaq	104(%rsp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	cvtsi2sdq	(%r12), %xmm0
	movsd	%xmm0, 80(%rsp)                 # 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r12), %xmm0
	movsd	%xmm0, 24(%rsp)                 # 8-byte Spill
	movq	%rsp, %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	32(%rsp), %rax
	movq	(%rax), %rdi
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	%r14, 88(%rsp)                  # 8-byte Spill
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movslq	48(%rsp), %r8                   # 4-byte Folded Reload
	movq	%r15, 96(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbp, 16(%rsp)                  # 8-byte Spill
	movq	%rbp, %rdx
	movl	$1, %ecx
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB4_9
# %bb.8:
	movq	(%rsp), %rdi
	movq	32(%rsp), %rsi
	movq	72(%rsp), %rdx                  # 8-byte Reload
                                        # kill: def $edx killed $edx killed $rdx
	callq	_Z21__device_stub__matDetPfS_i
.LBB4_9:
	callq	hipDeviceSynchronize
	cmpl	$2, 56(%rsp)                    # 4-byte Folded Reload
	jb	.LBB4_23
# %bb.10:                               # %.lr.ph152
	movabsq	$4294967296, %rcx               # imm = 0x100000000
	movl	12(%rsp), %eax                  # 4-byte Reload
	shll	$6, %eax
	movslq	%eax, %rbp
	leaq	1(%rcx), %rax
	movq	%rax, 48(%rsp)                  # 8-byte Spill
	movq	40(%rsp), %r12                  # 8-byte Reload
.LBB4_11:                               # =>This Inner Loop Header: Depth=1
	movq	%r12, %rax
	xorl	%edx, %edx
	divq	%r13
	movq	%rax, %r14
	testq	%rdx, %rdx
	je	.LBB4_12
# %bb.15:                               #   in Loop: Header=BB4_11 Depth=1
	movq	%rdx, %r15
	cmpq	%r13, %r12
	jb	.LBB4_19
# %bb.16:                               #   in Loop: Header=BB4_11 Depth=1
	movq	96(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	movq	%rbp, %r8
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB4_18
# %bb.17:                               #   in Loop: Header=BB4_11 Depth=1
	movq	(%rsp), %rdi
	movq	%r12, %rsi
	callq	_Z22__device_stub__vecMultPfm
.LBB4_18:                               #   in Loop: Header=BB4_11 Depth=1
	callq	hipDeviceSynchronize
.LBB4_19:                               #   in Loop: Header=BB4_11 Depth=1
	movq	48(%rsp), %rdi                  # 8-byte Reload
	movl	$1, %esi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	movq	%rbp, %r8
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB4_21
# %bb.20:                               #   in Loop: Header=BB4_11 Depth=1
	movq	(%rsp), %rdi
	imull	12(%rsp), %r14d                 # 4-byte Folded Reload
	movq	%r15, %rsi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	callq	_Z23__device_stub__vecMult2Pfmii
.LBB4_21:                               #   in Loop: Header=BB4_11 Depth=1
	callq	hipDeviceSynchronize
	addq	%r12, %r15
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%r13
	movq	%rax, %r14
	jmp	.LBB4_22
.LBB4_12:                               #   in Loop: Header=BB4_11 Depth=1
	movl	%r14d, %edi
	movabsq	$4294967296, %rax               # imm = 0x100000000
	orq	%rax, %rdi
	movl	$1, %esi
	movq	16(%rsp), %rdx                  # 8-byte Reload
	movl	$1, %ecx
	movq	%rbp, %r8
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB4_14
# %bb.13:                               #   in Loop: Header=BB4_11 Depth=1
	movq	(%rsp), %rdi
	movq	%r12, %rsi
	callq	_Z22__device_stub__vecMultPfm
.LBB4_14:                               #   in Loop: Header=BB4_11 Depth=1
	callq	hipDeviceSynchronize
.LBB4_22:                               #   in Loop: Header=BB4_11 Depth=1
	movq	%r14, %r12
	cmpq	$1, %r14
	ja	.LBB4_11
.LBB4_23:                               # %._crit_edge153
	movq	(%rsp), %rsi
	movl	$64, %edx
	movq	%rbx, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	movq	32(%rsp), %rsi
	movq	64(%rsp), %r13                  # 8-byte Reload
	movq	%r13, %rdi
	movq	88(%rsp), %rdx                  # 8-byte Reload
	movl	$2, %ecx
	callq	hipMemcpy
	movss	(%r13), %xmm0                   # xmm0 = mem[0],zero,zero,zero
	movq	56(%rsp), %rcx                  # 8-byte Reload
	cmpl	$2, %ecx
	jb	.LBB4_24
# %bb.25:                               # %.lr.ph156.preheader
	movl	$1, %eax
	movq	40(%rsp), %rdx                  # 8-byte Reload
	movsd	24(%rsp), %xmm2                 # 8-byte Reload
                                        # xmm2 = mem[0],zero
.LBB4_26:                               # %.lr.ph156
                                        # =>This Inner Loop Header: Depth=1
	addss	(%r13,%rax,4), %xmm0
	incq	%rax
	cmpq	%rax, %rdx
	jne	.LBB4_26
	jmp	.LBB4_27
.LBB4_1:
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	jmp	.LBB4_37
.LBB4_24:
	movq	40(%rsp), %rdx                  # 8-byte Reload
	movsd	24(%rsp), %xmm2                 # 8-byte Reload
                                        # xmm2 = mem[0],zero
.LBB4_27:                               # %._crit_edge157
	divsd	.LCPI4_0(%rip), %xmm2
	testq	%rdx, %rdx
	js	.LBB4_28
# %bb.29:                               # %._crit_edge157
	cvtsi2ss	%ecx, %xmm1
	jmp	.LBB4_30
.LBB4_28:
	shrq	%rdx
	andl	$1, %ecx
	orq	%rdx, %rcx
	cvtsi2ss	%rcx, %xmm1
	addss	%xmm1, %xmm1
.LBB4_30:                               # %._crit_edge157
	divss	%xmm1, %xmm0
	addsd	80(%rsp), %xmm2                 # 8-byte Folded Reload
	movsd	%xmm2, 24(%rsp)                 # 8-byte Spill
	movss	%xmm0, (%r13)
	xorl	%eax, %eax
.LBB4_31:                               # =>This Inner Loop Header: Depth=1
	movss	(%rbx,%rax,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	movss	%xmm1, (%rbx,%rax,4)
	incq	%rax
	cmpq	$16, %rax
	jne	.LBB4_31
# %bb.32:
	xorl	%r15d, %r15d
	leaq	104(%rsp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm1, %xmm1
	cvtsi2sdq	(%r14), %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r14), %xmm0
	divsd	.LCPI4_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	subsd	24(%rsp), %xmm0                 # 8-byte Folded Reload
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	callq	hipGetLastError
	movl	$.L.str.3, %edi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r13), %xmm0
	movl	$.L.str.4, %edi
	movb	$1, %al
	callq	printf
	movq	%rbx, %r14
.LBB4_33:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_34 Depth 2
	xorl	%r12d, %r12d
.LBB4_34:                               #   Parent Loop BB4_33 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14,%r12,4), %xmm0
	movl	$.L.str.5, %edi
	movb	$1, %al
	callq	printf
	incq	%r12
	cmpq	$4, %r12
	jne	.LBB4_34
# %bb.35:                               #   in Loop: Header=BB4_33 Depth=1
	movl	$10, %edi
	callq	putchar@PLT
	incq	%r15
	addq	$16, %r14
	cmpq	$4, %r15
	jne	.LBB4_33
# %bb.36:
	movq	(%rsp), %rdi
	callq	hipFree
	movq	32(%rsp), %rdi
	callq	hipFree
	movq	%rbx, %rdi
	callq	free
	movq	%r13, %rdi
	callq	free
.LBB4_37:
	xorl	%eax, %eax
	addq	$120, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	main, .Lfunc_end4-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	.LBB5_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB5_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6matDetPfS_i, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z7vecMultPfm, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8vecMult2Pfmii, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end5:
	.size	__hip_module_ctor, .Lfunc_end5-__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	.LBB6_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
.LBB6_2:
	retq
.Lfunc_end6:
	.size	__hip_module_dtor, .Lfunc_end6-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z6matDetPfS_i,@object          # @_Z6matDetPfS_i
	.section	.rodata,"a",@progbits
	.globl	_Z6matDetPfS_i
	.p2align	3, 0x0
_Z6matDetPfS_i:
	.quad	_Z21__device_stub__matDetPfS_i
	.size	_Z6matDetPfS_i, 8

	.type	_Z7vecMultPfm,@object           # @_Z7vecMultPfm
	.globl	_Z7vecMultPfm
	.p2align	3, 0x0
_Z7vecMultPfm:
	.quad	_Z22__device_stub__vecMultPfm
	.size	_Z7vecMultPfm, 8

	.type	_Z8vecMult2Pfmii,@object        # @_Z8vecMult2Pfmii
	.globl	_Z8vecMult2Pfmii
	.p2align	3, 0x0
_Z8vecMult2Pfmii:
	.quad	_Z23__device_stub__vecMult2Pfmii
	.size	_Z8vecMult2Pfmii, 8

	.type	.L.str.2,@object                # @.str.2
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.2:
	.asciz	"Tiempo para la GPU: %f\n"
	.size	.L.str.2, 24

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"error: %d\n"
	.size	.L.str.3, 11

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"%.2lf|\n"
	.size	.L.str.4, 8

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"%.2lf|"
	.size	.L.str.5, 7

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z6matDetPfS_i"
	.size	.L__unnamed_1, 15

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z7vecMultPfm"
	.size	.L__unnamed_2, 14

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z8vecMult2Pfmii"
	.size	.L__unnamed_3, 17

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

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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"Falta argumento: N"
	.size	.Lstr, 19

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"Falta argumento: CUDA_BLK "
	.size	.Lstr.1, 27

	.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 _Z21__device_stub__matDetPfS_i
	.addrsig_sym _Z22__device_stub__vecMultPfm
	.addrsig_sym _Z23__device_stub__vecMult2Pfmii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z6matDetPfS_i
	.addrsig_sym _Z7vecMultPfm
	.addrsig_sym _Z8vecMult2Pfmii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z6matDetPfS_i          ; -- Begin function _Z6matDetPfS_i
	.globl	_Z6matDetPfS_i
	.p2align	8
	.type	_Z6matDetPfS_i,@function
_Z6matDetPfS_i:                         ; @_Z6matDetPfS_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	v_lshl_add_u32 v4, v0, 6, 0
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	v_mov_b32_e32 v3, 0
	s_mov_b32 s2, 0
	v_lshlrev_b32_e32 v2, 4, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	v_add_co_u32 v2, vcc_lo, s4, v2
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v3, vcc_lo
.LBB0_1:                                ; =>This Inner Loop Header: Depth=1
	global_load_b32 v5, v[2:3], off
	v_add_co_u32 v2, vcc_lo, v2, 4
	v_add_nc_u32_e32 v6, s2, v4
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_add_i32 s2, s2, 4
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s2, 64
	s_waitcnt vmcnt(0)
	ds_store_b32 v6, v5
	s_cbranch_scc1 .LBB0_1
; %bb.2:
	s_load_b32 s0, s[0:1], 0x10
	v_lshlrev_b32_e32 v0, 4, v0
	v_mov_b32_e32 v2, 0
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_lshl_b32 s0, s0, 2
	s_delay_alu instid0(SALU_CYCLE_1)
	v_add3_u32 v3, 0, s0, v0
	ds_store_2addr_b32 v3, v2, v2 offset1:1
	ds_store_2addr_b32 v3, v2, v2 offset0:2 offset1:3
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	ds_load_2addr_b32 v[5:6], v4 offset0:5 offset1:6
	ds_load_b32 v0, v4 offset:44
	ds_load_2addr_b32 v[7:8], v4 offset0:9 offset1:10
	ds_load_2addr_b32 v[9:10], v3 offset1:1
	ds_load_2addr_b32 v[11:12], v4 offset0:13 offset1:14
	ds_load_b32 v13, v4 offset:28
	ds_load_b32 v14, v4 offset:60
	ds_load_b32 v15, v4
	s_waitcnt lgkmcnt(6)
	v_mul_f32_e32 v16, v6, v0
	s_waitcnt lgkmcnt(5)
	v_dual_mul_f32 v17, v5, v8 :: v_dual_mul_f32 v0, v0, v5
	v_mul_f32_e32 v6, v7, v6
	s_waitcnt lgkmcnt(2)
	v_mul_f32_e32 v18, v13, v7
	v_mul_f32_e32 v16, v16, v11
	v_mul_f32_e32 v8, v8, v13
	s_waitcnt lgkmcnt(1)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v16, v17, v14
	v_fmac_f32_e32 v16, v18, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v5, -v11, v8, v16
	v_fma_f32 v0, -v0, v12, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f32 v0, -v14, v6, v0
	s_waitcnt lgkmcnt(0)
	v_fma_f32 v0, v15, v0, v9
	ds_store_b32 v3, v0
	ds_load_2addr_b32 v[5:6], v4 offset0:10 offset1:11
	ds_load_2addr_b32 v[7:8], v4 offset0:6 offset1:7
	ds_load_b32 v9, v4 offset:16
	ds_load_b32 v15, v4 offset:48
	ds_load_b32 v16, v4 offset:32
	ds_load_2addr_b32 v[11:12], v4 offset0:14 offset1:15
	ds_load_2addr_b32 v[13:14], v3 offset0:2 offset1:3
	s_waitcnt lgkmcnt(4)
	v_dual_mul_f32 v17, v7, v6 :: v_dual_mul_f32 v18, v9, v5
	v_mul_f32_e32 v5, v5, v8
	s_waitcnt lgkmcnt(2)
	v_dual_mul_f32 v19, v8, v16 :: v_dual_mul_f32 v6, v6, v9
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_mul_f32_e32 v17, v17, v15
	v_mul_f32_e32 v7, v16, v7
	s_waitcnt lgkmcnt(1)
	v_fmac_f32_e32 v17, v18, v12
	ds_load_b32 v18, v4 offset:4
	v_fmac_f32_e32 v17, v19, v11
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v5, -v15, v5, v17
	v_fma_f32 v5, -v6, v11, v5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f32 v5, -v12, v7, v5
	s_waitcnt lgkmcnt(0)
	v_fma_f32 v15, -v18, v5, v10
	ds_store_b32 v3, v15 offset:4
	ds_load_2addr_b32 v[5:6], v4 offset0:4 offset1:5
	ds_load_b32 v11, v4 offset:60
	ds_load_2addr_b32 v[7:8], v4 offset0:11 offset1:12
	ds_load_b32 v12, v4 offset:36
	ds_load_2addr_b32 v[9:10], v4 offset0:7 offset1:8
	ds_load_b32 v16, v4 offset:52
	ds_load_b32 v17, v4 offset:8
	s_waitcnt lgkmcnt(3)
	v_dual_mul_f32 v18, v6, v7 :: v_dual_mul_f32 v19, v5, v12
	s_waitcnt lgkmcnt(2)
	v_dual_mul_f32 v5, v7, v5 :: v_dual_mul_f32 v20, v9, v10
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_dual_mul_f32 v9, v12, v9 :: v_dual_mul_f32 v18, v18, v8
	v_mul_f32_e32 v6, v10, v6
	v_fmac_f32_e32 v18, v19, v11
	s_waitcnt lgkmcnt(1)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v18, v20, v16
	v_fma_f32 v7, -v8, v9, v18
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v5, -v5, v16, v7
	v_fma_f32 v5, -v11, v6, v5
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_fma_f32 v13, v17, v5, v13
	ds_store_b32 v3, v13 offset:8
	ds_load_b32 v16, v4 offset:40
	ds_load_2addr_b32 v[5:6], v4 offset0:5 offset1:6
	ds_load_2addr_b32 v[7:8], v4 offset0:8 offset1:9
	ds_load_2addr_b32 v[9:10], v4 offset0:3 offset1:4
	ds_load_2addr_b32 v[11:12], v4 offset0:12 offset1:13
	ds_load_b32 v4, v4 offset:56
	s_waitcnt lgkmcnt(4)
	v_mul_f32_e32 v17, v5, v16
	s_waitcnt lgkmcnt(2)
	v_dual_mul_f32 v5, v7, v5 :: v_dual_mul_f32 v18, v10, v8
	v_mul_f32_e32 v19, v6, v7
	v_add_f32_e32 v7, v0, v15
	s_waitcnt lgkmcnt(1)
	v_dual_mul_f32 v17, v17, v11 :: v_dual_mul_f32 v6, v8, v6
	v_mul_f32_e32 v8, v16, v10
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_add_f32 v2, v7, v13 :: v_dual_fmac_f32 v17, v18, v4
	v_add_co_u32 v0, vcc_lo, s6, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_fmac_f32_e32 v17, v19, v12
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v6, -v11, v6, v17
	v_fma_f32 v6, -v8, v12, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v4, -v4, v5, v6
	v_fma_f32 v4, -v9, v4, v14
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v2, v2, v4
	ds_store_b32 v3, v4 offset:12
	global_store_b32 v[0:1], v2, off
	s_waitcnt lgkmcnt(0)
	s_waitcnt_vscnt null, 0x0
	s_barrier
	buffer_gl0_inv
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6matDetPfS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 21
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z6matDetPfS_i, .Lfunc_end0-_Z6matDetPfS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 952
; NumSgprs: 18
; NumVgprs: 21
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 21
; 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	_Z7vecMultPfm           ; -- Begin function _Z7vecMultPfm
	.globl	_Z7vecMultPfm
	.p2align	8
	.type	_Z7vecMultPfm,@function
_Z7vecMultPfm:                          ; @_Z7vecMultPfm
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x1c
	s_load_b64 s[0:1], s[0:1], 0x0
	s_lshl_b32 s2, s15, 4
	s_waitcnt lgkmcnt(0)
	s_and_b32 s3, s3, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s2, s3, v[0:1]
	v_mov_b32_e32 v2, 0
	s_lshl_b32 s4, s3, 2
	s_cmp_lt_u32 s3, 2
	v_lshlrev_b64 v[3:4], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_4)
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v3, vcc_lo, s0, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v4, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[7:8], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v5, vcc_lo, s0, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v6, vcc_lo
	v_lshlrev_b64 v[9:10], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v7, vcc_lo, s0, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s1, v8, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[11:12], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v9, vcc_lo, s0, v9
	v_add_co_ci_u32_e32 v10, vcc_lo, s1, v10, vcc_lo
	v_lshlrev_b64 v[13:14], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v11, vcc_lo, s0, v11
	v_add_co_ci_u32_e32 v12, vcc_lo, s1, v12, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[15:16], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v13, vcc_lo, s0, v13
	v_add_co_ci_u32_e32 v14, vcc_lo, s1, v14, vcc_lo
	v_lshlrev_b64 v[17:18], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v15, vcc_lo, s0, v15
	v_add_co_ci_u32_e32 v16, vcc_lo, s1, v16, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[19:20], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v17, vcc_lo, s0, v17
	v_add_co_ci_u32_e32 v18, vcc_lo, s1, v18, vcc_lo
	v_lshlrev_b64 v[21:22], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	s_clause 0x7
	global_load_b32 v23, v[3:4], off
	global_load_b32 v24, v[5:6], off
	global_load_b32 v25, v[7:8], off
	global_load_b32 v26, v[9:10], off
	global_load_b32 v27, v[11:12], off
	global_load_b32 v28, v[13:14], off
	global_load_b32 v29, v[15:16], off
	global_load_b32 v17, v[17:18], off
	v_add_co_u32 v3, vcc_lo, s0, v19
	v_add_co_ci_u32_e32 v4, vcc_lo, s1, v20, vcc_lo
	v_lshlrev_b64 v[5:6], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v7, vcc_lo, s0, v21
	v_add_co_ci_u32_e32 v8, vcc_lo, s1, v22, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[9:10], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v5, vcc_lo, s0, v5
	v_add_co_ci_u32_e32 v6, vcc_lo, s1, v6, vcc_lo
	v_lshlrev_b64 v[11:12], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v9, vcc_lo, s0, v9
	v_add_co_ci_u32_e32 v10, vcc_lo, s1, v10, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_3) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[13:14], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v11, vcc_lo, s0, v11
	v_add_co_ci_u32_e32 v12, vcc_lo, s1, v12, vcc_lo
	v_lshlrev_b64 v[15:16], 2, v[1:2]
	v_add_nc_u32_e32 v1, s3, v1
	v_add_co_u32 v13, vcc_lo, s0, v13
	v_add_co_ci_u32_e32 v14, vcc_lo, s1, v14, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	v_add_co_u32 v15, vcc_lo, s0, v15
	v_add_co_ci_u32_e32 v16, vcc_lo, s1, v16, vcc_lo
	v_add_co_u32 v1, vcc_lo, s0, v1
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v2, vcc_lo, s1, v2, vcc_lo
	s_clause 0x7
	global_load_b32 v3, v[3:4], off
	global_load_b32 v4, v[7:8], off
	global_load_b32 v5, v[5:6], off
	global_load_b32 v6, v[9:10], off
	global_load_b32 v7, v[11:12], off
	global_load_b32 v8, v[13:14], off
	global_load_b32 v9, v[15:16], off
	global_load_b32 v1, v[1:2], off
	v_lshl_add_u32 v2, v0, 2, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v10, s4, v2
	v_add_nc_u32_e32 v11, s4, v10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v12, s4, v11
	v_add_nc_u32_e32 v13, s4, v12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v14, s4, v13
	v_add_nc_u32_e32 v15, s4, v14
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v16, s4, v15
	v_add_nc_u32_e32 v18, s4, v16
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v19, s4, v18
	v_add_nc_u32_e32 v20, s4, v19
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v21, s4, v20
	v_add_nc_u32_e32 v22, s4, v21
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v30, s4, v22
	v_add_nc_u32_e32 v31, s4, v30
	s_delay_alu instid0(VALU_DEP_1)
	v_add_nc_u32_e32 v32, s4, v31
	s_waitcnt vmcnt(15)
	ds_store_b32 v2, v23
	s_waitcnt vmcnt(14)
	ds_store_b32 v10, v24
	s_waitcnt vmcnt(13)
	ds_store_b32 v11, v25
	s_waitcnt vmcnt(12)
	ds_store_b32 v12, v26
	s_waitcnt vmcnt(11)
	ds_store_b32 v13, v27
	s_waitcnt vmcnt(10)
	ds_store_b32 v14, v28
	s_waitcnt vmcnt(9)
	ds_store_b32 v15, v29
	s_waitcnt vmcnt(8)
	ds_store_b32 v16, v17
	s_waitcnt vmcnt(7)
	ds_store_b32 v18, v3
	s_waitcnt vmcnt(6)
	ds_store_b32 v19, v4
	s_waitcnt vmcnt(5)
	ds_store_b32 v20, v5
	s_waitcnt vmcnt(4)
	ds_store_b32 v21, v6
	s_waitcnt vmcnt(3)
	ds_store_b32 v22, v7
	s_waitcnt vmcnt(2)
	ds_store_b32 v30, v8
	s_waitcnt vmcnt(1)
	ds_store_b32 v31, v9
	s_waitcnt vmcnt(0)
	ds_store_b32 v32, v1
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_5
; %bb.1:                                ; %.lr.ph
	v_lshl_add_u32 v1, v0, 6, 0
	s_mov_b32 s4, 1
.LBB1_2:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b32 s4, s4, 1
	v_cvt_f32_u32_e32 v2, s4
	s_sub_i32 s6, 0, s4
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v2, v2
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v2, 0x4f7ffffe, v2
	v_cvt_u32_f32_e32 v2, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s5, v2
	s_mul_i32 s6, s6, s5
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s6, s5, s6
	s_add_i32 s5, s5, s6
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s5, s3, s5
	s_mul_i32 s6, s5, s4
	s_add_i32 s7, s5, 1
	s_sub_i32 s6, s3, s6
	s_delay_alu instid0(SALU_CYCLE_1)
	s_sub_i32 s8, s6, s4
	s_cmp_ge_u32 s6, s4
	s_cselect_b32 s5, s7, s5
	s_cselect_b32 s6, s8, s6
	s_add_i32 s7, s5, 1
	s_cmp_ge_u32 s6, s4
	s_cselect_b32 s6, s7, s5
	s_mov_b32 s5, exec_lo
	v_cmpx_gt_u32_e64 s6, v0
	s_cbranch_execz .LBB1_4
; %bb.3:                                ;   in Loop: Header=BB1_2 Depth=1
	v_add_nc_u32_e32 v2, s6, v0
	v_lshl_add_u32 v32, s6, 6, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_lshl_add_u32 v18, v2, 6, 0
	ds_load_2addr_b32 v[2:3], v32 offset0:8 offset1:9
	ds_load_2addr_b32 v[4:5], v32 offset0:10 offset1:11
	ds_load_2addr_b32 v[6:7], v1 offset0:8 offset1:9
	ds_load_2addr_b32 v[8:9], v1 offset0:10 offset1:11
	ds_load_2addr_b32 v[10:11], v1 offset0:12 offset1:13
	ds_load_2addr_b32 v[12:13], v1 offset0:14 offset1:15
	ds_load_2addr_b32 v[14:15], v32 offset0:12 offset1:13
	ds_load_2addr_b32 v[16:17], v32 offset0:14 offset1:15
	ds_load_2addr_b32 v[18:19], v18 offset1:1
	ds_load_2addr_b32 v[20:21], v1 offset1:1
	ds_load_2addr_b32 v[22:23], v1 offset0:2 offset1:3
	ds_load_2addr_b32 v[24:25], v32 offset0:2 offset1:3
	ds_load_2addr_b32 v[26:27], v32 offset0:4 offset1:5
	ds_load_2addr_b32 v[28:29], v1 offset0:4 offset1:5
	ds_load_2addr_b32 v[30:31], v1 offset0:6 offset1:7
	ds_load_2addr_b32 v[32:33], v32 offset0:6 offset1:7
	s_waitcnt lgkmcnt(13)
	v_dual_add_f32 v3, v3, v7 :: v_dual_add_f32 v2, v2, v6
	s_waitcnt lgkmcnt(12)
	v_dual_add_f32 v5, v5, v9 :: v_dual_add_f32 v4, v4, v8
	s_waitcnt lgkmcnt(9)
	v_dual_add_f32 v7, v15, v11 :: v_dual_add_f32 v6, v14, v10
	s_waitcnt lgkmcnt(8)
	v_dual_add_f32 v8, v16, v12 :: v_dual_add_f32 v13, v17, v13
	s_waitcnt lgkmcnt(6)
	v_dual_add_f32 v9, v18, v20 :: v_dual_add_f32 v10, v19, v21
	s_waitcnt lgkmcnt(4)
	v_dual_add_f32 v11, v24, v22 :: v_dual_add_f32 v12, v25, v23
	s_waitcnt lgkmcnt(2)
	v_dual_add_f32 v14, v26, v28 :: v_dual_add_f32 v15, v27, v29
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v16, v32, v30
	v_add_f32_e32 v18, v33, v31
	ds_store_2addr_b32 v1, v9, v10 offset1:1
	ds_store_2addr_b32 v1, v11, v12 offset0:2 offset1:3
	ds_store_2addr_b32 v1, v14, v15 offset0:4 offset1:5
	ds_store_2addr_b32 v1, v16, v18 offset0:6 offset1:7
	ds_store_2addr_b32 v1, v2, v3 offset0:8 offset1:9
	ds_store_2addr_b32 v1, v4, v5 offset0:10 offset1:11
	ds_store_2addr_b32 v1, v6, v7 offset0:12 offset1:13
	ds_store_2addr_b32 v1, v8, v13 offset0:14 offset1:15
.LBB1_4:                                ;   in Loop: Header=BB1_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s5
	s_cmp_lt_u32 s4, s3
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB1_2
.LBB1_5:                                ; %._crit_edge
	s_mov_b32 s3, exec_lo
	v_cmpx_eq_u32_e32 0, v0
	s_cbranch_execz .LBB1_7
; %bb.6:
	v_mov_b32_e32 v16, 0
	s_mov_b32 s3, 0
	ds_load_2addr_b32 v[0:1], v16 offset1:1
	ds_load_2addr_b32 v[2:3], v16 offset0:2 offset1:3
	ds_load_2addr_b32 v[4:5], v16 offset0:4 offset1:5
	ds_load_2addr_b32 v[6:7], v16 offset0:6 offset1:7
	ds_load_2addr_b32 v[8:9], v16 offset0:8 offset1:9
	ds_load_2addr_b32 v[10:11], v16 offset0:10 offset1:11
	ds_load_2addr_b32 v[12:13], v16 offset0:12 offset1:13
	ds_load_2addr_b32 v[14:15], v16 offset0:14 offset1:15
	s_lshl_b64 s[2:3], s[2:3], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s0, s2
	s_addc_u32 s1, s1, s3
	s_waitcnt lgkmcnt(6)
	global_store_b128 v16, v[0:3], s[0:1]
	s_waitcnt lgkmcnt(4)
	global_store_b128 v16, v[4:7], s[0:1] offset:16
	s_waitcnt lgkmcnt(2)
	global_store_b128 v16, v[8:11], s[0:1] offset:32
	s_waitcnt lgkmcnt(0)
	global_store_b128 v16, v[12:15], s[0:1] offset:48
.LBB1_7:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z7vecMultPfm
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 272
		.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 34
		.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	_Z7vecMultPfm, .Lfunc_end1-_Z7vecMultPfm
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1568
; NumSgprs: 18
; NumVgprs: 34
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 4
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 34
; 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	_Z8vecMult2Pfmii        ; -- Begin function _Z8vecMult2Pfmii
	.globl	_Z8vecMult2Pfmii
	.p2align	8
	.type	_Z8vecMult2Pfmii,@function
_Z8vecMult2Pfmii:                       ; @_Z8vecMult2Pfmii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x0
	s_mov_b32 s3, exec_lo
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_u64_e64 s[6:7], v[1:2]
	s_cbranch_execz .LBB2_8
; %bb.1:
	s_load_b64 s[0:1], s[0:1], 0x10
	s_waitcnt lgkmcnt(0)
	s_lshl_b32 s3, s0, 4
	s_cmp_lt_u32 s1, 2
	v_lshl_add_u32 v1, v1, 4, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v2, 31, v1
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v14, vcc_lo, s4, v1
	v_add_co_ci_u32_e32 v15, vcc_lo, s5, v2, vcc_lo
	v_lshl_add_u32 v1, v0, 6, 0
	s_clause 0x3
	global_load_b128 v[2:5], v[14:15], off
	global_load_b128 v[6:9], v[14:15], off offset:16
	global_load_b128 v[10:13], v[14:15], off offset:32
	global_load_b128 v[14:17], v[14:15], off offset:48
	s_waitcnt vmcnt(3)
	ds_store_2addr_b32 v1, v2, v3 offset1:1
	ds_store_2addr_b32 v1, v4, v5 offset0:2 offset1:3
	s_waitcnt vmcnt(2)
	ds_store_2addr_b32 v1, v6, v7 offset0:4 offset1:5
	ds_store_2addr_b32 v1, v8, v9 offset0:6 offset1:7
	s_waitcnt vmcnt(1)
	ds_store_2addr_b32 v1, v10, v11 offset0:8 offset1:9
	ds_store_2addr_b32 v1, v12, v13 offset0:10 offset1:11
	s_waitcnt vmcnt(0)
	ds_store_2addr_b32 v1, v14, v15 offset0:12 offset1:13
	ds_store_2addr_b32 v1, v16, v17 offset0:14 offset1:15
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB2_6
; %bb.2:                                ; %.lr.ph.preheader
	s_mov_b32 s3, s1
	s_mov_b32 s6, 1
.LBB2_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b32 s6, s6, 1
	v_cvt_f32_u32_e32 v2, s6
	s_sub_i32 s8, 0, s6
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v2, v2
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v2, 0x4f7ffffe, v2
	v_cvt_u32_f32_e32 v2, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_readfirstlane_b32 s7, v2
	s_mul_i32 s8, s8, s7
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s8, s7, s8
	s_add_i32 s7, s7, s8
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s7, s3, s7
	s_mul_i32 s8, s7, s6
	s_add_i32 s9, s7, 1
	s_sub_i32 s8, s1, s8
	s_delay_alu instid0(SALU_CYCLE_1)
	s_sub_i32 s10, s8, s6
	s_cmp_ge_u32 s8, s6
	s_cselect_b32 s7, s9, s7
	s_cselect_b32 s8, s10, s8
	s_add_i32 s9, s7, 1
	s_cmp_ge_u32 s8, s6
	s_cselect_b32 s8, s9, s7
	s_mov_b32 s7, exec_lo
	v_cmpx_gt_u32_e64 s8, v0
	s_cbranch_execz .LBB2_5
; %bb.4:                                ;   in Loop: Header=BB2_3 Depth=1
	v_add_nc_u32_e32 v2, s8, v0
	v_lshl_add_u32 v32, s8, 6, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_lshl_add_u32 v18, v2, 6, 0
	ds_load_2addr_b32 v[2:3], v32 offset0:8 offset1:9
	ds_load_2addr_b32 v[4:5], v32 offset0:10 offset1:11
	ds_load_2addr_b32 v[6:7], v1 offset0:8 offset1:9
	ds_load_2addr_b32 v[8:9], v1 offset0:10 offset1:11
	ds_load_2addr_b32 v[10:11], v1 offset0:12 offset1:13
	ds_load_2addr_b32 v[12:13], v1 offset0:14 offset1:15
	ds_load_2addr_b32 v[14:15], v32 offset0:12 offset1:13
	ds_load_2addr_b32 v[16:17], v32 offset0:14 offset1:15
	ds_load_2addr_b32 v[18:19], v18 offset1:1
	ds_load_2addr_b32 v[20:21], v1 offset1:1
	ds_load_2addr_b32 v[22:23], v1 offset0:2 offset1:3
	ds_load_2addr_b32 v[24:25], v32 offset0:2 offset1:3
	ds_load_2addr_b32 v[26:27], v32 offset0:4 offset1:5
	ds_load_2addr_b32 v[28:29], v1 offset0:4 offset1:5
	ds_load_2addr_b32 v[30:31], v1 offset0:6 offset1:7
	ds_load_2addr_b32 v[32:33], v32 offset0:6 offset1:7
	s_waitcnt lgkmcnt(13)
	v_dual_add_f32 v3, v3, v7 :: v_dual_add_f32 v2, v2, v6
	s_waitcnt lgkmcnt(12)
	v_dual_add_f32 v5, v5, v9 :: v_dual_add_f32 v4, v4, v8
	s_waitcnt lgkmcnt(9)
	v_dual_add_f32 v7, v15, v11 :: v_dual_add_f32 v6, v14, v10
	s_waitcnt lgkmcnt(8)
	v_dual_add_f32 v8, v16, v12 :: v_dual_add_f32 v13, v17, v13
	s_waitcnt lgkmcnt(6)
	v_dual_add_f32 v9, v18, v20 :: v_dual_add_f32 v10, v19, v21
	s_waitcnt lgkmcnt(4)
	v_dual_add_f32 v11, v24, v22 :: v_dual_add_f32 v12, v25, v23
	s_waitcnt lgkmcnt(2)
	v_dual_add_f32 v14, v26, v28 :: v_dual_add_f32 v15, v27, v29
	s_waitcnt lgkmcnt(0)
	v_add_f32_e32 v16, v32, v30
	v_add_f32_e32 v18, v33, v31
	ds_store_2addr_b32 v1, v9, v10 offset1:1
	ds_store_2addr_b32 v1, v11, v12 offset0:2 offset1:3
	ds_store_2addr_b32 v1, v14, v15 offset0:4 offset1:5
	ds_store_2addr_b32 v1, v16, v18 offset0:6 offset1:7
	ds_store_2addr_b32 v1, v2, v3 offset0:8 offset1:9
	ds_store_2addr_b32 v1, v4, v5 offset0:10 offset1:11
	ds_store_2addr_b32 v1, v6, v7 offset0:12 offset1:13
	ds_store_2addr_b32 v1, v8, v13 offset0:14 offset1:15
.LBB2_5:                                ;   in Loop: Header=BB2_3 Depth=1
	s_or_b32 exec_lo, exec_lo, s7
	s_cmp_lt_u32 s6, s1
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc1 .LBB2_3
.LBB2_6:                                ; %._crit_edge
	v_cmp_eq_u32_e32 vcc_lo, 0, v0
	s_and_b32 exec_lo, exec_lo, vcc_lo
	s_cbranch_execz .LBB2_8
; %bb.7:
	v_cvt_f32_u32_e32 v0, s2
	s_sub_i32 s3, 0, s2
	v_mov_b32_e32 v16, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	v_cvt_u32_f32_e32 v0, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_readfirstlane_b32 s1, v0
	ds_load_2addr_b32 v[0:1], v16 offset1:1
	ds_load_2addr_b32 v[2:3], v16 offset0:2 offset1:3
	ds_load_2addr_b32 v[4:5], v16 offset0:4 offset1:5
	ds_load_2addr_b32 v[6:7], v16 offset0:6 offset1:7
	ds_load_2addr_b32 v[8:9], v16 offset0:8 offset1:9
	ds_load_2addr_b32 v[10:11], v16 offset0:10 offset1:11
	ds_load_2addr_b32 v[12:13], v16 offset0:12 offset1:13
	ds_load_2addr_b32 v[14:15], v16 offset0:14 offset1:15
	s_mul_i32 s3, s3, s1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s3, s1, s3
	s_add_i32 s1, s1, s3
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_mul_hi_u32 s1, s0, s1
	s_mul_i32 s3, s1, s2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_sub_i32 s0, s0, s3
	s_add_i32 s3, s1, 1
	s_sub_i32 s6, s0, s2
	s_cmp_ge_u32 s0, s2
	s_cselect_b32 s1, s3, s1
	s_cselect_b32 s0, s6, s0
	s_add_i32 s3, s1, 1
	s_cmp_ge_u32 s0, s2
	s_cselect_b32 s0, s3, s1
	s_mov_b32 s1, 0
	s_add_i32 s0, s0, s15
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_lshl_b32 s0, s0, 4
	s_lshl_b64 s[0:1], s[0:1], 2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_add_u32 s0, s4, s0
	s_addc_u32 s1, s5, s1
	s_waitcnt lgkmcnt(6)
	global_store_b128 v16, v[0:3], s[0:1]
	s_waitcnt lgkmcnt(4)
	global_store_b128 v16, v[4:7], s[0:1] offset:16
	s_waitcnt lgkmcnt(2)
	global_store_b128 v16, v[8:11], s[0:1] offset:32
	s_waitcnt lgkmcnt(0)
	global_store_b128 v16, v[12:15], s[0:1] offset:48
.LBB2_8:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8vecMult2Pfmii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 34
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z8vecMult2Pfmii, .Lfunc_end2-_Z8vecMult2Pfmii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 1032
; NumSgprs: 18
; NumVgprs: 34
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 4
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 34
; 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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         144
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6matDetPfS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z6matDetPfS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     21
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           8
        .value_kind:     by_value
      - .offset:         16
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         20
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         28
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         30
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         32
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         34
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         36
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         38
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         56
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         80
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         136
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 272
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z7vecMultPfm
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z7vecMultPfm.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     34
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           8
        .value_kind:     by_value
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         20
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
      - .offset:         144
        .size:           4
        .value_kind:     hidden_dynamic_lds_size
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8vecMult2Pfmii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8vecMult2Pfmii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     34
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
