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

#define N 500



struct timeval start, end;

typedef struct Matrix {
    int rows;
    int cols;
    double ** matrix;
} Matrix;

Matrix buildMatrix(int r, int c) {
    Matrix temp;
    temp.rows = r;
    temp.cols = c;
    temp.matrix = (double**)malloc(r * sizeof(double*));

    unsigned int i;
    for(i = 0; i < r; i++)
    {
        temp.matrix[i] = (double*)calloc(c,sizeof(double));
    }

    return temp;
}

void displayMatrix(Matrix m) {
    printf("\n");
    for(int i = 0; i < m.rows; i++) {
        printf("| ");
        for(int j = 0; j < m.cols; j++) {
            printf("%8.5f ", m.matrix[i][j]);
        }
        printf("|\n");
    }
    printf("\n");
}

void setValue(Matrix* m, double val, int r, int c) {
    m->matrix[r][c] = val;
}

Matrix multByValue(double val, Matrix m) {
    Matrix result = buildMatrix(m.rows, m.cols);
    for(int i = 0; i < result.rows; i++) {
        for(int j = 0; j < result.cols; j++) {
            result.matrix[i][j] = val * m.matrix[i][j];
        }
    }
    return result;
}

Matrix multByMatrix(Matrix mat1, Matrix mat2) {
    Matrix result;
    if(mat1.cols == mat2.rows) {
        result = buildMatrix(mat1.rows, mat2.cols);
    }
    else if(mat1.cols == mat2.cols) {
        result = buildMatrix(mat2.rows, mat1.rows);
    } else {
        result = buildMatrix(mat1.rows, mat1.cols);
    }

    for(int i = 0; i < mat1.rows; i++) {
        for(int j = 0; j < mat2.cols; j++) {
            for(int k = 0; k < mat1.cols; k++) {
                result.matrix[i][j] += mat1.matrix[i][k] * mat2.matrix[k][j];
            }
        }
    }
    return result;
}

double getDeterminate(Matrix m) {
    int i, j, k;
    double ratio;
    int rows = m.rows, cols = m.cols;
    Matrix temp = buildMatrix(m.rows, m.cols);
    for(int i = 0; i < m.rows; i++) {
        for(int j = 0; j < m.cols; j++) {
            temp.matrix[i][j] = m.matrix[i][j];
        }
    }
    if(rows == cols) {
         if(rows == 2 && cols == 2) {
             return (temp.matrix[0][0] * temp.matrix[1][1]) - (temp.matrix[0][1] * temp.matrix[1][0]);
         }
        for(i = 0; i < rows; i++){
        for(j = 0; j < cols; j++){
            if(j>i){
                ratio = temp.matrix[j][i]/temp.matrix[i][i];
                for(k = 0; k < rows; k++) {
                    temp.matrix[j][k] -= ratio * temp.matrix[i][k];
                }
            }
        }
    }
    double det = 1;
    for(i = 0; i < rows; i++) {
        det *= temp.matrix[i][i];
    }
        return det;
    }
    return 0;
}

Matrix transpose(Matrix m) {
    Matrix temp;
    if(m.rows == m.cols) {
        temp = buildMatrix(m.rows, m.cols);
    } else {
        temp = buildMatrix(m.cols, m.rows);
    }
    int i, j;
    for(i=0; i<temp.cols; i++) {
        for(j=0; j<temp.rows; j++) {
            temp.matrix[j][i] = m.matrix[i][j];
        }
    }
    return temp;
}

Matrix coFactorCPU(Matrix m) {
    Matrix temp = buildMatrix(m.rows, m.cols);
    int i, j;
    for(i = 0; i < m.rows; i++) {
        for(j = 0; j < m.cols; j++) {
            if((j + i) % 2 == 1) {
                temp.matrix[i][j] = m.matrix[i][j] * -1;
            }
            else {
                temp.matrix[i][j] = m.matrix[i][j];
            }
        }
    }
    return temp;
}

void starttime() {
  gettimeofday( &start, 0 );
}



void endtime() {
   gettimeofday( &end, 0 );
   double elapsed = ( end.tv_sec - start.tv_sec ) * 1000.0 + ( end.tv_usec - start.tv_usec ) / 1000.0;
   printf("%f ms\n", elapsed);
}



__global__ void MatAdd(int A[][N], int B[][N], int C[][N]){
           int i = threadIdx.x;
           int j = threadIdx.y;

           C[i][j] = A[i][j] + B[i][j];
       }

__global__ void MatMult(double A[][N], double B[][N], double C[][N], int width){
               int i = threadIdx.x;
               int j = threadIdx.y;
               int k;
               double Pvalue = 0;

               for(k = 0; k < width; k++){
                   Pvalue += A[i][k] * B[k][j];
               }

               C[i][j] = Pvalue;
}

__global__ void MatTrans(double A[][N], double C[][N]){
               int i = threadIdx.x;
               int j = threadIdx.y;

               C[j][i] = A[i][j];

}

__global__ void multMatByValue(double val, double A[][N], double C[][N]) {
               int i = threadIdx.x;
               int j = threadIdx.y;
               C[i][j] = val * A[i][j];

}

__global__ void coFactor(double A[][N], double C[][N]) {
               int i = threadIdx.x;
               int j = threadIdx.y;

               if((j+i) % 2 == 1){
                 C[i][j] = A[i][j] * -1;
               }
               else{
                 C[i][j] = A[i][j];
               }
              //C[i][j] = A[i][j] * pow(-1,((j+i)%2));
}

__global__ void determinate(double A[][N], double *d, int width, int height){
    int i = threadIdx.x;
    int j = threadIdx.y;
    //printf("Hello from determinate\n");
    if(j > i){
        double ratio = A[j][i]/A[i][i];
        for(int k = 0; k < width; k++){
            A[j][k] -= ratio * A[i][k];
        }
    }
    for(int k = 0; k < width; k++){
        if(k == i){
            *d *= A[i][k];
        }
    }
}



__global__ void determinate_gpu(double A[][N], double* d, int width, int height){
    int i = threadIdx.x;
    int j = threadIdx.y;

    if(j > i){
        double ratio = A[j][i]/A[i][i];
        for(int k = 0; k < width; k++){
            A[j][k] -= ratio * A[i][k];
        }
    }
    for(int k = 0; k < width; k++){
        if(k == i){
            *d *= A[i][k];
        }
    }
}

int main(){

double A[N][N];
double C[N][N];
Matrix a = buildMatrix(N, N);
Matrix b = buildMatrix(N, N);

double E[N][N];
for(int i = 0; i < N; i++) {
  for(int j = 0; j < N; j++) {
    E[i][j] = 1;
  }
}


for(int i = 0; i< N;i++){
  for(int j = 0; j < N;j++ ){
    C[i][j] = 0;
    A[i][j] = 1;
    a.matrix[i][j] = 1;
    b.matrix[i][j] = 1;
  }
}

double B[N][N];

double det = 1.0;
double *d_det;

double (*pA)[N], (*pB)[N], (*pC)[N],(*pE)[N];

cudaMalloc((void**)&pA, (N*N)*sizeof(double));
cudaMalloc((void**)&pB, (N*N)*sizeof(double));
cudaMalloc((void**)&pC, (N*N)*sizeof(double));
cudaMalloc((void**)&pE, (N*N)*sizeof(double));
cudaMalloc((void**)&d_det, sizeof(double));

cudaMemcpy(pA, A, (N*N)*sizeof(double), cudaMemcpyHostToDevice);
cudaMemcpy(pB, B, (N*N)*sizeof(double), cudaMemcpyHostToDevice);
cudaMemcpy(pC, C, (N*N)*sizeof(double), cudaMemcpyHostToDevice);
cudaMemcpy(pE, E, (N*N)*sizeof(double), cudaMemcpyHostToDevice);
cudaMemcpy(d_det, &det, sizeof(double), cudaMemcpyHostToDevice);



int numBlocks = 1;
dim3 threadsPerBlock(N,N);
starttime();
printf("***Transpose on %d x %d Matrix on CPU***\n",N,N);
Matrix d = transpose(a);
endtime();
starttime();
printf("***Transpose on %d x %d Matrix on GPU***\n",N,N);
MatTrans<<<numBlocks,threadsPerBlock>>>(pA, pC);
endtime();
starttime();
printf("***Multiplication on %d x %d Matrix on CPU***\n",N,N);
Matrix c = multByMatrix(a, b);
endtime();
starttime();
printf("***Multiplication on %d x %d Matrix on GPU***\n",N,N);
MatMult<<<numBlocks,threadsPerBlock>>>(pA,pA,pC,N);
endtime();
starttime();
printf("***Multiplication by single value on %d x %d Matrix with %d on GPU***\n",N,N,5);
multMatByValue<<<numBlocks, threadsPerBlock>>>(5, pA, pC);
endtime();
starttime();
printf("***Multiplication by single value on %d x %d Matrix with %d on CPU***\n",N,N,5);
Matrix e = multByValue(5,a);
endtime();
starttime();
printf("***Cofactor of %d x %d Matrix on GPU***\n",N,N);
coFactor<<<numBlocks, threadsPerBlock>>>(pA,pC);
endtime();
starttime();
printf("***Cofactor of %d x %d Matrix on CPU***\n",N,N);
Matrix f = coFactorCPU(a);
endtime();
starttime();
printf("***Determinate of %d x %d Matrix on CPU***\n",N,N);
double determinate = getDeterminate(a);
endtime();
starttime();
printf("***Determinate of %d x %d Matrix on GPU***\n",N,N);
determinate_gpu<<<numBlocks, threadsPerBlock>>>(pE, d_det, N, N);
endtime();
cudaMemcpy(&det, d_det, sizeof(double), cudaMemcpyDeviceToHost);
cudaMemcpy(C, pC, (N*N)*sizeof(double), cudaMemcpyDeviceToHost);


cudaFree(pA);
cudaFree(pB);
cudaFree(pC);
cudaFree(d_det);


printf("\n");
return 0;
}

	.file	"tmpxft_00367782_00000000-6_main.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2040:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2040:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z11buildMatrixii
	.type	_Z11buildMatrixii, @function
_Z11buildMatrixii:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movslq	%edi, %rdi
	movslq	%esi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	xorl	%r13d, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%r14, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdi, %rbx
	salq	$3, %rdi
	call	malloc@PLT
	movq	%rax, %r12
.L3:
	cmpl	%ebx, %r13d
	jnb	.L7
	movl	$8, %esi
	movq	%r14, %rdi
	call	calloc@PLT
	movq	%rax, (%r12,%r13,8)
	incq	%r13
	jmp	.L3
.L7:
	salq	$32, %rbp
	movl	%ebx, %eax
	movq	%r12, %rdx
	popq	%rbx
	.cfi_def_cfa_offset 40
	orq	%rbp, %rax
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z11buildMatrixii, .-_Z11buildMatrixii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\n"
.LC1:
	.string	"| "
.LC2:
	.string	"%8.5f "
.LC3:
	.string	"|\n"
	.text
	.globl	_Z13displayMatrix6Matrix
	.type	_Z13displayMatrix6Matrix, @function
_Z13displayMatrix6Matrix:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%rsi, %r13
	leaq	.LC0(%rip), %rsi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%rdi, %rbp
	movl	$2, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rbp, %r15
	xorl	%ebx, %ebx
	pushq	%rcx
	.cfi_def_cfa_offset 64
	sarq	$32, %r15
	call	__printf_chk@PLT
.L9:
	cmpl	%ebx, %ebp
	jle	.L14
	leaq	.LC1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__printf_chk@PLT
	leaq	0(,%rbx,8), %r14
.L10:
	cmpl	%r12d, %r15d
	jle	.L15
	movq	(%r14,%r13), %rax
	leaq	.LC2(%rip), %rsi
	movl	$2, %edi
	movsd	(%rax,%r12,8), %xmm0
	movb	$1, %al
	incq	%r12
	call	__printf_chk@PLT
	jmp	.L10
