#include "cuda.h"
#include "stdio.h"


#include <sys/time.h>
#include <sys/resource.h>


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

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


int cant = 512;
int cant_elem = cant * cant;

// arreglos usados como matrices
int* arreglo_A;
int* arreglo_B;
int* arreglo_C;


int* d_arreglo_A;
int* d_arreglo_B;
int* d_arreglo_C;

int* d_arreglo_AT;
int* d_arreglo_BT;


void printi(int i){
	printf("%d\n", i);
}

void init_CPU_array(int array[], int n){
	for(int i = 0; i < n; i++) {
		array[i] = i;
	}
}

void print_CPU_array(int array[], int n){
	for(int i = 0; i < n; i++) {
		printi(array[i]);
	}
}

// calcula la transpuesta out-place
__global__ void transposeador(int* arreglo_b, int* arreglo_bt, int N){

	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	int i = (int)tid / N; // columna
	int j = (int)tid % N; // fila
	if((i<N) && (j<N)){
		arreglo_bt[i*N+j] = arreglo_b[j*N+i];
	}

}


// copia B en C
__global__ void copiador(int* arreglo_b, int* arreglo_c, int N){

	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	if(tid < N)
		arreglo_c[tid] = arreglo_b[tid];
}

// C += A
__global__ void sumador(int* arreglo_a, int* arreglo_c, int N){
	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	if(tid < N)
		arreglo_c[tid] += arreglo_a[tid];
}

// C += A * B^t
__global__ void multiplicador(int* arreglo_a, int* arreglo_b_trans, int* arreglo_c, int N, int total_elem){

	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	int i = (int)tid / N; // columna
	int j = (int)tid % N; // fila

	int k;
	int cuenta = 0;
	if(tid < total_elem)
	{
		for (k=0; k< N; k++){
			cuenta += arreglo_a[i*N+k] * arreglo_b_trans[k*N+j];
		}
		arreglo_c[tid] += cuenta;
	}

}


void solucion_CPU(){
	int* arreglo_at;
	int* arreglo_bt;
	int* arreglo_a_por_b;
	int* arreglo_res;


	int numBytes = sizeof(int) * cant_elem; //bytes a alocar

	arreglo_at = (int *) malloc(numBytes);
	arreglo_bt = (int *) malloc(numBytes);
	arreglo_a_por_b = (int *) malloc(numBytes); // resultado de A * B^t
	arreglo_res = (int *) malloc(numBytes);

	double timetick;
	timetick = dwalltime();

	// calculamos la transpeusta de arreglo_B
	for (int i = 0; i < cant_elem; ++i)
	{
		int col = i / cant; // columna
		int row = i % cant; // fila
		arreglo_bt[col*cant+row] = arreglo_B[row*cant+col];
	}

	// calculamos la transpeusta de arreglo_A
	for (int i = 0; i < cant_elem; ++i)
	{
		int col = i / cant; // columna
		int row = i % cant; // fila
		arreglo_at[col*cant+row] = arreglo_A[row*cant+col];
	}

	// A * B^t
	for (int i = 0; i < cant_elem; i++)
	{
		int col = i / cant; // columna
		int row = i % cant; // fila
		int mul = 0;
		for (int k=0; k< cant; k++){
			mul += arreglo_A[col*cant+k] * arreglo_bt[k*cant+row];
		}
		arreglo_a_por_b[i] = mul;
	}

	for (int i = 0; i < cant_elem; i++){
		arreglo_res[i] = 0;
	}
	// C = B + A * B^t + A^t
	for (int i = 0; i < cant_elem; i++){
		arreglo_res[i] += arreglo_B[i] + arreglo_a_por_b[i] + arreglo_at[i];
	}

	printf("-> Tiempo transcurrido en la CPU %f\n", dwalltime() - timetick);
	
	// printf("%s\n", "");
	// printf("%s\n", "Resultados CPU:");
	// for (int i = 0; i < cant_elem; i++){
	// 	printf("%d\n", arreglo_res[i]);
	// }

	


	free(arreglo_at);
	free(arreglo_bt);
	free(arreglo_a_por_b);
	free(arreglo_res);
}


int main(int argc, char** argv){
	int numBytes = sizeof(int) * cant_elem; //bytes a alocar

	arreglo_A = (int *) malloc(numBytes);
	arreglo_B = (int *) malloc(numBytes);
	arreglo_C = (int *) malloc(numBytes);
	double timetick;

	// llenamos los arreglos
	init_CPU_array(arreglo_A, cant_elem);
	init_CPU_array(arreglo_B, cant_elem);
	init_CPU_array(arreglo_C, cant_elem);

	// allocamos memoria en la gpu
	cudaMalloc(&d_arreglo_A, numBytes);
	cudaMalloc(&d_arreglo_B, numBytes);
	cudaMalloc(&d_arreglo_C, numBytes);

	cudaMalloc(&d_arreglo_AT, numBytes);
	cudaMalloc(&d_arreglo_BT, numBytes);

	// copiamos los datos de la cpu a la gpu
	cudaMemcpy(d_arreglo_A, arreglo_A, numBytes, cudaMemcpyHostToDevice);
	cudaMemcpy(d_arreglo_B, arreglo_B, numBytes, cudaMemcpyHostToDevice);

	dim3 miGrid1D(512,1);
	dim3 miBloque1D(512,1);

	timetick = dwalltime();


	// C = B
	copiador<<<miGrid1D, miBloque1D>>>(d_arreglo_B, d_arreglo_C, cant_elem);

	// B^t
	transposeador<<<miGrid1D, miBloque1D>>>(d_arreglo_B, d_arreglo_BT, cant);


	// C += A * B^t
	multiplicador <<<miGrid1D, miBloque1D>>>(d_arreglo_A, d_arreglo_BT, d_arreglo_C, cant, cant_elem);

	// A^t
	transposeador<<<miGrid1D, miBloque1D>>>(d_arreglo_A, d_arreglo_AT, cant);

	// C += A^t
	sumador<<<miGrid1D, miBloque1D>>>(d_arreglo_AT, d_arreglo_C, cant_elem);

	// Esperamos a que termine la ejecucion
 	cudaThreadSynchronize();

	printf("-> Tiempo transcurrido en la GPU %f\n", dwalltime() - timetick);

	// nos traemos los resultados de la gpu a la cpu
	cudaMemcpy(arreglo_C, d_arreglo_C, numBytes, cudaMemcpyDeviceToHost);

	//imprimimos los resultados
	// printf("%s\n", "");
	// printf("%s\n", "Resultados GPU:");
	// print_CPU_array(arreglo_C, cant_elem);

	solucion_CPU();
	
	free(arreglo_A);
	free(arreglo_B);
	free(arreglo_C);
	cudaFree (d_arreglo_A);
	cudaFree (d_arreglo_B);
	cudaFree (d_arreglo_C);

}

	.file	"tmpxft_002b5336_00000000-6_entrega_1_ej1_outplace.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2035:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2035:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z9dwalltimev
	.type	_Z9dwalltimev, @function
_Z9dwalltimev:
.LFB2027:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	xorl	%esi, %esi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rdi
	call	gettimeofday@PLT
	cvtsi2sdq	8(%rsp), %xmm1
	cvtsi2sdq	16(%rsp), %xmm0
	divsd	.LC0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z9dwalltimev, .-_Z9dwalltimev
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d\n"
	.text
	.globl	_Z6printii
	.type	_Z6printii, @function
