#include <iostream>
#include <time.h>
#include <cuda_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include <fstream>
#include <string>
#include <sys/types.h>
using namespace std;

#define BS 256
#define X 3
#define Y 3
#define cantStream 6
#define PYTHON_COMMAND 0 // 0 si el comando de python NO lleva el 3. cualquier otro valor si lo lleva.

//
// Funcion que ejecuta el comando de python para convertir la imagen en formato txt
// en formato txt a PNG.
// Hay que cambiar PYTHON_COMMAND dependiendo de como se ejecuta el comando en el PC.
//
int TXTtoRGB(){
    if (PYTHON_COMMAND == 0){
        cout << "Reconstruyendo Imagen..." << endl;
        system("python TXTtoRGB.py");
        return 1;
    }
    else if(system("python3 TXTtoRGB.py")){
        cout << "Reconstruyendo Imagen..." << endl;
        return 1;
    }
    else{
        cout << "Error al convertir el txt a imagen" << endl;
        return 0;
    }
}

// Funcion que ejecuta el comando de python para reconstruir la imagen en formato PNG
// a formato txt.
// Hay que cambiar PYTHON_COMMAND dependiendo de como se ejecuta el comando en el PC.

int RGBtoTXT(){
    if (PYTHON_COMMAND == 0){
        cout << "Transformando Imagen..." << endl;
        system("python IMGtoTXT.py < name.txt");
        return 1;
    }
    else if(system("python3 IMGtoTXT.py < name.txt")){
        cout << "Transformando Imagen..." << endl;
        return 1;
    }
    else{
        cout << "Error al transformar el txt a imagen" << endl;
        return 0;
    }
}

//
// Funcion que imprime el ultimo error arrojado por CUDA
//
void cudaCheckError(int i) {
    cudaError_t e=cudaGetLastError();
    if(e!=cudaSuccess) {
        printf("%d.- Cuda failure %s:%d: '%s'\n", i,__FILE__,__LINE__,cudaGetErrorString(e));
        exit(0);
    }
}

/*
 *  Escritura Archivo txt
    Funcion extraida de actividad de curso
 */
void Write(float* R, float* G, float* B, 
	       int M, int N, const char *filename) {
    FILE *fp;
    fp = fopen(filename, "w");
    fprintf(fp, "%d %d\n", M, N);
    for(int i = 0; i < M*N-1; i++)
        fprintf(fp, "%f ", R[i]);
    fprintf(fp, "%f\n", R[M*N-1]);
    for(int i = 0; i < M*N-1; i++)
        fprintf(fp, "%f ", G[i]);
    fprintf(fp, "%f\n", G[M*N-1]);
    for(int i = 0; i < M*N-1; i++)
        fprintf(fp, "%f ", B[i]);
    fprintf(fp, "%f\n", B[M*N-1]);
    fclose(fp);
}

/*
 *  Lectura Archivo txt
 */
void Read(float** R, float** G, float** B, int *M, int *N, const char *filename) {    
    FILE *fp;
    fp = fopen(filename, "r");
    fscanf(fp, "%d %d\n", M, N);

    int imsize = (*M) * (*N);
    float* R1 = new float[imsize];
    float* G1 = new float[imsize];
    float* B1 = new float[imsize];

    for(int i = 0; i < imsize; i++)
        fscanf(fp, "%f ", &(R1[i]));
    for(int i = 0; i < imsize; i++)
        fscanf(fp, "%f ", &(G1[i]));
    for(int i = 0; i < imsize; i++)
        fscanf(fp, "%f ", &(B1[i]));
    
    fclose(fp);
    *R = R1; *G = G1; *B = B1;
}

__global__ void kernelStream(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2, int tam){
    int tid = threadIdx.x + blockDim.x * blockIdx.x;// 
	if (tid < tam){
        float v1 = 0, v2 = 0;
        int fila = tid + (tid/Nout)*2;
        for(int i = 0; i<Y ; i++){
            for(int j = 0; j<X ; j++){
                v1 += R[j+i*N+fila]*k1[j+i*Y];
                v2 += R[j+i*N+fila]*k2[j+i*Y];
            }
        }
        Rx[tid] = v1;
        Ry[tid] = v2;
    }
}


__global__ void kernelConvolucion(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2){
	int tid = threadIdx.x + blockDim.x * blockIdx.x;
	if (tid < Mout*Nout){
        float v1 = 0, v2 = 0;
        int fila = tid + (tid/Nout)*2;
        for(int i = 0; i<Y ; i++){
            for(int j = 0; j<X ; j++){
                v1 += R[j+i*N+fila]*k1[j+i*Y];
                v2 += R[j+i*N+fila]*k2[j+i*Y];
            }
        }
        Rx[tid] = v1;
        Ry[tid] = v2;
    }
}


__global__ void kernelFila(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2){
	int tid = threadIdx.x + blockDim.x * blockIdx.x;
	if (tid < Mout){
        float v1, v2;
        for(int k=0; k<Nout ; k++){
            v1 = 0;
            v2 = 0;
            for(int i = 0; i<Y ; i++){
                for(int j = 0; j<X ; j++){
                    v1 += R[j+k+i*N+tid*N]*k1[j+i*Y];
                    v2 += R[j+k+i*N+tid*N]*k2[j+i*Y];
                }
            }
            Rx[k+tid*Nout] = v1;
            Ry[k+tid*Nout] = v2;
        }
    }
}

void kernelCPU(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2){
    float v1, v2;
    for(int h=0 ; h<Mout ; h++){
        for(int k=0; k<Nout ; k++){
            v1 = 0;
            v2 = 0;
            for(int i = 0; i<Y ; i++){
                for(int j = 0; j<X ; j++){
                    v1 += R[j+k+i*N+h*N]*k1[j+i*Y];
                    v2 += R[j+k+i*N+h*N]*k2[j+i*Y];
                }
            }
            Rx[k+h*Nout] = v1;
            Ry[k+h*Nout] = v2;
        }
    }
}

void blancoynegro(float* R, float* G, float* B, int M, int N){
    float prom = 0;
    int imsize = (M) * (N);
    for(int i = 0; i < imsize; i++){
        prom = (R[i]+G[i]+B[i] )/ 3;
        (R[i]) = prom;
        (G[i]) = prom;
        (B[i]) = prom;
    }
}

void copiar(float *Rhost, float *Ghost, float *Bhost, float *Rxhost, float *Ryhost, int Mout, int Nout){
    float tmp;
    //norma
    for(int i = 0; i < Mout*Nout; i++){
        tmp = sqrt( (pow(Rxhost[i], 2)+ pow(Ryhost[i], 2)) );
        if(tmp > 1) tmp = 1;
        Rhost[i] = tmp;
        Ghost[i] = tmp;
        Bhost[i] = tmp;
    }

    Write(Rhost, Ghost, Bhost, Mout, Nout, "salida.txt");
}

void callKernelFila(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    float *Rdev, *Rx, *Ry, *Rxhost, *Ryhost, dt;
    cudaEvent_t ct1, ct2;
    int *k1dev, *k2dev;
    
    int GS = (int)ceil((float) Mout / BS);

    cudaMalloc((void**)&Rdev, M * N * sizeof(float));
    //cudaMemcpy(Rdev, Rhost, M * N * sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(Rdev, Rhost, M * N * sizeof(float), cudaMemcpyHostToDevice);
    cudaCheckError(1);

    cudaMalloc((void**)&k1dev, X * Y * sizeof(int));
    cudaMalloc((void**)&k2dev, X * Y * sizeof(int));
    cudaMemcpy(k1dev, k1, X * Y * sizeof(int), cudaMemcpyHostToDevice);
    cudaMemcpy(k2dev, k2, X * Y * sizeof(int), cudaMemcpyHostToDevice);
    cudaCheckError(2);

    cudaMalloc((void**)&Rx, Mout * Nout * sizeof(float));
    cudaMalloc((void**)&Ry, Mout * Nout * sizeof(float));
    cudaCheckError(3);

    cudaEventCreate(&ct1);
    cudaEventCreate(&ct2);
    cudaEventRecord(ct1);

    kernelFila<<<GS, BS>>>(Rdev, Rx, Ry, M, N, Mout, Nout, k1dev, k2dev);
    // cudaCheckError(4);

    Rxhost = new float[Mout*Nout];
	Ryhost = new float[Mout*Nout];
    cudaMemcpy(Rxhost, Rx, Mout * Nout * sizeof(float), cudaMemcpyDeviceToHost);
	cudaMemcpy(Ryhost, Ry, Mout * Nout * sizeof(float), cudaMemcpyDeviceToHost);
    
    cudaEventRecord(ct2);
    cudaEventSynchronize(ct2);
    cudaEventElapsedTime(&dt, ct1, ct2);
    cout << "Tiempo GPU una hebra por fila: " << dt << "[ms]" << endl;
    // cudaCheckError(5);

    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rxhost, Ryhost, Mout, Nout);

}

void callCPU(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    clock_t t1, t2;
    double ms;
    t1 = clock();
    float *Rx = new float[Mout*Nout];
    float *Ry = new float[Mout*Nout];
    kernelCPU(Rhost, Rx, Ry, M, N, Mout, Nout, k1, k2);
    t2 = clock();
    ms = 1000.0 * (double)(t2 - t1) / CLOCKS_PER_SEC;
    cout << "Tiempo CPU es: "<< ms << "[ms]" << endl;

    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rx, Ry, Mout, Nout);
}

void callKernelConv(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    float *Rdev, *Rx, *Ry, *Rxhost, *Ryhost, dt;
    cudaEvent_t ct1, ct2;
    int *k1dev, *k2dev;
    
    int GS = (int)ceil((float) Mout*Nout / BS);

    cudaCheckError(1);

    cudaMalloc((void**)&k1dev, X * Y * sizeof(int));
    cudaMalloc((void**)&k2dev, X * Y * sizeof(int));
    cudaMemcpy(k1dev, k1, X * Y * sizeof(int), cudaMemcpyHostToDevice);
    cudaMemcpy(k2dev, k2, X * Y * sizeof(int), cudaMemcpyHostToDevice);
    cudaCheckError(2);

    cudaMalloc((void**)&Rx, Mout * Nout * sizeof(float));
    cudaMalloc((void**)&Ry, Mout * Nout * sizeof(float));
    cudaCheckError(3);
    cudaMalloc((void**)&Rdev, M * N * sizeof(float));
    
    Rxhost = new float[Mout*Nout];
	Ryhost = new float[Mout*Nout];

    cudaEventCreate(&ct1);
    cudaEventCreate(&ct2);
    cudaEventRecord(ct1);
    
    cudaMemcpy(Rdev, Rhost, M * N * sizeof(float), cudaMemcpyHostToDevice);

    kernelConvolucion<<<GS, BS>>>(Rdev, Rx, Ry, M, N, Mout, Nout, k1dev, k2dev);
    cudaCheckError(4);

    cudaMemcpy(Rxhost, Rx, Mout * Nout * sizeof(float), cudaMemcpyDeviceToHost);
	cudaMemcpy(Ryhost, Ry, Mout * Nout * sizeof(float), cudaMemcpyDeviceToHost);
    cudaCheckError(5);

    cudaEventRecord(ct2);
    cudaEventSynchronize(ct2);
    cudaEventElapsedTime(&dt, ct1, ct2);
    cout << "Tiempo GPU una hebra por convolucion: " << dt << "[ms]" << endl;
    
    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rxhost, Ryhost, Mout, Nout);
}

void callKernelStream(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    cudaStream_t streams[cantStream];
    float *Rdev, *Rxhost, *Ryhost, dt;
    float *RxStream1;
    float *RyStream1;
    cudaEvent_t ct1, ct2;
    int *k1dev, *k2dev;

    cudaMallocHost((void **)&Rxhost, Mout * Nout * sizeof(float));
    cudaMallocHost((void **)&Ryhost,  Mout * Nout * sizeof(float));

    // int cantStream = 4;
    int GS = (int)ceil((float) (Mout/cantStream)*Nout / BS);
    int GS4 = (int)ceil((float) ((Mout+Mout%cantStream)/cantStream)*Nout / BS);

    int size = (int)(Mout/cantStream)*Nout;
    // int size4 = (int)((Mout/cantStream)+Mout%cantStream)*Nout;   

    cudaMalloc((void **)&RxStream1, size*cantStream * sizeof(float));
    cudaMalloc((void **)&RyStream1, size*cantStream * sizeof(float));
    
    // copiar el kernel de convolucion a memoria de gpu
    cudaMalloc((void **)&k1dev, X * Y * sizeof(float));
    cudaMalloc((void **)&k2dev, X * Y * sizeof(float));
    cudaMemcpy(k1dev, k1, X * Y * sizeof(float), cudaMemcpyHostToDevice);
    cudaMemcpy(k2dev, k2, X * Y * sizeof(float), cudaMemcpyHostToDevice);
    
    float * RH;
    cudaMallocHost((void **)&RH, M * N * sizeof(float)); //para copiar a los streams de forma eficiente

    for(int i = 0; i < M*N; i++){
        RH[i] = Rhost[i];
    }

    int sizeFull = (int)(M/cantStream)*N;
    int sizeFullOut = (int)(Mout/cantStream)*Nout;
    
    cudaMalloc((void **)&Rdev, (sizeFull)* cantStream * sizeof(float));

    cudaEventCreate(&ct1);
    cudaEventCreate(&ct2);
    cudaEventRecord(ct1);

    for(int i = 0; i < cantStream; i++){
        cudaStreamCreate(&streams[i]);
        cudaMemcpyAsync(&Rdev[i*sizeFull], &RH[i*sizeFull], (sizeFull) * sizeof(float), cudaMemcpyHostToDevice, streams[i]);
        kernelStream<<<GS, BS, 0, streams[i]>>>(Rdev+i*sizeFull, RxStream1+i*size, RyStream1+i*size, M, N, Mout, Nout, k1dev, k2dev, size);
        cudaMemcpyAsync(&Rxhost[i*sizeFullOut], RxStream1+i*size, size*sizeof(float), cudaMemcpyDeviceToHost, streams[i]);
        cudaMemcpyAsync(&Ryhost[i*sizeFullOut], RyStream1+i*size, size*sizeof(float), cudaMemcpyDeviceToHost, streams[i]);
    }

    cudaEventRecord(ct2);
    cudaEventSynchronize(ct2);
    cudaEventElapsedTime(&dt, ct1, ct2);
	printf("Tiempo GPU Streams: %f[ms]\n", dt);

    cudaDeviceSynchronize();


    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rxhost, Ryhost, Mout, Nout);
    
}

