

////////////// Parallelization of PageRank Algorithm using CUDA and OpenMp  /////////////////////////



#include <iostream>
#include <fstream>
#include <string>
#include<stdlib.h>
#include<bits/stdc++.h>
#include <stdio.h>
#include<time.h>
#include <sys/time.h>
using namespace std;

#define TILE_WIDTH 32

#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }						////////// Function to check error in device functions///////
inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true)
{
   if (code != cudaSuccess) 
   {
      fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
      if (abort) exit(code);
   }
}

__global__ void matrixmult(float *a, float *b, float *c,int N,int d) 					/////////// Matrix Multiplication  a*v1=v2 ////////
{
	int row = blockIdx.y * blockDim.y +threadIdx.y;
	int col = blockIdx.x * blockDim.x +threadIdx.x;
	
	if(row < N && col < d)
	{	
		float temp=0;

		for(int p=0; p<N ; p++)
		{
			temp=temp + a[row * N + p] * b[p * d + col];

		}

		c[row*d + col] = temp ;
	}
	
}

float *length(float *a,float *len,int n)
{

for(int j=0;j<n;j++)
{
int sum=0;
	for(int i=0;i<n;i++)
	{
		if(a[i*n+j]>0){sum++;}
	}

len[j]=sum;
}
return len;
}

float *stochastic(float *a,float *len,float t,int n)		///////////// Formation of Stochastic Matrix/////////////
{
for(int i=0;i<n;i++)
{
float g=len[i];
	if(g>0){
				for(int j=0;j<n;j++)
				{
					a[j*n+i]=(a[j*n+i]*t)/(g);
				}
			}
	else {
for(int j=0;j<n;j++)
{ a[j*n+i]=(1.0*t)/n;  }
}

}
return a;
}

float *transmatrix(float *a,float t , int n)			////////////// Formation of Transformation matrix considering damping factor/////////
{
float b[n][n];
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			b[i][j]=((1-t)*1.0)/n;
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			a[i*n+j]=a[i*n+j]+b[i][j];
		}
	}
return a;
}

bool error(float *b, float *c,float tol,float sum,int n,int f,int d)	////////// Function to check Convergence /////////
{
	for(int i=0;i<n;i++)
	{
		sum =sum + (c[d*i+f]-b[d*i+f])*(c[d*i+f]-b[d*i+f]);
	}
if(sum<tol)
{
return false;
}
else return true;
}

int main(){														////// Main function starts //////
	struct timeval t1, t2;
	gettimeofday(&t1, 0);
  
  
  int n=100;                        /////// NUMBER OF NODES	///////////
  int d=15;
  
  float tol=0.00000000005;           //////////// TOLERANCE VALUE	////////
  float *len;
  
  float b=0.85;                       ////////// Damping Factor	//////////
  float *v1,*v2,*matri;
  
  size_t bytes = n*n*sizeof(float);
  
	  matri = (float*)malloc( bytes );                       ////// DYNAMIC MEMORY ALLOCATION /////////
		v1 = (float*)malloc( n*d*sizeof(float) );
	  v2 = (float*)malloc(  n*d*sizeof(float) );
		len = (float*)malloc( n*sizeof(float));
	
	gpuErrchk( cudaMallocManaged(&matri,bytes));				//////// Device Memory Allocation///////
	gpuErrchk(cudaMallocManaged(&v1,d*n*sizeof(float)));
	gpuErrchk(cudaMallocManaged(&v2,d*n*sizeof(float)));
	

for(int i=0;i<d*n;i++){
v1[i]=1.0/n;
v2[i]=1.0;}


///////
int i=0;
float *first,*second;
int t=291;
first = (float*)malloc( t*sizeof(float));
second = (float*)malloc( t*sizeof(float));
string line;
ifstream myfile("Barbasi.txt");
while(std::getline(myfile,line))
{
std::stringstream linestream(line);

float val1;
float val2;

while(linestream>>val1>>val2){

first[i]=val1;
second[i]=val2;
}
i++;
}
myfile.close();




int f1,f2;
for(int i=0;i<n;i++)
{
    for(int j=0;j<n;j++)
    {
        matri[i*n+j]=0;
     }
 }


for(int i=0;i<t;i++){


f1=first[i];
f2=second[i];
matri[f2*n+f1]=1;
}

length(matri,len,n);
stochastic(matri,len,b,n);
transmatrix(matri,b,n);

int blocks = (n+TILE_WIDTH-1)/TILE_WIDTH;				////////// Number of blocks to be used///////
	
	dim3 dim_block(TILE_WIDTH, TILE_WIDTH);				////////// Number of threads per block ///////
	dim3 dim_grid( blocks, blocks);

matrixmult<<<dim_grid, dim_block>>>(matri, v1, v2, n,d);		///////// Cuda function call /////
cudaDeviceSynchronize();

int f=0;

  
while(error(v1,v2,tol,0,n,f,d))									/////// Iterative Multiplication /////
{
    for(int i=0;i<n;i++){v1[i*d+f+1]=v2[i*d+f];}

	matrixmult<<<dim_grid, dim_block>>>(matri, v1, v2, n,d);
	cudaDeviceSynchronize();
	
f++;
}
double coutnnn=0;										
for(int i=0;i<n;i++){
//cout<<v2[i*d+f]<<endl;
coutnnn=coutnnn+v2[i*d+f];
}

cout<<coutnnn<<endl;
cout<<"Number of iterations to converge = "<<f<<endl;

cout<<endl<<endl;
gettimeofday(&t2, 0);

double timee = (1000000.0*(t2.tv_sec-t1.tv_sec) + t2.tv_usec-t1.tv_usec)/1000.0;		////////// Time taken to to calculate final PageRank//////
cout<<timee/1000<<endl;

}

	.file	"tmpxft_003a5449_00000000-6_Project_cuda.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB10833:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE10833:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata._Z9gpuAssert9cudaErrorPKcib.str1.1,"aMS",@progbits,1
.LC0:
	.string	"GPUassert: %s %s %d\n"
	.section	.text._Z9gpuAssert9cudaErrorPKcib,"axG",@progbits,_Z9gpuAssert9cudaErrorPKcib,comdat
	.weak	_Z9gpuAssert9cudaErrorPKcib
	.type	_Z9gpuAssert9cudaErrorPKcib, @function
_Z9gpuAssert9cudaErrorPKcib:
.LFB10825:
	.cfi_startproc
	endbr64
	testl	%edi, %edi
	je	.L8
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%ecx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movl	%edi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
	movl	%edx, 12(%rsp)
	movq	%rsi, (%rsp)
	call	cudaGetErrorString@PLT
	movl	12(%rsp), %r9d
	movq	(%rsp), %r8
	leaq	.LC0(%rip), %rdx
	movq	stderr(%rip), %rdi
	movq	%rax, %rcx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	testb	%bpl, %bpl
	je	.L2
	movl	%ebx, %edi
	call	exit@PLT
.L2:
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore 3
	.cfi_restore 6
	ret
	.cfi_endproc
.LFE10825:
	.size	_Z9gpuAssert9cudaErrorPKcib, .-_Z9gpuAssert9cudaErrorPKcib
	.text
	.globl	_Z6lengthPfS_i
	.type	_Z6lengthPfS_i, @function
_Z6lengthPfS_i:
.LFB10826:
	.cfi_startproc
	endbr64
	movq	%rsi, %rax
	movslq	%edx, %rsi
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	salq	$2, %rsi
.L13:
	cmpl	%ecx, %edx
	jle	.L20
	leaq	(%rdi,%rcx,4), %r10
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
.L16:
	movss	(%r10), %xmm1
	comiss	%xmm0, %xmm1
	jbe	.L14
	incl	%r8d
.L14:
	incl	%r9d
	addq	%rsi, %r10
	cmpl	%r9d, %edx
	jne	.L16
	cvtsi2ssl	%r8d, %xmm1
	movss	%xmm1, (%rax,%rcx,4)
	incq	%rcx
	jmp	.L13
.L20:
	ret
	.cfi_endproc
.LFE10826:
	.size	_Z6lengthPfS_i, .-_Z6lengthPfS_i
	.globl	_Z10stochasticPfS_fi
	.type	_Z10stochasticPfS_fi, @function
_Z10stochasticPfS_fi:
.LFB10827:
	.cfi_startproc
	endbr64
	movq	%rsi, %r9
	movslq	%edx, %rsi
	movq	%rdi, %rcx
	xorl	%edx, %edx
	movq	%rsi, %rax
	xorps	%xmm3, %xmm3
	salq	$2, %rsi
.L22:
	cmpl	%edx, %eax
	jle	.L33
	movss	(%r9,%rdx,4), %xmm2
	comiss	%xmm3, %xmm2
	jbe	.L32
	movq	%rdi, %r8
	xorl	%r10d, %r10d