_Z6printii:
.LFB2028:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2028:
	.size	_Z6printii, .-_Z6printii
	.globl	_Z14init_CPU_arrayPii
	.type	_Z14init_CPU_arrayPii, @function
_Z14init_CPU_arrayPii:
.LFB2029:
	.cfi_startproc
	endbr64
	xorl	%eax, %eax
.L8:
	cmpl	%eax, %esi
	jle	.L10
	movl	%eax, (%rdi,%rax,4)
	incq	%rax
	jmp	.L8
.L10:
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z14init_CPU_arrayPii, .-_Z14init_CPU_arrayPii
	.globl	_Z15print_CPU_arrayPii
	.type	_Z15print_CPU_arrayPii, @function
_Z15print_CPU_arrayPii:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
.L12:
	cmpl	%ebx, %ebp
	jle	.L15
	movl	(%r12,%rbx,4), %edi
	incq	%rbx
	call	_Z6printii
	jmp	.L12
.L15:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z15print_CPU_arrayPii, .-_Z15print_CPU_arrayPii
	.section	.rodata.str1.1
.LC2:
	.string	"-> Tiempo transcurrido en la CPU %f\n"
	.text
	.globl	_Z12solucion_CPUv
	.type	_Z12solucion_CPUv, @function
_Z12solucion_CPUv:
.LFB2031:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movl	cant_elem(%rip), %eax
	leal	0(,%rax,4), %r12d
	movslq	%r12d, %r12
	movq	%r12, %rdi
	call	malloc@PLT
	movq	%r12, %rdi
	movq	%rax, %rbp
	call	malloc@PLT
	movq	%r12, %rdi
	movq	%rax, %rbx
	call	malloc@PLT
	movq	%r12, %rdi
	movq	%rax, %r13
	call	malloc@PLT
	movq	%rax, %r12
	call	_Z9dwalltimev
	movl	cant_elem(%rip), %esi
	movl	cant(%rip), %ecx
	xorl	%edi, %edi
	movq	arreglo_B(%rip), %r9
	movsd	%xmm0, 8(%rsp)
.L17:
	movl	%edi, %eax
	cmpl	%edi, %esi
	jle	.L30
	cltd
	idivl	%ecx
	imull	%ecx, %edx
	addl	%eax, %edx
	movslq	%edx, %rdx
	movl	(%r9,%rdx,4), %eax
	movl	%eax, (%rbx,%rdi,4)
	incq	%rdi
	jmp	.L17
.L30:
	movq	arreglo_A(%rip), %r10
	xorl	%edi, %edi
.L19:
	movl	%edi, %eax
	cmpl	%edi, %esi
	jle	.L31
	cltd
	idivl	%ecx
	imull	%ecx, %edx
	addl	%eax, %edx
	movslq	%edx, %rdx
	movl	(%r10,%rdx,4), %eax
	movl	%eax, 0(%rbp,%rdi,4)
	incq	%rdi
	jmp	.L19
.L31:
	movslq	%ecx, %r8
	xorl	%edi, %edi
	salq	$2, %r8
.L21:
	movl	%edi, %eax
	cmpl	%edi, %esi
	jle	.L32
	cltd
	xorl	%r11d, %r11d
	idivl	%ecx
	imull	%ecx, %eax
	movslq	%edx, %rdx
	leaq	(%rbx,%rdx,4), %rdx
	cltq
	leaq	(%r10,%rax,4), %r15
	xorl	%eax, %eax
.L22:
	cmpl	%eax, %ecx
	jle	.L33
	movl	(%r15,%rax,4), %r14d
	imull	(%rdx), %r14d
	incq	%rax
	addq	%r8, %rdx
	addl	%r14d, %r11d
	jmp	.L22
.L33:
	movl	%r11d, 0(%r13,%rdi,4)
	incq	%rdi
	jmp	.L21
.L32:
	xorl	%eax, %eax
.L25:
	cmpl	%eax, %esi
	jle	.L34
	xorl	%edx, %edx
	movl	%edx, (%r12,%rax,4)
	incq	%rax
	jmp	.L25
.L34:
	xorl	%eax, %eax
.L27:
	cmpl	%eax, %esi
	jle	.L35
	movl	0(%r13,%rax,4), %edx
	addl	(%r9,%rax,4), %edx
	addl	0(%rbp,%rax,4), %edx
	addl	%edx, (%r12,%rax,4)
	incq	%rax
	jmp	.L27