int main(){

    //inicializacion
    //se convierte la imagen a blanco y negro
    float *Rhost, *Ghost, *Bhost;
    int M, N, Mout, Nout; //M filas, N columnas

    ofstream file;
    file.open("name.txt");

    string name;
    cout << "Ingrese el nombre de la foto sin la extension: ";
    cin >> name;
    file << name;
    file.close();
    RGBtoTXT();

    name.append(".txt");

    char Name[500];
    for(int i = 0; i < name.size(); i++){
        Name[i] = name[i];
    }
    Name[name.size()] = '\0';

    Read(&Rhost, &Ghost, &Bhost, &M, &N, Name); 
    blancoynegro(Rhost, Ghost, Bhost, M, N);
    Nout = N - 2;
	Mout = M - 2;
    
    int *k1{ new int[9]{ -1, 0, 1, -2, 0, 2, -1, 0, 1 } };
    int *k2{ new int[9]{ -1, -2, -1, 0, 0, 0, 1, 2, 1 } };

    // llamada a la implementacion de cpu
    callCPU(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    // llamada a la implementación del kernel usando una hebra por fila. 
    callKernelFila(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    // llamada a la implementación del kernel usando una hebra por fila. 
    callKernelConv(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    // llamada al kernel usando streams y un kernel por calculo.
    callKernelStream(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    return 0;
}
	.file	"tmpxft_002f696e_00000000-6_main.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB3782:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE3782:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4507:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4507:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Reconstruyendo Imagen..."
.LC1:
	.string	"python TXTtoRGB.py"
	.text
	.globl	_Z8TXTtoRGBv
	.type	_Z8TXTtoRGBv, @function
_Z8TXTtoRGBv:
.LFB3766:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	.LC0(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC1(%rip), %rdi
	call	system@PLT
	movl	$1, %eax
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3766:
	.size	_Z8TXTtoRGBv, .-_Z8TXTtoRGBv
	.section	.rodata.str1.1
.LC2:
	.string	"Transformando Imagen..."
.LC3:
	.string	"python IMGtoTXT.py < name.txt"
	.text
	.globl	_Z8RGBtoTXTv
	.type	_Z8RGBtoTXTv, @function
_Z8RGBtoTXTv:
.LFB3767:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	.LC2(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	leaq	.LC3(%rip), %rdi
	call	system@PLT
	movl	$1, %eax
	popq	%rdx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3767:
	.size	_Z8RGBtoTXTv, .-_Z8RGBtoTXTv
	.section	.rodata.str1.1
.LC4:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/RodrigoCaya/CUDA/main/Proyecto/main.cu"
.LC5:
	.string	"%d.- Cuda failure %s:%d: '%s'\n"
	.text
	.globl	_Z14cudaCheckErrori
	.type	_Z14cudaCheckErrori, @function
_Z14cudaCheckErrori:
.LFB3768:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	call	cudaGetLastError@PLT
	testl	%eax, %eax
	je	.L7
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movl	$2, %edi
	movl	$66, %r8d
	movl	%ebx, %edx
	movq	%rax, %r9
	leaq	.LC4(%rip), %rcx
	leaq	.LC5(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%edi, %edi
	call	exit@PLT
.L7:
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3768:
	.size	_Z14cudaCheckErrori, .-_Z14cudaCheckErrori
	.section	.rodata.str1.1
.LC6:
	.string	"w"
.LC7:
	.string	"%d %d\n"
.LC8:
	.string	"%f "
.LC9:
	.string	"%f\n"
	.text
	.globl	_Z5WritePfS_S_iiPKc
	.type	_Z5WritePfS_S_iiPKc, @function
_Z5WritePfS_S_iiPKc:
.LFB3769:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%r8d, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	xorl	%r14d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movq	%rdi, %r12
	movq	%r9, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rsi, %rbp
	leaq	.LC6(%rip), %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	fopen@PLT
	movl	%r15d, %r8d
	imull	%r13d, %r15d
	movl	%r13d, %ecx
	movq	%rax, 8(%rsp)
	movq	%rax, %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	leaq	.LC7(%rip), %rdx
	call	__fprintf_chk@PLT
	leal	-1(%r15), %r13d
.L12:
	cmpl	%r14d, %r13d
	jle	.L19
	movq	8(%rsp), %rdi
	leaq	.LC8(%rip), %rdx
	movl	$2, %esi
	movb	$1, %al
	cvtss2sd	(%r12,%r14,4), %xmm0
	incq	%r14
	call	__fprintf_chk@PLT
	jmp	.L12
.L19:
	movq	8(%rsp), %rdi
	movslq	%r15d, %r15
	movl	$2, %esi
	movb	$1, %al
	leaq	.LC9(%rip), %rdx
	cvtss2sd	-4(%r12,%r15,4), %xmm0
	leaq	0(,%r15,4), %r14
	xorl	%r12d, %r12d
	call	__fprintf_chk@PLT
	leaq	.LC8(%rip), %r15
.L14:
	cmpl	%r12d, %r13d
	jle	.L20
	movq	8(%rsp), %rdi
	movq	%r15, %rdx
	movl	$2, %esi
	movb	$1, %al
	cvtss2sd	0(%rbp,%r12,4), %xmm0
	incq	%r12
	call	__fprintf_chk@PLT
	jmp	.L14
.L20:
	movq	8(%rsp), %rdi
	movl	$2, %esi
	movb	$1, %al
	xorl	%r15d, %r15d
	leaq	.LC9(%rip), %rdx
	cvtss2sd	-4(%rbp,%r14), %xmm0
	leaq	.LC8(%rip), %rbp
	call	__fprintf_chk@PLT
.L16:
	cmpl	%r15d, %r13d
	jle	.L21
	movq	8(%rsp), %rdi
	movq	%rbp, %rdx
	movl	$2, %esi
	movb	$1, %al
	cvtss2sd	(%rbx,%r15,4), %xmm0
	incq	%r15
	call	__fprintf_chk@PLT
	jmp	.L16
.L21:
	movq	8(%rsp), %rdi
	leaq	.LC9(%rip), %rdx
	movl	$2, %esi
	movb	$1, %al
	cvtss2sd	-4(%rbx,%r14), %xmm0
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	fclose@PLT
	.cfi_endproc
.LFE3769:
	.size	_Z5WritePfS_S_iiPKc, .-_Z5WritePfS_S_iiPKc
	.section	.rodata.str1.1
.LC10:
	.string	"r"
	.text
	.globl	_Z4ReadPPfS0_S0_PiS1_PKc
	.type	_Z4ReadPPfS0_S0_PiS1_PKc, @function
_Z4ReadPPfS0_S0_PiS1_PKc:
.LFB3770:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movq	%rdi, %r15
	movq	%r9, %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%rsi, %r14
	leaq	.LC10(%rip), %rsi
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r8, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rcx, %rbx
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%rdx, 8(%rsp)
	call	fopen@PLT
	movq	%rbx, %rdx
	movq	%rbp, %rcx
	leaq	.LC7(%rip), %rsi
	movq	%rax, (%rsp)
	movq	%rax, %rdi
	xorl	%eax, %eax
	call	__isoc23_fscanf@PLT
	movl	(%rbx), %ebx
	imull	0(%rbp), %ebx
	movabsq	$2305843009213693950, %rdx
	movslq	%ebx, %rax
	cmpq	%rax, %rdx
	jb	.L23
	leaq	0(,%rax,4), %rbp
	movq	%rbp, %rdi
	call	_Znam@PLT
	movq	%rbp, %rdi
	movq	%rax, %r13
	call	_Znam@PLT
	movq	%rbp, %rdi
	movq	%rax, %r12
	call	_Znam@PLT
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	movq	%rax, %rbp
	jmp	.L24
.L23:
	call	__cxa_throw_bad_array_new_length@PLT
.L24:
	cmpl	%ebx, %ecx
	jge	.L31
	movq	(%rsp), %rdi
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	movl	%ecx, 28(%rsp)
	movq	%rdx, 16(%rsp)
	call	__isoc23_fscanf@PLT
	movl	28(%rsp), %ecx
	movq	16(%rsp), %rdx
	incl	%ecx
	addq	$4, %rdx
	jmp	.L24
.L31:
	movq	%r12, %rdx
	xorl	%ecx, %ecx
.L26:
	cmpl	%ebx, %ecx
	jge	.L32
	movq	(%rsp), %rdi
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	movl	%ecx, 28(%rsp)
	movq	%rdx, 16(%rsp)
	call	__isoc23_fscanf@PLT
	movl	28(%rsp), %ecx
	movq	16(%rsp), %rdx
	incl	%ecx
	addq	$4, %rdx
	jmp	.L26
.L32:
	movq	%rbp, %rdx
	xorl	%ecx, %ecx
.L28:
	cmpl	%ebx, %ecx
	jge	.L33
	movq	(%rsp), %rdi
	leaq	.LC8(%rip), %rsi
	xorl	%eax, %eax
	movl	%ecx, 28(%rsp)
	movq	%rdx, 16(%rsp)
	call	__isoc23_fscanf@PLT
	movl	28(%rsp), %ecx
	movq	16(%rsp), %rdx
	incl	%ecx
	addq	$4, %rdx
	jmp	.L28
.L33:
	movq	(%rsp), %rdi
	call	fclose@PLT
	movq	8(%rsp), %rax
	movq	%r13, (%r15)
	movq	%r12, (%r14)
	movq	%rbp, (%rax)
	addq	$40, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3770:
	.size	_Z4ReadPPfS0_S0_PiS1_PKc, .-_Z4ReadPPfS0_S0_PiS1_PKc
	.globl	_Z9kernelCPUPfS_S_iiiiPiS0_
	.type	_Z9kernelCPUPfS_S_iiiiPiS0_, @function
_Z9kernelCPUPfS_S_iiiiPiS0_:
.LFB3771:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%r8d, %rax
	movq	%rsi, %r10
	xorl	%r11d, %r11d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	salq	$2, %rax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rdx, -8(%rsp)
	movq	%rax, -16(%rsp)
.L35:
	cmpl	%r9d, %r13d
	jge	.L34
	movslq	%r12d, %rax
	movq	-8(%rsp), %rdx
	leaq	0(%rbp,%rax,4), %rbx
	movslq	%r11d, %rax
	salq	$2, %rax
	leaq	(%r10,%rax), %r15
	addq	%rdx, %rax
	movq	%rax, -24(%rsp)
	xorl	%eax, %eax
.L40:
	cmpl	%eax, 56(%rsp)
	jle	.L44
	xorps	%xmm0, %xmm0
	movq	%rbx, %r14
	xorl	%esi, %esi
	movaps	%xmm0, %xmm1
.L38:
	imulq	$12, %rsi, %rcx
	xorl	%edx, %edx
.L36:
	movq	64(%rsp), %rdi
	movss	(%r14,%rdx), %xmm3
	addq	$4, %rdx
	cvtsi2ssl	(%rdi,%rcx), %xmm2
	movq	72(%rsp), %rdi
	mulss	%xmm3, %xmm2
	addss	%xmm2, %xmm1
	cvtsi2ssl	(%rdi,%rcx), %xmm2
	addq	$4, %rcx
	mulss	%xmm3, %xmm2
	addss	%xmm2, %xmm0
	cmpq	$12, %rdx
	jne	.L36
	movq	-16(%rsp), %rcx
	incq	%rsi
	addq	%rcx, %r14
	cmpq	$3, %rsi
	jne	.L38
	movq	-24(%rsp), %rcx
	movss	%xmm1, (%r15,%rax,4)
	addq	$4, %rbx
	movss	%xmm0, (%rcx,%rax,4)
	incq	%rax
	jmp	.L40
.L44:
	incl	%r13d
	addl	%r8d, %r12d
	addl	56(%rsp), %r11d
	jmp	.L35
.L34:
	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
.LFE3771:
	.size	_Z9kernelCPUPfS_S_iiiiPiS0_, .-_Z9kernelCPUPfS_S_iiiiPiS0_
	.globl	_Z12blancoynegroPfS_S_ii
	.type	_Z12blancoynegroPfS_S_ii, @function
_Z12blancoynegroPfS_S_ii:
.LFB3772:
	.cfi_startproc
	endbr64
	imull	%r8d, %ecx
	movss	.LC12(%rip), %xmm1
	xorl	%eax, %eax
.L46:
	cmpl	%eax, %ecx
	jle	.L48
	movss	(%rdi,%rax,4), %xmm0
	addss	(%rsi,%rax,4), %xmm0
	addss	(%rdx,%rax,4), %xmm0
	divss	%xmm1, %xmm0
	movss	%xmm0, (%rdi,%rax,4)
	movss	%xmm0, (%rsi,%rax,4)
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L46
.L48:
	ret
	.cfi_endproc
.LFE3772:
	.size	_Z12blancoynegroPfS_S_ii, .-_Z12blancoynegroPfS_S_ii
	.section	.rodata.str1.1
.LC14:
	.string	"salida.txt"
	.text
	.globl	_Z6copiarPfS_S_S_S_ii
	.type	_Z6copiarPfS_S_S_S_ii, @function
_Z6copiarPfS_S_S_S_ii:
.LFB3773:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%r9d, %r15d
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%r9d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r8, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rcx, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xorl	%ebx, %ebx
	subq	$32, %rsp
	.cfi_def_cfa_offset 80
	movl	80(%rsp), %r8d
	imull	%r8d, %r13d
.L50:
	cmpl	%ebx, %r13d
	jle	.L55
	cvtss2sd	0(%rbp,%rbx,4), %xmm0
	cvtss2sd	(%r12,%rbx,4), %xmm1
	mulsd	%xmm0, %xmm0
	movl	%r8d, 28(%rsp)
	mulsd	%xmm1, %xmm1
	movq	%rdx, 16(%rsp)
	movq	%rsi, 8(%rsp)
	movq	%rdi, (%rsp)
	addsd	%xmm1, %xmm0
	call	sqrt@PLT
	movq	(%rsp), %rdi
	movq	8(%rsp), %rsi
	cvtsd2ss	%xmm0, %xmm0
	movq	16(%rsp), %rdx
	movl	28(%rsp), %r8d
	movss	.LC13(%rip), %xmm2
	minss	%xmm0, %xmm2
	movss	%xmm2, (%rdi,%rbx,4)
	movss	%xmm2, (%rsi,%rbx,4)
	movss	%xmm2, (%rdx,%rbx,4)
	incq	%rbx
	jmp	.L50
.L55:
	addq	$32, %rsp
	.cfi_def_cfa_offset 48
	movl	%r15d, %ecx
	leaq	.LC14(%rip), %r9
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z5WritePfS_S_iiPKc
	.cfi_endproc
.LFE3773:
	.size	_Z6copiarPfS_S_S_S_ii, .-_Z6copiarPfS_S_S_S_ii
	.section	.rodata.str1.1
.LC17:
	.string	"Tiempo CPU es: "
.LC18:
	.string	"[ms]"
	.text
	.globl	_Z7callCPUPfiiiiPiS0_
	.type	_Z7callCPUPfiiiiPiS0_, @function
_Z7callCPUPfiiiiPiS0_:
.LFB3775:
	.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
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ecx, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movl	%edx, 44(%rsp)
	movq	112(%rsp), %r15
	movq	%rdi, 32(%rsp)
	call	clock@PLT
	movabsq	$2305843009213693950, %rdx
	movq	%rax, %r12
	movl	%ebx, %eax
	imull	%ebp, %eax
	cltq
	cmpq	%rax, %rdx
	jb	.L57
	salq	$2, %rax
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movq	8(%rsp), %rdi
	movq	%rax, 16(%rsp)
	call	_Znam@PLT
	movl	%ebx, %r9d
	movl	%r13d, %r8d
	movq	%rax, 24(%rsp)
	pushq	%rax
	.cfi_def_cfa_offset 120
	pushq	%r15
	.cfi_def_cfa_offset 128
	pushq	%r14
	.cfi_def_cfa_offset 136
	pushq	%rbp
	.cfi_def_cfa_offset 144
	movq	56(%rsp), %rdx
	movl	76(%rsp), %ecx
	movq	48(%rsp), %rsi
	movq	64(%rsp), %rdi
	call	_Z9kernelCPUPfS_S_iiiiPiS0_
	addq	$32, %rsp
	.cfi_def_cfa_offset 112
	call	clock@PLT
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	subq	%r12, %rax
	cvtsi2sdq	%rax, %xmm0
	mulsd	.LC15(%rip), %xmm0
	divsd	.LC16(%rip), %xmm0
	movsd	%xmm0, 32(%rsp)
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	32(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	8(%rsp), %rdi
	call	_Znam@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r13
	call	_Znam@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r14
	call	_Znam@PLT
	movl	%ebp, 112(%rsp)
	movl	%ebx, %r9d
	movq	%r14, %rsi
	movq	24(%rsp), %r8
	movq	16(%rsp), %rcx
	movq	%r13, %rdi
	movq	%rax, %rdx
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	_Z6copiarPfS_S_S_S_ii
.L57:
	.cfi_restore_state
	call	__cxa_throw_bad_array_new_length@PLT
	.cfi_endproc
.LFE3775:
	.size	_Z7callCPUPfiiiiPiS0_, .-_Z7callCPUPfiiiiPiS0_
	.globl	_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i
	.type	_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i, @function
_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i:
.LFB3804:
	.cfi_startproc
	endbr64
	subq	$232, %rsp
	.cfi_def_cfa_offset 240
	movq	248(%rsp), %rax
	movq	%rdi, 56(%rsp)
	leaq	88(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	100(%rsp), %rsi
	movq	%rax, 16(%rsp)
	movq	256(%rsp), %rax
	movq	%rdx, 40(%rsp)
	leaq	72(%rsp), %rdx
	movl	%ecx, 36(%rsp)
	leaq	80(%rsp), %rcx
	movl	%r8d, 32(%rsp)
	movl	%r9d, 28(%rsp)
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 96(%rsp)
	movq	%rax, 136(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	28(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	240(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 192(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 200(%rsp)
	leaq	264(%rsp), %rax
	movq	%rax, 208(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 88(%rsp)
	movq	%rax, 100(%rsp)
	movl	$1, 108(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L59
	pushq	80(%rsp)
	.cfi_def_cfa_offset 248
	leaq	_Z12kernelStreamPfS_S_iiiiPiS0_i(%rip), %rdi
	pushq	80(%rsp)
	.cfi_def_cfa_offset 256
	movq	116(%rsp), %rcx
	movl	124(%rsp), %r8d
	movq	104(%rsp), %rsi
	movl	112(%rsp), %edx
	leaq	152(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 248
	popq	%rdx
	.cfi_def_cfa_offset 240
.L59:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	je	.L61
	call	__stack_chk_fail@PLT
.L61:
	addq	$232, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3804:
	.size	_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i, .-_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i
	.globl	_Z12kernelStreamPfS_S_iiiiPiS0_i
	.type	_Z12kernelStreamPfS_S_iiiiPiS0_i, @function
_Z12kernelStreamPfS_S_iiiiPiS0_i:
.LFB3805:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i
	.cfi_endproc
.LFE3805:
	.size	_Z12kernelStreamPfS_S_iiiiPiS0_i, .-_Z12kernelStreamPfS_S_iiiiPiS0_i
	.section	.rodata.str1.1
.LC20:
	.string	"Tiempo GPU Streams: %f[ms]\n"
	.text
	.globl	_Z16callKernelStreamPfiiiiPiS0_
	.type	_Z16callKernelStreamPfiiiiPiS0_, @function
_Z16callKernelStreamPfiiiiPiS0_:
.LFB3777:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %r15d
	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
	movl	%r8d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%r9, %rbx
	subq	$232, %rsp
	.cfi_def_cfa_offset 288
	movl	%edx, 48(%rsp)
	leaq	72(%rsp), %rdi
	movq	288(%rsp), %r14
	movl	%ecx, 20(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	movl	%ecx, %eax
	imull	%r8d, %eax
	cltq
	movq	%rax, 32(%rsp)
	salq	$2, %rax
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	call	cudaMallocHost@PLT
	movq	8(%rsp), %rsi
	leaq	80(%rsp), %rdi
	call	cudaMallocHost@PLT
	movl	20(%rsp), %eax
	movl	$6, %ecx
	cvtsi2ssl	%r12d, %xmm1
	cltd
	idivl	%ecx
	cvtsi2ssl	%eax, %xmm0
	movl	%eax, %r13d
	imull	%r12d, %r13d
	mulss	%xmm1, %xmm0
	mulss	.LC19(%rip), %xmm0
	call	ceilf@PLT
	imull	$6, %r13d, %esi
	leaq	88(%rsp), %rdi
	cvttss2sil	%xmm0, %eax
	movslq	%esi, %rsi
	salq	$2, %rsi
	movq	%rsi, 24(%rsp)
	movl	%eax, 52(%rsp)
	call	cudaMalloc@PLT
	movq	24(%rsp), %rsi
	leaq	96(%rsp), %rdi
	call	cudaMalloc@PLT
	leaq	120(%rsp), %rdi
	movl	$36, %esi
	call	cudaMalloc@PLT
	leaq	128(%rsp), %rdi
	movl	$36, %esi
	call	cudaMalloc@PLT
	movq	120(%rsp), %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	movl	$36, %edx
	call	cudaMemcpy@PLT
	movq	128(%rsp), %rdi
	movl	$36, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	call	cudaMemcpy@PLT
	movl	48(%rsp), %ebx
	leaq	136(%rsp), %rdi
	imull	%r15d, %ebx
	movslq	%ebx, %rsi
	salq	$2, %rsi
	call	cudaMallocHost@PLT
	movq	136(%rsp), %rdx
	xorl	%eax, %eax
.L65:
	cmpl	%eax, %ebx
	jle	.L75
	movss	0(%rbp,%rax,4), %xmm0
	movss	%xmm0, (%rdx,%rax,4)
	incq	%rax
	jmp	.L65
.L75:
	movl	48(%rsp), %eax
	movl	$6, %ecx
	leaq	64(%rsp), %rdi
	xorl	%ebp, %ebp
	xorl	%r14d, %r14d
	cltd
	idivl	%ecx
	imull	%r15d, %eax
	movslq	%eax, %rbx
	imull	$6, %ebx, %esi
	movslq	%esi, %rsi
	salq	$2, %rsi
	call	cudaMalloc@PLT
	leaq	104(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	112(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	104(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	leaq	0(,%rbx,4), %rax
	leaq	168(%rsp), %rbx
	movq	%rax, 40(%rsp)
	movslq	%r13d, %rax
	salq	$2, %rax
	movq	%rax, 24(%rsp)
	leaq	216(%rsp), %rax
	movq	%rax, 56(%rsp)
.L68:
	movq	%rbx, %rdi
	call	cudaStreamCreate@PLT
	movq	136(%rsp), %rsi
	movq	64(%rsp), %rdi
	movl	$1, %ecx
	movq	(%rbx), %r8
	movq	40(%rsp), %rdx
	addq	%r14, %rsi
	addq	%r14, %rdi
	call	cudaMemcpyAsync@PLT
	movl	$16777217, %eax
	movq	(%rbx), %r9
	xorl	%r8d, %r8d
	salq	$8, %rax
	movl	$16777217, %edx
	movl	$1, %ecx
	movl	$1, 164(%rsp)
	movq	%rax, 156(%rsp)
	movl	52(%rsp), %eax
	salq	$8, %rdx
	movl	%eax, 144(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 148(%rsp)
	movq	144(%rsp), %rdi
	movl	152(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L67
	movq	96(%rsp), %rdx
	movq	88(%rsp), %rsi
	movl	%r15d, %r8d
	movq	64(%rsp), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 296
	pushq	136(%rsp)
	.cfi_def_cfa_offset 304
	addq	%rbp, %rdx
	addq	%rbp, %rsi
	pushq	136(%rsp)
	.cfi_def_cfa_offset 312
	addq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 320
	movl	52(%rsp), %r9d
	movl	80(%rsp), %ecx
	call	_Z46__device_stub__Z12kernelStreamPfS_S_iiiiPiS0_iPfS_S_iiiiPiS0_i
	addq	$32, %rsp
	.cfi_def_cfa_offset 288
.L67:
	movq	88(%rsp), %rsi
	movq	72(%rsp), %rdi
	movl	$2, %ecx
	addq	$8, %rbx
	movq	-8(%rbx), %r8
	movq	24(%rsp), %rdx
	addq	%rbp, %rsi
	addq	%rbp, %rdi
	call	cudaMemcpyAsync@PLT
	movq	96(%rsp), %rsi
	movq	80(%rsp), %rdi
	movl	$2, %ecx
	movq	-8(%rbx), %r8
	movq	24(%rsp), %rdx
	addq	%rbp, %rsi
	addq	%rbp, %rdi
	call	cudaMemcpyAsync@PLT
	movq	40(%rsp), %rax
	addq	%rax, %r14
	movq	24(%rsp), %rax
	addq	%rax, %rbp
	movq	56(%rsp), %rax
	cmpq	%rax, %rbx
	jne	.L68
	movq	112(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	112(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	112(%rsp), %rdx
	movq	104(%rsp), %rsi
	leaq	156(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC20(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	156(%rsp), %xmm0
	call	__printf_chk@PLT
	call	cudaDeviceSynchronize@PLT
	movq	32(%rsp), %rcx
	movabsq	$2305843009213693950, %rax
	cmpq	%rcx, %rax
	jb	.L69
	movq	8(%rsp), %rdi
	call	_Znam@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %rbx
	call	_Znam@PLT
	movq	8(%rsp), %rdi
	movq	%rax, %r13
	call	_Znam@PLT
	movq	%r13, %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	pushq	%rax
	.cfi_def_cfa_offset 296
	pushq	%r12
	.cfi_def_cfa_offset 304
	movl	36(%rsp), %r9d
	movq	96(%rsp), %r8
	movq	88(%rsp), %rcx
	call	_Z6copiarPfS_S_S_S_ii
	popq	%rdx
	.cfi_def_cfa_offset 296
	popq	%rcx
	.cfi_def_cfa_offset 288
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	je	.L71
	jmp	.L73
.L69:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L73
	call	__cxa_throw_bad_array_new_length@PLT
.L73:
	call	__stack_chk_fail@PLT
.L71:
	addq	$232, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3777:
	.size	_Z16callKernelStreamPfiiiiPiS0_, .-_Z16callKernelStreamPfiiiiPiS0_
	.globl	_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	.type	_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_, @function
_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_:
.LFB3806:
	.cfi_startproc
	endbr64
	subq	$216, %rsp
	.cfi_def_cfa_offset 224
	movq	232(%rsp), %rax
	movq	%rdi, 56(%rsp)
	leaq	80(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	92(%rsp), %rsi
	movq	%rax, 16(%rsp)
	movq	240(%rsp), %rax
	movq	%rdx, 40(%rsp)
	leaq	64(%rsp), %rdx
	movl	%ecx, 36(%rsp)
	leaq	72(%rsp), %rcx
	movl	%r8d, 32(%rsp)
	movl	%r9d, 28(%rsp)
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 200(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 88(%rsp)
	movq	%rax, 128(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	28(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	224(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 192(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	%rax, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L76
	pushq	72(%rsp)
	.cfi_def_cfa_offset 232
	leaq	_Z17kernelConvolucionPfS_S_iiiiPiS0_(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 240
	movq	108(%rsp), %rcx
	movl	116(%rsp), %r8d
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	leaq	144(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 232
	popq	%rdx
	.cfi_def_cfa_offset 224
.L76:
	movq	200(%rsp), %rax
	subq	%fs:40, %rax
	je	.L78
	call	__stack_chk_fail@PLT
.L78:
	addq	$216, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3806:
	.size	_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_, .-_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	.globl	_Z17kernelConvolucionPfS_S_iiiiPiS0_
	.type	_Z17kernelConvolucionPfS_S_iiiiPiS0_, @function
_Z17kernelConvolucionPfS_S_iiiiPiS0_:
.LFB3807:
	.cfi_startproc
	endbr64
	jmp	_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	.cfi_endproc
.LFE3807:
	.size	_Z17kernelConvolucionPfS_S_iiiiPiS0_, .-_Z17kernelConvolucionPfS_S_iiiiPiS0_
	.section	.rodata.str1.1
.LC21:
	.string	"Tiempo GPU una hebra por convolucion: "
	.text
	.globl	_Z14callKernelConvPfiiiiPiS0_
	.type	_Z14callKernelConvPfiiiiPiS0_, @function
_Z14callKernelConvPfiiiiPiS0_:
.LFB3776:
	.cfi_startproc
	endbr64
	cvtsi2ssl	%r8d, %xmm1
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	cvtsi2ssl	%ecx, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mulss	%xmm1, %xmm0
	movl	%ecx, %ebx
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	192(%rsp), %rax
	mulss	.LC19(%rip), %xmm0
	movq	%rdi, 24(%rsp)
	movq	%rax, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	call	ceilf@PLT
	movl	$1, %edi
	cvttss2sil	%xmm0, %r15d
	call	_Z14cudaCheckErrori
	leaq	80(%rsp), %rdi
	movl	$36, %esi
	call	cudaMalloc@PLT
	leaq	88(%rsp), %rdi
	movl	$36, %esi
	call	cudaMalloc@PLT
	movq	%r14, %rsi
	movq	80(%rsp), %rdi
	movl	%ebx, %r14d
	movl	$1, %ecx
	imull	%ebp, %r14d
	movl	$36, %edx
	call	cudaMemcpy@PLT
	movq	(%rsp), %rsi
	movq	88(%rsp), %rdi
	movl	$1, %ecx
	movl	$36, %edx
	call	cudaMemcpy@PLT
	movslq	%r14d, %r14
	movl	$2, %edi
	call	_Z14cudaCheckErrori
	leaq	0(,%r14,4), %rax
	leaq	48(%rsp), %rdi
	movq	%rax, %rsi
	movq	%rax, (%rsp)
	call	cudaMalloc@PLT
	movq	(%rsp), %rsi
	leaq	56(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	$3, %edi
	call	_Z14cudaCheckErrori
	movl	%r12d, %eax
	leaq	40(%rsp), %rdi
	imull	%r13d, %eax
	cltq
	salq	$2, %rax
	movq	%rax, %rsi
	movq	%rax, 8(%rsp)
	call	cudaMalloc@PLT
	movabsq	$2305843009213693950, %rax
	cmpq	%r14, %rax
	jb	.L82
	movq	(%rsp), %rdi
	call	_Znam@PLT
	movq	(%rsp), %rdi
	movq	%rax, 16(%rsp)
	call	_Znam@PLT
	leaq	64(%rsp), %rdi
	movq	%rax, %r14
	call	cudaEventCreate@PLT
	leaq	72(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	8(%rsp), %rdx
	movq	24(%rsp), %rsi
	movl	$1, %ecx
	movq	40(%rsp), %rdi
	call	cudaMemcpy@PLT
	movl	%r15d, 96(%rsp)
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movabsq	$4294967297, %rax
	movl	$16777217, %edx
	movl	$1, %ecx
	movl	$1, 116(%rsp)
	movq	%rax, 100(%rsp)
	movq	96(%rsp), %rdi
	salq	$8, %rdx
	movl	104(%rsp), %esi
	movq	%rdx, 108(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L83
	pushq	%rsi
	.cfi_def_cfa_offset 200
	movl	%ebx, %r9d
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	pushq	96(%rsp)
	.cfi_def_cfa_offset 208
	pushq	96(%rsp)
	.cfi_def_cfa_offset 216
	pushq	%rbp
	.cfi_def_cfa_offset 224
	movq	88(%rsp), %rdx
	movq	80(%rsp), %rsi
	movq	72(%rsp), %rdi
	call	_Z50__device_stub__Z17kernelConvolucionPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	addq	$32, %rsp
	.cfi_def_cfa_offset 192
	jmp	.L83
.L82:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L89
	call	__cxa_throw_bad_array_new_length@PLT
.L83:
	movl	$4, %edi
	call	_Z14cudaCheckErrori
	movq	(%rsp), %rdx
	movq	48(%rsp), %rsi
	movl	$2, %ecx
	movq	16(%rsp), %rdi
	call	cudaMemcpy@PLT
	movq	(%rsp), %rdx
	movq	56(%rsp), %rsi
	movq	%r14, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movl	$5, %edi
	call	_Z14cudaCheckErrori
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	72(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	72(%rsp), %rdx
	movq	64(%rsp), %rsi
	leaq	108(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC21(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	108(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	(%rsp), %rdi
	call	_Znam@PLT
	movq	(%rsp), %rdi
	movq	%rax, %r12
	call	_Znam@PLT
	movq	(%rsp), %rdi
	movq	%rax, %r13
	call	_Znam@PLT
	movl	%ebx, %r9d
	movq	%r14, %r8
	movq	%r13, %rsi
	movq	%rax, %rdx
	pushq	%rax
	.cfi_def_cfa_offset 200
	movq	%r12, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 208
	movq	32(%rsp), %rcx
	call	_Z6copiarPfS_S_S_S_ii
	popq	%rdx
	.cfi_def_cfa_offset 200
	popq	%rcx
	.cfi_def_cfa_offset 192
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L86
.L89:
	call	__stack_chk_fail@PLT
.L86:
	addq	$136, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3776:
	.size	_Z14callKernelConvPfiiiiPiS0_, .-_Z14callKernelConvPfiiiiPiS0_
	.globl	_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	.type	_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_, @function
_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_:
.LFB3808:
	.cfi_startproc
	endbr64
	subq	$216, %rsp
	.cfi_def_cfa_offset 224
	movq	232(%rsp), %rax
	movq	%rdi, 56(%rsp)
	leaq	80(%rsp), %rdi
	movq	%rsi, 48(%rsp)
	leaq	92(%rsp), %rsi
	movq	%rax, 16(%rsp)
	movq	240(%rsp), %rax
	movq	%rdx, 40(%rsp)
	leaq	64(%rsp), %rdx
	movl	%ecx, 36(%rsp)
	leaq	72(%rsp), %rcx
	movl	%r8d, 32(%rsp)
	movl	%r9d, 28(%rsp)
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 200(%rsp)
	xorl	%eax, %eax
	leaq	56(%rsp), %rax
	movl	$1, 88(%rsp)
	movq	%rax, 128(%rsp)
	leaq	48(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	40(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	36(%rsp), %rax
	movq	%rax, 152(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 160(%rsp)
	leaq	28(%rsp), %rax
	movq	%rax, 168(%rsp)
	leaq	224(%rsp), %rax
	movq	%rax, 176(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 184(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 192(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 80(%rsp)
	movq	%rax, 92(%rsp)
	movl	$1, 100(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L90
	pushq	72(%rsp)
	.cfi_def_cfa_offset 232
	leaq	_Z10kernelFilaPfS_S_iiiiPiS0_(%rip), %rdi
	pushq	72(%rsp)
	.cfi_def_cfa_offset 240
	movq	108(%rsp), %rcx
	movl	116(%rsp), %r8d
	movq	96(%rsp), %rsi
	movl	104(%rsp), %edx
	leaq	144(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 232
	popq	%rdx
	.cfi_def_cfa_offset 224
.L90:
	movq	200(%rsp), %rax
	subq	%fs:40, %rax
	je	.L92
	call	__stack_chk_fail@PLT
.L92:
	addq	$216, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3808:
	.size	_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_, .-_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	.globl	_Z10kernelFilaPfS_S_iiiiPiS0_
	.type	_Z10kernelFilaPfS_S_iiiiPiS0_, @function
_Z10kernelFilaPfS_S_iiiiPiS0_:
.LFB3809:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	.cfi_endproc
.LFE3809:
	.size	_Z10kernelFilaPfS_S_iiiiPiS0_, .-_Z10kernelFilaPfS_S_iiiiPiS0_
	.section	.rodata.str1.1
.LC22:
	.string	"Tiempo GPU una hebra por fila: "
	.text
	.globl	_Z14callKernelFilaPfiiiiPiS0_
	.type	_Z14callKernelFilaPfiiiiPiS0_, @function
_Z14callKernelFilaPfiiiiPiS0_:
.LFB3774:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	cvtsi2ssl	%ecx, %xmm0
	movq	%rdi, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movq	%r9, %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%ecx, %ebx
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	192(%rsp), %rax
	mulss	.LC19(%rip), %xmm0
	movq	%rax, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	call	ceilf@PLT
	movl	%r12d, %edx
	leaq	40(%rsp), %rdi
	imull	%r13d, %edx
	movss	%xmm0, 28(%rsp)
	movslq	%edx, %rdx
	salq	$2, %rdx
	movq	%rdx, %rsi
	movq	%rdx, 16(%rsp)
	call	cudaMalloc@PLT
	movq	16(%rsp), %rdx
	movq	40(%rsp), %rdi
	movq	%r15, %rsi
	movl	$1, %ecx
	movl	%ebx, %r15d
	call	cudaMemcpy@PLT
	movl	$1, %edi
	imull	%ebp, %r15d
	call	_Z14cudaCheckErrori
	leaq	80(%rsp), %rdi
	movl	$36, %esi
	call	cudaMalloc@PLT
	leaq	88(%rsp), %rdi
	movl	$36, %esi
	call	cudaMalloc@PLT
	movq	80(%rsp), %rdi
	movq	%r14, %rsi
	movslq	%r15d, %r15
	movl	$1, %ecx
	movl	$36, %edx
	leaq	0(,%r15,4), %r14
	call	cudaMemcpy@PLT
	movq	8(%rsp), %rsi
	movq	88(%rsp), %rdi
	movl	$1, %ecx
	movl	$36, %edx
	call	cudaMemcpy@PLT
	movl	$2, %edi
	call	_Z14cudaCheckErrori
	leaq	48(%rsp), %rdi
	movq	%r14, %rsi
	call	cudaMalloc@PLT
	movq	%r14, %rsi
	leaq	56(%rsp), %rdi
	call	cudaMalloc@PLT
	movl	$3, %edi
	call	_Z14cudaCheckErrori
	leaq	64(%rsp), %rdi
	call	cudaEventCreate@PLT
	leaq	72(%rsp), %rdi
	call	cudaEventCreate@PLT
	movq	64(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movl	$16777217, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movss	28(%rsp), %xmm0
	salq	$8, %rdx
	movl	$1, %ecx
	movl	$1, 116(%rsp)
	movq	%rdx, 108(%rsp)
	cvttss2sil	%xmm0, %eax
	movl	%eax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 100(%rsp)
	movq	96(%rsp), %rdi
	movl	104(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L96
	pushq	%rsi
	.cfi_def_cfa_offset 200
	movl	%ebx, %r9d
	movl	%r13d, %r8d
	movl	%r12d, %ecx
	pushq	96(%rsp)
	.cfi_def_cfa_offset 208
	pushq	96(%rsp)
	.cfi_def_cfa_offset 216
	pushq	%rbp
	.cfi_def_cfa_offset 224
	movq	88(%rsp), %rdx
	movq	80(%rsp), %rsi
	movq	72(%rsp), %rdi
	call	_Z43__device_stub__Z10kernelFilaPfS_S_iiiiPiS0_PfS_S_iiiiPiS0_
	addq	$32, %rsp
	.cfi_def_cfa_offset 192
.L96:
	movabsq	$2305843009213693950, %rax
	cmpq	%r15, %rax
	jb	.L97
	movq	%r14, %rdi
	call	_Znam@PLT
	movq	%r14, %rdi
	movq	%rax, %r12
	call	_Znam@PLT
	movq	48(%rsp), %rsi
	movq	%r14, %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	movq	%rax, %r13
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rsi
	movq	%r14, %rdx
	movq	%r13, %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	movq	72(%rsp), %rdi
	xorl	%esi, %esi
	call	cudaEventRecord@PLT
	movq	72(%rsp), %rdi
	call	cudaEventSynchronize@PLT
	movq	72(%rsp), %rdx
	movq	64(%rsp), %rsi
	leaq	108(%rsp), %rdi
	call	cudaEventElapsedTime@PLT
	leaq	.LC22(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	cvtss2sd	108(%rsp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	movq	%r14, %rdi
	call	_Znam@PLT
	movq	%r14, %rdi
	movq	%rax, %r15
	call	_Znam@PLT
	movq	%r14, %rdi
	movq	%rax, 8(%rsp)
	call	_Znam@PLT
	movq	%r12, %rcx
	movl	%ebx, %r9d
	movq	%r13, %r8
	movq	%rax, %rdx
	pushq	%rax
	.cfi_def_cfa_offset 200
	movq	%r15, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 208
	movq	24(%rsp), %rsi
	call	_Z6copiarPfS_S_S_S_ii
	popq	%rdx
	.cfi_def_cfa_offset 200
	popq	%rcx
	.cfi_def_cfa_offset 192
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L99
	jmp	.L100
.L97:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L100
	call	__cxa_throw_bad_array_new_length@PLT
.L100:
	call	__stack_chk_fail@PLT
.L99:
	addq	$136, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3774:
	.size	_Z14callKernelFilaPfiiiiPiS0_, .-_Z14callKernelFilaPfiiiiPiS0_
	.section	.rodata.str1.1
.LC23:
	.string	"_Z10kernelFilaPfS_S_iiiiPiS0_"
.LC24:
	.string	"_Z17kernelConvolucionPfS_S_iiiiPiS0_"
.LC25:
	.string	"_Z12kernelStreamPfS_S_iiiiPiS0_i"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB3811:
	.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	.LC23(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z10kernelFilaPfS_S_iiiiPiS0_(%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	.LC24(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z17kernelConvolucionPfS_S_iiiiPiS0_(%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	.LC25(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z12kernelStreamPfS_S_iiiiPiS0_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
.LFE3811:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata.str1.1
.LC26:
	.string	"name.txt"
.LC27:
	.string	"Ingrese el nombre de la foto sin la extension: "
.LC28:
	.string	"basic_string::append"
.LC29:
	.string	".txt"
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB3778:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA3778
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	-1072(%rbp), %r13
	pushq	%r12
	movq	%r13, %rdi
	pushq	%rbx
	subq	$1112, %rsp
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.LEHB0:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev@PLT
.LEHE0:
	movl	$16, %edx
	leaq	.LC26(%rip), %rsi
	movq	%r13, %rdi
.LEHB1:
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode@PLT
.LEHE1:
	xorl	%edi, %edi
	leaq	-1088(%rbp), %rax
	leaq	.LC27(%rip), %rsi
	movb	$0, -1088(%rbp)
	movq	%rdi, -1096(%rbp)
	leaq	_ZSt4cout(%rip), %rdi
	leaq	-1104(%rbp), %r15
	movq	%rax, -1104(%rbp)
.LEHB2:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%r15, %rsi
	leaq	_ZSt3cin(%rip), %rdi
	call	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	-1096(%rbp), %rdx
	movq	-1104(%rbp), %rsi
	movq	%r13, %rdi
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
	movq	%r13, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv@PLT
	call	_Z8RGBtoTXTv
	movabsq	$4611686018427387903, %rax
	subq	-1096(%rbp), %rax
	cmpq	$3, %rax
	ja	.L105
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L115
	leaq	.LC28(%rip), %rdi
	call	_ZSt20__throw_length_errorPKc@PLT
.L105:
	movl	$4, %edx
	leaq	.LC29(%rip), %rsi
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@PLT
	movq	-1096(%rbp), %rdx
	movq	-1104(%rbp), %rcx
	xorl	%eax, %eax
.L107:
	cmpq	%rax, %rdx
	je	.L118
	movb	(%rcx,%rax), %sil
	movb	%sil, -556(%rbp,%rax)
	incq	%rax
	jmp	.L107
.L118:
	movb	$0, -556(%rbp,%rdx)
	leaq	-1136(%rbp), %rcx
	leaq	-1112(%rbp), %rdx
	leaq	-1120(%rbp), %rsi
	leaq	-1128(%rbp), %rdi
	leaq	-556(%rbp), %r9
	leaq	-1132(%rbp), %r8
	call	_Z4ReadPPfS0_S0_PiS1_PKc
	movl	-1136(%rbp), %r9d
	movq	-1128(%rbp), %r14
	movl	-1132(%rbp), %r8d
	movq	-1112(%rbp), %rdx
	movq	-1120(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r9d, %ecx
	leal	-2(%r8), %r12d
	call	_Z12blancoynegroPfS_S_ii
	leal	-2(%r9), %eax
	movl	$36, %edi
	movl	%eax, -1148(%rbp)
	call	_Znam@PLT
	movq	%rax, %rbx
	movl	$4294967295, %eax
	movl	$36, %edi
	movabsq	$-8589934591, %rcx
	movq	%rcx, 8(%rbx)
	movl	$1, %ecx
	salq	$33, %rcx
	movq	%rax, (%rbx)
	movq	%rcx, 16(%rbx)
	movq	%rax, 24(%rbx)
	movl	$1, 32(%rbx)
	call	_Znam@PLT
	movq	%rax, %rdx
	movq	%rax, -1144(%rbp)
	movq	%rbx, %r9
	movl	%r12d, %r8d
	movabsq	$-4294967297, %rcx
	movq	%r14, %rdi
	movq	%rcx, (%rax)
	xorl	%ecx, %ecx
	movl	$4294967295, %eax
	movq	%rcx, 16(%rdx)
	movabsq	$8589934593, %rcx
	movq	%rcx, 24(%rdx)
	movq	%rax, 8(%rdx)
	movl	$1, 32(%rdx)
	pushq	%rsi
	movl	-1148(%rbp), %ecx
	pushq	%rdx
	movl	-1132(%rbp), %esi
	movl	-1136(%rbp), %edx
	.cfi_escape 0x2e,0x10
	call	_Z7callCPUPfiiiiPiS0_
	popq	%rax
	popq	%rdx
	.cfi_escape 0x2e,0
	call	_Z8TXTtoRGBv
	pushq	%r11
	movl	-1148(%rbp), %ecx
	movq	%rbx, %r9
	movl	%r12d, %r8d
	pushq	-1144(%rbp)
	movl	-1136(%rbp), %edx
	movq	%r14, %rdi
	movl	-1132(%rbp), %esi
	.cfi_escape 0x2e,0x10
	call	_Z14callKernelFilaPfiiiiPiS0_
	popq	%r9
	popq	%r10
	.cfi_escape 0x2e,0
	call	_Z8TXTtoRGBv
	pushq	%r8
	movl	-1148(%rbp), %ecx
	movq	%rbx, %r9
	movl	%r12d, %r8d
	pushq	-1144(%rbp)
	movl	-1136(%rbp), %edx
	movq	%r14, %rdi
	movl	-1132(%rbp), %esi
	.cfi_escape 0x2e,0x10
	call	_Z14callKernelConvPfiiiiPiS0_
	popq	%rsi
	popq	%rdi
	.cfi_escape 0x2e,0
	call	_Z8TXTtoRGBv
	pushq	%rcx
	movl	-1148(%rbp), %ecx
	movq	%rbx, %r9
	movl	%r12d, %r8d
	pushq	-1144(%rbp)
	movl	-1136(%rbp), %edx
	movq	%r14, %rdi
	movl	-1132(%rbp), %esi
	.cfi_escape 0x2e,0x10
	call	_Z16callKernelStreamPfiiiiPiS0_
	popq	%rax
	popq	%rdx
	.cfi_escape 0x2e,0
	call	_Z8TXTtoRGBv
.LEHE2:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	%r13, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	je	.L112
	jmp	.L115
.L114:
	endbr64
	movq	%rax, %rbx
.L109:
	movq	%r15, %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	jmp	.L110
.L113:
	endbr64
	movq	%rax, %rbx
.L110:
	movq	%r13, %rdi
	call	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L115
	movq	%rbx, %rdi
.LEHB3:
	call	_Unwind_Resume@PLT
.LEHE3:
.L115:
	call	__stack_chk_fail@PLT
.L112:
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3778:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA3778:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE3778-.LLSDACSB3778
.LLSDACSB3778:
	.uleb128 .LEHB0-.LFB3778
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB3778
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L113-.LFB3778
	.uleb128 0
	.uleb128 .LEHB2-.LFB3778
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L114-.LFB3778
	.uleb128 0
	.uleb128 .LEHB3-.LFB3778
	.uleb128 .LEHE3-.LEHB3
	.uleb128 0
	.uleb128 0
.LLSDACSE3778:
	.section	.text.startup
	.size	main, .-main
	.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.cst4,"aM",@progbits,4
	.align 4
.LC12:
	.long	1077936128
	.align 4
.LC13:
	.long	1065353216
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC15:
	.long	0
	.long	1083129856
	.align 8
.LC16:
	.long	0
	.long	1093567616
	.section	.rodata.cst4
	.align 4
.LC19:
	.long	998244352
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.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 <iostream>
#include <time.h>
#include <hip/hip_runtime.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#include <fstream>
#include <string>
#include <sys/types.h>
using namespace std;

#define BS 256
#define X 3
#define Y 3
#define cantStream 6
#define PYTHON_COMMAND 0 // 0 si el comando de python NO lleva el 3. cualquier otro valor si lo lleva.

//
// Funcion que ejecuta el comando de python para convertir la imagen en formato txt
// en formato txt a PNG.
// Hay que cambiar PYTHON_COMMAND dependiendo de como se ejecuta el comando en el PC.
//
int TXTtoRGB(){
    if (PYTHON_COMMAND == 0){
        cout << "Reconstruyendo Imagen..." << endl;
        system("python TXTtoRGB.py");
        return 1;
    }
    else if(system("python3 TXTtoRGB.py")){
        cout << "Reconstruyendo Imagen..." << endl;
        return 1;
    }
    else{
        cout << "Error al convertir el txt a imagen" << endl;
        return 0;
    }
}

// Funcion que ejecuta el comando de python para reconstruir la imagen en formato PNG
// a formato txt.
// Hay que cambiar PYTHON_COMMAND dependiendo de como se ejecuta el comando en el PC.

int RGBtoTXT(){
    if (PYTHON_COMMAND == 0){
        cout << "Transformando Imagen..." << endl;
        system("python IMGtoTXT.py < name.txt");
        return 1;
    }
    else if(system("python3 IMGtoTXT.py < name.txt")){
        cout << "Transformando Imagen..." << endl;
        return 1;
    }
    else{
        cout << "Error al transformar el txt a imagen" << endl;
        return 0;
    }
}

//
// Funcion que imprime el ultimo error arrojado por CUDA
//
void cudaCheckError(int i) {
    hipError_t e=hipGetLastError();
    if(e!=hipSuccess) {
        printf("%d.- Cuda failure %s:%d: '%s'\n", i,__FILE__,__LINE__,hipGetErrorString(e));
        exit(0);
    }
}

/*
 *  Escritura Archivo txt
    Funcion extraida de actividad de curso
 */
void Write(float* R, float* G, float* B, 
	       int M, int N, const char *filename) {
    FILE *fp;
    fp = fopen(filename, "w");
    fprintf(fp, "%d %d\n", M, N);
    for(int i = 0; i < M*N-1; i++)
        fprintf(fp, "%f ", R[i]);
    fprintf(fp, "%f\n", R[M*N-1]);
    for(int i = 0; i < M*N-1; i++)
        fprintf(fp, "%f ", G[i]);
    fprintf(fp, "%f\n", G[M*N-1]);
    for(int i = 0; i < M*N-1; i++)
        fprintf(fp, "%f ", B[i]);
    fprintf(fp, "%f\n", B[M*N-1]);
    fclose(fp);
}

/*
 *  Lectura Archivo txt
 */
void Read(float** R, float** G, float** B, int *M, int *N, const char *filename) {    
    FILE *fp;
    fp = fopen(filename, "r");
    fscanf(fp, "%d %d\n", M, N);

    int imsize = (*M) * (*N);
    float* R1 = new float[imsize];
    float* G1 = new float[imsize];
    float* B1 = new float[imsize];

    for(int i = 0; i < imsize; i++)
        fscanf(fp, "%f ", &(R1[i]));
    for(int i = 0; i < imsize; i++)
        fscanf(fp, "%f ", &(G1[i]));
    for(int i = 0; i < imsize; i++)
        fscanf(fp, "%f ", &(B1[i]));
    
    fclose(fp);
    *R = R1; *G = G1; *B = B1;
}

__global__ void kernelStream(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2, int tam){
    int tid = threadIdx.x + blockDim.x * blockIdx.x;// 
	if (tid < tam){
        float v1 = 0, v2 = 0;
        int fila = tid + (tid/Nout)*2;
        for(int i = 0; i<Y ; i++){
            for(int j = 0; j<X ; j++){
                v1 += R[j+i*N+fila]*k1[j+i*Y];
                v2 += R[j+i*N+fila]*k2[j+i*Y];
            }
        }
        Rx[tid] = v1;
        Ry[tid] = v2;
    }
}


__global__ void kernelConvolucion(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2){
	int tid = threadIdx.x + blockDim.x * blockIdx.x;
	if (tid < Mout*Nout){
        float v1 = 0, v2 = 0;
        int fila = tid + (tid/Nout)*2;
        for(int i = 0; i<Y ; i++){
            for(int j = 0; j<X ; j++){
                v1 += R[j+i*N+fila]*k1[j+i*Y];
                v2 += R[j+i*N+fila]*k2[j+i*Y];
            }
        }
        Rx[tid] = v1;
        Ry[tid] = v2;
    }
}


__global__ void kernelFila(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2){
	int tid = threadIdx.x + blockDim.x * blockIdx.x;
	if (tid < Mout){
        float v1, v2;
        for(int k=0; k<Nout ; k++){
            v1 = 0;
            v2 = 0;
            for(int i = 0; i<Y ; i++){
                for(int j = 0; j<X ; j++){
                    v1 += R[j+k+i*N+tid*N]*k1[j+i*Y];
                    v2 += R[j+k+i*N+tid*N]*k2[j+i*Y];
                }
            }
            Rx[k+tid*Nout] = v1;
            Ry[k+tid*Nout] = v2;
        }
    }
}

void kernelCPU(float* R, float* Rx, float *Ry, int M, int N, int Mout, int Nout, int *k1, int *k2){
    float v1, v2;
    for(int h=0 ; h<Mout ; h++){
        for(int k=0; k<Nout ; k++){
            v1 = 0;
            v2 = 0;
            for(int i = 0; i<Y ; i++){
                for(int j = 0; j<X ; j++){
                    v1 += R[j+k+i*N+h*N]*k1[j+i*Y];
                    v2 += R[j+k+i*N+h*N]*k2[j+i*Y];
                }
            }
            Rx[k+h*Nout] = v1;
            Ry[k+h*Nout] = v2;
        }
    }
}

void blancoynegro(float* R, float* G, float* B, int M, int N){
    float prom = 0;
    int imsize = (M) * (N);
    for(int i = 0; i < imsize; i++){
        prom = (R[i]+G[i]+B[i] )/ 3;
        (R[i]) = prom;
        (G[i]) = prom;
        (B[i]) = prom;
    }
}

void copiar(float *Rhost, float *Ghost, float *Bhost, float *Rxhost, float *Ryhost, int Mout, int Nout){
    float tmp;
    //norma
    for(int i = 0; i < Mout*Nout; i++){
        tmp = sqrt( (pow(Rxhost[i], 2)+ pow(Ryhost[i], 2)) );
        if(tmp > 1) tmp = 1;
        Rhost[i] = tmp;
        Ghost[i] = tmp;
        Bhost[i] = tmp;
    }

    Write(Rhost, Ghost, Bhost, Mout, Nout, "salida.txt");
}

void callKernelFila(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    float *Rdev, *Rx, *Ry, *Rxhost, *Ryhost, dt;
    hipEvent_t ct1, ct2;
    int *k1dev, *k2dev;
    
    int GS = (int)ceil((float) Mout / BS);

    hipMalloc((void**)&Rdev, M * N * sizeof(float));
    //cudaMemcpy(Rdev, Rhost, M * N * sizeof(float), cudaMemcpyHostToDevice);
    hipMemcpy(Rdev, Rhost, M * N * sizeof(float), hipMemcpyHostToDevice);
    cudaCheckError(1);

    hipMalloc((void**)&k1dev, X * Y * sizeof(int));
    hipMalloc((void**)&k2dev, X * Y * sizeof(int));
    hipMemcpy(k1dev, k1, X * Y * sizeof(int), hipMemcpyHostToDevice);
    hipMemcpy(k2dev, k2, X * Y * sizeof(int), hipMemcpyHostToDevice);
    cudaCheckError(2);

    hipMalloc((void**)&Rx, Mout * Nout * sizeof(float));
    hipMalloc((void**)&Ry, Mout * Nout * sizeof(float));
    cudaCheckError(3);

    hipEventCreate(&ct1);
    hipEventCreate(&ct2);
    hipEventRecord(ct1);

    kernelFila<<<GS, BS>>>(Rdev, Rx, Ry, M, N, Mout, Nout, k1dev, k2dev);
    // cudaCheckError(4);

    Rxhost = new float[Mout*Nout];
	Ryhost = new float[Mout*Nout];
    hipMemcpy(Rxhost, Rx, Mout * Nout * sizeof(float), hipMemcpyDeviceToHost);
	hipMemcpy(Ryhost, Ry, Mout * Nout * sizeof(float), hipMemcpyDeviceToHost);
    
    hipEventRecord(ct2);
    hipEventSynchronize(ct2);
    hipEventElapsedTime(&dt, ct1, ct2);
    cout << "Tiempo GPU una hebra por fila: " << dt << "[ms]" << endl;
    // cudaCheckError(5);

    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rxhost, Ryhost, Mout, Nout);

}

void callCPU(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    clock_t t1, t2;
    double ms;
    t1 = clock();
    float *Rx = new float[Mout*Nout];
    float *Ry = new float[Mout*Nout];
    kernelCPU(Rhost, Rx, Ry, M, N, Mout, Nout, k1, k2);
    t2 = clock();
    ms = 1000.0 * (double)(t2 - t1) / CLOCKS_PER_SEC;
    cout << "Tiempo CPU es: "<< ms << "[ms]" << endl;

    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rx, Ry, Mout, Nout);
}

void callKernelConv(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    float *Rdev, *Rx, *Ry, *Rxhost, *Ryhost, dt;
    hipEvent_t ct1, ct2;
    int *k1dev, *k2dev;
    
    int GS = (int)ceil((float) Mout*Nout / BS);

    cudaCheckError(1);

    hipMalloc((void**)&k1dev, X * Y * sizeof(int));
    hipMalloc((void**)&k2dev, X * Y * sizeof(int));
    hipMemcpy(k1dev, k1, X * Y * sizeof(int), hipMemcpyHostToDevice);
    hipMemcpy(k2dev, k2, X * Y * sizeof(int), hipMemcpyHostToDevice);
    cudaCheckError(2);

    hipMalloc((void**)&Rx, Mout * Nout * sizeof(float));
    hipMalloc((void**)&Ry, Mout * Nout * sizeof(float));
    cudaCheckError(3);
    hipMalloc((void**)&Rdev, M * N * sizeof(float));
    
    Rxhost = new float[Mout*Nout];
	Ryhost = new float[Mout*Nout];

    hipEventCreate(&ct1);
    hipEventCreate(&ct2);
    hipEventRecord(ct1);
    
    hipMemcpy(Rdev, Rhost, M * N * sizeof(float), hipMemcpyHostToDevice);

    kernelConvolucion<<<GS, BS>>>(Rdev, Rx, Ry, M, N, Mout, Nout, k1dev, k2dev);
    cudaCheckError(4);

    hipMemcpy(Rxhost, Rx, Mout * Nout * sizeof(float), hipMemcpyDeviceToHost);
	hipMemcpy(Ryhost, Ry, Mout * Nout * sizeof(float), hipMemcpyDeviceToHost);
    cudaCheckError(5);

    hipEventRecord(ct2);
    hipEventSynchronize(ct2);
    hipEventElapsedTime(&dt, ct1, ct2);
    cout << "Tiempo GPU una hebra por convolucion: " << dt << "[ms]" << endl;
    
    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rxhost, Ryhost, Mout, Nout);
}

void callKernelStream(float * Rhost, int N, int M, int Mout, int Nout, int * k1, int * k2){
    hipStream_t streams[cantStream];
    float *Rdev, *Rxhost, *Ryhost, dt;
    float *RxStream1;
    float *RyStream1;
    hipEvent_t ct1, ct2;
    int *k1dev, *k2dev;

    hipHostMalloc((void **)&Rxhost, Mout * Nout * sizeof(float), hipHostMallocDefault);
    hipHostMalloc((void **)&Ryhost,  Mout * Nout * sizeof(float), hipHostMallocDefault);

    // int cantStream = 4;
    int GS = (int)ceil((float) (Mout/cantStream)*Nout / BS);
    int GS4 = (int)ceil((float) ((Mout+Mout%cantStream)/cantStream)*Nout / BS);

    int size = (int)(Mout/cantStream)*Nout;
    // int size4 = (int)((Mout/cantStream)+Mout%cantStream)*Nout;   

    hipMalloc((void **)&RxStream1, size*cantStream * sizeof(float));
    hipMalloc((void **)&RyStream1, size*cantStream * sizeof(float));
    
    // copiar el kernel de convolucion a memoria de gpu
    hipMalloc((void **)&k1dev, X * Y * sizeof(float));
    hipMalloc((void **)&k2dev, X * Y * sizeof(float));
    hipMemcpy(k1dev, k1, X * Y * sizeof(float), hipMemcpyHostToDevice);
    hipMemcpy(k2dev, k2, X * Y * sizeof(float), hipMemcpyHostToDevice);
    
    float * RH;
    hipHostMalloc((void **)&RH, M * N * sizeof(float), hipHostMallocDefault); //para copiar a los streams de forma eficiente

    for(int i = 0; i < M*N; i++){
        RH[i] = Rhost[i];
    }

    int sizeFull = (int)(M/cantStream)*N;
    int sizeFullOut = (int)(Mout/cantStream)*Nout;
    
    hipMalloc((void **)&Rdev, (sizeFull)* cantStream * sizeof(float));

    hipEventCreate(&ct1);
    hipEventCreate(&ct2);
    hipEventRecord(ct1);

    for(int i = 0; i < cantStream; i++){
        hipStreamCreate(&streams[i]);
        hipMemcpyAsync(&Rdev[i*sizeFull], &RH[i*sizeFull], (sizeFull) * sizeof(float), hipMemcpyHostToDevice, streams[i]);
        kernelStream<<<GS, BS, 0, streams[i]>>>(Rdev+i*sizeFull, RxStream1+i*size, RyStream1+i*size, M, N, Mout, Nout, k1dev, k2dev, size);
        hipMemcpyAsync(&Rxhost[i*sizeFullOut], RxStream1+i*size, size*sizeof(float), hipMemcpyDeviceToHost, streams[i]);
        hipMemcpyAsync(&Ryhost[i*sizeFullOut], RyStream1+i*size, size*sizeof(float), hipMemcpyDeviceToHost, streams[i]);
    }

    hipEventRecord(ct2);
    hipEventSynchronize(ct2);
    hipEventElapsedTime(&dt, ct1, ct2);
	printf("Tiempo GPU Streams: %f[ms]\n", dt);

    hipDeviceSynchronize();


    float *Rfinal= new float[Mout*Nout];
    float *Gfinal = new float[Mout*Nout];
    float *Bfinal = new float[Mout*Nout];
    copiar(Rfinal, Gfinal, Bfinal, Rxhost, Ryhost, Mout, Nout);
    
}

int main(){

    //inicializacion
    //se convierte la imagen a blanco y negro
    float *Rhost, *Ghost, *Bhost;
    int M, N, Mout, Nout; //M filas, N columnas

    ofstream file;
    file.open("name.txt");

    string name;
    cout << "Ingrese el nombre de la foto sin la extension: ";
    cin >> name;
    file << name;
    file.close();
    RGBtoTXT();

    name.append(".txt");

    char Name[500];
    for(int i = 0; i < name.size(); i++){
        Name[i] = name[i];
    }
    Name[name.size()] = '\0';

    Read(&Rhost, &Ghost, &Bhost, &M, &N, Name); 
    blancoynegro(Rhost, Ghost, Bhost, M, N);
    Nout = N - 2;
	Mout = M - 2;
    
    int *k1{ new int[9]{ -1, 0, 1, -2, 0, 2, -1, 0, 1 } };
    int *k2{ new int[9]{ -1, -2, -1, 0, 0, 0, 1, 2, 1 } };

    // llamada a la implementacion de cpu
    callCPU(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    // llamada a la implementación del kernel usando una hebra por fila. 
    callKernelFila(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    // llamada a la implementación del kernel usando una hebra por fila. 
    callKernelConv(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    // llamada al kernel usando streams y un kernel por calculo.
    callKernelStream(Rhost, N, M, Mout, Nout, k1, k2);
    TXTtoRGB();

    return 0;
}
	.text
	.file	"main.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.globl	_Z8TXTtoRGBv                    # -- Begin function _Z8TXTtoRGBv
	.type	_Z8TXTtoRGBv,@function
_Z8TXTtoRGBv:                           # @_Z8TXTtoRGBv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$24, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$.L.str.1, %edi
	callq	system
	movl	$1, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z8TXTtoRGBv, .Lfunc_end0-_Z8TXTtoRGBv
	.cfi_endproc
                                        # -- End function
	.globl	_Z8RGBtoTXTv                    # -- Begin function _Z8RGBtoTXTv
	.type	_Z8RGBtoTXTv,@function
_Z8RGBtoTXTv:                           # @_Z8RGBtoTXTv
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$23, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$.L.str.3, %edi
	callq	system
	movl	$1, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z8RGBtoTXTv, .Lfunc_end1-_Z8RGBtoTXTv
	.cfi_endproc
                                        # -- End function
	.globl	_Z14cudaCheckErrori             # -- Begin function _Z14cudaCheckErrori
	.type	_Z14cudaCheckErrori,@function
_Z14cudaCheckErrori:                    # @_Z14cudaCheckErrori
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movl	%edi, %ebx
	callq	hipGetLastError
	testl	%eax, %eax
	jne	.LBB2_2
# %bb.1:
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.LBB2_2:
	.cfi_def_cfa_offset 16
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.4, %edi
	movl	$.L.str.5, %edx
	movl	%ebx, %esi
	movl	$66, %ecx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	printf
	xorl	%edi, %edi
	callq	exit
.Lfunc_end2:
	.size	_Z14cudaCheckErrori, .Lfunc_end2-_Z14cudaCheckErrori
	.cfi_endproc
                                        # -- End function
	.globl	_Z5WritePfS_S_iiPKc             # -- Begin function _Z5WritePfS_S_iiPKc
	.type	_Z5WritePfS_S_iiPKc,@function
_Z5WritePfS_S_iiPKc:                    # @_Z5WritePfS_S_iiPKc
	.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	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r8d, %r15d
	movl	%ecx, %ebp
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	$.L.str.6, %esi
	movq	%r9, %rdi
	callq	fopen
	movq	%rax, %rbx
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	movl	%ebp, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	fprintf
	imull	%ebp, %r15d
	leal	-1(%r15), %eax
	movl	%eax, 8(%rsp)                   # 4-byte Spill
	movl	%eax, %ebp
	movq	%r15, 16(%rsp)                  # 8-byte Spill
	cmpl	$2, %r15d
	jl	.LBB3_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%r15d, %r15d
.LBB3_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r13,%r15,4), %xmm0
	movl	$.L.str.8, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	incq	%r15
	cmpq	%r15, %rbp
	jne	.LBB3_2
.LBB3_3:                                # %._crit_edge
	movslq	8(%rsp), %r15                   # 4-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r13,%r15,4), %xmm0
	movl	$.L.str.9, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	movq	16(%rsp), %r13                  # 8-byte Reload
	cmpl	$1, %r13d
	jle	.LBB3_4
# %bb.9:                                # %.lr.ph43.preheader
	movq	%r15, 8(%rsp)                   # 8-byte Spill
	xorl	%r15d, %r15d
.LBB3_10:                               # %.lr.ph43
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%r15,4), %xmm0
	movl	$.L.str.8, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	incq	%r15
	cmpq	%r15, %rbp
	jne	.LBB3_10
# %bb.6:                                # %._crit_edge44
	movq	8(%rsp), %rax                   # 8-byte Reload
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%rax,4), %xmm0
	movq	%rax, %r12
	movl	$.L.str.9, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	cmpl	$2, %r13d
	jl	.LBB3_5
# %bb.7:                                # %.lr.ph47.preheader
	xorl	%r15d, %r15d
.LBB3_8:                                # %.lr.ph47
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14,%r15,4), %xmm0
	movl	$.L.str.8, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	incq	%r15
	cmpq	%r15, %rbp
	jne	.LBB3_8
	jmp	.LBB3_5
.LBB3_4:                                # %._crit_edge44.thread
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r12,%r15,4), %xmm0
	movl	$.L.str.9, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	movq	%r15, %r12
.LBB3_5:                                # %._crit_edge48
	xorps	%xmm0, %xmm0
	cvtss2sd	(%r14,%r12,4), %xmm0
	movl	$.L.str.9, %esi
	movq	%rbx, %rdi
	movb	$1, %al
	callq	fprintf
	movq	%rbx, %rdi
	addq	$24, %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
	jmp	fclose                          # TAILCALL
.Lfunc_end3:
	.size	_Z5WritePfS_S_iiPKc, .Lfunc_end3-_Z5WritePfS_S_iiPKc
	.cfi_endproc
                                        # -- End function
	.globl	_Z4ReadPPfS0_S0_PiS1_PKc        # -- Begin function _Z4ReadPPfS0_S0_PiS1_PKc
	.type	_Z4ReadPPfS0_S0_PiS1_PKc,@function
_Z4ReadPPfS0_S0_PiS1_PKc:               # @_Z4ReadPPfS0_S0_PiS1_PKc
	.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	$40, %rsp
	.cfi_def_cfa_offset 96
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, 32(%rsp)                  # 8-byte Spill
	movq	%rsi, 24(%rsp)                  # 8-byte Spill
	movq	%rdi, 16(%rsp)                  # 8-byte Spill
	movl	$.L.str.10, %esi
	movq	%r9, %rdi
	callq	fopen
	movq	%rax, %r12
	movl	$.L.str.7, %esi
	movq	%rax, %rdi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movslq	(%r14), %rax
	movslq	(%rbx), %r15
	imulq	%rax, %r15
	movq	%r15, %rax
	shlq	$2, %rax
	testl	%r15d, %r15d
	movq	$-1, %rbx
	cmovnsq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_Znam
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	%rbx, %rdi
	callq	_Znam
	movq	%rax, (%rsp)                    # 8-byte Spill
	movq	%rbx, %rdi
	callq	_Znam
	movq	%rax, %rbx
	testl	%r15d, %r15d
	jle	.LBB4_9
# %bb.1:                                # %.lr.ph.preheader
	movq	%rbx, %r14
	movl	%r15d, %ebp
	movq	%rbp, %rbx
	movq	8(%rsp), %r13                   # 8-byte Reload
.LBB4_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	$.L.str.8, %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	addq	$4, %r13
	decq	%rbx
	jne	.LBB4_2
# %bb.3:                                # %.preheader36
	testl	%r15d, %r15d
	movq	%r14, %rbx
	jle	.LBB4_9
# %bb.4:
	movq	%rbp, %rbx
	movq	(%rsp), %r13                    # 8-byte Reload
.LBB4_5:                                # %.lr.ph39
                                        # =>This Inner Loop Header: Depth=1
	movl	$.L.str.8, %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	addq	$4, %r13
	decq	%rbx
	jne	.LBB4_5
# %bb.6:                                # %.preheader
	testl	%r15d, %r15d
	movq	%r14, %rbx
	jle	.LBB4_9
# %bb.7:                                # %.lr.ph41.preheader
	movq	%rbx, %r13
.LBB4_8:                                # %.lr.ph41
                                        # =>This Inner Loop Header: Depth=1
	movl	$.L.str.8, %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	addq	$4, %r13
	decq	%rbp
	jne	.LBB4_8
.LBB4_9:                                # %._crit_edge
	movq	%r12, %rdi
	callq	fclose
	movq	16(%rsp), %rax                  # 8-byte Reload
	movq	8(%rsp), %rcx                   # 8-byte Reload
	movq	%rcx, (%rax)
	movq	24(%rsp), %rax                  # 8-byte Reload
	movq	(%rsp), %rcx                    # 8-byte Reload
	movq	%rcx, (%rax)
	movq	32(%rsp), %rax                  # 8-byte Reload
	movq	%rbx, (%rax)
	addq	$40, %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	_Z4ReadPPfS0_S0_PiS1_PKc, .Lfunc_end4-_Z4ReadPPfS0_S0_PiS1_PKc
	.cfi_endproc
                                        # -- End function
	.globl	_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i # -- Begin function _Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i
	.type	_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i,@function
_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i: # @_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_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	$176, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	224(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	232(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	248(%rsp), %rax
	movq	%rax, 72(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z12kernelStreamPfS_S_iiiiPiS0_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$192, %rsp
	.cfi_adjust_cfa_offset -192
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i, .Lfunc_end5-_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_ # -- Begin function _Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_
	.type	_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_,@function
_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_: # @_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$176, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	224(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	232(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z17kernelConvolucionPfS_S_iiiiPiS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$192, %rsp
	.cfi_adjust_cfa_offset -192
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_, .Lfunc_end6-_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_ # -- Begin function _Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_
	.type	_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_,@function
_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_: # @_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$176, %rsp
	.cfi_def_cfa_offset 224
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	56(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	48(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	20(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	16(%rsp), %rcx
	movl	%r8d, (%rcx)
	leaq	12(%rsp), %r8
	movl	%r9d, (%r8)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	movq	%r8, 40(%rbx)
	leaq	224(%rsp), %rax
	movq	%rax, 48(%rbx)
	leaq	232(%rsp), %rax
	movq	%rax, 56(%rbx)
	leaq	240(%rsp), %rax
	movq	%rax, 64(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	32(%rsp), %r12
	leaq	24(%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	$_Z10kernelFilaPfS_S_iiiiPiS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$192, %rsp
	.cfi_adjust_cfa_offset -192
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_, .Lfunc_end7-_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z9kernelCPUPfS_S_iiiiPiS0_     # -- Begin function _Z9kernelCPUPfS_S_iiiiPiS0_
	.type	_Z9kernelCPUPfS_S_iiiiPiS0_,@function
_Z9kernelCPUPfS_S_iiiiPiS0_:            # @_Z9kernelCPUPfS_S_iiiiPiS0_
	.cfi_startproc
# %bb.0:
	testl	%r9d, %r9d
	jle	.LBB8_11
# %bb.1:                                # %.preheader49.lr.ph
	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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	64(%rsp), %r10
	movl	%r9d, %eax
	movq	%rax, -8(%rsp)                  # 8-byte Spill
	movl	56(%rsp), %r11d
	movl	%r8d, %r8d
	xorl	%eax, %eax
	movq	%rax, -16(%rsp)                 # 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -24(%rsp)                 # 8-byte Spill
.LBB8_2:                                # %.preheader49
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_4 Depth 2
                                        #       Child Loop BB8_5 Depth 3
                                        #         Child Loop BB8_6 Depth 4
	cmpl	$0, 56(%rsp)
	jle	.LBB8_9
# %bb.3:                                # %.preheader48.lr.ph
                                        #   in Loop: Header=BB8_2 Depth=1
	movq	-24(%rsp), %r15                 # 8-byte Reload
                                        # kill: def $r15d killed $r15d killed $r15 def $r15
	imull	56(%rsp), %r15d
	movq	-16(%rsp), %r12                 # 8-byte Reload
	xorl	%r13d, %r13d
.LBB8_4:                                # %.preheader48
                                        #   Parent Loop BB8_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB8_5 Depth 3
                                        #         Child Loop BB8_6 Depth 4
	xorps	%xmm0, %xmm0
	movq	%r12, %rbp
	movq	%r10, %rcx
	movq	72(%rsp), %rax
	xorl	%r9d, %r9d
	xorps	%xmm1, %xmm1
.LBB8_5:                                # %.preheader
                                        #   Parent Loop BB8_2 Depth=1
                                        #     Parent Loop BB8_4 Depth=2
                                        # =>    This Loop Header: Depth=3
                                        #         Child Loop BB8_6 Depth 4
	xorl	%r14d, %r14d
.LBB8_6:                                #   Parent Loop BB8_2 Depth=1
                                        #     Parent Loop BB8_4 Depth=2
                                        #       Parent Loop BB8_5 Depth=3
                                        # =>      This Inner Loop Header: Depth=4
	leal	(%r14,%rbp), %ebx
	movslq	%ebx, %rbx
	movss	(%rdi,%rbx,4), %xmm2            # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm3, %xmm3
	cvtsi2ssl	(%rcx,%r14,4), %xmm3
	mulss	%xmm2, %xmm3
	addss	%xmm3, %xmm1
	xorps	%xmm3, %xmm3
	cvtsi2ssl	(%rax,%r14,4), %xmm3
	mulss	%xmm2, %xmm3
	addss	%xmm3, %xmm0
	incq	%r14
	cmpq	$3, %r14
	jne	.LBB8_6
# %bb.7:                                #   in Loop: Header=BB8_5 Depth=3
	incq	%r9
	addq	$12, %rax
	addq	$12, %rcx
	addq	%r8, %rbp
	cmpq	$3, %r9
	jne	.LBB8_5
# %bb.8:                                #   in Loop: Header=BB8_4 Depth=2
	leaq	(%r15,%r13), %rax
	movss	%xmm1, (%rsi,%rax,4)
	movss	%xmm0, (%rdx,%rax,4)
	incq	%r13
	incq	%r12
	cmpq	%r11, %r13
	jne	.LBB8_4
.LBB8_9:                                # %._crit_edge
                                        #   in Loop: Header=BB8_2 Depth=1
	movq	-24(%rsp), %rcx                 # 8-byte Reload
	incq	%rcx
	addq	%r8, -16(%rsp)                  # 8-byte Folded Spill
	movq	%rcx, %rax
	movq	%rcx, -24(%rsp)                 # 8-byte Spill
	cmpq	-8(%rsp), %rcx                  # 8-byte Folded Reload
	jne	.LBB8_2
# %bb.10:
	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
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
	.cfi_restore %rbp
.LBB8_11:                               # %._crit_edge58
	retq
.Lfunc_end8:
	.size	_Z9kernelCPUPfS_S_iiiiPiS0_, .Lfunc_end8-_Z9kernelCPUPfS_S_iiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z12blancoynegroPfS_S_ii
.LCPI9_0:
	.long	0x40400000                      # float 3
	.text
	.globl	_Z12blancoynegroPfS_S_ii
	.type	_Z12blancoynegroPfS_S_ii,@function
_Z12blancoynegroPfS_S_ii:               # @_Z12blancoynegroPfS_S_ii
	.cfi_startproc
# %bb.0:
	imull	%r8d, %ecx
	testl	%ecx, %ecx
	jle	.LBB9_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%ecx, %eax
	xorl	%ecx, %ecx
	movss	.LCPI9_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
.LBB9_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	addss	(%rsi,%rcx,4), %xmm1
	addss	(%rdx,%rcx,4), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, (%rdi,%rcx,4)
	movss	%xmm1, (%rsi,%rcx,4)
	movss	%xmm1, (%rdx,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB9_2
.LBB9_3:                                # %._crit_edge
	retq
.Lfunc_end9:
	.size	_Z12blancoynegroPfS_S_ii, .Lfunc_end9-_Z12blancoynegroPfS_S_ii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z6copiarPfS_S_S_S_ii
.LCPI10_0:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z6copiarPfS_S_S_S_ii
	.type	_Z6copiarPfS_S_S_S_ii,@function
_Z6copiarPfS_S_S_S_ii:                  # @_Z6copiarPfS_S_S_S_ii
	.cfi_startproc
# %bb.0:
	movl	%r9d, %eax
	movq	%r8, %r9
	movl	8(%rsp), %r8d
	movl	%r8d, %r10d
	imull	%eax, %r10d
	testl	%r10d, %r10d
	jle	.LBB10_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%r10d, %r10d
	xorl	%r11d, %r11d
	movss	.LCPI10_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
.LBB10_2:                               # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	xorps	%xmm1, %xmm1
	cvtss2sd	(%rcx,%r11,4), %xmm1
	mulsd	%xmm1, %xmm1
	xorps	%xmm2, %xmm2
	cvtss2sd	(%r9,%r11,4), %xmm2
	mulsd	%xmm2, %xmm2
	addsd	%xmm1, %xmm2
	xorps	%xmm1, %xmm1
	sqrtsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movaps	%xmm0, %xmm2
	minss	%xmm1, %xmm2
	movss	%xmm2, (%rdi,%r11,4)
	movss	%xmm2, (%rsi,%r11,4)
	movss	%xmm2, (%rdx,%r11,4)
	incq	%r11
	cmpq	%r11, %r10
	jne	.LBB10_2
.LBB10_3:                               # %._crit_edge
	movl	$.L.str.11, %r9d
	movl	%eax, %ecx
	jmp	_Z5WritePfS_S_iiPKc             # TAILCALL
.Lfunc_end10:
	.size	_Z6copiarPfS_S_S_S_ii, .Lfunc_end10-_Z6copiarPfS_S_S_S_ii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z14callKernelFilaPfiiiiPiS0_
.LCPI11_0:
	.long	0x3b800000                      # float 0.00390625
	.text
	.globl	_Z14callKernelFilaPfiiiiPiS0_
	.type	_Z14callKernelFilaPfiiiiPiS0_,@function
_Z14callKernelFilaPfiiiiPiS0_:          # @_Z14callKernelFilaPfiiiiPiS0_
	.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	$88, %rsp
	.cfi_def_cfa_offset 144
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 8(%rsp)                    # 8-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %ebp
	movl	%edx, %r15d
	movl	%esi, %r14d
	cvtsi2ss	%ecx, %xmm0
	movq	%rdi, %r13
	mulss	.LCPI11_0(%rip), %xmm0
	callq	ceilf@PLT
	cvttss2si	%xmm0, %r12d
	movl	%r15d, 24(%rsp)                 # 4-byte Spill
	movl	%r14d, 28(%rsp)                 # 4-byte Spill
	imull	%r14d, %r15d
	movslq	%r15d, %r14
	shlq	$2, %r14
	leaq	72(%rsp), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movq	(%r15), %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$1, %edi
	callq	_Z14cudaCheckErrori
	leaq	56(%rsp), %r14
	movl	$36, %esi
	movq	%r14, %rdi
	callq	hipMalloc
	leaq	48(%rsp), %r15
	movl	$36, %esi
	movq	%r15, %rdi
	callq	hipMalloc
	movq	(%r14), %rdi
	movl	$36, %edx
	movq	8(%rsp), %rsi                   # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r15), %rdi
	movl	$36, %edx
	movq	144(%rsp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$2, %edi
	callq	_Z14cudaCheckErrori
	movq	%rbx, 8(%rsp)                   # 8-byte Spill
	movl	%ebx, %r14d
	imull	%ebp, %r14d
	movslq	%r14d, %r13
	shlq	$2, %r13
	leaq	40(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	32(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	movl	$3, %edi
	callq	_Z14cudaCheckErrori
	leaq	64(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventCreate
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	btsq	$32, %r12
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$256, %rdx                      # imm = 0x100
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB11_2
# %bb.1:
	movq	72(%rsp), %rdi
	movq	40(%rsp), %rsi
	movq	32(%rsp), %rdx
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	32(%rsp), %ecx                  # 4-byte Reload
	movl	36(%rsp), %r8d                  # 4-byte Reload
	movl	%ebp, %r9d
	pushq	56(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	72(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	32(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
.LBB11_2:
	testl	%r14d, %r14d
	movq	$-1, %r15
	cmovnsq	%r13, %r15
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r12
	movq	40(%rsp), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	32(%rsp), %rsi
	movq	%r12, %rdi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	64(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	84(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	movl	$_ZSt4cout, %edi
	movl	$.L.str.12, %esi
	movl	$31, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	cvtss2sd	(%rbx), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movl	$.L.str.13, %esi
	movl	$4, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_Znam
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%rax, %rdx
	movq	%r14, %rcx
	movq	%r12, %r8
	movl	%ebp, %r9d
	pushq	16(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z6copiarPfS_S_S_S_ii
	addq	$104, %rsp
	.cfi_adjust_cfa_offset -104
	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_end11:
	.size	_Z14callKernelFilaPfiiiiPiS0_, .Lfunc_end11-_Z14callKernelFilaPfiiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z7callCPUPfiiiiPiS0_
.LCPI12_0:
	.quad	0x408f400000000000              # double 1000
.LCPI12_1:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	_Z7callCPUPfiiiiPiS0_
	.type	_Z7callCPUPfiiiiPiS0_,@function
_Z7callCPUPfiiiiPiS0_:                  # @_Z7callCPUPfiiiiPiS0_
	.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	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 8(%rsp)                    # 8-byte Spill
	movl	%r8d, %ebp
	movl	%ecx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	clock
	movq	%rax, (%rsp)                    # 8-byte Spill
	movl	%ebp, %eax
	imull	%r12d, %eax
	leaq	(,%rax,4), %rcx
	testl	%eax, %eax
	movq	$-1, %r15
	cmovnsq	%rcx, %r15
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r13
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	movq	%r15, %rdi
	callq	_Znam
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%rax, %rdx
	movq	%rax, %r13
	movl	%r14d, %r8d
	movl	%r12d, %r9d
	pushq	88(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	24(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	callq	_Z9kernelCPUPfS_S_iiiiPiS0_
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
	callq	clock
	subq	(%rsp), %rax                    # 8-byte Folded Reload
	cvtsi2sd	%rax, %xmm0
	mulsd	.LCPI12_0(%rip), %xmm0
	divsd	.LCPI12_1(%rip), %xmm0
	movsd	%xmm0, (%rsp)                   # 8-byte Spill
	movl	$_ZSt4cout, %edi
	movl	$.L.str.14, %esi
	movl	$15, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movsd	(%rsp), %xmm0                   # 8-byte Reload
                                        # xmm0 = mem[0],zero
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movl	$.L.str.13, %esi
	movl	$4, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_Znam
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movq	24(%rsp), %rcx                  # 8-byte Reload
	movq	%r13, %r8
	movl	%r12d, %r9d
	pushq	%rbp
	.cfi_adjust_cfa_offset 8
	callq	_Z6copiarPfS_S_S_S_ii
	addq	$40, %rsp
	.cfi_adjust_cfa_offset -40
	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_end12:
	.size	_Z7callCPUPfiiiiPiS0_, .Lfunc_end12-_Z7callCPUPfiiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z14callKernelConvPfiiiiPiS0_
.LCPI13_0:
	.long	0x3b800000                      # float 0.00390625
	.text
	.globl	_Z14callKernelConvPfiiiiPiS0_
	.type	_Z14callKernelConvPfiiiiPiS0_,@function
_Z14callKernelConvPfiiiiPiS0_:          # @_Z14callKernelConvPfiiiiPiS0_
	.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
	movq	%r9, %r14
	movl	%r8d, %r15d
	movq	%r15, 32(%rsp)                  # 8-byte Spill
	movl	%ecx, 12(%rsp)                  # 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %ebp
	cvtsi2ss	%ecx, %xmm1
	movq	%rdi, 64(%rsp)                  # 8-byte Spill
	cvtsi2ss	%r8d, %xmm0
	mulss	%xmm1, %xmm0
	mulss	.LCPI13_0(%rip), %xmm0
	callq	ceilf@PLT
	cvttss2si	%xmm0, %eax
	movq	%rax, 56(%rsp)                  # 8-byte Spill
	movl	$1, %edi
	callq	_Z14cudaCheckErrori
	leaq	88(%rsp), %r12
	movl	$36, %esi
	movq	%r12, %rdi
	callq	hipMalloc
	leaq	80(%rsp), %r13
	movl	$36, %esi
	movq	%r13, %rdi
	callq	hipMalloc
	movq	(%r12), %rdi
	movl	$36, %edx
	movq	%r14, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r13), %rdi
	movl	$36, %edx
	movq	176(%rsp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$2, %edi
	callq	_Z14cudaCheckErrori
	movl	%r15d, %eax
	imull	12(%rsp), %eax                  # 4-byte Folded Reload
	movslq	%eax, %r15
	leaq	(,%r15,4), %r13
	leaq	48(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	leaq	40(%rsp), %rdi
	movq	%r13, %rsi
	callq	hipMalloc
	movl	$3, %edi
	callq	_Z14cudaCheckErrori
	movl	%ebx, 24(%rsp)                  # 4-byte Spill
	movl	%ebp, 28(%rsp)                  # 4-byte Spill
	imull	%ebp, %ebx
	movslq	%ebx, %rbp
	shlq	$2, %rbp
	leaq	104(%rsp), %r14
	movq	%r14, %rdi
	movq	%rbp, %rsi
	callq	hipMalloc
	testl	%r15d, %r15d
	movq	$-1, %r15
	cmovnsq	%r13, %r15
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, 72(%rsp)                  # 8-byte Spill
	leaq	96(%rsp), %r12
	movq	%r12, %rdi
	callq	hipEventCreate
	leaq	16(%rsp), %rdi
	callq	hipEventCreate
	movq	(%r12), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	(%r14), %rdi
	movq	64(%rsp), %rsi                  # 8-byte Reload
	movq	%rbp, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	56(%rsp), %rdi                  # 8-byte Reload
	btsq	$32, %rdi
	movabsq	$4294967296, %rdx               # imm = 0x100000000
	orq	$256, %rdx                      # imm = 0x100
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB13_2
# %bb.1:
	movq	104(%rsp), %rdi
	movq	48(%rsp), %rsi
	movq	40(%rsp), %rdx
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	32(%rsp), %ecx                  # 4-byte Reload
	movl	36(%rsp), %r8d                  # 4-byte Reload
	movl	20(%rsp), %r9d                  # 4-byte Reload
	pushq	88(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	104(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	56(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
.LBB13_2:
	movl	$4, %edi
	callq	_Z14cudaCheckErrori
	movq	48(%rsp), %rsi
	movq	%rbx, %r12
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	40(%rsp), %rsi
	movq	72(%rsp), %rbp                  # 8-byte Reload
	movq	%rbp, %rdi
	movq	%r13, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movl	$5, %edi
	callq	_Z14cudaCheckErrori
	movq	16(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	16(%rsp), %rdi
	callq	hipEventSynchronize
	movq	96(%rsp), %rsi
	movq	16(%rsp), %rdx
	leaq	116(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	movl	$_ZSt4cout, %edi
	movl	$.L.str.15, %esi
	movl	$38, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	cvtss2sd	(%rbx), %xmm0
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movl	$.L.str.13, %esi
	movl	$4, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	(%rbx), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_Znam
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movq	%r12, %rcx
	movq	%rbp, %r8
	movl	20(%rsp), %r9d                  # 4-byte Reload
	pushq	40(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z6copiarPfS_S_S_S_ii
	addq	$136, %rsp
	.cfi_adjust_cfa_offset -136
	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_end13:
	.size	_Z14callKernelConvPfiiiiPiS0_, .Lfunc_end13-_Z14callKernelConvPfiiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z16callKernelStreamPfiiiiPiS0_
.LCPI14_0:
	.long	0x3b800000                      # float 0.00390625
	.text
	.globl	_Z16callKernelStreamPfiiiiPiS0_
	.type	_Z16callKernelStreamPfiiiiPiS0_,@function
_Z16callKernelStreamPfiiiiPiS0_:        # @_Z16callKernelStreamPfiiiiPiS0_
	.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	$248, %rsp
	.cfi_def_cfa_offset 304
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movq	%r9, 24(%rsp)                   # 8-byte Spill
	movl	%r8d, %r15d
	movl	%ecx, %ebp
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	%r8d, %eax
	imull	%ecx, %eax
	movl	%eax, 52(%rsp)                  # 4-byte Spill
	movslq	%eax, %r12
	shlq	$2, %r12
	leaq	104(%rsp), %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	hipHostMalloc
	leaq	96(%rsp), %rdi
	movq	%r12, 120(%rsp)                 # 8-byte Spill
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	hipHostMalloc
	movl	%ebp, 20(%rsp)                  # 4-byte Spill
	movslq	%ebp, %rax
	imulq	$715827883, %rax, %r12          # imm = 0x2AAAAAAB
	movq	%r12, %rax
	shrq	$63, %rax
	shrq	$32, %r12
	addl	%eax, %r12d
	cvtsi2ss	%r12d, %xmm1
	cvtsi2ss	%r15d, %xmm0
	mulss	%xmm1, %xmm0
	mulss	.LCPI14_0(%rip), %xmm0
	callq	ceilf@PLT
	cvttss2si	%xmm0, %eax
	movl	%eax, 32(%rsp)                  # 4-byte Spill
	movq	%r15, 64(%rsp)                  # 8-byte Spill
	imull	%r15d, %r12d
	movq	%r12, 56(%rsp)                  # 8-byte Spill
	leal	(%r12,%r12), %eax
	leal	(%rax,%rax,2), %eax
	movslq	%eax, %r15
	shlq	$2, %r15
	leaq	88(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	leaq	80(%rsp), %rdi
	movq	%r15, %rsi
	callq	hipMalloc
	leaq	168(%rsp), %r15
	movl	$36, %esi
	movq	%r15, %rdi
	callq	hipMalloc
	leaq	160(%rsp), %rbp
	movl	$36, %esi
	movq	%rbp, %rdi
	callq	hipMalloc
	movq	(%r15), %rdi
	movl	$36, %edx
	movq	24(%rsp), %rsi                  # 8-byte Reload
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbp), %rdi
	movl	$36, %edx
	movq	304(%rsp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%r14d, 16(%rsp)                 # 4-byte Spill
	movl	%r14d, %ebp
	movl	%r13d, 12(%rsp)                 # 4-byte Spill
	imull	%r13d, %ebp
	movslq	%ebp, %r14
	leaq	(,%r14,4), %rsi
	leaq	72(%rsp), %rdi
	xorl	%edx, %edx
	callq	hipHostMalloc
	testl	%r14d, %r14d
	jle	.LBB14_3
# %bb.1:                                # %.lr.ph
	movq	72(%rsp), %rax
	movl	%ebp, %ecx
	xorl	%edx, %edx
.LBB14_2:                               # =>This Inner Loop Header: Depth=1
	movss	(%rbx,%rdx,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rax,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	.LBB14_2
.LBB14_3:                               # %._crit_edge
	movabsq	$4294967296, %r15               # imm = 0x100000000
	movslq	16(%rsp), %rax                  # 4-byte Folded Reload
	imulq	$715827883, %rax, %r14          # imm = 0x2AAAAAAB
	movq	%r14, %rax
	shrq	$63, %rax
	shrq	$32, %r14
	addl	%eax, %r14d
	imull	12(%rsp), %r14d                 # 4-byte Folded Reload
	leal	(%r14,%r14), %eax
	leal	(%rax,%rax,2), %eax
	movslq	%eax, %rsi
	shlq	$2, %rsi
	leaq	112(%rsp), %rdi
	callq	hipMalloc
	leaq	176(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventCreate
	leaq	40(%rsp), %rdi
	callq	hipEventCreate
	movq	(%rbx), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	hipEventRecord
	movslq	%r14d, %rbx
	shlq	$2, %rbx
	movl	32(%rsp), %ecx                  # 4-byte Reload
	btsq	$32, %rcx
	movq	%rcx, 144(%rsp)                 # 8-byte Spill
	movslq	56(%rsp), %rcx                  # 4-byte Folded Reload
	movq	%rcx, 32(%rsp)                  # 8-byte Spill
	leaq	(,%rcx,4), %rcx
	movq	%rcx, 136(%rsp)                 # 8-byte Spill
	addq	$256, %r15                      # imm = 0x100
	movq	%r15, 152(%rsp)                 # 8-byte Spill
	xorl	%ebp, %ebp
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	movq	%rcx, 24(%rsp)                  # 8-byte Spill
	movq	%rbx, 128(%rsp)                 # 8-byte Spill
.LBB14_4:                               # =>This Inner Loop Header: Depth=1
	leaq	(%rsp,%r12), %r15
	addq	$192, %r15
	movq	%r15, %rdi
	callq	hipStreamCreate
	movq	112(%rsp), %rdi
	addq	%rbp, %rdi
	movq	72(%rsp), %rsi
	addq	%rbp, %rsi
	movq	(%r15), %r8
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpyAsync
	movq	(%r15), %r9
	movq	144(%rsp), %rdi                 # 8-byte Reload
	movl	$1, %esi
	movq	152(%rsp), %rdx                 # 8-byte Reload
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	__hipPushCallConfiguration
	movq	%r14, %r15
	testl	%eax, %eax
	jne	.LBB14_6
# %bb.5:                                #   in Loop: Header=BB14_4 Depth=1
	movq	112(%rsp), %rdi
	addq	%rbp, %rdi
	movq	24(%rsp), %r15                  # 8-byte Reload
	imulq	32(%rsp), %r15                  # 8-byte Folded Reload
	movq	88(%rsp), %rsi
	addq	%r13, %rsi
	movq	80(%rsp), %rdx
	addq	%r13, %rdx
	movl	16(%rsp), %ecx                  # 4-byte Reload
	movl	12(%rsp), %r8d                  # 4-byte Reload
	movl	20(%rsp), %r9d                  # 4-byte Reload
	pushq	56(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	168(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	184(%rsp)
	.cfi_adjust_cfa_offset 8
	pushq	88(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i
	addq	$32, %rsp
	.cfi_adjust_cfa_offset -32
.LBB14_6:                               #   in Loop: Header=BB14_4 Depth=1
	shlq	$2, %r15
	movq	104(%rsp), %rdi
	addq	%r15, %rdi
	movq	88(%rsp), %rsi
	addq	%r15, %rsi
	movq	192(%rsp,%r12), %r8
	movq	136(%rsp), %rbx                 # 8-byte Reload
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpyAsync
	movq	96(%rsp), %rdi
	addq	%r15, %rdi
	addq	80(%rsp), %r15
	movq	192(%rsp,%r12), %r8
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpyAsync
	incq	24(%rsp)                        # 8-byte Folded Spill
	addq	32(%rsp), %r14                  # 8-byte Folded Reload
	addq	%rbx, %r13
	movq	128(%rsp), %rbx                 # 8-byte Reload
	addq	%rbx, %rbp
	addq	$8, %r12
	cmpq	$48, %r12
	jne	.LBB14_4
# %bb.7:
	movq	40(%rsp), %rdi
	xorl	%esi, %esi
	callq	hipEventRecord
	movq	40(%rsp), %rdi
	callq	hipEventSynchronize
	movq	176(%rsp), %rsi
	movq	40(%rsp), %rdx
	leaq	188(%rsp), %rbx
	movq	%rbx, %rdi
	callq	hipEventElapsedTime
	cvtss2sd	(%rbx), %xmm0
	movl	$.L.str.16, %edi
	movb	$1, %al
	callq	printf
	callq	hipDeviceSynchronize
	cmpl	$0, 52(%rsp)                    # 4-byte Folded Reload
	movq	$-1, %rax
	movq	120(%rsp), %r15                 # 8-byte Reload
	cmovsq	%rax, %r15
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_Znam
	movq	104(%rsp), %rcx
	movq	96(%rsp), %r8
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movl	28(%rsp), %r9d                  # 4-byte Reload
	pushq	72(%rsp)                        # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	_Z6copiarPfS_S_S_S_ii
	addq	$264, %rsp                      # imm = 0x108
	.cfi_adjust_cfa_offset -264
	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_end14:
	.size	_Z16callKernelStreamPfiiiiPiS0_, .Lfunc_end14-_Z16callKernelStreamPfiiiiPiS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI15_0:
	.long	0x40400000                      # float 3
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI15_1:
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	4294967294                      # 0xfffffffe
.LCPI15_2:
	.long	0                               # 0x0
	.long	2                               # 0x2
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
.LCPI15_3:
	.long	4294967295                      # 0xffffffff
	.long	4294967294                      # 0xfffffffe
	.long	4294967295                      # 0xffffffff
	.long	0                               # 0x0
.LCPI15_4:
	.long	0                               # 0x0
	.long	0                               # 0x0
	.long	1                               # 0x1
	.long	2                               # 0x2
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %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	$1096, %rsp                     # imm = 0x448
	.cfi_def_cfa_offset 1152
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	leaq	80(%rsp), %rbx
	movq	%rbx, %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev
.Ltmp0:
	movl	$.L.str.17, %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.1:
	leaq	40(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
.Ltmp3:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.18, %esi
	movl	$47, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp4:
# %bb.2:                                # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
.Ltmp5:
	leaq	24(%rsp), %rsi
	movl	$_ZSt3cin, %edi
	callq	_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE
.Ltmp6:
# %bb.3:
	movq	24(%rsp), %rsi
	movq	32(%rsp), %rdx
.Ltmp7:
	leaq	80(%rsp), %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp8:
# %bb.4:                                # %_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE.exit
.Ltmp9:
	leaq	80(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv
.Ltmp10:
# %bb.5:
.Ltmp11:
	callq	_Z8RGBtoTXTv
.Ltmp12:
# %bb.6:
.Ltmp13:
	leaq	24(%rsp), %rdi
	movl	$.L.str.19, %esi
	callq	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc
.Ltmp14:
# %bb.7:
	movq	32(%rsp), %rbx
	testq	%rbx, %rbx
	je	.LBB15_9
# %bb.8:                                # %.lr.ph
	movq	24(%rsp), %rsi
	leaq	592(%rsp), %rdi
	movq	%rbx, %rdx
	callq	memcpy@PLT
.LBB15_9:                               # %._crit_edge
	movb	$0, 592(%rsp,%rbx)
.Ltmp16:
	leaq	72(%rsp), %rdi
	leaq	64(%rsp), %rsi
	leaq	56(%rsp), %rdx
	leaq	20(%rsp), %rcx
	leaq	16(%rsp), %r8
	leaq	592(%rsp), %r9
	callq	_Z4ReadPPfS0_S0_PiS1_PKc
.Ltmp17:
# %bb.10:
	movq	72(%rsp), %r14
	movl	20(%rsp), %ebx
	movl	16(%rsp), %r13d
	movl	%r13d, %edx
	imull	%ebx, %edx
	testl	%edx, %edx
	jle	.LBB15_13
# %bb.11:                               # %.lr.ph.preheader.i
	movq	64(%rsp), %rax
	movq	56(%rsp), %rcx
	movl	%edx, %edx
	xorl	%esi, %esi
	movss	.LCPI15_0(%rip), %xmm0          # xmm0 = mem[0],zero,zero,zero
.LBB15_12:                              # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movss	(%r14,%rsi,4), %xmm1            # xmm1 = mem[0],zero,zero,zero
	addss	(%rax,%rsi,4), %xmm1
	addss	(%rcx,%rsi,4), %xmm1
	divss	%xmm0, %xmm1
	movss	%xmm1, (%r14,%rsi,4)
	movss	%xmm1, (%rax,%rsi,4)
	movss	%xmm1, (%rcx,%rsi,4)
	incq	%rsi
	cmpq	%rsi, %rdx
	jne	.LBB15_12
.LBB15_13:                              # %_Z12blancoynegroPfS_S_ii.exit
.Ltmp19:
	movl	$36, %edi
	callq	_Znam
.Ltmp20:
# %bb.14:
	movq	%rax, %r15
	movaps	.LCPI15_1(%rip), %xmm0          # xmm0 = [4294967295,0,1,4294967294]
	movups	%xmm0, (%rax)
	movaps	.LCPI15_2(%rip), %xmm0          # xmm0 = [0,2,4294967295,0]
	movups	%xmm0, 16(%rax)
	movl	$1, 32(%rax)
.Ltmp22:
	movl	$36, %edi
	callq	_Znam
.Ltmp23:
# %bb.15:
	movq	%rax, %r12
	leal	-2(%r13), %ebp
	addl	$-2, %ebx
	movaps	.LCPI15_3(%rip), %xmm0          # xmm0 = [4294967295,4294967294,4294967295,0]
	movups	%xmm0, (%rax)
	movaps	.LCPI15_4(%rip), %xmm0          # xmm0 = [0,0,1,2]
	movups	%xmm0, 16(%rax)
	movl	$1, 32(%rax)
.Ltmp24:
	movq	%rax, (%rsp)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%ebx, %ecx
	movl	%ebp, %r8d
	movq	%r15, %r9
	callq	_Z7callCPUPfiiiiPiS0_
.Ltmp25:
# %bb.16:
.Ltmp26:
	callq	_Z8TXTtoRGBv
.Ltmp27:
# %bb.17:
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
.Ltmp28:
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%ebp, %r8d
	movq	%r15, %r9
	callq	_Z14callKernelFilaPfiiiiPiS0_
.Ltmp29:
# %bb.18:
.Ltmp30:
	callq	_Z8TXTtoRGBv
.Ltmp31:
# %bb.19:
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
.Ltmp32:
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%ebp, %r8d
	movq	%r15, %r9
	callq	_Z14callKernelConvPfiiiiPiS0_
.Ltmp33:
# %bb.20:
.Ltmp34:
	callq	_Z8TXTtoRGBv
.Ltmp35:
# %bb.21:
	movl	16(%rsp), %esi
	movl	20(%rsp), %edx
.Ltmp36:
	movq	%r12, (%rsp)
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%ebp, %r8d
	movq	%r15, %r9
	callq	_Z16callKernelStreamPfiiiiPiS0_
.Ltmp37:
# %bb.22:
.Ltmp38:
	callq	_Z8TXTtoRGBv
.Ltmp39:
# %bb.23:
	movq	24(%rsp), %rdi
	leaq	40(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB15_25
# %bb.24:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB15_25:                              # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE(%rip), %rax
	leaq	88(%rsp), %rdi
	movq	%rax, -8(%rdi)
	movq	_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE+24(%rip), %rcx
	movq	-24(%rax), %rax
	movq	%rcx, 80(%rsp,%rax)
	callq	_ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev
	leaq	328(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	xorl	%eax, %eax
	addq	$1096, %rsp                     # imm = 0x448
	.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
.LBB15_29:
	.cfi_def_cfa_offset 1152
.Ltmp21:
	jmp	.LBB15_31
.LBB15_28:
.Ltmp18:
	jmp	.LBB15_31
.LBB15_26:
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB15_33
.LBB15_27:
.Ltmp15:
	jmp	.LBB15_31
.LBB15_30:
.Ltmp40:
.LBB15_31:
	movq	%rax, %rbx
	movq	24(%rsp), %rdi
	leaq	40(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB15_33
# %bb.32:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i32
	callq	_ZdlPv
.LBB15_33:
	leaq	80(%rsp), %rdi
	callq	_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end15:
	.size	main, .Lfunc_end15-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table15:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp14-.Ltmp3                 #   Call between .Ltmp3 and .Ltmp14
	.uleb128 .Ltmp15-.Lfunc_begin0          #     jumps to .Ltmp15
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp14-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp16-.Ltmp14                #   Call between .Ltmp14 and .Ltmp16
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp16-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp17-.Ltmp16                #   Call between .Ltmp16 and .Ltmp17
	.uleb128 .Ltmp18-.Lfunc_begin0          #     jumps to .Ltmp18
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp19-.Lfunc_begin0          # >> Call Site 6 <<
	.uleb128 .Ltmp20-.Ltmp19                #   Call between .Ltmp19 and .Ltmp20
	.uleb128 .Ltmp21-.Lfunc_begin0          #     jumps to .Ltmp21
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp22-.Lfunc_begin0          # >> Call Site 7 <<
	.uleb128 .Ltmp39-.Ltmp22                #   Call between .Ltmp22 and .Ltmp39
	.uleb128 .Ltmp40-.Lfunc_begin0          #     jumps to .Ltmp40
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp39-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Lfunc_end15-.Ltmp39           #   Call between .Ltmp39 and .Lfunc_end15
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.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	.LBB16_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB16_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z12kernelStreamPfS_S_iiiiPiS0_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	$_Z17kernelConvolucionPfS_S_iiiiPiS0_, %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	$_Z10kernelFilaPfS_S_iiiiPiS0_, %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_end16:
	.size	__hip_module_ctor, .Lfunc_end16-__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	.LBB17_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
.LBB17_2:
	retq
.Lfunc_end17:
	.size	__hip_module_dtor, .Lfunc_end17-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Reconstruyendo Imagen..."
	.size	.L.str, 25

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"python TXTtoRGB.py"
	.size	.L.str.1, 19

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Transformando Imagen..."
	.size	.L.str.2, 24

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"python IMGtoTXT.py < name.txt"
	.size	.L.str.3, 30

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"%d.- Cuda failure %s:%d: '%s'\n"
	.size	.L.str.4, 31

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/RodrigoCaya/CUDA/main/Proyecto/main.hip"
	.size	.L.str.5, 102

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

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

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"%f "
	.size	.L.str.8, 4

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

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

	.type	_Z12kernelStreamPfS_S_iiiiPiS0_i,@object # @_Z12kernelStreamPfS_S_iiiiPiS0_i
	.section	.rodata,"a",@progbits
	.globl	_Z12kernelStreamPfS_S_iiiiPiS0_i
	.p2align	3, 0x0
_Z12kernelStreamPfS_S_iiiiPiS0_i:
	.quad	_Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i
	.size	_Z12kernelStreamPfS_S_iiiiPiS0_i, 8

	.type	_Z17kernelConvolucionPfS_S_iiiiPiS0_,@object # @_Z17kernelConvolucionPfS_S_iiiiPiS0_
	.globl	_Z17kernelConvolucionPfS_S_iiiiPiS0_
	.p2align	3, 0x0
_Z17kernelConvolucionPfS_S_iiiiPiS0_:
	.quad	_Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_
	.size	_Z17kernelConvolucionPfS_S_iiiiPiS0_, 8

	.type	_Z10kernelFilaPfS_S_iiiiPiS0_,@object # @_Z10kernelFilaPfS_S_iiiiPiS0_
	.globl	_Z10kernelFilaPfS_S_iiiiPiS0_
	.p2align	3, 0x0
_Z10kernelFilaPfS_S_iiiiPiS0_:
	.quad	_Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_
	.size	_Z10kernelFilaPfS_S_iiiiPiS0_, 8

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

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Tiempo GPU una hebra por fila: "
	.size	.L.str.12, 32

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"[ms]"
	.size	.L.str.13, 5

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"Tiempo CPU es: "
	.size	.L.str.14, 16

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"Tiempo GPU una hebra por convolucion: "
	.size	.L.str.15, 39

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"Tiempo GPU Streams: %f[ms]\n"
	.size	.L.str.16, 28

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"name.txt"
	.size	.L.str.17, 9

	.type	.L.str.18,@object               # @.str.18
.L.str.18:
	.asciz	"Ingrese el nombre de la foto sin la extension: "
	.size	.L.str.18, 48

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

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z12kernelStreamPfS_S_iiiiPiS0_i"
	.size	.L__unnamed_1, 33

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z17kernelConvolucionPfS_S_iiiiPiS0_"
	.size	.L__unnamed_2, 37

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z10kernelFilaPfS_S_iiiiPiS0_"
	.size	.L__unnamed_3, 30

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

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

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z27__device_stub__kernelStreamPfS_S_iiiiPiS0_i
	.addrsig_sym _Z32__device_stub__kernelConvolucionPfS_S_iiiiPiS0_
	.addrsig_sym _Z25__device_stub__kernelFilaPfS_S_iiiiPiS0_
	.addrsig_sym __gxx_personality_v0
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Unwind_Resume
	.addrsig_sym _ZSt4cout
	.addrsig_sym _Z12kernelStreamPfS_S_iiiiPiS0_i
	.addrsig_sym _Z17kernelConvolucionPfS_S_iiiiPiS0_
	.addrsig_sym _Z10kernelFilaPfS_S_iiiiPiS0_
	.addrsig_sym _ZSt3cin
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z12kernelStreamPfS_S_iiiiPiS0_i ; -- Begin function _Z12kernelStreamPfS_S_iiiiPiS0_i
	.globl	_Z12kernelStreamPfS_S_iiiiPiS0_i
	.p2align	8
	.type	_Z12kernelStreamPfS_S_iiiiPiS0_i,@function
_Z12kernelStreamPfS_S_iiiiPiS0_i:       ; @_Z12kernelStreamPfS_S_iiiiPiS0_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x4c
	s_load_b32 s3, s[0:1], 0x38
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mov_b32 s2, exec_lo
	v_cmpx_gt_i32_e64 s3, v1
	s_cbranch_execz .LBB0_6
; %bb.1:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b128 s[4:7], s[0:1], 0x28
	v_ashrrev_i32_e32 v2, 31, v1
	s_load_b32 s12, s[0:1], 0x1c
	s_mov_b32 s13, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v4, v1, v2
	v_xor_b32_e32 v4, v4, v2
	s_waitcnt lgkmcnt(0)
	s_ashr_i32 s3, s2, 31
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_add_i32 s2, s2, s3
	s_xor_b32 s2, s2, s3
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_cvt_f32_u32_e32 v0, s2
	s_sub_i32 s8, 0, s2
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v0, v0
	v_mul_lo_u32 v3, s8, v0
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v3, v0, v3
	v_add_nc_u32_e32 v0, v0, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v0, v4, v0
	v_mul_lo_u32 v3, v0, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v3, v4, v3
	v_add_nc_u32_e32 v4, 1, v0
	v_subrev_nc_u32_e32 v5, s2, v3
	v_cmp_le_u32_e32 vcc_lo, s2, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v3, v3, v5, vcc_lo
	v_xor_b32_e32 v5, s3, v2
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s2, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_lshlrev_b32_e32 v3, 1, v5
	v_add_nc_u32_e32 v4, 1, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	v_xor_b32_e32 v0, v0, v5
	v_mov_b32_e32 v5, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v4, v0, 1, v1
	v_mov_b32_e32 v0, 0
	v_sub_nc_u32_e32 v6, v4, v3
.LBB0_2:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	s_delay_alu instid0(VALU_DEP_1)
	v_mov_b32_e32 v3, v6
	s_mov_b64 s[2:3], 0
.LBB0_3:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	s_add_u32 s14, s4, s2
	s_addc_u32 s15, s5, s3
	s_add_u32 s16, s6, s2
	s_addc_u32 s17, s7, s3
	v_lshlrev_b64 v[7:8], 2, v[3:4]
	v_add_nc_u32_e32 v3, 1, v3
	s_add_u32 s2, s2, 4
	s_addc_u32 s3, s3, 0
	s_cmp_eq_u32 s2, 12
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v7, vcc_lo, s8, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v8, vcc_lo
	global_load_b32 v4, v[7:8], off
	s_load_b32 s14, s[14:15], 0x0
	s_load_b32 s15, s[16:17], 0x0
	s_waitcnt lgkmcnt(0)
	v_cvt_f32_i32_e32 v7, s14
	v_cvt_f32_i32_e32 v8, s15
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v0, v4, v7
	v_fmac_f32_e32 v5, v4, v8
	s_cbranch_scc0 .LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	s_add_i32 s13, s13, 1
	s_add_u32 s4, s4, 12
	s_addc_u32 s5, s5, 0
	v_add_nc_u32_e32 v6, s12, v6
	s_add_u32 s6, s6, 12
	s_addc_u32 s7, s7, 0
	s_cmp_eq_u32 s13, 3
	s_cbranch_scc0 .LBB0_2
; %bb.5:
	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 v3, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v4, vcc_lo, s11, v2, vcc_lo
	v_add_co_u32 v1, vcc_lo, s0, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s1, v2, vcc_lo
	global_store_b32 v[3:4], v0, off
	global_store_b32 v[1:2], v5, off
.LBB0_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z12kernelStreamPfS_S_iiiiPiS0_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 320
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 18
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z12kernelStreamPfS_S_iiiiPiS0_i, .Lfunc_end0-_Z12kernelStreamPfS_S_iiiiPiS0_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 544
; NumSgprs: 20
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 20
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z17kernelConvolucionPfS_S_iiiiPiS0_ ; -- Begin function _Z17kernelConvolucionPfS_S_iiiiPiS0_
	.globl	_Z17kernelConvolucionPfS_S_iiiiPiS0_
	.p2align	8
	.type	_Z17kernelConvolucionPfS_S_iiiiPiS0_,@function
_Z17kernelConvolucionPfS_S_iiiiPiS0_:   ; @_Z17kernelConvolucionPfS_S_iiiiPiS0_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x44
	s_load_b128 s[4:7], s[0:1], 0x1c
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1)
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_mul_i32 s2, s6, s5
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s2, v1
	s_and_saveexec_b32 s2, vcc_lo
	s_cbranch_execz .LBB1_6
; %bb.1:
	s_ashr_i32 s2, s6, 31
	v_ashrrev_i32_e32 v2, 31, v1
	s_add_i32 s3, s6, s2
	s_clause 0x1
	s_load_b128 s[8:11], s[0:1], 0x0
	s_load_b64 s[6:7], s[0:1], 0x10
	s_xor_b32 s3, s3, s2
	v_add_nc_u32_e32 v4, v1, v2
	v_cvt_f32_u32_e32 v0, s3
	s_sub_i32 s5, 0, s3
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_xor_b32_e32 v4, v4, v2
	v_rcp_iflag_f32_e32 v0, v0
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v0, 0x4f7ffffe, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cvt_u32_f32_e32 v0, v0
	v_mul_lo_u32 v3, s5, v0
	s_mov_b32 s5, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v3, v0, v3
	v_add_nc_u32_e32 v0, v0, v3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_hi_u32 v0, v4, v0
	v_mul_lo_u32 v3, v0, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v3, v4, v3
	v_add_nc_u32_e32 v4, 1, v0
	v_subrev_nc_u32_e32 v5, s3, v3
	v_cmp_le_u32_e32 vcc_lo, s3, v3
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_3)
	v_cndmask_b32_e32 v3, v3, v5, vcc_lo
	v_xor_b32_e32 v5, s2, v2
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	v_cmp_le_u32_e32 vcc_lo, s3, v3
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_lshlrev_b32_e32 v3, 1, v5
	v_add_nc_u32_e32 v4, 1, v0
	s_load_b128 s[0:3], s[0:1], 0x28
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v4, vcc_lo
	v_xor_b32_e32 v0, v0, v5
	v_mov_b32_e32 v5, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v4, v0, 1, v1
	v_mov_b32_e32 v0, 0
	v_sub_nc_u32_e32 v6, v4, v3
.LBB1_2:                                ; %.preheader
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_3 Depth 2
	s_delay_alu instid0(VALU_DEP_1)
	v_mov_b32_e32 v3, v6
	s_mov_b64 s[12:13], 0
.LBB1_3:                                ;   Parent Loop BB1_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_delay_alu instid0(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	s_waitcnt lgkmcnt(0)
	s_add_u32 s14, s0, s12
	s_addc_u32 s15, s1, s13
	s_add_u32 s16, s2, s12
	s_addc_u32 s17, s3, s13
	v_lshlrev_b64 v[7:8], 2, v[3:4]
	v_add_nc_u32_e32 v3, 1, v3
	s_add_u32 s12, s12, 4
	s_addc_u32 s13, s13, 0
	s_cmp_eq_u32 s12, 12
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_u32 v7, vcc_lo, s8, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v8, vcc_lo
	global_load_b32 v4, v[7:8], off
	s_load_b32 s14, s[14:15], 0x0
	s_load_b32 s15, s[16:17], 0x0
	s_waitcnt lgkmcnt(0)
	v_cvt_f32_i32_e32 v7, s14
	v_cvt_f32_i32_e32 v8, s15
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_fmac_f32_e32 v0, v4, v7
	v_fmac_f32_e32 v5, v4, v8
	s_cbranch_scc0 .LBB1_3
; %bb.4:                                ;   in Loop: Header=BB1_2 Depth=1
	s_add_i32 s5, s5, 1
	s_add_u32 s0, s0, 12
	s_addc_u32 s1, s1, 0
	v_add_nc_u32_e32 v6, s4, v6
	s_add_u32 s2, s2, 12
	s_addc_u32 s3, s3, 0
	s_cmp_eq_u32 s5, 3
	s_cbranch_scc0 .LBB1_2
; %bb.5:
	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 v3, vcc_lo, s10, v1
	v_add_co_ci_u32_e32 v4, vcc_lo, s11, v2, vcc_lo
	v_add_co_u32 v1, vcc_lo, s6, v1
	v_add_co_ci_u32_e32 v2, vcc_lo, s7, v2, vcc_lo
	global_store_b32 v[3:4], v0, off
	global_store_b32 v[1:2], v5, off
.LBB1_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17kernelConvolucionPfS_S_iiiiPiS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 312
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 18
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z17kernelConvolucionPfS_S_iiiiPiS0_, .Lfunc_end1-_Z17kernelConvolucionPfS_S_iiiiPiS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 520
; NumSgprs: 20
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 20
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z10kernelFilaPfS_S_iiiiPiS0_ ; -- Begin function _Z10kernelFilaPfS_S_iiiiPiS0_
	.globl	_Z10kernelFilaPfS_S_iiiiPiS0_
	.p2align	8
	.type	_Z10kernelFilaPfS_S_iiiiPiS0_,@function
_Z10kernelFilaPfS_S_iiiiPiS0_:          ; @_Z10kernelFilaPfS_S_iiiiPiS0_
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x44
	s_load_b128 s[4:7], s[0:1], 0x1c
	s_waitcnt lgkmcnt(0)
	s_and_b32 s2, s2, 0xffff
	s_cmp_gt_i32 s6, 0
	v_mad_u64_u32 v[1:2], null, s15, s2, v[0:1]
	s_cselect_b32 s2, -1, 0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(SALU_CYCLE_1)
	v_cmp_gt_i32_e32 vcc_lo, s5, v1
	s_mov_b32 s5, 0
	s_and_b32 s2, vcc_lo, s2
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB2_7
; %bb.1:                                ; %.preheader52.lr.ph
	s_clause 0x2
	s_load_b128 s[8:11], s[0:1], 0x0
	s_load_b64 s[12:13], s[0:1], 0x10
	s_load_b128 s[0:3], s[0:1], 0x28
	v_mul_lo_u32 v2, v1, s6
	v_mul_lo_u32 v3, s4, v1
.LBB2_2:                                ; %.preheader52
                                        ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB2_3 Depth 2
                                        ;       Child Loop BB2_4 Depth 3
	v_dual_mov_b32 v4, 0 :: v_dual_mov_b32 v5, 0
	s_delay_alu instid0(VALU_DEP_2)
	v_mov_b32_e32 v6, v3
	s_mov_b32 s7, 0
	s_waitcnt lgkmcnt(0)
	s_mov_b64 s[14:15], s[2:3]
	s_mov_b64 s[16:17], s[0:1]
.LBB2_3:                                ; %.preheader
                                        ;   Parent Loop BB2_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB2_4 Depth 3
	v_mov_b32_e32 v0, v6
	s_mov_b64 s[18:19], 0
.LBB2_4:                                ;   Parent Loop BB2_2 Depth=1
                                        ;     Parent Loop BB2_3 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	s_delay_alu instid0(VALU_DEP_1)
	v_ashrrev_i32_e32 v1, 31, v0
	s_add_u32 s20, s16, s18
	s_addc_u32 s21, s17, s19
	s_add_u32 s22, s14, s18
	s_addc_u32 s23, s15, s19
	v_lshlrev_b64 v[7:8], 2, v[0:1]
	s_add_u32 s18, s18, 4
	s_addc_u32 s19, s19, 0
	s_cmp_eq_u32 s18, 12
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v7, vcc_lo, s8, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v8, vcc_lo
	global_load_b32 v1, v[7:8], off
	s_load_b32 s20, s[20:21], 0x0
	s_load_b32 s21, s[22:23], 0x0
	s_waitcnt lgkmcnt(0)
	v_cvt_f32_i32_e32 v7, s20
	v_cvt_f32_i32_e32 v8, s21
	s_waitcnt vmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_dual_fmac_f32 v5, v1, v7 :: v_dual_add_nc_u32 v0, 1, v0
	v_fmac_f32_e32 v4, v1, v8
	s_cbranch_scc0 .LBB2_4
; %bb.5:                                ;   in Loop: Header=BB2_3 Depth=2
	s_add_i32 s7, s7, 1
	s_add_u32 s16, s16, 12
	s_addc_u32 s17, s17, 0
	v_add_nc_u32_e32 v6, s4, v6
	s_add_u32 s14, s14, 12
	s_addc_u32 s15, s15, 0
	s_cmp_eq_u32 s7, 3
	s_cbranch_scc0 .LBB2_3
; %bb.6:                                ;   in Loop: Header=BB2_2 Depth=1
	v_add_nc_u32_e32 v0, s5, v2
	v_add_nc_u32_e32 v3, 1, v3
	s_add_i32 s5, s5, 1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	s_cmp_eq_u32 s5, s6
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[0:1]
	v_add_co_u32 v6, vcc_lo, s10, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s11, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s12, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s13, v1, vcc_lo
	global_store_b32 v[6:7], v5, off
	global_store_b32 v[0:1], v4, off
	s_cbranch_scc0 .LBB2_2
.LBB2_7:                                ; %.loopexit
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10kernelFilaPfS_S_iiiiPiS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 312
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 24
		.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	_Z10kernelFilaPfS_S_iiiiPiS0_, .Lfunc_end2-_Z10kernelFilaPfS_S_iiiiPiS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 404
; NumSgprs: 26
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 3
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 26
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
