#include <stdio.h>

// For the CUDA runtime routines (prefixed with "cuda_")
#include <cuda_runtime.h>


typedef struct vertex vertex;

struct vertex {
    unsigned int vertex_id;
    float pagerank;
    float pagerank_next;
    unsigned int n_successors;
    vertex ** successors;
};

float abs_float(float in) {
  if (in >= 0)
    return in;
  else
    return -in;
}


__global__ void setPagerankNextToZero(vertex * vertices) {
    int i = threadIdx.x;
    
    vertices[i].pagerank_next = 0;
}

__global__ void initializePageranks(vertex * vertices, int n_vertices) {
    int i = threadIdx.x;
    
    vertices[i].pagerank = 1.0/(float)n_vertices;
}


__global__ void addToNextPagerank(vertex * vertices, float * dangling_value) {
    int i = threadIdx.x;
    int j;

    if(vertices[i].n_successors > 0) {
        for(j = 0; j < vertices[i].n_successors; j++) {
            atomicAdd(&(vertices[i].successors[j]->pagerank_next), 0.85*(vertices[i].pagerank)/vertices[i].n_successors);
        }
    }else {
        atomicAdd(dangling_value, 0.85*vertices[i].pagerank);
    }
}

__global__ void finalPagerankForIteration(vertex * vertices, int n_vertices, float dangling_value){
    int i = threadIdx.x;

    vertices[i].pagerank_next += (dangling_value + (1-0.85))/((float)n_vertices);
    
}

__global__ void setPageranksFromNext(vertex * vertices) {
    int i = threadIdx.x;

    vertices[i].pagerank = vertices[i].pagerank_next;
}


