#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <cstring>
#include <cuda_runtime.h>
#include <cstdio>

//C++ timers
#include <chrono>

#define BLOCK_SIZE 16

#define CUDA_WARN(XXX) \
    do { if (XXX != cudaSuccess) std::cerr << "CUDA Error: " << \
        cudaGetErrorString(XXX) << ", at line " << __LINE__ \
        << std::endl; cudaDeviceSynchronize(); } while (0)

typedef std::chrono::high_resolution_clock Clock;
typedef std::chrono::nanoseconds nanoseconds;

typedef struct {
	
	//Dimensions of A
	int M;
	int N;

	//Scalars
	double alpha;
	double beta;
	
	//First dimension of A 
	int lda;

	//Increments for X and Y
	int incX;
	int incY;

	//Array A and vectors X, Y;
	double *A, *X, *Y;
} dgemv_data;


// BASIC DGEMM METHOD
void dgemm(int N,       double alpha,
		   double *X,   double *Y,
           double beta, double *A) {

 	
  	for (int i = 0; i < N; ++i) {
    	for (int j = 0; j < N; ++j) {
            double tmp = 0;
            for (int k = 0; k < N; ++k) {
                tmp += X[i * N + k] * Y[k * N + j];
            }
            A[i * N + j] = alpha * tmp + beta * A[i * N + j];
        }
    }
}

 
// CUDA DGEMM W/O SHARED MEMORY
__global__ void dgemm_cuda (int N,       double alpha,
						    double *X,   double *Y,
							double beta, double *A) {

  	int i = blockDim.y * blockIdx.y + threadIdx.y;
  	int j = blockDim.x * blockIdx.x + threadIdx.x;
  
  	if (i < N && j < N) {
  
  		double temp = 0;
  		for (int k = 0; k < N; ++k) {
    		temp += X[i * N + k] * Y[k * N + j];
  		}
    
    	A[i * N + j] = alpha * temp + beta * A[i * N + j];
	}
    
}

 
// CUDA DGEMM W/O SHARED MEMORY
__global__ void dgemm_cuda_shared (int N,       double alpha,
						    	   double *X,   double *Y,
								   double beta, double *A) {

	// Create Shared Memory Arrays
    __shared__ double Xshared[BLOCK_SIZE][BLOCK_SIZE];
    __shared__ double Yshared[BLOCK_SIZE][BLOCK_SIZE];

    //Setup i and j
    int i = blockIdx.y * BLOCK_SIZE + threadIdx.y;
    int j = blockIdx.x * BLOCK_SIZE + threadIdx.x;
    double temp = 0;

    for (int s = 0; s < gridDim.x; ++s) {

        int index = i * N + s * BLOCK_SIZE + threadIdx.x;
        if(index >= N*N) 
            Xshared[threadIdx.y][threadIdx.x] = 0;
        else 
            Xshared[threadIdx.y][threadIdx.x] = X[index];
        

        index = (s * BLOCK_SIZE + threadIdx.y) * N + j;
        if(index >= N*N) 
            Yshared[threadIdx.y][threadIdx.x] = 0;
        else 
            Yshared[threadIdx.y][threadIdx.x] = Y[index];
        
        __syncthreads();

        for (int k = 0; k < BLOCK_SIZE; ++k) 
            temp += Xshared[threadIdx.y][k] * Yshared[k][threadIdx.x];
        
        __syncthreads();
    }
    
    if(i < N && j < N) {
        A[i * N + j] = temp * alpha + beta * A[i * N + j];
    }

}


double* createMatrix(int M, int N) {
	double *A = new double[M*N];

	int i; 
	#pragma omp parallel for private(i)
	for(i = 0; i < M*N; i++) {
		A[i] = ((double) rand() / (RAND_MAX)); //Random number from 0 to 1
	}
		
	
	return A;
}

 double* createVector(int len) {
	double *A = new double[len];
	
	int i;
	#pragma omp parallel for private(i)
	for(i = 0; i < len; i++) {
		A[i] = ((double) rand() / (RAND_MAX));
	}
		
	
	return A;
}

dgemv_data* generateRandomData(int M, int N) {

	dgemv_data *data = new dgemv_data();
	data->M = M;
	data->N = N;
	data->A = new double[M*N];
	data->alpha = (double) (rand() % 10)  + ((double) rand() / (RAND_MAX)); 
	data->beta = (double) (rand() % 10)  + ((double) rand() / (RAND_MAX)); 
	data->lda = M; //Not used for dgemm
	data->X = createMatrix(N,N);
	data->Y = createMatrix(N,N);
	data->incX = 1; //Not used for dgemm
	data->incY = 1; //not used for dgemm

	return data;
}

dgemv_data* copyData(dgemv_data* data) {
	dgemv_data* copy = new dgemv_data();

	copy->M = data->N;
	copy->N = data->N;	
	copy->alpha = data->alpha;
	copy->beta = data->beta;
	copy->lda = data->lda;
	copy->incX = data->incX;
	copy->incY = data->incY;
	copy->X = new double[data->N * data->N];
	copy->Y = new double[data->N * data->N];
	copy->A = new double[data->N * data->N];
	memcpy (copy->X, data->X, data->N * data->N * sizeof(double));
	memcpy (copy->Y, data->Y, data->N * data->N * sizeof(double));
	memcpy (copy->A, data->A, data->N * data->N * sizeof(double));

	return copy;
}

bool compareMatrices(double *A,  double *B, int length) {
	int i;
	for(i = 0; i < length; i++) {
		//To account for doubleing pt error, check if greater than some epsilon
		if(abs(A[i] - B[i]) > 0.000001)  { 
			std::cout <<"i: " << i << " A[i]: " << A[i] << " B[i]: " << B[i] << std::endl;
			return false;
		}
	}

	return true;
}

void freeDataStruct(dgemv_data* data) {
	delete[](data->A);
	delete[](data->X);
	delete[](data->Y);
}

void testOutput(dgemv_data *data, dgemv_data* test_data) {
		dgemm(test_data->N,   test_data->alpha,
		       test_data->X,   test_data->Y,
		       test_data->beta,test_data->A);
		
		if(compareMatrices(data->A, test_data->A, data->N * data->N)) {
			std::cout << "Output: PASSED" << std::endl;
		} else {
			std::cout << "Output: FAILED" << std::endl;
		}
}

void printTimeTaken(unsigned long ns) {
	std::cout << std::fixed;
    std::cout << std::setprecision(10)
			  << "Time taken: " 
			  << ns 
			  << " ns or " 
			  << (double) ns/1000000000.0
			  << " s\n"
			  << std::endl;
}

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

	//Clock for C++
	if (argc != 3) {
		std::cout << "Invalid set of arguments.\n"
				  << "Usage: ./dgemv [Testing Off/On(0/1)] [size N]"
				  << std::endl;
		exit(-1);
	}

	//Get user arguments
	int M,N;
	bool test;

	//Square matrix
	if(argc == 3) {
		M = atoi(argv[2]);
		N = M;
	} 
	
	test = (atoi(argv[1]) > 0) ? true : false;


	//Feed random seed
	srand(time(NULL));

	//Generate the data
	dgemv_data *unModifiedData = generateRandomData(M,N); //DO not run functions on this
	


	/************************************************************************/
	//Run DGEMVT Serial Version
	
	//Get data sets to run with and test with (Since the arrays are modified)
	dgemv_data *data = copyData(unModifiedData);

	dgemv_data *serialTestData = copyData(unModifiedData);
	std::cout << "-----------------------------------------------" << std::endl;
	std::cout << "Running Serial Version of DGEMVT" << std::endl;
	auto start = Clock::now();
	dgemm(data->N, data->alpha, data->X,
		   data->Y, data->beta,  data->A);

	auto end = Clock::now();
	unsigned long ns = (unsigned long) std::chrono::duration_cast<nanoseconds>(end-start).count();
	printTimeTaken(ns);

	//Test the output
	if(test) {
		testOutput(data, serialTestData);
	}


	//Congifure CUDA blocksize and dim grid/block
    size_t gridR = (N + BLOCK_SIZE - 1) / BLOCK_SIZE;
    size_t gridC = (N + BLOCK_SIZE - 1) / BLOCK_SIZE;
	dim3 dimGrid(gridC,gridR);
	dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);		



	/************************************************************************/
	//Run DGEMVT CUDA Version
	
	
	//Get data sets to run with and test with (Since the arrays are modified)
	dgemv_data *cuData = copyData(unModifiedData);
	dgemv_data *cuTestData = copyData(unModifiedData);
	
	//Double arrays for the GPU
	double *cuA, *cuX, *cuY;

	//Allocate space and copy data into GPU allocated arrays
	CUDA_WARN(cudaMalloc(&cuA, N * N * sizeof(double)));
	CUDA_WARN(cudaMalloc(&cuX, N * N * sizeof(double)));	
	CUDA_WARN(cudaMalloc(&cuY, N * N * sizeof(double)));	
	
	CUDA_WARN(cudaMemcpy(cuA, cuData->A, N*N*sizeof(double), cudaMemcpyHostToDevice));	
	CUDA_WARN(cudaMemcpy(cuX, cuData->X, N*N*sizeof(double), cudaMemcpyHostToDevice));	
	CUDA_WARN(cudaMemcpy(cuY, cuData->Y, N*N*sizeof(double), cudaMemcpyHostToDevice));	

	std::cout << "-----------------------------------------------" << std::endl;
	std::cout << "Running CUDA Version of DGEMVT" << std::endl;
	start = Clock::now();
	dgemm_cuda<<<dimGrid, dimBlock>>>
			   (N,cuData->alpha, cuX,
                cuY, cuData->beta, cuA);
	CUDA_WARN(cudaThreadSynchronize());
	end = Clock::now();
	ns = (unsigned long) std::chrono::duration_cast<nanoseconds>(end-start).count();

	CUDA_WARN(cudaGetLastError());

	
	//Copy the cude result back
	cudaMemcpy(cuData->A, cuA, N*N*sizeof(double), cudaMemcpyDeviceToHost);

	//Print the time taken
	printTimeTaken(ns);

	//Test the output
	if(test) {
		testOutput(cuData, cuTestData);
	}

	/************************************************************************/
	//Run DGEMVT CUDA Shared Memory Version	
	
	//Get data sets to run with and test with (Since the arrays are modified)
	dgemv_data *cuDataShared = copyData(unModifiedData);
	dgemv_data *cuTestDataShared = copyData(unModifiedData);
	
	//Double arrays for the GPU
	double *scuA, *scuX, *scuY;

	//Allocate space and copy data into GPU allocated arrays
	CUDA_WARN(cudaMalloc(&scuA, N * N * sizeof(double)));
	CUDA_WARN(cudaMalloc(&scuX, N * N * sizeof(double)));	
	CUDA_WARN(cudaMalloc(&scuY, N * N * sizeof(double)));	
	
	CUDA_WARN(cudaMemcpy(scuA, cuDataShared->A, N*N*sizeof(double), cudaMemcpyHostToDevice));	
	CUDA_WARN(cudaMemcpy(scuX, cuDataShared->X, N*N*sizeof(double), cudaMemcpyHostToDevice));	
	CUDA_WARN(cudaMemcpy(scuY, cuDataShared->Y, N*N*sizeof(double), cudaMemcpyHostToDevice));	

	std::cout << "-----------------------------------------------" << std::endl;
	std::cout << "Running CUDA Shared Memory Version of DGEMVT" << std::endl;
	start = Clock::now();
	dgemm_cuda_shared<<<dimGrid, dimBlock>>>
			   (N,cuDataShared->alpha, scuX,
                scuY, cuDataShared->beta, scuA);
	CUDA_WARN(cudaThreadSynchronize());
	end = Clock::now();
	ns = (unsigned long) std::chrono::duration_cast<nanoseconds>(end-start).count();

	CUDA_WARN(cudaGetLastError());

	
	//Copy the cude result back
	cudaMemcpy(cuDataShared->A, scuA, N*N*sizeof(double), cudaMemcpyDeviceToHost);

	//Print the time taken
	printTimeTaken(ns);

	//Test the output
	if(test) {
		testOutput(cuDataShared, cuTestDataShared);
	}


	return 0;
}

	.file	"tmpxft_002d463b_00000000-6_main2.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4028:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4028:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.align 2
	.type	_ZNSolsEPFRSoS_E.isra.0, @function