.L35:
	call	_Z9dwalltimev
	subsd	8(%rsp), %xmm0
	leaq	.LC2(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	%rbp, %rdi
	call	free@PLT
	movq	%rbx, %rdi
	call	free@PLT
	movq	%r13, %rdi
	call	free@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movq	%r12, %rdi
	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	free@PLT
	.cfi_endproc
.LFE2031:
	.size	_Z12solucion_CPUv, .-_Z12solucion_CPUv
	.globl	_Z36__device_stub__Z13transposeadorPiS_iPiS_i
	.type	_Z36__device_stub__Z13transposeadorPiS_iPiS_i, @function
_Z36__device_stub__Z13transposeadorPiS_iPiS_i:
.LFB2057:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L36
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z13transposeadorPiS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L36:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L38
	call	__stack_chk_fail@PLT
.L38:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z36__device_stub__Z13transposeadorPiS_iPiS_i, .-_Z36__device_stub__Z13transposeadorPiS_iPiS_i
	.globl	_Z13transposeadorPiS_i
	.type	_Z13transposeadorPiS_i, @function
_Z13transposeadorPiS_i:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z13transposeadorPiS_iPiS_i
	.cfi_endproc
.LFE2058:
	.size	_Z13transposeadorPiS_i, .-_Z13transposeadorPiS_i
	.globl	_Z30__device_stub__Z8copiadorPiS_iPiS_i
	.type	_Z30__device_stub__Z8copiadorPiS_iPiS_i, @function
_Z30__device_stub__Z8copiadorPiS_iPiS_i:
.LFB2059:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L41
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z8copiadorPiS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L41:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2059:
	.size	_Z30__device_stub__Z8copiadorPiS_iPiS_i, .-_Z30__device_stub__Z8copiadorPiS_iPiS_i
	.globl	_Z8copiadorPiS_i
	.type	_Z8copiadorPiS_i, @function
_Z8copiadorPiS_i:
.LFB2060:
	.cfi_startproc
	endbr64
	jmp	_Z30__device_stub__Z8copiadorPiS_iPiS_i
	.cfi_endproc
.LFE2060:
	.size	_Z8copiadorPiS_i, .-_Z8copiadorPiS_i
	.globl	_Z29__device_stub__Z7sumadorPiS_iPiS_i
	.type	_Z29__device_stub__Z7sumadorPiS_iPiS_i, @function
_Z29__device_stub__Z7sumadorPiS_iPiS_i:
.LFB2061:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L46
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z7sumadorPiS_i(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L46:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L48
	call	__stack_chk_fail@PLT
.L48:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2061:
	.size	_Z29__device_stub__Z7sumadorPiS_iPiS_i, .-_Z29__device_stub__Z7sumadorPiS_iPiS_i
	.globl	_Z7sumadorPiS_i
	.type	_Z7sumadorPiS_i, @function
_Z7sumadorPiS_i:
.LFB2062:
	.cfi_startproc
	endbr64
	jmp	_Z29__device_stub__Z7sumadorPiS_iPiS_i
	.cfi_endproc
.LFE2062:
	.size	_Z7sumadorPiS_i, .-_Z7sumadorPiS_i
	.globl	_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii
	.type	_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii, @function
_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii:
.LFB2063:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	40(%rsp), %rcx
	movl	%r8d, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L51
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z13multiplicadorPiS_S_ii(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L51:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2063:
	.size	_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii, .-_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii
	.globl	_Z13multiplicadorPiS_S_ii
	.type	_Z13multiplicadorPiS_S_ii, @function
_Z13multiplicadorPiS_S_ii:
.LFB2064:
	.cfi_startproc
	endbr64
	jmp	_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii
	.cfi_endproc
.LFE2064:
	.size	_Z13multiplicadorPiS_S_ii, .-_Z13multiplicadorPiS_S_ii
	.section	.rodata.str1.1
.LC3:
	.string	"-> Tiempo transcurrido en la GPU %f\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2032:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$56, %rsp
	.cfi_def_cfa_offset 96
	movl	cant_elem(%rip), %ebp
	leal	0(,%rbp,4), %ebx
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %r13
	movq	%rax, arreglo_A(%rip)
	call	malloc@PLT
	movq	%rbx, %rdi
	movq	%rax, %r12
	movq	%rax, arreglo_B(%rip)
	call	malloc@PLT
	movl	%ebp, %esi
	movq	%r13, %rdi
	movq	%rax, %rdx
	movq	%rax, arreglo_C(%rip)
	call	_Z14init_CPU_arrayPii
	movq	%r12, %rdi
	call	_Z14init_CPU_arrayPii
	movq	%rdx, %rdi
	call	_Z14init_CPU_arrayPii
	movq	%rbx, %rsi
	leaq	d_arreglo_A(%rip), %rdi
	call	cudaMalloc@PLT
	movq	%rbx, %rsi
	leaq	d_arreglo_B(%rip), %rdi
	call	cudaMalloc@PLT
	movq	%rbx, %rsi
	leaq	d_arreglo_C(%rip), %rdi
	call	cudaMalloc@PLT
	movq	%rbx, %rsi
	leaq	d_arreglo_AT(%rip), %rdi
	call	cudaMalloc@PLT
	movq	%rbx, %rsi
	leaq	d_arreglo_BT(%rip), %rdi
	call	cudaMalloc@PLT
	movq	arreglo_A(%rip), %rsi
	movl	$1, %ecx
	movq	%rbx, %rdx
	movq	d_arreglo_A(%rip), %rdi
	call	cudaMemcpy@PLT
	movq	arreglo_B(%rip), %rsi
	movl	$1, %ecx
	movq	%rbx, %rdx
	movq	d_arreglo_B(%rip), %rdi
	call	cudaMemcpy@PLT
	movl	$8388609, %eax
	movl	$1, 32(%rsp)
	salq	$9, %rax
	movl	$1, 44(%rsp)
	movq	%rax, 24(%rsp)
	movq	%rax, 36(%rsp)
	call	_Z9dwalltimev
	movl	44(%rsp), %ecx
	movl	32(%rsp), %esi
	xorl	%r9d, %r9d
	movq	36(%rsp), %rdx
	movq	24(%rsp), %rdi
	xorl	%r8d, %r8d
	movsd	%xmm0, 8(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L57
	movl	cant_elem(%rip), %edx
	movq	d_arreglo_C(%rip), %rsi
	movq	d_arreglo_B(%rip), %rdi
	call	_Z30__device_stub__Z8copiadorPiS_iPiS_i
.L57:
	movl	44(%rsp), %ecx
	movq	36(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L58
	movl	cant(%rip), %edx
	movq	d_arreglo_BT(%rip), %rsi
	movq	d_arreglo_B(%rip), %rdi
	call	_Z36__device_stub__Z13transposeadorPiS_iPiS_i
.L58:
	movl	44(%rsp), %ecx
	movq	36(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L59
	movl	cant_elem(%rip), %r8d
	movl	cant(%rip), %ecx
	movq	d_arreglo_C(%rip), %rdx
	movq	d_arreglo_BT(%rip), %rsi
	movq	d_arreglo_A(%rip), %rdi
	call	_Z39__device_stub__Z13multiplicadorPiS_S_iiPiS_S_ii
.L59:
	movl	44(%rsp), %ecx
	movq	36(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L60
	movl	cant(%rip), %edx
	movq	d_arreglo_AT(%rip), %rsi
	movq	d_arreglo_A(%rip), %rdi
	call	_Z36__device_stub__Z13transposeadorPiS_iPiS_i
.L60:
	movl	44(%rsp), %ecx
	movq	36(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	24(%rsp), %rdi
	movl	32(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L61
	movl	cant_elem(%rip), %edx
	movq	d_arreglo_C(%rip), %rsi
	movq	d_arreglo_AT(%rip), %rdi
	call	_Z29__device_stub__Z7sumadorPiS_iPiS_i
.L61:
	call	cudaThreadSynchronize@PLT
	call	_Z9dwalltimev
	subsd	8(%rsp), %xmm0
	leaq	.LC3(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	d_arreglo_C(%rip), %rsi
	movq	%rbx, %rdx
	movq	arreglo_C(%rip), %rdi
	movl	$2, %ecx
	call	cudaMemcpy@PLT
	call	_Z12solucion_CPUv
	movq	arreglo_A(%rip), %rdi
	call	free@PLT
	movq	arreglo_B(%rip), %rdi
	call	free@PLT
	movq	arreglo_C(%rip), %rdi
	call	free@PLT
	movq	d_arreglo_A(%rip), %rdi
	call	cudaFree@PLT
	movq	d_arreglo_B(%rip), %rdi
	call	cudaFree@PLT
	movq	d_arreglo_C(%rip), %rdi
	call	cudaFree@PLT
	addq	$56, %rsp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2032:
	.size	main, .-main
	.section	.rodata.str1.1
.LC4:
	.string	"_Z13multiplicadorPiS_S_ii"
.LC5:
	.string	"_Z7sumadorPiS_i"
.LC6:
	.string	"_Z8copiadorPiS_i"
.LC7:
	.string	"_Z13transposeadorPiS_i"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2066:
	.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	.LC4(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z13multiplicadorPiS_S_ii(%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	.LC5(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z7sumadorPiS_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC6(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z8copiadorPiS_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC7(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z13transposeadorPiS_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
.LFE2066:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.text.startup
	.type	_GLOBAL__sub_I__Z9dwalltimev, @function
_GLOBAL__sub_I__Z9dwalltimev:
.LFB2184:
	.cfi_startproc
	endbr64
	movl	cant(%rip), %eax
	imull	%eax, %eax
	movl	%eax, cant_elem(%rip)
	ret
	.cfi_endproc
.LFE2184:
	.size	_GLOBAL__sub_I__Z9dwalltimev, .-_GLOBAL__sub_I__Z9dwalltimev
	.section	.init_array
	.align 8
	.quad	_GLOBAL__sub_I__Z9dwalltimev
	.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
	.globl	d_arreglo_BT
	.bss
	.align 8
	.type	d_arreglo_BT, @object
	.size	d_arreglo_BT, 8
d_arreglo_BT:
	.zero	8
	.globl	d_arreglo_AT
	.align 8
	.type	d_arreglo_AT, @object
	.size	d_arreglo_AT, 8
d_arreglo_AT:
	.zero	8
	.globl	d_arreglo_C
	.align 8
	.type	d_arreglo_C, @object
	.size	d_arreglo_C, 8
d_arreglo_C:
	.zero	8
	.globl	d_arreglo_B
	.align 8
	.type	d_arreglo_B, @object
	.size	d_arreglo_B, 8
d_arreglo_B:
	.zero	8
	.globl	d_arreglo_A
	.align 8
	.type	d_arreglo_A, @object
	.size	d_arreglo_A, 8
d_arreglo_A:
	.zero	8
	.globl	arreglo_C
	.align 8
	.type	arreglo_C, @object
	.size	arreglo_C, 8
arreglo_C:
	.zero	8
	.globl	arreglo_B
	.align 8
	.type	arreglo_B, @object
	.size	arreglo_B, 8
arreglo_B:
	.zero	8
	.globl	arreglo_A
	.align 8
	.type	arreglo_A, @object
	.size	arreglo_A, 8
arreglo_A:
	.zero	8
	.globl	cant_elem
	.align 4
	.type	cant_elem, @object
	.size	cant_elem, 4
cant_elem:
	.zero	4
	.globl	cant
	.data
	.align 4
	.type	cant, @object
	.size	cant, 4
cant:
	.long	512
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1093567616
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include "hip/hip_runtime.h"
#include "stdio.h"


#include <sys/time.h>
#include <sys/resource.h>


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

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


int cant = 512;
int cant_elem = cant * cant;

// arreglos usados como matrices
int* arreglo_A;
int* arreglo_B;
int* arreglo_C;


int* d_arreglo_A;
int* d_arreglo_B;
int* d_arreglo_C;

int* d_arreglo_AT;
int* d_arreglo_BT;


void printi(int i){
	printf("%d\n", i);
}

void init_CPU_array(int array[], int n){
	for(int i = 0; i < n; i++) {
		array[i] = i;
	}
}

void print_CPU_array(int array[], int n){
	for(int i = 0; i < n; i++) {
		printi(array[i]);
	}
}

// calcula la transpuesta out-place
__global__ void transposeador(int* arreglo_b, int* arreglo_bt, int N){

	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	int i = (int)tid / N; // columna
	int j = (int)tid % N; // fila
	if((i<N) && (j<N)){
		arreglo_bt[i*N+j] = arreglo_b[j*N+i];
	}

}


// copia B en C
__global__ void copiador(int* arreglo_b, int* arreglo_c, int N){

	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	if(tid < N)
		arreglo_c[tid] = arreglo_b[tid];
}

// C += A
__global__ void sumador(int* arreglo_a, int* arreglo_c, int N){
	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	if(tid < N)
		arreglo_c[tid] += arreglo_a[tid];
}

// C += A * B^t
__global__ void multiplicador(int* arreglo_a, int* arreglo_b_trans, int* arreglo_c, int N, int total_elem){

	int tid = blockIdx.x * blockDim.x + threadIdx.x;
	int i = (int)tid / N; // columna
	int j = (int)tid % N; // fila

	int k;
	int cuenta = 0;
	if(tid < total_elem)
	{
		for (k=0; k< N; k++){
			cuenta += arreglo_a[i*N+k] * arreglo_b_trans[k*N+j];
		}
		arreglo_c[tid] += cuenta;
	}

}


void solucion_CPU(){
	int* arreglo_at;
	int* arreglo_bt;
	int* arreglo_a_por_b;
	int* arreglo_res;


	int numBytes = sizeof(int) * cant_elem; //bytes a alocar

	arreglo_at = (int *) malloc(numBytes);
	arreglo_bt = (int *) malloc(numBytes);
	arreglo_a_por_b = (int *) malloc(numBytes); // resultado de A * B^t
	arreglo_res = (int *) malloc(numBytes);

	double timetick;
	timetick = dwalltime();

	// calculamos la transpeusta de arreglo_B
	for (int i = 0; i < cant_elem; ++i)
	{
		int col = i / cant; // columna
		int row = i % cant; // fila
		arreglo_bt[col*cant+row] = arreglo_B[row*cant+col];
	}

	// calculamos la transpeusta de arreglo_A
	for (int i = 0; i < cant_elem; ++i)
	{
		int col = i / cant; // columna
		int row = i % cant; // fila
		arreglo_at[col*cant+row] = arreglo_A[row*cant+col];
	}

	// A * B^t
	for (int i = 0; i < cant_elem; i++)
	{
		int col = i / cant; // columna
		int row = i % cant; // fila
		int mul = 0;
		for (int k=0; k< cant; k++){
			mul += arreglo_A[col*cant+k] * arreglo_bt[k*cant+row];
		}
		arreglo_a_por_b[i] = mul;
	}

	for (int i = 0; i < cant_elem; i++){
		arreglo_res[i] = 0;
	}
	// C = B + A * B^t + A^t
	for (int i = 0; i < cant_elem; i++){
		arreglo_res[i] += arreglo_B[i] + arreglo_a_por_b[i] + arreglo_at[i];
	}

	printf("-> Tiempo transcurrido en la CPU %f\n", dwalltime() - timetick);
	
	// printf("%s\n", "");
	// printf("%s\n", "Resultados CPU:");
	// for (int i = 0; i < cant_elem; i++){
	// 	printf("%d\n", arreglo_res[i]);
	// }

	


	free(arreglo_at);
	free(arreglo_bt);
	free(arreglo_a_por_b);
	free(arreglo_res);
}


int main(int argc, char** argv){
	int numBytes = sizeof(int) * cant_elem; //bytes a alocar

	arreglo_A = (int *) malloc(numBytes);
	arreglo_B = (int *) malloc(numBytes);
	arreglo_C = (int *) malloc(numBytes);
	double timetick;

	// llenamos los arreglos
	init_CPU_array(arreglo_A, cant_elem);
	init_CPU_array(arreglo_B, cant_elem);
	init_CPU_array(arreglo_C, cant_elem);

	// allocamos memoria en la gpu
	hipMalloc(&d_arreglo_A, numBytes);
	hipMalloc(&d_arreglo_B, numBytes);
	hipMalloc(&d_arreglo_C, numBytes);

	hipMalloc(&d_arreglo_AT, numBytes);
	hipMalloc(&d_arreglo_BT, numBytes);

	// copiamos los datos de la cpu a la gpu
	hipMemcpy(d_arreglo_A, arreglo_A, numBytes, hipMemcpyHostToDevice);
	hipMemcpy(d_arreglo_B, arreglo_B, numBytes, hipMemcpyHostToDevice);

	dim3 miGrid1D(512,1);
	dim3 miBloque1D(512,1);

	timetick = dwalltime();


	// C = B
	copiador<<<miGrid1D, miBloque1D>>>(d_arreglo_B, d_arreglo_C, cant_elem);

	// B^t
	transposeador<<<miGrid1D, miBloque1D>>>(d_arreglo_B, d_arreglo_BT, cant);


	// C += A * B^t
	multiplicador <<<miGrid1D, miBloque1D>>>(d_arreglo_A, d_arreglo_BT, d_arreglo_C, cant, cant_elem);

	// A^t
	transposeador<<<miGrid1D, miBloque1D>>>(d_arreglo_A, d_arreglo_AT, cant);

	// C += A^t
	sumador<<<miGrid1D, miBloque1D>>>(d_arreglo_AT, d_arreglo_C, cant_elem);

	// Esperamos a que termine la ejecucion
 	hipDeviceSynchronize();

	printf("-> Tiempo transcurrido en la GPU %f\n", dwalltime() - timetick);

	// nos traemos los resultados de la gpu a la cpu
	hipMemcpy(arreglo_C, d_arreglo_C, numBytes, hipMemcpyDeviceToHost);

	//imprimimos los resultados
	// printf("%s\n", "");
	// printf("%s\n", "Resultados GPU:");
	// print_CPU_array(arreglo_C, cant_elem);

	solucion_CPU();
	
	free(arreglo_A);
	free(arreglo_B);
	free(arreglo_C);
	hipFree (d_arreglo_A);
	hipFree (d_arreglo_B);
	hipFree (d_arreglo_C);

}

	.text
	.file	"entrega_1_ej1_outplace.hip"
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z9dwalltimev
.LCPI0_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	_Z9dwalltimev
	.type	_Z9dwalltimev,@function
_Z9dwalltimev:                          # @_Z9dwalltimev
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movq	%rsp, %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	cvtsi2sdq	(%rbx), %xmm1
	cvtsi2sdq	8(%rbx), %xmm0
	divsd	.LCPI0_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z9dwalltimev, .Lfunc_end0-_Z9dwalltimev
	.cfi_endproc
                                        # -- End function
	.globl	_Z6printii                      # -- Begin function _Z6printii
	.type	_Z6printii,@function
_Z6printii:                             # @_Z6printii
	.cfi_startproc
# %bb.0:
	movl	%edi, %esi
	movl	$.L.str, %edi
	xorl	%eax, %eax
	jmp	printf                          # TAILCALL
.Lfunc_end1:
	.size	_Z6printii, .Lfunc_end1-_Z6printii
	.cfi_endproc
                                        # -- End function
	.globl	_Z14init_CPU_arrayPii           # -- Begin function _Z14init_CPU_arrayPii
	.type	_Z14init_CPU_arrayPii,@function
_Z14init_CPU_arrayPii:                  # @_Z14init_CPU_arrayPii
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB2_3
# %bb.1:                                # %.lr.ph.preheader
	movl	%esi, %eax
	xorl	%ecx, %ecx
.LBB2_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rdi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB2_2
.LBB2_3:                                # %._crit_edge
	retq
.Lfunc_end2:
	.size	_Z14init_CPU_arrayPii, .Lfunc_end2-_Z14init_CPU_arrayPii
	.cfi_endproc
                                        # -- End function
	.globl	_Z15print_CPU_arrayPii          # -- Begin function _Z15print_CPU_arrayPii
	.type	_Z15print_CPU_arrayPii,@function
_Z15print_CPU_arrayPii:                 # @_Z15print_CPU_arrayPii
	.cfi_startproc
# %bb.0:
	testl	%esi, %esi
	jle	.LBB3_4
# %bb.1:                                # %.lr.ph.preheader
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movl	%esi, %r14d
	xorl	%r15d, %r15d
.LBB3_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r15,4), %esi
	movl	$.L.str, %edi
	xorl	%eax, %eax
	callq	printf
	incq	%r15
	cmpq	%r15, %r14
	jne	.LBB3_2
# %bb.3:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	.cfi_restore %rbx
	.cfi_restore %r14
	.cfi_restore %r15
.LBB3_4:                                # %._crit_edge
	retq
.Lfunc_end3:
	.size	_Z15print_CPU_arrayPii, .Lfunc_end3-_Z15print_CPU_arrayPii
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__transposeadorPiS_i # -- Begin function _Z28__device_stub__transposeadorPiS_i
	.type	_Z28__device_stub__transposeadorPiS_i,@function
_Z28__device_stub__transposeadorPiS_i:  # @_Z28__device_stub__transposeadorPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13transposeadorPiS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z28__device_stub__transposeadorPiS_i, .Lfunc_end4-_Z28__device_stub__transposeadorPiS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__copiadorPiS_i # -- Begin function _Z23__device_stub__copiadorPiS_i
	.type	_Z23__device_stub__copiadorPiS_i,@function
_Z23__device_stub__copiadorPiS_i:       # @_Z23__device_stub__copiadorPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8copiadorPiS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z23__device_stub__copiadorPiS_i, .Lfunc_end5-_Z23__device_stub__copiadorPiS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z22__device_stub__sumadorPiS_i # -- Begin function _Z22__device_stub__sumadorPiS_i
	.type	_Z22__device_stub__sumadorPiS_i,@function
_Z22__device_stub__sumadorPiS_i:        # @_Z22__device_stub__sumadorPiS_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z7sumadorPiS_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z22__device_stub__sumadorPiS_i, .Lfunc_end6-_Z22__device_stub__sumadorPiS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z28__device_stub__multiplicadorPiS_S_ii # -- Begin function _Z28__device_stub__multiplicadorPiS_S_ii
	.type	_Z28__device_stub__multiplicadorPiS_S_ii,@function
_Z28__device_stub__multiplicadorPiS_S_ii: # @_Z28__device_stub__multiplicadorPiS_S_ii
	.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	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	4(%rsp), %rdx
	movl	%ecx, (%rdx)
	movq	%rsp, %rcx
	movl	%r8d, (%rcx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z13multiplicadorPiS_S_ii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	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	_Z28__device_stub__multiplicadorPiS_S_ii, .Lfunc_end7-_Z28__device_stub__multiplicadorPiS_S_ii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z12solucion_CPUv
.LCPI8_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	_Z12solucion_CPUv
	.type	_Z12solucion_CPUv,@function
_Z12solucion_CPUv:                      # @_Z12solucion_CPUv
	.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
	movl	cant_elem(%rip), %eax
	shll	$2, %eax
	movslq	%eax, %r12
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	malloc
	movq	%rax, %r12
	xorl	%r13d, %r13d
	leaq	24(%rsp), %rbp
	movq	%rbp, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%rbp), %r9
	movq	8(%rbp), %r10
	movl	cant_elem(%rip), %ebp
	testl	%ebp, %ebp
	jle	.LBB8_15
# %bb.1:                                # %.lr.ph
	movl	cant(%rip), %ecx
	movq	arreglo_B(%rip), %rsi
.LBB8_2:                                # =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %edi
	imull	%ecx, %edi
	addl	%eax, %edi
	movslq	%edi, %rdi
	movl	(%rsi,%rdi,4), %edi
	imull	%ecx, %eax
	addl	%edx, %eax
	cltq
	movl	%edi, (%r14,%rax,4)
	incl	%r13d
	cmpl	%r13d, %ebp
	jne	.LBB8_2
# %bb.3:                                # %.preheader63
	testl	%ebp, %ebp
	jle	.LBB8_15
# %bb.4:                                # %.lr.ph66
	movl	cant(%rip), %esi
	xorl	%ecx, %ecx
	movq	arreglo_A(%rip), %rdi
.LBB8_5:                                # =>This Inner Loop Header: Depth=1
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%edx, %r8d
	imull	%esi, %r8d
	addl	%eax, %r8d
	movslq	%r8d, %r8
	movl	(%rdi,%r8,4), %r8d
	imull	%esi, %eax
	addl	%edx, %eax
	cltq
	movl	%r8d, (%rbx,%rax,4)
	incl	%ecx
	cmpl	%ecx, %ebp
	jne	.LBB8_5
# %bb.6:                                # %.preheader62
	testl	%ebp, %ebp
	jle	.LBB8_15
# %bb.7:                                # %.lr.ph72
	movq	%r10, 16(%rsp)                  # 8-byte Spill
	movq	%r9, 8(%rsp)                    # 8-byte Spill
	movl	cant(%rip), %esi
	movq	arreglo_A(%rip), %rdi
	movslq	%esi, %r8
	shlq	$2, %r8
	xorl	%ecx, %ecx
.LBB8_8:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB8_10 Depth 2
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	$0, %eax
	testl	%esi, %esi
	jle	.LBB8_11
# %bb.9:                                # %.lr.ph69
                                        #   in Loop: Header=BB8_8 Depth=1
	movslq	%edx, %rax
	leaq	(%r14,%rax,4), %rdx
	movl	%ecx, %r9d
	subl	%eax, %r9d
	xorl	%eax, %eax
	movq	%rsi, %r10
.LBB8_10:                               #   Parent Loop BB8_8 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movslq	%r9d, %r9
	movl	(%rdx), %r11d
	imull	(%rdi,%r9,4), %r11d
	addl	%r11d, %eax
	addq	%r8, %rdx
	incl	%r9d
	decq	%r10
	jne	.LBB8_10
.LBB8_11:                               # %._crit_edge
                                        #   in Loop: Header=BB8_8 Depth=1
	movl	%eax, (%r15,%rcx,4)
	incq	%rcx
	cmpq	%rbp, %rcx
	jne	.LBB8_8
# %bb.12:                               # %.preheader61
	testl	%ebp, %ebp
	movq	8(%rsp), %r9                    # 8-byte Reload
	movq	16(%rsp), %r10                  # 8-byte Reload
	jle	.LBB8_15
# %bb.13:                               # %.lr.ph76
	leaq	(,%rbp,4), %rdx
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
	movq	16(%rsp), %r10                  # 8-byte Reload
	movq	8(%rsp), %r9                    # 8-byte Reload
	movq	arreglo_B(%rip), %rax
.LBB8_14:                               # =>This Inner Loop Header: Depth=1
	movl	(%r15,%r13,4), %ecx
	addl	(%rax,%r13,4), %ecx
	addl	(%rbx,%r13,4), %ecx
	addl	%ecx, (%r12,%r13,4)
	incq	%r13
	cmpq	%r13, %rbp
	jne	.LBB8_14
.LBB8_15:                               # %._crit_edge77
	cvtsi2sd	%r10, %xmm0
	divsd	.LCPI8_0(%rip), %xmm0
	cvtsi2sd	%r9, %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, 8(%rsp)                  # 8-byte Spill
	leaq	24(%rsp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm1, %xmm1
	cvtsi2sdq	(%r13), %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r13), %xmm0
	divsd	.LCPI8_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	subsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movl	$.L.str.1, %edi
	movb	$1, %al
	callq	printf
	movq	%rbx, %rdi
	callq	free
	movq	%r14, %rdi
	callq	free
	movq	%r15, %rdi
	callq	free
	movq	%r12, %rdi
	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
	jmp	free                            # TAILCALL
.Lfunc_end8:
	.size	_Z12solucion_CPUv, .Lfunc_end8-_Z12solucion_CPUv
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI9_0:
	.quad	0x412e848000000000              # double 1.0E+6
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	cant_elem(%rip), %r12d
	leal	(,%r12,4), %eax
	movslq	%eax, %rbx
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r15
	movq	%rax, arreglo_A(%rip)
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, %r14
	movq	%rax, arreglo_B(%rip)
	movq	%rbx, %rdi
	callq	malloc
	movq	%rax, arreglo_C(%rip)
	testl	%r12d, %r12d
	jle	.LBB9_7
# %bb.1:                                # %.lr.ph.preheader.i
	xorl	%ecx, %ecx
.LBB9_2:                                # %.lr.ph.i
                                        # =>This Inner Loop Header: Depth=1
	movl	%ecx, (%r15,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %r12
	jne	.LBB9_2
# %bb.3:                                # %.lr.ph.i56.preheader
	xorl	%ecx, %ecx
.LBB9_4:                                # %.lr.ph.i56
                                        # =>This Inner Loop Header: Depth=1
	movl	%ecx, (%r14,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %r12
	jne	.LBB9_4
# %bb.5:                                # %.lr.ph.i63.preheader
	xorl	%ecx, %ecx
.LBB9_6:                                # %.lr.ph.i63
                                        # =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rax,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %r12
	jne	.LBB9_6
.LBB9_7:                                # %_Z14init_CPU_arrayPii.exit67
	movabsq	$4294967808, %r14               # imm = 0x100000200
	movl	$d_arreglo_A, %edi
	movq	%rbx, %rsi
	callq	hipMalloc
	movl	$d_arreglo_B, %edi
	movq	%rbx, %rsi
	callq	hipMalloc
	movl	$d_arreglo_C, %edi
	movq	%rbx, %rsi
	callq	hipMalloc
	movl	$d_arreglo_AT, %edi
	movq	%rbx, %rsi
	callq	hipMalloc
	movl	$d_arreglo_BT, %edi
	movq	%rbx, %rsi
	callq	hipMalloc
	movq	d_arreglo_A(%rip), %rdi
	movq	arreglo_A(%rip), %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movq	d_arreglo_B(%rip), %rdi
	movq	arreglo_B(%rip), %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	8(%rsp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%r15), %r12
	movq	8(%r15), %r15
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_9
# %bb.8:
	movq	d_arreglo_B(%rip), %rdi
	movq	d_arreglo_C(%rip), %rsi
	movl	cant_elem(%rip), %edx
	callq	_Z23__device_stub__copiadorPiS_i
.LBB9_9:
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_11
# %bb.10:
	movq	d_arreglo_B(%rip), %rdi
	movq	d_arreglo_BT(%rip), %rsi
	movl	cant(%rip), %edx
	callq	_Z28__device_stub__transposeadorPiS_i
.LBB9_11:
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_13
# %bb.12:
	movq	d_arreglo_A(%rip), %rdi
	movq	d_arreglo_BT(%rip), %rsi
	movq	d_arreglo_C(%rip), %rdx
	movl	cant(%rip), %ecx
	movl	cant_elem(%rip), %r8d
	callq	_Z28__device_stub__multiplicadorPiS_S_ii
.LBB9_13:
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_15
# %bb.14:
	movq	d_arreglo_A(%rip), %rdi
	movq	d_arreglo_AT(%rip), %rsi
	movl	cant(%rip), %edx
	callq	_Z28__device_stub__transposeadorPiS_i
.LBB9_15:
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r14, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB9_17
# %bb.16:
	movq	d_arreglo_AT(%rip), %rdi
	movq	d_arreglo_C(%rip), %rsi
	movl	cant_elem(%rip), %edx
	callq	_Z22__device_stub__sumadorPiS_i
.LBB9_17:
	cvtsi2sd	%r15, %xmm0
	divsd	.LCPI9_0(%rip), %xmm0
	cvtsi2sd	%r12, %xmm1
	addsd	%xmm0, %xmm1
	movsd	%xmm1, (%rsp)                   # 8-byte Spill
	callq	hipDeviceSynchronize
	leaq	8(%rsp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	xorps	%xmm1, %xmm1
	cvtsi2sdq	(%r14), %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2sdq	8(%r14), %xmm0
	divsd	.LCPI9_0(%rip), %xmm0
	addsd	%xmm1, %xmm0
	subsd	(%rsp), %xmm0                   # 8-byte Folded Reload
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	movq	arreglo_C(%rip), %rdi
	movq	d_arreglo_C(%rip), %rsi
	movq	%rbx, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	callq	_Z12solucion_CPUv
	movq	arreglo_A(%rip), %rdi
	callq	free
	movq	arreglo_B(%rip), %rdi
	callq	free
	movq	arreglo_C(%rip), %rdi
	callq	free
	movq	d_arreglo_A(%rip), %rdi
	callq	hipFree
	movq	d_arreglo_B(%rip), %rdi
	callq	hipFree
	movq	d_arreglo_C(%rip), %rdi
	callq	hipFree
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	main, .Lfunc_end9-main
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$32, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -16
	movq	__hip_gpubin_handle(%rip), %rbx
	testq	%rbx, %rbx
	jne	.LBB10_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB10_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13transposeadorPiS_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	$_Z8copiadorPiS_i, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z7sumadorPiS_i, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z13multiplicadorPiS_S_ii, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end10:
	.size	__hip_module_ctor, .Lfunc_end10-__hip_module_ctor
	.cfi_endproc
                                        # -- End function
	.p2align	4, 0x90                         # -- Begin function __hip_module_dtor
	.type	__hip_module_dtor,@function
__hip_module_dtor:                      # @__hip_module_dtor
	.cfi_startproc
# %bb.0:
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	je	.LBB11_2
# %bb.1:
	pushq	%rax
	.cfi_def_cfa_offset 16
	callq	__hipUnregisterFatBinary
	movq	$0, __hip_gpubin_handle(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 8
.LBB11_2:
	retq
.Lfunc_end11:
	.size	__hip_module_dtor, .Lfunc_end11-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	cant,@object                    # @cant
	.data
	.globl	cant
	.p2align	2, 0x0
cant:
	.long	512                             # 0x200
	.size	cant, 4

	.type	cant_elem,@object               # @cant_elem
	.globl	cant_elem
	.p2align	2, 0x0
cant_elem:
	.long	262144                          # 0x40000
	.size	cant_elem, 4

	.type	arreglo_A,@object               # @arreglo_A
	.bss
	.globl	arreglo_A
	.p2align	3, 0x0
arreglo_A:
	.quad	0
	.size	arreglo_A, 8

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

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

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

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

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

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

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

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

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

	.type	_Z8copiadorPiS_i,@object        # @_Z8copiadorPiS_i
	.globl	_Z8copiadorPiS_i
	.p2align	3, 0x0
_Z8copiadorPiS_i:
	.quad	_Z23__device_stub__copiadorPiS_i
	.size	_Z8copiadorPiS_i, 8

	.type	_Z7sumadorPiS_i,@object         # @_Z7sumadorPiS_i
	.globl	_Z7sumadorPiS_i
	.p2align	3, 0x0
_Z7sumadorPiS_i:
	.quad	_Z22__device_stub__sumadorPiS_i
	.size	_Z7sumadorPiS_i, 8

	.type	_Z13multiplicadorPiS_S_ii,@object # @_Z13multiplicadorPiS_S_ii
	.globl	_Z13multiplicadorPiS_S_ii
	.p2align	3, 0x0
_Z13multiplicadorPiS_S_ii:
	.quad	_Z28__device_stub__multiplicadorPiS_S_ii
	.size	_Z13multiplicadorPiS_S_ii, 8

	.type	.L.str.1,@object                # @.str.1
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.1:
	.asciz	"-> Tiempo transcurrido en la CPU %f\n"
	.size	.L.str.1, 37

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"-> Tiempo transcurrido en la GPU %f\n"
	.size	.L.str.2, 37

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z13transposeadorPiS_i"
	.size	.L__unnamed_1, 23

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z8copiadorPiS_i"
	.size	.L__unnamed_2, 17

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z7sumadorPiS_i"
	.size	.L__unnamed_3, 16

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z13multiplicadorPiS_S_ii"
	.size	.L__unnamed_4, 26

	.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 _Z28__device_stub__transposeadorPiS_i
	.addrsig_sym _Z23__device_stub__copiadorPiS_i
	.addrsig_sym _Z22__device_stub__sumadorPiS_i
	.addrsig_sym _Z28__device_stub__multiplicadorPiS_S_ii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym d_arreglo_A
	.addrsig_sym d_arreglo_B
	.addrsig_sym d_arreglo_C
	.addrsig_sym d_arreglo_AT
	.addrsig_sym d_arreglo_BT
	.addrsig_sym _Z13transposeadorPiS_i
	.addrsig_sym _Z8copiadorPiS_i
	.addrsig_sym _Z7sumadorPiS_i
	.addrsig_sym _Z13multiplicadorPiS_S_ii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z13transposeadorPiS_i  ; -- Begin function _Z13transposeadorPiS_i
	.globl	_Z13transposeadorPiS_i
	.p2align	8
	.type	_Z13transposeadorPiS_i,@function
_Z13transposeadorPiS_i:                 ; @_Z13transposeadorPiS_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x10
	s_load_b32 s3, s[0:1], 0x24
	s_waitcnt lgkmcnt(0)
	s_ashr_i32 s4, s2, 31
	s_and_b32 s3, s3, 0xffff
	s_add_i32 s5, s2, s4
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_xor_b32 s5, s5, s4
	v_cvt_f32_u32_e32 v1, s5
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_iflag_f32_e32 v1, v1
	s_waitcnt_depctr 0xfff
	v_mul_f32_e32 v1, 0x4f7ffffe, v1
	v_cvt_u32_f32_e32 v3, v1
	v_mad_u64_u32 v[1:2], null, s15, s3, v[0:1]
	s_sub_i32 s3, 0, s5
	s_delay_alu instid0(VALU_DEP_2) | instid1(SALU_CYCLE_1)
	v_mul_lo_u32 v0, s3, v3
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v2, 31, v1
	v_mul_hi_u32 v0, v3, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v4, v1, v2
	v_xor_b32_e32 v4, v4, v2
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v0, v3, v0
	v_mul_hi_u32 v0, v4, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_lo_u32 v3, v0, s5
	v_sub_nc_u32_e32 v3, v4, v3
	v_add_nc_u32_e32 v4, 1, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_subrev_nc_u32_e32 v5, s5, v3
	v_cmp_le_u32_e32 vcc_lo, s5, v3
	v_dual_cndmask_b32 v3, v3, v5 :: v_dual_cndmask_b32 v0, v0, v4
	v_xor_b32_e32 v5, s4, v2
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_cmp_le_u32_e32 vcc_lo, s5, v3
	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
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v0, v0, v5
	v_max_i32_e32 v3, -1, v0
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_i32_e64 s2, v3
	s_cbranch_execz .LBB0_2
; %bb.1:
	v_mul_lo_u32 v3, v0, s2
	s_load_b128 s[4:7], s[0:1], 0x0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v5, v1, v3
	v_mad_u64_u32 v[3:4], null, v5, s2, v[0:1]
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[3:4], 2, v[3:4]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s4, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s5, v4, vcc_lo
	v_add_co_u32 v0, vcc_lo, s6, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s7, v1, vcc_lo
	global_load_b32 v3, v[3:4], off
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v3, off
.LBB0_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13transposeadorPiS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 6
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z13transposeadorPiS_i, .Lfunc_end0-_Z13transposeadorPiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 364
; NumSgprs: 18
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 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	_Z8copiadorPiS_i        ; -- Begin function _Z8copiadorPiS_i
	.globl	_Z8copiadorPiS_i
	.p2align	8
	.type	_Z8copiadorPiS_i,@function
_Z8copiadorPiS_i:                       ; @_Z8copiadorPiS_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b32 s3, s[0:1], 0x10
	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 .LBB1_2
; %bb.1:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	s_waitcnt vmcnt(0)
	global_store_b32 v[0:1], v2, off
.LBB1_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8copiadorPiS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 4
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end1:
	.size	_Z8copiadorPiS_i, .Lfunc_end1-_Z8copiadorPiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 148
; NumSgprs: 18
; NumVgprs: 4
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 4
; 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	_Z7sumadorPiS_i         ; -- Begin function _Z7sumadorPiS_i
	.globl	_Z7sumadorPiS_i
	.p2align	8
	.type	_Z7sumadorPiS_i,@function
_Z7sumadorPiS_i:                        ; @_Z7sumadorPiS_i
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x24
	s_load_b32 s3, s[0:1], 0x10
	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 .LBB2_2
; %bb.1:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_ashrrev_i32_e32 v2, 31, v1
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v2, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v1, vcc_lo
	v_add_co_u32 v0, vcc_lo, s2, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s3, v1, vcc_lo
	global_load_b32 v2, v[2:3], off
	global_load_b32 v3, v[0:1], off
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v2, v3, v2
	global_store_b32 v[0:1], v2, off
.LBB2_2:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z7sumadorPiS_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 280
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 4
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z7sumadorPiS_i, .Lfunc_end2-_Z7sumadorPiS_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 160
; NumSgprs: 18
; NumVgprs: 4
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 4
; 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	_Z13multiplicadorPiS_S_ii ; -- Begin function _Z13multiplicadorPiS_S_ii
	.globl	_Z13multiplicadorPiS_S_ii
	.p2align	8
	.type	_Z13multiplicadorPiS_S_ii,@function
_Z13multiplicadorPiS_S_ii:              ; @_Z13multiplicadorPiS_S_ii
; %bb.0:
	s_clause 0x1
	s_load_b32 s4, s[0:1], 0x2c
	s_load_b64 s[2:3], s[0:1], 0x18
	s_waitcnt lgkmcnt(0)
	s_and_b32 s4, s4, 0xffff
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mad_u64_u32 v[1:2], null, s15, s4, v[0:1]
	v_cmp_gt_i32_e32 vcc_lo, s3, v1
	s_and_saveexec_b32 s3, vcc_lo
	s_cbranch_execz .LBB3_6
; %bb.1:                                ; %.preheader
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	v_ashrrev_i32_e32 v2, 31, v1
	s_cmp_lt_i32 s2, 1
	s_cbranch_scc1 .LBB3_4
; %bb.2:                                ; %.lr.ph
	s_ashr_i32 s3, s2, 31
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(SALU_CYCLE_1)
	v_add_nc_u32_e32 v4, v1, v2
	s_add_i32 s8, s2, s3
	s_xor_b32 s3, s8, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_xor_b32_e32 v4, v4, v2
	v_cvt_f32_u32_e32 v0, s3
	s_sub_i32 s8, 0, s3
	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_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 v0, v0, s3
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_sub_nc_u32_e32 v0, v4, v0
	v_subrev_nc_u32_e32 v3, s3, v0
	v_cmp_le_u32_e32 vcc_lo, s3, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v3, vcc_lo
	v_subrev_nc_u32_e32 v3, s3, v0
	v_cmp_le_u32_e32 vcc_lo, s3, v0
	s_mov_b32 s3, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cndmask_b32_e32 v0, v0, v3, vcc_lo
	v_xor_b32_e32 v0, v0, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_sub_nc_u32_e32 v3, v0, v2
	v_mov_b32_e32 v0, 0
	v_sub_nc_u32_e32 v5, v1, v3
.LBB3_3:                                ; =>This Inner Loop Header: Depth=1
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_nc_u32_e32 v6, s3, v5
	v_ashrrev_i32_e32 v4, 31, v3
	s_add_i32 s3, s3, 1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	s_cmp_lg_u32 s2, s3
	v_ashrrev_i32_e32 v7, 31, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshlrev_b64 v[8:9], 2, v[3:4]
	v_lshlrev_b64 v[6:7], 2, v[6:7]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v8, vcc_lo, s6, v8
	v_add_co_ci_u32_e32 v9, vcc_lo, s7, v9, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v6, vcc_lo, s4, v6
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v7, vcc_lo
	global_load_b32 v4, v[8:9], off
	global_load_b32 v8, v[6:7], off
	s_waitcnt vmcnt(0)
	v_mad_u64_u32 v[6:7], null, v4, v8, v[0:1]
	s_delay_alu instid0(VALU_DEP_1)
	v_dual_mov_b32 v0, v6 :: v_dual_add_nc_u32 v3, s2, v3
	s_cbranch_scc1 .LBB3_3
	s_branch .LBB3_5
.LBB3_4:
	v_mov_b32_e32 v0, 0
.LBB3_5:                                ; %._crit_edge
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[1:2], 2, v[1:2]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v1, vcc_lo, s0, v1
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v2, vcc_lo, s1, v2, vcc_lo
	global_load_b32 v3, v[1:2], off
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v0, v3, v0
	global_store_b32 v[1:2], v0, off
.LBB3_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z13multiplicadorPiS_S_ii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 10
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end3:
	.size	_Z13multiplicadorPiS_S_ii, .Lfunc_end3-_Z13multiplicadorPiS_S_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 460
; NumSgprs: 18
; NumVgprs: 10
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 10
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13transposeadorPiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13transposeadorPiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8copiadorPiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z8copiadorPiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     4
    .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
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         24
        .size:           4
        .value_kind:     hidden_block_count_x
      - .offset:         28
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         32
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         36
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         38
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         40
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         42
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         44
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         46
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         64
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         88
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 280
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z7sumadorPiS_i
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z7sumadorPiS_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     4
    .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:     hidden_block_count_x
      - .offset:         36
        .size:           4
        .value_kind:     hidden_block_count_y
      - .offset:         40
        .size:           4
        .value_kind:     hidden_block_count_z
      - .offset:         44
        .size:           2
        .value_kind:     hidden_group_size_x
      - .offset:         46
        .size:           2
        .value_kind:     hidden_group_size_y
      - .offset:         48
        .size:           2
        .value_kind:     hidden_group_size_z
      - .offset:         50
        .size:           2
        .value_kind:     hidden_remainder_x
      - .offset:         52
        .size:           2
        .value_kind:     hidden_remainder_y
      - .offset:         54
        .size:           2
        .value_kind:     hidden_remainder_z
      - .offset:         72
        .size:           8
        .value_kind:     hidden_global_offset_x
      - .offset:         80
        .size:           8
        .value_kind:     hidden_global_offset_y
      - .offset:         88
        .size:           8
        .value_kind:     hidden_global_offset_z
      - .offset:         96
        .size:           2
        .value_kind:     hidden_grid_dims
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 288
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z13multiplicadorPiS_S_ii
    .private_segment_fixed_size: 0
    .sgpr_count:     18
    .sgpr_spill_count: 0
    .symbol:         _Z13multiplicadorPiS_S_ii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     10
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