.L25:
	movss	(%r8), %xmm1
	incl	%r10d
	mulss	%xmm0, %xmm1
	divss	%xmm2, %xmm1
	movss	%xmm1, (%r8)
	addq	%rsi, %r8
	cmpl	%r10d, %eax
	jne	.L25
	jmp	.L26
.L32:
	cvtsi2sdl	%eax, %xmm2
	cvtss2sd	%xmm0, %xmm1
	movq	%rdi, %r10
	xorl	%r8d, %r8d
	divsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
.L27:
	incl	%r8d
	movss	%xmm1, (%r10)
	addq	%rsi, %r10
	cmpl	%r8d, %eax
	jne	.L27
.L26:
	incq	%rdx
	addq	$4, %rdi
	jmp	.L22
.L33:
	movq	%rcx, %rax
	ret
	.cfi_endproc
.LFE10827:
	.size	_Z10stochasticPfS_fi, .-_Z10stochasticPfS_fi
	.globl	_Z11transmatrixPffi
	.type	_Z11transmatrixPffi, @function
_Z11transmatrixPffi:
.LFB10828:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movl	%esi, %eax
	movq	%rdi, %rcx
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rdx
	movq	%rdx, -8(%rbp)
	xorl	%edx, %edx
	movslq	%esi, %rdx
	movq	%rsp, %rdi
	leaq	0(,%rdx,4), %r8
	imulq	%rdx, %rdx
	leaq	15(,%rdx,4), %rsi
	movq	%rsi, %rdx
	andq	$-4096, %rsi
	andq	$-16, %rdx
	subq	%rsi, %rdi
.L35:
	cmpq	%rdi, %rsp
	je	.L36
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L35
.L36:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	je	.L37
	orq	$0, -8(%rsp,%rdx)
.L37:
	movq	%rsp, %rdx
	movss	.LC2(%rip), %xmm2
	xorl	%edi, %edi
	movq	%rdx, %r9
.L38:
	cmpl	%eax, %edi
	jge	.L51
	cvtsi2sdl	%eax, %xmm3
	movaps	%xmm2, %xmm1
	xorl	%esi, %esi
	subss	%xmm0, %xmm1
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm3, %xmm1
	cvtsd2ss	%xmm1, %xmm1
.L39:
	movss	%xmm1, (%r9,%rsi,4)
	incq	%rsi
	cmpl	%esi, %eax
	jg	.L39
	incl	%edi
	addq	%r8, %r9
	jmp	.L38
.L51:
	movq	%rcx, %r10
	xorl	%r9d, %r9d
.L41:
	cmpl	%eax, %r9d
	jge	.L52
	movq	%r10, %rdi
	xorl	%esi, %esi
.L42:
	movss	(%rdi), %xmm0
	addss	(%rdx,%rsi,4), %xmm0
	incq	%rsi
	addq	$4, %rdi
	movss	%xmm0, -4(%rdi)
	cmpl	%esi, %eax
	jg	.L42
	incl	%r9d
	addq	%r8, %r10
	addq	%r8, %rdx
	jmp	.L41
.L52:
	movq	-8(%rbp), %rax
	subq	%fs:40, %rax
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	movq	%rcx, %rax
	ret
	.cfi_endproc
.LFE10828:
	.size	_Z11transmatrixPffi, .-_Z11transmatrixPffi
	.globl	_Z5errorPfS_ffiii
	.type	_Z5errorPfS_ffiii, @function
_Z5errorPfS_ffiii:
.LFB10829:
	.cfi_startproc
	endbr64
	movslq	%r8d, %r8
	movslq	%ecx, %rcx
	movq	%rdi, %rax
	xorl	%edi, %edi
	salq	$2, %r8
	salq	$2, %rcx
.L54:
	cmpl	%edx, %edi
	jge	.L56
	movss	(%rsi,%rcx), %xmm2
	subss	(%rax,%rcx), %xmm2
	incl	%edi
	addq	%r8, %rcx
	mulss	%xmm2, %xmm2
	addss	%xmm2, %xmm1
	jmp	.L54
.L56:
	comiss	%xmm1, %xmm0
	setbe	%al
	ret
	.cfi_endproc
.LFE10829:
	.size	_Z5errorPfS_ffiii, .-_Z5errorPfS_ffiii
	.globl	_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii
	.type	_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii, @function