_ZNSolsEPFRSoS_E.isra.0:
.LFB4749:
	.cfi_startproc
	jmp	*%rsi
	.cfi_endproc
.LFE4749:
	.size	_ZNSolsEPFRSoS_E.isra.0, .-_ZNSolsEPFRSoS_E.isra.0
	.globl	_Z5dgemmidPdS_dS_
	.type	_Z5dgemmidPdS_dS_, @function
_Z5dgemmidPdS_dS_:
.LFB4014:
	.cfi_startproc
	endbr64
	movslq	%edi, %r8
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r10
	xorl	%r11d, %r11d
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r8, %rax
	salq	$3, %r8
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdx, %rbx
	xorl	%edx, %edx
.L4:
	cmpl	%eax, %r11d
	jge	.L3
	leaq	(%rcx,%rdx), %rdi
	xorl	%esi, %esi
	leaq	(%r10,%rdx), %r12
.L8:
	leaq	(%rbx,%rsi,8), %rbp
	xorl	%r9d, %r9d
	xorps	%xmm2, %xmm2
.L5:
	movsd	(%r12,%r9,8), %xmm3
	mulsd	0(%rbp), %xmm3
	incq	%r9
	addq	%r8, %rbp
	addsd	%xmm3, %xmm2
	cmpl	%r9d, %eax
	jg	.L5
	movsd	(%rdi), %xmm3
	mulsd	%xmm0, %xmm2
	incq	%rsi
	addq	$8, %rdi
	mulsd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	movsd	%xmm3, -8(%rdi)
	cmpl	%esi, %eax
	jg	.L8
	incl	%r11d
	addq	%r8, %rdx
	jmp	.L4
.L3:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4014:
	.size	_Z5dgemmidPdS_dS_, .-_Z5dgemmidPdS_dS_
	.globl	_Z12createMatrixii
	.type	_Z12createMatrixii, @function
_Z12createMatrixii:
.LFB4015:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	imull	%esi, %edi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movl	%edi, %r12d
	movslq	%edi, %rdi
	cmpq	%rdi, %rax
	jb	.L13
	salq	$3, %rdi
	xorl	%ebp, %ebp
	call	_Znam@PLT
	movq	%rax, %rbx
	jmp	.L14
.L13:
	call	__cxa_throw_bad_array_new_length@PLT
.L14:
	cmpl	%ebp, %r12d
	jle	.L17
	call	rand@PLT
	cvtsi2sdl	%eax, %xmm0
	divsd	.LC1(%rip), %xmm0
	movsd	%xmm0, (%rbx,%rbp,8)
	incq	%rbp
	jmp	.L14
.L17:
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4015:
	.size	_Z12createMatrixii, .-_Z12createMatrixii
	.globl	_Z12createVectori
	.type	_Z12createVectori, @function
_Z12createVectori:
.LFB4016:
	.cfi_startproc
	endbr64
	movabsq	$1152921504606846975, %rax
	movslq	%edi, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmpq	%rdi, %rax
	jb	.L19
	movq	%rdi, %r12
	salq	$3, %rdi
	xorl	%ebp, %ebp
	call	_Znam@PLT
	movq	%rax, %rbx
	jmp	.L20
.L19:
	call	__cxa_throw_bad_array_new_length@PLT
.L20:
	cmpl	%ebp, %r12d
	jle	.L23
	call	rand@PLT
	cvtsi2sdl	%eax, %xmm0
	divsd	.LC1(%rip), %xmm0
	movsd	%xmm0, (%rbx,%rbp,8)
	incq	%rbp
	jmp	.L20
.L23:
	movq	%rbx, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4016:
	.size	_Z12createVectori, .-_Z12createVectori
	.globl	_Z18generateRandomDataii
	.type	_Z18generateRandomDataii, @function
_Z18generateRandomDataii:
.LFB4017:
	.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
	movl	%edi, %r12d
	movl	$64, %edi
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	call	_Znwm@PLT
	movl	$16, %ecx
	movq	%rax, %rbx
	xorl	%eax, %eax
	movq	%rbx, %rdi
	rep stosl
	movl	%r12d, %edi
	movl	%r12d, (%rbx)
	movabsq	$1152921504606846975, %rax
	imull	%ebp, %edi
	movl	%ebp, 4(%rbx)
	movslq	%edi, %rdi
	cmpq	%rdi, %rax
	jnb	.L27
	call	__cxa_throw_bad_array_new_length@PLT
.L27:
	salq	$3, %rdi
	movl	$10, %r13d
	call	_Znam@PLT
	movq	%rax, 40(%rbx)
	call	rand@PLT
	cltd
	idivl	%r13d
	cvtsi2sdl	%edx, %xmm1
	movsd	%xmm1, 8(%rsp)
	call	rand@PLT
	cvtsi2sdl	%eax, %xmm0
	divsd	.LC1(%rip), %xmm0
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 8(%rbx)
	call	rand@PLT
	cltd
	idivl	%r13d
	cvtsi2sdl	%edx, %xmm3
	movsd	%xmm3, 8(%rsp)
	call	rand@PLT
	movl	%r12d, 24(%rbx)
	movl	%ebp, %esi
	movl	%ebp, %edi
	cvtsi2sdl	%eax, %xmm0
	divsd	.LC1(%rip), %xmm0
	addsd	8(%rsp), %xmm0
	movsd	%xmm0, 16(%rbx)
	call	_Z12createMatrixii
	movl	%ebp, %esi
	movl	%ebp, %edi
	movq	%rax, 48(%rbx)
	call	_Z12createMatrixii
	movq	%rax, 56(%rbx)
	movabsq	$4294967297, %rax
	movq	%rax, 28(%rbx)
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	movq	%rbx, %rax
	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
.LFE4017:
	.size	_Z18generateRandomDataii, .-_Z18generateRandomDataii
	.globl	_Z8copyDataP10dgemv_data
	.type	_Z8copyDataP10dgemv_data, @function
_Z8copyDataP10dgemv_data:
.LFB4018:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	movl	$64, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	pushq	%rax
	.cfi_def_cfa_offset 32
	call	_Znwm@PLT
	movl	$16, %ecx
	movq	24(%rbp), %rdx
	movsd	16(%rbp), %xmm0
	movq	%rax, %rbx
	xorl	%eax, %eax
	movsd	8(%rbp), %xmm1
	movq	%rbx, %rdi
	rep stosl
	movl	4(%rbp), %edi
	movl	32(%rbp), %eax
	movq	%rdx, 24(%rbx)
	movsd	%xmm1, 8(%rbx)
	movl	%edi, (%rbx)
	movl	%edi, 4(%rbx)
	imull	%edi, %edi
	movl	%eax, 32(%rbx)
	movsd	%xmm0, 16(%rbx)
	movslq	%edi, %rdi
	salq	$3, %rdi
	call	_Znam@PLT
	movl	4(%rbp), %edi
	movq	%rax, 48(%rbx)
	imull	%edi, %edi
	movslq	%edi, %rdi
	salq	$3, %rdi
	call	_Znam@PLT
	movl	4(%rbp), %edi
	movq	%rax, 56(%rbx)
	imull	%edi, %edi
	movslq	%edi, %rdi
	salq	$3, %rdi
	call	_Znam@PLT
	movl	4(%rbp), %ecx
	movq	48(%rbp), %rsi
	movq	%rax, 40(%rbx)
	movq	48(%rbx), %rdi
	movq	%rbx, %rax
	imull	%ecx, %ecx
	movslq	%ecx, %rcx
	salq	$3, %rcx
	rep movsb
	movl	4(%rbp), %ecx
	movq	56(%rbp), %rsi
	movq	56(%rbx), %rdi
	imull	%ecx, %ecx
	movslq	%ecx, %rcx
	salq	$3, %rcx
	rep movsb
	movl	4(%rbp), %ecx
	movq	40(%rbp), %rsi
	movq	40(%rbx), %rdi
	imull	%ecx, %ecx
	movslq	%ecx, %rcx
	salq	$3, %rcx
	rep movsb
	popq	%rdx
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4018:
	.size	_Z8copyDataP10dgemv_data, .-_Z8copyDataP10dgemv_data
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"i: "
.LC5:
	.string	" A[i]: "
.LC6:
	.string	" B[i]: "
	.text
	.globl	_Z15compareMatricesPdS_i
	.type	_Z15compareMatricesPdS_i, @function