.L15:
	leaq	.LC3(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	incq	%rbx
	call	__printf_chk@PLT
	jmp	.L9
.L14:
	popq	%rdx
	.cfi_def_cfa_offset 56
	leaq	.LC0(%rip), %rsi
	popq	%rbx
	.cfi_def_cfa_offset 48
	movl	$2, %edi
	popq	%rbp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2028:
	.size	_Z13displayMatrix6Matrix, .-_Z13displayMatrix6Matrix
	.globl	_Z8setValueP6Matrixdii
	.type	_Z8setValueP6Matrixdii, @function
_Z8setValueP6Matrixdii:
.LFB2029:
	.cfi_startproc
	endbr64
	movq	8(%rdi), %rax
	movslq	%esi, %rsi
	movslq	%edx, %rdx
	movq	(%rax,%rsi,8), %rax
	movsd	%xmm0, (%rax,%rdx,8)
	ret
	.cfi_endproc
.LFE2029:
	.size	_Z8setValueP6Matrixdii, .-_Z8setValueP6Matrixdii
	.globl	_Z11multByValued6Matrix
	.type	_Z11multByValued6Matrix, @function
_Z11multByValued6Matrix:
.LFB2030:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rdi, %rax
	movq	%rsi, %rbx
	shrq	$32, %rax
	movl	%eax, %esi
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	movsd	%xmm0, 8(%rsp)
	call	_Z11buildMatrixii
	movsd	8(%rsp), %xmm0
	movq	%rax, %rdi
	movq	%rdx, %rsi
	movl	%eax, %r8d
	xorl	%edx, %edx
	sarq	$32, %rdi
	movl	%edi, %r9d
.L18:
	cmpl	%edx, %r8d
	jle	.L23
	xorl	%ecx, %ecx
.L20:
	cmpl	%ecx, %r9d
	jle	.L24
	movq	(%rbx,%rdx,8), %r11
	movq	(%rsi,%rdx,8), %r10
	movsd	(%r11,%rcx,8), %xmm1
	mulsd	%xmm0, %xmm1
	movsd	%xmm1, (%r10,%rcx,8)
	incq	%rcx
	jmp	.L20
.L24:
	incq	%rdx
	jmp	.L18
.L23:
	salq	$32, %rdi
	movl	%eax, %eax
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	movq	%rsi, %rdx
	orq	%rdi, %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2030:
	.size	_Z11multByValued6Matrix, .-_Z11multByValued6Matrix
	.globl	_Z12multByMatrix6MatrixS_
	.type	_Z12multByMatrix6MatrixS_, @function
_Z12multByMatrix6MatrixS_:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	%rdx, %rax
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	sarq	$32, %rax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%eax, %r14d
	movq	%rcx, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rsi, %rbp
	movl	%eax, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	%edi, %ebx
	sarq	$32, %rdi
	movl	%edi, %r13d
	cmpl	%edx, %edi
	je	.L36
	movl	%edi, %esi
	cmpl	%eax, %edi
	jne	.L36
	movl	%ebx, %esi
	movl	%edx, %edi
	jmp	.L37
.L36:
	movl	%ebx, %edi
.L37:
	call	_Z11buildMatrixii
	xorl	%ecx, %ecx
.L29:
	cmpl	%ecx, %ebx
	jle	.L38
	xorl	%edi, %edi
.L33:
	cmpl	%edi, %r14d
	jle	.L31
	leaq	0(,%rdi,8), %r8
	xorl	%esi, %esi
.L32:
	cmpl	%esi, %r13d
	jle	.L39
	movq	(%r12,%rsi,8), %r10
	movq	(%rdx,%rcx,8), %r9
	movq	0(%rbp,%rcx,8), %r11
	addq	%r8, %r9
	movsd	(%r11,%rsi,8), %xmm0
	mulsd	(%r10,%r8), %xmm0
	incq	%rsi
	addsd	(%r9), %xmm0
	movsd	%xmm0, (%r9)
	jmp	.L32
.L39:
	incq	%rdi
	jmp	.L33
.L31:
	incq	%rcx
	jmp	.L29
.L38:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2031:
	.size	_Z12multByMatrix6MatrixS_, .-_Z12multByMatrix6MatrixS_
	.globl	_Z14getDeterminate6Matrix
	.type	_Z14getDeterminate6Matrix, @function
_Z14getDeterminate6Matrix:
.LFB2032:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movq	%rsi, %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	sarq	$32, %r13
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%r13d, %esi
	movq	%rdi, %rbp
	movl	%r13d, %r12d
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movl	%edi, %ebx
	call	_Z11buildMatrixii
	movq	%rdx, %rax
	xorl	%edx, %edx
.L41:
	cmpl	%edx, %ebx
	jle	.L64
	xorl	%ecx, %ecx
.L43:
	cmpl	%ecx, %r12d
	jle	.L65
	movq	(%r14,%rdx,8), %rsi
	movsd	(%rsi,%rcx,8), %xmm0
	movq	(%rax,%rdx,8), %rsi
	movsd	%xmm0, (%rsi,%rcx,8)
	incq	%rcx
	jmp	.L43
.L65:
	incq	%rdx
	jmp	.L41
.L64:
	xorps	%xmm0, %xmm0
	cmpl	%ebp, %r13d
	jne	.L44
	cmpl	$2, %r13d
	jne	.L54
	movq	(%rax), %rdx
	movq	8(%rax), %rax
	movsd	(%rdx), %xmm0
	movsd	8(%rdx), %xmm1
	mulsd	8(%rax), %xmm0
	mulsd	(%rax), %xmm1
	subsd	%xmm1, %xmm0
	jmp	.L44
.L54:
	xorl	%edx, %edx
.L45:
	movl	%edx, %r10d
	cmpl	%edx, %ebx
	jle	.L55
	leaq	0(,%rdx,8), %r8
	xorl	%esi, %esi
.L50:
	cmpl	%esi, %r12d
	jle	.L66
	cmpl	%r10d, %esi
	jle	.L46
	movq	(%rax,%rsi,8), %rdi
	movq	(%rax,%rdx,8), %r9
	xorl	%ecx, %ecx
	movsd	(%rdi,%r8), %xmm0
	movaps	%xmm0, %xmm1
	divsd	(%r9,%r8), %xmm1
.L47:
	movsd	(%r9,%rcx,8), %xmm2
	movsd	(%rdi,%rcx,8), %xmm0
	mulsd	%xmm1, %xmm2
	subsd	%xmm2, %xmm0
	movsd	%xmm0, (%rdi,%rcx,8)
	incq	%rcx
	cmpl	%ecx, %ebx
	jg	.L47
.L46:
	incq	%rsi
	jmp	.L50
.L66:
	incq	%rdx
	jmp	.L45
.L55:
	movsd	.LC4(%rip), %xmm0
	xorl	%edx, %edx
.L49:
	cmpl	%edx, %ebx
	jle	.L44
	movq	(%rax,%rdx,8), %rcx
	mulsd	(%rcx,%rdx,8), %xmm0
	incq	%rdx
	jmp	.L49
.L44:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2032:
	.size	_Z14getDeterminate6Matrix, .-_Z14getDeterminate6Matrix
	.globl	_Z9transpose6Matrix
	.type	_Z9transpose6Matrix, @function
_Z9transpose6Matrix:
.LFB2033:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movq	%rsi, %rbx
	movl	%edi, %esi
	sarq	$32, %rax
	cmpl	%eax, %edi
	je	.L75
	movl	%eax, %edi
.L75:
	call	_Z11buildMatrixii
	xorl	%edi, %edi
	movl	%eax, %ecx
	shrq	$32, %rax
.L70:
	cmpl	%edi, %eax
	jle	.L72
	leaq	0(,%rdi,8), %r8
	xorl	%esi, %esi
.L73:
	cmpl	%esi, %ecx
	jle	.L76
	movq	(%rbx,%rdi,8), %r9
	movsd	(%r9,%rsi,8), %xmm0
	movq	(%rdx,%rsi,8), %r9
	incq	%rsi
	movsd	%xmm0, (%r9,%r8)
	jmp	.L73
.L76:
	incq	%rdi
	jmp	.L70
.L72:
	salq	$32, %rax
	popq	%rbx
	.cfi_def_cfa_offset 8
	orq	%rcx, %rax
	ret
	.cfi_endproc
.LFE2033:
	.size	_Z9transpose6Matrix, .-_Z9transpose6Matrix
	.globl	_Z11coFactorCPU6Matrix
	.type	_Z11coFactorCPU6Matrix, @function
_Z11coFactorCPU6Matrix:
.LFB2034:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rsi, %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
	shrq	$32, %rbx
	movl	%ebx, %esi
	call	_Z11buildMatrixii
	movq	.LC6(%rip), %xmm1
	xorl	%ecx, %ecx
.L78:
	cmpl	%ecx, %ebp
	jle	.L87
	xorl	%esi, %esi
.L81:
	cmpl	%esi, %ebx
	jle	.L88
	movq	(%r12,%rcx,8), %r8
	movq	(%rdx,%rcx,8), %rdi
	movsd	(%r8,%rsi,8), %xmm0
	leal	(%rcx,%rsi), %r8d
	leaq	(%rdi,%rsi,8), %rdi
	andl	$1, %r8d
	je	.L79
	xorps	%xmm1, %xmm0
.L79:
	movsd	%xmm0, (%rdi)
	incq	%rsi
	jmp	.L81
.L88:
	incq	%rcx
	jmp	.L78
.L87:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2034:
	.size	_Z11coFactorCPU6Matrix, .-_Z11coFactorCPU6Matrix
	.globl	_Z9starttimev
	.type	_Z9starttimev, @function
_Z9starttimev:
.LFB2035:
	.cfi_startproc
	endbr64
	xorl	%esi, %esi
	leaq	start(%rip), %rdi
	jmp	gettimeofday@PLT
	.cfi_endproc
.LFE2035:
	.size	_Z9starttimev, .-_Z9starttimev
	.section	.rodata.str1.1
.LC8:
	.string	"%f ms\n"
	.text
	.globl	_Z7endtimev
	.type	_Z7endtimev, @function
_Z7endtimev:
.LFB2036:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	xorl	%esi, %esi
	leaq	end(%rip), %rdi
	call	gettimeofday@PLT
	movq	end(%rip), %rax
	movl	$2, %edi
	subq	start(%rip), %rax
	cvtsi2sdq	%rax, %xmm0
	movq	8+end(%rip), %rax
	subq	8+start(%rip), %rax
	leaq	.LC8(%rip), %rsi
	cvtsi2sdq	%rax, %xmm1
	movsd	.LC7(%rip), %xmm2
	movb	$1, %al
	popq	%rdx
	.cfi_def_cfa_offset 8
	mulsd	%xmm2, %xmm0
	divsd	%xmm2, %xmm1
	addsd	%xmm1, %xmm0
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE2036:
	.size	_Z7endtimev, .-_Z7endtimev
	.globl	_Z36__device_stub__Z6MatAddPA500_iS0_S0_PA500_iS0_S0_
	.type	_Z36__device_stub__Z6MatAddPA500_iS0_S0_PA500_iS0_S0_, @function
_Z36__device_stub__Z6MatAddPA500_iS0_S0_PA500_iS0_S0_:
.LFB2062:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 24(%rsp)
	leaq	40(%rsp), %rcx
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L92
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z6MatAddPA500_iS0_S0_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L92:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L94
	call	__stack_chk_fail@PLT
.L94:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2062:
	.size	_Z36__device_stub__Z6MatAddPA500_iS0_S0_PA500_iS0_S0_, .-_Z36__device_stub__Z6MatAddPA500_iS0_S0_PA500_iS0_S0_
	.globl	_Z6MatAddPA500_iS0_S0_
	.type	_Z6MatAddPA500_iS0_S0_, @function
_Z6MatAddPA500_iS0_S0_:
.LFB2063:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z6MatAddPA500_iS0_S0_PA500_iS0_S0_
	.cfi_endproc
.LFE2063:
	.size	_Z6MatAddPA500_iS0_S0_, .-_Z6MatAddPA500_iS0_S0_
	.globl	_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i
	.type	_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i, @function
_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i:
.LFB2064:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L97
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z7MatMultPA500_dS0_S0_i(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L97:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L99
	call	__stack_chk_fail@PLT
.L99:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2064:
	.size	_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i, .-_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i
	.globl	_Z7MatMultPA500_dS0_S0_i
	.type	_Z7MatMultPA500_dS0_S0_i, @function
_Z7MatMultPA500_dS0_S0_i:
.LFB2065:
	.cfi_startproc
	endbr64
	jmp	_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i
	.cfi_endproc
.LFE2065:
	.size	_Z7MatMultPA500_dS0_S0_i, .-_Z7MatMultPA500_dS0_S0_i
	.globl	_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_
	.type	_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_, @function
_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_:
.LFB2066:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L102
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z8MatTransPA500_dS0_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L102:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L104
	call	__stack_chk_fail@PLT
.L104:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2066:
	.size	_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_, .-_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_
	.globl	_Z8MatTransPA500_dS0_
	.type	_Z8MatTransPA500_dS0_, @function
_Z8MatTransPA500_dS0_:
.LFB2067:
	.cfi_startproc
	endbr64
	jmp	_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_
	.cfi_endproc
.LFE2067:
	.size	_Z8MatTransPA500_dS0_, .-_Z8MatTransPA500_dS0_
	.globl	_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_
	.type	_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_, @function
_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_:
.LFB2068:
	.cfi_startproc
	endbr64
	subq	$136, %rsp
	.cfi_def_cfa_offset 144
	movq	%rdi, 16(%rsp)
	leaq	40(%rsp), %rcx
	leaq	32(%rsp), %rdx
	movq	%rsi, 8(%rsp)
	leaq	48(%rsp), %rdi
	leaq	60(%rsp), %rsi
	movsd	%xmm0, 24(%rsp)
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L107
	pushq	40(%rsp)
	.cfi_def_cfa_offset 152
	leaq	_Z14multMatByValuedPA500_dS0_(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 160
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 152
	popq	%rdx
	.cfi_def_cfa_offset 144
.L107:
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	je	.L109
	call	__stack_chk_fail@PLT
.L109:
	addq	$136, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2068:
	.size	_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_, .-_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_
	.globl	_Z14multMatByValuedPA500_dS0_
	.type	_Z14multMatByValuedPA500_dS0_, @function
_Z14multMatByValuedPA500_dS0_:
.LFB2069:
	.cfi_startproc
	endbr64
	jmp	_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_
	.cfi_endproc
.LFE2069:
	.size	_Z14multMatByValuedPA500_dS0_, .-_Z14multMatByValuedPA500_dS0_
	.globl	_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_
	.type	_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_, @function
_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_:
.LFB2070:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rsp)
	leaq	40(%rsp), %rdi
	leaq	52(%rsp), %rsi
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 48(%rsp)
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 40(%rsp)
	movq	%rax, 52(%rsp)
	movl	$1, 60(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L112
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z8coFactorPA500_dS0_(%rip), %rdi
	pushq	32(%rsp)
	.cfi_def_cfa_offset 144
	movq	68(%rsp), %rcx
	movl	76(%rsp), %r8d
	movq	56(%rsp), %rsi
	movl	64(%rsp), %edx
	leaq	104(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L112:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L114
	call	__stack_chk_fail@PLT
.L114:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2070:
	.size	_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_, .-_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_
	.globl	_Z8coFactorPA500_dS0_
	.type	_Z8coFactorPA500_dS0_, @function
_Z8coFactorPA500_dS0_:
.LFB2071:
	.cfi_startproc
	endbr64
	jmp	_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_
	.cfi_endproc
.LFE2071:
	.size	_Z8coFactorPA500_dS0_, .-_Z8coFactorPA500_dS0_
	.globl	_Z40__device_stub__Z11determinatePA500_dPdiiPA500_dPdii
	.type	_Z40__device_stub__Z11determinatePA500_dPdiiPA500_dPdii, @function
_Z40__device_stub__Z11determinatePA500_dPdiiPA500_dPdii:
.LFB2072:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 8(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L117
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z11determinatePA500_dPdii(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L117:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L119
	call	__stack_chk_fail@PLT
.L119:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2072:
	.size	_Z40__device_stub__Z11determinatePA500_dPdiiPA500_dPdii, .-_Z40__device_stub__Z11determinatePA500_dPdiiPA500_dPdii
	.globl	_Z11determinatePA500_dPdii
	.type	_Z11determinatePA500_dPdii, @function
_Z11determinatePA500_dPdii:
.LFB2073:
	.cfi_startproc
	endbr64
	jmp	_Z40__device_stub__Z11determinatePA500_dPdiiPA500_dPdii
	.cfi_endproc
.LFE2073:
	.size	_Z11determinatePA500_dPdii, .-_Z11determinatePA500_dPdii
	.globl	_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii
	.type	_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii, @function
_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii:
.LFB2074:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	56(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	68(%rsp), %rsi
	movl	%edx, 12(%rsp)
	leaq	40(%rsp), %rdx
	movl	%ecx, 8(%rsp)
	leaq	48(%rsp), %rcx
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 64(%rsp)
	movq	%rax, 104(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	12(%rsp), %rax
	movq	%rax, 120(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 56(%rsp)
	movq	%rax, 68(%rsp)
	movl	$1, 76(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L122
	pushq	48(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z15determinate_gpuPA500_dPdii(%rip), %rdi
	pushq	48(%rsp)
	.cfi_def_cfa_offset 176
	movq	84(%rsp), %rcx
	movl	92(%rsp), %r8d
	movq	72(%rsp), %rsi
	movl	80(%rsp), %edx
	leaq	120(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L122:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L124
	call	__stack_chk_fail@PLT
.L124:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2074:
	.size	_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii, .-_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii
	.globl	_Z15determinate_gpuPA500_dPdii
	.type	_Z15determinate_gpuPA500_dPdii, @function
_Z15determinate_gpuPA500_dPdii:
.LFB2075:
	.cfi_startproc
	endbr64
	jmp	_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii
	.cfi_endproc
.LFE2075:
	.size	_Z15determinate_gpuPA500_dPdii, .-_Z15determinate_gpuPA500_dPdii
	.section	.rodata.str1.1
.LC9:
	.string	"***Transpose on %d x %d Matrix on CPU***\n"
.LC10:
	.string	"***Transpose on %d x %d Matrix on GPU***\n"
.LC11:
	.string	"***Multiplication on %d x %d Matrix on CPU***\n"
.LC12:
	.string	"***Multiplication on %d x %d Matrix on GPU***\n"
.LC13:
	.string	"***Multiplication by single value on %d x %d Matrix with %d on GPU***\n"
.LC15:
	.string	"***Multiplication by single value on %d x %d Matrix with %d on CPU***\n"
.LC16:
	.string	"***Cofactor of %d x %d Matrix on GPU***\n"
.LC17:
	.string	"***Cofactor of %d x %d Matrix on CPU***\n"
.LC18:
	.string	"***Determinate of %d x %d Matrix on CPU***\n"
.LC19:
	.string	"***Determinate of %d x %d Matrix on GPU***\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2037:
	.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
	leaq	-7999488(%rsp), %r11
	.cfi_def_cfa 11, 7999544
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$616, %rsp
	.cfi_def_cfa_offset 8000160
	movl	$500, %esi
	movl	$500, %edi
	movq	%fs:40, %rax
	movq	%rax, 8000088(%rsp)
	xorl	%eax, %eax
	leaq	6000088(%rsp), %r13
	call	_Z11buildMatrixii
	movl	$500, %esi
	movl	$500, %edi
	movq	%rax, (%rsp)
	movq	%rdx, %rbx
	call	_Z11buildMatrixii
	movsd	.LC4(%rip), %xmm0
	movq	%rax, 8(%rsp)
	leaq	4000088(%rsp), %rax
	movq	%rdx, %rbp
	movq	%rax, %r14
.L128:
	xorl	%edx, %edx
.L129:
	movsd	%xmm0, (%rax,%rdx,8)
	incq	%rdx
	cmpq	$500, %rdx
	jne	.L129
	addq	$4000, %rax
	cmpq	%r13, %rax
	jne	.L128
	xorl	%eax, %eax
	leaq	2000088(%rsp), %r12
.L130:
	imulq	$500, %rax, %rcx
	movq	(%rbx,%rax), %rdi
	movq	0(%rbp,%rax), %rsi
	xorl	%edx, %edx
.L131:
	movq	$0x000000000, (%rcx,%r12)
	leaq	88(%rsp), %r15
	movsd	%xmm0, 88(%rsp,%rcx)
	addq	$8, %rcx
	movsd	%xmm0, (%rdi,%rdx)
	movsd	%xmm0, (%rsi,%rdx)
	addq	$8, %rdx
	cmpq	$4000, %rdx
	jne	.L131
	addq	$8, %rax
	cmpq	$4000, %rax
	jne	.L130
	leaq	32(%rsp), %rdi
	movl	$2000000, %esi
	movsd	%xmm0, 16(%rsp)
	call	cudaMalloc@PLT
	leaq	40(%rsp), %rdi
	movl	$2000000, %esi
	call	cudaMalloc@PLT
	leaq	48(%rsp), %rdi
	movl	$2000000, %esi
	call	cudaMalloc@PLT
	leaq	56(%rsp), %rdi
	movl	$2000000, %esi
	call	cudaMalloc@PLT
	leaq	24(%rsp), %rdi
	movl	$8, %esi
	call	cudaMalloc@PLT
	movq	32(%rsp), %rdi
	movl	$1, %ecx
	movq	%r15, %rsi
	movl	$2000000, %edx
	call	cudaMemcpy@PLT
	movq	40(%rsp), %rdi
	movl	$1, %ecx
	movq	%r13, %rsi
	movl	$2000000, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rdi
	movl	$1, %ecx
	movq	%r12, %rsi
	movl	$2000000, %edx
	call	cudaMemcpy@PLT
	movq	56(%rsp), %rdi
	movq	%r14, %rsi
	movl	$1, %ecx
	movl	$2000000, %edx
	leaq	16(%rsp), %r14
	call	cudaMemcpy@PLT
	movq	24(%rsp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$8, %edx
	call	cudaMemcpy@PLT
	movl	$1, 72(%rsp)
	movabsq	$2147483648500, %rax
	movq	%rax, 64(%rsp)
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC9(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	movq	%rbx, %rsi
	call	_Z9transpose6Matrix
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC10(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	72(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	64(%rsp), %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 84(%rsp)
	movq	%rdi, 76(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L133
	movq	48(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z35__device_stub__Z8MatTransPA500_dS0_PA500_dS0_
.L133:
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC11(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	movq	%rbp, %rcx
	movq	%rbx, %rsi
	movq	8(%rsp), %rdx
	call	_Z12multByMatrix6MatrixS_
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC12(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	72(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	64(%rsp), %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 84(%rsp)
	movq	%rdi, 76(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L134
	movq	32(%rsp), %rdi
	movq	48(%rsp), %rdx
	movl	$500, %ecx
	movq	%rdi, %rsi
	call	_Z38__device_stub__Z7MatMultPA500_dS0_S0_iPA500_dS0_S0_i
.L134:
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$5, %r8d
	xorl	%eax, %eax
	movl	$500, %ecx
	movl	$500, %edx
	leaq	.LC13(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	72(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	64(%rsp), %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 84(%rsp)
	movq	%rdi, 76(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L135
	movq	48(%rsp), %rsi
	movq	32(%rsp), %rdi
	movsd	.LC14(%rip), %xmm0
	call	_Z43__device_stub__Z14multMatByValuedPA500_dS0_dPA500_dS0_
.L135:
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$5, %r8d
	xorl	%eax, %eax
	movl	$500, %ecx
	movl	$500, %edx
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	movsd	.LC14(%rip), %xmm0
	movq	%rbx, %rsi
	call	_Z11multByValued6Matrix
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC16(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	72(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	64(%rsp), %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 84(%rsp)
	movq	%rdi, 76(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L136
	movq	48(%rsp), %rsi
	movq	32(%rsp), %rdi
	call	_Z35__device_stub__Z8coFactorPA500_dS0_PA500_dS0_
.L136:
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC17(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	movq	%rbx, %rsi
	call	_Z11coFactorCPU6Matrix
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC18(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	movq	%rbx, %rsi
	call	_Z14getDeterminate6Matrix
	call	_Z7endtimev
	call	_Z9starttimev
	movl	$500, %ecx
	movl	$500, %edx
	xorl	%eax, %eax
	leaq	.LC19(%rip), %rsi
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	72(%rsp), %ecx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	64(%rsp), %rdx
	movl	$1, %esi
	movabsq	$4294967297, %rdi
	movl	$1, 84(%rsp)
	movq	%rdi, 76(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L137
	movq	24(%rsp), %rsi
	movq	56(%rsp), %rdi
	movl	$500, %ecx
	movl	$500, %edx
	call	_Z44__device_stub__Z15determinate_gpuPA500_dPdiiPA500_dPdii
.L137:
	call	_Z7endtimev
	movq	24(%rsp), %rsi
	movl	$2, %ecx
	movq	%r14, %rdi
	movl	$8, %edx
	call	cudaMemcpy@PLT
	movq	48(%rsp), %rsi
	movl	$2, %ecx
	movq	%r12, %rdi
	movl	$2000000, %edx
	call	cudaMemcpy@PLT
	movq	32(%rsp), %rdi
	call	cudaFree@PLT
	movq	40(%rsp), %rdi
	call	cudaFree@PLT
	movq	48(%rsp), %rdi
	call	cudaFree@PLT
	movq	24(%rsp), %rdi
	call	cudaFree@PLT
	xorl	%eax, %eax
	movl	$2, %edi
	leaq	.LC0(%rip), %rsi
	call	__printf_chk@PLT
	movq	8000088(%rsp), %rax
	subq	%fs:40, %rax
	je	.L138
	call	__stack_chk_fail@PLT
.L138:
	addq	$8000104, %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
.LFE2037:
	.size	main, .-main
	.section	.rodata.str1.1
.LC20:
	.string	"_Z15determinate_gpuPA500_dPdii"
.LC21:
	.string	"_Z11determinatePA500_dPdii"
.LC22:
	.string	"_Z8coFactorPA500_dS0_"
.LC23:
	.string	"_Z14multMatByValuedPA500_dS0_"
.LC24:
	.string	"_Z8MatTransPA500_dS0_"
.LC25:
	.string	"_Z7MatMultPA500_dS0_S0_i"
.LC26:
	.string	"_Z6MatAddPA500_iS0_S0_"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2077:
	.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	.LC20(%rip), %rdx
	movq	%rax, %rdi
	movq	%rax, %rbx
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	leaq	_Z15determinate_gpuPA500_dPdii(%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	.LC21(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z11determinatePA500_dPdii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC22(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z8coFactorPA500_dS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC23(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z14multMatByValuedPA500_dS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC24(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z8MatTransPA500_dS0_(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC25(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z7MatMultPA500_dS0_S0_i(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 32
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 40
	pushq	$0
	.cfi_def_cfa_offset 48
	call	__cudaRegisterFunction@PLT
	addq	$32, %rsp
	.cfi_def_cfa_offset 16
	movq	%rbx, %rdi
	xorl	%r9d, %r9d
	pushq	$0
	.cfi_def_cfa_offset 24
	leaq	.LC26(%rip), %rdx
	orl	$-1, %r8d
	leaq	_Z6MatAddPA500_iS0_S0_(%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
.LFE2077:
	.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
	.globl	end
	.bss
	.align 16
	.type	end, @object
	.size	end, 16
end:
	.zero	16
	.globl	start
	.align 16
	.type	start, @object
	.size	start, 16
start:
	.zero	16
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC4:
	.long	0
	.long	1072693248
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC6:
	.long	0
	.long	-2147483648
	.long	0
	.long	0
	.section	.rodata.cst8
	.align 8
.LC7:
	.long	0
	.long	1083129856
	.align 8
.LC14:
	.long	0
	.long	1075052544
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


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

#define N 500



struct timeval start, end;

typedef struct Matrix {
    int rows;
    int cols;
    double ** matrix;
} Matrix;

Matrix buildMatrix(int r, int c) {
    Matrix temp;
    temp.rows = r;
    temp.cols = c;
    temp.matrix = (double**)malloc(r * sizeof(double*));

    unsigned int i;
    for(i = 0; i < r; i++)
    {
        temp.matrix[i] = (double*)calloc(c,sizeof(double));
    }

    return temp;
}

void displayMatrix(Matrix m) {
    printf("\n");
    for(int i = 0; i < m.rows; i++) {
        printf("| ");
        for(int j = 0; j < m.cols; j++) {
            printf("%8.5f ", m.matrix[i][j]);
        }
        printf("|\n");
    }
    printf("\n");
}

void setValue(Matrix* m, double val, int r, int c) {
    m->matrix[r][c] = val;
}

Matrix multByValue(double val, Matrix m) {
    Matrix result = buildMatrix(m.rows, m.cols);
    for(int i = 0; i < result.rows; i++) {
        for(int j = 0; j < result.cols; j++) {
            result.matrix[i][j] = val * m.matrix[i][j];
        }
    }
    return result;
}

Matrix multByMatrix(Matrix mat1, Matrix mat2) {
    Matrix result;
    if(mat1.cols == mat2.rows) {
        result = buildMatrix(mat1.rows, mat2.cols);
    }
    else if(mat1.cols == mat2.cols) {
        result = buildMatrix(mat2.rows, mat1.rows);
    } else {
        result = buildMatrix(mat1.rows, mat1.cols);
    }

    for(int i = 0; i < mat1.rows; i++) {
        for(int j = 0; j < mat2.cols; j++) {
            for(int k = 0; k < mat1.cols; k++) {
                result.matrix[i][j] += mat1.matrix[i][k] * mat2.matrix[k][j];
            }
        }
    }
    return result;
}

double getDeterminate(Matrix m) {
    int i, j, k;
    double ratio;
    int rows = m.rows, cols = m.cols;
    Matrix temp = buildMatrix(m.rows, m.cols);
    for(int i = 0; i < m.rows; i++) {
        for(int j = 0; j < m.cols; j++) {
            temp.matrix[i][j] = m.matrix[i][j];
        }
    }
    if(rows == cols) {
         if(rows == 2 && cols == 2) {
             return (temp.matrix[0][0] * temp.matrix[1][1]) - (temp.matrix[0][1] * temp.matrix[1][0]);
         }
        for(i = 0; i < rows; i++){
        for(j = 0; j < cols; j++){
            if(j>i){
                ratio = temp.matrix[j][i]/temp.matrix[i][i];
                for(k = 0; k < rows; k++) {
                    temp.matrix[j][k] -= ratio * temp.matrix[i][k];
                }
            }
        }
    }
    double det = 1;
    for(i = 0; i < rows; i++) {
        det *= temp.matrix[i][i];
    }
        return det;
    }
    return 0;
}

Matrix transpose(Matrix m) {
    Matrix temp;
    if(m.rows == m.cols) {
        temp = buildMatrix(m.rows, m.cols);
    } else {
        temp = buildMatrix(m.cols, m.rows);
    }
    int i, j;
    for(i=0; i<temp.cols; i++) {
        for(j=0; j<temp.rows; j++) {
            temp.matrix[j][i] = m.matrix[i][j];
        }
    }
    return temp;
}

Matrix coFactorCPU(Matrix m) {
    Matrix temp = buildMatrix(m.rows, m.cols);
    int i, j;
    for(i = 0; i < m.rows; i++) {
        for(j = 0; j < m.cols; j++) {
            if((j + i) % 2 == 1) {
                temp.matrix[i][j] = m.matrix[i][j] * -1;
            }
            else {
                temp.matrix[i][j] = m.matrix[i][j];
            }
        }
    }
    return temp;
}

void starttime() {
  gettimeofday( &start, 0 );
}



void endtime() {
   gettimeofday( &end, 0 );
   double elapsed = ( end.tv_sec - start.tv_sec ) * 1000.0 + ( end.tv_usec - start.tv_usec ) / 1000.0;
   printf("%f ms\n", elapsed);
}



__global__ void MatAdd(int A[][N], int B[][N], int C[][N]){
           int i = threadIdx.x;
           int j = threadIdx.y;

           C[i][j] = A[i][j] + B[i][j];
       }

__global__ void MatMult(double A[][N], double B[][N], double C[][N], int width){
               int i = threadIdx.x;
               int j = threadIdx.y;
               int k;
               double Pvalue = 0;

               for(k = 0; k < width; k++){
                   Pvalue += A[i][k] * B[k][j];
               }

               C[i][j] = Pvalue;
}

__global__ void MatTrans(double A[][N], double C[][N]){
               int i = threadIdx.x;
               int j = threadIdx.y;

               C[j][i] = A[i][j];

}

__global__ void multMatByValue(double val, double A[][N], double C[][N]) {
               int i = threadIdx.x;
               int j = threadIdx.y;
               C[i][j] = val * A[i][j];

}

__global__ void coFactor(double A[][N], double C[][N]) {
               int i = threadIdx.x;
               int j = threadIdx.y;

               if((j+i) % 2 == 1){
                 C[i][j] = A[i][j] * -1;
               }
               else{
                 C[i][j] = A[i][j];
               }
              //C[i][j] = A[i][j] * pow(-1,((j+i)%2));
}

__global__ void determinate(double A[][N], double *d, int width, int height){
    int i = threadIdx.x;
    int j = threadIdx.y;
    //printf("Hello from determinate\n");
    if(j > i){
        double ratio = A[j][i]/A[i][i];
        for(int k = 0; k < width; k++){
            A[j][k] -= ratio * A[i][k];
        }
    }
    for(int k = 0; k < width; k++){
        if(k == i){
            *d *= A[i][k];
        }
    }
}



__global__ void determinate_gpu(double A[][N], double* d, int width, int height){
    int i = threadIdx.x;
    int j = threadIdx.y;

    if(j > i){
        double ratio = A[j][i]/A[i][i];
        for(int k = 0; k < width; k++){
            A[j][k] -= ratio * A[i][k];
        }
    }
    for(int k = 0; k < width; k++){
        if(k == i){
            *d *= A[i][k];
        }
    }
}

int main(){

double A[N][N];
double C[N][N];
Matrix a = buildMatrix(N, N);
Matrix b = buildMatrix(N, N);

double E[N][N];
for(int i = 0; i < N; i++) {
  for(int j = 0; j < N; j++) {
    E[i][j] = 1;
  }
}


for(int i = 0; i< N;i++){
  for(int j = 0; j < N;j++ ){
    C[i][j] = 0;
    A[i][j] = 1;
    a.matrix[i][j] = 1;
    b.matrix[i][j] = 1;
  }
}

double B[N][N];

double det = 1.0;
double *d_det;

double (*pA)[N], (*pB)[N], (*pC)[N],(*pE)[N];

hipMalloc((void**)&pA, (N*N)*sizeof(double));
hipMalloc((void**)&pB, (N*N)*sizeof(double));
hipMalloc((void**)&pC, (N*N)*sizeof(double));
hipMalloc((void**)&pE, (N*N)*sizeof(double));
hipMalloc((void**)&d_det, sizeof(double));

hipMemcpy(pA, A, (N*N)*sizeof(double), hipMemcpyHostToDevice);
hipMemcpy(pB, B, (N*N)*sizeof(double), hipMemcpyHostToDevice);
hipMemcpy(pC, C, (N*N)*sizeof(double), hipMemcpyHostToDevice);
hipMemcpy(pE, E, (N*N)*sizeof(double), hipMemcpyHostToDevice);
hipMemcpy(d_det, &det, sizeof(double), hipMemcpyHostToDevice);



int numBlocks = 1;
dim3 threadsPerBlock(N,N);
starttime();
printf("***Transpose on %d x %d Matrix on CPU***\n",N,N);
Matrix d = transpose(a);
endtime();
starttime();
printf("***Transpose on %d x %d Matrix on GPU***\n",N,N);
MatTrans<<<numBlocks,threadsPerBlock>>>(pA, pC);
endtime();
starttime();
printf("***Multiplication on %d x %d Matrix on CPU***\n",N,N);
Matrix c = multByMatrix(a, b);
endtime();
starttime();
printf("***Multiplication on %d x %d Matrix on GPU***\n",N,N);
MatMult<<<numBlocks,threadsPerBlock>>>(pA,pA,pC,N);
endtime();
starttime();
printf("***Multiplication by single value on %d x %d Matrix with %d on GPU***\n",N,N,5);
multMatByValue<<<numBlocks, threadsPerBlock>>>(5, pA, pC);
endtime();
starttime();
printf("***Multiplication by single value on %d x %d Matrix with %d on CPU***\n",N,N,5);
Matrix e = multByValue(5,a);
endtime();
starttime();
printf("***Cofactor of %d x %d Matrix on GPU***\n",N,N);
coFactor<<<numBlocks, threadsPerBlock>>>(pA,pC);
endtime();
starttime();
printf("***Cofactor of %d x %d Matrix on CPU***\n",N,N);
Matrix f = coFactorCPU(a);
endtime();
starttime();
printf("***Determinate of %d x %d Matrix on CPU***\n",N,N);
double determinate = getDeterminate(a);
endtime();
starttime();
printf("***Determinate of %d x %d Matrix on GPU***\n",N,N);
determinate_gpu<<<numBlocks, threadsPerBlock>>>(pE, d_det, N, N);
endtime();
hipMemcpy(&det, d_det, sizeof(double), hipMemcpyDeviceToHost);
hipMemcpy(C, pC, (N*N)*sizeof(double), hipMemcpyDeviceToHost);


hipFree(pA);
hipFree(pB);
hipFree(pC);
hipFree(d_det);


printf("\n");
return 0;
}

	.text
	.file	"main.hip"
	.globl	_Z11buildMatrixii               # -- Begin function _Z11buildMatrixii
	.type	_Z11buildMatrixii,@function
_Z11buildMatrixii:                      # @_Z11buildMatrixii
	.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
	movl	%esi, %ebx
	movl	%edi, %ebp
	movslq	%edi, %r15
	leaq	(,%r15,8), %rdi
	callq	malloc
	movq	%rax, %r14
	testl	%r15d, %r15d
	je	.LBB0_1
# %bb.2:                                # %.lr.ph
	movslq	%ebx, %r15
	movl	%ebp, %r12d
	xorl	%r13d, %r13d
.LBB0_3:                                # =>This Inner Loop Header: Depth=1
	movl	$8, %esi
	movq	%r15, %rdi
	callq	calloc
	movq	%rax, (%r14,%r13,8)
	incq	%r13
	cmpq	%r13, %r12
	jne	.LBB0_3
	jmp	.LBB0_4
.LBB0_1:
	xorl	%r12d, %r12d
.LBB0_4:                                # %._crit_edge
	shlq	$32, %rbx
	orq	%r12, %rbx
	movq	%rbx, %rax
	movq	%r14, %rdx
	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_end0:
	.size	_Z11buildMatrixii, .Lfunc_end0-_Z11buildMatrixii
	.cfi_endproc
                                        # -- End function
	.globl	_Z13displayMatrix6Matrix        # -- Begin function _Z13displayMatrix6Matrix
	.type	_Z13displayMatrix6Matrix,@function
_Z13displayMatrix6Matrix:               # @_Z13displayMatrix6Matrix
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$10, %edi
	callq	putchar@PLT
	testl	%r14d, %r14d
	jle	.LBB1_6
# %bb.1:                                # %.lr.ph11
	movq	%r14, %r15
	shrq	$32, %r15
	movl	%r14d, %r14d
	xorl	%r12d, %r12d
.LBB1_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_4 Depth 2
	movl	$.L.str.1, %edi
	xorl	%eax, %eax
	callq	printf
	testl	%r15d, %r15d
	jle	.LBB1_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB1_2 Depth=1
	xorl	%r13d, %r13d
.LBB1_4:                                #   Parent Loop BB1_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%r12,8), %rax
	movsd	(%rax,%r13,8), %xmm0            # xmm0 = mem[0],zero
	movl	$.L.str.2, %edi
	movb	$1, %al
	callq	printf
	incq	%r13
	cmpq	%r13, %r15
	jne	.LBB1_4
.LBB1_5:                                # %._crit_edge
                                        #   in Loop: Header=BB1_2 Depth=1
	movl	$.Lstr, %edi
	callq	puts@PLT
	incq	%r12
	cmpq	%r14, %r12
	jne	.LBB1_2
.LBB1_6:                                # %._crit_edge12
	movl	$10, %edi
	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
	jmp	putchar@PLT                     # TAILCALL
.Lfunc_end1:
	.size	_Z13displayMatrix6Matrix, .Lfunc_end1-_Z13displayMatrix6Matrix
	.cfi_endproc
                                        # -- End function
	.globl	_Z8setValueP6Matrixdii          # -- Begin function _Z8setValueP6Matrixdii
	.type	_Z8setValueP6Matrixdii,@function
_Z8setValueP6Matrixdii:                 # @_Z8setValueP6Matrixdii
	.cfi_startproc
# %bb.0:
	movq	8(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %rax
	movslq	%edx, %rcx
	movsd	%xmm0, (%rax,%rcx,8)
	retq
.Lfunc_end2:
	.size	_Z8setValueP6Matrixdii, .Lfunc_end2-_Z8setValueP6Matrixdii
	.cfi_endproc
                                        # -- End function
	.globl	_Z11multByValued6Matrix         # -- Begin function _Z11multByValued6Matrix
	.type	_Z11multByValued6Matrix,@function
_Z11multByValued6Matrix:                # @_Z11multByValued6Matrix
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	subq	$16, %rsp
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -16
	movq	%rsi, %rbx
	movsd	%xmm0, 8(%rsp)                  # 8-byte Spill
	movq	%rdi, %rsi
	shrq	$32, %rsi
                                        # kill: def $edi killed $edi killed $rdi
                                        # kill: def $esi killed $esi killed $rsi
	callq	_Z11buildMatrixii
	movsd	8(%rsp), %xmm1                  # 8-byte Reload
                                        # xmm1 = mem[0],zero
	testl	%eax, %eax
	jle	.LBB3_6
# %bb.1:                                # %.preheader.lr.ph
	movq	%rax, %rcx
	shrq	$32, %rcx
	movl	%eax, %esi
	xorl	%edi, %edi
.LBB3_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_4 Depth 2
	testl	%ecx, %ecx
	jle	.LBB3_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB3_2 Depth=1
	movq	(%rbx,%rdi,8), %r8
	movq	(%rdx,%rdi,8), %r9
	xorl	%r10d, %r10d
.LBB3_4:                                #   Parent Loop BB3_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r8,%r10,8), %xmm0             # xmm0 = mem[0],zero
	mulsd	%xmm1, %xmm0
	movsd	%xmm0, (%r9,%r10,8)
	incq	%r10
	cmpq	%r10, %rcx
	jne	.LBB3_4
.LBB3_5:                                # %._crit_edge
                                        #   in Loop: Header=BB3_2 Depth=1
	incq	%rdi
	cmpq	%rsi, %rdi
	jne	.LBB3_2
.LBB3_6:                                # %._crit_edge13
	addq	$16, %rsp
	.cfi_def_cfa_offset 16
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z11multByValued6Matrix, .Lfunc_end3-_Z11multByValued6Matrix
	.cfi_endproc
                                        # -- End function
	.globl	_Z12multByMatrix6MatrixS_       # -- Begin function _Z12multByMatrix6MatrixS_
	.type	_Z12multByMatrix6MatrixS_,@function
_Z12multByMatrix6MatrixS_:              # @_Z12multByMatrix6MatrixS_
	.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
	movq	%rcx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	%rdi, %r15
	shrq	$32, %r15
	movq	%rdx, %r12
	shrq	$32, %r12
	cmpl	%edx, %r15d
	jne	.LBB4_2
# %bb.1:
	movl	%r13d, %edi
	movl	%r12d, %esi
	jmp	.LBB4_5
.LBB4_2:
	cmpq	%r12, %r15
	jne	.LBB4_4
# %bb.3:
	movl	%edx, %edi
	movl	%r13d, %esi
	jmp	.LBB4_5
.LBB4_4:
	movl	%r13d, %edi
	movl	%r15d, %esi
.LBB4_5:
	callq	_Z11buildMatrixii
	testl	%r13d, %r13d
	jle	.LBB4_14
# %bb.6:                                # %.preheader32.lr.ph
	movl	%r13d, %ecx
	xorl	%esi, %esi
.LBB4_7:                                # %.preheader32
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB4_9 Depth 2
                                        #       Child Loop BB4_11 Depth 3
	testl	%r12d, %r12d
	jle	.LBB4_13
# %bb.8:                                # %.preheader.lr.ph
                                        #   in Loop: Header=BB4_7 Depth=1
	xorl	%edi, %edi
.LBB4_9:                                # %.preheader
                                        #   Parent Loop BB4_7 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB4_11 Depth 3
	testl	%r15d, %r15d
	jle	.LBB4_12
# %bb.10:                               # %.lr.ph
                                        #   in Loop: Header=BB4_9 Depth=2
	movq	(%r14,%rsi,8), %r8
	movq	(%rdx,%rsi,8), %r9
	movsd	(%r9,%rdi,8), %xmm0             # xmm0 = mem[0],zero
	xorl	%r10d, %r10d
.LBB4_11:                               #   Parent Loop BB4_7 Depth=1
                                        #     Parent Loop BB4_9 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%r8,%r10,8), %xmm1             # xmm1 = mem[0],zero
	movq	(%rbx,%r10,8), %r11
	mulsd	(%r11,%rdi,8), %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, (%r9,%rdi,8)
	incq	%r10
	cmpq	%r10, %r15
	jne	.LBB4_11
.LBB4_12:                               # %._crit_edge
                                        #   in Loop: Header=BB4_9 Depth=2
	incq	%rdi
	cmpq	%r12, %rdi
	jne	.LBB4_9
.LBB4_13:                               # %._crit_edge35
                                        #   in Loop: Header=BB4_7 Depth=1
	incq	%rsi
	cmpq	%rcx, %rsi
	jne	.LBB4_7
.LBB4_14:                               # %._crit_edge37
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z12multByMatrix6MatrixS_, .Lfunc_end4-_Z12multByMatrix6MatrixS_
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z14getDeterminate6Matrix
.LCPI5_0:
	.quad	0x3ff0000000000000              # double 1
	.text
	.globl	_Z14getDeterminate6Matrix
	.type	_Z14getDeterminate6Matrix,@function
_Z14getDeterminate6Matrix:              # @_Z14getDeterminate6Matrix
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rdi, %r15
	shrq	$32, %r15
	movl	%r15d, %esi
	callq	_Z11buildMatrixii
	testl	%ebx, %ebx
	jle	.LBB5_6
# %bb.1:                                # %.preheader63.lr.ph
	movl	%ebx, %eax
	xorl	%ecx, %ecx
.LBB5_2:                                # %.preheader63
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_4 Depth 2
	testl	%r15d, %r15d
	jle	.LBB5_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB5_2 Depth=1
	movq	(%r14,%rcx,8), %rsi
	movq	(%rdx,%rcx,8), %rdi
	xorl	%r8d, %r8d
.LBB5_4:                                #   Parent Loop BB5_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%rsi,%r8,8), %xmm0             # xmm0 = mem[0],zero
	movsd	%xmm0, (%rdi,%r8,8)
	incq	%r8
	cmpq	%r8, %r15
	jne	.LBB5_4
.LBB5_5:                                # %._crit_edge
                                        #   in Loop: Header=BB5_2 Depth=1
	incq	%rcx
	cmpq	%rax, %rcx
	jne	.LBB5_2
.LBB5_6:                                # %._crit_edge66
	xorpd	%xmm0, %xmm0
	cmpl	%r15d, %ebx
	jne	.LBB5_19
# %bb.7:
	cmpl	$2, %ebx
	jne	.LBB5_8
# %bb.20:
	movq	(%rdx), %rax
	movq	8(%rdx), %rcx
	movsd	(%rax), %xmm0                   # xmm0 = mem[0],zero
	mulsd	8(%rcx), %xmm0
	movsd	8(%rax), %xmm1                  # xmm1 = mem[0],zero
	mulsd	(%rcx), %xmm1
	subsd	%xmm1, %xmm0
	jmp	.LBB5_19
.LBB5_8:                                # %.preheader62
	movsd	.LCPI5_0(%rip), %xmm0           # xmm0 = mem[0],zero
	testl	%ebx, %ebx
	jle	.LBB5_19
# %bb.9:                                # %.preheader61.lr.ph
	movl	%ebx, %eax
	xorl	%ecx, %ecx
.LBB5_10:                               # %.lr.ph71
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_11 Depth 2
                                        #       Child Loop BB5_13 Depth 3
	xorl	%esi, %esi
.LBB5_11:                               #   Parent Loop BB5_10 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB5_13 Depth 3
	cmpq	%rcx, %rsi
	jbe	.LBB5_14
# %bb.12:                               # %.lr.ph69.preheader
                                        #   in Loop: Header=BB5_11 Depth=2
	movq	(%rdx,%rsi,8), %rdi
	movsd	(%rdi,%rcx,8), %xmm1            # xmm1 = mem[0],zero
	movq	(%rdx,%rcx,8), %r8
	divsd	(%r8,%rcx,8), %xmm1
	xorl	%r9d, %r9d
.LBB5_13:                               # %.lr.ph69
                                        #   Parent Loop BB5_10 Depth=1
                                        #     Parent Loop BB5_11 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movsd	(%r8,%r9,8), %xmm2              # xmm2 = mem[0],zero
	mulsd	%xmm1, %xmm2
	movsd	(%rdi,%r9,8), %xmm3             # xmm3 = mem[0],zero
	subsd	%xmm2, %xmm3
	movsd	%xmm3, (%rdi,%r9,8)
	incq	%r9
	cmpq	%r9, %rax
	jne	.LBB5_13
.LBB5_14:                               # %.loopexit60
                                        #   in Loop: Header=BB5_11 Depth=2
	incq	%rsi
	cmpq	%rax, %rsi
	jne	.LBB5_11
# %bb.15:                               # %._crit_edge72
                                        #   in Loop: Header=BB5_10 Depth=1
	incq	%rcx
	cmpq	%rax, %rcx
	jne	.LBB5_10
# %bb.16:                               # %.preheader
	testl	%ebx, %ebx
	jle	.LBB5_19
# %bb.17:                               # %.lr.ph76.preheader
	movl	%ebx, %eax
	movsd	.LCPI5_0(%rip), %xmm0           # xmm0 = mem[0],zero
	xorl	%ecx, %ecx
.LBB5_18:                               # %.lr.ph76
                                        # =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rcx,8), %rsi
	mulsd	(%rsi,%rcx,8), %xmm0
	incq	%rcx
	cmpq	%rcx, %rax
	jne	.LBB5_18
.LBB5_19:                               # %.loopexit
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z14getDeterminate6Matrix, .Lfunc_end5-_Z14getDeterminate6Matrix
	.cfi_endproc
                                        # -- End function
	.globl	_Z9transpose6Matrix             # -- Begin function _Z9transpose6Matrix
	.type	_Z9transpose6Matrix,@function
_Z9transpose6Matrix:                    # @_Z9transpose6Matrix
	.cfi_startproc
# %bb.0:
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset %rbx, -16
	movq	%rsi, %rbx
	movq	%rdi, %rsi
	shrq	$32, %rdi
                                        # kill: def $edi killed $edi killed $rdi
                                        # kill: def $esi killed $esi killed $rsi
	callq	_Z11buildMatrixii
	movq	%rax, %rcx
	shrq	$32, %rcx
	testl	%ecx, %ecx
	jle	.LBB6_6
# %bb.1:                                # %.preheader.lr.ph
	movl	%eax, %esi
	xorl	%edi, %edi
.LBB6_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_4 Depth 2
	testl	%eax, %eax
	jle	.LBB6_5
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB6_2 Depth=1
	movq	(%rbx,%rdi,8), %r8
	xorl	%r9d, %r9d
.LBB6_4:                                #   Parent Loop BB6_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movsd	(%r8,%r9,8), %xmm0              # xmm0 = mem[0],zero
	movq	(%rdx,%r9,8), %r10
	movsd	%xmm0, (%r10,%rdi,8)
	incq	%r9
	cmpq	%r9, %rsi
	jne	.LBB6_4
.LBB6_5:                                # %._crit_edge
                                        #   in Loop: Header=BB6_2 Depth=1
	incq	%rdi
	cmpq	%rcx, %rdi
	jne	.LBB6_2
.LBB6_6:                                # %._crit_edge25
	popq	%rbx
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z9transpose6Matrix, .Lfunc_end6-_Z9transpose6Matrix
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z11coFactorCPU6Matrix
.LCPI7_0:
	.quad	0x8000000000000000              # double -0
	.quad	0x8000000000000000              # double -0
	.text
	.globl	_Z11coFactorCPU6Matrix
	.type	_Z11coFactorCPU6Matrix,@function
_Z11coFactorCPU6Matrix:                 # @_Z11coFactorCPU6Matrix
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rdi, %r14
	shrq	$32, %r14
	movl	%r14d, %esi
	callq	_Z11buildMatrixii
	testl	%r15d, %r15d
	jle	.LBB7_8
# %bb.1:                                # %.preheader.lr.ph
	movl	%r15d, %ecx
	xorl	%esi, %esi
	movaps	.LCPI7_0(%rip), %xmm0           # xmm0 = [-0.0E+0,-0.0E+0]
.LBB7_2:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_4 Depth 2
	testl	%r14d, %r14d
	jle	.LBB7_7
# %bb.3:                                # %.lr.ph
                                        #   in Loop: Header=BB7_2 Depth=1
	movq	(%rbx,%rsi,8), %rdi
	movq	(%rdx,%rsi,8), %r8
	xorl	%r9d, %r9d
.LBB7_4:                                #   Parent Loop BB7_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	leal	(%rsi,%r9), %r10d
	movsd	(%rdi,%r9,8), %xmm1             # xmm1 = mem[0],zero
	testb	$1, %r10b
	je	.LBB7_6
# %bb.5:                                #   in Loop: Header=BB7_4 Depth=2
	xorps	%xmm0, %xmm1
.LBB7_6:                                #   in Loop: Header=BB7_4 Depth=2
	movsd	%xmm1, (%r8,%r9,8)
	incq	%r9
	cmpq	%r9, %r14
	jne	.LBB7_4
.LBB7_7:                                # %._crit_edge
                                        #   in Loop: Header=BB7_2 Depth=1
	incq	%rsi
	cmpq	%rcx, %rsi
	jne	.LBB7_2
.LBB7_8:                                # %._crit_edge22
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z11coFactorCPU6Matrix, .Lfunc_end7-_Z11coFactorCPU6Matrix
	.cfi_endproc
                                        # -- End function
	.globl	_Z9starttimev                   # -- Begin function _Z9starttimev
	.type	_Z9starttimev,@function
_Z9starttimev:                          # @_Z9starttimev
	.cfi_startproc
# %bb.0:
	movl	$start, %edi
	xorl	%esi, %esi
	jmp	gettimeofday                    # TAILCALL
.Lfunc_end8:
	.size	_Z9starttimev, .Lfunc_end8-_Z9starttimev
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z7endtimev
.LCPI9_0:
	.quad	0x408f400000000000              # double 1000
	.text
	.globl	_Z7endtimev
	.type	_Z7endtimev,@function
_Z7endtimev:                            # @_Z7endtimev
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movl	$end, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	end(%rip), %rax
	subq	start(%rip), %rax
	cvtsi2sd	%rax, %xmm1
	movsd	.LCPI9_0(%rip), %xmm2           # xmm2 = mem[0],zero
	movq	end+8(%rip), %rax
	subq	start+8(%rip), %rax
	mulsd	%xmm2, %xmm1
	cvtsi2sd	%rax, %xmm0
	divsd	%xmm2, %xmm0
	addsd	%xmm1, %xmm0
	movl	$.L.str.4, %edi
	movb	$1, %al
	popq	%rcx
	.cfi_def_cfa_offset 8
	jmp	printf                          # TAILCALL
.Lfunc_end9:
	.size	_Z7endtimev, .Lfunc_end9-_Z7endtimev
	.cfi_endproc
                                        # -- End function
	.globl	_Z21__device_stub__MatAddPA500_iS0_S0_ # -- Begin function _Z21__device_stub__MatAddPA500_iS0_S0_
	.type	_Z21__device_stub__MatAddPA500_iS0_S0_,@function
_Z21__device_stub__MatAddPA500_iS0_S0_: # @_Z21__device_stub__MatAddPA500_iS0_S0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rsi, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	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	$_Z6MatAddPA500_iS0_S0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end10:
	.size	_Z21__device_stub__MatAddPA500_iS0_S0_, .Lfunc_end10-_Z21__device_stub__MatAddPA500_iS0_S0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z22__device_stub__MatMultPA500_dS0_S0_i # -- Begin function _Z22__device_stub__MatMultPA500_dS0_S0_i
	.type	_Z22__device_stub__MatMultPA500_dS0_S0_i,@function
_Z22__device_stub__MatMultPA500_dS0_S0_i: # @_Z22__device_stub__MatMultPA500_dS0_S0_i
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	4(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	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	$_Z7MatMultPA500_dS0_S0_i, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_Z22__device_stub__MatMultPA500_dS0_S0_i, .Lfunc_end11-_Z22__device_stub__MatMultPA500_dS0_S0_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__MatTransPA500_dS0_ # -- Begin function _Z23__device_stub__MatTransPA500_dS0_
	.type	_Z23__device_stub__MatTransPA500_dS0_,@function
_Z23__device_stub__MatTransPA500_dS0_:  # @_Z23__device_stub__MatTransPA500_dS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8MatTransPA500_dS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	_Z23__device_stub__MatTransPA500_dS0_, .Lfunc_end12-_Z23__device_stub__MatTransPA500_dS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z29__device_stub__multMatByValuedPA500_dS0_ # -- Begin function _Z29__device_stub__multMatByValuedPA500_dS0_
	.type	_Z29__device_stub__multMatByValuedPA500_dS0_,@function
_Z29__device_stub__multMatByValuedPA500_dS0_: # @_Z29__device_stub__multMatByValuedPA500_dS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movsd	%xmm0, (%rax)
	leaq	32(%rsp), %rcx
	movq	%rdi, (%rcx)
	leaq	24(%rsp), %rdx
	movq	%rsi, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rdx, 16(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z14multMatByValuedPA500_dS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end13:
	.size	_Z29__device_stub__multMatByValuedPA500_dS0_, .Lfunc_end13-_Z29__device_stub__multMatByValuedPA500_dS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z23__device_stub__coFactorPA500_dS0_ # -- Begin function _Z23__device_stub__coFactorPA500_dS0_
	.type	_Z23__device_stub__coFactorPA500_dS0_,@function
_Z23__device_stub__coFactorPA500_dS0_:  # @_Z23__device_stub__coFactorPA500_dS0_
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$80, %rsp
	.cfi_def_cfa_offset 128
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	24(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	16(%rsp), %rcx
	movq	%rsi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%rsp), %r15
	leaq	8(%rsp), %r12
	movq	%rsp, %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z8coFactorPA500_dS0_, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$96, %rsp
	.cfi_adjust_cfa_offset -96
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end14:
	.size	_Z23__device_stub__coFactorPA500_dS0_, .Lfunc_end14-_Z23__device_stub__coFactorPA500_dS0_
	.cfi_endproc
                                        # -- End function
	.globl	_Z26__device_stub__determinatePA500_dPdii # -- Begin function _Z26__device_stub__determinatePA500_dPdii
	.type	_Z26__device_stub__determinatePA500_dPdii,@function
_Z26__device_stub__determinatePA500_dPdii: # @_Z26__device_stub__determinatePA500_dPdii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	8(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z11determinatePA500_dPdii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end15:
	.size	_Z26__device_stub__determinatePA500_dPdii, .Lfunc_end15-_Z26__device_stub__determinatePA500_dPdii
	.cfi_endproc
                                        # -- End function
	.globl	_Z30__device_stub__determinate_gpuPA500_dPdii # -- Begin function _Z30__device_stub__determinate_gpuPA500_dPdii
	.type	_Z30__device_stub__determinate_gpuPA500_dPdii,@function
_Z30__device_stub__determinate_gpuPA500_dPdii: # @_Z30__device_stub__determinate_gpuPA500_dPdii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$112, %rsp
	.cfi_def_cfa_offset 160
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	12(%rsp), %rsi
	movl	%edx, (%rsi)
	leaq	8(%rsp), %rdx
	movl	%ecx, (%rdx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	24(%rsp), %r12
	leaq	16(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z15determinate_gpuPA500_dPdii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$128, %rsp
	.cfi_adjust_cfa_offset -128
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end16:
	.size	_Z30__device_stub__determinate_gpuPA500_dPdii, .Lfunc_end16-_Z30__device_stub__determinate_gpuPA500_dPdii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI17_0:
	.quad	0x4014000000000000              # double 5
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$8000072, %rsp                  # imm = 0x7A1248
	.cfi_def_cfa_offset 8000128
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	$500, %edi                      # imm = 0x1F4
	movl	$500, %esi                      # imm = 0x1F4
	callq	_Z11buildMatrixii
	movq	%rax, %rbx
	movq	%rdx, %r14
	movl	$500, %edi                      # imm = 0x1F4
	movl	$500, %esi                      # imm = 0x1F4
	callq	_Z11buildMatrixii
	movq	%rax, 32(%rsp)                  # 8-byte Spill
	movq	%rdx, %rbp
	leaq	2000064(%rsp), %rcx
	xorl	%edx, %edx
	movabsq	$4607182418800017408, %rax      # imm = 0x3FF0000000000000
.LBB17_1:                               # %.preheader106
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_2 Depth 2
	xorl	%esi, %esi
.LBB17_2:                               #   Parent Loop BB17_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%rax, (%rcx,%rsi,8)
	incq	%rsi
	cmpq	$500, %rsi                      # imm = 0x1F4
	jne	.LBB17_2
# %bb.3:                                #   in Loop: Header=BB17_1 Depth=1
	incq	%rdx
	addq	$4000, %rcx                     # imm = 0xFA0
	cmpq	$500, %rdx                      # imm = 0x1F4
	jne	.LBB17_1
# %bb.4:                                # %.preheader.preheader
	movq	%rbx, 40(%rsp)                  # 8-byte Spill
	leaq	64(%rsp), %rcx
	leaq	4000064(%rsp), %rdx
	xorl	%esi, %esi
	movl	$4000, %edi                     # imm = 0xFA0
.LBB17_5:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB17_6 Depth 2
	movq	(%r14,%rsi,8), %r8
	movq	(%rbp,%rsi,8), %r9
	xorl	%r10d, %r10d
.LBB17_6:                               #   Parent Loop BB17_5 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	$0, (%rcx,%r10,8)
	movq	%rax, (%rdx,%r10,8)
	movq	%rax, (%r8,%r10,8)
	movq	%rax, (%r9,%r10,8)
	incq	%r10
	cmpq	$500, %r10                      # imm = 0x1F4
	jne	.LBB17_6
# %bb.7:                                #   in Loop: Header=BB17_5 Depth=1
	incq	%rsi
	addq	%rdi, %rcx
	addq	%rdi, %rdx
	cmpq	$500, %rsi                      # imm = 0x1F4
	jne	.LBB17_5
# %bb.8:
	leaq	24(%rsp), %rcx
	movq	%rax, (%rcx)
	leaq	8(%rsp), %r13
	movl	$2000000, %esi                  # imm = 0x1E8480
	movq	%r13, %rdi
	callq	hipMalloc
	leaq	56(%rsp), %r15
	movl	$2000000, %esi                  # imm = 0x1E8480
	movq	%r15, %rdi
	callq	hipMalloc
	movq	%rsp, %rbx
	movl	$2000000, %esi                  # imm = 0x1E8480
	movq	%rbx, %rdi
	callq	hipMalloc
	leaq	48(%rsp), %r12
	movl	$2000000, %esi                  # imm = 0x1E8480
	movq	%r12, %rdi
	callq	hipMalloc
	leaq	16(%rsp), %rdi
	movl	$8, %esi
	callq	hipMalloc
	movq	(%r13), %rdi
	leaq	4000064(%rsp), %rsi
	movl	$2000000, %edx                  # imm = 0x1E8480
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r15), %rdi
	movabsq	$2147483648500, %r15            # imm = 0x1F4000001F4
	leaq	6000064(%rsp), %rsi
	movl	$2000000, %edx                  # imm = 0x1E8480
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%rbx), %rdi
	leaq	64(%rsp), %rsi
	movl	$2000000, %edx                  # imm = 0x1E8480
	movl	$1, %ecx
	callq	hipMemcpy
	movq	(%r12), %rdi
	movabsq	$4294967297, %r12               # imm = 0x100000001
	leaq	2000064(%rsp), %rsi
	movl	$2000000, %edx                  # imm = 0x1E8480
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	16(%rsp), %rax
	movq	(%rax), %rdi
	movl	$8, %edx
	leaq	24(%rsp), %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.5, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	40(%rsp), %rbx                  # 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z9transpose6Matrix
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.6, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_10
# %bb.9:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
	callq	_Z23__device_stub__MatTransPA500_dS0_
.LBB17_10:
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.7, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	32(%rsp), %rdx                  # 8-byte Reload
	movq	%rbp, %rcx
	callq	_Z12multByMatrix6MatrixS_
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.8, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_12
# %bb.11:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rdx
	movq	%rdi, %rsi
	movl	$500, %ecx                      # imm = 0x1F4
	callq	_Z22__device_stub__MatMultPA500_dS0_S0_i
.LBB17_12:
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.9, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	movl	$5, %ecx
	xorl	%eax, %eax
	callq	printf
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_14
# %bb.13:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
	movsd	.LCPI17_0(%rip), %xmm0          # xmm0 = mem[0],zero
	callq	_Z29__device_stub__multMatByValuedPA500_dS0_
.LBB17_14:
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.10, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	movl	$5, %ecx
	xorl	%eax, %eax
	callq	printf
	movsd	.LCPI17_0(%rip), %xmm0          # xmm0 = mem[0],zero
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z11multByValued6Matrix
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.11, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_16
# %bb.15:
	movq	8(%rsp), %rdi
	movq	(%rsp), %rsi
	callq	_Z23__device_stub__coFactorPA500_dS0_
.LBB17_16:
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.12, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z11coFactorCPU6Matrix
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.13, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_Z14getDeterminate6Matrix
	callq	_Z7endtimev
	movl	$start, %edi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$.L.str.14, %edi
	movl	$500, %esi                      # imm = 0x1F4
	movl	$500, %edx                      # imm = 0x1F4
	xorl	%eax, %eax
	callq	printf
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB17_18
# %bb.17:
	movq	48(%rsp), %rdi
	movq	16(%rsp), %rsi
	movl	$500, %edx                      # imm = 0x1F4
	movl	$500, %ecx                      # imm = 0x1F4
	callq	_Z30__device_stub__determinate_gpuPA500_dPdii
.LBB17_18:
	callq	_Z7endtimev
	movq	16(%rsp), %rsi
	leaq	24(%rsp), %rdi
	movl	$8, %edx
	movl	$2, %ecx
	callq	hipMemcpy
	movq	(%rsp), %rsi
	leaq	64(%rsp), %rdi
	movl	$2000000, %edx                  # imm = 0x1E8480
	movl	$2, %ecx
	callq	hipMemcpy
	movq	8(%rsp), %rdi
	callq	hipFree
	movq	56(%rsp), %rdi
	callq	hipFree
	movq	(%rsp), %rdi
	callq	hipFree
	movq	16(%rsp), %rdi
	callq	hipFree
	movl	$10, %edi
	callq	putchar@PLT
	xorl	%eax, %eax
	addq	$8000072, %rsp                  # imm = 0x7A1248
	.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_end17:
	.size	main, .Lfunc_end17-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	.LBB18_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB18_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z6MatAddPA500_iS0_S0_, %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	$_Z7MatMultPA500_dS0_S0_i, %esi
	movl	$.L__unnamed_2, %edx
	movl	$.L__unnamed_2, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8MatTransPA500_dS0_, %esi
	movl	$.L__unnamed_3, %edx
	movl	$.L__unnamed_3, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z14multMatByValuedPA500_dS0_, %esi
	movl	$.L__unnamed_4, %edx
	movl	$.L__unnamed_4, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z8coFactorPA500_dS0_, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z11determinatePA500_dPdii, %esi
	movl	$.L__unnamed_6, %edx
	movl	$.L__unnamed_6, %ecx
	movq	%rbx, %rdi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z15determinate_gpuPA500_dPdii, %esi
	movl	$.L__unnamed_7, %edx
	movl	$.L__unnamed_7, %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_end18:
	.size	__hip_module_ctor, .Lfunc_end18-__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	.LBB19_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
.LBB19_2:
	retq
.Lfunc_end19:
	.size	__hip_module_dtor, .Lfunc_end19-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	start,@object                   # @start
	.bss
	.globl	start
	.p2align	3, 0x0
start:
	.zero	16
	.size	start, 16

	.type	end,@object                     # @end
	.globl	end
	.p2align	3, 0x0
end:
	.zero	16
	.size	end, 16

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"%8.5f "
	.size	.L.str.2, 7

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

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

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

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

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

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

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

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

	.type	.L.str.5,@object                # @.str.5
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str.5:
	.asciz	"***Transpose on %d x %d Matrix on CPU***\n"
	.size	.L.str.5, 42

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"***Transpose on %d x %d Matrix on GPU***\n"
	.size	.L.str.6, 42

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"***Multiplication on %d x %d Matrix on CPU***\n"
	.size	.L.str.7, 47

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"***Multiplication on %d x %d Matrix on GPU***\n"
	.size	.L.str.8, 47

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"***Multiplication by single value on %d x %d Matrix with %d on GPU***\n"
	.size	.L.str.9, 71

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"***Multiplication by single value on %d x %d Matrix with %d on CPU***\n"
	.size	.L.str.10, 71

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"***Cofactor of %d x %d Matrix on GPU***\n"
	.size	.L.str.11, 41

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"***Cofactor of %d x %d Matrix on CPU***\n"
	.size	.L.str.12, 41

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"***Determinate of %d x %d Matrix on CPU***\n"
	.size	.L.str.13, 44

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"***Determinate of %d x %d Matrix on GPU***\n"
	.size	.L.str.14, 44

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

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z7MatMultPA500_dS0_S0_i"
	.size	.L__unnamed_2, 25

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z8MatTransPA500_dS0_"
	.size	.L__unnamed_3, 22

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z14multMatByValuedPA500_dS0_"
	.size	.L__unnamed_4, 30

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z8coFactorPA500_dS0_"
	.size	.L__unnamed_5, 22

	.type	.L__unnamed_6,@object           # @5
.L__unnamed_6:
	.asciz	"_Z11determinatePA500_dPdii"
	.size	.L__unnamed_6, 27

	.type	.L__unnamed_7,@object           # @6
.L__unnamed_7:
	.asciz	"_Z15determinate_gpuPA500_dPdii"
	.size	.L__unnamed_7, 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

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"|"
	.size	.Lstr, 2

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym _Z21__device_stub__MatAddPA500_iS0_S0_
	.addrsig_sym _Z22__device_stub__MatMultPA500_dS0_S0_i
	.addrsig_sym _Z23__device_stub__MatTransPA500_dS0_
	.addrsig_sym _Z29__device_stub__multMatByValuedPA500_dS0_
	.addrsig_sym _Z23__device_stub__coFactorPA500_dS0_
	.addrsig_sym _Z26__device_stub__determinatePA500_dPdii
	.addrsig_sym _Z30__device_stub__determinate_gpuPA500_dPdii
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym start
	.addrsig_sym end
	.addrsig_sym _Z6MatAddPA500_iS0_S0_
	.addrsig_sym _Z7MatMultPA500_dS0_S0_i
	.addrsig_sym _Z8MatTransPA500_dS0_
	.addrsig_sym _Z14multMatByValuedPA500_dS0_
	.addrsig_sym _Z8coFactorPA500_dS0_
	.addrsig_sym _Z11determinatePA500_dPdii
	.addrsig_sym _Z15determinate_gpuPA500_dPdii
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z6MatAddPA500_iS0_S0_  ; -- Begin function _Z6MatAddPA500_iS0_S0_
	.globl	_Z6MatAddPA500_iS0_S0_
	.p2align	8
	.type	_Z6MatAddPA500_iS0_S0_,@function
_Z6MatAddPA500_iS0_S0_:                 ; @_Z6MatAddPA500_iS0_S0_
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x0
	v_and_b32_e32 v1, 0x3ff, v0
	v_lshrrev_b32_e32 v0, 8, v0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_mul_u32_u24_e32 v4, 0x7d0, v1
	v_mul_hi_u32_u24_e32 v5, 0x7d0, v1
	v_and_b32_e32 v6, 0xffc, v0
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, s4, v4
	v_add_co_ci_u32_e32 v1, vcc_lo, s5, v5, vcc_lo
	v_add_co_u32 v2, vcc_lo, s6, v4
	v_add_co_ci_u32_e32 v3, vcc_lo, s7, v5, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v0, vcc_lo, v0, v6
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_4) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v2, vcc_lo, v2, v6
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	global_load_b32 v0, v[0:1], off
	global_load_b32 v1, v[2:3], off
	v_add_co_u32 v2, vcc_lo, s0, v4
	v_add_co_ci_u32_e32 v3, vcc_lo, s1, v5, vcc_lo
	s_waitcnt vmcnt(0)
	v_add_nc_u32_e32 v4, v1, v0
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, v2, v6
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v3, vcc_lo
	global_store_b32 v[0:1], v4, off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z6MatAddPA500_iS0_S0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 24
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 7
		.amdhsa_next_free_sgpr 8
		.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	_Z6MatAddPA500_iS0_S0_, .Lfunc_end0-_Z6MatAddPA500_iS0_S0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 192
; NumSgprs: 10
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 10
; NumVGPRsForWavesPerEU: 7
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z7MatMultPA500_dS0_S0_i ; -- Begin function _Z7MatMultPA500_dS0_S0_i
	.globl	_Z7MatMultPA500_dS0_S0_i
	.p2align	8
	.type	_Z7MatMultPA500_dS0_S0_i,@function
_Z7MatMultPA500_dS0_S0_i:               ; @_Z7MatMultPA500_dS0_S0_i
; %bb.0:
	s_clause 0x2
	s_load_b32 s2, s[0:1], 0x18
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	v_bfe_u32 v1, v0, 10, 10
	v_and_b32_e32 v6, 0x3ff, v0
	s_delay_alu instid0(VALU_DEP_2)
	v_lshlrev_b32_e32 v7, 3, v1
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s2, 1
	s_cbranch_scc1 .LBB1_3
; %bb.1:                                ; %.lr.ph.preheader
	v_mad_u64_u32 v[2:3], null, 0xfa0, v6, s[4:5]
	v_add_co_u32 v4, s3, s6, v7
	v_mov_b32_e32 v0, 0
	v_mov_b32_e32 v1, 0
	v_add_co_ci_u32_e64 v5, null, s7, 0, s3
.LBB1_2:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b64 v[8:9], v[2:3], off
	global_load_b64 v[10:11], v[4:5], off
	v_add_co_u32 v2, vcc_lo, v2, 8
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	v_add_co_u32 v4, vcc_lo, 0xfa0, v4
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	s_add_i32 s2, s2, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s2, 0
	s_waitcnt vmcnt(0)
	v_fma_f64 v[0:1], v[8:9], v[10:11], v[0:1]
	s_cbranch_scc1 .LBB1_2
	s_branch .LBB1_4
.LBB1_3:
	v_mov_b32_e32 v0, 0
	v_mov_b32_e32 v1, 0
.LBB1_4:                                ; %._crit_edge
	v_mad_u64_u32 v[2:3], null, 0xfa0, v6, s[0:1]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, v2, v7
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	global_store_b64 v[2:3], v[0:1], off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z7MatMultPA500_dS0_S0_i
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 28
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 12
		.amdhsa_next_free_sgpr 8
		.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	_Z7MatMultPA500_dS0_S0_i, .Lfunc_end1-_Z7MatMultPA500_dS0_S0_i
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 232
; NumSgprs: 10
; NumVgprs: 12
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 10
; NumVGPRsForWavesPerEU: 12
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z8MatTransPA500_dS0_   ; -- Begin function _Z8MatTransPA500_dS0_
	.globl	_Z8MatTransPA500_dS0_
	.p2align	8
	.type	_Z8MatTransPA500_dS0_,@function
_Z8MatTransPA500_dS0_:                  ; @_Z8MatTransPA500_dS0_
; %bb.0:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_and_b32_e32 v4, 0x3ff, v0
	v_bfe_u32 v5, v0, 10, 10
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_3)
	v_lshlrev_b32_e32 v2, 3, v5
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[0:1], null, 0xfa0, v4, s[0:1]
	v_lshlrev_b32_e32 v4, 3, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, v0, v2
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
	v_mad_u64_u32 v[2:3], null, 0xfa0, v5, s[2:3]
	global_load_b64 v[0:1], v[0:1], off
	v_add_co_u32 v2, vcc_lo, v2, v4
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_waitcnt vmcnt(0)
	global_store_b64 v[2:3], v[0:1], off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8MatTransPA500_dS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 16
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 6
		.amdhsa_next_free_sgpr 4
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end2:
	.size	_Z8MatTransPA500_dS0_, .Lfunc_end2-_Z8MatTransPA500_dS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 124
; NumSgprs: 6
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 6
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z14multMatByValuedPA500_dS0_ ; -- Begin function _Z14multMatByValuedPA500_dS0_
	.globl	_Z14multMatByValuedPA500_dS0_
	.p2align	8
	.type	_Z14multMatByValuedPA500_dS0_,@function
_Z14multMatByValuedPA500_dS0_:          ; @_Z14multMatByValuedPA500_dS0_
; %bb.0:
	s_load_b128 s[4:7], s[0:1], 0x0
	v_and_b32_e32 v4, 0x3ff, v0
	v_lshrrev_b32_e32 v2, 7, v0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_and_b32_e32 v5, 0x1ff8, v2
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[0:1], null, 0xfa0, v4, s[6:7]
	v_mad_u64_u32 v[2:3], null, 0xfa0, v4, s[0:1]
	v_add_co_u32 v0, vcc_lo, v0, v5
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
	v_add_co_u32 v2, vcc_lo, v2, v5
	s_delay_alu instid0(VALU_DEP_4)
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	global_load_b64 v[0:1], v[0:1], off
	s_waitcnt vmcnt(0)
	v_mul_f64 v[0:1], v[0:1], s[4:5]
	global_store_b64 v[2:3], v[0:1], off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z14multMatByValuedPA500_dS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 24
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 6
		.amdhsa_next_free_sgpr 8
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end3:
	.size	_Z14multMatByValuedPA500_dS0_, .Lfunc_end3-_Z14multMatByValuedPA500_dS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 140
; NumSgprs: 10
; NumVgprs: 6
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 10
; NumVGPRsForWavesPerEU: 6
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z8coFactorPA500_dS0_   ; -- Begin function _Z8coFactorPA500_dS0_
	.globl	_Z8coFactorPA500_dS0_
	.p2align	8
	.type	_Z8coFactorPA500_dS0_,@function
_Z8coFactorPA500_dS0_:                  ; @_Z8coFactorPA500_dS0_
; %bb.0:
	s_load_b128 s[0:3], s[0:1], 0x0
	v_and_b32_e32 v5, 0x3ff, v0
	v_lshrrev_b32_e32 v3, 7, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_and_b32_e32 v6, 0x1ff8, v3
	v_lshrrev_b32_e32 v3, 10, v0
	v_add_nc_u32_e32 v0, v3, v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_3) | instid1(VALU_DEP_2)
	v_and_b32_e32 v0, 1, v0
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[1:2], null, 0xfa0, v5, s[0:1]
	v_mad_u64_u32 v[3:4], null, 0xfa0, v5, s[2:3]
	v_add_co_u32 v1, vcc_lo, v1, v6
	s_delay_alu instid0(VALU_DEP_3)
	v_add_co_ci_u32_e32 v2, vcc_lo, 0, v2, vcc_lo
	v_cmp_eq_u32_e32 vcc_lo, 0, v0
	global_load_b64 v[1:2], v[1:2], off
	s_waitcnt vmcnt(0)
	v_cndmask_b32_e32 v1, v1, v1, vcc_lo
	v_xor_b32_e32 v5, 0x80000000, v2
	s_delay_alu instid0(VALU_DEP_1)
	v_cndmask_b32_e32 v2, v5, v2, vcc_lo
	v_add_co_u32 v3, vcc_lo, v3, v6
	v_add_co_ci_u32_e32 v4, vcc_lo, 0, v4, vcc_lo
	global_store_b64 v[3:4], v[1:2], off
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z8coFactorPA500_dS0_
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 16
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 7
		.amdhsa_next_free_sgpr 4
		.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_end4:
	.size	_Z8coFactorPA500_dS0_, .Lfunc_end4-_Z8coFactorPA500_dS0_
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 160
; NumSgprs: 6
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 6
; NumVGPRsForWavesPerEU: 7
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z11determinatePA500_dPdii ; -- Begin function _Z11determinatePA500_dPdii
	.globl	_Z11determinatePA500_dPdii
	.p2align	8
	.type	_Z11determinatePA500_dPdii,@function
_Z11determinatePA500_dPdii:             ; @_Z11determinatePA500_dPdii
; %bb.0:
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b32 s0, s[0:1], 0x10
	v_and_b32_e32 v6, 0x3ff, v0
	v_bfe_u32 v2, v0, 10, 10
	s_mov_b32 s1, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_u32_e64 v2, v6
	s_cbranch_execz .LBB5_4
; %bb.1:
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s0, 1
	s_cbranch_scc1 .LBB5_4
; %bb.2:                                ; %.lr.ph.preheader
	v_mad_u64_u32 v[0:1], null, 0xfa0, v2, s[4:5]
	v_lshlrev_b32_e32 v7, 3, v6
	v_mad_u64_u32 v[2:3], null, 0xfa0, v6, s[4:5]
	s_mov_b32 s2, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, v0, v7
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v7, vcc_lo, v2, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, 0, v3, vcc_lo
	s_clause 0x1
	global_load_b64 v[4:5], v[4:5], off
	global_load_b64 v[7:8], v[7:8], off
	s_waitcnt vmcnt(0)
	v_div_scale_f64 v[9:10], null, v[7:8], v[7:8], v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[11:12], v[9:10]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[13:14], -v[9:10], v[11:12], 1.0
	v_fma_f64 v[11:12], v[11:12], v[13:14], v[11:12]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[13:14], -v[9:10], v[11:12], 1.0
	v_fma_f64 v[11:12], v[11:12], v[13:14], v[11:12]
	v_div_scale_f64 v[13:14], vcc_lo, v[4:5], v[7:8], v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[15:16], v[13:14], v[11:12]
	v_fma_f64 v[9:10], -v[9:10], v[15:16], v[13:14]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[9:10], v[9:10], v[11:12], v[15:16]
	v_div_fixup_f64 v[4:5], v[9:10], v[7:8], v[4:5]
.LBB5_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b64 v[7:8], v[2:3], off
	global_load_b64 v[9:10], v[0:1], off
	v_add_co_u32 v2, vcc_lo, v2, 8
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_add_i32 s2, s2, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s2, 0
	s_waitcnt vmcnt(0)
	v_fma_f64 v[7:8], -v[4:5], v[7:8], v[9:10]
	global_store_b64 v[0:1], v[7:8], off
	v_add_co_u32 v0, vcc_lo, v0, 8
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
	s_cbranch_scc1 .LBB5_3
.LBB5_4:                                ; %.loopexit
	s_or_b32 exec_lo, exec_lo, s1
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s0, 1
	s_cbranch_scc1 .LBB5_9
; %bb.5:                                ; %.lr.ph33
	v_mad_u64_u32 v[0:1], null, 0xfa0, v6, s[4:5]
	v_dual_mov_b32 v2, 0 :: v_dual_lshlrev_b32 v3, 3, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, v0, v3
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
.LBB5_6:                                ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s1, exec_lo
	v_cmpx_eq_u32_e32 0, v6
	s_cbranch_execz .LBB5_8
; %bb.7:                                ;   in Loop: Header=BB5_6 Depth=1
	global_load_b64 v[3:4], v[0:1], off
	global_load_b64 v[7:8], v2, s[6:7]
	s_waitcnt vmcnt(0)
	v_mul_f64 v[3:4], v[3:4], v[7:8]
	global_store_b64 v2, v[3:4], s[6:7]
.LBB5_8:                                ;   in Loop: Header=BB5_6 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	v_add_nc_u32_e32 v6, -1, v6
	s_add_i32 s0, s0, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s0, 0
	s_cbranch_scc0 .LBB5_6
.LBB5_9:                                ; %._crit_edge
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z11determinatePA500_dPdii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 24
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 17
		.amdhsa_next_free_sgpr 8
		.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_end5:
	.size	_Z11determinatePA500_dPdii, .Lfunc_end5-_Z11determinatePA500_dPdii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 472
; NumSgprs: 10
; NumVgprs: 17
; ScratchSize: 0
; MemoryBound: 1
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 10
; NumVGPRsForWavesPerEU: 17
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.protected	_Z15determinate_gpuPA500_dPdii ; -- Begin function _Z15determinate_gpuPA500_dPdii
	.globl	_Z15determinate_gpuPA500_dPdii
	.p2align	8
	.type	_Z15determinate_gpuPA500_dPdii,@function
_Z15determinate_gpuPA500_dPdii:         ; @_Z15determinate_gpuPA500_dPdii
; %bb.0:
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b32 s0, s[0:1], 0x10
	v_and_b32_e32 v6, 0x3ff, v0
	v_bfe_u32 v2, v0, 10, 10
	s_mov_b32 s1, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_gt_u32_e64 v2, v6
	s_cbranch_execz .LBB6_4
; %bb.1:
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s0, 1
	s_cbranch_scc1 .LBB6_4
; %bb.2:                                ; %.lr.ph.preheader
	v_mad_u64_u32 v[0:1], null, 0xfa0, v2, s[4:5]
	v_lshlrev_b32_e32 v7, 3, v6
	v_mad_u64_u32 v[2:3], null, 0xfa0, v6, s[4:5]
	s_mov_b32 s2, s0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v4, vcc_lo, v0, v7
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v1, vcc_lo
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_4)
	v_add_co_u32 v7, vcc_lo, v2, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, 0, v3, vcc_lo
	s_clause 0x1
	global_load_b64 v[4:5], v[4:5], off
	global_load_b64 v[7:8], v[7:8], off
	s_waitcnt vmcnt(0)
	v_div_scale_f64 v[9:10], null, v[7:8], v[7:8], v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[11:12], v[9:10]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[13:14], -v[9:10], v[11:12], 1.0
	v_fma_f64 v[11:12], v[11:12], v[13:14], v[11:12]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[13:14], -v[9:10], v[11:12], 1.0
	v_fma_f64 v[11:12], v[11:12], v[13:14], v[11:12]
	v_div_scale_f64 v[13:14], vcc_lo, v[4:5], v[7:8], v[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[15:16], v[13:14], v[11:12]
	v_fma_f64 v[9:10], -v[9:10], v[15:16], v[13:14]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[9:10], v[9:10], v[11:12], v[15:16]
	v_div_fixup_f64 v[4:5], v[9:10], v[7:8], v[4:5]
.LBB6_3:                                ; %.lr.ph
                                        ; =>This Inner Loop Header: Depth=1
	global_load_b64 v[7:8], v[2:3], off
	global_load_b64 v[9:10], v[0:1], off
	v_add_co_u32 v2, vcc_lo, v2, 8
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_add_i32 s2, s2, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_lg_u32 s2, 0
	s_waitcnt vmcnt(0)
	v_fma_f64 v[7:8], -v[4:5], v[7:8], v[9:10]
	global_store_b64 v[0:1], v[7:8], off
	v_add_co_u32 v0, vcc_lo, v0, 8
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
	s_cbranch_scc1 .LBB6_3
.LBB6_4:                                ; %.loopexit
	s_or_b32 exec_lo, exec_lo, s1
	s_waitcnt lgkmcnt(0)
	s_cmp_lt_i32 s0, 1
	s_cbranch_scc1 .LBB6_9
; %bb.5:                                ; %.lr.ph33
	v_mad_u64_u32 v[0:1], null, 0xfa0, v6, s[4:5]
	v_dual_mov_b32 v2, 0 :: v_dual_lshlrev_b32 v3, 3, v6
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v0, vcc_lo, v0, v3
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v1, vcc_lo
.LBB6_6:                                ; =>This Inner Loop Header: Depth=1
	s_mov_b32 s1, exec_lo
	v_cmpx_eq_u32_e32 0, v6
	s_cbranch_execz .LBB6_8
; %bb.7:                                ;   in Loop: Header=BB6_6 Depth=1
	global_load_b64 v[3:4], v[0:1], off
	global_load_b64 v[7:8], v2, s[6:7]
	s_waitcnt vmcnt(0)
	v_mul_f64 v[3:4], v[3:4], v[7:8]
	global_store_b64 v2, v[3:4], s[6:7]
.LBB6_8:                                ;   in Loop: Header=BB6_6 Depth=1
	s_or_b32 exec_lo, exec_lo, s1
	v_add_nc_u32_e32 v6, -1, v6
	s_add_i32 s0, s0, -1
	s_delay_alu instid0(SALU_CYCLE_1)
	s_cmp_eq_u32 s0, 0
	s_cbranch_scc0 .LBB6_6
.LBB6_9:                                ; %._crit_edge
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z15determinate_gpuPA500_dPdii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 24
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 17
		.amdhsa_next_free_sgpr 8
		.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_end6:
	.size	_Z15determinate_gpuPA500_dPdii, .Lfunc_end6-_Z15determinate_gpuPA500_dPdii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 472
; NumSgprs: 10
; NumVgprs: 17
; ScratchSize: 0
; MemoryBound: 1
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 10
; NumVGPRsForWavesPerEU: 17
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 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:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 24
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z6MatAddPA500_iS0_S0_
    .private_segment_fixed_size: 0
    .sgpr_count:     10
    .sgpr_spill_count: 0
    .symbol:         _Z6MatAddPA500_iS0_S0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
      - .offset:         24
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 28
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z7MatMultPA500_dS0_S0_i
    .private_segment_fixed_size: 0
    .sgpr_count:     10
    .sgpr_spill_count: 0
    .symbol:         _Z7MatMultPA500_dS0_S0_i.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     12
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 16
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8MatTransPA500_dS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     6
    .sgpr_spill_count: 0
    .symbol:         _Z8MatTransPA500_dS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .offset:         0
        .size:           8
        .value_kind:     by_value
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         16
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 24
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z14multMatByValuedPA500_dS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     10
    .sgpr_spill_count: 0
    .symbol:         _Z14multMatByValuedPA500_dS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     6
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 16
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z8coFactorPA500_dS0_
    .private_segment_fixed_size: 0
    .sgpr_count:     6
    .sgpr_spill_count: 0
    .symbol:         _Z8coFactorPA500_dS0_.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     7
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         20
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 24
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z11determinatePA500_dPdii
    .private_segment_fixed_size: 0
    .sgpr_count:     10
    .sgpr_spill_count: 0
    .symbol:         _Z11determinatePA500_dPdii.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     17
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .address_space:  global
        .offset:         8
        .size:           8
        .value_kind:     global_buffer
      - .offset:         16
        .size:           4
        .value_kind:     by_value
      - .offset:         20
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 24
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z15determinate_gpuPA500_dPdii
    .private_segment_fixed_size: 0
    .sgpr_count:     10
    .sgpr_spill_count: 0
    .symbol:         _Z15determinate_gpuPA500_dPdii.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