_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii:
.LFB10855:
	.cfi_startproc
	endbr64
	subq	$152, %rsp
	.cfi_def_cfa_offset 160
	movq	%rdi, 24(%rsp)
	leaq	48(%rsp), %rdi
	movq	%rsi, 16(%rsp)
	leaq	60(%rsp), %rsi
	movq	%rdx, 8(%rsp)
	leaq	32(%rsp), %rdx
	movl	%ecx, 4(%rsp)
	leaq	40(%rsp), %rcx
	movl	%r8d, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	24(%rsp), %rax
	movl	$1, 56(%rsp)
	movq	%rax, 96(%rsp)
	leaq	16(%rsp), %rax
	movq	%rax, 104(%rsp)
	leaq	8(%rsp), %rax
	movq	%rax, 112(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 120(%rsp)
	movq	%rsp, %rax
	movq	%rax, 128(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 48(%rsp)
	movq	%rax, 60(%rsp)
	movl	$1, 68(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L57
	pushq	40(%rsp)
	.cfi_def_cfa_offset 168
	leaq	_Z10matrixmultPfS_S_ii(%rip), %rdi
	pushq	40(%rsp)
	.cfi_def_cfa_offset 176
	movq	76(%rsp), %rcx
	movl	84(%rsp), %r8d
	movq	64(%rsp), %rsi
	movl	72(%rsp), %edx
	leaq	112(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 168
	popq	%rdx
	.cfi_def_cfa_offset 160
.L57:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	je	.L59
	call	__stack_chk_fail@PLT
.L59:
	addq	$152, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE10855:
	.size	_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii, .-_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii
	.globl	_Z10matrixmultPfS_S_ii
	.type	_Z10matrixmultPfS_S_ii, @function
_Z10matrixmultPfS_S_ii:
.LFB10856:
	.cfi_startproc
	endbr64
	jmp	_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii
	.cfi_endproc
.LFE10856:
	.size	_Z10matrixmultPfS_S_ii, .-_Z10matrixmultPfS_S_ii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"_Z10matrixmultPfS_S_ii"
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB10858:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 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	.LC3(%rip), %rdx
	movq	%rax, %rdi
	leaq	_Z10matrixmultPfS_S_ii(%rip), %rsi
	pushq	$0
	.cfi_def_cfa_offset 40
	movq	%rdx, %rcx
	pushq	$0
	.cfi_def_cfa_offset 48
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	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	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE10858:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.rodata.str1.1
.LC5:
	.string	"/home/ubuntu/Datasets/stackv2/train-structured/arpittiwari11/Parellel-Page-Rank-Algorithm/main/Project_cuda.cu"
.LC7:
	.string	"Barbasi.txt"
.LC10:
	.string	"Number of iterations to converge = "
	.section	.text.startup
	.globl	main
	.type	main, @function
main:
.LFB10830:
	.cfi_startproc
	.cfi_personality 0x9b,DW.ref.__gxx_personality_v0
	.cfi_lsda 0x1b,.LLSDA10830
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%esi, %esi
	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
	leaq	.LC5(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	88(%rsp), %rdi
	call	gettimeofday@PLT
	movl	$40000, %edi
	call	malloc@PLT
	movl	$6000, %edi
	movq	%rax, 56(%rsp)
	call	malloc@PLT
	movl	$6000, %edi
	movq	%rax, 40(%rsp)
	call	malloc@PLT
	movl	$400, %edi
	movq	%rax, 48(%rsp)
	call	malloc@PLT
	leaq	56(%rsp), %rdi
	movl	$1, %edx
	movl	$40000, %esi
	movq	%rax, %rbx
.LEHB0:
	call	cudaMallocManaged@PLT
	movl	$1, %ecx
	movl	$139, %edx
	movq	%rbp, %rsi
	movl	%eax, %edi
	call	_Z9gpuAssert9cudaErrorPKcib
	leaq	40(%rsp), %rdi
	movl	$1, %edx
	movl	$6000, %esi
	call	cudaMallocManaged@PLT
	movl	$1, %ecx
	movl	$140, %edx
	movq	%rbp, %rsi
	movl	%eax, %edi
	call	_Z9gpuAssert9cudaErrorPKcib
	leaq	48(%rsp), %rdi
	movl	$1, %edx
	movl	$6000, %esi
	call	cudaMallocManaged@PLT
	movl	$1, %ecx
	movl	$141, %edx
	movq	%rbp, %rsi
	movl	%eax, %edi
	call	_Z9gpuAssert9cudaErrorPKcib
.LEHE0:
	movq	40(%rsp), %rcx
	movq	48(%rsp), %rdx
	xorl	%eax, %eax
	movss	.LC6(%rip), %xmm0
.L65:
	movss	%xmm0, (%rcx,%rax)
	movl	$0x3f800000, (%rdx,%rax)
	addq	$4, %rax
	cmpq	$6000, %rax
	jne	.L65
	movl	$1164, %edi
	call	malloc@PLT
	movl	$1164, %edi
	movq	%rax, %rbp
	call	malloc@PLT
	movl	$8, %edx
	leaq	.LC7(%rip), %rsi
	movb	$0, 136(%rsp)
	movq	%rax, %r12
	leaq	136(%rsp), %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	movq	%rax, 128(%rsp)
	leaq	544(%rsp), %rax
	movq	%rax, 8(%rsp)
	movq	8(%rsp), %rdi
	leaq	120(%rsp), %rax
	movq	%rax, 16(%rsp)
.LEHB1:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@PLT
.LEHE1:
	leaq	152(%rsp), %rax
	movq	%rbp, %r14
	movq	%r12, %r13
	movq	%rax, 24(%rsp)
.L66:
	movq	16(%rsp), %rsi
	movq	8(%rsp), %rdi
.LEHB2:
	call	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE@PLT
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L97
	movq	16(%rsp), %rsi
	movq	24(%rsp), %rdi
	movl	$24, %edx
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode@PLT
.LEHE2:
	leaq	76(%rsp), %r15
.L67:
	movq	24(%rsp), %rdi
	movq	%r15, %rsi
.LEHB3:
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
	movq	%rax, %rdi
	leaq	104(%rsp), %rsi
	call	_ZNSi10_M_extractIfEERSiRT_@PLT
.LEHE3:
	movq	(%rax), %rdx
	movq	-24(%rdx), %rdx
	testb	$5, 32(%rax,%rdx)
	jne	.L98
	movss	76(%rsp), %xmm0
	movss	%xmm0, (%r14)
	movss	104(%rsp), %xmm0
	movss	%xmm0, 0(%r13)
	jmp	.L67
.L98:
	movq	24(%rsp), %rdi
	addq	$4, %r14
	addq	$4, %r13
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L66
.L97:
	movq	8(%rsp), %rdi
.LEHB4:
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv@PLT
	movq	56(%rsp), %r11
	movl	$10000, %ecx
	xorl	%eax, %eax
	xorl	%edx, %edx
	movq	%r11, %rdi
	rep stosl
.L70:
	cvttss2sil	(%r12,%rdx), %eax
	cvttss2sil	0(%rbp,%rdx), %ecx
	addq	$4, %rdx
	imull	$100, %eax, %eax
	addl	%ecx, %eax
	cltq
	movl	$0x3f800000, (%r11,%rax,4)
	cmpq	$1164, %rdx
	jne	.L70
	movl	$100, %edx
	movq	%r11, %rdi
	movq	%rbx, %rsi
	call	_Z6lengthPfS_i
	movss	.LC8(%rip), %xmm0
	movq	%rbx, %rsi
	call	_Z10stochasticPfS_fi
	movl	$100, %esi
	movq	%r11, %rdi
	call	_Z11transmatrixPffi
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movl	$1, %ecx
	movabsq	$137438953504, %rdx
	movl	$1, %esi
	movabsq	$17179869188, %rdi
	movl	$1, 72(%rsp)
	movq	%rdx, 64(%rsp)
	movq	%rdi, 76(%rsp)
	movl	$1, 84(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L71
.L73:
	call	cudaDeviceSynchronize@PLT
	xorl	%ebx, %ebx
	jmp	.L72
.L71:
	movq	48(%rsp), %rdx
	movq	40(%rsp), %rsi
	movl	$100, %ecx
	movl	$15, %r8d
	movq	56(%rsp), %rdi
	call	_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii
	jmp	.L73
.L74:
	movss	(%rsi,%rax), %xmm0
	incl	%edx
	movss	%xmm0, 4(%r9,%rax)
	addq	$60, %rax
	cmpl	$100, %edx
	jne	.L74
	movl	72(%rsp), %ecx
	movq	64(%rsp), %rdx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	76(%rsp), %rdi
	movl	84(%rsp), %esi
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	je	.L75
.L77:
	call	cudaDeviceSynchronize@PLT
	incq	%rbx
.L72:
	movq	40(%rsp), %r9
	movq	48(%rsp), %rsi
	movl	%ebx, %ecx
	xorps	%xmm1, %xmm1
	movss	.LC9(%rip), %xmm0
	movl	$15, %r8d
	movl	$100, %edx
	movl	%ebx, %ebp
	movq	%r9, %rdi
	call	_Z5errorPfS_ffiii
	testb	%al, %al
	je	.L99
	leaq	0(,%rbx,4), %rax
	xorl	%edx, %edx
	jmp	.L74
.L75:
	movq	48(%rsp), %rdx
	movq	40(%rsp), %rsi
	movl	$100, %ecx
	movl	$15, %r8d
	movq	56(%rsp), %rdi
	call	_Z36__device_stub__Z10matrixmultPfS_S_iiPfS_S_ii
	jmp	.L77
.L99:
	movslq	%ebx, %rbx
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
	leaq	(%rsi,%rbx,4), %rdx
.L79:
	incl	%eax
	cvtss2sd	(%rdx), %xmm1
	addq	$60, %rdx
	addsd	%xmm1, %xmm0
	cmpl	$100, %eax
	jne	.L79
	leaq	_ZSt4cout(%rip), %rbx
	movq	%rbx, %rdi
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	.LC10(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT
	movq	%rax, %rdi
	movl	%ebp, %esi
	call	_ZNSolsEi@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
	leaq	104(%rsp), %rdi
	xorl	%esi, %esi
	call	gettimeofday@PLT
	movq	104(%rsp), %rax
	subq	88(%rsp), %rax
	movq	%rbx, %rdi
	cvtsi2sdq	%rax, %xmm0
	mulsd	.LC11(%rip), %xmm0
	cvtsi2sdq	112(%rsp), %xmm1
	addsd	%xmm1, %xmm0
	cvtsi2sdq	96(%rsp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LC12(%rip), %xmm1
	divsd	%xmm1, %xmm0
	divsd	%xmm1, %xmm0
	call	_ZNSo9_M_insertIdEERSoT_@PLT
	movq	_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	call	_ZNSolsEPFRSoS_E@PLT
.LEHE4:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	movq	16(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	je	.L84
	jmp	.L95
.L87:
	endbr64
	movq	%rax, %rbx
.L80:
	movq	24(%rsp), %rdi
	call	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev@PLT
	jmp	.L81
.L88:
	endbr64
	movq	%rax, %rbx
.L81:
	movq	8(%rsp), %rdi
	call	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@PLT
	jmp	.L82
.L86:
	endbr64
	movq	%rax, %rbx
.L82:
	movq	16(%rsp), %rdi
	call	_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_disposeEv@PLT
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L95
	movq	%rbx, %rdi
.LEHB5:
	call	_Unwind_Resume@PLT
.LEHE5:
.L95:
	call	__stack_chk_fail@PLT
.L84:
	addq	$1080, %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
.LFE10830:
	.globl	__gxx_personality_v0
	.section	.gcc_except_table,"a",@progbits
.LLSDA10830:
	.byte	0xff
	.byte	0xff
	.byte	0x1
	.uleb128 .LLSDACSE10830-.LLSDACSB10830
.LLSDACSB10830:
	.uleb128 .LEHB0-.LFB10830
	.uleb128 .LEHE0-.LEHB0
	.uleb128 0
	.uleb128 0
	.uleb128 .LEHB1-.LFB10830
	.uleb128 .LEHE1-.LEHB1
	.uleb128 .L86-.LFB10830
	.uleb128 0
	.uleb128 .LEHB2-.LFB10830
	.uleb128 .LEHE2-.LEHB2
	.uleb128 .L88-.LFB10830
	.uleb128 0
	.uleb128 .LEHB3-.LFB10830
	.uleb128 .LEHE3-.LEHB3
	.uleb128 .L87-.LFB10830
	.uleb128 0
	.uleb128 .LEHB4-.LFB10830
	.uleb128 .LEHE4-.LEHB4
	.uleb128 .L88-.LFB10830
	.uleb128 0
	.uleb128 .LEHB5-.LFB10830
	.uleb128 .LEHE5-.LEHB5
	.uleb128 0
	.uleb128 0
.LLSDACSE10830:
	.section	.text.startup
	.size	main, .-main
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC2:
	.long	1065353216
	.align 4
.LC6:
	.long	1008981770
	.align 4
.LC8:
	.long	1062836634
	.align 4
.LC9:
	.long	777774847
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC11:
	.long	0
	.long	1093567616
	.align 8
.LC12:
	.long	0
	.long	1083129856
	.hidden	DW.ref.__gxx_personality_v0
	.weak	DW.ref.__gxx_personality_v0
	.section	.data.rel.local.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat
	.align 8
	.type	DW.ref.__gxx_personality_v0, @object
	.size	DW.ref.__gxx_personality_v0, 8
DW.ref.__gxx_personality_v0:
	.quad	__gxx_personality_v0
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:



////////////// Parallelization of PageRank Algorithm using CUDA and OpenMp  /////////////////////////




#include <hip/hip_runtime.h>
#include <iostream>
#include <fstream>
#include <string>
#include<stdlib.h>
#include<bits/stdc++.h>
#include <stdio.h>
#include<time.h>
#include <sys/time.h>
using namespace std;

#define TILE_WIDTH 32

#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }						////////// Function to check error in device functions///////
inline void gpuAssert(hipError_t code, const char *file, int line, bool abort=true)
{
   if (code != hipSuccess) 
   {
      fprintf(stderr,"GPUassert: %s %s %d\n", hipGetErrorString(code), file, line);
      if (abort) exit(code);
   }
}

__global__ void matrixmult(float *a, float *b, float *c,int N,int d) 					/////////// Matrix Multiplication  a*v1=v2 ////////
{
	int row = blockIdx.y * blockDim.y +threadIdx.y;
	int col = blockIdx.x * blockDim.x +threadIdx.x;
	
	if(row < N && col < d)
	{	
		float temp=0;

		for(int p=0; p<N ; p++)
		{
			temp=temp + a[row * N + p] * b[p * d + col];

		}

		c[row*d + col] = temp ;
	}
	
}

float *length(float *a,float *len,int n)
{

for(int j=0;j<n;j++)
{
int sum=0;
	for(int i=0;i<n;i++)
	{
		if(a[i*n+j]>0){sum++;}
	}

len[j]=sum;
}
return len;
}

float *stochastic(float *a,float *len,float t,int n)		///////////// Formation of Stochastic Matrix/////////////
{
for(int i=0;i<n;i++)
{
float g=len[i];
	if(g>0){
				for(int j=0;j<n;j++)
				{
					a[j*n+i]=(a[j*n+i]*t)/(g);
				}
			}
	else {
for(int j=0;j<n;j++)
{ a[j*n+i]=(1.0*t)/n;  }
}

}
return a;
}

float *transmatrix(float *a,float t , int n)			////////////// Formation of Transformation matrix considering damping factor/////////
{
float b[n][n];
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			b[i][j]=((1-t)*1.0)/n;
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			a[i*n+j]=a[i*n+j]+b[i][j];
		}
	}
return a;
}

bool error(float *b, float *c,float tol,float sum,int n,int f,int d)	////////// Function to check Convergence /////////
{
	for(int i=0;i<n;i++)
	{
		sum =sum + (c[d*i+f]-b[d*i+f])*(c[d*i+f]-b[d*i+f]);
	}
if(sum<tol)
{
return false;
}
else return true;
}

int main(){														////// Main function starts //////
	struct timeval t1, t2;
	gettimeofday(&t1, 0);
  
  
  int n=100;                        /////// NUMBER OF NODES	///////////
  int d=15;
  
  float tol=0.00000000005;           //////////// TOLERANCE VALUE	////////
  float *len;
  
  float b=0.85;                       ////////// Damping Factor	//////////
  float *v1,*v2,*matri;
  
  size_t bytes = n*n*sizeof(float);
  
	  matri = (float*)malloc( bytes );                       ////// DYNAMIC MEMORY ALLOCATION /////////
		v1 = (float*)malloc( n*d*sizeof(float) );
	  v2 = (float*)malloc(  n*d*sizeof(float) );
		len = (float*)malloc( n*sizeof(float));
	
	gpuErrchk( hipMallocManaged(&matri,bytes));				//////// Device Memory Allocation///////
	gpuErrchk(hipMallocManaged(&v1,d*n*sizeof(float)));
	gpuErrchk(hipMallocManaged(&v2,d*n*sizeof(float)));
	

for(int i=0;i<d*n;i++){
v1[i]=1.0/n;
v2[i]=1.0;}


///////
int i=0;
float *first,*second;
int t=291;
first = (float*)malloc( t*sizeof(float));
second = (float*)malloc( t*sizeof(float));
string line;
ifstream myfile("Barbasi.txt");
while(std::getline(myfile,line))
{
std::stringstream linestream(line);

float val1;
float val2;

while(linestream>>val1>>val2){

first[i]=val1;
second[i]=val2;
}
i++;
}
myfile.close();




int f1,f2;
for(int i=0;i<n;i++)
{
    for(int j=0;j<n;j++)
    {
        matri[i*n+j]=0;
     }
 }


for(int i=0;i<t;i++){


f1=first[i];
f2=second[i];
matri[f2*n+f1]=1;
}

length(matri,len,n);
stochastic(matri,len,b,n);
transmatrix(matri,b,n);

int blocks = (n+TILE_WIDTH-1)/TILE_WIDTH;				////////// Number of blocks to be used///////
	
	dim3 dim_block(TILE_WIDTH, TILE_WIDTH);				////////// Number of threads per block ///////
	dim3 dim_grid( blocks, blocks);

matrixmult<<<dim_grid, dim_block>>>(matri, v1, v2, n,d);		///////// Cuda function call /////
hipDeviceSynchronize();

int f=0;

  
while(error(v1,v2,tol,0,n,f,d))									/////// Iterative Multiplication /////
{
    for(int i=0;i<n;i++){v1[i*d+f+1]=v2[i*d+f];}

	matrixmult<<<dim_grid, dim_block>>>(matri, v1, v2, n,d);
	hipDeviceSynchronize();
	
f++;
}
double coutnnn=0;										
for(int i=0;i<n;i++){
//cout<<v2[i*d+f]<<endl;
coutnnn=coutnnn+v2[i*d+f];
}

cout<<coutnnn<<endl;
cout<<"Number of iterations to converge = "<<f<<endl;

cout<<endl<<endl;
gettimeofday(&t2, 0);

double timee = (1000000.0*(t2.tv_sec-t1.tv_sec) + t2.tv_usec-t1.tv_usec)/1000.0;		////////// Time taken to to calculate final PageRank//////
cout<<timee/1000<<endl;

}

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

                                        # End of file scope inline assembly
	.globl	_Z25__device_stub__matrixmultPfS_S_ii # -- Begin function _Z25__device_stub__matrixmultPfS_S_ii
	.type	_Z25__device_stub__matrixmultPfS_S_ii,@function
_Z25__device_stub__matrixmultPfS_S_ii:  # @_Z25__device_stub__matrixmultPfS_S_ii
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	subq	$128, %rsp
	.cfi_def_cfa_offset 176
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	leaq	40(%rsp), %rax
	movq	%rdi, (%rax)
	leaq	32(%rsp), %rdi
	movq	%rsi, (%rdi)
	leaq	24(%rsp), %rsi
	movq	%rdx, (%rsi)
	leaq	4(%rsp), %rdx
	movl	%ecx, (%rdx)
	movq	%rsp, %rcx
	movl	%r8d, (%rcx)
	leaq	80(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rdi, 8(%rbx)
	movq	%rsi, 16(%rbx)
	movq	%rdx, 24(%rbx)
	movq	%rcx, 32(%rbx)
	leaq	64(%rsp), %r14
	leaq	48(%rsp), %r15
	leaq	16(%rsp), %r12
	leaq	8(%rsp), %r13
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%r13, %rcx
	callq	__hipPopCallConfiguration
	movq	(%r14), %rsi
	movl	8(%r14), %edx
	movq	(%r15), %rcx
	movl	8(%r15), %r8d
	movl	$_Z10matrixmultPfS_S_ii, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$144, %rsp
	.cfi_adjust_cfa_offset -144
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z25__device_stub__matrixmultPfS_S_ii, .Lfunc_end0-_Z25__device_stub__matrixmultPfS_S_ii
	.cfi_endproc
                                        # -- End function
	.globl	_Z6lengthPfS_i                  # -- Begin function _Z6lengthPfS_i
	.type	_Z6lengthPfS_i,@function
_Z6lengthPfS_i:                         # @_Z6lengthPfS_i
	.cfi_startproc
# %bb.0:
	movq	%rsi, %rax
	testl	%edx, %edx
	jle	.LBB1_5
# %bb.1:                                # %.preheader.lr.ph
	movl	%edx, %ecx
	leaq	(,%rcx,4), %rdx
	xorl	%esi, %esi
	xorps	%xmm0, %xmm0
.LBB1_2:                                # %.lr.ph.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_3 Depth 2
	movq	%rcx, %r8
	movq	%rdi, %r10
	xorl	%r9d, %r9d
.LBB1_3:                                # %.lr.ph
                                        #   Parent Loop BB1_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r10), %xmm1                   # xmm1 = mem[0],zero,zero,zero
	xorl	%r11d, %r11d
	ucomiss	%xmm0, %xmm1
	seta	%r11b
	addl	%r11d, %r9d
	addq	%rdx, %r10
	decq	%r8
	jne	.LBB1_3
# %bb.4:                                # %._crit_edge
                                        #   in Loop: Header=BB1_2 Depth=1
	xorps	%xmm1, %xmm1
	cvtsi2ss	%r9d, %xmm1
	movss	%xmm1, (%rax,%rsi,4)
	incq	%rsi
	addq	$4, %rdi
	cmpq	%rcx, %rsi
	jne	.LBB1_2
.LBB1_5:                                # %._crit_edge20
	retq
.Lfunc_end1:
	.size	_Z6lengthPfS_i, .Lfunc_end1-_Z6lengthPfS_i
	.cfi_endproc
                                        # -- End function
	.globl	_Z10stochasticPfS_fi            # -- Begin function _Z10stochasticPfS_fi
	.type	_Z10stochasticPfS_fi,@function
_Z10stochasticPfS_fi:                   # @_Z10stochasticPfS_fi
	.cfi_startproc
# %bb.0:
	movq	%rdi, %rax
	testl	%edx, %edx
	jle	.LBB2_7
# %bb.1:                                # %.lr.ph39
	cvtss2sd	%xmm0, %xmm1
	cvtsi2sd	%edx, %xmm2
	divsd	%xmm2, %xmm1
	cvtsd2ss	%xmm1, %xmm1
	movl	%edx, %ecx
	leaq	(,%rcx,4), %rdx
	xorl	%edi, %edi
	xorpd	%xmm2, %xmm2
	movq	%rax, %r8
.LBB2_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB2_5 Depth 2
                                        #     Child Loop BB2_4 Depth 2
	movss	(%rsi,%rdi,4), %xmm3            # xmm3 = mem[0],zero,zero,zero
	ucomiss	%xmm2, %xmm3
	movq	%rcx, %r9
	movq	%r8, %r10
	jbe	.LBB2_5
# %bb.3:                                # %.lr.ph36.preheader
                                        #   in Loop: Header=BB2_2 Depth=1
	movq	%rcx, %r9
	movq	%r8, %r10
.LBB2_4:                                # %.lr.ph36
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r10), %xmm4                   # xmm4 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm4
	divss	%xmm3, %xmm4
	movss	%xmm4, (%r10)
	addq	%rdx, %r10
	decq	%r9
	jne	.LBB2_4
	jmp	.LBB2_6
.LBB2_5:                                # %.lr.ph
                                        #   Parent Loop BB2_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm1, (%r10)
	addq	%rdx, %r10
	decq	%r9
	jne	.LBB2_5
.LBB2_6:                                # %.loopexit
                                        #   in Loop: Header=BB2_2 Depth=1
	incq	%rdi
	addq	$4, %r8
	cmpq	%rcx, %rdi
	jne	.LBB2_2
.LBB2_7:                                # %._crit_edge
	retq
.Lfunc_end2:
	.size	_Z10stochasticPfS_fi, .Lfunc_end2-_Z10stochasticPfS_fi
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z11transmatrixPffi
.LCPI3_0:
	.long	0x3f800000                      # float 1
	.text
	.globl	_Z11transmatrixPffi
	.type	_Z11transmatrixPffi,@function
_Z11transmatrixPffi:                    # @_Z11transmatrixPffi
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, %rax
	movl	%esi, %ecx
	movq	%rcx, %rdi
	imulq	%rcx, %rdi
	movq	%rsp, %rdx
	leaq	15(,%rdi,4), %rdi
	andq	$-16, %rdi
	subq	%rdi, %rdx
	movq	%rdx, %rsp
	testl	%esi, %esi
	jle	.LBB3_10
# %bb.1:                                # %.preheader34.lr.ph
	movss	.LCPI3_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%esi, %xmm0
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	leaq	(,%rcx,4), %rdi
	xorl	%r8d, %r8d
	movq	%rdx, %r9
.LBB3_2:                                # %.lr.ph
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_3 Depth 2
	xorl	%r10d, %r10d
.LBB3_3:                                #   Parent Loop BB3_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	%xmm0, (%r9,%r10,4)
	incq	%r10
	cmpq	%r10, %rcx
	jne	.LBB3_3
# %bb.4:                                # %._crit_edge
                                        #   in Loop: Header=BB3_2 Depth=1
	incq	%r8
	addq	%rdi, %r9
	cmpq	%rcx, %r8
	jne	.LBB3_2
# %bb.5:                                # %.preheader33
	testl	%esi, %esi
	jle	.LBB3_10
# %bb.6:                                # %.lr.ph38.preheader
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
.LBB3_7:                                # %.lr.ph38
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB3_8 Depth 2
	movl	%r8d, %r10d
	leaq	(%rax,%r10,4), %r10
	xorl	%r11d, %r11d
.LBB3_8:                                #   Parent Loop BB3_7 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%r10,%r11,4), %xmm0            # xmm0 = mem[0],zero,zero,zero
	addss	(%rdx,%r11,4), %xmm0
	movss	%xmm0, (%r10,%r11,4)
	incq	%r11
	cmpq	%r11, %rcx
	jne	.LBB3_8
# %bb.9:                                # %._crit_edge39
                                        #   in Loop: Header=BB3_7 Depth=1
	incq	%r9
	addl	%esi, %r8d
	addq	%rdi, %rdx
	cmpq	%rcx, %r9
	jne	.LBB3_7
.LBB3_10:                               # %._crit_edge41
	movq	%rbp, %rsp
	popq	%rbp
	.cfi_def_cfa %rsp, 8
	retq
.Lfunc_end3:
	.size	_Z11transmatrixPffi, .Lfunc_end3-_Z11transmatrixPffi
	.cfi_endproc
                                        # -- End function
	.globl	_Z5errorPfS_ffiii               # -- Begin function _Z5errorPfS_ffiii
	.type	_Z5errorPfS_ffiii,@function
_Z5errorPfS_ffiii:                      # @_Z5errorPfS_ffiii
	.cfi_startproc
# %bb.0:
	testl	%edx, %edx
	jle	.LBB4_3
# %bb.1:                                # %.lr.ph.preheader
	movslq	%r8d, %rax
	movslq	%ecx, %rcx
	movl	%edx, %edx
	shlq	$2, %rcx
	shlq	$2, %rax
.LBB4_2:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movss	(%rsi,%rcx), %xmm2              # xmm2 = mem[0],zero,zero,zero
	subss	(%rdi,%rcx), %xmm2
	mulss	%xmm2, %xmm2
	addss	%xmm2, %xmm1
	addq	%rax, %rcx
	decq	%rdx
	jne	.LBB4_2
.LBB4_3:                                # %._crit_edge
	ucomiss	%xmm1, %xmm0
	setbe	%al
	retq
.Lfunc_end4:
	.size	_Z5errorPfS_ffiii, .Lfunc_end4-_Z5errorPfS_ffiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI5_0:
	.long	0x3f59999a                      # float 0.850000023
.LCPI5_1:
	.long	0x2e5be6ff                      # float 5.00000007E-11
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0
.LCPI5_2:
	.quad	0x412e848000000000              # double 1.0E+6
.LCPI5_3:
	.quad	0x408f400000000000              # double 1000
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
.Lfunc_begin0:
	.cfi_startproc
	.cfi_personality 3, __gxx_personality_v0
	.cfi_lsda 3, .Lexception0
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$1016, %rsp                     # imm = 0x3F8
	.cfi_def_cfa_offset 1072
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	leaq	72(%rsp), %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movl	$40000, %edi                    # imm = 0x9C40
	callq	malloc
	leaq	16(%rsp), %rbx
	movq	%rax, (%rbx)
	movl	$6000, %edi                     # imm = 0x1770
	callq	malloc
	movq	%rax, 8(%rsp)
	movl	$6000, %edi                     # imm = 0x1770
	callq	malloc
	movq	%rax, (%rsp)
	movl	$400, %edi                      # imm = 0x190
	callq	malloc
	movq	%rax, %r14
	movl	$40000, %esi                    # imm = 0x9C40
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	hipMallocManaged
	testl	%eax, %eax
	jne	.LBB5_1
# %bb.3:                                # %_Z9gpuAssert10hipError_tPKcib.exit
	leaq	8(%rsp), %rdi
	movl	$6000, %esi                     # imm = 0x1770
	movl	$1, %edx
	callq	hipMallocManaged
	testl	%eax, %eax
	jne	.LBB5_4
# %bb.5:                                # %_Z9gpuAssert10hipError_tPKcib.exit125
	movq	%rsp, %rdi
	movl	$6000, %esi                     # imm = 0x1770
	movl	$1, %edx
	callq	hipMallocManaged
	testl	%eax, %eax
	jne	.LBB5_83
# %bb.6:                                # %_Z9gpuAssert10hipError_tPKcib.exit127.preheader
	movq	%r14, 32(%rsp)                  # 8-byte Spill
	movq	8(%rsp), %rax
	movq	(%rsp), %rcx
	xorl	%edx, %edx
.LBB5_7:                                # %_Z9gpuAssert10hipError_tPKcib.exit127
                                        # =>This Inner Loop Header: Depth=1
	movl	$1008981770, (%rax,%rdx,4)      # imm = 0x3C23D70A
	movl	$1065353216, (%rcx,%rdx,4)      # imm = 0x3F800000
	incq	%rdx
	cmpq	$1500, %rdx                     # imm = 0x5DC
	jne	.LBB5_7
# %bb.8:
	movl	$1164, %edi                     # imm = 0x48C
	callq	malloc
	movq	%rax, %r14
	movl	$1164, %edi                     # imm = 0x48C
	callq	malloc
	movq	%rax, %r15
	leaq	56(%rsp), %rax
	movq	%rax, -16(%rax)
	movq	$0, -8(%rax)
	movb	$0, (%rax)
.Ltmp0:
	leaq	104(%rsp), %rdi
	movl	$.L.str.1, %esi
	movl	$8, %edx
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode
.Ltmp1:
# %bb.9:                                # %.preheader193
	xorl	%ebp, %ebp
	leaq	624(%rsp), %r12
	leaq	28(%rsp), %rbx
	leaq	24(%rsp), %r13
.LBB5_10:                               # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_14 Depth 2
	movq	104(%rsp), %rax
	movq	-24(%rax), %rdi
	leaq	104(%rsp), %rax
	addq	%rax, %rdi
.Ltmp3:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp4:
# %bb.11:                               # %.noexc
                                        #   in Loop: Header=BB5_10 Depth=1
.Ltmp5:
	movsbl	%al, %edx
	leaq	104(%rsp), %rdi
	leaq	40(%rsp), %rsi
	callq	_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_
.Ltmp6:
# %bb.12:                               #   in Loop: Header=BB5_10 Depth=1
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB5_24
# %bb.13:                               #   in Loop: Header=BB5_10 Depth=1
.Ltmp65:
	movq	%r12, %rdi
	leaq	40(%rsp), %rsi
	movl	$24, %edx
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode
.Ltmp66:
.LBB5_14:                               #   Parent Loop BB5_10 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
.Ltmp68:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp69:
# %bb.15:                               # %_ZNSirsERf.exit
                                        #   in Loop: Header=BB5_14 Depth=2
.Ltmp70:
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_ZNSi10_M_extractIfEERSiRT_
.Ltmp71:
# %bb.16:                               #   in Loop: Header=BB5_14 Depth=2
	movq	(%rax), %rcx
	movq	-24(%rcx), %rcx
	testb	$5, 32(%rax,%rcx)
	jne	.LBB5_23
# %bb.17:                               #   in Loop: Header=BB5_14 Depth=2
	movss	28(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r14,%rbp,4)
	movss	24(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r15,%rbp,4)
	jmp	.LBB5_14
.LBB5_23:                               #   in Loop: Header=BB5_10 Depth=1
	incq	%rbp
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	movq	%r12, %rdi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	752(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
	jmp	.LBB5_10
.LBB5_24:
.Ltmp8:
	leaq	104(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv
.Ltmp9:
# %bb.25:                               # %.preheader192
	movq	16(%rsp), %r12
	xorl	%ebx, %ebx
	movl	$40000, %edx                    # imm = 0x9C40
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	memset@PLT
.LBB5_26:                               # =>This Inner Loop Header: Depth=1
	cvttss2si	(%r14,%rbx,4), %eax
	cvttss2si	(%r15,%rbx,4), %ecx
	imull	$100, %ecx, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	movl	$1065353216, (%r12,%rax,4)      # imm = 0x3F800000
	incq	%rbx
	cmpq	$291, %rbx                      # imm = 0x123
	jne	.LBB5_26
# %bb.27:                               # %.lr.ph.preheader.i.preheader
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
	movq	%r12, %rcx
	movq	32(%rsp), %r8                   # 8-byte Reload
.LBB5_28:                               # %.lr.ph.preheader.i
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_29 Depth 2
	xorl	%esi, %esi
	xorl	%edx, %edx
.LBB5_29:                               # %.lr.ph.i
                                        #   Parent Loop BB5_28 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rsi), %xmm1              # xmm1 = mem[0],zero,zero,zero
	xorl	%edi, %edi
	ucomiss	%xmm0, %xmm1
	seta	%dil
	addl	%edi, %edx
	addq	$400, %rsi                      # imm = 0x190
	cmpq	$40000, %rsi                    # imm = 0x9C40
	jne	.LBB5_29
# %bb.30:                               # %._crit_edge.i
                                        #   in Loop: Header=BB5_28 Depth=1
	xorps	%xmm1, %xmm1
	cvtsi2ss	%edx, %xmm1
	movss	%xmm1, (%r8,%rax,4)
	incq	%rax
	addq	$4, %rcx
	cmpq	$100, %rax
	jne	.LBB5_28
# %bb.31:                               # %_Z6lengthPfS_i.exit.preheader
	xorl	%eax, %eax
	xorps	%xmm0, %xmm0
	movss	.LCPI5_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	movq	%r12, %rcx
.LBB5_32:                               # %_Z6lengthPfS_i.exit
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_33 Depth 2
                                        #     Child Loop BB5_34 Depth 2
	movss	(%r8,%rax,4), %xmm2             # xmm2 = mem[0],zero,zero,zero
	xorl	%edx, %edx
	ucomiss	%xmm0, %xmm2
	jbe	.LBB5_33
.LBB5_34:                               # %.lr.ph36.i
                                        #   Parent Loop BB5_32 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rdx), %xmm3              # xmm3 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm3
	divss	%xmm2, %xmm3
	movss	%xmm3, (%rcx,%rdx)
	addq	$400, %rdx                      # imm = 0x190
	cmpq	$40000, %rdx                    # imm = 0x9C40
	jne	.LBB5_34
	jmp	.LBB5_35
.LBB5_33:                               # %.lr.ph.i134
                                        #   Parent Loop BB5_32 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	$1007371158, (%rcx,%rdx)        # imm = 0x3C0B4396
	addq	$400, %rdx                      # imm = 0x190
	cmpq	$40000, %rdx                    # imm = 0x9C40
	jne	.LBB5_33
.LBB5_35:                               # %.loopexit.i
                                        #   in Loop: Header=BB5_32 Depth=1
	incq	%rax
	addq	$4, %rcx
	cmpq	$100, %rax
	jne	.LBB5_32
# %bb.36:                               # %_Z10stochasticPfS_fi.exit
	movss	.LCPI5_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movq	%r12, %rdi
	movl	$100, %esi
	callq	_Z11transmatrixPffi
.Ltmp11:
	movabsq	$17179869188, %rdi              # imm = 0x400000004
	movabsq	$137438953504, %rdx             # imm = 0x2000000020
	movl	$1, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp12:
# %bb.37:
	testl	%eax, %eax
	jne	.LBB5_39
# %bb.38:
	movq	16(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
.Ltmp13:
	movl	$100, %ecx
	movl	$15, %r8d
	callq	_Z25__device_stub__matrixmultPfS_S_ii
.Ltmp14:
.LBB5_39:
.Ltmp15:
	callq	hipDeviceSynchronize
.Ltmp16:
# %bb.40:                               # %.preheader188.preheader
	movl	$4, %r12d
	xorl	%r13d, %r13d
	movabsq	$17179869188, %r14              # imm = 0x400000004
	movabsq	$137438953504, %r15             # imm = 0x2000000020
	xorl	%ebx, %ebx
.LBB5_41:                               # %.preheader188
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB5_42 Depth 2
                                        #     Child Loop BB5_45 Depth 2
	movq	8(%rsp), %rax
	movq	(%rsp), %rdx
	leaq	(%rax,%r13), %rsi
	leaq	(%rdx,%r13), %rcx
	xorps	%xmm0, %xmm0
	xorl	%edi, %edi
.LBB5_42:                               # %.lr.ph.i141
                                        #   Parent Loop BB5_41 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rdi), %xmm1              # xmm1 = mem[0],zero,zero,zero
	subss	(%rsi,%rdi), %xmm1
	mulss	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	addq	$60, %rdi
	cmpq	$6000, %rdi                     # imm = 0x1770
	jne	.LBB5_42
# %bb.43:                               # %_Z5errorPfS_ffiii.exit
                                        #   in Loop: Header=BB5_41 Depth=1
	movss	.LCPI5_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	ja	.LBB5_51
# %bb.44:                               # %.preheader187
                                        #   in Loop: Header=BB5_41 Depth=1
	addq	%r12, %rax
	xorl	%edx, %edx
.LBB5_45:                               #   Parent Loop BB5_41 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	(%rcx,%rdx), %xmm0              # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rax,%rdx)
	addq	$60, %rdx
	cmpq	$6000, %rdx                     # imm = 0x1770
	jne	.LBB5_45
# %bb.46:                               #   in Loop: Header=BB5_41 Depth=1
.Ltmp58:
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
.Ltmp59:
# %bb.47:                               #   in Loop: Header=BB5_41 Depth=1
	testl	%eax, %eax
	jne	.LBB5_49
# %bb.48:                               #   in Loop: Header=BB5_41 Depth=1
	movq	16(%rsp), %rdi
	movq	8(%rsp), %rsi
	movq	(%rsp), %rdx
.Ltmp60:
	movl	$100, %ecx
	movl	$15, %r8d
	callq	_Z25__device_stub__matrixmultPfS_S_ii
.Ltmp61:
.LBB5_49:                               #   in Loop: Header=BB5_41 Depth=1
.Ltmp62:
	callq	hipDeviceSynchronize
.Ltmp63:
# %bb.50:                               #   in Loop: Header=BB5_41 Depth=1
	incq	%rbx
	addq	$4, %r13
	addq	$4, %r12
	jmp	.LBB5_41
.LBB5_51:                               # %.preheader
	movl	%ebx, %eax
	leaq	(%rdx,%rax,4), %rax
	xorps	%xmm0, %xmm0
	movq	$-6000, %rcx                    # imm = 0xE890
.LBB5_52:                               # =>This Inner Loop Header: Depth=1
	xorps	%xmm1, %xmm1
	cvtss2sd	6000(%rax,%rcx), %xmm1
	addsd	%xmm1, %xmm0
	addq	$60, %rcx
	jne	.LBB5_52
# %bb.53:
.Ltmp18:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp19:
# %bb.54:                               # %_ZNSolsEd.exit
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%r14, %rdi
.Ltmp20:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp21:
# %bb.55:                               # %.noexc162
.Ltmp22:
	movsbl	%al, %esi
	movq	%r14, %rdi
	callq	_ZNSo3putEc
.Ltmp23:
# %bb.56:                               # %.noexc163
.Ltmp24:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp25:
# %bb.57:                               # %_ZNSolsEPFRSoS_E.exit
.Ltmp26:
	movl	$_ZSt4cout, %edi
	movl	$.L.str.2, %esi
	movl	$35, %edx
	callq	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l
.Ltmp27:
# %bb.58:                               # %_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.exit
.Ltmp28:
	movl	$_ZSt4cout, %edi
	movl	%ebx, %esi
	callq	_ZNSolsEi
.Ltmp29:
# %bb.59:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp30:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp31:
# %bb.60:                               # %.noexc165
.Ltmp32:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp33:
# %bb.61:                               # %.noexc166
.Ltmp34:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp35:
# %bb.62:                               # %_ZNSolsEPFRSoS_E.exit150
	movq	_ZSt4cout(%rip), %rax
	movl	$_ZSt4cout, %edi
	addq	-24(%rax), %rdi
.Ltmp36:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp37:
# %bb.63:                               # %.noexc169
.Ltmp38:
	movsbl	%al, %esi
	movl	$_ZSt4cout, %edi
	callq	_ZNSo3putEc
.Ltmp39:
# %bb.64:                               # %.noexc170
.Ltmp40:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp41:
# %bb.65:                               # %_ZNSolsEPFRSoS_E.exit152
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp42:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp43:
# %bb.66:                               # %.noexc173
.Ltmp44:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp45:
# %bb.67:                               # %.noexc174
.Ltmp46:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp47:
# %bb.68:                               # %_ZNSolsEPFRSoS_E.exit154
	leaq	88(%rsp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	gettimeofday
	movq	(%rbx), %rax
	subq	72(%rsp), %rax
	cvtsi2sd	%rax, %xmm1
	mulsd	.LCPI5_2(%rip), %xmm1
	cvtsi2sdq	8(%rbx), %xmm0
	addsd	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	cvtsi2sdq	80(%rsp), %xmm1
	subsd	%xmm1, %xmm0
	movsd	.LCPI5_3(%rip), %xmm1           # xmm1 = mem[0],zero
	divsd	%xmm1, %xmm0
	divsd	%xmm1, %xmm0
.Ltmp49:
	movl	$_ZSt4cout, %edi
	callq	_ZNSo9_M_insertIdEERSoT_
.Ltmp50:
# %bb.69:                               # %_ZNSolsEd.exit156
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	-24(%rax), %rdi
	addq	%rbx, %rdi
.Ltmp51:
	movl	$10, %esi
	callq	_ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc
.Ltmp52:
# %bb.70:                               # %.noexc177
.Ltmp53:
	movsbl	%al, %esi
	movq	%rbx, %rdi
	callq	_ZNSo3putEc
.Ltmp54:
# %bb.71:                               # %.noexc178
.Ltmp55:
	movq	%rax, %rdi
	callq	_ZNSo5flushEv
.Ltmp56:
# %bb.72:                               # %_ZNSolsEPFRSoS_E.exit158
	leaq	104(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB5_74
# %bb.73:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i
	callq	_ZdlPv
.LBB5_74:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit
	xorl	%eax, %eax
	addq	$1016, %rsp                     # imm = 0x3F8
	.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
.LBB5_1:
	.cfi_def_cfa_offset 1072
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.3, %esi
	movl	$.L.str, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$141, %r8d
	jmp	.LBB5_2
.LBB5_4:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.3, %esi
	movl	$.L.str, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$142, %r8d
	jmp	.LBB5_2
.LBB5_83:
	movl	%eax, %ebx
	movq	stderr(%rip), %r14
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.3, %esi
	movl	$.L.str, %ecx
	movq	%r14, %rdi
	movq	%rax, %rdx
	movl	$143, %r8d
.LBB5_2:
	xorl	%eax, %eax
	callq	fprintf
	movl	%ebx, %edi
	callq	exit
.LBB5_20:                               # %.loopexit.split-lp
.Ltmp10:
	jmp	.LBB5_77
.LBB5_18:
.Ltmp2:
	movq	%rax, %rbx
	jmp	.LBB5_79
.LBB5_84:
.Ltmp17:
	jmp	.LBB5_77
.LBB5_76:
.Ltmp57:
	jmp	.LBB5_77
.LBB5_75:
.Ltmp48:
	jmp	.LBB5_77
.LBB5_21:
.Ltmp67:
	jmp	.LBB5_77
.LBB5_19:                               # %.loopexit
.Ltmp7:
	jmp	.LBB5_77
.LBB5_82:
.Ltmp64:
.LBB5_77:
	movq	%rax, %rbx
	jmp	.LBB5_78
.LBB5_22:
.Ltmp72:
	movq	%rax, %rbx
	leaq	624(%rsp), %rdi
	movl	$_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE, %esi
	callq	_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev
	leaq	752(%rsp), %rdi
	callq	_ZNSt8ios_baseD2Ev
.LBB5_78:
	leaq	104(%rsp), %rdi
	callq	_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev
.LBB5_79:
	movq	40(%rsp), %rdi
	leaq	56(%rsp), %rax
	cmpq	%rax, %rdi
	je	.LBB5_81
# %bb.80:                               # %_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE11_M_is_localEv.exit.i.i159
	callq	_ZdlPv
.LBB5_81:                               # %_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev.exit161
	movq	%rbx, %rdi
	callq	_Unwind_Resume@PLT
.Lfunc_end5:
	.size	main, .Lfunc_end5-main
	.cfi_endproc
	.section	.gcc_except_table,"a",@progbits
	.p2align	2, 0x0
GCC_except_table5:
.Lexception0:
	.byte	255                             # @LPStart Encoding = omit
	.byte	255                             # @TType Encoding = omit
	.byte	1                               # Call site Encoding = uleb128
	.uleb128 .Lcst_end0-.Lcst_begin0
.Lcst_begin0:
	.uleb128 .Lfunc_begin0-.Lfunc_begin0    # >> Call Site 1 <<
	.uleb128 .Ltmp0-.Lfunc_begin0           #   Call between .Lfunc_begin0 and .Ltmp0
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp0-.Lfunc_begin0           # >> Call Site 2 <<
	.uleb128 .Ltmp1-.Ltmp0                  #   Call between .Ltmp0 and .Ltmp1
	.uleb128 .Ltmp2-.Lfunc_begin0           #     jumps to .Ltmp2
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp3-.Lfunc_begin0           # >> Call Site 3 <<
	.uleb128 .Ltmp6-.Ltmp3                  #   Call between .Ltmp3 and .Ltmp6
	.uleb128 .Ltmp7-.Lfunc_begin0           #     jumps to .Ltmp7
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp65-.Lfunc_begin0          # >> Call Site 4 <<
	.uleb128 .Ltmp66-.Ltmp65                #   Call between .Ltmp65 and .Ltmp66
	.uleb128 .Ltmp67-.Lfunc_begin0          #     jumps to .Ltmp67
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp68-.Lfunc_begin0          # >> Call Site 5 <<
	.uleb128 .Ltmp71-.Ltmp68                #   Call between .Ltmp68 and .Ltmp71
	.uleb128 .Ltmp72-.Lfunc_begin0          #     jumps to .Ltmp72
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp8-.Lfunc_begin0           # >> Call Site 6 <<
	.uleb128 .Ltmp9-.Ltmp8                  #   Call between .Ltmp8 and .Ltmp9
	.uleb128 .Ltmp10-.Lfunc_begin0          #     jumps to .Ltmp10
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp9-.Lfunc_begin0           # >> Call Site 7 <<
	.uleb128 .Ltmp11-.Ltmp9                 #   Call between .Ltmp9 and .Ltmp11
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp11-.Lfunc_begin0          # >> Call Site 8 <<
	.uleb128 .Ltmp16-.Ltmp11                #   Call between .Ltmp11 and .Ltmp16
	.uleb128 .Ltmp17-.Lfunc_begin0          #     jumps to .Ltmp17
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp58-.Lfunc_begin0          # >> Call Site 9 <<
	.uleb128 .Ltmp63-.Ltmp58                #   Call between .Ltmp58 and .Ltmp63
	.uleb128 .Ltmp64-.Lfunc_begin0          #     jumps to .Ltmp64
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp18-.Lfunc_begin0          # >> Call Site 10 <<
	.uleb128 .Ltmp47-.Ltmp18                #   Call between .Ltmp18 and .Ltmp47
	.uleb128 .Ltmp48-.Lfunc_begin0          #     jumps to .Ltmp48
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp49-.Lfunc_begin0          # >> Call Site 11 <<
	.uleb128 .Ltmp56-.Ltmp49                #   Call between .Ltmp49 and .Ltmp56
	.uleb128 .Ltmp57-.Lfunc_begin0          #     jumps to .Ltmp57
	.byte	0                               #   On action: cleanup
	.uleb128 .Ltmp56-.Lfunc_begin0          # >> Call Site 12 <<
	.uleb128 .Lfunc_end5-.Ltmp56            #   Call between .Ltmp56 and .Lfunc_end5
	.byte	0                               #     has no landing pad
	.byte	0                               #   On action: cleanup
.Lcst_end0:
	.p2align	2, 0x0
                                        # -- End function
	.text
	.p2align	4, 0x90                         # -- Begin function __hip_module_ctor
	.type	__hip_module_ctor,@function
__hip_module_ctor:                      # @__hip_module_ctor
	.cfi_startproc
# %bb.0:
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	movq	__hip_gpubin_handle(%rip), %rdi
	testq	%rdi, %rdi
	jne	.LBB6_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rdi
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB6_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z10matrixmultPfS_S_ii, %esi
	movl	$.L__unnamed_1, %edx
	movl	$.L__unnamed_1, %ecx
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	__hipRegisterFunction
	movl	$__hip_module_dtor, %edi
	addq	$40, %rsp
	.cfi_def_cfa_offset 8
	jmp	atexit                          # TAILCALL
.Lfunc_end6:
	.size	__hip_module_ctor, .Lfunc_end6-__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	.LBB7_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
.LBB7_2:
	retq
.Lfunc_end7:
	.size	__hip_module_dtor, .Lfunc_end7-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z10matrixmultPfS_S_ii,@object  # @_Z10matrixmultPfS_S_ii
	.section	.rodata,"a",@progbits
	.globl	_Z10matrixmultPfS_S_ii
	.p2align	3, 0x0
_Z10matrixmultPfS_S_ii:
	.quad	_Z25__device_stub__matrixmultPfS_S_ii
	.size	_Z10matrixmultPfS_S_ii, 8

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"/home/ubuntu/Datasets/stackv2/train-structured-repos-hip-sm89/arpittiwari11/Parellel-Page-Rank-Algorithm/main/Project_cuda.hip"
	.size	.L.str, 127

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Barbasi.txt"
	.size	.L.str.1, 12

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Number of iterations to converge = "
	.size	.L.str.2, 36

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"GPUassert: %s %s %d\n"
	.size	.L.str.3, 21

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

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

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

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

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z10matrixmultPfS_S_ii  ; -- Begin function _Z10matrixmultPfS_S_ii
	.globl	_Z10matrixmultPfS_S_ii
	.p2align	8
	.type	_Z10matrixmultPfS_S_ii,@function
_Z10matrixmultPfS_S_ii:                 ; @_Z10matrixmultPfS_S_ii
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x2c
	s_load_b64 s[8:9], s[0:1], 0x18
	v_bfe_u32 v2, v0, 10, 10
	v_and_b32_e32 v3, 0x3ff, v0
	s_waitcnt lgkmcnt(0)
	s_lshr_b32 s3, s2, 16
	s_and_b32 s2, s2, 0xffff
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_2)
	v_mad_u64_u32 v[0:1], null, s15, s3, v[2:3]
	v_mad_u64_u32 v[1:2], null, s14, s2, v[3:4]
	v_cmp_gt_i32_e32 vcc_lo, s8, v0
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_cmp_gt_i32_e64 s2, s9, v1
	s_and_b32 s2, vcc_lo, s2
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_saveexec_b32 s3, s2
	s_cbranch_execz .LBB0_6
; %bb.1:                                ; %.preheader
	s_clause 0x1
	s_load_b128 s[4:7], s[0:1], 0x0
	s_load_b64 s[0:1], s[0:1], 0x10
	s_cmp_lt_i32 s8, 1
	s_cbranch_scc1 .LBB0_4
; %bb.2:                                ; %.lr.ph
	v_mul_lo_u32 v2, v0, s8
	v_mov_b32_e32 v6, 0
	v_mov_b32_e32 v4, v1
	s_delay_alu instid0(VALU_DEP_3) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[2:3], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v2, vcc_lo, s4, v2
	v_add_co_ci_u32_e32 v3, vcc_lo, s5, v3, vcc_lo
.LBB0_3:                                ; =>This Inner Loop Header: Depth=1
	v_ashrrev_i32_e32 v5, 31, v4
	s_add_i32 s8, s8, -1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	s_cmp_eq_u32 s8, 0
	v_lshlrev_b64 v[7:8], 2, v[4:5]
	v_add_nc_u32_e32 v4, s9, v4
	s_delay_alu instid0(VALU_DEP_2) | instskip(NEXT) | instid1(VALU_DEP_3)
	v_add_co_u32 v7, vcc_lo, s6, v7
	v_add_co_ci_u32_e32 v8, vcc_lo, s7, v8, vcc_lo
	global_load_b32 v5, v[2:3], off
	global_load_b32 v7, v[7:8], off
	v_add_co_u32 v2, vcc_lo, v2, 4
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v3, vcc_lo
	s_waitcnt vmcnt(0)
	v_fmac_f32_e32 v6, v5, v7
	s_cbranch_scc0 .LBB0_3
	s_branch .LBB0_5
.LBB0_4:
	v_mov_b32_e32 v6, 0
.LBB0_5:                                ; %Flow51
	v_mad_u64_u32 v[2:3], null, v0, s9, v[1:2]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_ashrrev_i32_e32 v3, 31, v2
	v_lshlrev_b64 v[0:1], 2, v[2:3]
	s_waitcnt lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_2)
	v_add_co_u32 v0, vcc_lo, s0, v0
	v_add_co_ci_u32_e32 v1, vcc_lo, s1, v1, vcc_lo
	global_store_b32 v[0:1], v6, off
.LBB0_6:
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z10matrixmultPfS_S_ii
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 288
		.amdhsa_user_sgpr_count 14
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 1
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 1
		.amdhsa_next_free_vgpr 9
		.amdhsa_next_free_sgpr 16
		.amdhsa_float_round_mode_32 0
		.amdhsa_float_round_mode_16_64 0
		.amdhsa_float_denorm_mode_32 3
		.amdhsa_float_denorm_mode_16_64 3
		.amdhsa_dx10_clamp 1
		.amdhsa_ieee_mode 1
		.amdhsa_fp16_overflow 0
		.amdhsa_workgroup_processor_mode 1
		.amdhsa_memory_ordered 1
		.amdhsa_forward_progress 0
		.amdhsa_shared_vgpr_count 0
		.amdhsa_exception_fp_ieee_invalid_op 0
		.amdhsa_exception_fp_denorm_src 0
		.amdhsa_exception_fp_ieee_div_zero 0
		.amdhsa_exception_fp_ieee_overflow 0
		.amdhsa_exception_fp_ieee_underflow 0
		.amdhsa_exception_fp_ieee_inexact 0
		.amdhsa_exception_int_div_zero 0
	.end_amdhsa_kernel
	.text
.Lfunc_end0:
	.size	_Z10matrixmultPfS_S_ii, .Lfunc_end0-_Z10matrixmultPfS_S_ii
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 340
; NumSgprs: 18
; NumVgprs: 9
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 2
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 18
; NumVGPRsForWavesPerEU: 9
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 14
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 1
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

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

	.end_amdgpu_metadata