_Z15compareMatricesPdS_i:
.LFB4019:
	.cfi_startproc
	endbr64
	movq	.LC2(%rip), %xmm1
	movsd	.LC3(%rip), %xmm2
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xorl	%ebx, %ebx
.L32:
	cmpl	%edx, %ebx
	jge	.L40
	movq	%rdi, %r12
	movq	%rsi, %rbp
	addq	$8, %rdi
	addq	$8, %rsi
	movsd	(%r12), %xmm0
	subsd	0(%rbp), %xmm0
	andps	%xmm1, %xmm0
	comisd	%xmm2, %xmm0
	jbe	.L38
	leaq	.LC4(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	%ebx, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	leaq	.LC5(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	(%r12), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC6(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movsd	0(%rbp), %xmm0
	movq	%rax, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	xorl	%eax, %eax
	jmp	.L31
.L38:
	incl	%ebx
	jmp	.L32
.L40:
	movb	$1, %al
.L31:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4019:
	.size	_Z15compareMatricesPdS_i, .-_Z15compareMatricesPdS_i
	.globl	_Z14freeDataStructP10dgemv_data
	.type	_Z14freeDataStructP10dgemv_data, @function
_Z14freeDataStructP10dgemv_data:
.LFB4020:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	movq	40(%rdi), %rdi
	testq	%rdi, %rdi
	je	.L42
	call	_ZdaPv@PLT
.L42:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L43
	call	_ZdaPv@PLT
.L43:
	movq	56(%rbx), %rdi
	testq	%rdi, %rdi
	je	.L41
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	_ZdaPv@PLT
.L41:
	.cfi_restore_state
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4020:
	.size	_Z14freeDataStructP10dgemv_data, .-_Z14freeDataStructP10dgemv_data
	.section	.rodata.str1.1
.LC7:
	.string	"Output: PASSED"
.LC8:
	.string	"Output: FAILED"
	.text
	.globl	_Z10testOutputP10dgemv_dataS0_
	.type	_Z10testOutputP10dgemv_dataS0_, @function
_Z10testOutputP10dgemv_dataS0_:
.LFB4021:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	48(%rsi), %rax
	movq	%rdi, %rbx
	movq	40(%rsi), %rcx
	movq	56(%rsi), %rdx
	movsd	8(%rsi), %xmm0
	movl	4(%rsi), %edi
	movsd	16(%rsi), %xmm1
	movq	%rax, %rsi
	call	_Z5dgemmidPdS_dS_
	movl	4(%rbx), %edx
	movq	40(%rbx), %rdi
	movq	%rcx, %rsi
	imull	%edx, %edx
	call	_Z15compareMatricesPdS_i
	leaq	.LC7(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	testb	%al, %al
	jne	.L55
	leaq	.LC8(%rip), %rsi
.L55:
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 8
	movq	%rax, %rdi
	jmp	_ZNSolsEPFRSoS_E.isra.0
	.cfi_endproc
.LFE4021:
	.size	_Z10testOutputP10dgemv_dataS0_, .-_Z10testOutputP10dgemv_dataS0_
	.section	.rodata.str1.1
.LC9:
	.string	"Time taken: "
.LC10:
	.string	" ns or "
.LC12:
	.string	" s\n"
	.text
	.globl	_Z14printTimeTakenm
	.type	_Z14printTimeTakenm, @function
_Z14printTimeTakenm:
.LFB4022:
	.cfi_startproc
	endbr64
	movq	_ZSt4cout(%rip), %rax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rbx
	leaq	_ZSt4cout(%rip), %rdi
	leaq	.LC9(%rip), %rsi
	movq	-24(%rax), %rdx
	addq	%rdi, %rdx
	movl	24(%rdx), %eax
	movq	$10, 8(%rdx)
	andl	$-261, %eax
	orl	$4, %eax
	movl	%eax, 24(%rdx)
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rbx, %rsi
	movq	%rax, %rdi
	call	_ZNSo9_M_insertImEERSoT_@PLT
	leaq	.LC10(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	testq	%rbx, %rbx
	js	.L57
	cvtsi2sdq	%rbx, %xmm0
	jmp	.L58
.L57:
	movq	%rbx, %rax
	andl	$1, %ebx
	shrq	%rax
	orq	%rbx, %rax
	cvtsi2sdq	%rax, %xmm0
	addsd	%xmm0, %xmm0
.L58:
	divsd	.LC11(%rip), %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	leaq	.LC12(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 8
	movq	%rax, %rdi
	jmp	_ZNSolsEPFRSoS_E.isra.0
	.cfi_endproc
.LFE4022:
	.size	_Z14printTimeTakenm, .-_Z14printTimeTakenm
	.globl	_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_
	.type	_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_, @function
_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_:
.LFB4050:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 44(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 24(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 16(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	64(%rsp), %rcx
	movsd	%xmm0, 32(%rsp)
	movsd	%xmm1, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	%rsp, %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L60
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z10dgemm_cudaidPdS_dS_(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L60:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4050:
	.size	_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_, .-_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_
	.globl	_Z10dgemm_cudaidPdS_dS_
	.type	_Z10dgemm_cudaidPdS_dS_, @function
_Z10dgemm_cudaidPdS_dS_:
.LFB4051:
	.cfi_startproc
	endbr64
	jmp	_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_
	.cfi_endproc
.LFE4051:
	.size	_Z10dgemm_cudaidPdS_dS_, .-_Z10dgemm_cudaidPdS_dS_
	.globl	_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_
	.type	_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_, @function
_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_:
.LFB4052:
	.cfi_startproc
	endbr64
	subq	$184, %rsp
	.cfi_def_cfa_offset 192
	movl	%edi, 44(%rsp)
	leaq	72(%rsp), %rdi
	movq	%rsi, 24(%rsp)
	leaq	84(%rsp), %rsi
	movq	%rdx, 16(%rsp)
	leaq	56(%rsp), %rdx
	movq	%rcx, (%rsp)
	leaq	64(%rsp), %rcx
	movsd	%xmm0, 32(%rsp)
	movsd	%xmm1, 8(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rax
	movl	$1, 80(%rsp)
	movq	%rax, 120(%rsp)
	leaq	32(%rsp), %rax
	movq	%rax, 128(%rsp)
	leaq	24(%rsp), %rax
	movq	%rax, 136(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 144(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 152(%rsp)
	movq	%rsp, %rax
	movq	%rax, 160(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 72(%rsp)
	movq	%rax, 84(%rsp)
	movl	$1, 92(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L65
	pushq	64(%rsp)
	.cfi_def_cfa_offset 200
	leaq	_Z17dgemm_cuda_sharedidPdS_dS_(%rip), %rdi
	pushq	64(%rsp)
	.cfi_def_cfa_offset 208
	movq	100(%rsp), %rcx
	movl	108(%rsp), %r8d
	movq	88(%rsp), %rsi
	movl	96(%rsp), %edx
	leaq	136(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 200
	popq	%rdx
	.cfi_def_cfa_offset 192
.L65:
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	addq	$184, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4052:
	.size	_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_, .-_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_
	.globl	_Z17dgemm_cuda_sharedidPdS_dS_
	.type	_Z17dgemm_cuda_sharedidPdS_dS_, @function
_Z17dgemm_cuda_sharedidPdS_dS_:
.LFB4053:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_
	.cfi_endproc
.LFE4053:
	.size	_Z17dgemm_cuda_sharedidPdS_dS_, .-_Z17dgemm_cuda_sharedidPdS_dS_
	.section	.rodata.str1.1
.LC13:
	.string	"Invalid set of arguments.\n"
.LC14:
	.string	"Usage: ./dgemv [Testing Off/On(0/1)] [size N]"
.LC15:
	.string	"-----------------------------------------------"
.LC16:
	.string	"Running Serial Version of DGEMVT"
.LC17:
	.string	"CUDA Error: "
.LC18:
	.string	", at line "
.LC19:
	.string	"Running CUDA Version of DGEMVT"
.LC20:
	.string	"Running CUDA Shared Memory Version of DGEMVT"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB4023:
	.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	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	cmpl	$3, %edi
	je	.L71
	leaq	.LC13(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC14(%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
	orl	$-1, %edi
	call	exit@PLT
.L71:
	movq	16(%rsi), %rdi
	movq	%rsi, %rbx
	call	atoi@PLT
	movq	8(%rbx), %rdi
	movl	%eax, %ebp
	call	atoi@PLT
	xorl	%edi, %edi
	movl	%eax, %r12d
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	movl	%ebp, %esi
	movl	%ebp, %edi
	call	_Z18generateRandomDataii
	movq	%rax, %rdi
	movq	%rax, 8(%rsp)
	call	_Z8copyDataP10dgemv_data
	movq	8(%rsp), %rdi
	movq	%rax, %rbx
	call	_Z8copyDataP10dgemv_data
	leaq	.LC15(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	movq	%rax, %r13
	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	.LC16(%rip), %rsi
	leaq	_ZSt4cout(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	4(%rbx), %edi
	movq	40(%rbx), %rcx
	movq	56(%rbx), %rdx
	movq	48(%rbx), %rsi
	movq	%rax, %r14
	movsd	8(%rbx), %xmm0
	movsd	16(%rbx), %xmm1
	call	_Z5dgemmidPdS_dS_
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	subq	%r14, %rax
	movq	%rax, %rdi
	call	_Z14printTimeTakenm
	testl	%r12d, %r12d
	jle	.L72
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	_Z10testOutputP10dgemv_dataS0_
.L72:
	leal	15(%rbp), %eax
	movl	$16, %ecx
	movq	8(%rsp), %rdi
	movl	$1, 72(%rsp)
	cltd
	movl	$1, 84(%rsp)
	leaq	16(%rsp), %r15
	idivl	%ecx
	movl	%eax, 64(%rsp)
	movl	%eax, 68(%rsp)
	movabsq	$68719476752, %rax
	movq	%rax, 76(%rsp)
	call	_Z8copyDataP10dgemv_data
	movq	8(%rsp), %rdi
	movq	%rax, %rbx
	call	_Z8copyDataP10dgemv_data
	movq	%r15, %rdi
	movq	%rax, %r13
	movl	%ebp, %eax
	imull	%ebp, %eax
	cltq
	salq	$3, %rax
	movq	%rax, %rsi
	movq	%rax, (%rsp)
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L73
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r14
	call	cudaMalloc@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$305, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L73:
	call	cudaDeviceSynchronize@PLT
	leaq	24(%rsp), %r15
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L74
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r14
	call	cudaMalloc@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$306, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L74:
	call	cudaDeviceSynchronize@PLT
	leaq	32(%rsp), %r15
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L75
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r14
	call	cudaMalloc@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$307, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L75:
	call	cudaDeviceSynchronize@PLT
	movq	40(%rbx), %rsi
	movq	(%rsp), %rdx
	movl	$1, %ecx
	movq	16(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L76
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdx
	movq	40(%rbx), %rsi
	movl	$1, %ecx
	movq	16(%rsp), %rdi
	movq	%rax, %r14
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$309, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L76:
	call	cudaDeviceSynchronize@PLT
	movq	48(%rbx), %rsi
	movq	(%rsp), %rdx
	movl	$1, %ecx
	movq	24(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L77
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdx
	movq	48(%rbx), %rsi
	movl	$1, %ecx
	movq	24(%rsp), %rdi
	movq	%rax, %r14
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$310, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L77:
	call	cudaDeviceSynchronize@PLT
	movq	56(%rbx), %rsi
	movq	(%rsp), %rdx
	movl	$1, %ecx
	movq	32(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L78
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdx
	movq	56(%rbx), %rsi
	movl	$1, %ecx
	movq	32(%rsp), %rdi
	movq	%rax, %r14
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$311, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L78:
	call	cudaDeviceSynchronize@PLT
	leaq	.LC15(%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	.LC19(%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
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	84(%rsp), %ecx
	movl	72(%rsp), %esi
	xorl	%r9d, %r9d
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	xorl	%r8d, %r8d
	movq	%rax, %r15
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L79
	movsd	8(%rbx), %xmm0
	movq	16(%rsp), %rcx
	movl	%ebp, %edi
	movsd	16(%rbx), %xmm1
	movq	32(%rsp), %rdx
	movq	24(%rsp), %rsi
	call	_Z37__device_stub__Z10dgemm_cudaidPdS_dS_idPdS_dS_
.L79:
	call	cudaThreadSynchronize@PLT
	testl	%eax, %eax
	je	.L80
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %r14
	call	cudaThreadSynchronize@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$319, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L80:
	call	cudaDeviceSynchronize@PLT
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	subq	%r15, %rax
	movq	%rax, %r14
	call	cudaGetLastError@PLT
	testl	%eax, %eax
	je	.L81
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %r15
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r15, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$323, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L81:
	call	cudaDeviceSynchronize@PLT
	movq	40(%rbx), %rdi
	movq	(%rsp), %rdx
	movl	$2, %ecx
	movq	16(%rsp), %rsi
	call	cudaMemcpy@PLT
	movq	%r14, %rdi
	call	_Z14printTimeTakenm
	testl	%r12d, %r12d
	jle	.L82
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	_Z10testOutputP10dgemv_dataS0_
.L82:
	movq	8(%rsp), %rdi
	leaq	40(%rsp), %r15
	call	_Z8copyDataP10dgemv_data
	movq	8(%rsp), %rdi
	movq	%rax, %rbx
	call	_Z8copyDataP10dgemv_data
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r13
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L83
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r14
	call	cudaMalloc@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$348, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L83:
	call	cudaDeviceSynchronize@PLT
	leaq	48(%rsp), %r15
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L84
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r14
	call	cudaMalloc@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$349, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L84:
	call	cudaDeviceSynchronize@PLT
	leaq	56(%rsp), %r15
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	call	cudaMalloc@PLT
	testl	%eax, %eax
	je	.L85
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rsi
	movq	%r15, %rdi
	movq	%rax, %r14
	call	cudaMalloc@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$350, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L85:
	call	cudaDeviceSynchronize@PLT
	movq	40(%rbx), %rsi
	movq	(%rsp), %rdx
	movl	$1, %ecx
	movq	40(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L86
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdx
	movq	40(%rbx), %rsi
	movl	$1, %ecx
	movq	40(%rsp), %rdi
	movq	%rax, %r14
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$352, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L86:
	call	cudaDeviceSynchronize@PLT
	movq	48(%rbx), %rsi
	movq	(%rsp), %rdx
	movl	$1, %ecx
	movq	48(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L87
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdx
	movq	48(%rbx), %rsi
	movl	$1, %ecx
	movq	48(%rsp), %rdi
	movq	%rax, %r14
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$353, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L87:
	call	cudaDeviceSynchronize@PLT
	movq	56(%rbx), %rsi
	movq	(%rsp), %rdx
	movl	$1, %ecx
	movq	56(%rsp), %rdi
	call	cudaMemcpy@PLT
	testl	%eax, %eax
	je	.L88
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	(%rsp), %rdx
	movq	56(%rbx), %rsi
	movl	$1, %ecx
	movq	56(%rsp), %rdi
	movq	%rax, %r14
	call	cudaMemcpy@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$354, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L88:
	call	cudaDeviceSynchronize@PLT
	leaq	.LC15(%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	.LC20(%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
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	movl	84(%rsp), %ecx
	movl	72(%rsp), %esi
	xorl	%r9d, %r9d
	movq	76(%rsp), %rdx
	movq	64(%rsp), %rdi
	xorl	%r8d, %r8d
	movq	%rax, %r14
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L89
	movsd	8(%rbx), %xmm0
	movq	40(%rsp), %rcx
	movl	%ebp, %edi
	movsd	16(%rbx), %xmm1
	movq	56(%rsp), %rdx
	movq	48(%rsp), %rsi
	call	_Z44__device_stub__Z17dgemm_cuda_sharedidPdS_dS_idPdS_dS_
.L89:
	call	cudaThreadSynchronize@PLT
	testl	%eax, %eax
	je	.L90
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rbp
	call	cudaThreadSynchronize@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%rbp, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$362, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L90:
	call	cudaDeviceSynchronize@PLT
	call	_ZNSt6chrono3_V212system_clock3nowEv@PLT
	subq	%r14, %rax
	movq	%rax, %rbp
	call	cudaGetLastError@PLT
	testl	%eax, %eax
	je	.L91
	leaq	.LC17(%rip), %rsi
	leaq	_ZSt4cerr(%rip), %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %r14
	call	cudaGetLastError@PLT
	movl	%eax, %edi
	call	cudaGetErrorString@PLT
	movq	%r14, %rdi
	movq	%rax, %rsi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	leaq	.LC18(%rip), %rsi
	movq	%rax, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movl	$366, %esi
	movq	%rax, %rdi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E.isra.0
.L91:
	call	cudaDeviceSynchronize@PLT
	movq	40(%rbx), %rdi
	movq	(%rsp), %rdx
	movl	$2, %ecx
	movq	40(%rsp), %rsi
	call	cudaMemcpy@PLT
	movq	%rbp, %rdi
	call	_Z14printTimeTakenm
	testl	%r12d, %r12d
	jle	.L92
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	_Z10testOutputP10dgemv_dataS0_
.L92:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L93
	call	__stack_chk_fail@PLT
.L93:
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4023:
	.size	main, .-main
	.section	.rodata.str1.1
.LC21:
	.string	"_Z17dgemm_cuda_sharedidPdS_dS_"
.LC22:
	.string	"_Z10dgemm_cudaidPdS_dS_"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4055:
	.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	.LC21(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z17dgemm_cuda_sharedidPdS_dS_(%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	.LC22(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z10dgemm_cudaidPdS_dS_(%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
.LFE4055:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	-4194304
	.long	1105199103
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC3:
	.long	-1598689907
	.long	1051772663
	.align 8
.LC11:
	.long	0
	.long	1104006501
	.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 <cstdlib>
#include <iomanip>
#include <cstring>
#include <hip/hip_runtime.h>
#include <cstdio>

//C++ timers
#include <chrono>

#define BLOCK_SIZE 16

#define CUDA_WARN(XXX) \
    do { if (XXX != hipSuccess) std::cerr << "CUDA Error: " << \
        hipGetErrorString(XXX) << ", at line " << __LINE__ \
        << std::endl; hipDeviceSynchronize(); } while (0)

typedef std::chrono::high_resolution_clock Clock;
typedef std::chrono::nanoseconds nanoseconds;

typedef struct {
	
	//Dimensions of A
	int M;
	int N;

	//Scalars
	double alpha;
	double beta;
	
	//First dimension of A 
	int lda;

	//Increments for X and Y
	int incX;
	int incY;

	//Array A and vectors X, Y;
	double *A, *X, *Y;
} dgemv_data;


// BASIC DGEMM METHOD
void dgemm(int N,       double alpha,
		   double *X,   double *Y,
           double beta, double *A) {

 	
  	for (int i = 0; i < N; ++i) {
    	for (int j = 0; j < N; ++j) {
            double tmp = 0;
            for (int k = 0; k < N; ++k) {
                tmp += X[i * N + k] * Y[k * N + j];
            }
            A[i * N + j] = alpha * tmp + beta * A[i * N + j];
        }
    }
}

 
// CUDA DGEMM W/O SHARED MEMORY
__global__ void dgemm_cuda (int N,       double alpha,
						    double *X,   double *Y,
							double beta, double *A) {

  	int i = blockDim.y * blockIdx.y + threadIdx.y;
  	int j = blockDim.x * blockIdx.x + threadIdx.x;
  
  	if (i < N && j < N) {
  
  		double temp = 0;
  		for (int k = 0; k < N; ++k) {
    		temp += X[i * N + k] * Y[k * N + j];
  		}
    
    	A[i * N + j] = alpha * temp + beta * A[i * N + j];
	}
    
}

 
// CUDA DGEMM W/O SHARED MEMORY
__global__ void dgemm_cuda_shared (int N,       double alpha,
						    	   double *X,   double *Y,
								   double beta, double *A) {

	// Create Shared Memory Arrays
    __shared__ double Xshared[BLOCK_SIZE][BLOCK_SIZE];
    __shared__ double Yshared[BLOCK_SIZE][BLOCK_SIZE];

    //Setup i and j
    int i = blockIdx.y * BLOCK_SIZE + threadIdx.y;
    int j = blockIdx.x * BLOCK_SIZE + threadIdx.x;
    double temp = 0;

    for (int s = 0; s < gridDim.x; ++s) {

        int index = i * N + s * BLOCK_SIZE + threadIdx.x;
        if(index >= N*N) 
            Xshared[threadIdx.y][threadIdx.x] = 0;
        else 
            Xshared[threadIdx.y][threadIdx.x] = X[index];
        

        index = (s * BLOCK_SIZE + threadIdx.y) * N + j;
        if(index >= N*N) 
            Yshared[threadIdx.y][threadIdx.x] = 0;
        else 
            Yshared[threadIdx.y][threadIdx.x] = Y[index];
        
        __syncthreads();

        for (int k = 0; k < BLOCK_SIZE; ++k) 
            temp += Xshared[threadIdx.y][k] * Yshared[k][threadIdx.x];
        
        __syncthreads();
    }
    
    if(i < N && j < N) {
        A[i * N + j] = temp * alpha + beta * A[i * N + j];
    }

}


double* createMatrix(int M, int N) {
	double *A = new double[M*N];

	int i; 
	#pragma omp parallel for private(i)
	for(i = 0; i < M*N; i++) {
		A[i] = ((double) rand() / (RAND_MAX)); //Random number from 0 to 1
	}
		
	
	return A;
}

 double* createVector(int len) {
	double *A = new double[len];
	
	int i;
	#pragma omp parallel for private(i)
	for(i = 0; i < len; i++) {
		A[i] = ((double) rand() / (RAND_MAX));
	}
		
	
	return A;
}

dgemv_data* generateRandomData(int M, int N) {

	dgemv_data *data = new dgemv_data();
	data->M = M;
	data->N = N;
	data->A = new double[M*N];
	data->alpha = (double) (rand() % 10)  + ((double) rand() / (RAND_MAX)); 
	data->beta = (double) (rand() % 10)  + ((double) rand() / (RAND_MAX)); 
	data->lda = M; //Not used for dgemm
	data->X = createMatrix(N,N);
	data->Y = createMatrix(N,N);
	data->incX = 1; //Not used for dgemm
	data->incY = 1; //not used for dgemm

	return data;
}

dgemv_data* copyData(dgemv_data* data) {
	dgemv_data* copy = new dgemv_data();

	copy->M = data->N;
	copy->N = data->N;	
	copy->alpha = data->alpha;
	copy->beta = data->beta;
	copy->lda = data->lda;
	copy->incX = data->incX;
	copy->incY = data->incY;
	copy->X = new double[data->N * data->N];
	copy->Y = new double[data->N * data->N];
	copy->A = new double[data->N * data->N];
	memcpy (copy->X, data->X, data->N * data->N * sizeof(double));
	memcpy (copy->Y, data->Y, data->N * data->N * sizeof(double));
	memcpy (copy->A, data->A, data->N * data->N * sizeof(double));

	return copy;
}

bool compareMatrices(double *A,  double *B, int length) {
	int i;
	for(i = 0; i < length; i++) {
		//To account for doubleing pt error, check if greater than some epsilon
		if(abs(A[i] - B[i]) > 0.000001)  { 
			std::cout <<"i: " << i << " A[i]: " << A[i] << " B[i]: " << B[i] << std::endl;
			return false;
		}
	}

	return true;
}

void freeDataStruct(dgemv_data* data) {
	delete[](data->A);
	delete[](data->X);
	delete[](data->Y);
}

void testOutput(dgemv_data *data, dgemv_data* test_data) {
		dgemm(test_data->N,   test_data->alpha,
		       test_data->X,   test_data->Y,
		       test_data->beta,test_data->A);
		
		if(compareMatrices(data->A, test_data->A, data->N * data->N)) {
			std::cout << "Output: PASSED" << std::endl;
		} else {
			std::cout << "Output: FAILED" << std::endl;
		}
}

void printTimeTaken(unsigned long ns) {
	std::cout << std::fixed;
    std::cout << std::setprecision(10)
			  << "Time taken: " 
			  << ns 
			  << " ns or " 
			  << (double) ns/1000000000.0
			  << " s\n"
			  << std::endl;
}

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

	//Clock for C++
	if (argc != 3) {
		std::cout << "Invalid set of arguments.\n"
				  << "Usage: ./dgemv [Testing Off/On(0/1)] [size N]"
				  << std::endl;
		exit(-1);
	}

	//Get user arguments
	int M,N;
	bool test;

	//Square matrix
	if(argc == 3) {
		M = atoi(argv[2]);
		N = M;
	} 
	
	test = (atoi(argv[1]) > 0) ? true : false;


	//Feed random seed
	srand(time(NULL));

	//Generate the data
	dgemv_data *unModifiedData = generateRandomData(M,N); //DO not run functions on this
	


	/************************************************************************/
	//Run DGEMVT Serial Version
	
	//Get data sets to run with and test with (Since the arrays are modified)
	dgemv_data *data = copyData(unModifiedData);

	dgemv_data *serialTestData = copyData(unModifiedData);
	std::cout << "-----------------------------------------------" << std::endl;
	std::cout << "Running Serial Version of DGEMVT" << std::endl;
	auto start = Clock::now();
	dgemm(data->N, data->alpha, data->X,
		   data->Y, data->beta,  data->A);

	auto end = Clock::now();
	unsigned long ns = (unsigned long) std::chrono::duration_cast<nanoseconds>(end-start).count();
	printTimeTaken(ns);

	//Test the output
	if(test) {
		testOutput(data, serialTestData);
	}


	//Congifure CUDA blocksize and dim grid/block
    size_t gridR = (N + BLOCK_SIZE - 1) / BLOCK_SIZE;
    size_t gridC = (N + BLOCK_SIZE - 1) / BLOCK_SIZE;
	dim3 dimGrid(gridC,gridR);
	dim3 dimBlock(BLOCK_SIZE, BLOCK_SIZE);		



	/************************************************************************/
	//Run DGEMVT CUDA Version
	
	
	//Get data sets to run with and test with (Since the arrays are modified)
	dgemv_data *cuData = copyData(unModifiedData);
	dgemv_data *cuTestData = copyData(unModifiedData);
	
	//Double arrays for the GPU
	double *cuA, *cuX, *cuY;

	//Allocate space and copy data into GPU allocated arrays
	CUDA_WARN(hipMalloc(&cuA, N * N * sizeof(double)));
	CUDA_WARN(hipMalloc(&cuX, N * N * sizeof(double)));	
	CUDA_WARN(hipMalloc(&cuY, N * N * sizeof(double)));	
	
	CUDA_WARN(hipMemcpy(cuA, cuData->A, N*N*sizeof(double), hipMemcpyHostToDevice));	
	CUDA_WARN(hipMemcpy(cuX, cuData->X, N*N*sizeof(double), hipMemcpyHostToDevice));	
	CUDA_WARN(hipMemcpy(cuY, cuData->Y, N*N*sizeof(double), hipMemcpyHostToDevice));	

	std::cout << "-----------------------------------------------" << std::endl;
	std::cout << "Running CUDA Version of DGEMVT" << std::endl;
	start = Clock::now();
	dgemm_cuda<<<dimGrid, dimBlock>>>
			   (N,cuData->alpha, cuX,
                cuY, cuData->beta, cuA);
	CUDA_WARN(hipDeviceSynchronize());
	end = Clock::now();
	ns = (unsigned long) std::chrono::duration_cast<nanoseconds>(end-start).count();

	CUDA_WARN(hipGetLastError());

	
	//Copy the cude result back
	hipMemcpy(cuData->A, cuA, N*N*sizeof(double), hipMemcpyDeviceToHost);

	//Print the time taken
	printTimeTaken(ns);

	//Test the output
	if(test) {
		testOutput(cuData, cuTestData);
	}

	/************************************************************************/
	//Run DGEMVT CUDA Shared Memory Version	
	
	//Get data sets to run with and test with (Since the arrays are modified)
	dgemv_data *cuDataShared = copyData(unModifiedData);
	dgemv_data *cuTestDataShared = copyData(unModifiedData);
	
	//Double arrays for the GPU
	double *scuA, *scuX, *scuY;

	//Allocate space and copy data into GPU allocated arrays
	CUDA_WARN(hipMalloc(&scuA, N * N * sizeof(double)));
	CUDA_WARN(hipMalloc(&scuX, N * N * sizeof(double)));	
	CUDA_WARN(hipMalloc(&scuY, N * N * sizeof(double)));	
	
	CUDA_WARN(hipMemcpy(scuA, cuDataShared->A, N*N*sizeof(double), hipMemcpyHostToDevice));	
	CUDA_WARN(hipMemcpy(scuX, cuDataShared->X, N*N*sizeof(double), hipMemcpyHostToDevice));	
	CUDA_WARN(hipMemcpy(scuY, cuDataShared->Y, N*N*sizeof(double), hipMemcpyHostToDevice));	

	std::cout << "-----------------------------------------------" << std::endl;
	std::cout << "Running CUDA Shared Memory Version of DGEMVT" << std::endl;
	start = Clock::now();
	dgemm_cuda_shared<<<dimGrid, dimBlock>>>
			   (N,cuDataShared->alpha, scuX,
                scuY, cuDataShared->beta, scuA);
	CUDA_WARN(hipDeviceSynchronize());
	end = Clock::now();
	ns = (unsigned long) std::chrono::duration_cast<nanoseconds>(end-start).count();

	CUDA_WARN(hipGetLastError());

	
	//Copy the cude result back
	hipMemcpy(cuDataShared->A, scuA, N*N*sizeof(double), hipMemcpyDeviceToHost);

	//Print the time taken
	printTimeTaken(ns);

	//Test the output
	if(test) {
		testOutput(cuDataShared, cuTestDataShared);
	}


	return 0;
}

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

                                        # End of file scope inline assembly
	.globl	_Z5dgemmidPdS_dS_               # -- Begin function _Z5dgemmidPdS_dS_
	.type	_Z5dgemmidPdS_dS_,@function
_Z5dgemmidPdS_dS_:                      # @_Z5dgemmidPdS_dS_
	.cfi_startproc
# %bb.0:
	testl	%edi, %edi
	jle	.LBB0_8
# %bb.1:                                # %.preheader32.lr.ph
	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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movl	%edi, %eax
	leaq	(,%rax,8), %r8
	xorl	%r9d, %r9d
	xorl	%r10d, %r10d
.LBB0_2:                                # %.preheader.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB0_3 Depth 2
                                        #       Child Loop BB0_4 Depth 3
	movl	%r9d, %r11d
	leaq	(%rsi,%r11,8), %r11
	movq	%r10, %rbx
	imulq	%rax, %rbx
	leaq	(%rcx,%rbx,8), %rbx
	movq	%rdx, %r14
	xorl	%r15d, %r15d
.LBB0_3:                                # %.preheader
                                        #   Parent Loop BB0_2 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB0_4 Depth 3
	xorpd	%xmm2, %xmm2
	movq	%r14, %r12
	xorl	%r13d, %r13d
.LBB0_4:                                #   Parent Loop BB0_2 Depth=1
                                        #     Parent Loop BB0_3 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%r11,%r13,8), %xmm3            # xmm3 = mem[0],zero
	mulsd	(%r12), %xmm3
	addsd	%xmm3, %xmm2
	incq	%r13
	addq	%r8, %r12
	cmpq	%r13, %rax
	jne	.LBB0_4
# %bb.5:                                # %._crit_edge
                                        #   in Loop: Header=BB0_3 Depth=2
	mulsd	%xmm0, %xmm2
	movsd	(%rbx,%r15,8), %xmm3            # xmm3 = mem[0],zero
	mulsd	%xmm1, %xmm3
	addsd	%xmm2, %xmm3
	movsd	%xmm3, (%rbx,%r15,8)
	incq	%r15
	addq	$8, %r14
	cmpq	%rax, %r15
	jne	.LBB0_3
# %bb.6:                                # %._crit_edge36
                                        #   in Loop: Header=BB0_2 Depth=1
	incq	%r10
	addl	%edi, %r9d
	cmpq	%rax, %r10
	jne	.LBB0_2
# %bb.7:
	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
	.cfi_restore %rbx
	.cfi_restore %r12
	.cfi_restore %r13
	.cfi_restore %r14
	.cfi_restore %r15
.LBB0_8:                                # %._crit_edge38
	retq
.Lfunc_end0:
	.size	_Z5dgemmidPdS_dS_, .Lfunc_end0-_Z5dgemmidPdS_dS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z25__device_stub__dgemm_cudaidPdS_dS_ # -- Begin function _Z25__device_stub__dgemm_cudaidPdS_dS_
	.type	_Z25__device_stub__dgemm_cudaidPdS_dS_,@function
_Z25__device_stub__dgemm_cudaidPdS_dS_: # @_Z25__device_stub__dgemm_cudaidPdS_dS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	4(%rsp), %rax
	movl	%edi, (%rax)
	leaq	56(%rsp), %rdi
	movsd	%xmm0, (%rdi)
	leaq	48(%rsp), %r8
	movq	%rsi, (%r8)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movsd	%xmm1, (%rdx)
	leaq	24(%rsp), %r9
	movq	%rcx, (%r9)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%r8, 16(%rbx)
	movq	%rsi, 24(%rbx)
	movq	%rdx, 32(%rbx)
	movq	%r9, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z10dgemm_cudaidPdS_dS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z25__device_stub__dgemm_cudaidPdS_dS_, .Lfunc_end1-_Z25__device_stub__dgemm_cudaidPdS_dS_
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_ # -- Begin function _Z32__device_stub__dgemm_cuda_sharedidPdS_dS_
	.type	_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_,@function
_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_: # @_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$144, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	4(%rsp), %rax
	movl	%edi, (%rax)
	leaq	56(%rsp), %rdi
	movsd	%xmm0, (%rdi)
	leaq	48(%rsp), %r8
	movq	%rsi, (%r8)
	leaq	40(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	32(%rsp), %rdx
	movsd	%xmm1, (%rdx)
	leaq	24(%rsp), %r9
	movq	%rcx, (%r9)
	leaq	96(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%r8, 16(%rbx)
	movq	%rsi, 24(%rbx)
	movq	%rdx, 32(%rbx)
	movq	%r9, 40(%rbx)
	leaq	80(%rsp), %r14
	leaq	64(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z17dgemm_cuda_sharedidPdS_dS_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_, .Lfunc_end2-_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z12createMatrixii
.LCPI3_0:
	.quad	0x41dfffffffc00000              # double 2147483647
	.text
	.globl	_Z12createMatrixii
	.type	_Z12createMatrixii,@function
_Z12createMatrixii:                     # @_Z12createMatrixii
	.cfi_startproc
# %bb.0:
	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
	movl	%edi, %ebx
	imull	%esi, %ebx
	leaq	(,%rbx,8), %rax
	testl	%ebx, %ebx
	movq	$-1, %rdi
	cmovnsq	%rax, %rdi
	callq	_Znam
	movq	%rax, %r14
	testl	%ebx, %ebx
	jle	.LBB3_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%r15d, %r15d
.LBB3_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI3_0(%rip), %xmm0
	movsd	%xmm0, (%r14,%r15,8)
	incq	%r15
	cmpq	%r15, %rbx
	jne	.LBB3_2
.LBB3_3:                                # %._crit_edge
	movq	%r14, %rax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z12createMatrixii, .Lfunc_end3-_Z12createMatrixii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z12createVectori
.LCPI4_0:
	.quad	0x41dfffffffc00000              # double 2147483647
	.text
	.globl	_Z12createVectori
	.type	_Z12createVectori,@function
_Z12createVectori:                      # @_Z12createVectori
	.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	%rbx
	.cfi_def_cfa_offset 40
	pushq	%rax
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%edi, %ebp
	movl	%edi, %r14d
	leaq	(,%r14,8), %rax
	testl	%edi, %edi
	movq	$-1, %rdi
	cmovnsq	%rax, %rdi
	callq	_Znam
	movq	%rax, %rbx
	testl	%ebp, %ebp
	jle	.LBB4_3
# %bb.1:                                # %.lr.ph.preheader
	xorl	%r15d, %r15d
.LBB4_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI4_0(%rip), %xmm0
	movsd	%xmm0, (%rbx,%r15,8)
	incq	%r15
	cmpq	%r15, %r14
	jne	.LBB4_2
.LBB4_3:                                # %._crit_edge
	movq	%rbx, %rax
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.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	_Z12createVectori, .Lfunc_end4-_Z12createVectori
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z18generateRandomDataii
.LCPI5_0:
	.quad	0x41dfffffffc00000              # double 2147483647
	.text
	.globl	_Z18generateRandomDataii
	.type	_Z18generateRandomDataii,@function
_Z18generateRandomDataii:               # @_Z18generateRandomDataii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	subq	$16, %rsp
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movl	%esi, %ebp
	movl	%edi, %r14d
	movl	$64, %edi
	callq	_Znwm
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, 32(%rax)
	movl	%r14d, (%rax)
	movl	%ebp, 4(%rax)
	movl	%ebp, %eax
	imull	%r14d, %eax
	leaq	(,%rax,8), %rcx
	testl	%eax, %eax
	movq	$-1, %rdi
	cmovnsq	%rcx, %rdi
	callq	_Znam
	movq	%rax, 40(%rbx)
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	sarl	$2, %ecx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI5_0(%rip), %xmm0
	addsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 8(%rbx)
	callq	rand
	cltq
	imulq	$1717986919, %rax, %rcx         # imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	shrq	$32, %rcx
	sarl	$2, %ecx
	addl	%edx, %ecx
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %ecx
	subl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	divsd	.LCPI5_0(%rip), %xmm0
	addsd	8(%rsp), %xmm0                  # 8-byte Folded Reload
	movsd	%xmm0, 16(%rbx)
	movl	%r14d, 24(%rbx)
	movl	%ebp, %edi
	movl	%ebp, %esi
	callq	_Z12createMatrixii
	movq	%rax, 48(%rbx)
	movl	%ebp, %edi
	movl	%ebp, %esi
	callq	_Z12createMatrixii
	movq	%rax, 56(%rbx)
	movabsq	$4294967297, %rax               # imm = 0x100000001
	movq	%rax, 28(%rbx)
	movq	%rbx, %rax
	addq	$16, %rsp
	.cfi_def_cfa_offset 32
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z18generateRandomDataii, .Lfunc_end5-_Z18generateRandomDataii
	.cfi_endproc
                                        # -- End function
	.globl	_Z8copyDataP10dgemv_data        # -- Begin function _Z8copyDataP10dgemv_data
	.type	_Z8copyDataP10dgemv_data,@function
_Z8copyDataP10dgemv_data:               # @_Z8copyDataP10dgemv_data
	.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
	pushq	%rax
	.cfi_def_cfa_offset 64
	.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	%rdi, %r14
	movl	$64, %edi
	callq	_Znwm
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movaps	%xmm0, 32(%rax)
	movl	4(%r14), %r15d
	movl	%r15d, (%rax)
	movl	%r15d, 4(%rax)
	movsd	8(%r14), %xmm0                  # xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rax)
	movsd	16(%r14), %xmm0                 # xmm0 = mem[0],zero
	movsd	%xmm0, 16(%rax)
	movl	24(%r14), %eax
	movl	%eax, 24(%rbx)
	movl	28(%r14), %eax
	movl	%eax, 28(%rbx)
	movl	32(%r14), %eax
	movl	%eax, 32(%rbx)
	imull	%r15d, %r15d
	shlq	$3, %r15
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r12
	movq	%rax, 48(%rbx)
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %r13
	movq	%rax, 56(%rbx)
	movq	%r15, %rdi
	callq	_Znam
	movq	%rax, %rbp
	movq	%rax, 40(%rbx)
	movq	48(%r14), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	memcpy@PLT
	movq	56(%r14), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	memcpy@PLT
	movq	40(%r14), %rsi
	movq	%rbp, %rdi
	movq	%r15, %rdx
	callq	memcpy@PLT
	movq	%rbx, %rax
	addq	$8, %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_end6:
	.size	_Z8copyDataP10dgemv_data, .Lfunc_end6-_Z8copyDataP10dgemv_data
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z15compareMatricesPdS_i
.LCPI7_0:
	.quad	0x7fffffffffffffff              # double NaN
	.quad	0x7fffffffffffffff              # double NaN
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI7_1:
	.quad	0x3eb0c6f7a0b5ed8d              # double 9.9999999999999995E-7
	.text
	.globl	_Z15compareMatricesPdS_i
	.type	_Z15compareMatricesPdS_i,@function
_Z15compareMatricesPdS_i:               # @_Z15compareMatricesPdS_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	testl	%edx, %edx
	jle	.LBB7_1
# %bb.2:                                # %.lr.ph.preheader
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movsd	(%rdi), %xmm0                   # xmm0 = mem[0],zero
	subsd	(%rsi), %xmm0
	andpd	.LCPI7_0(%rip), %xmm0
	ucomisd	.LCPI7_1(%rip), %xmm0
	jbe	.LBB7_7
# %bb.3:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	.LBB7_6
.LBB7_1:
	movb	$1, %r14b
	jmp	.LBB7_10
.LBB7_7:                                # %.lr.ph38.preheader
	movl	%edx, %eax
	movl	$1, %r12d
	movapd	.LCPI7_0(%rip), %xmm0           # xmm0 = [NaN,NaN]
	movsd	.LCPI7_1(%rip), %xmm1           # xmm1 = mem[0],zero
.LBB7_8:                                # %.lr.ph38
                                        # =>This Inner Loop Header: Depth=1
	cmpq	%r12, %rax
	je	.LBB7_9
# %bb.4:                                # %.lr.ph
                                        #   in Loop: Header=BB7_8 Depth=1
	movsd	(%r15,%r12,8), %xmm2            # xmm2 = mem[0],zero
	subsd	(%rbx,%r12,8), %xmm2
	andpd	%xmm0, %xmm2
	incq	%r12
	ucomisd	%xmm1, %xmm2
	jbe	.LBB7_8
# %bb.5:                                # %.lr.ph._crit_edge.loopexit
	decq	%r12
	cmpq	%rax, %r12
	setae	%r14b
.LBB7_6:                                # %.lr.ph._crit_edge
	movl	$_ZSt4cout, %edi
	movl	$.L.str, %esi
	movl	$3, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movl	%r12d, %esi
	callq	_ZNSolsEi
	movq	%rax, %r13
	movl	$.L.str.1, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	(%r15,%r12,8), %xmm0            # xmm0 = mem[0],zero
	movq	%r13, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %r15
	movl	$.L.str.2, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movsd	(%rbx,%r12,8), %xmm0            # xmm0 = mem[0],zero
	movq	%r15, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movq	(%rax), %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
	jmp	.LBB7_10
.LBB7_9:                                # %.loopexit.loopexit
	setbe	%r14b
.LBB7_10:                               # %.loopexit
	movl	%r14d, %eax
	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	_Z15compareMatricesPdS_i, .Lfunc_end7-_Z15compareMatricesPdS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z14freeDataStructP10dgemv_data # -- Begin function _Z14freeDataStructP10dgemv_data
	.type	_Z14freeDataStructP10dgemv_data,@function
_Z14freeDataStructP10dgemv_data:        # @_Z14freeDataStructP10dgemv_data
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rdi, %rbx
	movq	40(%rdi), %rdi
	testq	%rdi, %rdi
	je	.LBB8_2
# %bb.1:
	callq	_ZdaPv
.LBB8_2:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB8_4
# %bb.3:
	callq	_ZdaPv
.LBB8_4:
	movq	56(%rbx), %rdi
	testq	%rdi, %rdi
	je	.LBB8_5
# %bb.6:
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	_ZdaPv                          # TAILCALL
.LBB8_5:
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_Z14freeDataStructP10dgemv_data, .Lfunc_end8-_Z14freeDataStructP10dgemv_data
	.cfi_endproc
                                        # -- End function
	.globl	_Z10testOutputP10dgemv_dataS0_  # -- Begin function _Z10testOutputP10dgemv_dataS0_
	.type	_Z10testOutputP10dgemv_dataS0_,@function
_Z10testOutputP10dgemv_dataS0_:         # @_Z10testOutputP10dgemv_dataS0_
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	4(%rsi), %edi
	movsd	8(%rsi), %xmm0                  # xmm0 = mem[0],zero
	movq	48(%rsi), %rsi
	movq	56(%rbx), %rdx
	movsd	16(%rbx), %xmm1                 # xmm1 = mem[0],zero
	movq	40(%rbx), %rcx
	callq	_Z5dgemmidPdS_dS_
	movq	40(%r14), %rdi
	movq	40(%rbx), %rsi
	movl	4(%r14), %edx
	imull	%edx, %edx
	callq	_Z15compareMatricesPdS_i
	movl	$.L.str.3, %ecx
	movl	$.L.str.4, %esi
	testb	%al, %al
	cmovneq	%rcx, %rsi
	movl	$_ZSt4cout, %ebx
	movl	$_ZSt4cout, %edi
	movl	$14, %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
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZNSo5flushEv                   # TAILCALL
.Lfunc_end9:
	.size	_Z10testOutputP10dgemv_dataS0_, .Lfunc_end9-_Z10testOutputP10dgemv_dataS0_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z14printTimeTakenm
.LCPI10_0:
	.long	1127219200                      # 0x43300000
	.long	1160773632                      # 0x45300000
	.long	0                               # 0x0
	.long	0                               # 0x0
.LCPI10_1:
	.quad	0x4330000000000000              # double 4503599627370496
	.quad	0x4530000000000000              # double 1.9342813113834067E+25
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI10_2:
	.quad	0x41cdcd6500000000              # double 1.0E+9
	.text
	.globl	_Z14printTimeTakenm
	.type	_Z14printTimeTakenm,@function
_Z14printTimeTakenm:                    # @_Z14printTimeTakenm
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rcx
	movl	$-261, %edx                     # imm = 0xFEFB
	andl	_ZSt4cout+24(%rcx), %edx
	orl	$4, %edx
	movl	%edx, _ZSt4cout+24(%rcx)
	movq	-24(%rax), %rax
	movq	$10, _ZSt4cout+8(%rax)
	movl	$_ZSt4cout, %edi
	movl	$.L.str.5, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cout, %edi
	movq	%rbx, %rsi
	callq	_ZNSo9_M_insertImEERSoT_
	movq	%rax, %r14
	movl	$.L.str.6, %esi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	%rbx, %xmm1
	punpckldq	.LCPI10_0(%rip), %xmm1  # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
	subpd	.LCPI10_1(%rip), %xmm1
	movapd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm0                    # xmm0 = xmm0[1],xmm1[1]
	addsd	%xmm1, %xmm0
	divsd	.LCPI10_2(%rip), %xmm0
	movq	%r14, %rdi
	callq	_ZNSo9_M_insertIdEERSoT_
	movq	%rax, %rbx
	movl	$.L.str.7, %esi
	movl	$3, %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
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	jmp	_ZNSo5flushEv                   # TAILCALL
.Lfunc_end10:
	.size	_Z14printTimeTakenm, .Lfunc_end10-_Z14printTimeTakenm
	.cfi_endproc
                                        # -- End function
	.globl	main                            # -- Begin function main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$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
	cmpl	$3, %edi
	jne	.LBB11_92
# %bb.1:
	movq	%rsi, %rbx
	movq	16(%rsi), %rdi
	callq	atoi
	movl	%eax, %r14d
	movq	8(%rbx), %rdi
	callq	atoi
	movl	%eax, %ebp
	xorl	%edi, %edi
	callq	time
	movl	%eax, %edi
	callq	srand
	movl	%r14d, %edi
	movq	%r14, 72(%rsp)                  # 8-byte Spill
	movl	%r14d, %esi
	callq	_Z18generateRandomDataii
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_Z8copyDataP10dgemv_data
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_Z8copyDataP10dgemv_data
	movq	%rax, %r14
	movl	$_ZSt4cout, %r15d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$47, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.11, %esi
	movl	$32, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %r15
	movl	4(%rbx), %edi
	movsd	8(%rbx), %xmm0                  # xmm0 = mem[0],zero
	movq	48(%rbx), %rsi
	movq	56(%rbx), %rdx
	movsd	16(%rbx), %xmm1                 # xmm1 = mem[0],zero
	movq	40(%rbx), %rcx
	callq	_Z5dgemmidPdS_dS_
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	subq	%r15, %rax
	movq	%rax, %rdi
	callq	_Z14printTimeTakenm
	movl	%ebp, 36(%rsp)                  # 4-byte Spill
	testl	%ebp, %ebp
	jle	.LBB11_3
# %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z10testOutputP10dgemv_dataS0_
.LBB11_3:
	movq	72(%rsp), %r14                  # 8-byte Reload
	leal	15(%r14), %eax
	leal	30(%r14), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	movq	%r13, %rdi
	callq	_Z8copyDataP10dgemv_data
	movq	%rax, 8(%rsp)                   # 8-byte Spill
	movq	%r13, %rdi
	callq	_Z8copyDataP10dgemv_data
	movq	%rax, 80(%rsp)                  # 8-byte Spill
                                        # kill: def $r14d killed $r14d killed $r14 def $r14
	imull	%r14d, %r14d
	shlq	$3, %r14
	leaq	24(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB11_8
# %bb.4:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	24(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_5
# %bb.6:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_7
.LBB11_5:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_7:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$305, %esi                      # imm = 0x131
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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
.LBB11_8:
	callq	hipDeviceSynchronize
	leaq	64(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB11_13
# %bb.9:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	64(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_10
# %bb.11:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_12
.LBB11_10:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_12:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit144
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$306, %esi                      # imm = 0x132
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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
.LBB11_13:
	sarl	$4, %r12d
	callq	hipDeviceSynchronize
	leaq	56(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB11_18
# %bb.14:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	56(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_15
# %bb.16:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_17
.LBB11_15:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_17:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit146
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$307, %esi                      # imm = 0x133
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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
.LBB11_18:
	callq	hipDeviceSynchronize
	movq	24(%rsp), %rdi
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	40(%rax), %rbx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB11_23
# %bb.19:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	24(%rsp), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_20
# %bb.21:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_22
.LBB11_20:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_22:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit148
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$309, %esi                      # imm = 0x135
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_23:
	movq	%r12, %rbp
	shlq	$32, %rbp
	callq	hipDeviceSynchronize
	movq	64(%rsp), %rdi
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	48(%rax), %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB11_28
# %bb.24:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	64(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_25
# %bb.26:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_27
.LBB11_25:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_27:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit150
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$310, %esi                      # imm = 0x136
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_28:
	orq	%rbp, %r12
	callq	hipDeviceSynchronize
	movq	56(%rsp), %rdi
	movq	8(%rsp), %rax                   # 8-byte Reload
	movq	56(%rax), %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB11_33
# %bb.29:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	56(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_30
# %bb.31:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_32
.LBB11_30:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_32:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit152
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$311, %esi                      # imm = 0x137
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_33:
	movabsq	$68719476752, %rbp              # imm = 0x1000000010
	callq	hipDeviceSynchronize
	movl	$_ZSt4cout, %r15d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$47, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.14, %esi
	movl	$30, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %r15
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbp, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB11_35
# %bb.34:
	movq	64(%rsp), %rsi
	movq	56(%rsp), %rdx
	movq	8(%rsp), %rax                   # 8-byte Reload
	movsd	8(%rax), %xmm0                  # xmm0 = mem[0],zero
	movsd	16(%rax), %xmm1                 # xmm1 = mem[0],zero
	movq	24(%rsp), %rcx
	movq	72(%rsp), %rdi                  # 8-byte Reload
                                        # kill: def $edi killed $edi killed $rdi
	callq	_Z25__device_stub__dgemm_cudaidPdS_dS_
.LBB11_35:
	callq	hipDeviceSynchronize
	testl	%eax, %eax
	je	.LBB11_40
# %bb.36:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	callq	hipDeviceSynchronize
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_37
# %bb.38:
	movq	%rax, %rbp
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbp, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_39
.LBB11_37:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_39:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit154
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$319, %esi                      # imm = 0x13F
	callq	_ZNSolsEi
	movq	%rax, %rbp
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbp, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%rbp, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_40:
	callq	hipDeviceSynchronize
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %rbp
	subq	%r15, %rbp
	callq	hipGetLastError
	testl	%eax, %eax
	je	.LBB11_45
# %bb.41:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	callq	hipGetLastError
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_42
# %bb.43:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_44
.LBB11_42:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_44:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit159
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$323, %esi                      # imm = 0x143
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_45:
	callq	hipDeviceSynchronize
	movq	24(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	%rbp, %rdi
	callq	_Z14printTimeTakenm
	cmpl	$0, 36(%rsp)                    # 4-byte Folded Reload
	jle	.LBB11_47
# %bb.46:
	movq	8(%rsp), %rdi                   # 8-byte Reload
	movq	80(%rsp), %rsi                  # 8-byte Reload
	callq	_Z10testOutputP10dgemv_dataS0_
.LBB11_47:
	movq	%r13, %rdi
	callq	_Z8copyDataP10dgemv_data
	movq	%rax, %rbp
	movq	%r13, %rdi
	callq	_Z8copyDataP10dgemv_data
	movq	%rax, %r13
	leaq	16(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB11_52
# %bb.48:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	16(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_49
# %bb.50:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_51
.LBB11_49:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_51:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit161
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$348, %esi                      # imm = 0x15C
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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
.LBB11_52:
	callq	hipDeviceSynchronize
	leaq	48(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB11_57
# %bb.53:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	48(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_54
# %bb.55:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_56
.LBB11_54:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_56:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit163
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$349, %esi                      # imm = 0x15D
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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
.LBB11_57:
	callq	hipDeviceSynchronize
	leaq	40(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	testl	%eax, %eax
	je	.LBB11_62
# %bb.58:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	leaq	40(%rsp), %rdi
	movq	%r14, %rsi
	callq	hipMalloc
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_59
# %bb.60:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_61
.LBB11_59:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_61:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit165
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$350, %esi                      # imm = 0x15E
	callq	_ZNSolsEi
	movq	%rax, %rbx
	movq	(%rax), %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
.LBB11_62:
	callq	hipDeviceSynchronize
	movq	16(%rsp), %rdi
	movq	40(%rbp), %rbx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB11_67
# %bb.63:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	16(%rsp), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_64
# %bb.65:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_66
.LBB11_64:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_66:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit167
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$352, %esi                      # imm = 0x160
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_67:
	callq	hipDeviceSynchronize
	movq	48(%rsp), %rdi
	movq	48(%rbp), %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB11_72
# %bb.68:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	48(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_69
# %bb.70:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_71
.LBB11_69:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_71:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit169
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$353, %esi                      # imm = 0x161
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_72:
	callq	hipDeviceSynchronize
	movq	40(%rsp), %rdi
	movq	56(%rbp), %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	testl	%eax, %eax
	je	.LBB11_77
# %bb.73:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	40(%rsp), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	callq	hipMemcpy
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_74
# %bb.75:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_76
.LBB11_74:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_76:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit171
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$354, %esi                      # imm = 0x162
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_77:
	callq	hipDeviceSynchronize
	movl	$_ZSt4cout, %r15d
	movl	$_ZSt4cout, %edi
	movl	$.L.str.10, %esi
	movl	$47, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	movl	$_ZSt4cout, %edi
	movl	$.L.str.15, %esi
	movl	$44, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movq	_ZSt4cout(%rip), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %r15
	movq	%r12, %rdi
	movl	$1, %esi
	movabsq	$68719476752, %rdx              # imm = 0x1000000010
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB11_79
# %bb.78:
	movq	48(%rsp), %rsi
	movq	40(%rsp), %rdx
	movsd	8(%rbp), %xmm0                  # xmm0 = mem[0],zero
	movsd	16(%rbp), %xmm1                 # xmm1 = mem[0],zero
	movq	16(%rsp), %rcx
	movq	72(%rsp), %rdi                  # 8-byte Reload
                                        # kill: def $edi killed $edi killed $rdi
	callq	_Z32__device_stub__dgemm_cuda_sharedidPdS_dS_
.LBB11_79:
	callq	hipDeviceSynchronize
	testl	%eax, %eax
	je	.LBB11_84
# %bb.80:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	callq	hipDeviceSynchronize
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_81
# %bb.82:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r12, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_83
.LBB11_81:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_83:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit173
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$362, %esi                      # imm = 0x16A
	callq	_ZNSolsEi
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r12, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r12, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_84:
	callq	hipDeviceSynchronize
	callq	_ZNSt6chrono3_V212system_clock3nowEv
	movq	%rax, %r12
	subq	%r15, %r12
	callq	hipGetLastError
	testl	%eax, %eax
	je	.LBB11_89
# %bb.85:
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.12, %esi
	movl	$12, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	callq	hipGetLastError
	movl	%eax, %edi
	callq	hipGetErrorString
	testq	%rax, %rax
	je	.LBB11_86
# %bb.87:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	strlen
	movl	$_ZSt4cerr, %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	jmp	.LBB11_88
.LBB11_86:
	movq	_ZSt4cerr(%rip), %rax
	movq	-24(%rax), %rax
	leaq	_ZSt4cerr(%rax), %rdi
	movl	32(%rdi), %esi
	orl	$1, %esi
	callq	_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate
.LBB11_88:                              # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit178
	movl	$_ZSt4cerr, %edi
	movl	$.L.str.13, %esi
	movl	$10, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
	movl	$_ZSt4cerr, %edi
	movl	$366, %esi                      # imm = 0x16E
	callq	_ZNSolsEi
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r15, %rdi
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
	movsbl	%al, %esi
	movq	%r15, %rdi
	callq	_ZNSo3putEc
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.LBB11_89:
	callq	hipDeviceSynchronize
	movq	16(%rsp), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	%r12, %rdi
	callq	_Z14printTimeTakenm
	cmpl	$0, 36(%rsp)                    # 4-byte Folded Reload
	jle	.LBB11_91
# %bb.90:
	movq	%rbp, %rdi
	movq	%r13, %rsi
	callq	_Z10testOutputP10dgemv_dataS0_
.LBB11_91:
	xorl	%eax, %eax
	addq	$88, %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
.LBB11_92:
	.cfi_def_cfa_offset 144
	movl	$_ZSt4cout, %edi
	movl	$.L.str.8, %esi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movl	$.L.str.9, %esi
	movq	%rax, %rdi
	callq	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
	movq	%rax, %rdi
	callq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
	movl	$-1, %edi
	callq	exit
.Lfunc_end11:
	.size	main, .Lfunc_end11-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	.LBB12_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB12_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z10dgemm_cudaidPdS_dS_, %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	$_Z17dgemm_cuda_sharedidPdS_dS_, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end12:
	.size	__hip_module_ctor, .Lfunc_end12-__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	.LBB13_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
.LBB13_2:
	retq
.Lfunc_end13:
	.size	__hip_module_dtor, .Lfunc_end13-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z10dgemm_cudaidPdS_dS_,@object # @_Z10dgemm_cudaidPdS_dS_
	.section	.rodata,"a",@progbits
	.globl	_Z10dgemm_cudaidPdS_dS_
	.p2align	3, 0x0
_Z10dgemm_cudaidPdS_dS_:
	.quad	_Z25__device_stub__dgemm_cudaidPdS_dS_
	.size	_Z10dgemm_cudaidPdS_dS_, 8

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

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

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	" A[i]: "
	.size	.L.str.1, 8

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	" B[i]: "
	.size	.L.str.2, 8

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Output: PASSED"
	.size	.L.str.3, 15

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Output: FAILED"
	.size	.L.str.4, 15

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Time taken: "
	.size	.L.str.5, 13

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	" ns or "
	.size	.L.str.6, 8

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	" s\n"
	.size	.L.str.7, 4

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Invalid set of arguments.\n"
	.size	.L.str.8, 27

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Usage: ./dgemv [Testing Off/On(0/1)] [size N]"
	.size	.L.str.9, 46

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"-----------------------------------------------"
	.size	.L.str.10, 48

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Running Serial Version of DGEMVT"
	.size	.L.str.11, 33

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"CUDA Error: "
	.size	.L.str.12, 13

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	", at line "
	.size	.L.str.13, 11

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"Running CUDA Version of DGEMVT"
	.size	.L.str.14, 31

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"Running CUDA Shared Memory Version of DGEMVT"
	.size	.L.str.15, 45

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z10dgemm_cudaidPdS_dS_"
	.size	.L__unnamed_1, 24

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z17dgemm_cuda_sharedidPdS_dS_"
	.size	.L__unnamed_2, 31

	.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 _Z25__device_stub__dgemm_cudaidPdS_dS_
	.addrsig_sym _Z32__device_stub__dgemm_cuda_sharedidPdS_dS_
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z10dgemm_cudaidPdS_dS_
	.addrsig_sym _Z17dgemm_cuda_sharedidPdS_dS_
	.addrsig_sym _ZSt4cout
	.addrsig_sym _ZSt4cerr
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z10dgemm_cudaidPdS_dS_ ; -- Begin function _Z10dgemm_cudaidPdS_dS_
	.globl	_Z10dgemm_cudaidPdS_dS_
	.p2align	8
	.type	_Z10dgemm_cudaidPdS_dS_,@function
_Z10dgemm_cudaidPdS_dS_:                ; @_Z10dgemm_cudaidPdS_dS_
; %bb.0:
	s_clause 0x1
	s_load_b32 s3, s[0:1], 0x3c
	s_load_b32 s2, s[0:1], 0x0
	v_bfe_u32 v1, v0, 10, 10
	v_and_b32_e32 v4, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s4, s3, 16
	s_and_b32 s3, s3, 0xffff
	v_mad_u64_u32 v[2:3], null, s15, s4, v[1:2]
	v_mad_u64_u32 v[0:1], null, s14, s3, v[4:5]
	s_mov_b32 s3, exec_lo
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_max_i32_e32 v1, v2, v0
	v_cmpx_gt_i32_e64 s2, v1
	s_cbranch_execz .LBB0_6
; %bb.1:                                ; %.preheader
	s_clause 0x1
	s_load_b256 s[4:11], s[0:1], 0x8
	s_load_b64 s[0:1], s[0:1], 0x28
	v_mul_lo_u32 v1, v2, s2
	s_cmp_lt_i32 s2, 1
	s_cbranch_scc1 .LBB0_4
; %bb.2:                                ; %.lr.ph.preheader
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_2)
	v_ashrrev_i32_e32 v2, 31, v1
	s_mov_b32 s3, s2
	v_mov_b32_e32 v6, v0
	v_lshlrev_b64 v[4:5], 3, v[1:2]
	v_mov_b32_e32 v2, 0
	v_mov_b32_e32 v3, 0
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, s6, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, s7, v5, vcc_lo
.LBB0_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	v_ashrrev_i32_e32 v7, 31, v6
	s_add_i32 s3, s3, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_cmp_eq_u32 s3, 0
	v_lshlrev_b64 v[7:8], 3, v[6:7]
	v_add_nc_u32_e32 v6, s2, v6
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v7, vcc_lo, s8, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s9, v8, vcc_lo
	global_load_b64 v[9:10], v[4:5], off
	global_load_b64 v[7:8], v[7:8], off
	v_add_co_u32 v4, vcc_lo, v4, 8
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	s_waitcnt vmcnt(0)
	v_fma_f64 v[2:3], v[9:10], v[7:8], v[2:3]
	s_cbranch_scc0 .LBB0_3
	s_branch .LBB0_5
.LBB0_4:
	v_mov_b32_e32 v2, 0
	v_mov_b32_e32 v3, 0
.LBB0_5:                                ; %Flow58
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_nc_u32_e32 v0, v1, v0
	v_ashrrev_i32_e32 v1, 31, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[0:1], 3, v[0:1]
	s_waitcnt lgkmcnt(0)
	v_add_co_u32 v0, vcc_lo, s0, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_3) | instid1(VALU_DEP_1)
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	global_load_b64 v[4:5], v[0:1], off
	s_waitcnt vmcnt(0)
	v_mul_f64 v[4:5], v[4:5], s[10:11]
	v_fma_f64 v[2:3], v[2:3], s[4:5], v[4:5]
	global_store_b64 v[0:1], v[2:3], off
.LBB0_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10dgemm_cudaidPdS_dS_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 11
		.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	_Z10dgemm_cudaidPdS_dS_, .Lfunc_end0-_Z10dgemm_cudaidPdS_dS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 372
; NumSgprs: 18
; NumVgprs: 11
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 11
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z17dgemm_cuda_sharedidPdS_dS_ ; -- Begin function _Z17dgemm_cuda_sharedidPdS_dS_
	.globl	_Z17dgemm_cuda_sharedidPdS_dS_
	.p2align	8
	.type	_Z17dgemm_cuda_sharedidPdS_dS_,@function
_Z17dgemm_cuda_sharedidPdS_dS_:         ; @_Z17dgemm_cuda_sharedidPdS_dS_
; %bb.0:
	s_clause 0x3
	s_load_b32 s11, s[0:1], 0x30
	s_load_b64 s[8:9], s[0:1], 0x28
	s_load_b32 s10, s[0:1], 0x0
	s_load_b256 s[0:7], s[0:1], 0x8
	v_bfe_u32 v12, v0, 10, 10
	v_and_b32_e32 v1, 0x3ff, v0
	s_mov_b32 s12, 0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_lshl_add_u32 v11, s15, 4, v12
	v_lshl_add_u32 v0, s14, 4, v1
	s_waitcnt lgkmcnt(0)
	s_cmp_eq_u32 s11, 0
	s_cbranch_scc1 .LBB1_9
; %bb.1:                                ; %.lr.ph
	v_dual_mov_b32 v3, 0 :: v_dual_lshlrev_b32 v2, 3, v1
	v_dual_mov_b32 v4, 0 :: v_dual_lshlrev_b32 v13, 7, v12
	s_mul_i32 s13, s10, s10
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_add_nc_u32_e32 v14, 0x800, v2
	v_mad_u64_u32 v[5:6], null, v11, s10, v[1:2]
	v_add_nc_u32_e32 v15, v13, v2
	v_dual_mov_b32 v1, v3 :: v_dual_mov_b32 v2, v4
	s_delay_alu instid0(VALU_DEP_4)
	v_add_nc_u32_e32 v16, v14, v13
.LBB1_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB1_7 Depth 2
	s_lshl_b32 s14, s12, 4
	s_mov_b32 s15, exec_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_dual_mov_b32 v7, v4 :: v_dual_add_nc_u32 v8, s14, v5
	v_mov_b32_e32 v6, v3
	v_cmpx_gt_i32_e64 s13, v8
	s_cbranch_execz .LBB1_4
; %bb.3:                                ;   in Loop: Header=BB1_2 Depth=1
	v_ashrrev_i32_e32 v9, 31, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[6:7], 3, v[8:9]
	v_add_co_u32 v6, vcc_lo, s2, v6
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s3, v7, vcc_lo
	global_load_b64 v[6:7], v[6:7], off
.LBB1_4:                                ;   in Loop: Header=BB1_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s15
	v_add_nc_u32_e32 v10, s14, v12
	s_mov_b32 s14, exec_lo
	s_waitcnt vmcnt(0)
	ds_store_b64 v15, v[6:7]
	v_mad_u64_u32 v[8:9], null, v10, s10, v[0:1]
	v_mov_b32_e32 v9, 0
	v_mov_b32_e32 v10, 0
	s_delay_alu instid0(VALU_DEP_3)
	v_cmpx_gt_i32_e64 s13, v8
	s_cbranch_execz .LBB1_6
; %bb.5:                                ;   in Loop: Header=BB1_2 Depth=1
	v_ashrrev_i32_e32 v9, 31, v8
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_lshlrev_b64 v[6:7], 3, v[8:9]
	v_add_co_u32 v6, vcc_lo, s4, v6
	s_delay_alu instid0(VALU_DEP_2)
	v_add_co_ci_u32_e32 v7, vcc_lo, s5, v7, vcc_lo
	global_load_b64 v[9:10], v[6:7], off
.LBB1_6:                                ;   in Loop: Header=BB1_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s14
	v_mov_b32_e32 v6, v14
	s_mov_b32 s14, 0
	s_waitcnt vmcnt(0)
	ds_store_b64 v16, v[9:10]
	s_waitcnt lgkmcnt(0)
	s_barrier
	buffer_gl0_inv
.LBB1_7:                                ;   Parent Loop BB1_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	v_add_nc_u32_e32 v9, s14, v13
	s_add_i32 s14, s14, 8
	ds_load_b64 v[7:8], v6
	ds_load_b64 v[9:10], v9
	v_add_nc_u32_e32 v6, 0x80, v6
	s_cmpk_eq_i32 s14, 0x80
	s_waitcnt lgkmcnt(0)
	v_fma_f64 v[1:2], v[9:10], v[7:8], v[1:2]
	s_cbranch_scc0 .LBB1_7
; %bb.8:                                ;   in Loop: Header=BB1_2 Depth=1
	s_add_i32 s12, s12, 1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s12, s11
	s_barrier
	buffer_gl0_inv
	s_cbranch_scc0 .LBB1_2
	s_branch .LBB1_10
.LBB1_9:
	v_mov_b32_e32 v1, 0
	v_mov_b32_e32 v2, 0
.LBB1_10:                               ; %Flow75
	v_max_i32_e32 v3, v11, v0
	s_mov_b32 s2, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_i32_e64 s10, v3
	s_cbranch_execz .LBB1_12
; %bb.11:
	v_mad_u64_u32 v[3:4], null, v11, s10, v[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v4, 31, v3
	v_lshlrev_b64 v[3:4], 3, v[3:4]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v3, vcc_lo, s8, v3
	v_add_co_ci_u32_e32 v4, vcc_lo, s9, v4, vcc_lo
	global_load_b64 v[5:6], v[3:4], off
	s_waitcnt vmcnt(0)
	v_mul_f64 v[5:6], v[5:6], s[6:7]
	s_delay_alu instid0(VALU_DEP_1)
	v_fma_f64 v[0:1], v[1:2], s[0:1], v[5:6]
	global_store_b64 v[3:4], v[0:1], off
.LBB1_12:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17dgemm_cuda_sharedidPdS_dS_
		.amdhsa_group_segment_fixed_size 4096
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 304
		.amdhsa_user_sgpr_count 14
		.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 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 17
		.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	_Z17dgemm_cuda_sharedidPdS_dS_, .Lfunc_end1-_Z17dgemm_cuda_sharedidPdS_dS_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 568
; NumSgprs: 18
; NumVgprs: 17
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 4096 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 17
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