int main(void) {
    // Error code to check return values for CUDA calls
    cudaError_t err = cudaSuccess;

/*************************************************************************/
    // build up the graph
    int i,j;
    unsigned int n_vertices = 0;
    unsigned int n_edges = 0;
    unsigned int vertex_from = 0, vertex_to = 0;

    vertex * vertices;

    FILE * fp;
    if ((fp = fopen("testInput.txt", "r")) == NULL) {
        fprintf(stderr,"ERROR: Could not open input file.\n");
        exit(-1);
     }

    // parse input file to count the number of vertices
    // expected format: vertex_from vertex_to
    while (fscanf(fp, "%u %u", &vertex_from, &vertex_to) != EOF) {
        if (vertex_from > n_vertices)
            n_vertices = vertex_from;
        else if (vertex_to > n_vertices)
            n_vertices = vertex_to;
    }
    n_vertices++;
    
    // CALC NUMBER OF OUTGOING LINKS PER PAGE ***********************************
    unsigned int * outgoingLinks = (unsigned int *) calloc(n_vertices,sizeof(unsigned int)); 
    fseek(fp,0L, SEEK_SET);
    while(fscanf(fp,"%u %u", &vertex_from, &vertex_to) != EOF) {
        outgoingLinks[vertex_from] += 1;
    }

    // allocate memory for vertices
    //vertices = (vertex *)malloc(n_vertices*sizeof(vertex));
    err = cudaMallocManaged((void **)&vertices, n_vertices*sizeof(vertex));
    // err = cudaMemcpy(d_vertices, vertices, sizeOfVertices, cudaMemcpyHostToDevice);

    // SET Initial values  **********************************************************
    unsigned int n_iterations = 25;
    float alpha = 0.85;
    float eps   = 0.000001;
   

    if (!vertices) {
        fprintf(stderr,"Malloc failed for vertices.\n");
        exit(-1);
    }
    memset((void *)vertices, 0, (size_t)(n_vertices*sizeof(vertex)));

    // parse input file to count the number of successors of each vertex
    fseek(fp, 0L, SEEK_SET);
    while (fscanf(fp, "%u %u", &vertex_from, &vertex_to) != EOF) {
        vertices[vertex_from].n_successors++;
        n_edges++;
    }

    // allocate memory for successor pointers
    for (i=0; i<n_vertices; i++) {
        vertices[i].vertex_id = i;
        if (vertices[i].n_successors > 0) {
            // vertices[i].successors = (vertex **)malloc(vertices[i].n_successors*sizeof(vertex *));
            err = cudaMallocManaged((void***)&vertices[i].successors,vertices[i].n_successors*sizeof(vertex*));
            if (!vertices[i].successors) {
                fprintf(stderr,"Malloc failed for successors of vertex %d.\n",i);
                exit(-1);
            }
            memset((void *)vertices[i].successors, 0, (size_t)(vertices[i].n_successors*sizeof(vertex *)));
        }
        else
            vertices[i].successors = NULL;
    }

    // parse input file to set up the successor pointers
    fseek(fp, 0L, SEEK_SET);
    while (fscanf(fp, "%d %d", &vertex_from, &vertex_to) != EOF) {
        for (i=0; i<vertices[vertex_from].n_successors; i++) {
            if (vertices[vertex_from].successors[i] == NULL) {
                vertices[vertex_from].successors[i] = &vertices[vertex_to];
                break;
            }
            else if (i==vertices[vertex_from].n_successors-1) {
                printf("Setting up the successor pointers of virtex %u failed",vertex_from);
                return -1;
            }
        }
    }

    fclose(fp);

    // PRINT THE DATASTRUCTURE
    /* for(i = 0; i < n_vertices; i++) {
            printf("Page: %d, Suc: ", (vertices+i)->vertex_id);
        
        
            for(j = 0; j < (vertices+i)->n_successors; j++) {
                printf("%d, ",(vertices+i)->successors[j]->vertex_id);
            }
            printf("\n");
        }*/   

  /*************************************************************************/
    // compute the pagerank on the GPU

    float dangling_value_h = 0;
    float * dangling_value_d;
    
    err = cudaMalloc((void **)&dangling_value_d, sizeof(float));
    err = cudaMemcpy(dangling_value_d, &dangling_value_h, sizeof(float), cudaMemcpyHostToDevice);
    //err = cudaMallocManaged((void *)&dangling_value, sizeof(float));

    initializePageranks<<<1,46>>>(vertices, n_vertices);
    cudaDeviceSynchronize();
    
    for(i = 0; i < 23; i++) {
        // set the next pagerank values to 0
        setPagerankNextToZero<<<1,46>>>(vertices);
        cudaDeviceSynchronize();
       
        // set the dangling value to 0 
        dangling_value_h = 0;
        err = cudaMemcpy(dangling_value_d, &dangling_value_h, sizeof(float), cudaMemcpyHostToDevice);
        
        // initial parallel pagerank_next computation
        addToNextPagerank<<<1,46>>>(vertices, dangling_value_d);
        cudaDeviceSynchronize();

        // get the dangling value
        err = cudaMemcpy(&dangling_value_h, dangling_value_d, sizeof(float), cudaMemcpyDeviceToHost);
        printf("the dangling_value is now: %.3f\n",dangling_value_h);
 
        // final parallel pagerank_next computation
        finalPagerankForIteration<<<1,46>>>(vertices, n_vertices, dangling_value_h);
         cudaDeviceSynchronize();

        setPageranksFromNext<<<1,46>>>(vertices);
        cudaDeviceSynchronize(); 
    }


    // print the pagerank values computed on the GPU
    for (i=0;i<n_vertices;i++) {
        printf("AFTER GPU | Vertex %u:\tpagerank = %.6f\n", i, vertices[i].pagerank);
    }

/*****************************************************************************************/ 
  // Compute pagerank on host using old method for comparison purposes
    unsigned int i_iteration;

    float value, diff;
    float pr_dangling_factor = alpha / (float)n_vertices;   // pagerank to redistribute from dangling nodes
    float pr_dangling;
    float pr_random_factor = (1-alpha) / (float)n_vertices; // random portion of the pagerank
    float pr_random;
    float pr_sum, pr_sum_inv, pr_sum_dangling;
    float temp;

    // initialization of values before pagerank loop
    for (i=0;i<n_vertices;i++) {
        vertices[i].pagerank = 1 / (float)n_vertices;
        vertices[i].pagerank_next =  0;
    }

    pr_sum = 0;
    pr_sum_dangling = 0;
    for (i=0; i<n_vertices; i++) {
        pr_sum += vertices[i].pagerank;
        if (!vertices[i].n_successors)
            pr_sum_dangling += vertices[i].pagerank;
    }

    i_iteration = 0;
    diff = eps+1;
    //****** transfer data structure to CUDA memory ************************************************ 
    // NOTE: CAN PROBABLY REMOVE THIS SECTION FOR NOW

    /*size_t sizeOfVertices = n_vertices * sizeof(struct vertex);
    vertex *d_vertices = NULL;
    err = cudaMalloc((void **)&d_vertices, sizeOfVertices);
    err = cudaMemcpy(d_vertices, vertices, sizeOfVertices, cudaMemcpyHostToDevice);
    
    
    
    vertex ** d_testVar;
    cudaMalloc(&d_testVar, 3*sizeof(vertex*));
    cudaMemcpy(d_testVar, vertices[0].successors, 3*sizeof(vertex*), cudaMemcpyHostToDevice);
    cudaMemcpy(&(d_vertices[0].successors),&d_testVar,sizeof(vertex**), cudaMemcpyHostToDevice);
    */


    //********************************************************************************************* 
    while ( (diff > eps) && (i_iteration < n_iterations) ) {

        for (i=0;i<n_vertices;i++) {
            if (vertices[i].n_successors)
                value = (alpha/vertices[i].n_successors)*vertices[i].pagerank;  //value = vote value after splitting equally
            else
                value = 0;
            //printf("vertex %d: value = %.6f \n",i,value);
            for (j=0;j<vertices[i].n_successors;j++) {               // pagerank_next = sum of votes linking to it
                vertices[i].successors[j]->pagerank_next += value;
            }
        }
    
        // for normalization
        pr_sum_inv = 1/pr_sum;

        // alpha
        pr_dangling = pr_dangling_factor * pr_sum_dangling;
        pr_random = pr_random_factor * pr_sum;

        pr_sum = 0;
        pr_sum_dangling = 0;

        diff = 0;
        for (i=0;i<n_vertices;i++) {
            // update pagerank
            temp = vertices[i].pagerank;
            vertices[i].pagerank = vertices[i].pagerank_next*pr_sum_inv + pr_dangling + pr_random;
            vertices[i].pagerank_next = 0;

            // for normalization in next cycle
            pr_sum += vertices[i].pagerank;
            if (!vertices[i].n_successors)
                pr_sum_dangling += vertices[i].pagerank;

            // convergence
            diff += abs_float(temp - vertices[i].pagerank);
        }
        printf("Iteration %u:\t diff = %.12f\n", i_iteration, diff);

        i_iteration++;
    }

 /*************************************************************************/
   // print the pageranks from this host computation
   for (i=0;i<n_vertices;i++) {
     printf("Vertex %u:\tpagerank = %.6f\n", i, vertices[i].pagerank);
   }
  /*************************************************************************/

    // Free device global memory
    // err = cudaFree(d_A);

    // Free host memory
    // free(h_A);

    // Reset the device and exit
    // cudaDeviceReset causes the driver to clean up all state. While
    // not mandatory in normal operation, it is good practice.  It is also
    // needed to ensure correct operation when the application is being
    // profiled. Calling cudaDeviceReset causes all profile data to be
    // flushed before the application exits
    err = cudaDeviceReset();

    if (err != cudaSuccess)
    {
        fprintf(stderr, "Failed to deinitialize the device! error=%s\n", cudaGetErrorString(err));
        exit(EXIT_FAILURE);
    }

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


	.file	"tmpxft_002c66bf_00000000-6_pagerank_linked.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z9abs_floatf
	.type	_Z9abs_floatf, @function
_Z9abs_floatf:
.LFB2027:
	.cfi_startproc
	endbr64
	xorps	%xmm1, %xmm1
	comiss	%xmm1, %xmm0
	jnb	.L3
	xorps	.LC1(%rip), %xmm0
.L3:
	ret
	.cfi_endproc
.LFE2027:
	.size	_Z9abs_floatf, .-_Z9abs_floatf
	.globl	_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex
	.type	_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex, @function
_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex:
.LFB2053:
	.cfi_startproc
	endbr64
	subq	$104, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	44(%rsp), %rsi
	leaq	32(%rsp), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L5
	pushq	24(%rsp)
	.cfi_def_cfa_offset 120
	leaq	_Z21setPagerankNextToZeroP6vertex(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 128
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 120
	popq	%rdx
	.cfi_def_cfa_offset 112
.L5:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	addq	$104, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2053:
	.size	_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex, .-_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex
	.globl	_Z21setPagerankNextToZeroP6vertex
	.type	_Z21setPagerankNextToZeroP6vertex, @function
_Z21setPagerankNextToZeroP6vertex:
.LFB2054:
	.cfi_startproc
	endbr64
	jmp	_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex
	.cfi_endproc
.LFE2054:
	.size	_Z21setPagerankNextToZeroP6vertex, .-_Z21setPagerankNextToZeroP6vertex
	.globl	_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi
	.type	_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi, @function
_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi:
.LFB2055:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	32(%rsp), %rcx
	leaq	24(%rsp), %rdx
	movl	%esi, 4(%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)
	leaq	4(%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	.L10
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z19initializePageranksP6vertexi(%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
.L10:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2055:
	.size	_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi, .-_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi
	.globl	_Z19initializePageranksP6vertexi
	.type	_Z19initializePageranksP6vertexi, @function
_Z19initializePageranksP6vertexi:
.LFB2056:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi
	.cfi_endproc
.LFE2056:
	.size	_Z19initializePageranksP6vertexi, .-_Z19initializePageranksP6vertexi
	.globl	_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf
	.type	_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf, @function
_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf:
.LFB2057:
	.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	.L15
	pushq	32(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z17addToNextPagerankP6vertexPf(%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
.L15:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2057:
	.size	_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf, .-_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf
	.globl	_Z17addToNextPagerankP6vertexPf
	.type	_Z17addToNextPagerankP6vertexPf, @function
_Z17addToNextPagerankP6vertexPf:
.LFB2058:
	.cfi_startproc
	endbr64
	jmp	_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf
	.cfi_endproc
.LFE2058:
	.size	_Z17addToNextPagerankP6vertexPf, .-_Z17addToNextPagerankP6vertexPf
	.globl	_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif
	.type	_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif, @function
_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif:
.LFB2059:
	.cfi_startproc
	endbr64
	subq	$120, %rsp
	.cfi_def_cfa_offset 128
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	movl	%esi, 4(%rsp)
	leaq	32(%rsp), %rdi
	leaq	44(%rsp), %rsi
	movss	%xmm0, (%rsp)
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	leaq	4(%rsp), %rax
	movq	%rax, 88(%rsp)
	movq	%rsp, %rax
	movq	%rax, 96(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L20
	pushq	24(%rsp)
	.cfi_def_cfa_offset 136
	leaq	_Z25finalPagerankForIterationP6vertexif(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 144
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 136
	popq	%rdx
	.cfi_def_cfa_offset 128
.L20:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	addq	$120, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2059:
	.size	_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif, .-_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif
	.globl	_Z25finalPagerankForIterationP6vertexif
	.type	_Z25finalPagerankForIterationP6vertexif, @function
_Z25finalPagerankForIterationP6vertexif:
.LFB2060:
	.cfi_startproc
	endbr64
	jmp	_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif
	.cfi_endproc
.LFE2060:
	.size	_Z25finalPagerankForIterationP6vertexif, .-_Z25finalPagerankForIterationP6vertexif
	.globl	_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex
	.type	_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex, @function
_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex:
.LFB2061:
	.cfi_startproc
	endbr64
	subq	$104, %rsp
	.cfi_def_cfa_offset 112
	movq	%rdi, 8(%rsp)
	leaq	24(%rsp), %rcx
	leaq	16(%rsp), %rdx
	leaq	44(%rsp), %rsi
	leaq	32(%rsp), %rdi
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	leaq	8(%rsp), %rax
	movl	$1, 40(%rsp)
	movq	%rax, 80(%rsp)
	movabsq	$4294967297, %rax
	movq	%rax, 32(%rsp)
	movq	%rax, 44(%rsp)
	movl	$1, 52(%rsp)
	call	__cudaPopCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L25
	pushq	24(%rsp)
	.cfi_def_cfa_offset 120
	leaq	_Z20setPageranksFromNextP6vertex(%rip), %rdi
	pushq	24(%rsp)
	.cfi_def_cfa_offset 128
	movq	60(%rsp), %rcx
	movl	68(%rsp), %r8d
	movq	48(%rsp), %rsi
	movl	56(%rsp), %edx
	leaq	96(%rsp), %r9
	call	cudaLaunchKernel@PLT
	popq	%rax
	.cfi_def_cfa_offset 120
	popq	%rdx
	.cfi_def_cfa_offset 112
.L25:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	addq	$104, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2061:
	.size	_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex, .-_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex
	.globl	_Z20setPageranksFromNextP6vertex
	.type	_Z20setPageranksFromNextP6vertex, @function
_Z20setPageranksFromNextP6vertex:
.LFB2062:
	.cfi_startproc
	endbr64
	jmp	_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex
	.cfi_endproc
.LFE2062:
	.size	_Z20setPageranksFromNextP6vertex, .-_Z20setPageranksFromNextP6vertex
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"r"
.LC3:
	.string	"testInput.txt"
.LC4:
	.string	"ERROR: Could not open input file.\n"
.LC5:
	.string	"%u %u"
.LC6:
	.string	"Malloc failed for vertices.\n"
.LC7:
	.string	"Malloc failed for successors of vertex %d.\n"
.LC8:
	.string	"Setting up the successor pointers of virtex %u failed"
.LC9:
	.string	"%d %d"
.LC10:
	.string	"the dangling_value is now: %.3f\n"
.LC11:
	.string	"AFTER GPU | Vertex %u:\tpagerank = %.6f\n"
.LC15:
	.string	"Iteration %u:\t diff = %.12f\n"
.LC17:
	.string	"Vertex %u:\tpagerank = %.6f\n"
.LC18:
	.string	"Failed to deinitialize the device! error=%s\n"
.LC19:
	.string	"Done\n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%edx, %edx
	leaq	.LC2(%rip), %rsi
	leaq	.LC3(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movl	%edx, 36(%rsp)
	movl	%edx, 40(%rsp)
	call	fopen@PLT
	leaq	.LC4(%rip), %rdx
	testq	%rax, %rax
	je	.L96
	movq	%rax, %rbp
	xorl	%ebx, %ebx
	leaq	.LC5(%rip), %r15
.L31:
	leaq	40(%rsp), %rax
	leaq	36(%rsp), %r13
	movq	%r15, %rsi
	movq	%rbp, %rdi
	movq	%rax, (%rsp)
	movq	%rax, %rcx
	movq	%r13, %rdx
	xorl	%eax, %eax
	call	__isoc23_fscanf@PLT
	incl	%eax
	je	.L99
	movl	36(%rsp), %eax
	cmpl	%eax, %ebx
	jb	.L32
	movl	40(%rsp), %eax
	cmpl	%eax, %ebx
	cmovnb	%ebx, %eax
.L32:
	movl	%eax, %ebx
	jmp	.L31
.L99:
	leal	1(%rbx), %r12d
	movl	$4, %esi
	movq	%r12, %rdi
	movq	%r12, %rbx
	call	calloc@PLT
	xorl	%edx, %edx
	xorl	%esi, %esi
	movq	%rbp, %rdi
	movq	%rax, %r14
	call	fseek@PLT
.L34:
	movq	(%rsp), %rcx
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r15, %rsi
	movq	%rbp, %rdi
	call	__isoc23_fscanf@PLT
	incl	%eax
	je	.L100
	movl	36(%rsp), %eax
	incl	(%r14,%rax,4)
	jmp	.L34
.L100:
	imulq	$24, %r12, %r12
	movl	$1, %edx
	leaq	48(%rsp), %rdi
	movq	%r12, %rsi
	call	cudaMallocManaged@PLT
	movq	48(%rsp), %rdx
	testq	%rdx, %rdx
	jne	.L36
	leaq	.LC6(%rip), %rdx
.L96:
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
.L97:
	orl	$-1, %edi
.L98:
	call	exit@PLT
.L36:
	movq	%rdx, %rdi
	xorl	%eax, %eax
	movq	%r12, %rcx
	xorl	%edx, %edx
	rep stosb
	xorl	%esi, %esi
	movq	%rbp, %rdi
	call	fseek@PLT
.L37:
	movq	(%rsp), %rcx
	movq	%r13, %rdx
	movq	%r15, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc23_fscanf@PLT
	movl	%eax, %r12d
	cmpl	$-1, %eax
	je	.L101
	movl	36(%rsp), %eax
	imulq	$24, %rax, %rax
	addq	48(%rsp), %rax
	incl	12(%rax)
	jmp	.L37
.L101:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
.L39:
	movl	%r15d, %ecx
	cmpl	%ebx, %r15d
	jnb	.L102
	imulq	$24, %r15, %r8
	movq	48(%rsp), %rdi
	addq	%r8, %rdi
	movl	12(%rdi), %esi
	movl	%r15d, (%rdi)
	testl	%esi, %esi
	je	.L40
	salq	$3, %rsi
	addq	$16, %rdi
	movl	$1, %edx
	movl	%ecx, 20(%rsp)
	movq	%r8, 8(%rsp)
	call	cudaMallocManaged@PLT
	movq	8(%rsp), %r8
	addq	48(%rsp), %r8
	movq	16(%r8), %rdx
	movl	20(%rsp), %ecx
	testq	%rdx, %rdx
	jne	.L41
	movq	stderr(%rip), %rdi
	leaq	.LC7(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	jmp	.L97
.L41:
	movl	12(%r8), %ecx
	movq	%rdx, %rdi
	movl	%r14d, %eax
	salq	$3, %rcx
	rep stosb
	jmp	.L42
.L40:
	xorl	%eax, %eax
	movq	%rax, 16(%rdi)
.L42:
	incq	%r15
	jmp	.L39
.L102:
	xorl	%edx, %edx
	xorl	%esi, %esi
	leaq	.LC9(%rip), %r14
	movq	%rbp, %rdi
	call	fseek@PLT
.L49:
	movq	(%rsp), %rcx
	xorl	%eax, %eax
	movq	%r13, %rdx
	movq	%r14, %rsi
	movq	%rbp, %rdi
	call	__isoc23_fscanf@PLT
	incl	%eax
	je	.L50
	movl	36(%rsp), %eax
	movq	48(%rsp), %rsi
	xorl	%edx, %edx
	movq	%rax, %rdi
	imulq	$24, %rax, %rax
	addq	%rsi, %rax
	movl	12(%rax), %ecx
	leal	-1(%rcx), %r9d
.L51:
	movl	%edx, %r10d
	cmpl	%ecx, %edx
	jnb	.L49
	movq	16(%rax), %r8
	leaq	(%r8,%rdx,8), %r8
	cmpq	$0, (%r8)
	jne	.L45
	movl	40(%rsp), %eax
	imulq	$24, %rax, %rax
	addq	%rsi, %rax
	movq	%rax, (%r8)
	jmp	.L49
.L45:
	cmpl	%r10d, %r9d
	jne	.L46
	movl	%edi, %edx
	leaq	.LC8(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L30
.L46:
	incq	%rdx
	jmp	.L51
.L50:
	movq	%rbp, %rdi
	leaq	44(%rsp), %r14
	call	fclose@PLT
	leaq	56(%rsp), %rdi
	movl	$4, %esi
	movl	$0x00000000, 44(%rsp)
	call	cudaMalloc@PLT
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movl	$2147483671, %edx
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	addq	%rdx, %rdx
	movl	$1, %ecx
	movabsq	$4294967297, %rdi
	movl	$1, %esi
	movq	%rdx, 76(%rsp)
	movl	$1, 84(%rsp)
	movq	%rdi, 64(%rsp)
	movl	$1, 72(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L52
	movq	48(%rsp), %rdi
	movl	%ebx, %esi
	call	_Z46__device_stub__Z19initializePageranksP6vertexiP6vertexi
.L52:
	call	cudaDeviceSynchronize@PLT
	movl	$23, %ebp
	movabsq	$4294967342, %r12
	movabsq	$4294967297, %r13
	leaq	.LC10(%rip), %r15
.L57:
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r12, 76(%rsp)
	movl	$1, 84(%rsp)
	movq	%r13, 64(%rsp)
	movl	$1, 72(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L53
	movq	48(%rsp), %rdi
	call	_Z47__device_stub__Z21setPagerankNextToZeroP6vertexP6vertex
.L53:
	call	cudaDeviceSynchronize@PLT
	movq	56(%rsp), %rdi
	movl	$1, %ecx
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$0x00000000, 44(%rsp)
	call	cudaMemcpy@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r12, 76(%rsp)
	movl	$1, 84(%rsp)
	movq	%r13, 64(%rsp)
	movl	$1, 72(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L54
	movq	56(%rsp), %rsi
	movq	48(%rsp), %rdi
	call	_Z45__device_stub__Z17addToNextPagerankP6vertexPfP6vertexPf
.L54:
	call	cudaDeviceSynchronize@PLT
	movq	56(%rsp), %rsi
	movl	$2, %ecx
	movq	%r14, %rdi
	movl	$4, %edx
	call	cudaMemcpy@PLT
	movq	%r15, %rsi
	movl	$2, %edi
	movb	$1, %al
	cvtss2sd	44(%rsp), %xmm0
	call	__printf_chk@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r12, 76(%rsp)
	movl	$1, 84(%rsp)
	movq	%r13, 64(%rsp)
	movl	$1, 72(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L55
	movss	44(%rsp), %xmm0
	movq	48(%rsp), %rdi
	movl	%ebx, %esi
	call	_Z53__device_stub__Z25finalPagerankForIterationP6vertexifP6vertexif
.L55:
	call	cudaDeviceSynchronize@PLT
	xorl	%r9d, %r9d
	xorl	%r8d, %r8d
	movq	%r12, %rdx
	movl	$1, %ecx
	movq	%r13, %rdi
	movl	$1, %esi
	movq	%r12, 76(%rsp)
	movl	$1, 84(%rsp)
	movq	%r13, 64(%rsp)
	movl	$1, 72(%rsp)
	call	__cudaPushCallConfiguration@PLT
	testl	%eax, %eax
	jne	.L56
	movq	48(%rsp), %rdi
	call	_Z46__device_stub__Z20setPageranksFromNextP6vertexP6vertex
.L56:
	call	cudaDeviceSynchronize@PLT
	decl	%ebp
	jne	.L57
	xorl	%r12d, %r12d
	leaq	.LC11(%rip), %r13
.L58:
	movq	48(%rsp), %rax
	movl	%r12d, %edx
	cmpl	%ebx, %r12d
	jnb	.L103
	imulq	$24, %r12, %rcx
	movq	%r13, %rsi
	movl	$2, %edi
	incq	%r12
	cvtss2sd	4(%rax,%rcx), %xmm0
	movb	$1, %al
	call	__printf_chk@PLT
	jmp	.L58
.L103:
	cvtsi2ssl	%ebx, %xmm0
	movss	.LC13(%rip), %xmm1
	movss	.LC12(%rip), %xmm5
	xorl	%ecx, %ecx
	addq	$4, %rax
	movq	%rax, %rdx
	divss	%xmm0, %xmm1
	divss	%xmm0, %xmm5
	movss	%xmm1, 8(%rsp)
	movss	.LC14(%rip), %xmm1
	movss	%xmm5, (%rsp)
.L60:
	cmpl	%ebx, %ecx
	jnb	.L104
	movaps	%xmm1, %xmm2
	movl	$0x00000000, 4(%rdx)
	incl	%ecx
	addq	$24, %rdx
	divss	%xmm0, %xmm2
	movss	%xmm2, -24(%rdx)
	jmp	.L60
.L104:
	xorps	%xmm2, %xmm2
	xorl	%edx, %edx
	movaps	%xmm2, %xmm1
.L62:
	cmpl	%ebx, %edx
	jnb	.L65
	movss	(%rax), %xmm0
	cmpl	$0, 8(%rax)
	addss	%xmm0, %xmm1
	jne	.L63
	addss	%xmm0, %xmm2
.L63:
	incl	%edx
	addq	$24, %rax
	jmp	.L62
.L66:
	incl	%esi
	addq	$24, %rdx
.L77:
	cmpl	%ebx, %esi
	jb	.L71
	movss	.LC14(%rip), %xmm0
	movss	(%rsp), %xmm6
	xorl	%edx, %edx
	movss	8(%rsp), %xmm7
	mulss	%xmm2, %xmm6
	movaps	%xmm0, %xmm5
	xorps	%xmm2, %xmm2
	divss	%xmm1, %xmm5
	movaps	%xmm2, %xmm4
	movaps	%xmm2, %xmm8
	mulss	%xmm1, %xmm7
	movaps	%xmm2, %xmm1
.L72:
	cmpl	%ebx, %edx
	jb	.L75
	movl	%ebp, %edx
	leaq	.LC15(%rip), %rsi
	movl	$2, %edi
	movb	$1, %al
	incl	%ebp
	movss	%xmm2, 28(%rsp)
	cvtss2sd	%xmm4, %xmm0
	movss	%xmm1, 24(%rsp)
	movss	%xmm4, 20(%rsp)
	call	__printf_chk@PLT
	cmpl	$25, %ebp
	je	.L82
	movss	20(%rsp), %xmm4
	comiss	.LC16(%rip), %xmm4
	movss	24(%rsp), %xmm1
	movss	28(%rsp), %xmm2
	jbe	.L82
.L65:
	movq	48(%rsp), %rax
	xorl	%esi, %esi
	addq	$4, %rax
	movq	%rax, %rdx
	jmp	.L77
.L71:
	movl	8(%rdx), %edi
	testl	%edi, %edi
	je	.L66
	movl	%edi, %ecx
	movss	.LC12(%rip), %xmm0
	cvtsi2ssq	%rcx, %xmm3
	xorl	%ecx, %ecx
	divss	%xmm3, %xmm0
	mulss	(%rdx), %xmm0
.L69:
	cmpl	%edi, %ecx
	jnb	.L66
	movq	12(%rdx), %r8
	movq	(%r8,%rcx,8), %r8
	incq	%rcx
	movss	8(%r8), %xmm3
	addss	%xmm0, %xmm3
	movss	%xmm3, 8(%r8)
	jmp	.L69
.L75:
	movss	4(%rax), %xmm0
	cmpl	$0, 8(%rax)
	movl	$0x00000000, 4(%rax)
	movss	(%rax), %xmm3
	mulss	%xmm5, %xmm0
	addss	%xmm6, %xmm0
	addss	%xmm7, %xmm0
	addss	%xmm0, %xmm1
	movss	%xmm0, (%rax)
	jne	.L73
	addss	%xmm0, %xmm2
.L73:
	subss	%xmm0, %xmm3
	comiss	%xmm8, %xmm3
	jnb	.L74
	xorps	.LC1(%rip), %xmm3
.L74:
	addss	%xmm3, %xmm4
	incl	%edx
	addq	$24, %rax
	jmp	.L72
.L82:
	xorl	%ebp, %ebp
	leaq	.LC17(%rip), %r12
.L76:
	movl	%ebp, %edx
	cmpl	%ebx, %ebp
	jnb	.L105
	imulq	$24, %rbp, %rax
	addq	48(%rsp), %rax
	movq	%r12, %rsi
	incq	%rbp
	cvtss2sd	4(%rax), %xmm0
	movl	$2, %edi
	movb	$1, %al
	call	__printf_chk@PLT
	jmp	.L76
.L105:
	call	cudaDeviceReset@PLT
	movl	%eax, %edi
	testl	%eax, %eax
	je	.L79
	call	cudaGetErrorString@PLT
	movq	stderr(%rip), %rdi
	movl	$2, %esi
	leaq	.LC18(%rip), %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	call	__fprintf_chk@PLT
	movl	$1, %edi
	jmp	.L98
.L79:
	leaq	.LC19(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	call	__printf_chk@PLT
.L30:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	je	.L80
	call	__stack_chk_fail@PLT
.L80:
	addq	$104, %rsp
	.cfi_def_cfa_offset 56
	movl	%r12d, %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
.LFE2028:
	.size	main, .-main
	.section	.rodata.str1.1
.LC20:
	.string	"_Z20setPageranksFromNextP6vertex"
.LC21:
	.string	"_Z25finalPagerankForIterationP6vertexif"
.LC22:
	.string	"_Z17addToNextPagerankP6vertexPf"
.LC23:
	.string	"_Z19initializePageranksP6vertexi"
.LC24:
	.string	"_Z21setPagerankNextToZeroP6vertex"
	.section	.text.startup
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2064:
	.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	_Z20setPageranksFromNextP6vertex(%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	_Z25finalPagerankForIterationP6vertexif(%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	_Z17addToNextPagerankP6vertexPf(%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	_Z19initializePageranksP6vertexi(%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	_Z21setPagerankNextToZeroP6vertex(%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
.LFE2064:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	-2147483648
	.long	0
	.long	0
	.long	0
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC12:
	.long	1062836634
	.align 4
.LC13:
	.long	1041865112
	.align 4
.LC14:
	.long	1065353216
	.align 4
.LC16:
	.long	897988541
	.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 <stdio.h>

// For the CUDA runtime routines (prefixed with "cuda_")
#include <hip/hip_runtime.h>


typedef struct vertex vertex;

struct vertex {
    unsigned int vertex_id;
    float pagerank;
    float pagerank_next;
    unsigned int n_successors;
    vertex ** successors;
};

float abs_float(float in) {
  if (in >= 0)
    return in;
  else
    return -in;
}


__global__ void setPagerankNextToZero(vertex * vertices) {
    int i = threadIdx.x;
    
    vertices[i].pagerank_next = 0;
}

__global__ void initializePageranks(vertex * vertices, int n_vertices) {
    int i = threadIdx.x;
    
    vertices[i].pagerank = 1.0/(float)n_vertices;
}


__global__ void addToNextPagerank(vertex * vertices, float * dangling_value) {
    int i = threadIdx.x;
    int j;

    if(vertices[i].n_successors > 0) {
        for(j = 0; j < vertices[i].n_successors; j++) {
            atomicAdd(&(vertices[i].successors[j]->pagerank_next), 0.85*(vertices[i].pagerank)/vertices[i].n_successors);
        }
    }else {
        atomicAdd(dangling_value, 0.85*vertices[i].pagerank);
    }
}

__global__ void finalPagerankForIteration(vertex * vertices, int n_vertices, float dangling_value){
    int i = threadIdx.x;

    vertices[i].pagerank_next += (dangling_value + (1-0.85))/((float)n_vertices);
    
}

__global__ void setPageranksFromNext(vertex * vertices) {
    int i = threadIdx.x;

    vertices[i].pagerank = vertices[i].pagerank_next;
}


int main(void) {
    // Error code to check return values for CUDA calls
    hipError_t err = hipSuccess;

/*************************************************************************/
    // build up the graph
    int i,j;
    unsigned int n_vertices = 0;
    unsigned int n_edges = 0;
    unsigned int vertex_from = 0, vertex_to = 0;

    vertex * vertices;

    FILE * fp;
    if ((fp = fopen("testInput.txt", "r")) == NULL) {
        fprintf(stderr,"ERROR: Could not open input file.\n");
        exit(-1);
     }

    // parse input file to count the number of vertices
    // expected format: vertex_from vertex_to
    while (fscanf(fp, "%u %u", &vertex_from, &vertex_to) != EOF) {
        if (vertex_from > n_vertices)
            n_vertices = vertex_from;
        else if (vertex_to > n_vertices)
            n_vertices = vertex_to;
    }
    n_vertices++;
    
    // CALC NUMBER OF OUTGOING LINKS PER PAGE ***********************************
    unsigned int * outgoingLinks = (unsigned int *) calloc(n_vertices,sizeof(unsigned int)); 
    fseek(fp,0L, SEEK_SET);
    while(fscanf(fp,"%u %u", &vertex_from, &vertex_to) != EOF) {
        outgoingLinks[vertex_from] += 1;
    }

    // allocate memory for vertices
    //vertices = (vertex *)malloc(n_vertices*sizeof(vertex));
    err = hipMallocManaged((void **)&vertices, n_vertices*sizeof(vertex));
    // err = cudaMemcpy(d_vertices, vertices, sizeOfVertices, cudaMemcpyHostToDevice);

    // SET Initial values  **********************************************************
    unsigned int n_iterations = 25;
    float alpha = 0.85;
    float eps   = 0.000001;
   

    if (!vertices) {
        fprintf(stderr,"Malloc failed for vertices.\n");
        exit(-1);
    }
    memset((void *)vertices, 0, (size_t)(n_vertices*sizeof(vertex)));

    // parse input file to count the number of successors of each vertex
    fseek(fp, 0L, SEEK_SET);
    while (fscanf(fp, "%u %u", &vertex_from, &vertex_to) != EOF) {
        vertices[vertex_from].n_successors++;
        n_edges++;
    }

    // allocate memory for successor pointers
    for (i=0; i<n_vertices; i++) {
        vertices[i].vertex_id = i;
        if (vertices[i].n_successors > 0) {
            // vertices[i].successors = (vertex **)malloc(vertices[i].n_successors*sizeof(vertex *));
            err = hipMallocManaged((void***)&vertices[i].successors,vertices[i].n_successors*sizeof(vertex*));
            if (!vertices[i].successors) {
                fprintf(stderr,"Malloc failed for successors of vertex %d.\n",i);
                exit(-1);
            }
            memset((void *)vertices[i].successors, 0, (size_t)(vertices[i].n_successors*sizeof(vertex *)));
        }
        else
            vertices[i].successors = NULL;
    }

    // parse input file to set up the successor pointers
    fseek(fp, 0L, SEEK_SET);
    while (fscanf(fp, "%d %d", &vertex_from, &vertex_to) != EOF) {
        for (i=0; i<vertices[vertex_from].n_successors; i++) {
            if (vertices[vertex_from].successors[i] == NULL) {
                vertices[vertex_from].successors[i] = &vertices[vertex_to];
                break;
            }
            else if (i==vertices[vertex_from].n_successors-1) {
                printf("Setting up the successor pointers of virtex %u failed",vertex_from);
                return -1;
            }
        }
    }

    fclose(fp);

    // PRINT THE DATASTRUCTURE
    /* for(i = 0; i < n_vertices; i++) {
            printf("Page: %d, Suc: ", (vertices+i)->vertex_id);
        
        
            for(j = 0; j < (vertices+i)->n_successors; j++) {
                printf("%d, ",(vertices+i)->successors[j]->vertex_id);
            }
            printf("\n");
        }*/   

  /*************************************************************************/
    // compute the pagerank on the GPU

    float dangling_value_h = 0;
    float * dangling_value_d;
    
    err = hipMalloc((void **)&dangling_value_d, sizeof(float));
    err = hipMemcpy(dangling_value_d, &dangling_value_h, sizeof(float), hipMemcpyHostToDevice);
    //err = cudaMallocManaged((void *)&dangling_value, sizeof(float));

    initializePageranks<<<1,46>>>(vertices, n_vertices);
    hipDeviceSynchronize();
    
    for(i = 0; i < 23; i++) {
        // set the next pagerank values to 0
        setPagerankNextToZero<<<1,46>>>(vertices);
        hipDeviceSynchronize();
       
        // set the dangling value to 0 
        dangling_value_h = 0;
        err = hipMemcpy(dangling_value_d, &dangling_value_h, sizeof(float), hipMemcpyHostToDevice);
        
        // initial parallel pagerank_next computation
        addToNextPagerank<<<1,46>>>(vertices, dangling_value_d);
        hipDeviceSynchronize();

        // get the dangling value
        err = hipMemcpy(&dangling_value_h, dangling_value_d, sizeof(float), hipMemcpyDeviceToHost);
        printf("the dangling_value is now: %.3f\n",dangling_value_h);
 
        // final parallel pagerank_next computation
        finalPagerankForIteration<<<1,46>>>(vertices, n_vertices, dangling_value_h);
         hipDeviceSynchronize();

        setPageranksFromNext<<<1,46>>>(vertices);
        hipDeviceSynchronize(); 
    }


    // print the pagerank values computed on the GPU
    for (i=0;i<n_vertices;i++) {
        printf("AFTER GPU | Vertex %u:\tpagerank = %.6f\n", i, vertices[i].pagerank);
    }

/*****************************************************************************************/ 
  // Compute pagerank on host using old method for comparison purposes
    unsigned int i_iteration;

    float value, diff;
    float pr_dangling_factor = alpha / (float)n_vertices;   // pagerank to redistribute from dangling nodes
    float pr_dangling;
    float pr_random_factor = (1-alpha) / (float)n_vertices; // random portion of the pagerank
    float pr_random;
    float pr_sum, pr_sum_inv, pr_sum_dangling;
    float temp;

    // initialization of values before pagerank loop
    for (i=0;i<n_vertices;i++) {
        vertices[i].pagerank = 1 / (float)n_vertices;
        vertices[i].pagerank_next =  0;
    }

    pr_sum = 0;
    pr_sum_dangling = 0;
    for (i=0; i<n_vertices; i++) {
        pr_sum += vertices[i].pagerank;
        if (!vertices[i].n_successors)
            pr_sum_dangling += vertices[i].pagerank;
    }

    i_iteration = 0;
    diff = eps+1;
    //****** transfer data structure to CUDA memory ************************************************ 
    // NOTE: CAN PROBABLY REMOVE THIS SECTION FOR NOW

    /*size_t sizeOfVertices = n_vertices * sizeof(struct vertex);
    vertex *d_vertices = NULL;
    err = cudaMalloc((void **)&d_vertices, sizeOfVertices);
    err = cudaMemcpy(d_vertices, vertices, sizeOfVertices, cudaMemcpyHostToDevice);
    
    
    
    vertex ** d_testVar;
    cudaMalloc(&d_testVar, 3*sizeof(vertex*));
    cudaMemcpy(d_testVar, vertices[0].successors, 3*sizeof(vertex*), cudaMemcpyHostToDevice);
    cudaMemcpy(&(d_vertices[0].successors),&d_testVar,sizeof(vertex**), cudaMemcpyHostToDevice);
    */


    //********************************************************************************************* 
    while ( (diff > eps) && (i_iteration < n_iterations) ) {

        for (i=0;i<n_vertices;i++) {
            if (vertices[i].n_successors)
                value = (alpha/vertices[i].n_successors)*vertices[i].pagerank;  //value = vote value after splitting equally
            else
                value = 0;
            //printf("vertex %d: value = %.6f \n",i,value);
            for (j=0;j<vertices[i].n_successors;j++) {               // pagerank_next = sum of votes linking to it
                vertices[i].successors[j]->pagerank_next += value;
            }
        }
    
        // for normalization
        pr_sum_inv = 1/pr_sum;

        // alpha
        pr_dangling = pr_dangling_factor * pr_sum_dangling;
        pr_random = pr_random_factor * pr_sum;

        pr_sum = 0;
        pr_sum_dangling = 0;

        diff = 0;
        for (i=0;i<n_vertices;i++) {
            // update pagerank
            temp = vertices[i].pagerank;
            vertices[i].pagerank = vertices[i].pagerank_next*pr_sum_inv + pr_dangling + pr_random;
            vertices[i].pagerank_next = 0;

            // for normalization in next cycle
            pr_sum += vertices[i].pagerank;
            if (!vertices[i].n_successors)
                pr_sum_dangling += vertices[i].pagerank;

            // convergence
            diff += abs_float(temp - vertices[i].pagerank);
        }
        printf("Iteration %u:\t diff = %.12f\n", i_iteration, diff);

        i_iteration++;
    }

 /*************************************************************************/
   // print the pageranks from this host computation
   for (i=0;i<n_vertices;i++) {
     printf("Vertex %u:\tpagerank = %.6f\n", i, vertices[i].pagerank);
   }
  /*************************************************************************/

    // Free device global memory
    // err = cudaFree(d_A);

    // Free host memory
    // free(h_A);

    // Reset the device and exit
    // cudaDeviceReset causes the driver to clean up all state. While
    // not mandatory in normal operation, it is good practice.  It is also
    // needed to ensure correct operation when the application is being
    // profiled. Calling cudaDeviceReset causes all profile data to be
    // flushed before the application exits
    err = hipDeviceReset();

    if (err != hipSuccess)
    {
        fprintf(stderr, "Failed to deinitialize the device! error=%s\n", hipGetErrorString(err));
        exit(EXIT_FAILURE);
    }

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


	.text
	.file	"pagerank_linked.hip"
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0                          # -- Begin function _Z9abs_floatf
.LCPI0_0:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.text
	.globl	_Z9abs_floatf
	.type	_Z9abs_floatf,@function
_Z9abs_floatf:                          # @_Z9abs_floatf
	.cfi_startproc
# %bb.0:
	movaps	.LCPI0_0(%rip), %xmm2           # xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm0, %xmm2
	movaps	%xmm2, %xmm1
	cmpnless	%xmm0, %xmm1
	andps	%xmm1, %xmm2
	andnps	%xmm0, %xmm1
	orps	%xmm2, %xmm1
	movaps	%xmm1, %xmm0
	retq
.Lfunc_end0:
	.size	_Z9abs_floatf, .Lfunc_end0-_Z9abs_floatf
	.cfi_endproc
                                        # -- End function
	.globl	_Z36__device_stub__setPagerankNextToZeroP6vertex # -- Begin function _Z36__device_stub__setPagerankNextToZeroP6vertex
	.type	_Z36__device_stub__setPagerankNextToZeroP6vertex,@function
_Z36__device_stub__setPagerankNextToZeroP6vertex: # @_Z36__device_stub__setPagerankNextToZeroP6vertex
	.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	$64, %rsp
	.cfi_def_cfa_offset 112
	.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)
	movq	%rsp, %rbx
	movq	%rax, (%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%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	$_Z21setPagerankNextToZeroP6vertex, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z36__device_stub__setPagerankNextToZeroP6vertex, .Lfunc_end1-_Z36__device_stub__setPagerankNextToZeroP6vertex
	.cfi_endproc
                                        # -- End function
	.globl	_Z34__device_stub__initializePageranksP6vertexi # -- Begin function _Z34__device_stub__initializePageranksP6vertexi
	.type	_Z34__device_stub__initializePageranksP6vertexi,@function
_Z34__device_stub__initializePageranksP6vertexi: # @_Z34__device_stub__initializePageranksP6vertexi
	.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	4(%rsp), %rcx
	movl	%esi, (%rcx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%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	$_Z19initializePageranksP6vertexi, %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_end2:
	.size	_Z34__device_stub__initializePageranksP6vertexi, .Lfunc_end2-_Z34__device_stub__initializePageranksP6vertexi
	.cfi_endproc
                                        # -- End function
	.globl	_Z32__device_stub__addToNextPagerankP6vertexPf # -- Begin function _Z32__device_stub__addToNextPagerankP6vertexPf
	.type	_Z32__device_stub__addToNextPagerankP6vertexPf,@function
_Z32__device_stub__addToNextPagerankP6vertexPf: # @_Z32__device_stub__addToNextPagerankP6vertexPf
	.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	$_Z17addToNextPagerankP6vertexPf, %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_end3:
	.size	_Z32__device_stub__addToNextPagerankP6vertexPf, .Lfunc_end3-_Z32__device_stub__addToNextPagerankP6vertexPf
	.cfi_endproc
                                        # -- End function
	.globl	_Z40__device_stub__finalPagerankForIterationP6vertexif # -- Begin function _Z40__device_stub__finalPagerankForIterationP6vertexif
	.type	_Z40__device_stub__finalPagerankForIterationP6vertexif,@function
_Z40__device_stub__finalPagerankForIterationP6vertexif: # @_Z40__device_stub__finalPagerankForIterationP6vertexif
	.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	$96, %rsp
	.cfi_def_cfa_offset 144
	.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	4(%rsp), %rcx
	movl	%esi, (%rcx)
	movq	%rsp, %rdx
	movss	%xmm0, (%rdx)
	leaq	64(%rsp), %rbx
	movq	%rax, (%rbx)
	movq	%rcx, 8(%rbx)
	movq	%rdx, 16(%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%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	$_Z25finalPagerankForIterationP6vertexif, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$112, %rsp
	.cfi_adjust_cfa_offset -112
	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	_Z40__device_stub__finalPagerankForIterationP6vertexif, .Lfunc_end4-_Z40__device_stub__finalPagerankForIterationP6vertexif
	.cfi_endproc
                                        # -- End function
	.globl	_Z35__device_stub__setPageranksFromNextP6vertex # -- Begin function _Z35__device_stub__setPageranksFromNextP6vertex
	.type	_Z35__device_stub__setPageranksFromNextP6vertex,@function
_Z35__device_stub__setPageranksFromNextP6vertex: # @_Z35__device_stub__setPageranksFromNextP6vertex
	.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	$64, %rsp
	.cfi_def_cfa_offset 112
	.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)
	movq	%rsp, %rbx
	movq	%rax, (%rbx)
	leaq	48(%rsp), %r14
	leaq	32(%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	$_Z20setPageranksFromNextP6vertex, %edi
	movq	%rbx, %r9
	pushq	(%r13)
	.cfi_adjust_cfa_offset 8
	pushq	(%r12)
	.cfi_adjust_cfa_offset 8
	callq	hipLaunchKernel
	addq	$80, %rsp
	.cfi_adjust_cfa_offset -80
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z35__device_stub__setPageranksFromNextP6vertex, .Lfunc_end5-_Z35__device_stub__setPageranksFromNextP6vertex
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function main
.LCPI6_0:
	.long	0x3f800000                      # float 1
.LCPI6_1:
	.long	0x80000000                      # float -0
.LCPI6_2:
	.long	0x3e199998                      # float 0.149999976
.LCPI6_3:
	.long	0x3f59999a                      # float 0.850000023
.LCPI6_5:
	.long	0x358637bd                      # float 9.99999997E-7
	.section	.rodata.cst16,"aM",@progbits,16
	.p2align	4, 0x0
.LCPI6_4:
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.long	0x80000000                      # float -0
	.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	$56, %rsp
	.cfi_def_cfa_offset 112
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	xorl	%ebx, %ebx
	movl	%ebx, (%rsp)
	movl	%ebx, 4(%rsp)
	movl	$.L.str, %edi
	movl	$.L.str.1, %esi
	callq	fopen
	testq	%rax, %rax
	je	.LBB6_76
# %bb.1:                                # %.preheader204
	movq	%rax, %r15
	movq	%rsp, %rdx
	leaq	4(%rsp), %rcx
	movl	$.L.str.3, %esi
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	je	.LBB6_4
# %bb.2:                                # %.lr.ph.preheader
	movq	%rsp, %r14
	leaq	4(%rsp), %r12
	xorl	%ecx, %ecx
.LBB6_3:                                # %.lr.ph
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rsp), %eax
	movl	4(%rsp), %ebx
	cmpl	%ecx, %ebx
	cmovbel	%ecx, %ebx
	cmpl	%ecx, %eax
	cmoval	%eax, %ebx
	movl	$.L.str.3, %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	movl	%ebx, %ecx
	cmpl	$-1, %eax
	jne	.LBB6_3
.LBB6_4:                                # %._crit_edge
	incl	%ebx
	movl	$4, %esi
	movq	%rbx, %rdi
	callq	calloc
	movq	%rax, %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	fseek
	movq	%rsp, %rdx
	leaq	4(%rsp), %rcx
	movl	$.L.str.3, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	je	.LBB6_7
# %bb.5:                                # %.lr.ph217.preheader
	movq	%rsp, %r12
	leaq	4(%rsp), %r13
.LBB6_6:                                # %.lr.ph217
                                        # =>This Inner Loop Header: Depth=1
	movl	(%rsp), %eax
	incl	(%r14,%rax,4)
	movl	$.L.str.3, %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	jne	.LBB6_6
.LBB6_7:                                # %._crit_edge218
	leaq	(,%rbx,8), %rax
	leaq	(%rax,%rax,2), %r14
	leaq	8(%rsp), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	hipMallocManaged
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	.LBB6_77
# %bb.8:
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	memset@PLT
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	fseek
	movq	%rsp, %rdx
	leaq	4(%rsp), %rcx
	movl	$.L.str.3, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	je	.LBB6_11
# %bb.9:
	movq	%rsp, %r12
	leaq	4(%rsp), %r13
.LBB6_10:                               # %.lr.ph221
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%rsp), %rax
	movl	(%rsp), %ecx
	leaq	(%rcx,%rcx,2), %rcx
	incl	12(%rax,%rcx,8)
	movl	$.L.str.3, %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	jne	.LBB6_10
.LBB6_11:                               # %.preheader203
	testq	%rbx, %rbx
	je	.LBB6_18
# %bb.12:                               # %.lr.ph223.preheader
	movl	$16, %r13d
	xorl	%r12d, %r12d
.LBB6_13:                               # %.lr.ph223
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%rsp), %rax
	leaq	(%rax,%r13), %rdi
	movl	%r12d, -16(%rax,%r13)
	movl	-4(%rax,%r13), %esi
	testq	%rsi, %rsi
	je	.LBB6_16
# %bb.14:                               #   in Loop: Header=BB6_13 Depth=1
	shlq	$3, %rsi
	movl	$1, %edx
	callq	hipMallocManaged
	movq	8(%rsp), %rax
	movq	(%rax,%r13), %rdi
	testq	%rdi, %rdi
	je	.LBB6_75
# %bb.15:                               #   in Loop: Header=BB6_13 Depth=1
	movl	-4(%rax,%r13), %edx
	shlq	$3, %rdx
	xorl	%esi, %esi
	callq	memset@PLT
	jmp	.LBB6_17
.LBB6_16:                               #   in Loop: Header=BB6_13 Depth=1
	movq	$0, (%rdi)
.LBB6_17:                               #   in Loop: Header=BB6_13 Depth=1
	incq	%r12
	addq	$24, %r13
	cmpq	%r12, %rbx
	jne	.LBB6_13
.LBB6_18:                               # %._crit_edge224
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	fseek
	movq	%rsp, %rdx
	leaq	4(%rsp), %rcx
	movl	$.L.str.6, %esi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	je	.LBB6_28
# %bb.19:                               # %.preheader202.preheader
	movq	%rsp, %r12
	leaq	4(%rsp), %r13
.LBB6_20:                               # %.preheader202
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_23 Depth 2
	movq	8(%rsp), %rax
	movl	(%rsp), %esi
	leaq	(%rsi,%rsi,2), %rcx
	movl	12(%rax,%rcx,8), %edx
	testl	%edx, %edx
	je	.LBB6_27
# %bb.21:                               # %.lr.ph227
                                        #   in Loop: Header=BB6_20 Depth=1
	movq	16(%rax,%rcx,8), %rcx
	cmpq	$0, (%rcx)
	je	.LBB6_25
# %bb.22:                               # %.lr.ph342.preheader
                                        #   in Loop: Header=BB6_20 Depth=1
	decl	%edx
	xorl	%r8d, %r8d
.LBB6_23:                               # %.lr.ph342
                                        #   Parent Loop BB6_20 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	cmpq	%r8, %rdx
	je	.LBB6_51
# %bb.24:                               #   in Loop: Header=BB6_23 Depth=2
	leaq	1(%r8), %rdi
	cmpq	$0, 8(%rcx,%r8,8)
	movq	%rdi, %r8
	jne	.LBB6_23
	jmp	.LBB6_26
.LBB6_25:                               #   in Loop: Header=BB6_20 Depth=1
	xorl	%edi, %edi
.LBB6_26:                               # %._crit_edge343
                                        #   in Loop: Header=BB6_20 Depth=1
	movl	4(%rsp), %edx
	leaq	(%rdx,%rdx,2), %rdx
	leaq	(%rax,%rdx,8), %rax
	movq	%rax, (%rcx,%rdi,8)
.LBB6_27:                               # %.loopexit
                                        #   in Loop: Header=BB6_20 Depth=1
	movl	$.L.str.6, %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	__isoc23_fscanf
	cmpl	$-1, %eax
	jne	.LBB6_20
.LBB6_28:                               # %._crit_edge229
	movabsq	$4294967297, %r12               # imm = 0x100000001
	movq	%r15, %rdi
	callq	fclose
	leaq	20(%rsp), %r15
	movl	$0, (%r15)
	leaq	24(%rsp), %r13
	movl	$4, %esi
	movq	%r13, %rdi
	callq	hipMalloc
	movq	(%r13), %rdi
	movl	$4, %edx
	movq	%r15, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	leaq	45(%r12), %r15
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_30
# %bb.29:
	movq	8(%rsp), %rdi
	movl	%ebx, %esi
	callq	_Z34__device_stub__initializePageranksP6vertexi
.LBB6_30:
	callq	hipDeviceSynchronize
	movl	$23, %ebp
	leaq	20(%rsp), %r13
.LBB6_31:                               # =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_33
# %bb.32:                               #   in Loop: Header=BB6_31 Depth=1
	movq	8(%rsp), %rdi
	callq	_Z36__device_stub__setPagerankNextToZeroP6vertex
.LBB6_33:                               #   in Loop: Header=BB6_31 Depth=1
	callq	hipDeviceSynchronize
	movl	$0, 20(%rsp)
	movq	24(%rsp), %rdi
	movl	$4, %edx
	movq	%r13, %rsi
	movl	$1, %ecx
	callq	hipMemcpy
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_35
# %bb.34:                               #   in Loop: Header=BB6_31 Depth=1
	movq	8(%rsp), %rdi
	movq	24(%rsp), %rsi
	callq	_Z32__device_stub__addToNextPagerankP6vertexPf
.LBB6_35:                               #   in Loop: Header=BB6_31 Depth=1
	callq	hipDeviceSynchronize
	movq	24(%rsp), %rsi
	movl	$4, %edx
	movq	%r13, %rdi
	movl	$2, %ecx
	callq	hipMemcpy
	xorps	%xmm0, %xmm0
	cvtss2sd	20(%rsp), %xmm0
	movl	$.L.str.8, %edi
	movb	$1, %al
	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	.LBB6_37
# %bb.36:                               #   in Loop: Header=BB6_31 Depth=1
	movq	8(%rsp), %rdi
	movss	20(%rsp), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	movl	%ebx, %esi
	callq	_Z40__device_stub__finalPagerankForIterationP6vertexif
.LBB6_37:                               #   in Loop: Header=BB6_31 Depth=1
	callq	hipDeviceSynchronize
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%r15, %rdx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	__hipPushCallConfiguration
	testl	%eax, %eax
	jne	.LBB6_39
# %bb.38:                               #   in Loop: Header=BB6_31 Depth=1
	movq	8(%rsp), %rdi
	callq	_Z35__device_stub__setPageranksFromNextP6vertex
.LBB6_39:                               #   in Loop: Header=BB6_31 Depth=1
	callq	hipDeviceSynchronize
	decl	%ebp
	jne	.LBB6_31
# %bb.40:                               # %.preheader201
	testq	%rbx, %rbx
	je	.LBB6_52
# %bb.41:                               # %.lr.ph232.preheader
	movl	$4, %r12d
	xorl	%r15d, %r15d
.LBB6_42:                               # %.lr.ph232
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%rsp), %rax
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rax,%r12), %xmm0
	movl	$.L.str.9, %edi
	movl	%r15d, %esi
	movb	$1, %al
	callq	printf
	incq	%r15
	addq	$24, %r12
	cmpq	%r15, %rbx
	jne	.LBB6_42
# %bb.43:                               # %._crit_edge233
	cvtsi2ss	%rbx, %xmm2
	xorps	%xmm0, %xmm0
	testq	%rbx, %rbx
	je	.LBB6_53
# %bb.44:                               # %.lr.ph236
	movss	.LCPI6_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm1
	movq	8(%rsp), %rax
	xorl	%ecx, %ecx
.LBB6_45:                               # =>This Inner Loop Header: Depth=1
	movss	%xmm1, 4(%rax,%rcx)
	movl	$0, 8(%rax,%rcx)
	addq	$24, %rcx
	cmpq	%rcx, %r14
	jne	.LBB6_45
# %bb.46:                               # %.preheader200
	testq	%rbx, %rbx
	je	.LBB6_53
# %bb.47:                               # %.lr.ph240
	movq	8(%rsp), %rax
	xorps	%xmm1, %xmm1
	xorl	%ecx, %ecx
	movss	.LCPI6_1(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
.LBB6_48:                               # =>This Inner Loop Header: Depth=1
	movss	4(%rax,%rcx), %xmm4             # xmm4 = mem[0],zero,zero,zero
	cmpl	$0, 12(%rax,%rcx)
	movaps	%xmm4, %xmm5
	je	.LBB6_50
# %bb.49:                               #   in Loop: Header=BB6_48 Depth=1
	movaps	%xmm3, %xmm5
.LBB6_50:                               #   in Loop: Header=BB6_48 Depth=1
	addss	%xmm5, %xmm1
	addss	%xmm4, %xmm0
	addq	$24, %rcx
	cmpq	%rcx, %r14
	jne	.LBB6_48
	jmp	.LBB6_54
.LBB6_51:
	movl	$.L.str.7, %edi
                                        # kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	printf
	movl	$-1, %eax
	jmp	.LBB6_74
.LBB6_52:                               # %._crit_edge233.thread
	cvtsi2ss	%rbx, %xmm2
	xorps	%xmm0, %xmm0
.LBB6_53:
	xorps	%xmm1, %xmm1
.LBB6_54:                               # %.preheader199
	movss	.LCPI6_2(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	divss	%xmm2, %xmm3
	movss	%xmm3, 40(%rsp)                 # 4-byte Spill
	movss	.LCPI6_3(%rip), %xmm4           # xmm4 = mem[0],zero,zero,zero
	movaps	%xmm4, %xmm3
	divss	%xmm2, %xmm3
	movss	%xmm3, 36(%rsp)                 # 4-byte Spill
	xorl	%r15d, %r15d
	movss	.LCPI6_1(%rip), %xmm6           # xmm6 = mem[0],zero,zero,zero
	movaps	.LCPI6_4(%rip), %xmm7           # xmm7 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
.LBB6_55:                               # %.preheader198
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB6_57 Depth 2
                                        #       Child Loop BB6_59 Depth 3
                                        #     Child Loop BB6_63 Depth 2
	xorps	%xmm8, %xmm8
	testq	%rbx, %rbx
	je	.LBB6_66
# %bb.56:                               # %.lr.ph248
                                        #   in Loop: Header=BB6_55 Depth=1
	movq	8(%rsp), %rax
	xorl	%ecx, %ecx
.LBB6_57:                               #   Parent Loop BB6_55 Depth=1
                                        # =>  This Loop Header: Depth=2
                                        #       Child Loop BB6_59 Depth 3
	leaq	(%rcx,%rcx,2), %rsi
	movl	12(%rax,%rsi,8), %edx
	testq	%rdx, %rdx
	je	.LBB6_60
# %bb.58:                               # %.lr.ph245
                                        #   in Loop: Header=BB6_57 Depth=2
	xorps	%xmm3, %xmm3
	cvtsi2ss	%rdx, %xmm3
	movaps	%xmm4, %xmm2
	divss	%xmm3, %xmm2
	mulss	4(%rax,%rsi,8), %xmm2
	movq	16(%rax,%rsi,8), %rsi
	xorl	%edi, %edi
.LBB6_59:                               #   Parent Loop BB6_55 Depth=1
                                        #     Parent Loop BB6_57 Depth=2
                                        # =>    This Inner Loop Header: Depth=3
	movq	(%rsi,%rdi,8), %r8
	movss	8(%r8), %xmm3                   # xmm3 = mem[0],zero,zero,zero
	addss	%xmm2, %xmm3
	movss	%xmm3, 8(%r8)
	incq	%rdi
	cmpq	%rdi, %rdx
	jne	.LBB6_59
.LBB6_60:                               # %._crit_edge246
                                        #   in Loop: Header=BB6_57 Depth=2
	incq	%rcx
	cmpq	%rbx, %rcx
	jne	.LBB6_57
# %bb.61:                               # %._crit_edge249
                                        #   in Loop: Header=BB6_55 Depth=1
	xorps	%xmm10, %xmm10
	xorps	%xmm9, %xmm9
	testq	%rbx, %rbx
	je	.LBB6_67
# %bb.62:                               # %.lr.ph255
                                        #   in Loop: Header=BB6_55 Depth=1
	movss	.LCPI6_0(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm2
	mulss	36(%rsp), %xmm1                 # 4-byte Folded Reload
	mulss	40(%rsp), %xmm0                 # 4-byte Folded Reload
	movq	8(%rsp), %rax
	xorl	%ecx, %ecx
	xorps	%xmm8, %xmm8
.LBB6_63:                               #   Parent Loop BB6_55 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	4(%rax,%rcx), %xmm3             # xmm3 = mem[0],zero,zero,zero
	movss	8(%rax,%rcx), %xmm4             # xmm4 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm4
	addss	%xmm1, %xmm4
	addss	%xmm0, %xmm4
	movss	%xmm4, 4(%rax,%rcx)
	movl	$0, 8(%rax,%rcx)
	cmpl	$0, 12(%rax,%rcx)
	movaps	%xmm4, %xmm5
	je	.LBB6_65
# %bb.64:                               #   in Loop: Header=BB6_63 Depth=2
	movaps	%xmm6, %xmm5
.LBB6_65:                               #   in Loop: Header=BB6_63 Depth=2
	addss	%xmm5, %xmm9
	addss	%xmm4, %xmm10
	subss	%xmm4, %xmm3
	movaps	%xmm3, %xmm4
	xorps	%xmm7, %xmm4
	movaps	%xmm4, %xmm5
	cmpnless	%xmm3, %xmm5
	andps	%xmm5, %xmm4
	andnps	%xmm3, %xmm5
	orps	%xmm4, %xmm5
	addss	%xmm5, %xmm8
	addq	$24, %rcx
	cmpq	%rcx, %r14
	jne	.LBB6_63
	jmp	.LBB6_67
.LBB6_66:                               #   in Loop: Header=BB6_55 Depth=1
	xorps	%xmm10, %xmm10
	xorps	%xmm9, %xmm9
.LBB6_67:                               # %._crit_edge256
                                        #   in Loop: Header=BB6_55 Depth=1
	movss	%xmm8, 52(%rsp)                 # 4-byte Spill
	movss	%xmm10, 44(%rsp)                # 4-byte Spill
	movss	%xmm9, 48(%rsp)                 # 4-byte Spill
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm8, %xmm0
	movl	$.L.str.10, %edi
	movl	%r15d, %esi
	movb	$1, %al
	callq	printf
	movaps	.LCPI6_4(%rip), %xmm7           # xmm7 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movss	.LCPI6_1(%rip), %xmm6           # xmm6 = mem[0],zero,zero,zero
	movss	52(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	ucomiss	.LCPI6_5(%rip), %xmm0
	movss	.LCPI6_3(%rip), %xmm4           # xmm4 = mem[0],zero,zero,zero
	jbe	.LBB6_69
# %bb.68:                               # %._crit_edge256
                                        #   in Loop: Header=BB6_55 Depth=1
	leal	1(%r15), %eax
	movss	48(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movss	44(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	cmpl	$24, %r15d
	movl	%eax, %r15d
	jb	.LBB6_55
.LBB6_69:                               # %.preheader
	testq	%rbx, %rbx
	je	.LBB6_72
# %bb.70:                               # %.lr.ph264.preheader
	movl	$4, %r15d
	xorl	%r14d, %r14d
.LBB6_71:                               # %.lr.ph264
                                        # =>This Inner Loop Header: Depth=1
	movq	8(%rsp), %rax
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rax,%r15), %xmm0
	movl	$.L.str.11, %edi
	movl	%r14d, %esi
	movb	$1, %al
	callq	printf
	incq	%r14
	addq	$24, %r15
	cmpq	%r14, %rbx
	jne	.LBB6_71
.LBB6_72:                               # %._crit_edge265
	callq	hipDeviceReset
	testl	%eax, %eax
	jne	.LBB6_80
# %bb.73:
	movl	$.Lstr, %edi
	callq	puts@PLT
	xorl	%eax, %eax
.LBB6_74:
	addq	$56, %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
.LBB6_75:
	.cfi_def_cfa_offset 112
	movq	stderr(%rip), %rdi
	movl	$.L.str.5, %esi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	fprintf
.LBB6_79:
	movl	$-1, %edi
	callq	exit
.LBB6_76:
	movq	stderr(%rip), %rcx
	movl	$.L.str.2, %edi
	movl	$34, %esi
	jmp	.LBB6_78
.LBB6_77:
	movq	stderr(%rip), %rcx
	movl	$.L.str.4, %edi
	movl	$28, %esi
.LBB6_78:
	movl	$1, %edx
	callq	fwrite@PLT
	jmp	.LBB6_79
.LBB6_80:
	movq	stderr(%rip), %rbx
	movl	%eax, %edi
	callq	hipGetErrorString
	movl	$.L.str.12, %esi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	fprintf
	movl	$1, %edi
	callq	exit
.Lfunc_end6:
	.size	main, .Lfunc_end6-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	.LBB7_2
# %bb.1:
	movl	$__hip_fatbin_wrapper, %edi
	callq	__hipRegisterFatBinary
	movq	%rax, %rbx
	movq	%rax, __hip_gpubin_handle(%rip)
.LBB7_2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rsp)
	movups	%xmm0, (%rsp)
	movl	$_Z21setPagerankNextToZeroP6vertex, %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	$_Z19initializePageranksP6vertexi, %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	$_Z17addToNextPagerankP6vertexPf, %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	$_Z25finalPagerankForIterationP6vertexif, %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	$_Z20setPageranksFromNextP6vertex, %esi
	movl	$.L__unnamed_5, %edx
	movl	$.L__unnamed_5, %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_end7:
	.size	__hip_module_ctor, .Lfunc_end7-__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	.LBB8_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
.LBB8_2:
	retq
.Lfunc_end8:
	.size	__hip_module_dtor, .Lfunc_end8-__hip_module_dtor
	.cfi_endproc
                                        # -- End function
	.type	_Z21setPagerankNextToZeroP6vertex,@object # @_Z21setPagerankNextToZeroP6vertex
	.section	.rodata,"a",@progbits
	.globl	_Z21setPagerankNextToZeroP6vertex
	.p2align	3, 0x0
_Z21setPagerankNextToZeroP6vertex:
	.quad	_Z36__device_stub__setPagerankNextToZeroP6vertex
	.size	_Z21setPagerankNextToZeroP6vertex, 8

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

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

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

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

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

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

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"ERROR: Could not open input file.\n"
	.size	.L.str.2, 35

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"%u %u"
	.size	.L.str.3, 6

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Malloc failed for vertices.\n"
	.size	.L.str.4, 29

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Malloc failed for successors of vertex %d.\n"
	.size	.L.str.5, 44

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"%d %d"
	.size	.L.str.6, 6

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Setting up the successor pointers of virtex %u failed"
	.size	.L.str.7, 54

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"the dangling_value is now: %.3f\n"
	.size	.L.str.8, 33

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"AFTER GPU | Vertex %u:\tpagerank = %.6f\n"
	.size	.L.str.9, 40

	.type	.L.str.10,@object               # @.str.10
.L.str.10:
	.asciz	"Iteration %u:\t diff = %.12f\n"
	.size	.L.str.10, 29

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"Vertex %u:\tpagerank = %.6f\n"
	.size	.L.str.11, 28

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Failed to deinitialize the device! error=%s\n"
	.size	.L.str.12, 45

	.type	.L__unnamed_1,@object           # @0
.L__unnamed_1:
	.asciz	"_Z21setPagerankNextToZeroP6vertex"
	.size	.L__unnamed_1, 34

	.type	.L__unnamed_2,@object           # @1
.L__unnamed_2:
	.asciz	"_Z19initializePageranksP6vertexi"
	.size	.L__unnamed_2, 33

	.type	.L__unnamed_3,@object           # @2
.L__unnamed_3:
	.asciz	"_Z17addToNextPagerankP6vertexPf"
	.size	.L__unnamed_3, 32

	.type	.L__unnamed_4,@object           # @3
.L__unnamed_4:
	.asciz	"_Z25finalPagerankForIterationP6vertexif"
	.size	.L__unnamed_4, 40

	.type	.L__unnamed_5,@object           # @4
.L__unnamed_5:
	.asciz	"_Z20setPageranksFromNextP6vertex"
	.size	.L__unnamed_5, 33

	.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	"Done"
	.size	.Lstr, 5

	.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 _Z36__device_stub__setPagerankNextToZeroP6vertex
	.addrsig_sym _Z34__device_stub__initializePageranksP6vertexi
	.addrsig_sym _Z32__device_stub__addToNextPagerankP6vertexPf
	.addrsig_sym _Z40__device_stub__finalPagerankForIterationP6vertexif
	.addrsig_sym _Z35__device_stub__setPageranksFromNextP6vertex
	.addrsig_sym __hip_module_ctor
	.addrsig_sym __hip_module_dtor
	.addrsig_sym _Z21setPagerankNextToZeroP6vertex
	.addrsig_sym _Z19initializePageranksP6vertexi
	.addrsig_sym _Z17addToNextPagerankP6vertexPf
	.addrsig_sym _Z25finalPagerankForIterationP6vertexif
	.addrsig_sym _Z20setPageranksFromNextP6vertex
	.addrsig_sym __hip_fatbin
	.addrsig_sym __hip_fatbin_wrapper
	.addrsig_sym __hip_cuid_

	.text
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.protected	_Z21setPagerankNextToZeroP6vertex ; -- Begin function _Z21setPagerankNextToZeroP6vertex
	.globl	_Z21setPagerankNextToZeroP6vertex
	.p2align	8
	.type	_Z21setPagerankNextToZeroP6vertex,@function
_Z21setPagerankNextToZeroP6vertex:      ; @_Z21setPagerankNextToZeroP6vertex
; %bb.0:
	s_load_b64 s[0:1], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[1:2], null, v0, 24, s[0:1]
	v_mov_b32_e32 v0, 0
	global_store_b32 v[1:2], v0, off offset:8
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z21setPagerankNextToZeroP6vertex
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 8
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 3
		.amdhsa_next_free_sgpr 2
		.amdhsa_reserve_vcc 0
		.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	_Z21setPagerankNextToZeroP6vertex, .Lfunc_end0-_Z21setPagerankNextToZeroP6vertex
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 44
; NumSgprs: 2
; NumVgprs: 3
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 2
; NumVGPRsForWavesPerEU: 3
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z19initializePageranksP6vertexi ; -- Begin function _Z19initializePageranksP6vertexi
	.globl	_Z19initializePageranksP6vertexi
	.p2align	8
	.type	_Z19initializePageranksP6vertexi,@function
_Z19initializePageranksP6vertexi:       ; @_Z19initializePageranksP6vertexi
; %bb.0:
	s_clause 0x1
	s_load_b32 s2, s[0:1], 0x8
	s_load_b64 s[0:1], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	v_cvt_f32_i32_e32 v3, s2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f32 v1, null, v3, v3, 1.0
	v_rcp_f32_e32 v2, v1
	s_waitcnt_depctr 0xfff
	v_fma_f32 v4, -v1, v2, 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fmac_f32_e32 v2, v4, v2
	v_div_scale_f32 v4, vcc_lo, 1.0, v3, 1.0
	v_mul_f32_e32 v5, v4, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v6, -v1, v5, v4
	v_fmac_f32_e32 v5, v6, v2
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f32 v1, -v1, v5, v4
	v_div_fmas_f32 v4, v1, v2, v5
	v_mad_u64_u32 v[1:2], null, v0, 24, s[0:1]
	s_delay_alu instid0(VALU_DEP_2)
	v_div_fixup_f32 v0, v4, v3, 1.0
	global_store_b32 v[1:2], v0, off offset:4
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z19initializePageranksP6vertexi
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 12
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 7
		.amdhsa_next_free_sgpr 3
		.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	_Z19initializePageranksP6vertexi, .Lfunc_end1-_Z19initializePageranksP6vertexi
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 152
; NumSgprs: 5
; NumVgprs: 7
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 5
; 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: 0
	.text
	.protected	_Z17addToNextPagerankP6vertexPf ; -- Begin function _Z17addToNextPagerankP6vertexPf
	.globl	_Z17addToNextPagerankP6vertexPf
	.p2align	8
	.type	_Z17addToNextPagerankP6vertexPf,@function
_Z17addToNextPagerankP6vertexPf:        ; @_Z17addToNextPagerankP6vertexPf
; %bb.0:
	s_load_b128 s[0:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[4:5], null, v0, 24, s[0:1]
	s_mov_b32 s1, 0
	s_mov_b32 s0, exec_lo
	global_load_b32 v8, v[4:5], off offset:12
	s_waitcnt vmcnt(0)
	v_cmpx_ne_u32_e32 0, v8
	s_xor_b32 s6, exec_lo, s0
	s_cbranch_execz .LBB2_6
; %bb.1:                                ; %.lr.ph
	v_add_co_u32 v0, vcc_lo, v4, 12
	v_add_co_ci_u32_e32 v1, vcc_lo, 0, v5, vcc_lo
	v_add_co_u32 v2, vcc_lo, v4, 16
	v_add_co_ci_u32_e32 v3, vcc_lo, 0, v5, vcc_lo
	v_add_co_u32 v4, vcc_lo, v4, 4
	v_add_co_ci_u32_e32 v5, vcc_lo, 0, v5, vcc_lo
	s_mov_b32 s4, 0x33333333
	s_mov_b32 s5, 0x3feb3333
	s_mov_b32 s7, 0
	s_mov_b32 s0, s1
.LBB2_2:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB2_3 Depth 2
	s_clause 0x1
	global_load_b64 v[6:7], v[2:3], off
	global_load_b32 v9, v[4:5], off
	s_lshl_b64 s[8:9], s[0:1], 3
	v_cvt_f64_u32_e32 v[12:13], v8
	s_waitcnt vmcnt(1)
	v_add_co_u32 v6, vcc_lo, v6, s8
	v_add_co_ci_u32_e32 v7, vcc_lo, s9, v7, vcc_lo
	s_waitcnt vmcnt(0)
	v_cvt_f64_f32_e32 v[9:10], v9
	s_mov_b32 s8, 0
	flat_load_b64 v[6:7], v[6:7]
	v_mul_f64 v[10:11], v[9:10], s[4:5]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_scale_f64 v[14:15], null, v[12:13], v[12:13], v[10:11]
	v_rcp_f64_e32 v[16:17], v[14:15]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[18:19], -v[14:15], v[16:17], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[16:17], v[16:17], v[18:19], v[16:17]
	v_fma_f64 v[18:19], -v[14:15], v[16:17], 1.0
	s_delay_alu instid0(VALU_DEP_1) | instskip(SKIP_1) | instid1(VALU_DEP_1)
	v_fma_f64 v[16:17], v[16:17], v[18:19], v[16:17]
	v_div_scale_f64 v[18:19], vcc_lo, v[10:11], v[12:13], v[10:11]
	v_mul_f64 v[20:21], v[18:19], v[16:17]
	s_waitcnt vmcnt(0) lgkmcnt(0)
	flat_load_b32 v9, v[6:7] offset:8
	v_fma_f64 v[14:15], -v[14:15], v[20:21], v[18:19]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[14:15], v[14:15], v[16:17], v[20:21]
	v_div_fixup_f64 v[10:11], v[14:15], v[12:13], v[10:11]
	s_delay_alu instid0(VALU_DEP_1)
	v_cvt_f32_f64_e32 v10, v[10:11]
.LBB2_3:                                ; %atomicrmw.start
                                        ;   Parent Loop BB2_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	s_waitcnt vmcnt(0) lgkmcnt(0)
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v8, v9, v10
	flat_atomic_cmpswap_b32 v8, v[6:7], v[8:9] offset:8 glc
	s_waitcnt vmcnt(0) lgkmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v8, v9
	v_mov_b32_e32 v9, v8
	s_or_b32 s8, vcc_lo, s8
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s8
	s_cbranch_execnz .LBB2_3
; %bb.4:                                ; %atomicrmw.end
                                        ;   in Loop: Header=BB2_2 Depth=1
	s_or_b32 exec_lo, exec_lo, s8
	global_load_b32 v8, v[0:1], off
	s_add_i32 s0, s0, 1
	s_waitcnt vmcnt(0)
	v_cmp_ge_u32_e32 vcc_lo, s0, v8
	s_or_b32 s7, vcc_lo, s7
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s7
	s_cbranch_execnz .LBB2_2
; %bb.5:                                ; %Flow
	s_or_b32 exec_lo, exec_lo, s7
                                        ; implicit-def: $vgpr4_vgpr5
.LBB2_6:                                ; %Flow33
	s_and_not1_saveexec_b32 s0, s6
	s_cbranch_execz .LBB2_12
; %bb.7:
	global_load_b32 v0, v[4:5], off offset:4
	s_mov_b32 s4, 0x33333333
	s_mov_b32 s5, 0x3feb3333
	v_bfrev_b32_e32 v2, 1
	s_mov_b32 s0, exec_lo
	s_waitcnt vmcnt(0)
	v_cvt_f64_f32_e32 v[0:1], v0
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[0:1], v[0:1], s[4:5]
	v_cvt_f32_f64_e32 v0, v[0:1]
.LBB2_8:                                ; %ComputeLoop
                                        ; =>This Inner Loop Header: Depth=1
	s_ctz_i32_b32 s1, s0
	s_delay_alu instid0(VALU_DEP_1) | instid1(SALU_CYCLE_1)
	v_readlane_b32 s4, v0, s1
	s_lshl_b32 s1, 1, s1
	s_delay_alu instid0(SALU_CYCLE_1) | instskip(NEXT) | instid1(SALU_CYCLE_1)
	s_and_not1_b32 s0, s0, s1
	s_cmp_lg_u32 s0, 0
	s_delay_alu instid0(VALU_DEP_1)
	v_add_f32_e32 v2, s4, v2
	s_cbranch_scc1 .LBB2_8
; %bb.9:                                ; %ComputeEnd
	v_mbcnt_lo_u32_b32 v0, exec_lo, 0
	s_mov_b32 s0, 0
	s_mov_b32 s1, exec_lo
	s_delay_alu instid0(VALU_DEP_1)
	v_cmpx_eq_u32_e32 0, v0
	s_xor_b32 s1, exec_lo, s1
	s_cbranch_execz .LBB2_12
; %bb.10:
	v_mov_b32_e32 v3, 0
	global_load_b32 v1, v3, s[2:3]
.LBB2_11:                               ; %atomicrmw.start21
                                        ; =>This Inner Loop Header: Depth=1
	s_waitcnt vmcnt(0)
	v_add_f32_e32 v0, v1, v2
	global_atomic_cmpswap_b32 v0, v3, v[0:1], s[2:3] glc
	s_waitcnt vmcnt(0)
	v_cmp_eq_u32_e32 vcc_lo, v0, v1
	v_mov_b32_e32 v1, v0
	s_or_b32 s0, vcc_lo, s0
	s_delay_alu instid0(SALU_CYCLE_1)
	s_and_not1_b32 exec_lo, exec_lo, s0
	s_cbranch_execnz .LBB2_11
.LBB2_12:                               ; %Flow34
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z17addToNextPagerankP6vertexPf
		.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 0
		.amdhsa_next_free_vgpr 22
		.amdhsa_next_free_sgpr 10
		.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	_Z17addToNextPagerankP6vertexPf, .Lfunc_end2-_Z17addToNextPagerankP6vertexPf
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 600
; NumSgprs: 12
; NumVgprs: 22
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 1
; VGPRBlocks: 2
; NumSGPRsForWavesPerEU: 12
; NumVGPRsForWavesPerEU: 22
; Occupancy: 16
; WaveLimiterHint : 1
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z25finalPagerankForIterationP6vertexif ; -- Begin function _Z25finalPagerankForIterationP6vertexif
	.globl	_Z25finalPagerankForIterationP6vertexif
	.p2align	8
	.type	_Z25finalPagerankForIterationP6vertexif,@function
_Z25finalPagerankForIterationP6vertexif: ; @_Z25finalPagerankForIterationP6vertexif
; %bb.0:
	s_load_b128 s[0:3], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	v_cvt_f64_f32_e32 v[1:2], s3
	v_cvt_f32_i32_e32 v3, s2
	s_mov_b32 s2, 0x33333334
	s_mov_b32 s3, 0x3fc33333
	v_mad_u64_u32 v[7:8], null, v0, 24, s[0:1]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_cvt_f64_f32_e32 v[3:4], v3
	global_load_b32 v15, v[7:8], off offset:8
	v_add_f64 v[1:2], v[1:2], s[2:3]
	v_div_scale_f64 v[5:6], null, v[3:4], v[3:4], v[1:2]
	v_div_scale_f64 v[13:14], vcc_lo, v[1:2], v[3:4], v[1:2]
	s_delay_alu instid0(VALU_DEP_2) | instskip(SKIP_2) | instid1(VALU_DEP_1)
	v_rcp_f64_e32 v[9:10], v[5:6]
	s_waitcnt_depctr 0xfff
	v_fma_f64 v[11:12], -v[5:6], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_fma_f64 v[11:12], -v[5:6], v[9:10], 1.0
	v_fma_f64 v[9:10], v[9:10], v[11:12], v[9:10]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_mul_f64 v[11:12], v[13:14], v[9:10]
	v_fma_f64 v[5:6], -v[5:6], v[11:12], v[13:14]
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_div_fmas_f64 v[5:6], v[5:6], v[9:10], v[11:12]
	v_div_fixup_f64 v[0:1], v[5:6], v[3:4], v[1:2]
	s_waitcnt vmcnt(0)
	v_cvt_f64_f32_e32 v[2:3], v15
	s_delay_alu instid0(VALU_DEP_1) | instskip(NEXT) | instid1(VALU_DEP_1)
	v_add_f64 v[0:1], v[0:1], v[2:3]
	v_cvt_f32_f64_e32 v0, v[0:1]
	global_store_b32 v[7:8], v0, off offset:8
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z25finalPagerankForIterationP6vertexif
		.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 0
		.amdhsa_next_free_vgpr 16
		.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_end3:
	.size	_Z25finalPagerankForIterationP6vertexif, .Lfunc_end3-_Z25finalPagerankForIterationP6vertexif
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 216
; NumSgprs: 6
; NumVgprs: 16
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 1
; NumSGPRsForWavesPerEU: 6
; NumVGPRsForWavesPerEU: 16
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.protected	_Z20setPageranksFromNextP6vertex ; -- Begin function _Z20setPageranksFromNextP6vertex
	.globl	_Z20setPageranksFromNextP6vertex
	.p2align	8
	.type	_Z20setPageranksFromNextP6vertex,@function
_Z20setPageranksFromNextP6vertex:       ; @_Z20setPageranksFromNextP6vertex
; %bb.0:
	s_load_b64 s[0:1], s[0:1], 0x0
	s_waitcnt lgkmcnt(0)
	v_mad_u64_u32 v[1:2], null, v0, 24, s[0:1]
	global_load_b32 v0, v[1:2], off offset:8
	s_waitcnt vmcnt(0)
	global_store_b32 v[1:2], v0, off offset:4
	s_nop 0
	s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
	s_endpgm
	.section	.rodata,"a",@progbits
	.p2align	6, 0x0
	.amdhsa_kernel _Z20setPageranksFromNextP6vertex
		.amdhsa_group_segment_fixed_size 0
		.amdhsa_private_segment_fixed_size 0
		.amdhsa_kernarg_size 8
		.amdhsa_user_sgpr_count 15
		.amdhsa_user_sgpr_dispatch_ptr 0
		.amdhsa_user_sgpr_queue_ptr 0
		.amdhsa_user_sgpr_kernarg_segment_ptr 1
		.amdhsa_user_sgpr_dispatch_id 0
		.amdhsa_user_sgpr_private_segment_size 0
		.amdhsa_wavefront_size32 1
		.amdhsa_uses_dynamic_stack 0
		.amdhsa_enable_private_segment 0
		.amdhsa_system_sgpr_workgroup_id_x 1
		.amdhsa_system_sgpr_workgroup_id_y 0
		.amdhsa_system_sgpr_workgroup_id_z 0
		.amdhsa_system_sgpr_workgroup_info 0
		.amdhsa_system_vgpr_workitem_id 0
		.amdhsa_next_free_vgpr 3
		.amdhsa_next_free_sgpr 2
		.amdhsa_reserve_vcc 0
		.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	_Z20setPageranksFromNextP6vertex, .Lfunc_end4-_Z20setPageranksFromNextP6vertex
                                        ; -- End function
	.section	.AMDGPU.csdata,"",@progbits
; Kernel info:
; codeLenInByte = 52
; NumSgprs: 2
; NumVgprs: 3
; ScratchSize: 0
; MemoryBound: 0
; FloatMode: 240
; IeeeMode: 1
; LDSByteSize: 0 bytes/workgroup (compile time only)
; SGPRBlocks: 0
; VGPRBlocks: 0
; NumSGPRsForWavesPerEU: 2
; NumVGPRsForWavesPerEU: 3
; Occupancy: 16
; WaveLimiterHint : 0
; COMPUTE_PGM_RSRC2:SCRATCH_EN: 0
; COMPUTE_PGM_RSRC2:USER_SGPR: 15
; COMPUTE_PGM_RSRC2:TRAP_HANDLER: 0
; COMPUTE_PGM_RSRC2:TGID_X_EN: 1
; COMPUTE_PGM_RSRC2:TGID_Y_EN: 0
; COMPUTE_PGM_RSRC2:TGID_Z_EN: 0
; COMPUTE_PGM_RSRC2:TIDIG_COMP_CNT: 0
	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgpu_metadata
---
amdhsa.kernels:
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 8
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z21setPagerankNextToZeroP6vertex
    .private_segment_fixed_size: 0
    .sgpr_count:     2
    .sgpr_spill_count: 0
    .symbol:         _Z21setPagerankNextToZeroP6vertex.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     3
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 12
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z19initializePageranksP6vertexi
    .private_segment_fixed_size: 0
    .sgpr_count:     5
    .sgpr_spill_count: 0
    .symbol:         _Z19initializePageranksP6vertexi.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
    .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:           _Z17addToNextPagerankP6vertexPf
    .private_segment_fixed_size: 0
    .sgpr_count:     12
    .sgpr_spill_count: 0
    .symbol:         _Z17addToNextPagerankP6vertexPf.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     22
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
      - .offset:         8
        .size:           4
        .value_kind:     by_value
      - .offset:         12
        .size:           4
        .value_kind:     by_value
    .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:           _Z25finalPagerankForIterationP6vertexif
    .private_segment_fixed_size: 0
    .sgpr_count:     6
    .sgpr_spill_count: 0
    .symbol:         _Z25finalPagerankForIterationP6vertexif.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     16
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
  - .args:
      - .address_space:  global
        .offset:         0
        .size:           8
        .value_kind:     global_buffer
    .group_segment_fixed_size: 0
    .kernarg_segment_align: 8
    .kernarg_segment_size: 8
    .language:       OpenCL C
    .language_version:
      - 2
      - 0
    .max_flat_workgroup_size: 1024
    .name:           _Z20setPageranksFromNextP6vertex
    .private_segment_fixed_size: 0
    .sgpr_count:     2
    .sgpr_spill_count: 0
    .symbol:         _Z20setPageranksFromNextP6vertex.kd
    .uniform_work_group_size: 1
    .uses_dynamic_stack: false
    .vgpr_count:     3
    .vgpr_spill_count: 0
    .wavefront_size: 32
    .workgroup_processor_mode: 1
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
